/* === 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 */
}


/* === Reset y Base === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
}

/* ===== HEADER UNIFICADO ===== */
.sticky-header {
    background: var(--color-primary);
    padding: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--header-height);
}

.header-content {
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 2rem;
}

.logo-img {
    width: 180px;
    height: auto;
    transition: transform 0.3s ease;
    object-fit: contain;
}

.logo-img:hover {
    transform: scale(1.05);
}

.main-nav {
    display: flex;
    gap: 2rem;
    flex-grow: 1;
    justify-content: center;
}

.main-nav a {
    color: var(--color-white);
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(0.9rem, 1.1vw, 1.1rem);
    font-weight: 500;
    letter-spacing: 0.5px;
    padding: 0.5rem 0;
    border-radius: 4px;
    transition: all var(--transition);
    position: relative;
    text-decoration: none;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: width var(--transition);
}

.main-nav a:hover {
    color: var(--color-accent);
}

.main-nav a:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
    flex-direction: column;
    justify-content: center;
}

.hamburger-line {
    display: block;
    width: 25px;
    height: 3px;
    background: white;
    margin: 5px 0;
    transition: var(--transition);
}

/* === RESPONSIVE UNIFICADO === */
@media (max-width: 992px) {
    .hamburger {
        display: flex;
    }
    
    .main-nav {
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        height: 0;
        background: var(--color-primary);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding-top: 0;
        transition: all var(--transition);
        z-index: 1000;
        overflow: hidden;
    }
    
    .main-nav.active {
        height: calc(100vh - var(--header-height));
        padding-top: 0;
        overflow-y: auto;
    }
    
    .main-nav a {
        font-size: 1.5rem;
        margin: 15px 0;
        padding: 12px 30px;
        width: auto;
        text-align: center;
        opacity: 0;
        transform: translateY(-20px);
        transition: opacity 0.3s ease, transform 0.3s ease;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 8px;
    }
    
    .main-nav.active a {
        opacity: 1;
        transform: translateY(0);
        transition-delay: calc(0.1s * var(--i));
    }
    
    .main-nav a:hover {
        background: rgba(255, 215, 0, 0.2);
        transform: translateX(5px);
    }

    .hamburger.active .hamburger-line:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .hamburger.active .hamburger-line:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .hamburger-line:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}

/* Body scroll lock */
body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* ==================== */
/* Hero Section Optimizado */
/* ==================== */
.hero {
  position: relative;
  height: calc(100vh - var(--header-height));
  min-height: 600px;
}

.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); }
}

/* ==================== */
/* CTA Section */
/* ==================== */
.construccion-cta {
  background: var(--color-dark);
  color: var(--color-white);
  padding: 6rem 2rem;
  text-align: center;
  margin-top: 4rem;
}

.cta-content {
  max-width: 800px;
  margin: 0 auto;
}

.cta-content h2 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  line-height: 1.3;
}

.cta-content p {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 2rem;
}

.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  background: var(--color-accent);
  color: var(--color-primary);
  padding: 1.2rem 3.5rem;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 700;
  transition: all var(--transition);
  font-size: 1.1rem;
}

.btn-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 20px rgba(255, 215, 0, 0.4);
}

/* ==================== */
/* Footer */
/* ==================== */
.footer {
  background: var(--color-dark);
  color: var(--color-white);
  padding: 4rem 5%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  position: relative;
}

.footer-logo {
  max-width: 180px;
  margin-bottom: 1.5rem;
}

.footer-phrase {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #CCCCCC;
  max-width: 300px;
}

.footer-links h3,
.footer-social h3,
.footer-contact h3 {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-accent);
  display: inline-block;
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin: 0.8rem 0;
}

.footer-links a {
  color: var(--color-white);
  text-decoration: none;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--color-accent);
}

.social-icons {
  display: flex;
  gap: 1.2rem;
}

.social-icons a {
  font-size: 1.8rem;
  color: var(--color-white);
  transition: transform var(--transition);
}

.social-icons a:hover {
  transform: translateY(-3px);
  color: var(--color-accent);
}

.footer-contact p {
  margin: 1rem 0;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.95rem;
}

/* ==================== */
/* Animaciones AOS */
/* ==================== */
[data-aos] {
  visibility: hidden;
  transition-property: transform, opacity;
}

[data-aos].aos-animate {
  visibility: visible;
}

/* Animación personalizada para títulos */
[data-aos="fade-up-custom"] {
  transform: translateY(30px);
  opacity: 0;
  transition: all 0.6s ease-out;
}

[data-aos="fade-up-custom"].aos-animate {
  transform: translateY(0);
  opacity: 1;
}