/* ============================================================
   main.css — Automatix
   Estilos globales compartidos por todas las páginas.
   Variables · Reset · Layout · Header · Nav · Footer · Shared Components
   ============================================================ */

/* ----------------------------------------------------------
   1. VARIABLES
   ---------------------------------------------------------- */
:root {
  /* Colores acento */
  --a1:  #6d28d9;   /* violeta */
  --a2:  #3b82f6;   /* azul */
  --a3:  #8b5cf6;   /* violeta claro */
  --a1x: #ff7a45;   /* naranja */
  --a2x: #5ec2ff;   /* celeste */
  --a3x: #7b61ff;   /* violeta-azul */

  /* Texto */
  --text:       #1e293b;
  --text-light: #4b5563;
  --muted:      #64748b;

  /* Fondos y superficies */
  --bg:      #f8fafc;
  --surface: #ffffff;

  /* UI */
  --radius:     20px;
  --radius-sm:  12px;
  --shadow:     0 20px 40px rgba(0,0,0,.08);
  --shadow-lg:  0 30px 60px rgba(0,0,0,.14);
  --transition: all .4s cubic-bezier(.4,0,.2,1);
  --container:  1200px;
}

/* ----------------------------------------------------------
   2. RESET & BASE
   ---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100%;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; transition: var(--transition); }

ul { list-style: none; }

/* ----------------------------------------------------------
   3. LAYOUT
   ---------------------------------------------------------- */
.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
  padding-inline: 1rem;
}

/* ----------------------------------------------------------
   4. TIPOGRAFÍA
   ---------------------------------------------------------- */
h1,h2,h3,h4 { font-weight: 700; line-height: 1.2; }

/* ----------------------------------------------------------
   5. BOTÓN GLOBAL
   ---------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-weight: 700;
  font-size: 1rem;
  color: white;
  background: linear-gradient(135deg, var(--a1x), var(--a2x));
  border: none;
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 25px rgba(94,194,255,.3);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  z-index: 1;
  text-decoration: none;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #ff9a6b, var(--a3x));
  opacity: 0;
  transition: opacity .4s;
  z-index: -1;
}

.btn:hover::before { opacity: 1; }
.btn:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(94,194,255,.4); }

/* ----------------------------------------------------------
   6. HEADER
   ---------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,.05);
  padding: 1rem 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Brand */
.brand a { display: block; text-decoration: none; }

.brand-name {
  font-size: 1.4rem;
  font-weight: 800;
  background: linear-gradient(90deg, var(--a3), var(--a2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
  line-height: 1.2;
}

.brand .tag {
  font-size: .8rem;
  color: var(--muted);
  margin: 0;
}

/* ----------------------------------------------------------
   7. NAVEGACIÓN
   ---------------------------------------------------------- */
.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

/* Todos los links sin subrayado base */
.nav-links a {
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  position: relative;
}

/* Underline animado en nav-text */
.nav-text::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--a2);
  transition: .3s;
  transform: translateX(-50%);
}
.nav-text:hover::after { width: 100%; }
.nav-text:hover { color: var(--a2); }

/* Íconos sociales */
.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--text);
  transition: var(--transition);
  position: relative;
}
.social-icon:hover {
  color: var(--a2);
  background: rgba(59,130,246,.1);
  transform: translateY(-2px);
}
.social-icon svg { width: 18px; height: 18px; }

/* Hamburguesa */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
  z-index: 1001;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 3px;
  background: var(--a3x);
  border-radius: 2px;
  transition: var(--transition);
  transform-origin: center;
}

.nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(6px,6px); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(7px,-7px); }

/* ----------------------------------------------------------
   8. HERO DE SECCIÓN (compartido por todas las subpáginas)
   ---------------------------------------------------------- */
.page-hero {
  padding: 60px 0 30px;
  text-align: center;
  background: linear-gradient(135deg, rgba(123,97,255,.05), rgba(94,194,255,.03));
}

.page-hero__title {
  font-size: clamp(2rem, 5vw, 2.5rem);
  font-weight: 800;
  background: linear-gradient(90deg, var(--a3x), var(--a1x));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: .5rem;
}

.page-hero__sub {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 700px;
  margin: 0 auto;
}

/* ----------------------------------------------------------
   8b. SOUND SECTION / PAGE HERO (compartido por todas las subpáginas)
   ---------------------------------------------------------- */
.sound-section {
  padding: 60px 0 30px;
  text-align: center;
  background: linear-gradient(135deg, rgba(123,97,255,.05), rgba(94,194,255,.03));
}

.section-heading {
  font-size: clamp(2rem, 5vw, 2.5rem);
  font-weight: 800;
  background: linear-gradient(90deg, var(--a3x), var(--a1x));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: .5rem;
}

.section-subheading {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 700px;
  margin: 0 auto;
}

