@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;600;700&family=Outfit:wght@300;400;600;700&display=swap');

:root {
    --primary: #004aad;
    --primary-cyan: #00d4ff;
    --primary-deep: #002d6a;
    --accent: #ffd700;
    --text: #1a1a1a;
    --text-light: #ffffff;
    --bg-light: #f4faff;
    --card-shadow: 0 15px 35px rgba(0, 74, 173, 0.1);
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    
    /* Flag URLs */
    --url-br: url('https://flagcdn.com/w40/br.png');
    --url-us: url('https://flagcdn.com/w40/us.png');
    --url-es: url('https://flagcdn.com/w40/es.png');
}

/* --- Flag System --- */
.flag {
    display: inline-flex;
    width: 20px;
    height: 14px;
    background-size: cover;
    background-position: center;
    border-radius: 2px;
    vertical-align: middle;
    flex-shrink: 0;
}

.flag.br { background-image: var(--url-br); }
.flag.us { background-image: var(--url-us); }
.flag.es { background-image: var(--url-es); }

.flag.small {
    width: 16px;
    height: 11px;
    margin-right: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html, body {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: 'Outfit', sans-serif;
    color: var(--text);
    background: var(--bg-light);
    line-height: 1.6;
}

h1, h2, h3, h4 {
    font-family: 'Fredoka', sans-serif;
    font-weight: 700;
}

/* --- Parallax Hero --- */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(rgba(0, 45, 106, 0.7), rgba(0, 45, 106, 0.4)), url('https://images.unsplash.com/photo-1709120395858-92f1c7c577f5?&w=640') center/cover no-repeat fixed;
    text-align: center;
    color: var(--text-light);
    padding: 0 20px;
}

.hero-content {
    z-index: 2;
    max-width: 900px;
    position: relative;
}

.hero h1 {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    color: var(--text-light);
    line-height: 1.1;
    margin-bottom: 20px;
    text-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 1.5rem;
    color: var(--primary-cyan);
    margin-bottom: 40px;
    font-weight: 600;
}

/* --- Navigation --- */
.navbar {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1100px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(15px);
    border-radius: 50px;
    padding: 10px 30px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 30px;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: var(--transition);
}

.navbar.scrolled {
    width: 100%;
    max-width: none;
    border-radius: 0;
    top: 0;
    transform: translateX(-50%);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    z-index: 1001;
    flex-shrink: 0;
}

.nav-logo img { height: 50px; }

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--primary-deep);
    cursor: pointer;
    z-index: 1001;
    transition: var(--transition);
    margin-left: auto;
}

.nav-menu {
    display: flex;
    align-items: center;
    transition: var(--transition);
    flex: 1;
}

.nav-links {
    display: flex;
    gap: 25px;
    list-style: none;
    margin-left: 20px;
}

.nav-links a {
    text-decoration: none;
    color: var(--primary-deep);
    font-weight: 600;
    transition: var(--transition);
}

.nav-links a:hover { color: var(--primary-cyan); }

.nav-links .login-link {
    color: var(--primary-cyan) !important;
    font-weight: 700;
}

.lang-selector {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-left: auto;
}

.lang-link {
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.lang-link.active {
    border-bottom: 2px solid var(--primary-cyan);
    padding-bottom: 2px;
}

.lang-flag {
    width: 20px;
    border-radius: 2px;
}

.navbar .btn-modern {
    padding: 10px 25px;
    font-size: 0.9rem;
    margin-left: 20px;
}

@media (max-width: 992px) {
    .mobile-menu-toggle {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: 0;
        width: 100%;
        height: 100vh;
        background: white;
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
        gap: 30px;
        z-index: 1000;
        padding: 80px 40px;
        transform: translateX(100%);
        visibility: hidden;
        transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), visibility 0.4s;
    }

    .nav-menu.active {
        transform: translateX(0);
        visibility: visible;
    }

    .nav-links {
        flex-direction: column;
        align-items: flex-start;
        gap: 25px;
    }

    .nav-links a {
        font-size: 1.5rem;
    }

    .lang-selector {
        margin-left: 0;
        gap: 20px;
    }

    .lang-link .flag {
        width: 30px;
        height: 21px;
    }

    .navbar .btn-modern {
        margin-left: 0;
        width: auto;
        justify-content: flex-start;
    }
}

/* --- Hero Helpers --- */
.cyan-text { color: var(--primary-cyan); }

.hero-cta-group {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-video {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border: 2px solid white !important;
}

/* --- Sections General --- */
section {
    padding: 120px 0;
    position: relative;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
}

.bg-white { background: white; }
.bg-light { background: var(--bg-light); }

.section-header {
    text-align: center;
    margin-bottom: 80px;
}

.section-header h2 {
    font-size: 3.5rem;
    color: var(--primary-deep);
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 50px;
    height: 6px;
    background: var(--primary-cyan);
    border-radius: 3px;
}

.section-subtitle {
    margin-top: 20px;
    font-size: 1.2rem;
}

/* --- About Section --- */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(400px, 100%), 1fr));
    gap: 80px;
    align-items: center;
}

