/* =========================================
   VARIABLES & THEME SETUP
   Colores inspirados en el logo: Azul, Verde, Blanco, Dorado
========================================= */
:root {
    /* Paleta de Colores Principal */
    --primary: #0a4d9c; /* Azul Royal del escudo */
    --primary-light: #2c75d4;
    --secondary: #008f39; /* Verde de las hojas */
    --accent: #d4af37; /* Dorado de las cintas */
    --accent-light: #f3e5ab;
    
    /* Modo Oscuro Moderno (Fondo base) */
    --bg-dark: #0f172a; /* Azul muy oscuro casi negro */
    --bg-darker: #020617;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    
    /* Tipografía */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Espaciado y otros */
    --border-radius: 20px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* =========================================
   RESET & BASE STYLES
========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-darker);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

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

a {
    color: var(--text-main);
    text-decoration: none;
    transition: var(--transition);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 6rem 0;
}

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

/* =========================================
   ANIMATED BACKGROUND
========================================= */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(circle at 50% 50%, var(--bg-dark) 0%, var(--bg-darker) 100%);
}

.blob {
    position: absolute;
    filter: blur(80px);
    opacity: 0.4;
    border-radius: 50%;
    animation: float 20s infinite alternate cubic-bezier(0.45, 0.05, 0.55, 0.95);
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: var(--primary);
    animation-delay: 0s;
}

.blob-2 {
    bottom: -20%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: var(--secondary);
    animation-delay: -5s;
}

.blob-3 {
    top: 40%;
    left: 60%;
    width: 40vw;
    height: 40vw;
    background: var(--accent);
    opacity: 0.2;
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(5%, 10%) scale(1.1); }
}

/* =========================================
   GLASSMORPHISM UTILITIES
========================================= */
.glass-header, .glass-card, .glass-footer {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.glass-card {
    border-radius: var(--border-radius);
    padding: 2.5rem;
    transition: var(--transition);
}

.glass-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

/* =========================================
   TYPOGRAPHY UTILITIES
========================================= */
.text-gradient {
    background: linear-gradient(to right, #4facfe 0%, #00f2fe 100%);
    background: linear-gradient(to right, var(--accent), var(--accent-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* =========================================
   BUTTONS
========================================= */
.btn-primary, .btn-secondary {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-family: var(--font-heading);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary), var(--primary-light));
    color: white;
    box-shadow: 0 4px 15px rgba(10, 77, 156, 0.4);
}

.btn-primary:hover {
    background: linear-gradient(45deg, var(--primary-light), var(--primary));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(10, 77, 156, 0.6);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--glass-border);
    color: var(--text-main);
}

.btn-secondary:hover {
    background: var(--glass-bg);
    border-color: var(--text-main);
}

.btn-primary.large {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

/* =========================================
   HEADER & NAVIGATION
========================================= */
.glass-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    border-radius: 0 0 20px 20px;
    transition: var(--transition);
}

.glass-header.scrolled {
    padding: 0.5rem 0;
    background: rgba(15, 23, 42, 0.85);
}

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

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    line-height: 1.1;
    text-transform: uppercase;
}

.logo-text strong {
    color: var(--accent);
    font-size: 1.5rem;
}

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

.nav-links a:not(.btn-primary) {
    font-weight: 500;
    position: relative;
    padding-bottom: 5px;
}

.nav-links a:not(.btn-primary)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: var(--transition);
}

.nav-links a:not(.btn-primary):hover::after,
.nav-links a:not(.btn-primary).active::after {
    width: 100%;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
}

.mobile-toggle span {
    width: 30px;
    height: 3px;
    background-color: var(--text-main);
    border-radius: 3px;
    transition: var(--transition);
}

/* =========================================
   HERO SECTION
========================================= */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 6rem;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

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

.badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(212, 175, 55, 0.15);
    color: var(--accent);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

/* Placeholder temporal para el logo */
.logo-placeholder {
    height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(10, 77, 156, 0.2), rgba(0, 143, 57, 0.2));
    border: 2px dashed var(--accent);
}

.shield {
    width: 150px;
    height: 180px;
    background: var(--primary);
    clip-path: polygon(50% 0%, 100% 20%, 100% 70%, 50% 100%, 0% 70%, 0% 20%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 2rem;
}

.stripes {
    position: absolute;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(90deg, transparent, transparent 25px, rgba(255,255,255,0.2) 25px, rgba(255,255,255,0.2) 50px);
}

.ball {
    font-size: 4rem;
    z-index: 2;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.5));
}

.logo-label {
    font-family: var(--font-heading);
    font-weight: 800;
    color: var(--accent);
    font-size: 1.5rem;
}

/* =========================================
   GRID LAYOUTS & SECTIONS
========================================= */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

/* ABOUT / FEATURES */
.feature-card {
    text-align: center;
}

.feature-card .icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--accent-light);
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* HISTORY */
.history-card {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(10, 77, 156, 0.1) 100%);
}

.quote {
    font-size: 1.25rem;
    font-style: italic;
    border-left: 4px solid var(--accent);
    padding-left: 1.5rem;
    margin: 2rem 0;
    color: var(--accent-light);
}

.history-stats {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
}

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

.stat-number {
    display: block;
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--primary-light);
    line-height: 1;
}

.stat-label {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* GALLERY */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.image-item {
    padding: 0;
    overflow: hidden;
    height: 250px;
}

.img-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(10, 77, 156, 0.2), rgba(0, 143, 57, 0.2));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: var(--transition);
}

.img-placeholder .icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    opacity: 0.7;
}

.image-item:hover .img-placeholder {
    background: linear-gradient(135deg, rgba(10, 77, 156, 0.4), rgba(0, 143, 57, 0.4));
    transform: scale(1.05);
}

/* PROGRAMS */
.program-card {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 1.5rem;
}

.program-img {
    width: 100px;
    height: 100px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.program-img .emoji {
    font-size: 2.5rem;
}

.program-info h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.program-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* CTA */
.cta-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border: none;
    padding: 5rem 2rem;
}

.cta-card h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.cta-card p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

.cta-card .btn-primary {
    background: var(--accent);
    color: var(--bg-darker);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.4);
}

/* =========================================
   FOOTER
========================================= */
.glass-footer {
    padding: 4rem 0 2rem;
    margin-top: 4rem;
    border-radius: 30px 30px 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand h3 {
    color: var(--accent);
    font-size: 1.5rem;
}

.footer-brand p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.footer-links h4, .footer-contact h4 {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

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

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a, .footer-contact p {
    color: var(--text-muted);
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* =========================================
   ANIMATIONS UTILS (JS triggers)
========================================= */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.fade-in.appear {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

/* =========================================
   RESPONSIVE DESIGN
========================================= */
@media (max-width: 992px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-text h1 {
        font-size: 3rem;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .history-card {
        grid-template-columns: 1fr;
    }
    
    .history-stats {
        flex-direction: row;
        justify-content: space-around;
        border-top: 1px solid var(--glass-border);
        padding-top: 2rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none; /* Hide on mobile by default */
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--glass-bg);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 2rem 0;
        border-top: 1px solid var(--glass-border);
        border-bottom: 1px solid var(--glass-border);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .mobile-toggle {
        display: flex;
    }
    
    .grid-3, .grid-2 {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .history-stats {
        flex-direction: column;
    }
}
