/* === BLOG STYLES === */

/* Blog Hero Section */
.blog-hero {
    height: 400px;
    background-color: var(--light-purple);
    margin-top: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-bubbles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    animation: float 8s ease-in-out infinite;
    opacity: 0.6;
}

.bubble:nth-child(1) {
    width: 80px;
    height: 80px;
    background-color: var(--accent-color);
    bottom: -20px;
    left: 10%;
    animation-delay: 0s;
}

.bubble:nth-child(2) {
    width: 60px;
    height: 60px;
    background-color: var(--primary-color);
    top: 20%;
    left: 20%;
    animation-delay: 1s;
}

.bubble:nth-child(3) {
    width: 100px;
    height: 100px;
    background-color: var(--secondary-color);
    top: 30%;
    right: 15%;
    animation-delay: 2s;
}

.bubble:nth-child(4) {
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    bottom: 10%;
    right: 10%;
    animation-delay: 3s;
}

.bubble:nth-child(5) {
    width: 70px;
    height: 70px;
    background-color: var(--light-yellow);
    top: 60%;
    left: 40%;
    animation-delay: 4s;
}

@keyframes float {
    0% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(5deg);
    }

    100% {
        transform: translateY(0) rotate(0deg);
    }
}

.hero-content {
    max-width: 800px;
    padding: 0 15px;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3rem;
    color: #004430;
    margin-bottom: 15px;
    font-family: var(--heading-font);
    position: relative;
    display: inline-block;
}

.hero-title::after {
    content: "";
    position: absolute;
    width: 60%;
    height: 10px;
    background: linear-gradient(90deg, var(--accent-color), var(--secondary-color));
    bottom: -15px;
    left: 20%;
    border-radius: 10px;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #004430;
    margin-top: 25px;
}

.blog-illustration {
    position: absolute;
    width: 350px;
    height: 350px;
    background-image: url('data:image/svg+xml;utf8,<svg width="350" height="350" viewBox="0 0 350 350" xmlns="http://www.w3.org/2000/svg"><circle cx="175" cy="175" r="150" fill="%23FFFFFF" opacity="0.1"/><path d="M175,50 C260,50 300,120 300,175 C300,260 260,300 175,300 C90,300 50,260 50,175 C50,120 90,50 175,50 Z" stroke="%23FFFFFF" fill="none" stroke-width="5" opacity="0.2"/></svg>');
    bottom: -175px;
    right: -175px;
    z-index: 1;
    opacity: 0.5;
}

/* Blog Categories */
.blog-categories {
    padding: 30px 0;
    background-color: var(--light-color);
    border-bottom: 2px solid rgba(136, 201, 161, 0.2);
}

.category-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.category-tab {
    background-color: var(--white-color);
    border: 2px solid var(--primary-color);
    border-radius: 30px;
    padding: 8px 16px;
    font-weight: 600;
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-tab:hover {
    background-color: rgba(136, 201, 161, 0.1);
}

.category-tab.active {
    background-color: var(--primary-color);
    color: white;
}

/* Featured Post */
.featured-post {
    padding: 60px 0;
    background-color: var(--light-color);
}

.featured-post-card {
    background-color: var(--white-color);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    border: 3px solid rgba(255, 255, 255, 0.7);
}

.featured-post-image {
    position: relative;
    height: 300px;
}

.featured-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background-color: var(--secondary-color);
    color: #664400;
    padding: 8px 16px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(255, 207, 150, 0.6);
}

.featured-post-content {
    padding: 30px;
}

.post-category {
    display: inline-block;
    background-color: var(--light-purple);
    color: #003366;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.post-title {
    font-size: 1.8rem;
    color: var(--dark-color);
    margin-bottom: 15px;
    font-family: var(--heading-font);
}

