/**
 * MUNDISOFA MAIN STYLES
 * Componentes y estilos específicos de la web
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;900&display=swap');

/* === HERO SECTION === */

.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
  background-color: var(--color-primary-dark);
}

.hero__image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  will-change: transform;
  transition: transform 2s ease-out;
}

.hero__image:hover {
  transform: scale(1.05);
}

.hero__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to right,
    rgba(15, 41, 66, 0.85) 0%,
    rgba(15, 41, 66, 0.65) 40%,
    rgba(15, 41, 66, 0.3) 70%,
    rgba(15, 41, 66, 0.1) 100%
  );
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
}

.hero__text {
  max-width: 700px;
  color: var(--color-white);
}

.hero__logo {
  width: 180px;
  height: auto;
  margin-bottom: var(--space-8);
  filter: brightness(0) invert(1);
}

.hero__title {
  font-size: var(--text-6xl);
  font-weight: var(--font-black);
  line-height: var(--leading-tight);
  color: var(--color-white);
  margin-bottom: var(--space-6);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero__subtitle {
  font-size: var(--text-xl);
  font-weight: var(--font-normal);
  color: var(--color-gray-200);
  margin-bottom: var(--space-10);
  line-height: var(--leading-relaxed);
}

.hero__logo-inline {
  height: 28px;
  width: auto;
  vertical-align: middle;
  margin: 0 4px;
  display: inline-block;
}

.hero__ctas {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.hero__scroll-indicator {
  position: absolute;
  bottom: var(--space-8);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  animation: bounce 2s infinite;
  cursor: pointer;
}

.hero__scroll-indicator svg {
  width: 24px;
  height: 24px;
  color: var(--color-white);
  opacity: 0.8;
}

@keyframes bounce {
  0%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(10px);
  }
}

/* === BOTONES === */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  line-height: 1;
  text-decoration: none;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
}

.btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.3);
}

.btn-primary {
  background-color: var(--color-accent);
  color: var(--color-white);
  border-color: var(--color-accent);
}

.btn-primary:hover {
  background-color: var(--color-accent-dark);
  border-color: var(--color-accent-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-white);
  border-color: var(--color-white);
}

.btn-secondary:hover {
  background-color: var(--color-white);
  color: var(--color-primary);
}

.btn-outline {
  background-color: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-outline:hover {
  background-color: var(--color-primary);
  color: var(--color-white);
}

/* === HEADER === */

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: var(--z-fixed);
  background-color: var(--color-primary); /* Fondo azul oscuro SIEMPRE */
  box-shadow: var(--shadow);
  transition: all var(--transition-base);
}

.header.scrolled {
  background-color: var(--color-primary); /* Fondo azul corporativo */
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

.header__container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-2);
  padding-bottom: var(--space-2);
}

.header__logo {
  color: var(--color-white); /* Logo blanco por defecto */
  display: flex;
  align-items: center;
}

/* Logo como imagen */
.header__logo img {
  height: 42px;
  width: auto;
  max-width: none;
  object-fit: contain;
  transition: all var(--transition-base);
}

.header.scrolled .header__logo img {
  height: 36px;
}

.header__nav {
  display: flex;
  gap: var(--space-8);
  align-items: center;
}

.header__nav a {
  color: rgba(255, 255, 255, 0.85);
  font-weight: var(--font-medium);
  font-size: 18px;
  transition: color var(--transition-fast);
}

.header.scrolled .header__nav a {
  color: rgba(255, 255, 255, 0.85); /* Gris claro suave - elegante */
}

/* Botón "Contacto" mantiene colores naranja siempre (no cambia al scroll) */
/* .header.scrolled .header__nav .btn-primary eliminado */

.header__nav a:hover {
  color: var(--color-white); /* Blanco puro al hover - feedback claro */
}

.header__nav a.active {
  color: var(--color-accent);
  font-weight: var(--font-semibold);
}

.header.scrolled .header__nav a.active {
  color: var(--color-accent); /* Mantener naranja siempre, incluso al scroll */
}

/* === SECCIONES === */

.section {
  padding: var(--space-24) 0;
}

.section--gray {
  background-color: var(--color-gray-50);
}

.section__header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto var(--space-16);
}

.section__title {
  font-size: var(--text-5xl);
  color: var(--color-primary);
  margin-bottom: var(--space-4);
}

.section__subtitle {
  font-size: var(--text-xl);
  color: var(--color-gray-600);
}

/* === RESPONSIVE === */

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

  .hero__overlay {
    background: linear-gradient(
      to bottom,
      rgba(15, 41, 66, 0.7) 0%,
      rgba(15, 41, 66, 0.85) 100%
    );
  }

  .hero__content {
    align-items: flex-end;
    padding-bottom: var(--space-16);
  }

  .hero__text {
    max-width: 100%;
  }

  .hero__logo {
    width: 140px;
    margin-bottom: var(--space-6);
  }

  .hero__title {
    font-size: var(--text-4xl);
  }

  .hero__subtitle {
    font-size: var(--text-lg);
  }

  .hero__ctas {
    flex-direction: column;
    width: 100%;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .header__nav {
    display: none;  /* TODO: Menú móvil hamburguesa */
  }

  .section {
    padding: var(--space-16) 0;
  }

  .section__title {
    font-size: var(--text-3xl);
  }
}

/* === SMOOTH SCROLL === */

html {
  scroll-behavior: smooth;
}

/* === ACCESIBILIDAD === */

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

/* === PERFORMANCE === */

img, video {
  max-width: 100%;
  height: auto;
}

img {
  loading: lazy;
}
