/* ====================================
   Resources Page Styles
   ==================================== */

:root {
    --color-primary-blue: #0A355B;
    --color-primary-teal: #137374;
    --color-teal-light: #78C6C4;
    --color-accent-green: #98D29B;
    --color-accent-yellow: #FDBF49; /* Border yellow */
    --color-yellow-light: #FED992; /* BG yellow */
    --color-accent-coral: #E88773;
    --color-coral-light: #FAE7E3;
    --color-gray-text: #434343;
    --color-white: #ffffff;
    
    --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);
    --bg-coral-20: rgba(232, 135, 115, 0.2);
    --bg-blue-10: rgba(10, 53, 91, 0.1);

    --font-heading: 'Figtree', sans-serif;
    --font-body: 'Nunito', sans-serif;
}

/* ====================================
   Shared Layout
   ==================================== */
.resources-page {
    position: relative;
    background: #fff;
    overflow-x: hidden;
}

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

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

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

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

a { text-decoration: none; color: inherit; }
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ====================================
   Header
   (Reused from other pages, style hooks)
   ==================================== */
.header-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 40px 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 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;
}

.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.active, .nav-links a:hover {
    color: var(--color-primary-teal);
}

/* ====================================
   Hero
   ==================================== */
.resources-hero {
    padding: 220px 0 60px; /* Top padding for fixed header */
    text-align: center;
}

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

/* ====================================
   Toggle Controls
   ==================================== */
.toggle-wrapper {
    display: flex;
    justify-content: center;
    margin: 60px 0 80px;
}

.toggle-container {
    background: var(--bg-blue-10);
    border: 1px solid var(--color-primary-blue);
    border-radius: 40px;
    display: flex;
    width: 628px;
    height: 88px;
    position: relative;
    overflow: hidden;
}

.toggle-btn {
    flex: 1;
    border: none;
    background: transparent;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 35px;
    color: var(--color-primary-blue);
    cursor: pointer;
    z-index: 2;
    transition: color 0.3s;
}

.toggle-btn.active {
    color: #fff;
}

.toggle-bg {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50%;
    background: var(--color-primary-blue);
    border-radius: 40px;
    transition: transform 0.3s ease-in-out;
    z-index: 1;
}

/* Slide logic */
/* If second button is active, move background right */
.toggle-container.show-case .toggle-bg {
    transform: translateX(0);
}
.toggle-container.show-blog .toggle-bg {
    transform: translateX(100%);
}

/* ====================================
   Views
   ==================================== */
.view-section {
    display: none;
    animation: fadeIn 0.5s ease;
}

.view-section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ====================================
   Specific: Case Studies View
   ==================================== */
.case-study-list {
    display: flex;
    flex-direction: column;
    gap: 150px;
    padding-bottom: 150px;
}

/* Decoration Shape for Case Study items */
.cs-shape-bg {
    position: absolute;
    z-index: -1;
    border-radius: 25px;
}

/* 1. Featured Case Study (Pitstop) */
.cs-card-featured {
    position: relative;
    padding: 80px 0;
}

/* The teal massive shape background */
.cs-featured-bg {
    position: absolute;
    top: 50px;
    left: 0;
    width: 75%; /* Arbitrary large width */
    height: 100%;
    background: #fae7e3; /* Using the color from Figma: #fae7e3 (light pink/coral? Actually Figma says #fae7e3 is associated) */
    /* Wait, Figma screenshot shows styles. Let's use vars. */
    background: var(--color-coral-light);
    border-top-right-radius: 40px;
    border-bottom-right-radius: 40px;
    z-index: -1;
    /* Rotation or shape logic */
    /* Figma for "Case Study" node 116:1636 is bg-[#fae7e3] */
}

/* Content layout */
.cs-content-split {
    display: flex;
    gap: 80px;
    align-items: center;
    padding: 0 60px; /* Added padding to prevent content from being too close to the design box */
}

.cs-text-col {
    flex: 1;
}

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

.cs-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 70px;
    line-height: 85px;
    color: var(--color-primary-blue);
    margin-bottom: 40px;
}

.cs-desc {
    font-family: var(--font-body);
    font-size: 25px;
    line-height: 40px;
    color: var(--color-gray-text);
}

.cs-logo {
    margin-top: 40px;
    max-width: 200px;
}

.cs-image-col {
    flex: 1;
    display: flex;
    justify-content: center;
}

/* 2. Secondary Case Studies (Asymmetric) */
.cs-secondary-row {
    display: flex;
    gap: 50px;
    justify-content: center;
    position: relative;
}

/* Styling for the cards */
.cs-card-small {
    position: relative;
    width: 48%;
    padding: 60px 40px;
    border-radius: 40px;
    background: #fff;
    border: 1px solid;
    min-height: 600px; /* Taller cards */
    display: flex;
    flex-direction: column;
}

/* Background offsets for card aesthetics */
.cs-card-small.style-yellow {
    border-color: var(--color-accent-yellow);
}
.cs-card-small.style-yellow::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    right: -20px;
    bottom: -20px;
    background: var(--bg-yellow-20);
    border-radius: 40px;
    z-index: -1;
}

.cs-card-small.style-green {
    border-color: var(--color-accent-green);
    margin-top: 100px; /* Stagger effect */
}
.cs-card-small.style-green::before {
    content: '';
    position: absolute;
    top: 20px;
    left: -20px;
    right: 20px;
    bottom: -20px;
    background: var(--bg-green-20);
    border-radius: 40px;
    z-index: -1;
}

.cs-card-small h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 45px;
    line-height: 60px;
    color: var(--color-primary-blue);
    margin: 20px 0 20px;
}

