/* ================================================================
   SEDEDE - Estilos Globales (Tema Claro Tricolor)
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  /* Colores de la Bandera */
  --clr-red:          #DA251D;
  --clr-yellow:       #F9E11E;
  --clr-green:        #007A33;
  --clr-green-dark:   #005F27;
  --clr-red-dark:     #B31B15;
  /* Fondos modo claro */
  --clr-bg:           #FFFFFF;
  --clr-bg-2:         #F8FAFC;
  --clr-bg-3:         #F1F5F9;
  --clr-surface:      #FFFFFF;
  --clr-surface-2:    #F8FAFC;
  --clr-border:       #E2E8F0;
  --clr-border-gold:  #F9E11E;

  /* Variable heredada remapeada a verde institucional */
  --clr-gold:         var(--clr-green);
  --clr-gold-dark:    var(--clr-green-dark);
  --clr-gold-light:   #33955C;
  --clr-gold-glow:    rgba(0, 122, 51, 0.2);

  /* Texto oscuro para fondos claros */
  --clr-text:         #1E293B;
  --clr-text-muted:   #475569;
  --clr-text-faint:   #94A3B8;
  --clr-text-inverse: #FFFFFF;

  /* Estado */
  --clr-success:      #16A34A;
  --clr-error:        #DC2626;
  --clr-warning:      #D97706;
  --clr-info:         #2563EB;

  /* Tipografía */
  --font-display:     'Outfit', sans-serif;
  --font-body:        'Inter', sans-serif;

  /* Espaciado de Alta Gama (Whitespace) */
  --space-xs:   0.5rem;
  --space-sm:   1rem;
  --space-md:   2rem;
  --space-lg:   3rem;
  --space-xl:   5rem;
  --space-2xl:  8rem;
  --space-3xl:  12rem;

  /* Bordes */
  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-xl:  32px;
  --radius-full: 9999px;

  /* Sombras Premium */
  --shadow-sm:  0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-md:  0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
  --shadow-lg:  0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
  --shadow-glow: 0 0 15px rgba(0, 122, 51, 0.1);
  --shadow-hover: 0 25px 30px -5px rgba(0, 122, 51, 0.15), 0 10px 15px -5px rgba(0, 122, 51, 0.1);
  --shadow-gold: 0 4px 15px rgba(0, 122, 51, 0.25);

  --transition-fast:   0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow:   0.5s ease;
  --container-max: 1280px;
  --navbar-h:      100px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; scroll-padding-top: var(--navbar-h); max-width: 100%; overflow-x: hidden; }

body {
  font-family: var(--font-body);
  background-color: var(--clr-bg);
  color: var(--clr-text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  max-width: 100%;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  padding-top: var(--navbar-h);
  transition: background-color 0.4s ease, color 0.4s ease;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button, input, textarea, select { font-family: inherit; font-size: inherit; }
button { cursor: pointer; border: none; background: none; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); line-height: 1.1; font-weight: 800; color: var(--clr-green-dark); letter-spacing: -0.04em; margin-bottom: 0.5em; }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--clr-bg-2); }
::-webkit-scrollbar-thumb { background: var(--clr-border); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--clr-green); }

.container { width: 100%; max-width: var(--container-max); margin-inline: auto; padding-inline: var(--space-xl); }
.section { padding-block: var(--space-3xl); }
.section-sm { padding-block: var(--space-2xl); }

.text-gold   { color: var(--clr-green); }
.text-muted  { color: var(--clr-text-muted); }
.text-center { text-align: center; }

.section-header { text-align: center; margin-bottom: var(--space-2xl); }
.section-header .eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--clr-red);
  margin-bottom: var(--space-sm);
}
.section-header h2 { font-size: clamp(2rem, 4vw, 2.75rem); color: var(--clr-text); margin-bottom: var(--space-md); }
.section-header p { font-size: 1.1rem; color: var(--clr-text-muted); max-width: 600px; margin-inline: auto; }

