/* style.css - global styles, variables, reset, header, footer */
/* Page Banner Styles */
.page-header-banner {
  position: relative;
  height: 350px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background-size: cover;
  background-position: center;
  color: #fff;
  margin-bottom: 2rem;
  margin-top: -1px;
  /* Align with header */
  overflow: hidden;
}

.page-header-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  /* Dark overlay */
  z-index: 1;
}

.page-header-banner h1,
.page-header-banner p {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 0 1rem;
}

.page-header-banner h1 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.page-header-banner p {
  font-size: 1.2rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

:root {
  --rojo: #a40d13;
  --azul: #0094d0;
  --blanco: #ffffff;
  --text-main: var(--blanco);
  --text-secondary: rgba(255, 255, 255, 0.9);
  --text-muted: rgba(255, 255, 255, 0.8);
  --btn-text: #ffffff;
  --fondo: #0f1724;
  --glass-bg: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.12);
  --radius: 14px;
  --max-width: 1150px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0
}

html,
body {
  height: 100%;
  background: linear-gradient(180deg, #071021 0%, #0b1220 100%);
  color: var(--blanco);
  -webkit-font-smoothing: antialiased
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem
}

a {
  color: inherit;
  text-decoration: none
}

.site-header {
  position: sticky;
  top: 0;
  backdrop-filter: blur(10px);
  background: rgba(15, 17, 36, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Center content */
  padding: 0 2rem;
  height: 100px;
  /* Increased by 20% from 80px */
}

.site-header .brand {
  position: absolute;
  /* Remove from flow to allow center alignment of nav */
  left: 2rem;
  padding: 0;
  font-weight: 800;
  color: var(--rojo);
  font-size: 1.5rem;
  display: flex;
  align-items: center;
}



/* Checkbox invisible para controlar menú móvil */
.menu-checkbox {
  display: none;
}

/* Botón hamburguesa */
.menu-button {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--rojo), var(--azul));
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  cursor: pointer;
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10001;
  box-shadow: 0 4px 20px rgba(164, 13, 19, 0.4);
  transition: all 0.3s ease;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 4px 20px rgba(164, 13, 19, 0.4); }
  50% { box-shadow: 0 4px 30px rgba(164, 13, 19, 0.8); }
  100% { box-shadow: 0 4px 20px rgba(164, 13, 19, 0.4); }
}

.menu-button:hover {
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 6px 30px rgba(164, 13, 19, 0.8);
}

/* Líneas del hamburguesa */
.hamburger-line {
  width: 24px;
  height: 3px;
  background: var(--blanco);
  margin: 2px 0;
  transition: all 0.3s ease;
  border-radius: 2px;
}

/* Efectos cuando el checkbox está marcado */
.menu-checkbox:checked ~ .menu-button .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.menu-checkbox:checked ~ .menu-button .hamburger-line:nth-child(2) {
  opacity: 0;
}

.menu-checkbox:checked ~ .menu-button .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

.menu-checkbox:checked ~ .menu-button {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
}

/* Menú de navegación */
.nav-menu {
  display: flex;
  gap: 2rem;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  position: relative;
  z-index: 9999;
}

.nav-link {
  padding: 0.5rem 0;
  color: var(--blanco);
  font-weight: 500;
  font-size: 1rem;
  position: relative;
  transition: color 0.3s ease;
  background: transparent;
  border-radius: 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--rojo), var(--azul));
  transition: width 0.3s ease;
}

.nav-link:hover {
  color: var(--blanco);
  background: transparent;
  transform: none;
  box-shadow: none;
}

.nav-link:hover::after,
.nav-link.active::after,
.nav-link[aria-current="page"]::after {
  width: 100%;
}

.nav-link.active,
.nav-link[aria-current="page"] {
  background: transparent;
  color: var(--blanco);
}

/* WhatsApp Float */
.whatsapp-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background-color: #25d366;
  color: #fff;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  text-align: center;
  font-size: 30px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: var(--transition);
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4);
}

/* Hero Overlay Utility */
.hero-overlay-bg {
  position: relative;
}