.cs-card-small .cs-desc {
    font-size: 25px;
    line-height: 35px;
}

/* ====================================
   Specific: Blog View
   ==================================== */
/* Featured Blog */
.blog-featured {
    display: flex;
    align-items: center;
    position: relative;
    margin-bottom: 100px;
}

/* The massive teal shape background for blog featured */
.blog-featured-bg {
    position: absolute;
    left: -100px; /* Off screen left */
    top: 0;
    width: 70%;
    height: 100%;
    background: var(--bg-teal-20);
    border-top-right-radius: 15rem; /* Large curve */
    z-index: -1;
}

.blog-featured-content {
    flex: 1;
    padding-right: 50px;
}

.bf-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 45px;
    line-height: 60px;
    color: var(--color-primary-blue);
    margin: 20px 0;
}

.bf-meta {
    font-family: var(--font-body);
    font-size: 18px;
    color: var(--color-gray-text);
}

.blog-featured-image {
    flex: 0 0 565px;
    height: 454px;
    border-radius: 40px;
    border: 1px solid var(--color-teal-light);
    overflow: hidden;
}

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

/* Filters */
.blog-filters {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-bottom: 80px;
}

.filter-btn {
    background: none;
    border: none;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 25px; /* 'All' is 35px in figma but let's balance */
    color: var(--color-primary-blue);
    cursor: pointer;
    padding-bottom: 5px;
    border-bottom: 3px solid transparent;
}

.filter-btn.active {
    border-bottom-color: var(--color-primary-blue);
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    padding-bottom: 150px;
}

.blog-card {
    background: #fff;
    border-radius: 25px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    min-height: 368px;
    border: 1px solid transparent;
    position: relative;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* Card variants */
.blog-card.style-green {
    border-color: var(--color-accent-green);
    background: #eaf6eb;
}
.blog-card.style-coral {
    border-color: var(--color-accent-coral);
    background: var(--color-coral-light);
}

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

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

.blog-card .tags {
    display: flex;
    gap: 10px;
}

.tag {
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
    border: 1px solid;
}

.style-green .tag {
    background: var(--bg-green-20);
    border-color: var(--color-accent-green);
}
.style-coral .tag {
    background: var(--bg-coral-20);
    border-color: var(--color-accent-coral);
    /* Note: Figma uses yellow tags sometimes too */
    /* Let's stick to simple logic for now */
}

/* ====================================
   Footer (Standard)
   ==================================== */
.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; }

.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;
}

/* ====================================
   Responsive
   ==================================== */
@media (max-width: 1200px) {
    .container { padding: 0 50px; }
    .hero-title { font-size: 50px; line-height: 70px; }
    
    .cs-content-split { flex-direction: column; text-align: center; }
    .cs-image-col { width: 100%; }
    
    .cs-secondary-row { flex-direction: column; align-items: center; }
    .cs-card-small { width: 100%; margin-top: 0 !important; }
    
    .blog-featured { flex-direction: column; gap: 40px; }
    .blog-featured-image { width: 100%; height: 300px; flex: none; }
    
    .blog-grid { grid-template-columns: repeat(2, 1fr); }
}

/* 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);
    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; }
    
    .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);
    }
    .nav-links a {
        font-size: 24px;
        color: var(--color-primary);
    }

    .toggle-wrapper { margin: 40px 0; }
    .toggle-container { width: 100%; max-width: 400px; }
    .toggle-btn { font-size: 24px; }
    
    .hero-title { font-size: 26px; line-height: 1.3; }
    
    .blog-filters { gap: 15px; flex-wrap: wrap; }
    .filter-btn { font-size: 14px; padding: 8px 16px; }
    
    .blog-grid { grid-template-columns: 1fr; }
    
    /* Fix fixed-width elements */
    .cs-image-col,
    .cs-card-small,
    .toggle-container {
        width: 100% !important;
        max-width: 100%;
    }
    
    .cs-section,
    .blog-section {
        padding: 40px 20px;
    }
    
    .cs-main-title,
    .blog-main-title,
    .section-title {
        font-size: 24px;
        line-height: 1.3;
    }
    
    .cs-card-title,
    .blog-card-title {
        font-size: 18px;
        line-height: 1.4;
    }
    
    .cs-card-text,
    .blog-card-text {
        font-size: 14px;
        line-height: 1.5;
    }
    
    .toggle-btn {
        font-size: 18px;
        padding: 12px 20px;
    }
    
    .footer {
        padding: 40px 20px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 30px;
    }
    
    .footer-links-container {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 30px 10px;
    }

    .footer-column {
        min-width: 0;
    }

    /* Left aligning columns */
    .footer-column:nth-child(1), 
    .footer-column:nth-child(4) {
        align-items: flex-start;
        text-align: left;
    }

    /* Center aligning columns */
    .footer-column:nth-child(2), 
    .footer-column:nth-child(5) {
        align-items: center;
        text-align: center;
    }

    /* Right aligning columns */
    .footer-column:nth-child(3) {
        align-items: flex-end;
        text-align: right;
    }
}

/* ====================================
   Placeholder Images
   ==================================== */
.cs-card-image-placeholder {
    width: 100%;
    height: auto;
    border-radius: 20px;
    margin-bottom: 30px;
    object-fit: cover;
    max-height: 300px;
}

.blog-card-image-placeholder {
    width: 100%;
    height: 180px;
    border-radius: 15px;
    margin-bottom: 20px;
    object-fit: cover;
    background-color: #f0f0f0;
}

.cs-image-col img {
    width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}
