/* ===== Reset & base ===== */
* { box-sizing: border-box; }
html, body { overflow-x: hidden; }

body {
  font-family: 'Segoe UI', sans-serif;
  background: linear-gradient(to bottom, #09090f, #0c0c18);
  margin: 0;
  padding: 0;
  color: #FFFFFF;
  animation: fadeIn 2s ease-in-out;
  line-height: 1.6;
}

@keyframes fadeIn { 0% { opacity: 0; } 100% { opacity: 1; } }

/* ===== Header / Navbar ===== */
.portada { padding: 20px; color: #ccc; }

.navbar {
  background: linear-gradient(to right, #0e0e18, #13131a);
  padding: 10px 20px;
  border-bottom: 3px solid #F9C74F;
}
.navbar .navbar-toggler { border-color: rgba(255,255,255,.25); }

/* Contenedor para centrar el menú */
.nav-inner { position: relative; }

/* Menú centrado absolutamente en desktop */
.center-nav {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%,-50%);
  display: flex; pointer-events: auto;
}
.top-nav { display: flex; align-items: center; gap: .25rem; }

.navbar-nav .nav-link {
  color: #FFFFFF;
  font-weight: 600;
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
  margin: 0 6px;
  padding: 6px 10px;
  border-radius: 6px;
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
  background: #F9C74F;
  color: #1C1C26;
  transform: translateY(-1px);
}
.navbar-nav .nav-link.active {
  background: #F9C74F;
  color: #1C1C26;
  border-radius: 6px;
  font-weight: 700;
}

/* Bloque derecha (solo reloj) */
.right-actions { margin-left: auto; }

/* Logo */
#logo {
  width: 48px;
  height: auto;
  border-radius: 50%;
  box-shadow: 0 0 10px #F9C74F;
  transition: transform 0.3s;
}
#logo:hover { transform: rotate(5deg) scale(1.06); }

/* ===== OFFCANVAS (menú móvil) ===== */
.offcanvas-custom{
  --bs-offcanvas-width: min(420px, 90vw);
  background: rgba(19, 19, 26, 0.88);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  color: #fff;
  border-left: 1px solid rgba(255,255,255,0.08);
}
@media (max-width: 576px) { .offcanvas-custom { --bs-offcanvas-width: 100vw; } }

.offcanvas-header { padding: 18px 18px 10px; }
.offcanvas-logo { width: 36px; height: 36px; border-radius: 50%; box-shadow: 0 0 8px #F9C74F; }
.offcanvas-title { font-weight: 700; color: #F9C74F; }

.mobile-nav { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.mobile-link {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-radius: 14px; text-decoration: none; color: #fff;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  border: 1px solid rgba(255,255,255,0.08); box-shadow: 0 2px 12px rgba(0,0,0,0.25);
  transform: translateX(12px); opacity: 0; animation: slideIn .45s ease forwards;
}
.mobile-link i { font-size: 1.15rem; }
.mobile-link span { font-weight: 600; letter-spacing: .2px; }
.mobile-link .arrow { opacity: .6; }

.mobile-link:hover { background: #F9C74F; color: #1c1c26; transform: translateX(0) scale(1.02); }
.mobile-link.active { background: #F9C74F; color: #1c1c26; }

.mobile-link:nth-child(1){ animation-delay: .05s; }
.mobile-link:nth-child(2){ animation-delay: .12s; }
.mobile-link:nth-child(3){ animation-delay: .19s; }
.mobile-link:nth-child(4){ animation-delay: .26s; }
.mobile-link:nth-child(5){ animation-delay: .33s; }

@keyframes slideIn { to { transform: translateX(0); opacity: 1; } }

.offcanvas-cta .btn { box-shadow: 0 6px 20px rgba(249, 199, 79, .25); border: none; }
.offcanvas-footer { border-top: 1px solid rgba(255,255,255,0.08); color: rgba(255,255,255,.9); }

/* ===== Imagen principal ===== */
.imagen-principal { margin-top: 10px; }
.imagen-principal img {
  display: block; max-width: 100%; width: 100%; height: auto;
  aspect-ratio: 16/9; object-fit: cover; object-position: center;
  margin: 0 auto 30px auto; border-radius: 12px;
  box-shadow: 0px 6px 20px rgba(0, 0, 0, 0.4); transition: transform 0.3s ease;
}
.imagen-principal img:hover { transform: scale(1.02); }

/* ===== Contenido principal ===== */
.contenido-principal { display: flex; gap: 20px; flex-wrap: wrap; padding: 20px 12px; }
.info-ciclo, .tabla-material {
  flex: 1 1 420px; background: #191922; padding: 22px; border-radius: 15px;
  box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.4); margin-bottom: 20px; transition: transform 0.2s ease;
}
.info-ciclo:hover, .tabla-material:hover { transform: translateY(-3px); }

.info-ciclo h2, .tabla-material h2 {
  font-size: clamp(1.35rem, 1.1rem + 1vw, 1.8rem); color: #F9C74F; margin-bottom: 15px; text-align: center;
  animation: fadeInTitle 1s ease-in-out;
}
@keyframes fadeInTitle { 0% { opacity: 0; } 100% { opacity: 1; } }

.info-ciclo { color: #ddd; border-left: 5px solid #E74C3C; padding-left: 15px; }
.info-ciclo h3 { color: #F9C74F; }

/* ===== CTA ===== */
.ubicacion {
  background: linear-gradient(to right, #141422, #1C1C26); color: #FFFFFF; padding: 20px;
  border-radius: 10px; box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.3); margin-top: 30px; text-align: center;
}
.ubicacion a {
  display: inline-block; background: #E74C3C; color: #FFFFFF; padding: 10px 22px; border-radius: 25px;
  text-decoration: none; transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease; font-weight: bold;
}
.ubicacion a:hover { background: #F9C74F; color: #1c1c26; transform: translateY(-1px) scale(1.03); }

/* ===== Tabla ===== */
.table-wrapper { width: 100%; margin-top: 16px; }

.tabla-renovable {
  width: 100%; border-collapse: collapse; animation: fadeIn 2s ease; table-layout: fixed; border: 1px solid #2c2c35;
}
.tabla-renovable thead th { background: #2E2E3A; color: #F9C74F; padding: 12px; text-align: center; border-bottom: 1px solid #2c2c35; }
.tabla-renovable tbody td {
  background: #1F1F2A; color: #E0E0E0; padding: 12px; text-align: center; border-top: 1px solid #2c2c35; word-wrap: break-word;
}

@media (max-width: 640px) {
  .tabla-renovable { border: none; }
  .tabla-renovable thead { position: absolute; left: -9999px; height: 0; width: 0; overflow: hidden; }
  .tabla-renovable, .tabla-renovable tbody, .tabla-renovable tr, .tabla-renovable td { display: block; width: 100%; }
  .tabla-renovable tr {
    background: #1F1F2A; margin-bottom: 14px; border-radius: 12px; box-shadow: 0 2px 10px rgba(0,0,0,.25);
    overflow: hidden; border: 1px solid #2c2c35;
  }
  .tabla-renovable td {
    text-align: left; display: flex; gap: 10px; align-items: baseline; padding: 12px 14px; border: 0; border-bottom: 1px solid #2c2c35;
  }
  .tabla-renovable td:last-child { border-bottom: 0; }
  .tabla-renovable td::before { content: attr(data-label); flex: 0 0 46%; font-weight: 700; color: #F9C74F; }
}

/* ===== Footer ===== */
footer {
  background: #1C1C26; color: #F9C74F; text-align: center; padding: 16px 12px; font-size: 1.05em; box-shadow: 0px -4px 10px rgba(0, 0, 0, 0.2);
}
footer p { margin: 0; }

/* ===== Fecha ===== */
#fecha-hora, #fecha-hora-mobile { font-size: 0.9em; font-weight: bold; color: #F9C74F; animation: fadeIn 2s ease-in-out; }

/* ===== Responsive ===== */
@media (max-width: 992px) { .contenido-principal { padding: 16px 10px; } }
@media (max-width: 768px) { .imagen-principal img { border-radius: 10px; } }
