/* style.css */

/* --- TABLE OF CONTENTS ---
1.  CSS Variables (Root)
2.  Global Styles & Resets
3.  Utility Classes
4.  Header & Navigation
5.  Hero Section
6.  General Section Styling
7.  Card Component Styles
8.  Specific Section Styles
    - Mission
    - Services
    - Sustainability
    - Team
    - Gallery
    - Careers
    - External Resources
    - Contact Form
9.  Footer
10. Specific Page Styles (Privacy, Terms, Success)
11. Animations & Scroll Effects
12. Responsive Design (Media Queries)
--------------------------- */

/* 1. CSS Variables (Root) */
:root {
    /* Analogous Color Scheme (Blue-based) */
    --color-primary-dark: #0f172a; /* Deep Navy - For dark backgrounds */
    --color-primary: #0D47A1;      /* Rich Blue - Main interactive color, buttons */
    --color-primary-light: #64b5f6;/* Light Blue - Links, accents */
    --color-secondary: #00796B;     /* Teal - Secondary accent */
    --color-tertiary: #4A148C;     /* Deep Purple - Tertiary accent */

    /* Neutral & Text Colors */
    --color-background-light: #f8f9fa; /* Off-white for light sections */
    --color-background-dark: var(--color-primary-dark);
    --color-text-light: #f1f5f9;      /* Light grey/white for text on dark backgrounds */
    --color-text-dark: #212529;      /* Very dark grey for text on light backgrounds */
    --color-text-muted: #6c757d;      /* Muted text color */
    --color-border: rgba(255, 255, 255, 0.1);

    /* Fonts */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Merriweather', serif;

    /* Sizing & Spacing */
    --spacing-unit: 8px;
    --container-width: 1200px;
    --header-height: 80px;

    /* Biomorphic & Creative Design Elements */
    --border-radius-soft: 20px;
    --border-radius-sharp: 8px;
    --shadow-light: 0 4px 15px rgba(0, 0, 0, 0.05);
    --shadow-medium: 0 8px 30px rgba(13, 71, 161, 0.2);
    --transition-smooth: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* 2. Global Styles & Resets */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.3;
    color: var(--color-text-dark);
}

h1 { font-size: 3rem; margin-bottom: 1rem; }
h2 { font-size: 2.5rem; margin-bottom: 2rem; }
h3 { font-size: 1.75rem; margin-bottom: 1rem; }
p { margin-bottom: 1rem; }

a {
    color: var(--color-primary-light);
    text-decoration: none;
    transition: var(--transition-smooth);
}

a:hover {
    color: var(--color-secondary);
    text-decoration: underline;
}

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

ul {
    list-style: none;
}

/* 3. Utility Classes */
.container {
    max-width: var(--container-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* Global Button Styles */
.cta-button, button[type="submit"] {
    display: inline-block;
    background: linear-gradient(45deg, var(--color-primary), var(--color-secondary));
    color: white;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    padding: 15px 35px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 121, 107, 0.3);
    transition: var(--transition-smooth);
}

.cta-button:hover, button[type="submit"]:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 121, 107, 0.4);
    color: white;
    text-decoration: none;
}

/* 4. Header & Navigation */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    background-color: transparent;
    transition: background-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.main-header.scrolled {
    background-color: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-medium);
}

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

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

.main-nav ul {
    display: flex;
    gap: 2rem;
}

.main-nav a {
    color: var(--color-text-light);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    position: relative;
    padding: 0.5rem 0;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-primary-light);
    transition: width 0.3s ease;
}

.main-nav a:hover::after {
    width: 100%;
}

.burger-menu {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}
.burger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 5px 0;
    transition: var(--transition-smooth);
}

/* 5. Hero Section */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed; /* Parallax effect */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.5), rgba(15, 23, 42, 0.8));
}

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

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 800;
    color: white;
}

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

/* 6. General Section Styling */
.content-section, .content-section-dark {
    padding: 100px 0;
}

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

.content-section-dark h2, .content-section-dark h3 {
    color: var(--color-text-light);
}

.section-title {
    text-align: center;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 1rem;
}

.section-subtitle {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem auto;
    font-size: 1.1rem;
    color: var(--color-text-muted);
}
.content-section-dark .section-subtitle {
    color: rgba(255, 255, 255, 0.7);
}

/* 7. Card Component Styles */
.card {
    background-color: white;
    border-radius: var(--border-radius-soft);
    box-shadow: var(--shadow-medium);
    overflow: hidden;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    height: 100%; /* Ensure cards in a grid have the same height */
}

.content-section-dark .card {
    background-color: #1e293b; /* Slightly lighter than main dark bg */
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 40px rgba(13, 71, 161, 0.25);
}

.card-image {
    width: 100%;
    height: 250px; /* Fixed height for consistent card appearance */
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Crucial for consistent image sizing */
    transition: transform 0.4s ease;
}

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

.card-content {
    padding: 2rem;
    text-align: center;
    flex-grow: 1; /* Allows content to fill space */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card-content h3 {
    color: var(--color-primary);
}
.content-section-dark .card-content h3 {
     color: var(--color-primary-light);
}

/* 8. Specific Section Styles */

/* Mission & Sustainability */
.mission-content, .sustainability-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 4rem;
}