.post-meta {
    display: flex;
    gap: 20px;
    color: var(--gray-color);
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.post-meta i {
    margin-right: 5px;
}

.post-excerpt {
    color: var(--gray-color);
    margin-bottom: 25px;
    line-height: 1.7;
}

/* Blog Posts */
.blog-posts {
    padding: 60px 0;
    background-color: #f5f9f5;
}

.posts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.post-card {
    background-color: var(--white-color);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 3px solid rgba(255, 255, 255, 0.7);
}

.post-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.post-image {
    position: relative;
    height: 200px;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Featured image for single blog posts */
.featured-image {
    max-width: 1200px;
    margin: 0 auto 24px;
    overflow: hidden;
}
.featured-image img {
    width: 100%;
    height: auto; /* maintain intrinsic aspect ratio */
    max-width: 1200px;
    aspect-ratio: 1200 / 630; /* preferred intrinsic ratio */
    object-fit: cover;
    display: block;
}

.post-image .post-category {
    position: absolute;
    bottom: -12px;
    left: 20px;
    margin-bottom: 0;
}

.post-content {
    padding: 30px 20px 20px;
}

.post-card .post-title {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.post-link {
    color: var(--primary-color);
    font-weight: 600;
    display: inline-block;
    transition: color 0.3s ease;
    margin-top: 15px;
}

.post-link:hover {
    color: var(--dark-color);
}

.post-link i {
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.post-link:hover i {
    transform: translateX(5px);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--white-color);
    color: var(--gray-color);
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.page-link:hover {
    background-color: rgba(136, 201, 161, 0.1);
    color: var(--primary-color);
}

.page-link.active {
    background-color: var(--primary-color);
    color: white;
}

.page-dots {
    display: flex;
    align-items: center;
    padding: 0 10px;
    color: var(--gray-color);
}

.page-link:last-child {
    width: auto;
    padding: 0 20px;
    border-radius: 20px;
}

/* Blog Newsletter */
.blog-newsletter {
    padding: 80px 0;
    background-color: var(--light-yellow);
    background-image: url('data:image/svg+xml;utf8,<svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><path d="M20,20 L80,20 L80,80 L20,80 Z" stroke="%23FFFFFF" fill="none" stroke-width="2" opacity="0.2"/></svg>');
    background-size: 100px 100px;
}

.newsletter-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.newsletter-title {
    font-size: 2.2rem;
    color: #664400;
    margin-bottom: 20px;
    font-family: var(--heading-font);
}

.newsletter-text {
    color: #664400;
    margin-bottom: 30px;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.newsletter-form .form-group {
    flex: 1;
    margin-bottom: 0;
}

.newsletter-form input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid rgba(255, 207, 150, 0.5);
    border-radius: 15px;
    font-size: 1rem;
    background-color: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(255, 207, 150, 0.3);
}

.newsletter-btn {
    background-color: var(--secondary-color);
    color: #664400;
    border: none;
    border-radius: 15px;
    padding: 15px 30px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--heading-font);
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(255, 207, 150, 0.4);
}

.newsletter-btn:hover {
    background-color: var(--secondary-dark);
    box-shadow: 0 6px 20px rgba(255, 207, 150, 0.6);
}

.newsletter-btn i {
    margin-left: 8px;
}

.privacy-note {
    margin-top: 15px;
    font-size: 0.85rem;
    color: #8f641c;
}

/* Media Queries */
@media (min-width: 768px) {
    .featured-post-card {
        flex-direction: row;
    }

    .featured-post-image {
        width: 50%;
        height: auto;
    }

    .featured-post-content {
        width: 50%;
    }

    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }


}

@media (min-width: 992px) {
    .posts-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .hero-title {
        font-size: 3.5rem;
    }
}

@media (max-width: 767px) {
    .hero-title {
        font-size: 2.2rem;
    }

    .featured-post-image {
        height: 200px;
    }
}

/* Make logo clickable */
.logo a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.logo a:hover {
    color: inherit;
}

/* Make entire post cards clickable */
.post-card {
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    color: inherit;
}

/* Keep the existing post-link styling for consistency but make it non-interactive */
.post-link {
    pointer-events: none;
    color: inherit;
}

/* Make featured post clickable */
.featured-post-card {
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-post-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}