/* ============================================= */
/*                   :ROOT                       */
/* ============================================= */

:root {
    /* Color Scheme: Complementary (Deep Teal & Gold) */
    --primary-color: #004d40; /* Deep, trustworthy teal green */
    --secondary-color: #ffc107; /* Warm, vibrant gold/amber */
    --background-color: #fdfaf6; /* Warm off-white */
    --surface-color: #ffffff; /* For cards and modals */
    --colored-section-bg: #f5f7f9; /* Light, cool gray for block contrast */
    --text-color: #333333; /* High-contrast dark gray */
    --text-light: #ffffff;
    --text-muted: #6c757d;
    --border-color: #e0e0e0;
    --shadow-color: rgba(0, 0, 0, 0.08);

    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Source Sans Pro', sans-serif;

    /* Spacing & Layout */
    --header-height: 80px;
    --container-padding: 1rem;
    --section-padding: 5rem 0;
    --card-border-radius: 8px;
}

/* ============================================= */
/*              GENERAL & RESET                  */
/* ============================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.7;
    padding-top: var(--header-height); /* Offset for fixed header */
}

/* ============================================= */
/*                  TYPOGRAPHY                   */
/* ============================================= */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.25rem; }

.section-title {
    text-align: center;
    margin-bottom: 1rem;
}

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

p { margin-bottom: 1rem; }
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}
a:hover { color: var(--secondary-color); }

/* ============================================= */
/*                LAYOUT & HELPERS               */
/* ============================================= */

.container {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
}

.section-block {
    padding: var(--section-padding);
}

.section-block-colored {
    padding: var(--section-padding);
    background-color: var(--colored-section-bg);
}

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

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

/* ============================================= */
/*              GLOBAL COMPONENTS                */
/* ============================================= */

/* --- Buttons --- */
.btn, button[type="submit"] {
    display: inline-block;
    padding: 14px 32px;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: var(--card-border-radius);
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary,
.contact-form button[type="submit"],
.newsletter-form button[type="submit"] {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    border-color: var(--secondary-color);
}

.btn-primary:hover,
.contact-form button[type="submit"]:hover,
.newsletter-form button[type="submit"]:hover {
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* --- Forms --- */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--card-border-radius);
    font-family: var(--font-body);
    font-size: 1rem;
    background-color: #fcfcfc;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.3);
}

/* --- Cards --- */
.card {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--card-border-radius);
    box-shadow: 0 5px 15px var(--shadow-color);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures image covers the area without distortion */
    transition: transform 0.4s ease;
}

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

.card-content {
    padding: 1.5rem;
    flex-grow: 1; /* Allows cards in a flex/grid row to have equal height */
}

/* ============================================= */
/*            SECTION-SPECIFIC STYLES            */
/* ============================================= */

/* --- Header --- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: rgba(253, 250, 246, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 5px var(--shadow-color);
    z-index: 1000;
    display: flex;
    align-items: center;
}

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

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

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

.main-nav a {
    font-weight: 600;
    position: relative;
    padding: 0.5rem 0;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    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: var(--primary-color);
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* --- Hero Section --- */
.hero-section {
    color: var(--text-light);
    height: calc(100vh - var(--header-height));
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    background-position: center;
    background-size: cover;
    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.3) 100%);
}

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

.hero-title {
    color: var(--text-light);
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    max-width: 800px;
    margin: 0 auto 2rem auto;
    color: rgba(255, 255, 255, 0.9);
}

/* --- Statistics Section --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-item .stat-number {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    color: var(--primary-color);
    font-weight: 700;
}

.stat-item .stat-label {
    font-size: 1.1rem;
    color: var(--text-muted);
}

/* --- Projects & Testimonials Sliders --- */
.slider-container {
    position: relative;
}

.custom-slider {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}
.custom-slider::-webkit-scrollbar { display: none; } /* Chrome, Safari */

.custom-slider > * {
    flex: 0 0 100%;
    scroll-snap-align: center;
    margin-right: 2rem;
}

.slider-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.slider-nav button {
    background-color: transparent;
    border: 2px solid var(--border-color);
    color: var(--primary-color);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-nav button:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

/* --- Team Section --- */
.team-card .card-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin: 2rem auto 1rem auto;
    border: 4px solid var(--surface-color);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.15);
}
.team-card .card-content {
    text-align: center;
}
.team-card h3 {
    margin-bottom: 0.25rem;
}
.team-card span {
    color: var(--text-muted);
    font-style: italic;
    display: block;
    margin-bottom: 1rem;
}

