/* ====================================
   Blog Post Detail Styles
   ==================================== */

:root {
    --color-primary-blue: #0A355B;
    --color-primary-teal: #137374;
    --color-teal-light: #78C6C4;
    --color-accent-green: #98D29B;
    --color-accent-yellow: #FDBF49;
    --color-yellow-light: #FED992;
    --color-accent-coral: #E88773;
    --color-coral-light: #FAE7E3;
    --color-gray-text: #434343;
    --color-white: #ffffff;
    --color-cream: #fff7e9;
    --bg-teal-20: rgba(120, 198, 196, 0.2);
    --bg-green-20: rgba(152, 210, 155, 0.2);
    --bg-yellow-20: rgba(254, 217, 146, 0.2);
    
    --font-heading: 'Figtree', sans-serif;
    --font-body: 'Nunito', sans-serif;
}

body {
    font-family: var(--font-body);
    color: var(--color-gray-text);
    margin: 0;
    padding: 0;
    background-color: #fff;
    overflow-x: hidden;
}

html {
    overflow-x: hidden;
    width: 100%;
}

img, video, iframe {
    max-width: 100%;
    height: auto;
}

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

a { text-decoration: none; color: inherit; }

.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 100px;
    position: relative;
    z-index: 10;
}

/* ====================================
   Header
   ==================================== */
   .header-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 100px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, opacity 0.3s ease;
    box-shadow: 0 1px 10px rgba(0,0,0,0.05);
}

.header-menu.hidden {
    transform: translateY(-100%);
    opacity: 0;
}

.header-menu.visible {
    transform: translateY(0);
    opacity: 1;
}

.logo {
    font-family: var(--font-body);
    font-weight: 800;
    font-size: 30px;
    color: var(--color-primary-blue);
    display: inline-flex;
    gap: 6px;
}

.logo img {
    height: 120px !important;
    width: auto;
}

/* Logo Animation */
.logo-rn {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    background-color: transparent;
    color: var(--color-primary-blue);
    transition: background-color 0.3s ease, color 0.3s ease;
    animation: rnHighlight 2s ease-in-out infinite;
}

.logo-analytics {
    display: inline-block;
    padding: 2px 0;
    color: var(--color-primary-blue);
    transition: opacity 0.3s ease;
    animation: analyticsHighlight 2s ease-in-out infinite;
}

@keyframes rnHighlight {
    0%, 100% {
        background-color: transparent;
        color: var(--color-primary-blue);
    }
    25%, 50% {
        background-color: var(--color-primary-blue);
        color: #fff;
    }
}

@keyframes analyticsHighlight {
    0%, 50% {
        opacity: 0.6;
    }
    75%, 100% {
        opacity: 1;
    }
}

.nav-links {
    display: flex;
    gap: 40px;
}

.mobile-nav-only {
    display: none !important;
}

.nav-links a {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 20px;
    color: var(--color-primary-blue);
    transition: color 0.3s;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--color-primary-teal);
}

/* ====================================
   Hero Section
   ==================================== */
.blog-hero {
    padding-top: clamp(180px, 20vh, 240px); /* Fluid top padding starting at 180px */
    padding-bottom: 60px;
    text-align: center;
    position: relative;
}

.hero-meta-top {
    font-family: var(--font-body);
    font-weight: 800;
    font-size: 18px;
    color: var(--color-primary-teal);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    display: block;
}

.hero-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 45px;
    line-height: 60px;
    color: var(--color-primary-blue);
    max-width: 900px;
    margin: 0 auto 30px;
}

.hero-meta-bottom {
    font-family: var(--font-body);
    font-size: 18px;
    color: var(--color-gray-text);
    margin-bottom: 50px;
}

/* ====================================
   Featured Image
   ==================================== */
.featured-image-container {
    max-width: 900px;
    margin: 0 auto 100px;
    border-radius: 40px;
    overflow: hidden;
    /* Optional: Border or shadow if needed */
}

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