/* Tricolor divider */
.divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--clr-red) 0%, var(--clr-yellow) 50%, var(--clr-green) 100%);
  border-radius: 2px;
  margin-inline: auto;
  margin-block: var(--space-md) calc(var(--space-md) + 5px);
  position: relative;
}
.divider::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 5px solid var(--clr-yellow);
}
.badge {
  display: inline-flex; align-items: center; gap: 0.3em; padding: 0.3em 0.75em; border-radius: var(--radius-full);
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
}
.badge-gold  { background: var(--clr-yellow); color: #000; border: 1px solid var(--clr-yellow); }
.badge-blue  { background: #DBEAFE; color: #1E40AF; border: 1px solid #BFDBFE; }
.badge-green { background: #DCFCE7; color: #166534; border: 1px solid #BBF7D0; }
.badge-red   { background: #FEE2E2; color: #991B1B; border: 1px solid #FECACA; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-xl); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-xl); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-xl); }

@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes shimmer { 0% { background-position: -1000px 0; } 100% { background-position: 1000px 0; } }

/* Clases de utilidad para Reveal Animations (Scroll) */
.reveal-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.reveal-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }

.skeleton {
  background: linear-gradient(90deg, #E2E8F0 25%, #F1F5F9 50%, #E2E8F0 75%);
  background-size: 1000px 100%; animation: shimmer 1.5s infinite; border-radius: var(--radius-sm);
}

.empty-state { text-align: center; padding: var(--space-3xl) var(--space-xl); background: var(--clr-bg-2); border-radius: var(--radius-lg); }

.empty-state p { color: var(--clr-text-muted); font-size: 1.1rem; }

#toast-container { position: fixed; top: calc(var(--navbar-h) + 1rem); right: 1rem; z-index: 9999; display: flex; flex-direction: column; gap: 0.5rem; pointer-events: none; }
.toast { pointer-events: all; display: flex; align-items: center; gap: 0.75rem; padding: 0.85rem 1.25rem; border-radius: var(--radius-md); font-size: 0.95rem; font-weight: 500; background: var(--clr-surface); box-shadow: var(--shadow-lg); border-left: 4px solid; animation: fadeInUp 0.3s ease; }
.toast-success { border-color: var(--clr-success); color: var(--clr-text); }
.toast-error   { border-color: var(--clr-error); color: var(--clr-text); }

.page-hero {
  padding-block: 4rem;
  background: var(--clr-bg-2);
  position: relative;
  overflow: hidden;
}

.page-hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--clr-red) 0%, var(--clr-yellow) 50%, var(--clr-green) 100%);
  box-shadow: 0 -2px 10px rgba(255, 204, 0, 0.2);
}

.page-hero h1 { font-size: clamp(2.5rem, 5vw, 3.5rem); margin-bottom: var(--space-sm); color: var(--clr-green-dark); }
.page-hero p { font-size: 1.2rem; color: var(--clr-text-muted); max-width: 600px; }

.breadcrumb { display: flex; align-items: center; gap: var(--space-sm); font-size: 0.9rem; color: var(--clr-text-muted); margin-bottom: var(--space-lg); font-weight: 500; }
.breadcrumb a { color: var(--clr-red); transition: color var(--transition-fast); }
.breadcrumb a:hover { color: var(--clr-red-dark); }

@media (max-width: 1024px) { .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) { .container { padding-inline: var(--space-lg); } .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .container { padding-inline: var(--space-md); } }

/* ================================================================
   Modo Oscuro (Obsidiana Mate)
   ================================================================ */
body.dark-theme {
  --clr-bg:           #0F172A;
  --clr-bg-2:         #1E293B;
  --clr-bg-3:         #0F172A;
  --clr-surface:      #1E293B;
  --clr-surface-2:    #334155;
  --clr-border:       #334155;
  --clr-text:         #F8FAFC;
  --clr-text-muted:   #94A3B8;
  --clr-text-inverse: #0F172A;
  --shadow-sm:        0 4px 6px -1px rgba(0, 0, 0, 0.5);
  --shadow-md:        0 10px 15px -3px rgba(0, 0, 0, 0.5);
  --shadow-lg:        0 20px 25px -5px rgba(0, 0, 0, 0.5);
}

.theme-toggle-btn {
  background: var(--clr-surface-2);
  color: var(--clr-text);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-full);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  cursor: pointer;
  transition: all var(--transition-normal);
}

.theme-toggle-btn:hover {
  background: var(--clr-border);
  transform: scale(1.05);
}

.theme-toggle-btn svg {
  width: 20px;
  height: 20px;
}

/* =========================================
   PRELOADER GSAP
   ========================================= */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--clr-bg);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Spotlight glow background - ULTRA NEON */
#preloader::before {
    content: '';
    position: absolute;
    width: 70vw;
    height: 70vw;
    background: radial-gradient(circle, rgba(0, 255, 0, 0.35) 0%, transparent 70%); /* Verde puro casi brillante */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 1;
}

