/* --- General Setup & Variables --- */ :root { --primary-color: #d9534f; /* A nice red accent */ --dark-color: #222; --light-color: #f4f4f4; --text-color: #333; --border-color: #ddd; --font-heading: 'Oswald', sans-serif; --font-body: 'Roboto', sans-serif; } * { box-sizing: border-box; margin: 0; padding: 0; } body { font-family: var(--font-body); line-height: 1.6; color: var(--text-color); background-color: #fff; } .container { max-width: 1200px; margin: 0 auto; padding: 0 20px; } h1, h2, h3 { font-family: var(--font-heading); line-height: 1.2; } a { text-decoration: none; color: var(--primary-color); } img { max-width: 100%; height: auto; display: block; } ul { list-style: none; } /* --- Header --- */ .site-header { background-color: #fff; border-bottom: 1px solid var(--border-color); padding: 1rem 0; position: sticky; top: 0; z-index: 1000; } .header-content { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; } .logo h1 a { font-size: 2rem; color: var(--dark-color); text-transform: uppercase; letter-spacing: -1px; } .main-nav ul { display: flex; gap: 20px; } .main-nav a { font-weight: 700; color: var(--dark-color); text-transform: uppercase; font-size: 0.9rem; padding: 5px 0; border-bottom: 2px solid transparent; transition: border-color 0.3s ease; } .main-nav a:hover { border-bottom-color: var(--primary-color); } .search-bar form { display: flex; } .search-bar input { padding: 8px 12px; border: 1px solid var(--border-color); border-right: none; border-radius: 4px 0 0 4px; } .search-bar button { padding: 8px 15px; background-color: var(--primary-color); color: #fff; border: none; border-radius: 0 4px 4px 0; cursor: pointer; transition: background-color 0.3s ease; } .search-bar button:hover { background-color: #c9302c; } .menu-toggle { display: none; /* Hidden on desktop */ background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--dark-color); } /* --- Main Content Layout --- */ .site-main { padding: 2rem 0; flex-grow: 1; } .main-content-wrapper { display: flex; gap: 30px; } .content-area { flex: 3; /* Takes up 3/4 of the space */ } .sidebar { flex: 1; /* Takes up 1/4 of the space */ } /* --- Featured Post --- */ .featured-post { margin-bottom: 2rem; border-bottom: 1px solid var(--border-color); padding-bottom: 1.5rem; } .featured-post img { width: 100%; height: 400px; object-fit: cover; margin-bottom: 1rem; } .featured-post-content h2 { font-size: 2.2rem; margin: 0.5rem 0; } .featured-post-content h2 a { color: var(--dark-color); } .featured-post-content h2 a:hover { color: var(--primary-color); } /* --- Post Grid --- */ .recent-posts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 25px; } .post-card { background-color: #fff; border: 1px solid var(--border-color); border-radius: 5px; overflow: hidden; transition: transform 0.3s ease, box-shadow 0.3s ease; } .post-card:hover { transform: translateY(-5px); box-shadow: 0 4px 15px rgba(0,0,0,0.1); } .post-card img { height: 180px; object-fit: cover; } .post-card-content { padding: 15px; } .post-card-content h3 { font-size: 1.2rem; margin: 0.5rem 0; } .post-card-content h3 a { color: var(--dark-color); } .post-card-content h3 a:hover { color: var(--primary-color); } /* --- Common Elements --- */ .category-tag { background-color: var(--primary-color); color: #fff; padding: 3px 8px; border-radius: 3px; font-size: 0.8rem; font-weight: bold; text-transform: uppercase; } .post-meta { font-size: 0.9rem; color: #777; margin-top: 10px; } .post-meta span { margin-right: 15px; } /* --- Sidebar --- */ .widget { background-color: #f9f9f9; border: 1px solid var(--border-color); padding: 20px; margin-bottom: 2rem; border-radius: 5px; } .widget-title { font-size: 1.3rem; margin-bottom: 15px; padding-bottom: 10px; border-bottom: 2px solid var(--primary-color); color: var(--dark-color); } .widget ul li { padding: 8px 0; border-bottom: 1px dashed var(--border-color); } .widget ul li:last-child { border-bottom: none; } .widget-posts-list li { display: flex; align-items: center; gap: 10px; } .widget-posts-list img { width: 60px; height: 60px; object-fit: cover; border-radius: 5px; } .widget-post-info a { font-weight: bold; color: var(--dark-color); display: block; margin-bottom: 5px; } .widget-post-info span { font-size: 0.85rem; color: #777; } .widget form input { width: 100%; padding: 10px; margin-bottom: 10px; border: 1px solid var(--border-color); border-radius: 4px; } .widget form button { width: 100%; padding: 10px; background-color: var(--primary-color); color: #fff; border: none; border-radius: 4px; font-weight: bold; cursor: pointer; transition: background-color 0.3s ease; } .widget form button:hover { background-color: #c9302c; } /* --- Footer --- */ .site-footer { background-color: var(--dark-color); color: #aaa; text-align: center; padding: 2rem 0; margin-top: 3rem; } /* --- Responsive Design --- */ @media (max-width: 992px) { .main-content-wrapper { flex-direction: column; } .sidebar { order: -1; /* Moves sidebar above content on medium screens */ } } @media (max-width: 768px) { .header-content { position: relative; } .logo h1 a { font-size: 1.5rem; } .main-nav, .search-bar { display: none; /* Hide by default on mobile */ width: 100%; } .main-nav.active { display: block; order: 3; /* Place it below the logo and menu toggle */ margin-top: 1rem; } .main-nav ul { flex-direction: column; gap: 10px; } .search-bar.active { display: block; order: 2; margin-top: 1rem; } .menu-toggle { display: block; /* Show hamburger menu */ order: 1; margin-left: auto; /* Push to the right */ } .featured-post img { height: 250px; } .featured-post-content h2 { font-size: 1.8rem; } }