/* Opción 1 – Referencia: ADM Design (admdesign.com.sg)
   Tema oscuro, número + título CAPS + viñetas, imagen partida, línea de acento */
@import url('../css/base.css');

:root {
  /* Grupo Automat: rojo sobrio. Fondos claros y luminosos (punto 8 documento). */
  --accent: #991b1b;
  --accent-hover: #b91c1c;
  --bg: #ffffff;
  --bg-panel: #f8fafc;
  --bg-dark: #0f172a;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
}

body { color: var(--text); background: var(--bg); }

/* Microanimaciones al scroll: reveal (sobrias); respetan prefers-reduced-motion */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .reveal.visible { opacity: 1; transform: none; }
}

/* Capas para parallax (transform vía JS) */
.parallax-layer {
  will-change: transform;
}

/* Header – fondo claro, logo color, nav oscuro, botón outline */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.logo img { height: 36px; width: auto; }
.nav { display: flex; gap: var(--space-2xl); align-items: center; }
.nav a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-muted);
}
.nav a:hover,
.nav a.active { color: var(--accent); }
.btn-cta {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: var(--space-sm) var(--space-xl);
  font-size: var(--text-sm);
  font-weight: 500;
}
.btn-cta:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Hamburguesa: oculto en desktop */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  border-radius: 4px;
  transition: background 0.2s;
}
.nav-toggle:hover { background: var(--bg-panel); }
.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  transition: transform 0.25s, opacity 0.25s;
}
.header.is-open .nav-toggle-bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.header.is-open .nav-toggle-bar:nth-child(2) { opacity: 0; }
.header.is-open .nav-toggle-bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Hero – video fijo; la sección Quiénes somos pasa por encima al scroll */
.hero--video {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 100vh;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.hero--video .hero-video,
.hero--video .hero-overlay {
  pointer-events: auto;
}
.hero-spacer {
  height: 100vh;
  width: 100%;
  position: relative;
  z-index: 0;
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
}
.hero-slogan {
  font-size: clamp(3.5rem, 8vw, 5.5rem);
  font-weight: 700;
  line-height: 1.15;
  color: #fff;
  text-align: center;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
  max-width: 90%;
  margin: 0;
}

/* Línea vertical de acento con punto (separador entre columnas) */
.accent-line {
  position: relative;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--accent), transparent);
  flex-shrink: 0;
}
.accent-line::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 20px var(--accent), 0 0 40px rgba(14, 165, 233, 0.4);
}

/* Sección Quiénes somos – dos columnas + línea central (About Us | Who We Are) */
/* Quiénes somos: se superpone al hero al scroll (parallax) */
.section-about {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  min-height: 90vh;
  padding-top: 72px;
  background: var(--bg);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.06);
}
.section-about .panel {
  padding: var(--space-3xl) var(--space-2xl);
  display: flex;
  flex-direction: column;
}
.section-about .panel-left {
  padding-right: var(--space-2xl);
}
.section-about .panel-right {
  padding-left: var(--space-2xl);
  justify-content: center;
}
.section-about .panel-label {
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}
.section-about .panel p {
  font-size: var(--text-base);
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: var(--space-xl);
  max-width: 420px;
}
.sub-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: var(--space-2xl);
}
.sub-nav a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--text-sm);
  color: var(--text-muted);
}
.sub-nav a::before {
  content: '';
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 6px solid var(--accent);
}
.sub-nav a:hover { color: var(--accent); }
.panel-photo {
  margin-top: auto;
  border-radius: 2px;
  overflow: hidden;
  max-height: 280px;
}
.panel-photo img { width: 100%; height: 100%; object-fit: cover; }

/* Panel derecho: cifras grandes (20+ / 08 / 3M) */
.stats-vertical {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xl);
}
.stats-vertical .stat {
  display: flex;
  align-items: baseline;
  gap: var(--space-lg);
}
.stats-vertical .stat-num {
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  min-width: 100px;
  text-align: right;
}
.stats-vertical .stat-txt {
  font-size: var(--text-sm);
  color: var(--text);
  font-weight: 500;
}

@media (max-width: 768px) {
  .stats-vertical {
    gap: var(--space-xl);
  }
  .stats-vertical .stat {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: var(--space-lg);
    align-items: baseline;
  }
  .stats-vertical .stat-num {
    min-width: 0;
    text-align: left;
    font-size: clamp(2rem, 5vw, 2.75rem);
  }
  .stats-vertical .stat-txt {
    min-width: 0;
  }
}

@media (max-width: 900px) {
  .section-about {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }
  .section-about .accent-line {
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--accent), transparent);
  }
  .section-about .accent-line::after { left: 50%; top: 50%; transform: translate(-50%, -50%); }
}

/* Bloques Servicios – dos columnas: texto (número + CAPS + viñetas) | imagen partida */
.service-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 85vh;
  padding-top: 72px;
}
.service-block:nth-child(even) { direction: rtl; }
.service-block:nth-child(even) > * { direction: ltr; }
.service-block .content {
  padding: var(--space-3xl) var(--space-2xl);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--bg-dark);
  border-left: 3px solid var(--accent);
}
.service-block:nth-child(even) .content { border-left: none; border-right: 3px solid var(--accent); }
.service-block .num {
  font-size: clamp(2rem, 3vw, 2.5rem);
  font-weight: 700;
  color: var(--accent);
  margin-bottom: var(--space-sm);
}
.service-block h2 {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--text);
  margin-bottom: var(--space-xl);
}
.service-block ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}
.service-block li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  font-size: var(--text-base);
  color: var(--text-muted);
}
.service-block li::before {
  content: '';
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 0.5em;
}