.label-uppercase {
    color: var(--primary);
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.section-header-h2 {
    font-size: 3rem;
    margin: 20px 0;
    color: var(--primary-deep);
}

.about-text {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.about-stats {
    display: flex;
    gap: 30px;
}

.stat-item h3 {
    color: var(--primary-cyan);
    font-size: 2rem;
}

.about-featured-logo {
    width: 100%;
    max-width: 450px;
    filter: drop-shadow(0 20px 40px rgba(0, 74, 173, 0.2));
    transition: var(--transition);
}

.about-featured-logo:hover {
    transform: scale(1.05) rotate(2deg);
}

/* --- Culture Section --- */
.culture-section {
    position: relative;
    padding: 120px 0;
    background: linear-gradient(rgba(0, 26, 61, 0.9), rgba(0, 45, 106, 0.85)), 
                url('https://images.unsplash.com/photo-1618329027137-a520b57c6606?&w=640') center/cover no-repeat fixed;
    color: white;
}

.culture-section .section-header h2 {
    color: white;
}

.culture-section .section-subtitle {
    color: var(--primary-cyan);
    opacity: 1;
}

/* --- Pillars --- */
.pillar-scroll {
    display: flex;
    overflow-x: auto;
    gap: 25px;
    padding: 40px 0;
    scrollbar-width: none;
}

.pillar-scroll::-webkit-scrollbar { display: none; }

.pillar-item {
    flex: 0 0 320px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    padding: 40px;
    border-radius: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.pillar-item:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--primary-cyan);
}

.pillar-item h3 {
    color: var(--primary-cyan);
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.pillar-item p {
    font-size: 1rem;
    opacity: 0.9;
}

.pillar-item:nth-child(even) { 
    background: rgba(0, 212, 255, 0.1);
}

/* --- Schedule --- */
.schedule-section {
    background: var(--bg-light);
    padding: 60px 0;
}

.schedule-header {
    text-align: center;
    margin-bottom: 40px;
}

.schedule-header h2 {
    font-size: 2.5rem;
    color: var(--primary-deep);
}

.schedule-header p {
    margin-top: 10px;
    font-size: 1.1rem;
    opacity: 0.8;
}

.table-responsive {
    background: white;
    padding: 30px;
    border-radius: 30px;
    box-shadow: var(--card-shadow);
    overflow-x: auto;
}

.schedule-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.schedule-table thead tr { border-bottom: 2px solid var(--bg-light); }

.schedule-table th {
    padding: 15px;
    color: var(--primary-deep);
}

.schedule-table td { padding: 15px; }

.schedule-table td:first-child { font-weight: 700; }

.schedule-table tbody tr { border-bottom: 1px solid var(--bg-light); }

.table-flag {
    width: 16px;
    vertical-align: middle;
    margin-right: 5px;
}

/* --- Mobile Schedule Cards --- */
.schedule-mobile-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.schedule-card {
    background: white;
    padding: 25px;
    border-radius: 30px;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

.schedule-card:hover {
    transform: translateY(-5px);
}

.schedule-card.highlight {
    border: 2px solid var(--primary-cyan);
}

.schedule-card h3 {
    color: var(--primary-deep);
    margin-bottom: 15px;
    border-bottom: 2px solid var(--bg-light);
    padding-bottom: 10px;
}

.schedule-card .period {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.schedule-card .label {
    font-weight: 700;
    color: var(--primary);
    width: 70px;
    margin-right: 10px;
}

.schedule-card .flag {
    margin-right: 8px;
}

.stream-links {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* --- Visibility Utilities --- */
.desktop-only {
    display: block;
}

.mobile-only {
    display: none;
}

@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }
    
    .mobile-only {
        display: grid !important;
    }
}

.btn-youtube {
    background: #FF0000 !important;
    color: white !important;
    border: none !important;
}

.btn-youtube img {
    width: 18px;
    vertical-align: middle;
    margin-right: 5px;
    border-radius: 2px;
}

/* --- Mission --- */
.mission-section {
    position: relative;
    padding: 120px 0;
    overflow: hidden;
    background: #002d6a; /* Fallback color */
}

.mission-section::before {
    content: '';
    position: absolute;
    top: -20%;
    left: 0;
    width: 100%;
    height: 140%;
    background: linear-gradient(rgba(0, 45, 106, 0.8), rgba(0, 74, 173, 0.8)), 
                url('https://images.unsplash.com/photo-1585597647935-7082208be5a8?&w=640') center/cover no-repeat;
    z-index: 0;
    will-change: transform;
    transform: translateY(var(--parallax-y, 0));
}

.mission-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: 40px;
}

.glass-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 50px;
    border-radius: 40px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    transition: var(--transition);
    text-align: center;
    color: white;
}

.glass-card:hover { 
    transform: translateY(-15px);
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--primary-cyan);
}