body.dark-theme #preloader::before {
    background: radial-gradient(circle, rgba(255, 204, 0, 0.25) 0%, transparent 70%);
}

.preloader-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 90%;
    max-width: 800px;
}

/* LOGO OFICIAL RECONSTRUIDO EN CSS */
.official-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-bottom: 5rem;
}

.logo-top-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.logo-icon-box {
    position: relative;
    width: 130px;
    height: 130px;
    border: 5px solid var(--clr-text);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--clr-text);
    font-size: 5.5rem;
}

.logo-icon-box .bx-run {
    transform: translateX(-5px) skewX(-10deg);
}

.logo-icon-box .logo-ball {
    position: absolute;
    width: 14px;
    height: 14px;
    background: #00C853; /* Verde en modo claro */
    border-radius: 50%;
    bottom: 25px;
    right: 18px;
}

body.dark-theme .logo-icon-box .logo-ball {
    background: var(--clr-yellow); /* Amarillo en modo oscuro */
}

.logo-sedede-box {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.logo-line-top {
    height: 5px;
    background: #00C853; /* Verde en modo claro */
    width: 70%;
    margin-left: auto; /* A la derecha como en la imagen */
    margin-bottom: 5px;
}

body.dark-theme .logo-line-top {
    background: var(--clr-yellow);
}

.logo-title {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 6.5rem; /* Letra SEDEDE gigante */
    color: var(--clr-text);
    line-height: 1;
    letter-spacing: -2px;
}

.logo-line-bottom-container {
    display: flex;
    align-items: center;
    width: 100%;
    margin-bottom: 1.5rem;
}

.logo-line-left {
    flex-grow: 1;
    height: 5px;
    background: #00C853; /* Verde en modo claro */
}

body.dark-theme .logo-line-left,
body.dark-theme .logo-line-right {
    background: var(--clr-yellow);
}

.logo-line-notch {
    width: 36px;
    height: 18px;
    border: 5px solid #00C853; /* Verde en modo claro */
    border-top: none;
    border-radius: 0 0 20px 20px;
    transform: translateY(-2px);
}

body.dark-theme .logo-line-notch {
    border-color: var(--clr-yellow);
}

.logo-line-right {
    flex-grow: 1;
    height: 5px;
    background: #00C853; /* Verde en modo claro */
}

.logo-subtitle {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 2.2rem;
    color: var(--clr-text);
    text-align: center;
    line-height: 1.2;
}

/* Barra de Carga y Corredor */
.loader-track-container {
    width: 100%;
    position: relative;
    height: 60px; /* Más espacio vertical */
}

.loader-runner {
    position: absolute;
    bottom: 12px; /* Justo sobre la barra */
    left: 0;
    font-size: 3.5rem; /* Corredor gigante */
    color: #00FF00; /* Verde puro brillante */
    transform: translateX(-50%);
    text-shadow: 0 0 15px rgba(0, 255, 0, 0.8); /* Resplandor intenso */
}

body.dark-theme .loader-runner {
    color: var(--clr-yellow);
    text-shadow: 0 0 15px rgba(255, 204, 0, 0.8);
}

.loader-track {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 8px; /* Barra de 8px de grosor */
    background: rgba(0, 0, 0, 0.2); /* Track oscuro */
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.15); /* Efecto profundo */
}

body.dark-theme .loader-track {
    background: rgba(255,255,255,0.15);
    box-shadow: none;
}

.loader-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #00C853, #00FF00); /* Verde Ultra Neón */
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.9); /* Súper brillo fluorescente */
}

body.dark-theme .loader-bar {
    background: linear-gradient(90deg, #FFC107, #FFEA00); /* Amarillo neón */
    box-shadow: 0 0 20px rgba(255, 234, 0, 0.9);
}

/* Responsividad para el Loader (Móviles) */
@media (max-width: 768px) {
    .official-logo {
        transform: scale(0.5); /* Escala todo el logo a la mitad manteniendo la proporción */
        margin-bottom: 2rem;
    }
    .loader-runner {
        font-size: 2.5rem; /* Corredor más pequeño */
        bottom: 8px; /* Ajuste visual */
    }
}


/* Solucionar desbordamiento de textos largos (ej. correos en contacto) */
.contact-email, .contact-address, .contact-phone {
    overflow-wrap: break-word;
    word-break: break-word;
}
