/* Base Styles */
:root {
    --primary-color: #ff6b6b;
    --secondary-color: #4ecdc4;
    --dark-color: #292f36;
    --light-color: #f7fff7;
    --gray-color: #ced4da;
    --text-color: #2d3436;
    --max-width: 1200px;
    --heading-font: 'Montserrat', sans-serif;
    --body-font: 'Open Sans', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--body-font);
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f9f9f9;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    width: 100%; /* Ensure images take up full width of container */
    object-fit: cover; /* Ensures images cover their container without distortion */
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: #e05050;
}

ul {
    list-style: none;
}

.container {
    width: 90%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 15px;
}

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 10px 25px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: #e05050;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--heading-font);
    margin-bottom: 1rem;
    color: var(--dark-color);
    line-height: 1.2;
}

p {
    margin-bottom: 1rem;
}

section {
    padding: 4rem 0;
}

.highlight {
    color: var(--primary-color);
}

/* Header */
header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 15px;
}

.logo h1 {
    font-size: 2rem;
    margin-bottom: 0;
}

.tagline {
    font-size: 0.85rem;
    color: #777;
    margin-bottom: 0;
}

nav ul {
    display: flex;
}

nav ul li {
    margin-left: 2rem;
}

nav ul li a {
    color: var(--dark-color);
    font-weight: 600;
    position: relative;
}

nav ul li a:hover {
    color: var(--primary-color);
}

nav ul li a.active {
    color: var(--primary-color);
}

nav ul li a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

/* Hero Section */
.hero {
    background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('/api/placeholder/1200/600');
    background-size: cover;
    background-position: center;
    background-attachment: scroll; /* Better for mobile */
    color: white;
    text-align: center;
    padding: 8rem 0;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: white;
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* Featured Posts */
.featured-posts h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.post {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.post:hover {
    transform: translateY(-5px);
}

.post img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-content {
    padding: 1.5rem;
}

.post-meta {
    color: #777;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.read-more {
    display: inline-block;
    margin-top: 1rem;
    font-weight: 600;
}

/* Categories */
.categories h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 2rem;
}

.category {
    background-color: white;
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.category:hover {
    transform: translateY(-5px);
    background-color: var(--primary-color);
    color: white;
}

.category:hover h3 {
    color: white;
}

.category i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

.category:hover i {
    color: white;
}

.category h3 {
    margin-bottom: 0;
}

/* About Section */
.about-content {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    align-items: center;
}

.about-image {
    flex: 1;
}

.about-image img {
    border-radius: 10px;
    width: 100%;
    height: auto;
    object-fit: cover;
    max-height: 400px;
}

.about-text {
    flex: 1;
}

/* Newsletter Section */
.newsletter {
    background-color: var(--light-color);
    text-align: center;
}

.newsletter h2 {
    margin-bottom: 1rem;
}

.newsletter p {
    max-width: 600px;
    margin: 0 auto 2rem;
}

.newsletter-form {
    display: flex;
    justify-content: center;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-form input[type="email"] {
    flex-grow: 1;
    padding: 10px 15px;
    border: 1px solid var(--gray-color);
    border-radius: 30px;
    font-size: 1rem;
}

/* Blog Post Images */
.blog-post {
    margin-bottom: 3rem;
}

.blog-post img {
    width: 100%;
    height: auto;
    max-height: 650px;
    object-fit: cover;
    border-radius: 10px;
    display: block;
    background: #eee;
}

/* Blog Layout */
.blog-content {
    padding: 4rem 0;
}

.blog-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
}

.widget {
    background-color: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.recent-posts-widget ul li {
    display: flex;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-color);
}

.recent-posts-widget ul li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.recent-posts-widget img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
    margin-right: 1rem;
}

/* Blog Hero Section */
.blog-hero {
    background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('/api/placeholder/1200/600');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    padding: 6rem 0;
}

.blog-hero h1 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    color: white;
}

.blog-hero p {
    font-size: 1.3rem;
    max-width: 700px;
    margin: 0 auto;
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-logo h2 {
    color: white;
    margin-bottom: 0.5rem;
}

.footer-logo p {
    color: var(--gray-color);
    font-size: 0.9rem;
}

.footer-links h3,
.footer-social h3 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-links ul li {
    margin-bottom: 0.5rem;
}

.footer-links ul li a {
    color: var(--gray-color);
}

.footer-links ul li a:hover {
    color: var(--primary-color);
}

.social-icons {
    display: flex;
    gap: 1rem;
}

.social-icons a {
    color: white;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--gray-color);
    font-size: 0.9rem;
}

/* Post image container for blog section */
.post-img-container {
    overflow: hidden;
    border-radius: 10px 10px 0 0;
}

.post-header {
    margin-bottom: 1.5rem;
}

.post-body h3 {
    margin-top: 1.5rem;
}

.post-body ul {
    list-style: disc;
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.post-body ul li {
    margin-bottom: 0.5rem;
}

/* Blog sidebar styles */
.categories-widget ul li {
    margin-bottom: 0.8rem;
}

.categories-widget ul li i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.recent-post-link {
    display: flex;
    align-items: center;
}

.recent-post-info h4 {
    font-size: 1rem;
    margin-bottom: 0.2rem;
}

.recent-post-info p {
    font-size: 0.8rem;
    color: #777;
    margin-bottom: 0;
}

.newsletter-widget form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.newsletter-widget input[type="email"] {
    padding: 10px 15px;
    border: 1px solid var(--gray-color);
    border-radius: 5px;
    font-size: 0.9rem;
}

/* Responsive styles */
@media (max-width: 1024px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        order: 2;
    }
}

@media (max-width: 768px) {
    header .container {
        flex-direction: column;
    }
    
    nav ul {
        margin-top: 1rem;
    }
    
    nav ul li {
        margin-left: 1rem;
        margin-right: 1rem;
    }
    
    .hero {
        padding: 6rem 0;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .post img {
        height: 180px; /* Slightly smaller on tablets */
    }
    
    .about-content {
        flex-direction: column; /* Stack vertically on smaller screens */
    }
    
    .about-image {
        width: 100%;
        margin-bottom: 1.5rem;
    }
    
    .about-image img {
        max-height: 300px; /* Shorter on tablets */
    }
    
    .about-text {
        width: 100%;
    }

    .recent-posts-widget ul li {
        flex-direction: column;
    }
    
    .recent-posts-widget img {
        margin-right: 0;
        margin-bottom: 1rem;
        width: 100%;
        height: auto;
    }
    
    .newsletter-form {
        flex-direction: column;
        gap: 1rem;
    }
    
    .blog-hero {
        padding: 4rem 0;
    }
    
    .blog-hero h1 {
        font-size: 2.2rem;
    }
}

@media (max-width: 480px) {
    .post img, .blog-post img {
        height: 160px; /* Even smaller on mobile phones */
    }
    
    .hero {
        padding: 4rem 0;
    }
    
    .hero h2 {
        font-size: 1.5rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    .category i {
        font-size: 2.5rem; /* Slightly smaller on very small screens */
    }
    
    .category {
        padding: 1.5rem; /* Less padding on very small screens */
    }
    
    .newsletter-form {
        width: 100%;
    }
    
    .newsletter-form input[type="email"] {
        width: 100%;
    }
    
    .about-image img {
        max-height: 250px; /* Even shorter on phones */
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .social-icons {
        justify-content: center;
    }
}