/* --- Testimonials Section --- */
.testimonial-item {
    background: var(--colored-section-bg);
    padding: 2.5rem;
    border-radius: var(--card-border-radius);
    text-align: center;
}

.testimonial-quote {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-style: italic;
    line-height: 1.5;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.testimonial-author {
    font-weight: 600;
    color: var(--text-muted);
}

/* --- News Section --- */
.news-date {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    display: block;
}
.read-more {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    color: var(--primary-color);
}
.read-more:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* --- Community (Newsletter) Section --- */
.newsletter-form {
    display: flex;
    justify-content: center;
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto;
}
.newsletter-form input {
    flex-grow: 1;
    border-radius: var(--card-border-radius);
}
.newsletter-form button {
    flex-shrink: 0;
}

/* --- External Resources --- */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}

.resource-card {
    background-color: var(--surface-color);
    padding: 1.5rem;
    border-left: 5px solid var(--secondary-color);
    border-radius: 4px;
    box-shadow: 0 4px 10px var(--shadow-color);
    transition: transform 0.3s ease;
}

.resource-card:hover {
    transform: translateY(-3px);
}

.resource-card h4 {
    margin-bottom: 0.5rem;
}

/* --- Contact Section --- */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    background: var(--surface-color);
    padding: 3rem;
    border-radius: var(--card-border-radius);
    box-shadow: 0 10px 30px var(--shadow-color);
}
.contact-info ul {
    list-style: none;
    padding: 0;
    margin-top: 1.5rem;
}
.contact-info li {
    margin-bottom: 1rem;
    line-height: 1.5;
}

/* --- Footer --- */
.site-footer {
    background-color: var(--primary-color);
    color: rgba(255, 255, 255, 0.8);
    padding: 4rem 0 0 0;
}
.site-footer a {
    color: rgba(255, 255, 255, 0.8);
}
.site-footer a:hover {
    color: var(--secondary-color);
}
.site-footer h4 {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    padding-bottom: 3rem;
}
.footer-col ul {
    list-style: none;
    padding: 0;
}
.footer-col li {
    margin-bottom: 0.75rem;
}
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem 0;
    text-align: center;
    font-size: 0.9rem;
}

/* ============================================= */
/*             PAGE-SPECIFIC STYLES              */
/* ============================================= */

/* --- Privacy, Terms Pages --- */
.static-page-container {
    padding: 4rem var(--container-padding);
    min-height: 80vh;
}

.static-page-container h1 {
    margin-bottom: 2rem;
}

.static-page-container h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

/* --- Success Page --- */
.success-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: calc(100vh - var(--header-height));
    padding: 2rem;
}

.success-container h1 {
    color: var(--primary-color);
}

.success-container p {
    color: var(--text-muted);
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

/* ============================================= */
/*             SCROLL ANIMATIONS                 */
/* ============================================= */

[data-anim] {
    opacity: 0;
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
[data-anim="fade-in"] { transform: scale(0.95); }
[data-anim="fade-in-up"] { transform: translateY(50px); }
[data-anim="fade-in-right"] { transform: translateX(-50px); }
[data-anim="fade-in-left"] { transform: translateX(50px); }

.is-visible[data-anim] {
    opacity: 1;
    transform: translate(0, 0) scale(1);
}

/* ============================================= */
/*                MEDIA QUERIES                  */
/* ============================================= */

@media (max-width: 992px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    .hero-title { font-size: 2.8rem; }
    .contact-wrapper {
        grid-template-columns: 1fr;
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 70px;
        --section-padding: 3rem 0;
    }

    h1 { font-size: 2.2rem; }
    .hero-title { font-size: 2.5rem; }

    /* --- Mobile Navigation --- */
    .main-nav {
        position: fixed;
        top: 0;
        right: 0;
        width: 100%;
        height: 100vh;
        background-color: var(--background-color);
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .main-nav.nav-active {
        transform: translateX(0);
    }
    
    .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);
    }
    
    .newsletter-form {
        flex-direction: column;
    }

    .custom-slider > * {
        margin-right: 1rem;
    }
}