.hero-overlay-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  /* Ligera opacidad */
  z-index: 1;
}

.hero-overlay-bg>* {
  position: relative;
  z-index: 2;
}

.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 1.3rem;
  box-shadow: 0 6px 20px rgba(2, 6, 23, 0.6);
  backdrop-filter: blur(8px);
  transition: var(--transition)
}

.glass:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(2, 6, 23, 0.8);
  border-color: rgba(255, 255, 255, 0.2)
}

.card {
  padding: 1rem
}

.card-hero {
  max-width: 640px
}

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

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding: 1.2rem 0;
  margin-top: 2rem;
  color: rgba(255, 255, 255, 0.8)
}

.btn {
  display: inline-block;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--rojo), var(--azul));
  color: var(--btn-text);
  font-weight: 700;
  margin-top: 0.6rem;
  box-shadow: 0 8px 24px rgba(4, 12, 34, 0.6);
  transition: var(--transition);
  text-decoration: none;
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(4, 12, 34, 0.8)
}

.btn:active {
  transform: translateY(0)
}



@media(max-width:900px) {
  .grid {
    grid-template-columns: repeat(1, 1fr)
  }

  /* Mobile Header Layout */
  .site-header {
    justify-content: space-between;
    padding: 0 1.5rem;
    position: sticky;
  }

  .site-header .brand {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    font-size: 1.3rem;
    padding: 0;
    max-width: 70%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Mostrar botón hamburguesa en móvil */
  .menu-button {
    display: flex;
  }

  /* Ocultar menú por defecto en móvil */
  .nav-menu {
    display: none;
    position: fixed;
    top: 100px;
    left: 0;
    right: 0;
    width: 100%;
    background: linear-gradient(180deg, rgba(15, 17, 36, 0.98), rgba(15, 17, 36, 0.95));
    backdrop-filter: blur(12px);
    padding: 0;
    border-bottom: 2px solid var(--rojo);
    flex-direction: column;
    gap: 0;
    z-index: 9999;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
  }

  /* Mostrar menú cuando el checkbox está marcado */
  .menu-checkbox:checked ~ .nav-menu {
    display: flex;
    animation: slideDown 0.3s ease forwards;
  }

  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  /* Estilos para links del menú móvil */
  .nav-link {
    display: block;
    width: 100%;
    text-align: center;
    padding: 1.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
  }

  .nav-link:hover {
    background: rgba(164, 13, 19, 0.2);
    color: var(--blanco);
    transform: translateX(10px);
  }

  /* Animación para los enlaces cuando el menú se abre */
  .menu-checkbox:checked ~ .nav-menu .nav-link:nth-child(1) { animation: fadeInUp 0.4s ease forwards 0.1s; }
  .menu-checkbox:checked ~ .nav-menu .nav-link:nth-child(2) { animation: fadeInUp 0.4s ease forwards 0.2s; }
  .menu-checkbox:checked ~ .nav-menu .nav-link:nth-child(3) { animation: fadeInUp 0.4s ease forwards 0.3s; }
  .menu-checkbox:checked ~ .nav-menu .nav-link:nth-child(4) { animation: fadeInUp 0.4s ease forwards 0.4s; }
  .menu-checkbox:checked ~ .nav-menu .nav-link:nth-child(5) { animation: fadeInUp 0.4s ease forwards 0.5s; }
  .menu-checkbox:checked ~ .nav-menu .nav-link:nth-child(6) { animation: fadeInUp 0.4s ease forwards 0.6s; }

  @keyframes fadeInUp {
    from {
      opacity: 0;
      transform: translateY(20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .container {
    padding: 1rem
  }
}

  /* Refactored Mobile Header Layout */
  .site-header {
    justify-content: space-between;
    /* Space out Logo and Toggle */
    padding: 0 1.5rem;
    position: sticky;
    /* Ensure it stays sticky */
  }

  .site-header .brand {
    position: relative;
    /* Reset absolute */
    left: auto;
    top: auto;
    transform: none;
    font-size: 1.3rem;
    /* Ensure readability */
    padding: 0;
    max-width: 80%;
    /* Prevent overlap with toggle */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    /* Handle very small screens */
  }

  .nav-toggle {
    display: block !important;
    position: fixed !important;
    right: 1rem !important;
    top: 1rem !important;
    transform: none !important;
    font-size: 1.8rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 9999 !important;
    background: linear-gradient(135deg, var(--rojo), var(--azul)) !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    color: var(--blanco) !important;
    padding: 0.8rem !important;
    border-radius: 12px !important;
    min-width: 50px !important;
    min-height: 50px !important;
    box-shadow: 0 4px 20px rgba(164, 13, 19, 0.4) !important;
    transition: all 0.3s ease !important;
    animation: pulse 2s infinite !important;
  }

  .nav {
    display: none !important;
    position: absolute;
    top: 100%;
    /* Attach exactly to bottom of header */
    left: 0;
    right: 0;
    width: 100%;
    background: rgba(15, 17, 36, 0.98);
    backdrop-filter: blur(12px);
    padding: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-direction: column;
    z-index: 99;
  }

  .nav.open {
    display: flex !important;
    padding: 1.5rem 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    animation: slideDown 0.3s ease forwards;
    background: linear-gradient(180deg, rgba(15, 17, 36, 0.98), rgba(15, 17, 36, 0.95)) !important;
    border-bottom: 2px solid var(--rojo);
  }

  .nav.open {
    display: flex;
    padding: 1rem 0;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    animation: slideDown 0.3s ease forwards;
  }

  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  /* Reset link display styles */
  .nav a {
    display: block;
    width: 100%;
    text-align: center;
    padding: 1.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
  }

  .nav a:hover {
    background: rgba(164, 13, 19, 0.2);
    color: var(--blanco);
    transform: translateX(10px);
  }

  .nav.open a {
    opacity: 1;
    transform: none;
    animation: fadeInUp 0.4s ease forwards;
  }

  .nav.open a:nth-child(1) { animation-delay: 0.1s; }
  .nav.open a:nth-child(2) { animation-delay: 0.2s; }
  .nav.open a:nth-child(3) { animation-delay: 0.3s; }
  .nav.open a:nth-child(4) { animation-delay: 0.4s; }
  .nav.open a:nth-child(5) { animation-delay: 0.5s; }
  .nav.open a:nth-child(6) { animation-delay: 0.6s; }

  @keyframes fadeInUp {
    from {
      opacity: 0;
      transform: translateY(20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .container {
    padding: 1rem
  }
}

@media(max-width:768px) {
  .hero {
    height: 60vh;
    min-height: 400px
  }

  .carousel .card-hero {
    padding: 0.8rem
  }

  .btn {
    padding: 0.6rem 0.9rem;
    font-size: 0.9rem
  }
}

@media(max-width:480px) {
  .container {
    padding: 0.8rem
  }

  .glass {
    padding: 1rem
  }

  .hero {
    height: 50vh;
    min-height: 350px
  }

  .site-header .brand {
    font-size: 1rem;
    padding: 0.6rem 0.8rem
  }
}


.site-footer {
  background-color: #060f58;
  /* Fondo oscuro profesional */
  color: #ffffff;
  /* Texto blanco */
  padding: 10px 0;
  /* Espaciado reducido a la mitad */
  text-align: center;
  /* Centrar texto */
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  border-top: 3px solid #3498db;
  /* Línea decorativa superior */
}

.site-footer .container {
  max-width: 1200px;
  margin: 0 auto;
  font-size: 0.9rem;
  letter-spacing: 1px;
  opacity: 0.8;
  /* Un tono ligeramente más suave para el texto */
}

/* Efecto opcional: Cambiar el color del año o nombre */
.site-footer b {
  color: #3498db;
  flex-shrink: 0;
}

/* 1. Configuramos el cuerpo para que ocupe toda la altura */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  /* 100% del alto de la ventana */
  margin: 0;
}

/* 2. El contenido principal crece para empujar al footer */
main {
  flex: 1;
}

/* Focus visible para mejor accesibilidad */
*:focus-visible {
  outline: 2px solid var(--azul);
  outline-offset: 2px;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}