/* ====================================
   Content Section
   ==================================== */
.content-wrapper {
    max-width: 745px;
    margin: 0 auto 150px;
}

.content-wrapper p {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 25px;
    line-height: 35px;
    color: var(--color-gray-text);
    margin-bottom: 30px;
}

.content-wrapper h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 25px;
    line-height: 30px;
    color: var(--color-primary-blue);
    margin-top: 50px;
    margin-bottom: 20px;
}

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

.content-wrapper li {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 25px;
    line-height: 35px;
    color: var(--color-gray-text);
    margin-bottom: 20px;
    list-style-type: disc;
}

.content-wrapper li strong {
    font-weight: 800;
    color: var(--color-gray-text);
}

/* ====================================
   Related Blogs Section (Cream BG)
   ==================================== */
.related-section {
    background-color: var(--color-cream);
    padding: 30px 0; /* Reduced from 100px */
    position: relative;
}

.related-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 32px; /* Reduced from 45px */
    color: var(--color-primary-blue);
    text-align: center;
    margin-bottom: 40px; /* Reduced from 60px */
}

.related-grid {
    display: flex;
    flex-direction: row; /* Stack horizontally */
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px; 
    max-width: 1240px; /* Force update to 1240px */
    margin: 0 auto;
}

/* Reset main card container to be a transparent wrapper */
.blog-card {
    background: transparent;
    border-radius: 0;
    padding: 0; /* Remove padding from wrapper */
    width: 380px; 
    max-width: 100%; 
    min-height: auto; 
    display: flex;
    flex-direction: column;
    position: relative;
    border: none; /* Remove border from wrapper */
    transition: transform 0.3s;
    text-decoration: none;
    color: inherit;
}

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

/* New Image Styling */
.card-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 20px;
    position: relative;
    z-index: 2; /* Sits on top of the content card */
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* New Content Container Styling */
.card-content {
    border-radius: 20px;
    padding: 60px 30px 30px 30px; /* Top padding accts for overlap if needed, or visual balance */
    margin-top: -40px; /* Pull content up under the image */
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
}

/* Apply colors to the content wrapper based on parent class */
.blog-card.style-coral .card-content {
    background: var(--bg-coral-20); /* Light coral background */
    border: 1px solid var(--color-accent-coral);
}

.blog-card.style-green .card-content {
    background: var(--bg-green-20); /* Light green background */
    border: 1px solid var(--color-accent-green);
}

/* Remove old direct color styles on .blog-card if they exist/overlap */
.blog-card.style-coral, .blog-card.style-green {
    background: transparent;
    border: none;
}

.blog-card h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 22px; /* Adjusted size */
    line-height: 1.3;
    color: var(--color-primary-blue);
    margin-top: 15px;
    margin-bottom: 10px;
}

.blog-card .meta {
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--color-gray-text);
    margin-bottom: 25px;
}

