/* === Variables CSS === */
:root {
  --color-primary: #000000;        /* Azul principal */
  --color-accent: #FFD700;         /* Amarillo destacado */
  --color-dark: #000000;           /* Azul más oscuro */
  --color-light: #f8f9fa;          /* Fondo claro */
  --color-text: #333333;           /* Texto principal */
  --color-white: #FFFFFF;          /* Blanco puro */
  --header-height: 80px;           /* Altura del header */
  --transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1); /* Transición suave */
}



/* ==================== */
/* Hero Section Optimizado */
/* ==================== */
.hero {
  position: relative;
  height: calc(100vh - var(--header-height));
  min-height: 600px;
  /* margin-top: var(--header-height); */
}

.carousel .slide {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.2s var(--transition);
}

.carousel .slide.active {
  opacity: 1;
}

.hero video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.7);
  pointer-events: none;
}

.hero-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: var(--color-white);
  width: 90%;
  max-width: 1200px;
  padding: 2rem;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  backdrop-filter: blur(5px);
}

.hero-text .welcome {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 400;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.hero-text .main-phrase {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.6);
  margin-bottom: 2rem;
}

/* ==================== */
/* Sección Valores Mejorada */
/* ==================== */
.values {
  padding: 6rem 2rem;
  background: var(--color-light);
  text-align: center;
}

.values h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--color-primary);
  margin-bottom: 1.5rem;
  text-align: center;
}

.values-line {
  width: 80px;
  height: 4px;
  background: var(--color-accent);
  margin: 0 auto 3rem;
}

.values-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.value-box {
  position: relative;
  background: var(--color-white);
  border-radius: 12px;
  overflow: hidden;
  min-height: 400px;
  transition: transform var(--transition);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  z-index: 1; /* Nuevo contexto de apilamiento */
  background-size: cover !important;        /* Cubrir todo el contenedor */
  background-position: center !important;   /* Centrar la imagen */
  background-repeat: no-repeat !important;  /* Evitar repetición */
}

.value-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(0deg, 
    rgba(0, 0, 0, 0.6) 0%, 
    rgba(0, 0, 0, 0.6) 100%
  );
  z-index: 1;
}

.value-box-content {
  position: relative;
  padding: 2rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  z-index: 2;
  background: linear-gradient(180deg, 
    transparent 0%, 
    rgba(0, 0, 0, 0.7) 80%
  ); /* Nuevo gradiente para mejorar legibilidad */
}

.value-box h3 {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  color: var(--color-accent);
  margin-bottom: 1rem;
  z-index: 3;
  text-transform: uppercase;
  position: relative;
}

.value-box p {
  font-size: clamp(1rem, 1.2vw, 1.2rem);
  line-height: 1.6;
  color: var(--color-white);
  opacity: 0.9;
  margin-bottom: 1.5rem;
  text-align: center;
  letter-spacing: 1px;
  z-index: 3;
  text-transform: uppercase;
  position: relative;
}

.value-box:hover {
  transform: translateY(-10px) scale(1.02);
}
/* Optimización para móviles */
@media (max-width: 768px) {
  .value-box {
    min-height: 300px;
    background-position: top center !important;
  }
  
  .value-box p {
    font-size: 0.9rem;
  }
}

/* ==================== */
/* Footer Actualizado */
/* ==================== */
.footer {
  background: var(--color-primary);
  color: var(--color-white);
  padding: 4rem 2rem;
}

.footer-content {
  max-width: 1440px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
}

.footer-logo {
  max-width: 200px;
  height: auto;
  margin-bottom: 1.5rem;
}

.footer-phrase {
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
}

/* ==================== */
/* Responsive Design */
/* ==================== */
@media (max-width: 768px) {
  .hero {
    height: 70vh;
    min-height: 500px;
  }

  .value-box {
    min-height: 300px;
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-links,
  .footer-social,
  .footer-contact {
    text-align: center !important;
  }

  .social-icons {
    justify-content: center;
  }
}

/* ==================== */
/* Animaciones Mejoradas */
/* ==================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translate3d(0, 30px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.highlight {
  background: var(--color-accent);
  color: var(--color-primary);
  padding: 0.2em 0.4em;
  border-radius: 3px;
  animation: highlightPulse 2s infinite;
}

@keyframes highlightPulse {
  0% { background-color: var(--color-accent); }
  50% { background-color: rgba(255, 215, 0, 0.7); }
  100% { background-color: var(--color-accent); }
}