/* Imagen partida: mitad color, mitad escala de grises + capa parallax */
.service-block .image-split {
  position: relative;
  min-height: 400px;
  overflow: hidden;
}
.image-split .img-wrap {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.image-split .img-color {
  background-size: cover;
  background-position: center;
}
.image-split .img-sketch {
  background-size: cover;
  background-position: center;
  filter: grayscale(100%) contrast(1.1) brightness(0.9);
}
.image-split .logo-badge {
  position: absolute;
  top: var(--space-xl);
  right: var(--space-xl);
  z-index: 2;
}
.image-split .logo-badge img {
  height: 32px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

@media (max-width: 768px) {
  .service-block {
    grid-template-columns: 1fr;
    direction: ltr;
  }
  .service-block > * { direction: ltr; }
  .service-block .content { border-left: 3px solid var(--accent); border-right: none; }
  .service-block .image-split { min-height: 280px; }
}

/* Sección Empresas del Grupo – fondo sólido para que no se vea el video */
#empresas {
  position: relative;
  z-index: 1;
  background: var(--bg);
}
#empresas .section-head {
  padding: var(--space-4xl) var(--space-lg) var(--space-2xl);
  text-align: center;
}
#empresas .section-label {
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: var(--space-sm);
}
#empresas .section-head h2 {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--text);
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}
.empresas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-lg);
  padding: 0 var(--space-lg) var(--space-4xl);
  max-width: 1200px;
  margin: 0 auto;
}
.empresa-card--link .empresa-img--placeholder { background: var(--bg-panel); }
.empresa-logo-text {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--space-md);
  display: block;
}
.empresa-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.empresa-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
.empresa-img {
  height: 160px;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
}
.empresa-content {
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  flex: 1;
}
.empresa-logo {
  height: 32px;
  width: auto;
  margin-bottom: var(--space-md);
  opacity: 0.95;
}
.empresa-content h3 {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--space-sm);
}
.empresa-content p {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-md);
  flex: 1;
}
.empresa-link {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--accent);
  margin-top: auto;
}
.empresa-link:hover { text-decoration: underline; }
@media (max-width: 900px) {
  .empresas-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 500px) {
  .empresas-grid { grid-template-columns: 1fr; }
}

/* Equipamiento – grid en oscuro */
.section-equip {
  position: relative;
  z-index: 1;
  padding: var(--space-4xl) 0;
  background: var(--bg-panel);
}
.section-equip .container { max-width: 1200px; }
.section-equip .section-label {
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: var(--space-sm);
}
.section-equip .section-title {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--space-md);
}
.section-equip .section-intro {
  font-size: var(--text-base);
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto var(--space-2xl);
  text-align: center;
  line-height: 1.6;
}
.equip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-lg);
}
.equip-card {
  border-radius: 2px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: border-color 0.2s;
}
.equip-card:hover { border-color: var(--accent); }
.equip-card img { width: 100%; height: 200px; object-fit: cover; }
.equip-card .content { padding: var(--space-lg); background: var(--bg); }
.equip-card h3 { font-size: var(--text-lg); font-weight: 600; color: var(--text); margin-bottom: var(--space-xs); }
.equip-card p { font-size: var(--text-sm); color: var(--text-muted); }

/* CTA */
/* Contacto: video de fondo (sin slogan); fondo sólido tapa el hero para que no se vea ahí */
.cta-section {
  position: relative;
  z-index: 1;
  min-height: 50vh;
  padding: var(--space-4xl) 0;
  text-align: center;
  overflow: hidden;
  background: var(--bg);
}
.cta-section-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
}
.cta-section-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.2);
}
.cta-section-content {
  position: relative;
  z-index: 2;
  color: var(--text);
}
.cta-section h2 { font-size: var(--text-2xl); font-weight: 700; margin-bottom: var(--space-md); color: var(--text); }
.cta-section p { color: var(--text-muted); margin-bottom: var(--space-xl); font-weight: 700; }
.cta-section .btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 0;
}
.cta-section .btn:hover { opacity: 0.95; }

/* Footer – mismos estilos que el navbar (fondo claro, texto oscuro) */
.footer {
  position: relative;
  z-index: 1;
  background: var(--bg);
  color: var(--text-muted);
  padding: var(--space-3xl) 0 var(--space-xl);
  border-top: 1px solid var(--border);
}
.footer .container {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--space-2xl);
  align-items: center;
  min-height: 72px;
}
.footer-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  align-items: flex-start;
  justify-self: start;
  list-style: none;
}
.footer-nav a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-muted);
}
.footer-nav a:hover { color: var(--accent); }
.footer-logo { justify-self: center; }
.footer-logo img { height: 36px; width: auto; }
.footer-contact {
  justify-self: end;
  font-size: var(--text-sm);
  text-align: right;
  color: var(--text-muted);
}
.footer-bottom {
  margin-top: var(--space-2xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border);
  font-size: var(--text-xs);
  color: var(--text-muted);
  grid-column: 1 / -1;
}

/* WhatsApp flotante – fixed bottom right */
.whatsapp-float {
  position: fixed;
  bottom: var(--space-xl);
  right: var(--space-xl);
  z-index: 999;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.5);
  transition: transform 0.2s, box-shadow 0.2s;
}
.whatsapp-float:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(37, 211, 102, 0.6);
  color: #fff;
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: var(--space-lg);
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  }
  .header.is-open .nav { display: flex; }
  .nav a {
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--border);
  }
  .nav a:last-child { border-bottom: none; }
  .nav .btn-cta { margin-top: var(--space-sm); }

  .footer .container { grid-template-columns: 1fr; text-align: center; }
  .footer-nav { justify-self: center; align-items: center; }
  .footer-contact { justify-self: center; text-align: center; }
  .whatsapp-float { bottom: var(--space-lg); right: var(--space-lg); width: 52px; height: 52px; }
}