/* ----------------------------------------------------------
   9. INFO CARD / INFO CONTAINER (compartida por todas las páginas de servicio)
   ---------------------------------------------------------- */
.info-card,
.info-container {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}

.info-card h2,
.info-container h2 {
  font-size: 1.8rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--a1), var(--a3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
}

.info-card h3,
.info-container h3 {
  font-size: 1.6rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--a1), var(--a3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
}

.info-card p,
.info-container p {
  color: var(--muted);
  line-height: 1.7;
  font-size: 1rem;
}

/* ----------------------------------------------------------
   10. GALERÍA / CARRUSEL (compartida: iluminación, cortinas, red)
   ---------------------------------------------------------- */
.gallery-slider {
  position: relative;
  width: 100%;
  max-width: 500px;
  height: 340px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #000;
}

.gallery-slider .fade-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
}

.gallery-slider .fade-image.visible { opacity: 1; }

.dots-container {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 2;
}

.dot {
  width: 8px;
  height: 8px;
  background: rgba(255,255,255,.5);
  border-radius: 50%;
  cursor: pointer;
  transition: .3s;
}

.dot.active { background: white; transform: scale(1.4); }

/* ----------------------------------------------------------
   11. PHONE MOCKUP (compartido: voz, seguridad, aires)
   ---------------------------------------------------------- */
.phone-mockup {
  width: 300px;
  height: 600px;
  background: linear-gradient(145deg, #1a1a1e, #0f0f14);
  border-radius: 48px;
  padding: 16px;
  box-shadow: 0 30px 60px rgba(0,0,0,.3),
              inset 0 0 0 3px rgba(255,255,255,.06);
  overflow: hidden;
  flex-shrink: 0;
}

.phone-screen {
  width: 100%;
  height: 100%;
  background: #000;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: inset 0 0 20px rgba(0,0,0,.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}

.phone-screen img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 28px;
}

/* ----------------------------------------------------------
   12. FOOTER
   ---------------------------------------------------------- */
.site-footer {
  background: #f1f5f9;
  border-top: 1px solid rgba(0,0,0,.05);
  padding: 48px 0 24px;
  margin-top: 80px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px,1fr));
  gap: 2rem;
  max-width: var(--container);
  margin: 0 auto 2rem;
  padding-inline: 1rem;
}

.footer-grid h4 { font-size: 1.1rem; font-weight: 700; margin-bottom: .75rem; color: var(--text); }

.footer-grid p,
.footer-grid a { color: var(--muted); font-size: .95rem; }

.footer-grid a:hover { color: var(--a2); text-decoration: underline; }

.footer-grid ul { list-style: none; padding: 0; }
.footer-grid ul li { margin-bottom: 4px; }

.footer-bottom {
  text-align: center;
  color: var(--muted);
  font-size: .875rem;
  padding-inline: 1rem;
}

/* ----------------------------------------------------------
   13. RESPONSIVE GLOBAL
   ---------------------------------------------------------- */
@media (max-width: 768px) {
  /* Mostrar hamburguesa */
  .nav-toggle { display: flex; position: absolute; right: 1rem; top: 1.5rem; }

  /* Nav colapsable */
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: white;
    flex-direction: column;
    padding: 1rem;
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: var(--shadow);
    display: none;
    border: 1px solid rgba(0,0,0,.06);
    margin-top: 1px;
  }

  .nav-links.show { display: flex; }

  /* En móvil los links son bloque */
  .nav-links a {
    display: block;
    width: 100%;
    padding: .75rem 1.5rem;
    text-align: center;
  }

  /* Sin underline activo en móvil */
  .nav-links a::after { display: none !important; }

  .social-icon { width: 44px; height: 44px; margin: .5rem auto; }
  .social-icon svg { width: 20px; height: 20px; }

  /* Ajustes generales */
  .gallery-slider { height: 240px; }
  .phone-mockup { width: 260px; height: 520px; }
  .site-footer { margin-top: 60px; }
}

@media (max-width: 480px) {
  .container { padding-inline: .75rem; }
  .phone-mockup { width: 220px; height: 440px; }
  .gallery-slider { height: 200px; }
}

/* ===== BOTÓN FLOTANTE WHATSAPP ===== */
.whatsapp-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9999;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #25d366;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 24px rgba(37,211,102,.5);
  transition: transform .25s ease, box-shadow .25s ease;
  text-decoration: none;
}

.whatsapp-fab svg {
  width: 32px;
  height: 32px;
}

.whatsapp-fab:hover {
  transform: scale(1.12) translateY(-3px);
  box-shadow: 0 12px 32px rgba(37,211,102,.65);
}

@media (max-width: 480px) {
  .whatsapp-fab { bottom: 18px; right: 18px; width: 52px; height: 52px; }
  .whatsapp-fab svg { width: 28px; height: 28px; }
}
