/* ==========================================================================
   1. CSS VARIABLES
   ========================================================================== */
:root {
    /* Color Palette (Triadic) */
    --color-primary: #0077B6; /* Cerulean Blue */
    --color-secondary: #B60077; /* Magenta */
    --color-accent: #77B600; /* Lime Green */
    --color-primary-dark: #005A8D;
    
    /* Neutral Colors */
    --color-text: #333333;
    --color-text-light: #FFFFFF;
    --color-headings: #222222;
    --color-background-light: #F8F9FA;
    --color-background-dark: #FFFFFF;
    --color-border: #111111;
    --color-white: #FFFFFF;
    --color-black: #000000;

    /* Fonts */
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'DM Sans', sans-serif;

    /* Sizing & Spacing */
    --header-height: 80px;
    --spacing-xs: 4px;
    --spacing-s: 8px;
    --spacing-m: 16px;
    --spacing-l: 24px;
    --spacing-xl: 48px;
    --spacing-xxl: 64px;

    /* Effects */
    --shadow-hard: 4px 4px 0px var(--color-border);
    --shadow-hard-hover: 6px 6px 0px var(--color-primary-dark);
    --border-radius-sharp: 0px;
    --border-radius-soft: 4px;
    --transition-fast: all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
}

/* ==========================================================================
   2. GLOBAL STYLES
   ========================================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 100%;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--color-text);
    background-color: var(--color-background-dark);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-headings);
    line-height: 1.2;
    margin: 0 0 var(--spacing-m) 0;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

h1 { font-size: 3.052rem; }
h2 { font-size: 2.441rem; }
h3 { font-size: 1.953rem; }
p { margin-bottom: var(--spacing-m); }
a {
    color: var(--color-primary);
    text-decoration: none;
    transition: var(--transition-fast);
}
a:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}

/* ==========================================================================
   3. LAYOUT & CONTAINERS
   ========================================================================== */
.main-container {
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-l);
}

.section {
    padding: var(--spacing-xxl) 0;
}

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

.section-title {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    color: var(--color-headings);
    text-shadow: none;
}
.section-subtitle {
    text-align: center;
    max-width: 700px;
    margin: 0 auto var(--spacing-xl) auto;
    font-size: 1.1rem;
    color: #555;
}

/* ==========================================================================
   4. HEADER & NAVIGATION
   ========================================================================== */
.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);
    z-index: 1000;
    border-bottom: 2px solid var(--color-border);
    transition: var(--transition-fast);
}

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

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-headings);
    text-decoration: none;
}
.logo:hover { text-decoration: none; }

.main-nav {
    display: block;
}

.nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: var(--spacing-l);
}

.nav-list a {
    font-family: var(--font-heading);
    font-weight: 500;
    color: var(--color-text);
    padding: var(--spacing-s) 0;
    position: relative;
    text-decoration: none;
}
.nav-list a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--color-primary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease-in-out;
}
.nav-list a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.burger-menu {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}
.burger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--color-headings);
    margin: 5px 0;
    transition: all 0.3s ease-in-out;
}

/* ==========================================================================
   5. HERO SECTION
   ========================================================================== */
.hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 90vh;
    padding: 100px 0;
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    text-align: center;
}

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

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

.hero-title {
    color: var(--color-text-light);
    font-size: 3.5rem;
    margin-bottom: var(--spacing-l);
    text-shadow: 2px 2px 5px rgba(0,0,0,0.5);
}

.hero-subtitle {
    color: var(--color-text-light);
    font-size: 1.25rem;
    margin-bottom: var(--spacing-xl);
}

/* ==========================================================================
   6. BUTTONS & FORMS (GLOBAL)
   ========================================================================== */
.button {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    padding: var(--spacing-m) var(--spacing-xl);
    border: 2px solid var(--color-border);
    border-radius: var(--border-radius-sharp);
    transition: var(--transition-fast);
    box-shadow: var(--shadow-hard);
}
.button:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow-hard-hover);
    text-decoration: none;
}
.button:active {
    transform: translate(2px, 2px);
    box-shadow: none;
}

.button-primary {
    background-color: var(--color-primary);
    color: var(--color-text-light);
}
.button-primary:hover {
    background-color: var(--color-primary-dark);
    color: var(--color-text-light);
}
.button-secondary {
    background-color: var(--color-white);
    color: var(--color-text);
}
.button-secondary:hover {
    background-color: var(--color-background-light);
    color: var(--color-text);
}

/* Forms */
.contact-form {
    max-width: 700px;
    margin: 0 auto;
}
.form-group {
    margin-bottom: var(--spacing-l);
}
.form-group label {
    display: block;
    font-family: var(--font-heading);
    font-weight: 500;
    margin-bottom: var(--spacing-s);
}
.form-group input,
.form-group textarea {
    width: 100%;
    padding: var(--spacing-m);
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--color-text);
    background-color: var(--color-white);
    border: 2px solid var(--color-border);
    border-radius: var(--border-radius-sharp);
    transition: var(--transition-fast);
}
.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.3);
}

/* ==========================================================================
   7. CARDS (GLOBAL)
   ========================================================================== */
.card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background-color: var(--color-white);
    border: 2px solid var(--color-border);
    box-shadow: var(--shadow-hard);
    transition: var(--transition-fast);
    height: 100%;
    overflow: hidden;
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: 8px 8px 0 var(--color-border);
}

.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: var(--spacing-l);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}
.card-content h3 {
    font-size: 1.5rem;
}

/* ==========================================================================
   8. SPECIFIC SECTION STYLES
   ========================================================================== */
/* Features */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--spacing-xl);
}

