/* ==========================================================================
   1. CSS Variables & Global Settings
   ========================================================================== */
:root {
    --font-heading: 'Inter', sans-serif;
    --font-body: 'IBM Plex Sans', sans-serif;
    
    /* Analogous Color Scheme with a pop of accent */
    --color-primary: #0077B6;   /* Rich Ocean Blue */
    --color-secondary: #00B4D8; /* Bright Cyan */
    --color-accent: #FF8C42;    /* Sunset Orange */
    
    /* Text & Background */
    --color-text-dark: #212529;
    --color-text-medium: #495057;
    --color-text-light: #FFFFFF;
    --color-bg-light: #FDFEFF;
    --color-bg-dark: #023047; /* Deep Navy */
    
    /* Gradients & Shadows */
    --gradient-dynamic: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-strong: 0 8px 24px rgba(0, 0, 0, 0.12);
    
    /* Sizing & Transitions */
    --header-height: 80px;
    --border-radius: 12px;
    --transition-smooth: all 0.3s ease-in-out;
}

*, *::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(--color-text-medium);
    background-color: var(--color-bg-light);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   2. Layout & Typography
   ========================================================================== */
.container {
    width: 90%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

section {
    padding: 5rem 0;
    overflow: hidden;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--color-text-dark);
    font-weight: 800;
    line-height: 1.2;
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.5rem; }
p { margin-bottom: 1rem; }
a {
    color: var(--color-primary);
    text-decoration: none;
    transition: var(--transition-smooth);
}
a:hover { color: var(--color-secondary); }

.section-title {
    text-align: center;
    margin-bottom: 1rem;
    color: var(--color-text-dark);
    text-shadow: 1px 1px 3px rgba(0,0,0,0.1);
}

.section-subtitle {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem auto;
    font-size: 1.1rem;
}

/* For simple content pages */
.static-page-content {
    padding: calc(var(--header-height) + 3rem) 0 3rem;
    min-height: 80vh;
}
.static-page-content h1, .static-page-content h2 {
    margin-bottom: 1.5rem;
}
.static-page-content p {
    margin-bottom: 1.5rem;
}

/* ==========================================================================
   3. Header & Navigation
   ========================================================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: transparent;
    transition: background-color 0.4s ease, box-shadow 0.4s ease;
    height: var(--header-height);
}

.site-header.scrolled {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-soft);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
}

.nav-logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-text-light);
    transition: var(--transition-smooth);
}

.site-header.scrolled .nav-logo {
    color: var(--color-text-dark);
}

.nav-menu {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 2.5rem;
}

.nav-link {
    font-weight: 500;
    color: var(--color-text-light);
    transition: var(--transition-smooth);
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
}

.site-header.scrolled .nav-link {
    color: var(--color-text-medium);
}

.nav-link:hover {
    color: var(--color-accent);
    border-bottom-color: var(--color-accent);
}

.hamburger {
    display: none;
    cursor: pointer;
}

.hamburger .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
    background-color: var(--color-text-light);
}

.site-header.scrolled .hamburger .bar {
    background-color: var(--color-text-dark);
}

/* ==========================================================================
   4. Global Components (Buttons, Cards)
   ========================================================================== */
.button-primary {
    display: inline-block;
    padding: 0.8rem 2rem;
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-text-light);
    background: var(--gradient-dynamic);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 15px rgba(0, 180, 216, 0.4);
    text-align: center;
}

.button-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(0, 180, 216, 0.6);
}

/* Contact button in nav */
.contact-button {
    background: var(--color-accent);
    color: var(--color-text-light);
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
}
.contact-button:hover {
    background: var(--color-accent);
    color: var(--color-text-light);
    border-color: transparent;
}

/* Card base styles */
.card {
    background: var(--color-text-light);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-strong);
}

.card-image {
    width: 100%;
    height: 250px; /* Fixed height for consistency */
    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: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.card-content h3 {
    margin-bottom: 0.5rem;
}
.card-content p {
    flex-grow: 1;
}

/* ==========================================================================
   5. Section Specific Styles
   ========================================================================== */

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

.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.3) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    color: var(--color-text-light);
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    max-width: 650px;
    margin: 0 auto 2rem auto;
    color: var(--color-text-light);
    opacity: 0.9;
}

/* Partners Section */
.partners-section {
    background: var(--color-bg-light);
}
.partners-grid {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
    filter: grayscale(100%);
    opacity: 0.7;
}

.partners-grid img {
    max-height: 40px;
    width: auto;
    transition: var(--transition-smooth);
}
.partners-grid:hover img {
    filter: grayscale(0%);
    opacity: 1;
}


/* Media Section */
.card-grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