.blog-card .tags {
    margin-top: auto;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.blog-card .tag {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    border: 1px solid rgba(0,0,0,0.1);
    background: rgba(255,255,255,0.5); /* Semi-transparent bg for tags */
}

/* Optional: colored tags to match theme */
.blog-card.style-green .tag {
    border-color: var(--color-accent-green);
    background: #d4eadd;
}

.blog-card.style-coral .tag {
    border-color: var(--color-accent-coral);
    background: #f7e0d5;
}

.cs-label {
    font-family: var(--font-body);
    font-weight: 800;
    font-size: 14px;
    color: var(--color-primary-teal);
    text-transform: uppercase;
    margin-bottom: 5px;
    display: block;
}

/* ====================================
   Footer (Same as Home)
   ==================================== */
.footer {
    background-color: var(--color-primary-blue);
    padding: 30px 50px 20px;
    position: relative;
}

.footer-content {
    display: flex;
    align-items: flex-start;
    gap: 50px;
}

.footer-logo-section { flex-shrink: 0; }
.footer-logo { width: 100px; height: auto; }

.footer-links-container {
    display: flex;
    gap: 25px;
    flex: 1;
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 90px;
}

.footer-header {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 16px;
    color: var(--color-white);
    transition: opacity 0.3s;
}

.footer-header:hover { opacity: 0.8; }

.footer-detail { display: flex; flex-direction: column; }
.contact-label { font-family: var(--font-body); font-weight: 700; font-size: 14px; color: var(--color-white); line-height: 1.4; margin: 0; }
.contact-value { font-family: var(--font-body); font-weight: 400; font-size: 14px; color: var(--color-white); line-height: 1.4; margin: 0;     text-decoration: none;
}
a.contact-value:hover {
    text-decoration: underline;
}

.linkedin-link { display: inline-block; }
.linkedin-link img { width: 20px; height: 20px; }

.copyright {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 12px;
    color: var(--color-white);
    text-align: right;
    margin-top: 20px;
}

/* ====================================
   Background Shapes
   ==================================== */
.shapes-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.shape-star {
    position: absolute;
    width: 80px;
    height: 80px;
    background-image: url('../assets/icons/Star 27.svg');
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.8;
}

.shape-star-1 {
    top: 20%;
    left: 15%;
}

.shape-star-2 {
    top: 35%;
    right: 15%;
}

/* Yellow line */
.deco-line-yellow {
    position: absolute;
    left: 10%; /* Fluid */
    top: 60vh; /* Responsive height approx */
    width: 83px;
    height: 12px;
    background: var(--color-accent-yellow);
    border-radius: 6px;
}

/* Coral dots/line group top */
.deco-group-top {
    position: absolute;
    left: 20%; 
    top: 1100px;
    width: 50px;
    height: 50px;
    background-image: url('../assets/icons/Group 17 red.svg');
    background-size: contain;
    background-repeat: no-repeat;
}

/* Green star */
.deco-star-green {
    position: absolute;
    right: 20%;
    top: 1900px;
    width: 50px;
    height: 50px;
    background-image: url('../assets/icons/Star 27.svg');
    background-size: contain;
    background-repeat: no-repeat;
}

/* Group bottom */
.deco-group-bottom {
    position: absolute;
    left: 20%;
    top: 2300px;
    width: 50px;
    height: 50px;
    background-image: url('../assets/icons/Star 29.svg');
    background-size: contain;
    background-repeat: no-repeat;
}

/* Responsive */
@media (max-width: 1200px) {
    .container { padding: 0 50px; }
    .content-wrapper { width: 90%; }
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
    padding: 10px;
}
.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--color-primary-blue);
    margin: 5px 0;
    transition: 0.3s;
    border-radius: 2px;
}
.mobile-menu-btn.active span:nth-child(1) { transform: rotate(-45deg) translate(-5px, 6px); }
.mobile-menu-btn.active span:nth-child(2) { opacity: 0; }
.mobile-menu-btn.active span:nth-child(3) { transform: rotate(45deg) translate(-5px, -6px); }

@media (max-width: 768px) {
    .container { padding: 0 20px; }
    .hero-title { font-size: 32px; line-height: 1.2; }
    
    .header-menu { 
        padding: 20px;
        justify-content: space-between;
    }
    .mobile-menu-btn { display: block; }
    
    .nav-links {
        display: flex;
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background-color: #fff;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.3s ease-in-out;
        z-index: 999;
        gap: 40px;
    }
    .nav-links.active {
        right: 0;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        display: flex;
    }

    .nav-links.active .mobile-nav-only {
        display: block !important;
    }
    
    .mobile-nav-logo {
        width: 60px;
        height: auto;
    }

    .nav-links.active .mobile-nav-btn {
        background-color: var(--color-primary-teal) !important;
        color: #fff !important;
        width: 250px !important;
        height: 60px !important;
        font-size: 20px !important;
        padding: 0 !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
        margin-top: 10px;
        border-radius: 25px;
    }

    .nav-links a {
        font-size: 24px;
        color: var(--color-primary);
    }

    .content-wrapper p, .content-wrapper li { font-size: 16px; line-height: 26px; }
    .content-wrapper h2 { font-size: 22px; line-height: 1.3; }
    .content-wrapper h3 { font-size: 18px; line-height: 1.4; }
    .blog-card { width: 100%; max-width: 100%; }
    
    /* Fix fixed-width elements */
    .article-hero,
    .article-content,
    .content-wrapper,
    .related-section {
        padding: 30px 20px;
    }
}
    
