/* === Reset and Base Styles === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fcfcfc;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.btn {
    display: inline-block;
    background-color: #ff4d4d;
    color: white;
    padding: 12px 28px;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: #e63c3c;
    transform: translateY(-2px);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    position: relative;
}

.section-header h2:after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background-color: #ff4d4d;
    margin-top: 10px;
}

.view-all {
    font-weight: 600;
    color: #ff4d4d;
}

.view-all:hover {
    text-decoration: underline;
}

/* === Header and Navigation === */
header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo a {
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
}

.logo span {
    color: #ff4d4d;
}

.nav-menu {
    display: flex;
}

.nav-menu li {
    margin-left: 2rem;
}

.nav-menu a {
    font-weight: 600;
    padding-bottom: 5px;
    position: relative;
}

.nav-menu a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background-color: #ff4d4d;
    left: 0;
    bottom: 0;
    transition: width 0.3s ease;
}

.nav-menu a:hover:after,
.nav-menu a.active:after {
    width: 100%;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #333;
    margin-bottom: 5px;
    transition: all 0.3s ease;
}

/* === Hero Section === */
.hero {
    padding: 5rem 0;
    text-align: center;
    background-color: #f5f5f5;
    background-image: linear-gradient(rgba(255,255,255,0.9), rgba(255,255,255,0.9)), url('/api/placeholder/1600/800');
    background-size: cover;
    background-position: center;
}

.hero h1 {
    font-size: 3rem;
    font-family: 'Playfair Display', serif;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero h1 span {
    color: #ff4d4d;
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 2rem;
    color: #666;
}

/* === Featured Posts Section === */
.featured-posts {
    padding: 5rem 0;
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.post-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.post-image {
    position: relative;
}

.post-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.post-image .category {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: #ff4d4d;
    color: white;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.post-content {
    padding: 1.5rem;
}

.post-content h3 {
    margin-bottom: 0.8rem;
    font-size: 1.2rem;
}

.post-content p {
    color: #666;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.post-meta {
    display: flex;
    font-size: 0.85rem;
    color: #888;
}

.post-meta .date {
    margin-right: 1rem;
}

/* === Newsletter Section === */
.newsletter {
    background-color: #333;
    color: white;
    padding: 4rem 0;
}

.newsletter-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.newsletter h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.newsletter p {
    margin-bottom: 2rem;
    color: #ccc;
}

.form-group {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
}

.form-group input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    border-radius: 4px 0 0 4px;
    font-size: 1rem;
}

.form-group .btn {
    border-radius: 0 4px 4px 0;
}

#subscription-message {
    margin-top: 1rem;
    min-height: 24px;
}

/* === Categories Section === */
.categories {
    padding: 5rem 0;
    background-color: #f9f9f9;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.category-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.category-card:hover {
    transform: translateY(-5px);
}

.category-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.category-card h3 {
    padding: 1rem 1rem 0.5rem;
    font-size: 1.2rem;
    color: #333;
}

.category-card p {
    padding: 0 1rem 1rem;
    font-size: 0.9rem;
    color: #666;
}

/* === Recent Posts Section === */
.recent-posts {
    padding: 5rem 0;
}

.post-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.post-item {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 1.5rem;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.post-item:hover {
    transform: translateX(5px);
}

.post-item .post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-item .post-content {
    padding: 1.5rem 1.5rem 1.5rem 0;
}

.post-item .category {
    display: inline-block;
    background-color: #ff4d4d;
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.7rem;
}

.post-item h3 {
    margin-bottom: 0.8rem;
    font-size: 1.3rem;
}

/* === Footer === */
footer {
    background-color: #222;
    color: #aaa;
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-logo a {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
    display: inline-block;
}

.footer-logo span {
    color: #ff4d4d;
}

.footer-logo p {
    font-size: 0.9rem;
    max-width: 300px;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.link-group h4 {
    color: white;
    margin-bottom: 1.2rem;
    font-size: 1.1rem;
}

.link-group ul li {
    margin-bottom: 0.8rem;
}

.link-group ul li a {
    color: #aaa;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.link-group ul li a:hover {
    color: #ff4d4d;
}

.copyright {
    border-top: 1px solid #444;
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.85rem;
}

/* === Media Queries === */
@media (max-width: 992px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .post-item {
        grid-template-columns: 1fr;
    }
    
    .post-item .post-image img {
        height: 200px;
    }
    
    .post-item .post-content {
        padding: 1.5rem;
    }
    
    .footer-links {
        grid-template-columns: 1fr 1fr;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: absolute;
        flex-direction: column;
        background-color: white;
        width: 100%;
        left: 0;
        top: 100%;
        padding: 1rem 0;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: all 0.3s ease;
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }
    
    .nav-menu li {
        margin: 0;
        text-align: center;
        padding: 0.8rem 0;
    }
}

@media (max-width: 576px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .form-group {
        flex-direction: column;
    }
    
    .form-group input {
        border-radius: 4px;
        margin-bottom: 0.8rem;
    }
    
    .form-group .btn {
        border-radius: 4px;
        width: 100%;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .section-header .view-all {
        margin-top: 0.5rem;
    }
}