/* Reverse order for sustainability */
.sustainability-content .sustainability-image-container {
    order: 2;
}
.sustainability-content .sustainability-text {
    order: 1;
}

.mission-image-container img, .sustainability-image-container img {
    border-radius: var(--border-radius-soft);
    box-shadow: var(--shadow-medium);
}

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

/* Team */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}
.team-grid .card-content span {
    color: var(--color-secondary);
    font-family: var(--font-heading);
    display: block;
    margin-top: -0.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

/* Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}
.gallery-item img {
    border-radius: var(--border-radius-soft);
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-light);
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.gallery-item:hover img {
    transform: scale(1.05);
    box-shadow: var(--shadow-medium);
}

/* Careers */
.careers-list .career-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.05);
    padding: 1.5rem 2rem;
    border-radius: var(--border-radius-sharp);
    margin-bottom: 1rem;
    border-left: 5px solid var(--color-secondary);
    transition: background-color 0.3s ease;
}
.careers-list .career-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}
.career-item .career-info h3 { margin-bottom: 0.25rem; }
.career-item .career-info span { color: var(--color-text-muted); }
.career-item .apply-button {
    background: var(--color-secondary);
    padding: 10px 25px;
    border-radius: var(--border-radius-sharp);
    text-decoration: none;
    color: white;
}
.career-item .apply-button:hover {
    background: var(--color-primary);
    transform: none;
    box-shadow: none;
}


/* External Resources */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}
.resource-card {
    display: block;
    padding: 2rem;
    background-color: white;
    border: 1px solid #e9ecef;
    border-radius: var(--border-radius-sharp);
    transition: var(--transition-smooth);
}
.resource-card:hover {
    border-color: var(--color-primary-light);
    transform: translateY(-5px);
    box-shadow: var(--shadow-light);
    text-decoration: none;
}
.resource-card h4 {
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}
.resource-card p {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-bottom: 0;
}


/* Contact Form */
.contact-form {
    max-width: 700px;
    margin: 0 auto;
}
.form-group {
    position: relative;
    margin-bottom: 2.5rem;
}
.form-group input, .form-group textarea {
    width: 100%;
    padding: 15px;
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--color-border);
    color: var(--color-text-light);
    font-size: 1rem;
    font-family: var(--font-body);
    transition: border-color 0.3s ease;
}
.form-group textarea {
    resize: vertical;
    min-height: 120px;
}
.form-group label {
    position: absolute;
    top: 15px;
    left: 5px;
    color: var(--color-text-muted);
    pointer-events: none;
    transition: var(--transition-smooth);
}
.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-bottom-color: var(--color-secondary);
}
.form-group input:focus + label, 
.form-group textarea:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:not(:placeholder-shown) + label {
    top: -20px;
    left: 0;
    font-size: 0.8rem;
    color: var(--color-secondary);
}
.contact-form button[type="submit"] { margin-top: 1rem; }

/* Toggle Switch */
.toggle-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #444;
    transition: .4s;
    border-radius: 28px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}
input:checked + .slider {
    background-color: var(--color-secondary);
}
input:checked + .slider:before {
    transform: translateX(22px);
}

/* 9. Footer */
.main-footer {
    background-color: var(--color-primary-dark);
    color: var(--color-text-light);
    padding: 60px 0 30px 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}
.footer-column h4 {
    font-family: var(--font-heading);
    color: white;
    margin-bottom: 1rem;
}
.footer-column p { color: var(--color-text-muted); }
.footer-column ul { padding: 0; }
.footer-column ul li { margin-bottom: 0.5rem; }
.footer-column ul a {
    color: var(--color-text-muted);
}
.footer-column ul a:hover {
    color: var(--color-primary-light);
    text-decoration: none;
}
.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

/* 10. Specific Page Styles */
.page-content-wrapper {
    padding: calc(var(--header-height) + 60px) 0 60px 0;
}
.page-content-wrapper .container {
    max-width: 800px;
}
.page-content-wrapper h1 {
    margin-bottom: 2rem;
}

.success-page-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: var(--color-background-dark);
    color: var(--color-text-light);
}
.success-page-container h1 {
    color: white;
}
.success-page-container .cta-button {
    margin-top: 2rem;
}

/* 11. Animations & Scroll Effects */
[data-scroll-effect] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.165, 0.84, 0.44, 1), transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

[data-scroll-effect].is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* 12. Responsive Design */
@media (max-width: 992px) {
    .mission-content, .sustainability-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .sustainability-content .sustainability-image-container {
        order: 1; /* Reset order for stacking */
    }
    .sustainability-content .sustainability-text {
        order: 2;
    }
}

@media (max-width: 768px) {
    html { font-size: 15px; }

    /* Header & Mobile Nav */
    .main-nav {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(15, 23, 42, 0.98);
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
    .main-nav.is-open { display: flex; }
    .main-nav ul {
        flex-direction: column;
        text-align: center;
        gap: 2.5rem;
    }
    .main-nav 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);
    }
    
    .content-section, .content-section-dark { padding: 60px 0; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .footer-column ul { display: inline-block; text-align: center; }

    .career-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}