/* ============================================================
   VARIABLES SEMÁNTICAS
   ============================================================ */
:root {
  /* Paleta base */
  --color-text-primary:   #0a1628;
  --color-gold:           #e8b323;
  --color-gold-light:     #f5d06a;
  --color-blue:           #1a3abf;
  --color-white:          #ffffff;
  --color-text-muted:     #6b7280;
  --color-surface:        #f4f5f8;
  --color-border:         rgba(0,0,0,0.08);

  /* Aliases semánticos (para facilitar mantenimiento) */
  --text-primary:   var(--color-text-primary);
  --text-muted:     var(--color-text-muted);
  --accent:         var(--color-gold);
  --accent-light:   var(--color-gold-light);
  --surface-alt:    var(--color-surface);
  --border:         var(--color-border);
  --max-width:      1200px;
}

/* ============================================================
   RESET Y BASE
   ============================================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: 'Montserrat', sans-serif;
  background: var(--color-white);
  color: var(--text-primary);
  font-size: 16px;
  line-height: 1.55;
}

/* ============================================================
   ANIMACIONES
   Respetan prefers-reduced-motion
   ============================================================ */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.3} }
@keyframes spin  { to { transform: rotate(360deg); } }

.fade-up {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .fade-up,
  .fade-up.visible {
    opacity: 1;
    transform: none;
    transition: none;
  }
  @keyframes pulse { 0%,100%{opacity:1} }
  @keyframes spin  { to { transform: none; } }
}

/* ============================================================
   FOCO VISIBLE (accesibilidad teclado)
   ============================================================ */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  background: var(--text-primary);
  position: sticky; top: 0; z-index: 200;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.navbar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}
.navbar-logo {
  font-family: 'Oswald', sans-serif;
  font-size: 1.2rem;
  color: var(--color-white);
  letter-spacing: 1px;
  text-decoration: none;
}
.navbar-logo span { color: var(--accent); }
.navbar-links {
  display: flex;
  gap: 28px;
  list-style: none;
}
.navbar-links a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.3px;
  transition: color 0.2s;
  padding: 4px 0;
}
.navbar-links a:hover,
.navbar-links a:focus-visible { color: var(--accent); }

/* Botón hamburger — oculto en desktop */
.navbar-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  width: 36px;
  height: 36px;
}
.navbar-toggle span {
  display: block;
  height: 2px;
  background: rgba(255,255,255,0.7);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.navbar-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.navbar-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 600px) {
  .navbar-toggle { display: flex; }
  .navbar-links {
    display: none;
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: var(--text-primary);
    flex-direction: column;
    gap: 0;
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 8px 0 16px;
    z-index: 100;
  }
  .navbar-links.open { display: flex; }
  .navbar-links li a {
    display: block;
    padding: 12px 24px;
    font-size: 0.95rem;
  }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  background: var(--text-primary);
  padding: 80px 24px 72px;
  position: relative;
  overflow: hidden;
  text-align: center;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 60% 0%, rgba(232,179,35,0.08) 0%, transparent 65%);
  pointer-events: none;
}
.hero-inner {
  max-width: 720px;
  margin: 0 auto;
  position: relative;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(232,179,35,0.12);
  border: 1px solid rgba(232,179,35,0.35);
  color: var(--accent-light);
  padding: 5px 16px; border-radius: 100px;
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
  margin-bottom: 24px;
  animation: fade-up 0.6s ease both;
}
.pulse-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #22c55e; flex-shrink: 0;
  animation: pulse 1.5s infinite;
}
.hero h1 {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(2.8rem, 6vw, 5rem);
  line-height: 1;
  color: var(--color-white);
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  animation: fade-up 0.7s 0.1s ease both;
}
.hero h1 em { color: var(--accent); font-style: normal; }
.hero-project {
  font-family: 'Oswald', sans-serif;
  font-size: 1.1rem;
  color: rgba(255,255,255,0.4);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 24px;
  animation: fade-up 0.7s 0.2s ease both;
}
.hero-desc {
  color: rgba(255,255,255,0.65);
  font-size: 1rem;
  max-width: 500px;
  margin: 0 auto;
  animation: fade-up 0.7s 0.3s ease both;
  line-height: 1.7;
}
.gold-rule { border: none; border-top: 1px solid rgba(232,179,35,0.2); margin: 0; }

