/* ==========================================================================
   1. ROOT VARIABLES & GLOBAL STYLES
   ========================================================================== */

:root {
    /* Bright Color Scheme */
    --primary-color: #E6007A; /* Vibrant Magenta */
    --secondary-color: #FFD600; /* Bold Yellow */
    --accent-color: #00BFFF; /* Deep Sky Blue */
    
    /* Neutral & Text Colors */
    --background-color: #FDFDFD;
    --surface-color: #FFFFFF;
    --text-color: #222222;
    --text-light-color: #FFFFFF;
    --border-color: #222222;
    --shadow-color: var(--border-color);

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

    /* Spacing & Layout */
    --header-height: 80px;
    --container-width: 1200px;
    --container-padding: 1rem;
    --section-padding: 5rem 0;

    /* Effects */
    --border-radius: 0px; /* Neo-brutalism: sharp edges */
    --transition-speed: 0.3s;
}

*,
*::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;
    overflow-x: hidden;
}

/* ==========================================================================
   2. TYPOGRAPHY & UTILITIES
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-header);
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--text-color);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

h1 { font-size: 4rem; }
h2 { font-size: 3rem; }
h3 { font-size: 1.75rem; }
p { margin-bottom: 1rem; }
a { color: var(--primary-color); text-decoration: none; transition: color var(--transition-speed) ease; }
a:hover { color: var(--border-color); }
img { max-width: 100%; height: auto; display: block; }

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

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

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

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

/* Column helpers (basic grid system) */
.columns {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.column {
    flex: 1;
    min-width: 300px;
}

.is-two-thirds {
    flex-grow: 2;
    margin: 0 auto;
}

/* ==========================================================================
   3. COMPONENTS
   ========================================================================== */

/* --- Buttons (Global) --- */
.btn, button, input[type="submit"] {
    display: inline-block;
    padding: 0.8rem 2rem;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    border: 2px solid var(--border-color);
    background-color: transparent;
    transition: all var(--transition-speed) ease;
    box-shadow: 4px 4px 0 var(--shadow-color);
}

.btn:hover, button:hover, input[type="submit"]:hover {
    box-shadow: 0 0 0 var(--shadow-color);
    transform: translate(4px, 4px);
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--text-light-color);
}
.btn-primary:hover {
    background-color: var(--primary-color); /* Keep color on hover */
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--text-color);
}
.btn-secondary:hover {
    background-color: var(--secondary-color); /* Keep color on hover */
}

/* --- Cards --- */
.card {
    background-color: var(--surface-color);
    border: 2px solid var(--border-color);
    box-shadow: 6px 6px 0 var(--shadow-color);
    height: 100%;
    display: flex;
    flex-direction: column;
    text-align: center;
    align-items: center; /* Center items for flex column */
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.card:hover {
    transform: translate(-3px, -3px);
    box-shadow: 9px 9px 0 var(--shadow-color);
}

.card .card-image {
    width: 100%;
    height: 250px; /* Fixed height for image containers */
    overflow: hidden;
    border-bottom: 2px solid var(--border-color);
    margin: 0 auto; /* Center block element */
}

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

.card .card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.card .card-content h3 {
    margin-bottom: 1rem;
}
.card .card-content p {
    flex-grow: 1;
}

/* --- Forms --- */
.contact-form {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    position: relative;
}

.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 1rem;
    font-family: var(--font-body);
    font-size: 1rem;
    border: 2px solid var(--border-color);
    background-color: var(--surface-color);
    color: var(--text-color);
    transition: box-shadow var(--transition-speed) ease;
}

.contact-form input:focus, .contact-form textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--secondary-color);
}

.contact-form label {
    position: absolute;
    top: 1rem;
    left: 1rem;
    color: var(--text-color);
    opacity: 0.6;
    pointer-events: none;
    transition: all var(--transition-speed) ease;
}

.contact-form input:focus + label,
.contact-form input:not(:placeholder-shown) + label,
.contact-form textarea:focus + label,
.contact-form textarea:not(:placeholder-shown) + label {
    top: -0.75rem;
    left: 0.75rem;
    font-size: 0.8rem;
    background-color: var(--background-color);
    padding: 0 0.5rem;
    opacity: 1;
    color: var(--primary-color);
}

