/* --- RESET Y FUENTES --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Georgia', 'Times New Roman', serif;
  background-color: #ffffff;
  color: #1a1a1a;
  margin: 0;
  padding-top: 76px; /* Altura del header + espacio */
  line-height: 1.6;
}

/* inicio nuevas franjas */

/* --- CONTENEDOR DE FRANJAS SUPERPUESTAS --- */
.stripes-container {
  position: absolute;
  bottom: -2px; /* Pegado a la parte inferior de la barra */
  left: 0;
  width: 200px;
  height: 40px;
  z-index: 999;
  overflow: visible;
}

/* Estilo base para todas las franjas */
.stripe {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 100%;
  transform-origin: left center;
  opacity: 0;
  transform: translateX(-100%);
}

/* --- FRANJA ROJA (La más grande, fondo) --- */
.stripe-red {
  width: 180px;
  height: 38px;
  background: linear-gradient(90deg, #da291c 0%, #e84430 40%, #f05540 100%);
  border-radius: 0 4px 0 0;
  z-index: 1;
  animation: stripeSlideIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.5s;
  box-shadow: 0 2px 8px rgba(218, 41, 28, 0.3);
}

/* --- FRANJA AZUL (Tamaño mediano, en medio) --- */
.stripe-blue {
  width: 140px;
  height: 28px;
  background: linear-gradient(90deg, #0033a0 0%, #1a4fa0 40%, #2a6ab0 100%);
  border-radius: 0 12px 0 0;
  z-index: 2;
  animation: stripeSlideIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.3s;
  box-shadow: 0 2px 8px rgba(0, 51, 160, 0.3);
}

/* --- FRANJA AMARILLA (La más pequeña, arriba) --- */
.stripe-yellow {
  width: 100px;
  height: 18px;
  background: linear-gradient(90deg, #f5c518 0%, #ffd700 40%, #f5a623 100%);
  border-radius: 0 4px 0 0;
  z-index: 3;
  animation: stripeSlideIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.1s;
  box-shadow: 0 2px 8px rgba(245, 197, 24, 0.3);
}

/* --- ANIMACIÓN DE ENTRADA --- */
@keyframes stripeSlideIn {
  0% {
    transform: translateX(-100%);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

/* --- HOVER: Efecto sutil de elevación --- */
.stripes-container:hover .stripe {
  filter: brightness(1.1);
  transition: filter 0.3s ease;
}

.stripes-container:hover .stripe-red {
  box-shadow: 0 4px 16px rgba(218, 41, 28, 0.4);
}

.stripes-container:hover .stripe-blue {
  box-shadow: 0 4px 16px rgba(0, 51, 160, 0.4);
}

.stripes-container:hover .stripe-yellow {
  box-shadow: 0 4px 16px rgba(245, 197, 24, 0.4);
}

/* fin nuevas franjas */

/* --- FRANJAS DE COLORES CON DEGRADADO Y ESQUINAS REDONDEADAS --- */
.color-stripes {
  display: flex;
  height: 8px;
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1001;
  overflow: hidden;
}

.color-stripes span {
  flex: 1;
  height: 100%;
  transform: translateX(-100%); /* Comienzan fuera de la pantalla */
  opacity: 0;
}

/* Franja 1: Degradado Amarillo */
.stripe-yellow {
  background: linear-gradient(90deg, #f5c518 0%, #ffd700 50%, #f5a623 100%);
  animation: stripeSlideIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.1s;
  border-radius: 0;
}

/* Franja 2: Degradado Azul con esquina redondeada a la derecha */
.stripe-blue {
  background: linear-gradient(90deg, #0033a0 0%, #1a4fa0 50%, #2a6ab0 100%);
  animation: stripeSlideIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.3s;
  border-radius: 0;
}

/* Franja 3: Degradado Rojo */
.stripe-red {
  background: linear-gradient(90deg, #da291c 0%, #e84430 50%, #f05540 100%);
  animation: stripeSlideIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.5s;
  border-radius: 0 8px 0 0; /* Esquina redondeada superior derecha */
}

/* Animación de entrada: desde la izquierda hacia la derecha */
@keyframes stripeSlideIn {
  0% {
    transform: translateX(-100%);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Efecto de brillo sutil al pasar el mouse */
.color-stripes:hover span {
  filter: brightness(1.05);
  transition: filter 0.3s ease;
}

/* --- HEADER FIJO --- */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: #ffffff;
  border-bottom: 2px solid #e8e8e8;
  z-index: 1000;
  padding: 12px 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  position: relative;
  min-height: 60px;
}

/* --- LOGO A LA DERECHA --- */
.logo-container {
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.3s ease;
  z-index: 1002;
  display: flex;
  align-items: center;
}

.logo-container:hover {
  background-color: #f5f5f5;
}

.logo-icon img {
  height: 50px;
  width: auto;
  display: block;
}

/* --- MENÚ DESPLEGABLE --- */
.dropdown-menu {
  position: fixed;
  top: 80px;
  right: 40px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  padding: 8px 0;
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  transform-origin: top right;
  border: 1px solid #e8e8e8;
  z-index: 1003;
}

.dropdown-menu.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.dropdown-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.dropdown-menu ul li {
  padding: 0;
  margin: 0;
}

.dropdown-menu ul li a {
  display: block;
  padding: 12px 24px;
  color: #1a1a1a;
  text-decoration: none;
  font-family: 'Georgia', serif;
  font-size: 1rem;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.dropdown-menu ul li a:hover {
  background-color: #f5f8ff;
  color: #0033a0;
  border-left-color: #0033a0;
}

.dropdown-menu ul li a.active {
  background-color: #f0f4ff;
  color: #0033a0;
  border-left-color: #0033a0;
  font-weight: 600;
}

/* --- Overlay para cerrar el menú al hacer clic fuera --- */
.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0);
  z-index: 1002;
  display: none;
}

.menu-overlay.active {
  display: block;
}

/* --- CONTENIDO PRINCIPAL --- */
.main-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 40px 60px;
}

/* --- SECCIÓN RESEÑA HISTÓRICA --- */
.historical-section {
  background: #ffffff;
  padding: 40px 60px;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.historical-section .section-title {
  font-size: 2.2rem;
  font-weight: 700;
  color: #0033a0;
  font-family: 'Georgia', serif;
  letter-spacing: 1px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 3px solid #f5c518;
  display: inline-block;
}

.historical-section .company-name-highlight {
  font-weight: 700;
  color: #0033a0;
}

.historical-section p {
  font-size: 1.1rem;
  line-height: 1.8;
  text-align: justify;
  color: #2a2a2a;
  font-family: 'Georgia', serif;
  margin-bottom: 16px;
}

.historical-section p:last-child {
  margin-bottom: 0;
}

/* --- FOOTER OSCURO --- */
.site-footer {
  background-color: #0d0d0d;
  color: #e0e0e0;
  padding: 40px 0 16px;
  margin-top: 40px;
  font-family: 'Georgia', serif;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px 32px;
  border-bottom: 1px solid #2a2a2a;
}

.footer-grid h4 {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: 1px;
}

.footer-grid ul {
  list-style: none;
  padding: 0;
}

.footer-grid ul li {
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: #a0a0a0;
}

.footer-copy {
  text-align: center;
  padding-top: 20px;
  font-size: 0.85rem;
  color: #666;
  letter-spacing: 0.5px;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
  body {
    padding-top: 100px;
  }
  
  .container {
    padding: 0 20px;
  }
  
  .dropdown-menu {
    right: 20px;
    min-width: 180px;
    top: 70px;
  }
  
  .logo-icon img {
    height: 40px;
  }
  
  .historical-section {
    padding: 24px 20px;
  }
  
  .historical-section .section-title {
    font-size: 1.6rem;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 0 20px 24px;
  }
  
  .main-content {
    padding: 20px;
  }
}

/* --- AJUSTE DEL HEADER PARA LAS NUEVAS FRANJAS --- */
.top-bar {
  position: fixed;
  top: 8px; /* Coincide con la altura de las franjas */
  left: 0;
  width: 100%;
  background: #ffffff;
  border-bottom: none; /* Eliminamos el borde inferior */
  z-index: 1000;
  padding: 8px 0;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

/* Sombra adicional cuando hay scroll */
.top-bar.scrolled {
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

/* Ajuste del body para el nuevo tamaño de franjas */
body {
  padding-top: 68px; /* 8px (franjas) + 60px (header) */
}
