/* style.css */

/* ---------------------------------- */
/*          CSS Variables             */
/* ---------------------------------- */
:root {
    /* Color Palette: Complementary (Deep Teal & Warm Amber) */
    --primary-color: #0d47a1;  /* Deep Blue */
    --secondary-color: #ffc107; /* Amber/Yellow */
    --accent-color: #ff6f00;   /* Bright Orange for CTAs */
    --background-light: #f5f5dc; /* Beige/Cream Paper */
    --background-dark: #212121;  /* Dark Charcoal */
    --text-light: #f5f5f5;
    --text-dark: #333333;
    --text-headings: #222222;
    --border-color: rgba(0, 0, 0, 0.1);

    /* Typography */
    --font-primary: 'Oswald', sans-serif;
    --font-secondary: 'Nunito', sans-serif;

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

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

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

body {
    font-family: var(--font-secondary);
    line-height: 1.7;
    color: var(--text-dark);
    background-color: var(--background-light);
    overflow-x: hidden;
}

/* Page transition wrapper */
#page-transition-wrapper {
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
}

#page-transition-wrapper.fade-out {
    opacity: 0;
}

/* ---------------------------------- */
/*          Typography                */
/* ---------------------------------- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: 700;
    color: var(--text-headings);
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

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

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

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

/* ---------------------------------- */
/*          Layout & Utilities        */
/* ---------------------------------- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.is-two-thirds {
    max-width: 66.66%;
    margin: 0 auto;
}

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

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-headings);
}

.section-title.light-text {
    color: var(--text-light);
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.section-subtitle {
    text-align: center;
    margin-top: -2.5rem;
    margin-bottom: 3rem;
    font-size: 1.1rem;
    color: #666;
}

.section-subtitle.light-text {
    color: var(--text-light);
    opacity: 0.9;
}

.textured-bg {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.parallax-bg {
    background-attachment: fixed; /* Basic parallax effect */
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* ---------------------------------- */
/*          Header & Navigation       */
/* ---------------------------------- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    background-color: rgba(245, 245, 220, 0.8); /* Semi-transparent beige */
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.site-header.scrolled {
    padding: 0.5rem 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

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

.logo a {
    font-family: var(--font-primary);
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

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

.main-nav a {
    font-family: var(--font-primary);
    font-weight: 400;
    font-size: 1.1rem;
    text-transform: uppercase;
    color: var(--text-dark);
    position: relative;
    padding: 0.5rem 0;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

.burger-menu {
    display: none;
    cursor: pointer;
    background: transparent;
    border: none;
    z-index: 1001;
}

.burger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-dark);
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* ---------------------------------- */
/*          Hero Section              */
/* ---------------------------------- */
.hero-section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    color: #FFFFFF; /* White text as required */
}

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

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

.hero-title {
    color: #FFFFFF;
    margin-bottom: 1rem;
}

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

/* ---------------------------------- */
/*      Global Buttons & Links        */
/* ---------------------------------- */
.cta-button,
.submit-button,
button {
    display: inline-block;
    padding: 1rem 2.5rem;
    font-family: var(--font-primary);
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--background-dark);
    background-color: var(--secondary-color);
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.cta-button:hover,
.submit-button:hover,
button:hover {
    background-color: var(--accent-color);
    color: var(--text-light);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    text-decoration: none;
}

.read-more-link {
    display: inline-block;
    margin-top: 1rem;
    font-weight: 700;
    color: var(--accent-color);
    text-transform: uppercase;
}

.read-more-link:hover {
    text-decoration: underline;
    color: var(--primary-color);
}


/* ---------------------------------- */
/*          Cards                     */
/* ---------------------------------- */
.card {
    background-color: #ffffff;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.card-image {
    width: 100%;
    height: 200px; /* Fixed height for consistent card appearance */
    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(--card-padding);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card-content h3 {
    margin-bottom: 0.75rem;
    color: var(--primary-color);
}


/* ---------------------------------- */
/*       Section-Specific Styles      */
/* ---------------------------------- */

/* History */
#historia p {
    font-size: 1.1rem;
    text-align: center;
}

/* Statistics Slider */
.custom-slider-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.slider-wrapper {
    display: flex;
    overflow: hidden;
}

.slide {
    min-width: 100%;
    transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: none;
}
.slide.active {
    display: block;
}

.stat-number {
    font-family: var(--font-primary);
    font-size: 4rem;
    color: var(--accent-color);
    font-weight: 700;
    margin: 0.5rem 0;
}

.slider-controls {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
}

.prev-slide, .next-slide {
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 2rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    line-height: 40px;
    text-align: center;
}
.prev-slide { margin-left: -25px; }
.next-slide { margin-right: -25px; }

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

/* Media/Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.gallery-item {
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease, filter 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
    filter: brightness(0.8);
}


/* Research */
.research-item {
    background: #fff;
    padding: 2rem;
    border-left: 5px solid var(--primary-color);
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

/* External Resources */
.resource-list {
    list-style: none;
    text-align: center;
}
.resource-list li {
    margin-bottom: 1rem;
}
.resource-list a {
    font-size: 1.2rem;
    font-weight: 600;
    position: relative;
    display: inline-block;
    padding: 0.25rem 0;
}
.resource-list a::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--accent-color);
    transform-origin: bottom right;
    transition: transform 0.25s ease-out;
}
.resource-list a:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* Contact Form */
.contact-form {
    max-width: 700px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.1);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

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

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--border-radius);
    font-family: var(--font-secondary);
    font-size: 1rem;
    color: var(--text-light);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.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.4);
}

/* ---------------------------------- */
/*          Footer                    */
/* ---------------------------------- */
.site-footer {
    background-color: var(--background-dark);
    color: var(--text-light);
    padding: 4rem 0 2rem;
}

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

.footer-column h4 {
    font-family: var(--font-primary);
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.footer-column p, .footer-column ul {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
}

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

.footer-column li {
    margin-bottom: 0.75rem;
}

.footer-column a {
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.3s;
}

.footer-column a:hover {
    color: var(--secondary-color);
    text-decoration: none;
}

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

/* ---------------------------------- */
/*          Static Pages              */
/* ---------------------------------- */
.static-page-content {
    padding-top: calc(var(--header-height) + 3rem);
    padding-bottom: 3rem;
}

.success-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
    background-color: var(--background-light);
}

.success-page .card {
    max-width: 500px;
}

/* ---------------------------------- */
/*          Responsive Design         */
/* ---------------------------------- */
@media (max-width: 992px) {
    h1 { font-size: 2.8rem; }
    h2 { font-size: 2rem; }
    .is-two-thirds { max-width: 85%; }
}

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

    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background-color: var(--background-light);
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        display: flex;
        align-items: center;
        justify-content: center;
        transition: right 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    }
    .main-nav.active {
        right: 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.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .burger-menu.active span:nth-child(2) {
        opacity: 0;
    }
    .burger-menu.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .hero-title { font-size: 2.5rem; }
    .hero-subtitle { font-size: 1.1rem; }
    
    .is-two-thirds { max-width: 100%; }

    .slider-controls { display: none; } /* Hide controls on mobile, rely on swipe */
}

@media (max-width: 480px) {
    html { font-size: 14px; }
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
}