.mission-card i {
    font-size: 3.5rem;
    color: var(--primary-cyan);
    margin-bottom: 25px;
    filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.5));
}

.glass-card h3 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: white;
}

.glass-card p {
    font-size: 1.1rem;
    line-height: 1.7;
    opacity: 0.9;
}

.mission-card.dark {
    background: rgba(0, 45, 106, 0.4);
}

/* --- Join Us --- */
.join-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 60px;
}

.join-header h2 {
    font-size: 3.5rem;
    color: var(--primary-deep);
}

.join-header p {
    font-size: 1.2rem;
    margin-top: 20px;
}

.join-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(350px, 100%), 1fr));
    gap: 30px;
}

.join-card {
    background: white;
    padding: 40px;
    border-radius: 40px;
    box-shadow: var(--card-shadow);
}

.join-card.featured { border: 3px solid var(--primary-cyan); }

.join-card h3 {
    color: var(--primary);
    margin-bottom: 20px;
}

.join-card p {
    margin-bottom: 20px;
}

.join-card p:last-of-type {
    margin-bottom: 30px;
    font-size: 0.95rem;
    opacity: 0.8;
}

.btn-volunteer {
    margin-top: 20px;
    width: 100%;
    justify-content: center;
}

.other-ways-box {
    margin-top: 50px;
    text-align: center;
}

.other-ways-title {
    font-weight: 600;
    color: var(--primary-deep);
}

.other-ways-list {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.other-ways-link {
    display: inline-block;
    padding: 8px 16px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-weight: 500;
    color: #334155;
    text-decoration: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.other-ways-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-cyan);
}

.other-ways-sep { opacity: 0.3; }

/* --- Wave --- */
.wave-container {
    position: relative;
    width: 100%;
    line-height: 0;
    overflow: hidden;
}

.wave-container svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 150px;
}

.wave-container svg path {
    fill: var(--bg-light);
}

/* --- Buttons --- */
.btn-modern {
    padding: 18px 45px;
    border-radius: 50px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    font-family: 'Fredoka', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 20px rgba(0, 74, 173, 0.3);
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn-modern:hover {
    background: var(--primary-deep);
    transform: scale(1.05);
    box-shadow: 0 15px 30px rgba(0, 74, 173, 0.4);
}

/* --- Utility Classes --- */
.text-center { text-align: center; }
.section-compact { padding: 60px 0; }
.grid-centered-single {
    grid-template-columns: 1fr;
    max-width: 800px;
    margin: 0 auto;
}
.hero-compact {
    height: auto;
    padding: 150px 20px 60px;
}
.footer-compact {
    background: #001a3d;
    padding: 40px 0;
    border-top-left-radius: 40px;
    border-top-right-radius: 40px;
}
.no-border { border: none !important; }
.p-0 { padding: 0 !important; }
.w-100 { width: 100%; }
.justify-center { justify-content: center; }

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 30px;
    box-shadow: var(--card-shadow);
}
.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* --- Presentation --- */
.presentation-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* --- Narration Teaser --- */
.narration-teaser {
    width: 100%;
    max-width: 600px;
    margin: 0 auto 30px;
    border-radius: 40px;
    box-shadow: var(--card-shadow);
    display: block;
}

/* --- Animations --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- Footer --- */
footer {
    background: #001a3d;
    color: white;
    padding: 100px 0 40px;
    border-top-left-radius: 80px;
    border-top-right-radius: 80px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 50px;
    margin-bottom: 80px;
}

.footer-logo {
    height: 60px;
    margin-bottom: 20px;
}

.footer-desc { opacity: 0.7; }

.footer-nav-title { margin-bottom: 20px; }

.footer-nav-list {
    list-style: none;
    opacity: 0.7;
}

.footer-nav-list a {
    color: white;
    text-decoration: none;
}

.social-circle {
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-right: 15px;
    transition: var(--transition);
}

.social-circle:hover {
    background: var(--primary-cyan);
    transform: translateY(-5px);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 30px;
    text-align: center;
}

.footer-copy {
    opacity: 0.5;
    font-size: 0.9rem;
}

.footer-channels {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 0.8rem;
    opacity: 0.4;
}

.footer-channels a {
    color: inherit;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.footer-flag {
    width: 16px;
    border-radius: 2px;
    margin-right: 8px;
}