/* Testimonials Section */
.testimonials-section {
    background: var(--gradient-dynamic);
}
.testimonials-section .section-title, .testimonials-section .section-subtitle {
    color: var(--color-text-light);
}
.card-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}
.testimonial-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--color-text-light);
}
.testimonial-card blockquote {
    font-size: 1.1rem;
    font-style: italic;
    border-left: 3px solid var(--color-accent);
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}
.testimonial-card cite {
    font-weight: 600;
    color: var(--color-text-light);
}

/* Awards Section */
.awards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    text-align: center;
}
.award-item {
    padding: 2rem;
    border-radius: var(--border-radius);
    transition: var(--transition-smooth);
}
.award-item:hover {
    background: var(--color-text-light);
    box-shadow: var(--shadow-soft);
}
.award-item img {
    margin-bottom: 1rem;
    height: 80px;
}
.award-item h3 {
    font-size: 1.2rem;
}
.award-item span {
    color: var(--color-text-medium);
}

/* External Resources Section */
.resources-section {
    background: #eef7f9;
}
.resources-list {
    display: grid;
    gap: 1rem;
}
.resource-card {
    display: block;
    padding: 1.5rem;
    background: var(--color-text-light);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    transition: var(--transition-smooth);
    border-left: 5px solid var(--color-secondary);
}
.resource-card:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: var(--shadow-strong);
    border-left-color: var(--color-accent);
}
.resource-card h4 {
    margin-bottom: 0.5rem;
    color: var(--color-primary);
}
.resource-card .resource-url {
    display: block;
    margin-top: 1rem;
    font-weight: 600;
    color: var(--color-accent);
    font-size: 0.9rem;
}

/* Contact Section */
.contact-form-wrapper {
    max-width: 700px;
    margin: 0 auto;
    padding: 2.5rem;
    background: var(--color-text-light);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-strong);
}
.form-group {
    position: relative;
    margin-bottom: 2rem;
}
.form-group input, .form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition-smooth);
}
.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(0, 119, 182, 0.2);
}
.form-group label {
    position: absolute;
    top: 1rem;
    left: 1rem;
    color: #999;
    pointer-events: none;
    transition: all 0.2s ease;
}
.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:focus + label,
.form-group textarea:not(:placeholder-shown) + label {
    top: -0.75rem;
    left: 0.75rem;
    font-size: 0.8rem;
    color: var(--color-primary);
    background: var(--color-text-light);
    padding: 0 0.25rem;
}

/* Switch Component */
.switch-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}
input:checked + .slider {
    background-color: var(--color-primary);
}
input:checked + .slider:before {
    transform: translateX(26px);
}

/* ==========================================================================
   6. Footer
   ========================================================================== */
.site-footer {
    background: var(--color-bg-dark);
    color: rgba(255, 255, 255, 0.7);
    padding: 4rem 0 2rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}
.footer-column h4 {
    color: var(--color-text-light);
    margin-bottom: 1rem;
    font-weight: 700;
}
.footer-column ul {
    list-style: none;
}
.footer-column ul li {
    margin-bottom: 0.5rem;
}
.footer-column a {
    color: rgba(255, 255, 255, 0.7);
}
.footer-column a:hover {
    color: var(--color-text-light);
}
.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
}

/* ==========================================================================
   7. Special Pages (Success, Privacy)
   ========================================================================== */
.success-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
    background: var(--gradient-dynamic);
    color: var(--color-text-light);
}
.success-page h1 {
    color: var(--color-text-light);
}
.success-page .button-primary {
    background: var(--color-accent);
    box-shadow: 0 4px 15px rgba(255, 140, 66, 0.4);
}
.success-page .button-primary:hover {
    box-shadow: 0 7px 20px rgba(255, 140, 66, 0.6);
}

/* ==========================================================================
   8. Animations & Transitions (Barba.js, Scroll)
   ========================================================================== */
.animate-on-scroll {
    opacity: 1;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Barba.js page transitions */
.barba-leave-active, .barba-enter-active {
    transition: opacity 0.5s ease;
}
.barba-leave-to, .barba-enter-from {
    opacity: 0;
}


/* ==========================================================================
   9. Responsive Design
   ========================================================================== */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: var(--header-height);
        flex-direction: column;
        background-color: var(--color-text-light);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        gap: 0;
    }
    .nav-menu.active {
        left: 0;
    }
    .nav-item {
        width: 100%;
    }
    .nav-link {
        display: block;
        padding: 1.5rem 0;
        color: var(--color-text-dark); /* Color for mobile menu */
    }
    .site-header.scrolled .nav-link {
        color: var(--color-text-dark);
    }
    .nav-link:hover {
        background: #f1f1f1;
        border-color: transparent;
    }
    .contact-button {
        margin: 1rem auto;
        width: calc(100% - 4rem);
    }

    .hamburger {
        display: block;
    }
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    .site-header.scrolled .hamburger.active .bar {
        background-color: var(--color-text-dark);
    }
    
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    section { padding: 3rem 0; }
    
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
}