/* About Us */
.about-container {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    align-items: center;
    gap: var(--spacing-xxl);
}
.about-image-wrapper img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border: 2px solid var(--color-border);
    box-shadow: var(--shadow-hard);
}

/* Awards Carousel */
.carousel-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: var(--spacing-l) 0;
}
.carousel-container::before, .carousel-container::after {
    content: '';
    position: absolute;
    top: 0;
    width: 100px;
    height: 100%;
    z-index: 2;
}
.carousel-container::before {
    left: 0;
    background: linear-gradient(to right, var(--color-background-dark), transparent);
}
.carousel-container::after {
    right: 0;
    background: linear-gradient(to left, var(--color-background-dark), transparent);
}
.carousel-track {
    display: flex;
    width: calc(150px * 16); /* 8 items * 2 for loop */
    animation: scroll 30s linear infinite;
}
.carousel-slide {
    width: 150px;
    margin: 0 var(--spacing-l);
    flex-shrink: 0;
}
.carousel-slide img {
    width: 100%;
    height: auto;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: var(--transition-fast);
}
.carousel-slide img:hover {
    filter: grayscale(0%);
    opacity: 1;
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-150px * 8)); }
}

/* Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-l);
}
.gallery-item {
    overflow: hidden;
    border: 2px solid var(--color-border);
    box-shadow: var(--shadow-hard);
    aspect-ratio: 1 / 1;
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease, filter 0.4s ease;
}
.gallery-item:hover img {
    transform: scale(1.1);
    filter: brightness(1.1);
}

/* Press */
.press-grid {
    display: grid;
    gap: var(--spacing-xl);
    max-width: 900px;
    margin: 0 auto;
}
.press-quote {
    background: var(--color-background-light);
    border-left: 5px solid var(--color-primary);
    padding: var(--spacing-l);
    margin: 0;
    border-radius: var(--border-radius-soft);
}
.press-quote p {
    font-size: 1.2rem;
    font-style: italic;
    margin-bottom: var(--spacing-m);
}
.press-quote footer {
    font-weight: 700;
    color: var(--color-headings);
}

/* External Resources */
.resources-list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-m);
}
.resource-link {
    display: block;
    padding: var(--spacing-l);
    border: 2px solid var(--color-border);
    background: var(--color-white);
    color: var(--color-text);
    text-decoration: none;
    box-shadow: var(--shadow-hard);
    transition: var(--transition-fast);
}
.resource-link:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow-hard-hover);
    color: var(--color-text);
    background-color: #fcfcfc;
}
.resource-link strong {
    display: block;
    font-family: var(--font-heading);
    color: var(--color-primary);
    font-size: 1.25rem;
    margin-bottom: var(--spacing-s);
}

/* ==========================================================================
   9. FOOTER
   ========================================================================== */
.footer {
    background-color: var(--color-headings);
    color: var(--color-text-light);
    padding: var(--spacing-xl) 0 0;
}
.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-xl);
    padding-bottom: var(--spacing-xl);
}
.footer-column h4 {
    font-family: var(--font-heading);
    color: var(--color-white);
    margin-bottom: var(--spacing-m);
}
.footer-column p {
    color: #ccc;
}
.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-column li {
    margin-bottom: var(--spacing-s);
}
.footer-column a {
    color: #ccc;
    text-decoration: none;
}
.footer-column a:hover {
    color: var(--color-white);
    text-decoration: underline;
}
.footer-bottom {
    border-top: 1px solid #444;
    padding: var(--spacing-l) 0;
    text-align: center;
    font-size: 0.9rem;
    color: #aaa;
}

/* ==========================================================================
   10. SPECIFIC PAGE STYLES
   ========================================================================== */
.page-section {
    padding-top: calc(var(--header-height) + var(--spacing-xxl));
}
.page-banner {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    margin-bottom: var(--spacing-xl);
    border: 2px solid var(--color-border);
}
.legal-content h2 {
    margin-top: var(--spacing-xl);
}
.legal-content p {
    margin-bottom: var(--spacing-m);
}

.success-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - var(--header-height));
    text-align: center;
}
.success-page img {
    margin-bottom: var(--spacing-l);
}

/* ==========================================================================
   11. ANIMATIONS & MODAL
   ========================================================================== */
/* Scroll Animations */
[data-scroll-animation] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
[data-scroll-animation].is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Modal */
.modal-container {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
}
.modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}
#modal-image {
    width: 100%;
    height: auto;
    max-width: 800px;
    max-height: 80vh;
    object-fit: contain;
}
.modal-close-button {
    position: absolute;
    top: -40px;
    right: 0;
    color: var(--color-white);
    font-size: 3rem;
    font-weight: bold;
    cursor: pointer;
}

/* ==========================================================================
   12. RESPONSIVE MEDIA QUERIES
   ========================================================================== */
@media (max-width: 992px) {
    .about-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .about-image-wrapper {
        margin-bottom: var(--spacing-xl);
        max-width: 500px;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    .hero-title { font-size: 2.8rem; }
    h2 { font-size: 2rem; }

    .main-nav {
        display: none;
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background-color: var(--color-white);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
    }
    .main-nav.is-open {
        display: flex;
        transform: translateX(0);
    }
    .nav-list {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-xl);
    }
    .nav-list a {
        font-size: 1.5rem;
    }
    .burger-menu {
        display: block;
    }

    .burger-menu.is-active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .burger-menu.is-active span:nth-child(2) {
        opacity: 0;
    }
    .burger-menu.is-active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    :root {
        --spacing-xl: 32px;
        --spacing-xxl: 48px;
    }
    .hero-title { font-size: 2.2rem; }
    .hero-subtitle { font-size: 1.1rem; }
    .features-grid { grid-template-columns: 1fr; }
}