/* ============================================================
   BARRA DE ESTADO
   ============================================================ */
.status-bar {
  background: var(--text-primary);
  border-top: 1px solid rgba(255,255,255,0.06);
}
.status-bar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: stretch;
}
.status-item {
  flex: 1;
  text-align: center;
  padding: 20px 16px;
  border-right: 1px solid rgba(255,255,255,0.06);
}
.status-item:last-child { border-right: none; }
.status-label {
  font-size: 0.68rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin-bottom: 4px;
}
.status-value {
  font-family: 'Oswald', sans-serif;
  font-size: 1.6rem;
  color: var(--accent);
  line-height: 1;
}

/* ============================================================
   LAYOUT DE SECCIONES
   ============================================================ */
.section { padding: 64px 24px; }
.section-alt { background: var(--surface-alt); }
.section-inner { max-width: var(--max-width); margin: 0 auto; }

.section-header { margin-bottom: 40px; }
.section-eyebrow {
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--accent); margin-bottom: 8px;
}
.section-title {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.1; color: var(--text-primary);
}
.section-desc {
  margin-top: 10px;
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 560px;
}

/* ============================================================
   LÍNEA DE TIEMPO
   ============================================================ */
.timeline {
  position: relative;
  padding-left: 28px;
  max-width: 860px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 0; top: 8px; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--accent), rgba(232,179,35,0.05));
}
.timeline-card {
  position: relative;
  margin-bottom: 28px;
  background: var(--color-white);
  border-radius: 14px;
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0,0,0,0.05);
  transition: box-shadow 0.2s;
}
.timeline-card:hover { box-shadow: 0 6px 28px rgba(0,0,0,0.1); }
.timeline-card:last-child { margin-bottom: 0; }
.timeline-card::before {
  content: '';
  position: absolute;
  left: -32px; top: 22px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--color-white);
  box-shadow: 0 0 0 1px var(--accent);
}
.card-meta {
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: 14px;
}
.card-title {
  font-family: 'Oswald', sans-serif;
  font-size: 1.15rem; line-height: 1.2;
  color: var(--text-primary); flex: 1;
  font-weight: 500;
}
.card-date {
  font-size: 0.68rem; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase;
  color: var(--text-muted);
  background: var(--surface-alt);
  padding: 3px 10px; border-radius: 100px;
  white-space: nowrap; flex-shrink: 0;
}
.card-body { padding: 16px 20px; }
.card-desc {
  font-size: 0.9rem; color: #374151;
  line-height: 1.65; margin-bottom: 16px;
  white-space: pre-line;
}

/* Galería responsive — botones accesibles */
.card-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 6px;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 14px;
}
.gallery-thumb {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: block;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 0;
}
.gallery-thumb img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: opacity 0.2s, transform 0.2s;
}
.gallery-thumb:hover img,
.gallery-thumb:focus-visible img { opacity: 0.88; transform: scale(1.02); }
.gallery-thumb:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  position: relative;
  z-index: 1;
}

.btn-video {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.82rem; font-weight: 700;
  color: var(--color-blue); text-decoration: none;
}
.btn-video svg { width: 18px; height: 18px; }
.btn-video:hover,
.btn-video:focus-visible { opacity: 0.75; }

/* ============================================================
   DOCUMENTOS
   ============================================================ */
.doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}
.doc-item {
  display: flex; align-items: center; gap: 16px;
  background: var(--color-white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  text-decoration: none; color: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.doc-item:hover,
.doc-item:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(232,179,35,0.12);
}
.doc-icon {
  width: 44px; height: 44px;
  background: rgba(26,58,191,0.07);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.doc-icon svg { width: 22px; height: 22px; color: var(--color-blue); }
.doc-info { flex: 1; min-width: 0; }
.doc-name {
  font-weight: 700; font-size: 0.92rem;
  color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.doc-meta { font-size: 0.74rem; color: var(--text-muted); margin-top: 3px; }
.doc-download {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--surface-alt);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: background 0.2s;
}
.doc-item:hover .doc-download,
.doc-item:focus-visible .doc-download { background: var(--accent); }
.doc-download svg { width: 15px; height: 15px; color: var(--text-muted); }
.doc-item:hover .doc-download svg,
.doc-item:focus-visible .doc-download svg { color: var(--text-primary); }

/* ============================================================
   ESTADOS VACÍOS Y LOADER
   ============================================================ */
.empty-state {
  text-align: center; padding: 60px 24px;
  color: var(--text-muted);
}
.empty-state-icon { font-size: 3rem; opacity: 0.35; margin-bottom: 14px; }
.empty-state p { font-size: 0.9rem; line-height: 1.7; }

.loader {
  display: flex; align-items: center; justify-content: center;
  padding: 48px 0; gap: 12px;
  color: var(--text-muted); font-size: 0.88rem;
}
.loader-spinner {
  width: 20px; height: 20px;
  border: 2px solid rgba(0,0,0,0.08);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .loader-spinner { animation: none; border-color: var(--accent); }
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background: var(--text-primary);
  color: rgba(255,255,255,0.3);
  text-align: center;
  padding: 36px 24px;
  font-size: 0.8rem;
  line-height: 1.8;
  letter-spacing: 0.3px;
}
footer span { color: var(--accent-light); }

/* ============================================================
   LIGHTBOX
   ============================================================ */
#lightbox {
  display: none; position: fixed; inset: 0;
  background: rgba(5,10,20,0.96);
  z-index: 999;
  flex-direction: column;
  align-items: center; justify-content: center;
  padding: 20px;
}
#lightbox.open { display: flex; }
#lb-img {
  max-width: 100%; max-height: 78vh;
  object-fit: contain; border-radius: 4px;
}
#lb-cap {
  margin-top: 16px; color: rgba(255,255,255,0.6);
  font-size: 0.85rem; text-align: center;
}
#lb-close {
  position: absolute; top: 20px; right: 20px;
  background: rgba(255,255,255,0.1); border: none; color: white;
  width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
  font-size: 1.2rem;
  display: flex; align-items: center; justify-content: center;
}
#lb-close:hover,
#lb-close:focus-visible { background: rgba(255,255,255,0.2); }

#lb-prev,
#lb-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,0.12); border: none; color: white;
  width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
  font-size: 1.4rem;
  display: flex; align-items: center; justify-content: center;
}
#lb-prev { left: 16px; }
#lb-next { right: 16px; }
#lb-prev:hover, #lb-prev:focus-visible,
#lb-next:hover, #lb-next:focus-visible { background: rgba(255,255,255,0.25); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .section { padding: 48px 20px; }
  .hero { padding: 60px 20px 56px; }
  .status-bar-inner { flex-wrap: wrap; }
  .status-item {
    flex: 1 1 33%;
    border-right: 1px solid rgba(255,255,255,0.06);
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  .doc-grid { grid-template-columns: 1fr; }
  .timeline { padding-left: 20px; }
  #lb-prev { left: 6px; }
  #lb-next { right: 6px; }
}
@media (max-width: 480px) {
  .card-gallery { grid-template-columns: repeat(2, 1fr); }
  .status-item { flex: 1 1 50%; }
}

/* ============================================================
   VIDEO EMBED
   ============================================================ */
.video-wrap {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  border-radius: 10px;
  overflow: hidden;
  margin-top: 12px;
}
.video-wrap iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
}

/* ============================================================
   LOGO NAVBAR
   ============================================================ */
.navbar-logo-img {
  height: 40px;
  width: auto;
}
