/* style.css */

/* ---------------------------------- */
/*      1. ROOT & CSS VARIABLES       */
/* ---------------------------------- */
:root {
    /* Color Palette */
    --gradient-start: #6a11cb;
    --gradient-end: #2575fc;
    --primary-accent: #4A90E2; /* A strong blue for interactive elements */
    --secondary-accent: #f5a623; /* A contrasting orange/yellow */
    
    --text-color-dark: #1a1a1a;
    --text-color-light: #f0f0f0;
    --text-color-muted: #666666;
    
    --bg-color-light: #ffffff;
    --bg-color-medium: #f4f6f9;
    --bg-color-dark: #121212;
    --border-color: #000000;

    /* Typography */
    --font-header: 'Manrope', sans-serif;
    --font-body: 'Rubik', sans-serif;

    /* Spacing & Sizing */
    --header-height: 80px;
    --border-radius-sharp: 4px;
    --border-width-bold: 2px;
    --shadow-depth: 4px;
}

/* ---------------------------------- */
/*        2. BASE & RESET             */
/* ---------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--text-color-dark);
    background-color: var(--bg-color-light);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

a:hover {
    text-decoration: underline;
}

/* ---------------------------------- */
/*        3. TYPOGRAPHY               */
/* ---------------------------------- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-header);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-color-dark);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    color: var(--text-color-dark); /* Default dark color for titles */
}

.section-subtitle {
    text-align: center;
    max-width: 700px;
    margin: -2rem auto 3rem auto;
    color: var(--text-color-muted);
    font-size: 1.1rem;
}

p {
    margin-bottom: 1rem;
}

/* ---------------------------------- */
/*     4. LAYOUT & HELPERS            */
/* ---------------------------------- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 60px 0;
}

.section-light {
    background-color: var(--bg-color-medium);
}

.section-dark {
    background: linear-gradient(45deg, var(--gradient-start), var(--gradient-end));
    color: var(--text-color-light);
}

.section-dark .section-title,
.section-dark p {
    color: var(--text-color-light);
}

.is-two-thirds {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.text-center {
    text-align: center;
}

/* ---------------------------------- */
/*      5. HEADER & NAVIGATION        */
/* ---------------------------------- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: var(--border-width-bold) solid var(--border-color);
    z-index: 1000;
    transition: top 0.3s ease;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    font-family: var(--font-header);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-color-dark);
}
.logo:hover { text-decoration: none; }

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

.main-nav a {
    font-weight: 500;
    color: var(--text-color-dark);
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.main-nav a:hover {
    color: var(--primary-accent);
    border-color: var(--primary-accent);
    text-decoration: none;
}

.burger-menu {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
    width: 30px;
    height: 22px;
    position: relative;
}

.burger-menu span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--text-color-dark);
    position: absolute;
    left: 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.burger-menu span:nth-child(1) { top: 0; }
.burger-menu span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.burger-menu span:nth-child(3) { bottom: 0; }

.burger-menu.active span:nth-child(1) { top: 50%; transform: translateY(-50%) rotate(45deg); }
.burger-menu.active span:nth-child(2) { opacity: 0; }
.burger-menu.active span:nth-child(3) { bottom: 50%; transform: translateY(50%) rotate(-45deg); }


/* ---------------------------------- */
/*    6. BUTTONS & FORMS (GLOBAL)     */
/* ---------------------------------- */
.btn, button, input[type="submit"] {
    display: inline-block;
    padding: 12px 30px;
    font-family: var(--font-header);
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    text-align: center;
    text-transform: uppercase;
    border-radius: var(--border-radius-sharp);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    user-select: none;
}

.btn-primary {
    background-color: var(--primary-accent);
    color: var(--text-color-light);
    border: var(--border-width-bold) solid var(--border-color);
    box-shadow: var(--shadow-depth) var(--shadow-depth) 0 0 var(--border-color);
}

.btn-primary:hover {
    transform: translate(2px, 2px);
    box-shadow: calc(var(--shadow-depth) - 2px) calc(var(--shadow-depth) - 2px) 0 0 var(--border-color);
    text-decoration: none;
}

.btn-primary:active {
    transform: translate(var(--shadow-depth), var(--shadow-depth));
    box-shadow: 0 0 0 0 var(--border-color);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    padding: 12px 15px;
    font-family: var(--font-body);
    font-size: 1rem;
    background-color: var(--bg-color-medium);
    border: var(--border-width-bold) solid var(--border-color);
    border-radius: var(--border-radius-sharp);
    box-shadow: inset 2px 2px 3px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-accent);
    box-shadow: inset 2px 2px 3px rgba(0,0,0,0.1), 0 0 0 3px rgba(74, 144, 226, 0.3);
}

/* ---------------------------------- */
/*    7. SECTION-SPECIFIC STYLES      */
/* ---------------------------------- */

/* Hero Section */
.hero-section {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-color-light);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.2) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: #FFFFFF;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: #FFFFFF;
}


