 /* Reset and base */
 *,
 *::before,
 *::after {
     box-sizing: border-box;
 }

 body {
     margin: 0;
     font-family: Arial, sans-serif;
     background: #eee;
     color: #222;
 }

 a {
     color: #0047e0;
     text-decoration: none;
 }

 a:hover,
 a:focus {
     text-decoration: underline;
 }

 /* Container and layout */
 .container {
     max-width: 960px;
     margin: 0 auto;
     background: #fff;
     min-height: 100vh;
     display: flex;
     flex-direction: column;
 }

 /* Header Nav */
 header {
     background: #0052cc;
     color: white;
     font-weight: bold;
     font-size: 0.9rem;
     padding: 0.4em 1rem;
     user-select: none;
 }

 header nav {
     max-width: 960px;
     margin: 0 auto;
 }

 header nav a {
     color: white;
     font-weight: bold;
     margin-right: 0.8rem;
     text-transform: uppercase;
     letter-spacing: 0.03em;
 }

 header nav a.separator::after {
     content: "|";
     margin-left: 0.8rem;
     color: white;
 }

 /* Top Search input bar */
 .search-bar {
     max-width: 960px;
     margin: 1rem auto 1.4rem;
     display: flex;
     align-items: center;
     gap: 0.5rem;
     padding: 0 1rem;
 }

 .search-bar input[type="text"] {
     flex: 1;
     padding: 0.4em 0.6em;
     border: 1px solid #ccc;
     font-size: 0.9rem;
 }

 .search-bar button {
     padding: 0.4em 0.8em;
     border: 1px solid #ccc;
     background: #eee;
     cursor: pointer;
     font-weight: bold;
     color: #333;
 }

 .search-bar .placeholder-label {
     color: #666;
     font-size: 0.8rem;
     margin-right: 1rem;
     white-space: nowrap;
 }

 /* Main content area */
 main {
     display: flex;
     gap: 1rem;
     padding: 0 1rem 1rem 1rem;
     width: 100%;
 }

 /* Posts listing - left */
 .posts {
     flex: 1 1 65%;
 }

 .post {
     display: flex;
     margin-top: 1rem;
     margin-bottom: 1rem;
     border-bottom: 1px solid #ddd;
     padding-bottom: 1rem;
 }

 .post img {
     width: 140px;
     height: 90px;
     object-fit: cover;
     flex-shrink: 0;
     border: 1px solid #ccc;
     margin-right: 1rem;
     background: #f8f8f8;
 }

 .post-content {
     flex: 1;
 }

 .post-content h3 {
     margin: 0 0 0.3rem 0;
     font-size: 1rem;
 }

 .post-content p {
     margin: 0;
     font-size: 0.875rem;
     line-height: 1.3;
     color: #333;
 }

 /* Sidebar - right */
 aside.sidebar {
     flex: 0 1 30%;
     border-left: 1px solid #ddd;
     padding-left: 1rem;
     font-size: 0.875rem;
 }

 aside.sidebar label {
     display: block;
     margin-bottom: 0.25rem;
     font-weight: 500;
 }

 aside.sidebar input[type="text"] {
     width: 100%;
     padding: 0.35em 0.5em;
     border: 1px solid #bbb;
     font-size: 0.9rem;
     margin-bottom: 1rem;
 }

 aside.sidebar ul {
     list-style: none;
     padding-left: 0;
     margin: 0;
     border-top: 1px solid #ddd;
 }

 aside.sidebar ul li {
     border-bottom: 1px solid #eee;
     margin-bottom: 0.4rem;
 }

 aside.sidebar ul li a {
     font-size: 0.85rem;
 }

 aside.sidebar ul li a:hover,
 aside.sidebar ul li a:focus {
     text-decoration: underline;
 }

 /* Pagination below posts */
 .pagination {
     margin: 0 1rem 1rem 1rem;
     font-size: 0.85rem;
     display: flex;
     align-items: center;
     gap: 0.3rem;
 }

 .pagination strong {
     background: #ddd;
     border-radius: 3px;
     padding: 0.2em 0.5em;
     user-select: none;
 }

 .pagination button,
 .pagination a {
     background: #f8f8f8;
     border: 1px solid #ccc;
     padding: 0.2em 0.5em;
     cursor: pointer;
     text-decoration: none;
     color: #0047e0;
     border-radius: 3px;
 }

 .pagination button[disabled] {
     color: #999;
     cursor: default;
 }

 .pagination button:hover:not([disabled]),
 .pagination a:hover {
     background: #e0e7ff;
 }

 /* Advertisement banner */
 .ad-banner {
     margin: 0 1rem 1rem 1rem;
     background: #eb413a;
     color: white;
     padding: 1rem 1rem;
     font-weight: bold;
     font-size: 1rem;
     border-radius: 6px;
     display: flex;
     align-items: center;
     justify-content: space-between;
 }

 .ad-banner button {
     border: 1.5px solid white;
     color: white;
     background: transparent;
     padding: 0.4em 0.9em;
     font-weight: 600;
     border-radius: 30px;
     cursor: pointer;
     transition: background-color 0.3s ease;
 }

 .ad-banner button:hover,
 .ad-banner button:focus {
     background: white;
     color: #eb413a;
 }

 /* Footer with links */
 footer {
     background: #f5f5f5;
     border-top: 1px solid #ddd;
     padding: 0.8rem 1rem;
     font-size: 0.8rem;
     color: #666;
     display: flex;
     justify-content: space-between;
     align-items: center;
     flex-wrap: wrap;
 }

 footer .links a {
     color: #666;
     margin-left: 1rem;
     font-weight: 600;
 }

 footer .links a:hover,
 footer .links a:focus {
     text-decoration: underline;
 }

 /* Responsive adjustments */
 @media (max-width: 767px) {
     main {
         flex-direction: column;
         padding: 0 0.8rem 1rem 0.8rem;
     }

     aside.sidebar {
         border-left: none;
         margin-top: 1rem;
         padding-left: 0;
     }

     .post {
         flex-direction: column;
     }

     .post img {
         width: 100%;
         height: auto;
         margin-right: 0;
         margin-bottom: 0.5rem;
     }

     .pagination {
         justify-content: center;
         gap: 0.4rem;
         font-size: 0.85rem;
     }

     footer {
         flex-direction: column;
         gap: 0.5rem;
         font-size: 0.75rem;
     }


 }