/* ==========================================================================
   4. HEADER & FOOTER
   ========================================================================== */

/* --- Header --- */
.site-header {
    background-color: var(--background-color);
    border-bottom: 2px solid var(--border-color);
    padding: 0 1rem;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    height: var(--header-height);
}

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

.logo {
    font-family: var(--font-header);
    font-size: 2rem;
    font-weight: 900;
    color: var(--text-color);
}
.logo:hover {
    color: var(--primary-color);
}

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

.nav-links a {
    font-weight: 600;
    color: var(--text-color);
    position: relative;
    padding-bottom: 5px;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform var(--transition-speed) ease;
}

.nav-links a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.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(--text-color);
    margin: 5px 0;
    transition: all var(--transition-speed) ease;
}

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

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

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

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

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

.footer-column a {
    color: var(--text-light-color);
    opacity: 0.8;
}

.footer-column a:hover {
    opacity: 1;
    color: var(--secondary-color);
}

.social-links a {
    display: block;
    margin-bottom: 0.5rem;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 2rem;
    opacity: 0.7;
}

/* ==========================================================================
   5. SECTION STYLES
   ========================================================================== */

main {
    padding-top: var(--header-height); /* Offset for fixed header */
}

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

.hero-content {
    max-width: 800px;
}

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

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

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

.progress-indicator {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin: 0 auto 1.5rem auto;
    display: grid;
    place-items: center;
    background: conic-gradient(var(--primary-color) 0deg, var(--background-color) 0deg);
    transition: background 1.5s ease-out;
}

.progress-value {
    font-family: var(--font-header);
    font-size: 2.5rem;
    font-weight: 900;
}

/* --- Innovation Section --- */
.info-card {
    text-align: center;
    padding: 2rem;
    border: 2px solid var(--border-color);
    height: 100%;
}

.animated-icon-container {
    height: 80px;
    margin: 0 auto 1.5rem auto;
}

/* --- External Resources Section --- */
.resources-section {
    background-color: var(--secondary-color);
}

.resource-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.resource-link {
    display: inline-block;
    padding: 0.8rem 2rem;
    font-weight: 600;
    color: var(--text-color);
    background-color: var(--surface-color);
    border: 2px solid var(--border-color);
    box-shadow: 4px 4px 0 var(--shadow-color);
    transition: all var(--transition-speed) ease;
}

.resource-link:hover {
    color: var(--text-color);
    box-shadow: 0 0 0 var(--shadow-color);
    transform: translate(4px, 4px);
}

/* ==========================================================================
   6. PAGE-SPECIFIC & ANIMATION STYLES
   ========================================================================== */
   
/* --- Content Pages (Privacy, Terms) --- */
.content-page {
    padding-top: calc(var(--header-height) + 4rem); /* Header offset + extra padding */
    padding-bottom: 4rem;
}
.content-page h1 {
    margin-bottom: 2rem;
}
.content-page h2 {
    margin-top: 2rem;
}

/* --- Success Page --- */
.success-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: calc(100vh - var(--header-height));
}
.success-page h1 {
    color: var(--primary-color);
}

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

/* --- Scroll-triggered Animations (Initial State) --- */
.section > .container > * {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.section > .container > *.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children in grids/columns */
.columns.is-visible .column,
.stats-grid.is-visible .stat-item,
.news-section .columns.is-visible .card {
    transition-delay: calc(0.2s * var(--i, 0));
}

/* ==========================================================================
   7. RESPONSIVE DESIGN
   ========================================================================== */

@media (max-width: 768px) {
    h1 { font-size: 3rem; }
    .hero-title { font-size: 3.5rem; }
    h2 { font-size: 2.5rem; }
    .section { padding: 3rem 0; }
    main { padding-top: calc(var(--header-height) - 10px); }

    .site-header { height: 70px; }

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

    .nav-links.active {
        transform: translateX(0);
    }

    .nav-links a {
        font-size: 2rem;
    }

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

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