/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f8f8;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    text-decoration: none;
    color: #333;
    transition: color 0.3s ease;
}

a:hover {
    color: #e63946;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
header {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo a{
    font-size: 24px;
    font-weight: 700;
    color: #e63946;
}

.logo a span {
    color: #333;
}

.menu-toggle {
    display: none;
    font-size: 24px;
    cursor: pointer;
}

/* Navigation */
nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    font-weight: 600;
    padding: 5px 0;
    position: relative;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #e63946;
    transition: width 0.3s ease;
}

nav ul li a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    padding: 60px 0;
    background-color: #1d3557;
    color: #fff;
    margin-bottom: 40px;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.btn {
    display: inline-block;
    background-color: #e63946;
    color: #fff;
    padding: 12px 30px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: #c1121f;
    color: #fff;
    transform: translateY(-2px);
}

/* Featured Posts */
.featured-posts {
    margin-bottom: 40px;
}

.section-title {
    font-size: 1.8rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e63946;
    display: inline-block;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.featured-post {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.featured-post:hover {
    transform: translateY(-5px);
}

.post-img {
    height: 200px;
    overflow: hidden;
}

.post-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.featured-post:hover .post-img img {
    transform: scale(1.05);
}

.post-content {
    padding: 20px;
}

.post-category {
    display: inline-block;
    background-color: #f1faee;
    color: #1d3557;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.post-title {
    font-size: 1.4rem;
    margin-bottom: 10px;
    line-height: 1.3;
}

.post-excerpt {
    color: #666;
    margin-bottom: 15px;
}

.post-meta {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: #888;
}

.post-meta img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 10px;
}

/* Latest Posts */
.latest-posts {
    margin-bottom: 40px;
}

.posts-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.main-posts {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.horizontal-post {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.horizontal-post .post-img {
    height: 100%;
}

.sidebar {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.popular-posts .post {
    display: flex;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.popular-posts .post:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.popular-posts .post-thumbnail {
    width: 80px;
    height: 80px;
    margin-right: 15px;
    border-radius: 4px;
    overflow: hidden;
}

.popular-posts .post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.popular-posts .post-info h4 {
    font-size: 1rem;
    margin-bottom: 5px;
}

.popular-posts .post-info .date {
    font-size: 0.8rem;
    color: #888;
}

/* Categories */
.categories {
    margin-top: 30px;
}

.categories ul {
    list-style: none;
}

.categories ul li {
    margin-bottom: 10px;
}

.categories ul li a {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background-color: #f8f8f8;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.categories ul li a:hover {
    background-color: #e63946;
    color: #fff;
}

.category-count {
    background-color: #e6394633;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
}

/* Newsletter */
.newsletter {
    background-color: #1d3557;
    color: #fff;
    padding: 60px 0;
    margin-bottom: 40px;
}

.newsletter-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.newsletter h2 {
    font-size: 2rem;
    margin-bottom: 20px;
}

.newsletter p {
    margin-bottom: 30px;
    opacity: 0.9;
}

.newsletter-form {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-form input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    outline: none;
    border-radius: 4px 0 0 4px;
    font-size: 1rem;
}

.newsletter-form button {
    background-color: #e63946;
    color: #fff;
    border: none;
    padding: 0 20px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.newsletter-form button:hover {
    background-color: #c1121f;
}

/* Footer */
footer {
    background-color: #333;
    color: #fff;
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.footer-widget h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-widget h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: #e63946;
}

.footer-widget p {
    color: #ccc;
    margin-bottom: 15px;
}

.footer-widget ul {
    list-style: none;
}

.footer-widget ul li {
    margin-bottom: 10px;
}

.footer-widget ul li a {
    color: #ccc;
    transition: color 0.3s ease;
}

.footer-widget ul li a:hover {
    color: #e63946;
    padding-left: 5px;
}

.social-links {
    display: flex;
    margin-top: 20px;
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background-color: #444;
    border-radius: 50%;
    color: #fff;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background-color: #e63946;
    transform: translateY(-3px);
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444;
    color: #ccc;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 992px) {
    .featured-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    nav {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 80%;
        height: calc(100vh - 70px);
        background-color: #fff;
        padding: 20px;
        box-shadow: 2px 0 5px rgba(0,0,0,0.1);
        transition: all 0.4s ease;
        z-index: 99;
    }
    
    nav.active {
        left: 0;
    }
    
    nav ul {
        flex-direction: column;
    }
    
    nav ul li {
        margin: 0 0 20px 0;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 576px) {
    .featured-grid {
        grid-template-columns: 1fr;
    }
    
    .horizontal-post {
        grid-template-columns: 1fr;
    }
    
    .horizontal-post .post-img {
        height: 200px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-form input {
        border-radius: 4px;
        margin-bottom: 10px;
    }
    
    .newsletter-form button {
        border-radius: 4px;
        padding: 12px;
    }
}