/* =========================================
   SINGLE BLOG STYLES
   ========================================= */

/* --- GENERAL SETUP --- */
body {
    background-color: #FFFDF9;
    /* Subtle warm white */
    font-family: 'Barlow', sans-serif;
    color: #374151;
    line-height: 1.6;
}

.blog-wrapper {
    max-width: 1000px;
    /* Optimal reading width */
    margin: 0 auto;
    padding: 80px 20px;
}

/* --- HEADER SECTION --- */
.blog-header {
    text-align: center;
    margin-bottom: 50px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.blog-meta {
    color: #EF7D32;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 14px;
    margin-bottom: 15px;
}

.blog-title {
    font-family: 'Fredoka', sans-serif;
    font-size: 48px;
    /* Slightly smaller for better mobile scaling */
    color: #431407;
    line-height: 1.2;
    margin-bottom: 20px;
}

.blog-author {
    font-size: 18px;
    color: #6B7280;
    font-weight: 500;
}

.blog-author strong {
    color: #431407;
}

/* --- FEATURED IMAGE --- */
.featured-image-container {
    width: 100%;
    max-height: 550px;
    /* Prevents extremely tall images */
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 60px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.featured-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* --- CONTENT AREA (The Fix) --- */
.blog-content {
    max-width: 850px;
    /* Slightly narrower text for readability */
    margin: 0 auto;
    font-size: 20px;
    line-height: 1.8;
}

/* HEADINGS INSIDE CONTENT */
.blog-content h1,
.blog-content h2,
.blog-content h3,
.blog-content h4 {
    font-family: 'Fredoka', sans-serif;
    color: #EF7D32;
    margin-top: 50px;
    margin-bottom: 25px;
    line-height: 1.3;
}

.blog-content h2 {
    font-size: 32px;
}

.blog-content h3 {
    font-size: 26px;
}

/* PARAGRAPHS & LISTS */
.blog-content p {
    margin-bottom: 24px;
}

.blog-content ul,
.blog-content ol {
    margin-bottom: 30px;
    padding-left: 20px;
}

.blog-content li {
    margin-bottom: 12px;
}

/* IMAGES INSIDE CONTENT - FIXED */
.blog-content img {
    border-radius: 8px;
    margin: 40px auto;
    display: block;
    max-width: 100%;
    /* <--- FIXED */
    height: auto;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    /* Optional: keeping shadow */
}

/* LINKS */
.blog-content a {
    color: #EF7D32;
    text-decoration: underline;
    font-weight: 600;
}

.blog-content a:hover {
    color: #431407;
}

/* --- FOOTER SECTION --- */
.blog-footer {
    max-width: 850px;
    margin: 80px auto 0;
    padding-top: 40px;
    border-top: 2px solid #F3F4F6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.back-link {
    text-decoration: none;
    color: #431407;
    font-weight: 700;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: color 0.2s;
}

.back-link:hover {
    color: #EF7D32;
}

.btn-share {
    background: transparent;
    border: 2px solid #EF7D32;
    color: #EF7D32;
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: 700;
    font-family: 'Barlow', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
}

.btn-share:hover {
    background: #EF7D32;
    color: white;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .blog-wrapper {
        padding: 40px 20px;
    }

    .blog-title {
        font-size: 36px;
    }

    .featured-image-container {
        max-height: 300px;
        border-radius: 12px;
        margin-bottom: 40px;
    }

    .blog-content {
        font-size: 18px;
    }

    .blog-content img {
        margin: 30px auto;
        /* Less space on mobile */
    }

    .blog-footer {
        flex-direction: column;
        gap: 25px;
        text-align: center;
    }
}

/* --- MORE STORIES SECTION --- */
.more-stories-section {
    max-width: 1000px;
    margin: 60px auto 40px;
    padding: 0 20px;
}

.more-stories-title {
    font-family: 'Fredoka', sans-serif;
    font-size: 32px;
    color: #431407;
    margin-bottom: 30px;
    text-align: center;
}

.post-navigation-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

@media (min-width: 768px) {
    .post-navigation-cards {
        grid-template-columns: 1fr 1fr;
    }
}

/* --- NAV CARD STYLES --- */
.nav-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    /* reuse shadow-md approx */
    text-decoration: none;
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    border: 2px solid transparent;
}

.nav-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 48px rgba(76, 34, 14, 0.15);
    /* reuse shadow-lg approx */
    border-color: #E8B88D;
    /* primary-light */
}

/* Image */
.nav-card-img {
    height: 220px;
    position: relative;
    overflow: hidden;
}

.nav-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-card:hover img {
    transform: scale(1.1);
}

/* Overlay */
.nav-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-card:hover .nav-card-overlay {
    opacity: 1;
}

.nav-card-overlay span {
    color: white;
    font-weight: 700;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-card-img::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(239, 125, 50, 0.9);
    /* Primary Orange */
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 2;
}

.nav-card.prev-card .nav-card-img::before {
    content: 'Previous';
}

.nav-card.next-card .nav-card-img::before {
    content: 'Next';
    left: auto;
    right: 10px;
}


/* Content */
.nav-card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nav-date {
    font-size: 12px;
    color: #EF7D32;
    font-weight: 600;
    text-transform: uppercase;
}

.nav-title {
    font-family: 'Fredoka', sans-serif;
    /* Keep consistent with titles */
    font-size: 20px;
    color: #431407;
    margin: 0;
    line-height: 1.3;
    transition: color 0.3s;
}

.nav-card:hover .nav-title {
    color: #EF7D32;
}


/* --- SHARE MODAL STYLES --- */
.share-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.share-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.share-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.share-modal-content {
    background: white;
    width: 90%;
    max-width: 450px;
    padding: 30px;
    border-radius: 20px;
    position: relative;
    z-index: 2;
    text-align: center;
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.share-modal.active .share-modal-content {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    transition: color 0.2s;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-modal:hover {
    color: #EF7D32;
    background: #FFF9F3;
}

.modal-header h3 {
    font-family: 'Fredoka', sans-serif;
    font-size: 24px;
    color: #431407;
    margin-bottom: 5px;
}

.modal-header p {
    color: #666;
    margin-bottom: 25px;
    font-size: 14px;
}

.share-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    border-radius: 10px;
    text-decoration: none;
    color: white;
    font-weight: 600;
    font-size: 14px;
    transition: transform 0.2s, opacity 0.2s;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.share-btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.share-btn.facebook {
    background: #1877F2;
}

.share-btn.twitter {
    background: #1DA1F2;
}

.share-btn.whatsapp {
    background: #25D366;
}

.share-btn.copy-link {
    background: #4B5563;
    color: white;
}

.share-btn.copy-link.copied {
    background: #10B981;
}

@media (max-width: 500px) {
    .share-options {
        grid-template-columns: 1fr;
    }
}