/* Services & Case Studies - Cards */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background-color: var(--bg-color-light);
    border: var(--border-width-bold) solid var(--border-color);
    border-radius: var(--border-radius-sharp);
    overflow: hidden;
    box-shadow: var(--shadow-depth) var(--shadow-depth) 0 0 #ccc;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    text-align: center;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: calc(var(--shadow-depth) + 4px) calc(var(--shadow-depth) + 4px) 0 0 #ccc;
}

.card-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.card:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.card-content h3 { font-size: 1.5rem; }

/* Statistics Section */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    text-align: center;
}
.stat-item .progress-indicator {
    font-size: 3.5rem;
    font-family: var(--font-header);
    font-weight: 800;
    display: inline-block;
}
.stat-item span {
    font-size: 2rem;
    font-family: var(--font-header);
    font-weight: 800;
}
.stat-item p {
    font-size: 1.1rem;
    margin-top: 10px;
    opacity: 0.9;
}

/* Case Studies Carousel */
.carousel-container {
    position: relative;
    overflow: hidden;
    padding: 0 50px; /* Space for nav buttons */
}
.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}
.carousel-item {
    flex: 0 0 100%;
    max-width: 100%;
}
.carousel-nav {
    position: absolute;
    top: 50%;
    left: 10px;
    right: 10px;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
}
.carousel-nav button {
    background-color: rgba(0,0,0,0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.3s;
}
.carousel-nav button:hover { background-color: rgba(0,0,0,0.8); }

/* Research Accordion */
.accordion-item {
    border: var(--border-width-bold) solid var(--border-color);
    margin-bottom: 10px;
    border-radius: var(--border-radius-sharp);
}
.accordion-header {
    background-color: var(--bg-color-light);
    color: var(--text-color-dark);
    cursor: pointer;
    padding: 15px 20px;
    width: 100%;
    text-align: left;
    border: none;
    outline: none;
    font-size: 1.2rem;
    font-family: var(--font-header);
    font-weight: 800;
    position: relative;
}
.accordion-header::after {
    content: '+';
    font-size: 1.5rem;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s ease;
}
.accordion-item.active .accordion-header::after {
    transform: translateY(-50%) rotate(45deg);
}
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
    background-color: white;
    padding: 0 20px;
}
.accordion-content p { margin-top: 15px; }

/* Partners Section */
.partners-logo-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 40px;
}
.partners-logo-grid img {
    height: 60px;
    width: auto;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: filter 0.3s ease, opacity 0.3s ease;
}
.partners-logo-grid img:hover {
    filter: grayscale(0%);
    opacity: 1;
}

/* External Resources */
.resources-list { display: flex; flex-direction: column; gap: 20px; }
.resource-item {
    border: var(--border-width-bold) solid #ddd;
    border-radius: var(--border-radius-sharp);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.resource-item a {
    display: block;
    padding: 20px;
    color: inherit;
}
.resource-item a:hover {
    text-decoration: none;
}
.resource-item:hover {
    border-color: var(--primary-accent);
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}
.resource-item h4 { color: var(--text-color-dark); margin-bottom: 0.5rem; }
.resource-item p { color: var(--text-color-muted); margin-bottom: 0; }

/* ---------------------------------- */
/*        8. FOOTER                   */
/* ---------------------------------- */
.site-footer-dark {
    background-color: var(--bg-color-dark);
    color: var(--text-color-light);
    padding: 60px 0 20px 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.footer-col h4 {
    font-size: 1.2rem;
    color: var(--text-color-light);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.footer-col p {
    color: rgba(255, 255, 255, 0.7);
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 10px;
}

.footer-col a {
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s ease;
}

.footer-col a:hover {
    color: var(--text-color-light);
    text-decoration: underline;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.social-links a {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
}

/* ---------------------------------- */
/*      9. PAGE-SPECIFIC STYLES       */
/* ---------------------------------- */
.success-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
}

/* Add top padding for fixed header on static pages */
body[data-barba-namespace="privacy"] main .section,
body[data-barba-namespace="terms"] main .section {
    padding-top: calc(var(--header-height) + 60px);
}

.page-content h2 { margin-top: 2rem; }
.content-image {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius-sharp);
    border: var(--border-width-bold) solid var(--border-color);
    margin-bottom: 2rem;
}


/* ---------------------------------- */
/* 10. TRANSITIONS & ANIMATIONS (Barba) */
/* ---------------------------------- */
.fade-enter-active,
.fade-leave-active {
  transition: opacity 0.5s;
}
.fade-enter,
.fade-leave-to {
  opacity: 0;
}

/* ---------------------------------- */
/*       11. MEDIA QUERIES            */
/* ---------------------------------- */
@media (max-width: 768px) {
    .main-nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: var(--bg-color-dark);
        display: flex;
        align-items: center;
        justify-content: center;
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    }

    .main-nav.active {
        transform: translateX(0);
    }

    .main-nav ul {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .main-nav a {
        color: var(--text-color-light);
        font-size: 2rem;
    }
    
    .burger-menu {
        display: block;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content p {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 2rem;
    }
    
    .carousel-container { padding: 0; }
    .carousel-nav { display: none; } /* Hide on mobile, rely on swipe */
}