/* Mobile Media Query Updates (480px) */
@media (max-width: 480px) {
    /* 1. Header & Hero overrides */
    .article-hero {
        padding-top: 140px; 
    }
    
    /* Title */
    .article-title {
        font-family: 'Figtree', sans-serif;
        font-weight: 700;
        font-size: 25px !important;
        line-height: 35px !important;
        color: #032137;
        text-align: center;
        margin-bottom: 20px;
    }

    /* Meta: Date | Time */
    .article-meta {
        justify-content: center;
        font-family: 'Nunito', sans-serif;
        font-weight: 400;
        font-size: 15px !important;
        line-height: 25px !important;
        color: #434343;
    }

    /* Tag Label (DATA ANALYTICS) */
    .hero-tag {
        font-family: 'Nunito', sans-serif;
        font-weight: 800;
        font-size: 12px !important;
        line-height: 35px !important;
        color: #137374;
        text-transform: uppercase;
        display: block;
        text-align: center;
        margin-bottom: 10px;
    }

    /* 2. Content Body Typography */
    .content-wrapper p, .content-wrapper li {
        font-family: 'Nunito', sans-serif;
        font-weight: 500 !important;
        font-size: 15px !important;
        line-height: 25px !important;
        color: #434343;
        margin-bottom: 20px;
    }

    /* Subheadings within article */
    .content-wrapper h2, .content-wrapper h3 {
        font-family: 'Figtree', sans-serif;
        font-weight: 700 !important;
        font-size: 18px !important;
        line-height: 25px !important;
        color: #434343; /* Matches "Why Reducing Churn Matters" */
        margin-top: 30px;
        margin-bottom: 15px;
    }

    /* List Item Headers (Strong) */
    .content-wrapper strong, .content-wrapper b {
        font-family: 'Nunito', sans-serif;
        font-weight: 700 !important;
        font-size: 15px !important;
        color: #434343;
    }

    /* 3. Related Blogs Section */
    .related-section {
        background-color: #fff7e9; /* Light cream background per design? Or is it section bg? */
        /* Design shows Related Blogs on a cream background area? 
           Check design: "Absolute bg-[#fff7e9] ... top-[2690px]" -> YES. 
        */
        padding: 40px 20px !important;
    }
    
    .related-title {
        font-family: 'Figtree', sans-serif;
        font-weight: 700;
        font-size: 25px !important;
        line-height: 35px !important;
        color: #032137;
        text-align: center;
        margin-bottom: 30px;
    }

    /* Related Cards -> Rebuilt using Flexbox & Grid */
    .related-grid {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }
    
    .blog-card, .blog-card.style-coral, .blog-card.style-green {
        display: grid !important;
        grid-template-columns: 130px 1fr !important;
        grid-template-rows: auto !important; /* Let content dictate height */
        padding: 0 !important;
        background-color: #ffffff !important; /* Force white background */
        border-radius: 20px !important; 
        box-shadow: 0 4px 15px rgba(0,0,0,0.05) !important;
        width: 100% !important;
        overflow: hidden !important; /* Clip corners and content */
        min-height: 160px;
        border: none !important;
    }

    /* Column 1: Image */
    .card-image {
        grid-column: 1;
        grid-row: 1 / span 2;
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        margin: 0 !important;
        border-radius: 20px 0 0 20px !important; /* Image fills left side completely */
    }

    /* Column 2: Content Container */
    .card-content {
        grid-column: 2;
        grid-row: 1;
        padding: 15px !important;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        height: 100%;
        min-width: 0; 
        margin-top: 0 !important; /* Fix overlap */
        overflow: visible !important; /* Ensure tags aren't clipped */
    }

    /* Content Typography & Layout */
    .card-content h3 {
        font-family: 'Figtree', sans-serif;
        font-weight: 700;
        font-size: 18px !important;
        line-height: 24px !important;
        color: #032137;
        margin-top: 0 !important;
        margin-bottom: 8px !important;
        padding: 0 !important;
        word-wrap: break-word; /* Ensure text breaks */
        overflow-wrap: break-word;
    }

    .deco-group-bottom {
        position: absolute;
        left: 20%;
        top: 2550px;
        width: 40px;
        height: 40px;
    }

    .deco-group-top {
        position: absolute;
        left: 15%; /* Moved to side to avoid text overlap */
        top: 1400px;
        width: 40px;
        height: 40px;
    }

    .shape-star-1 {
        top: 18%;
        left: 10%;
    }

    .shape-star-2 {
        top: 47%;
        right: 10%;
    }

    /* Yellow line */
    .deco-line-yellow {
        position: absolute;
        left: 107px;
        top: 543px;
        width: 83px;
        height: 12px;
        background: var(--color-accent-yellow);
        border-radius: 6px;
    }

    .deco-group-top {
        position: absolute;
        left: 2%;
        top: 1600px;
        width: 30px;
        height: 30px;
    }

    /* Green star */
    .deco-star-green {
        position: absolute;
        right: 10%;
        top: 1900px;
        width: 40px;
        height: 40px;
    }

    .card-content .meta {
        font-family: 'Nunito', sans-serif;
        font-weight: 400;
        font-size: 10px !important;
        line-height: 25px !important;
        color: #434343;
        margin-bottom: 12px !important;
    }

    /* Hide the 'TEXT HERE' label */
    .card-content .cs-label {
        display: none !important;
    }

    /* Tags Positioned at bottom */
    .card-content .tags {
        margin-top: auto; /* Pushes tag to bottom of available space */
        align-self: flex-start;
    }

    /* Tag Styling */
    .tag {
        font-family: 'Nunito', sans-serif;
        font-weight: 700;
        font-size: 12px !important;
        line-height: 25px !important;
        padding: 0 14px !important;
        border-radius: 20px !important;
        display: inline-block;
        border: none !important;
    }
    
    /* Tag Colors based on Data Attribute */
    .blog-card[data-category="Data Analytics"] .tag {
        background-color: #FDBF49 !important; /* Yellow */
        color: #032137 !important; /* Dark text */
    }

    .blog-card[data-category="Data Engineering"] .tag {
        background-color: #78C6C4 !important; /* Teal */
        color: #ffffff !important;
    }

    /* 4. Footer Mobile Typography overrides */
    .footer { padding: 20px !important; }
    .footer-logo-section { display: none !important; }
    .footer-content, .footer-links-container { 
        flex-direction: column !important; 
        align-items: center !important; 
        text-align: center !important; 
        gap: 20px !important;
    }
    .footer-column {
        align-items: center !important;
        min-width: unset !important;
    }
    .footer-detail {
        align-items: center !important;
    }

    .footer-header, .contact-label, .contact-value {
        font-family: 'Nunito', sans-serif;
        font-weight: 700 !important;
        font-size: 18px !important;
        color: white !important;
    }
    .contact-value[href^="mailto"] {
        font-weight: 400 !important;
    }
    .copyright {
        font-family: 'Nunito', sans-serif;
        font-weight: 400 !important;
        font-size: 14px !important;
        color: white !important;
        text-align: center !important;
    }
}
