/* =========================
   Globals & Tipografías
   ========================= */
@import "./fonts.css";

* { box-sizing: border-box; }

/* Limita transiciones a elementos interactivos (mejor rendimiento) */
a, button, .menu-item, .menu-link, .social-icon { transition: .3s; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Gotham-Medium', sans-serif;
  overflow-x: hidden;
  color: #000;
}

/* Contenedor centrado común */
.center {
  width: 90%;
  max-width: 1248px;
  margin: 0 auto;
}

/* Secciones genéricas (usa .section en tu HTML) */
.section { padding: 4rem 0; }
.section-hero { padding-top: 6rem; } /* despeje adicional por menú fijo */

/* =========================
   Navbar (menú fijo)
   ========================= */
#menu {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 999999999999;
  height: 80px;
  display: flex; align-items: center; justify-content: center;
  padding: 10px 0;
  background: transparent;
}
#menu.active { background-color: #000; }

#menu .center {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
}

/* Logo */
.menu-logo { height: 70px; cursor: pointer; }

/* Redes en el header (AUMENTADAS +15%) */
.menu-social{
  display:flex; align-items:center; gap:12px;
}
.menu-social a{ display:inline-flex; }
.menu-social .social-icon,
.menu-social img{
  height:32px;     /* 28px → 32px */
  width:auto;
  display:block;
}

/* Menú móvil (hamburguesa) */
#menu-mobile-controller { display: none; }

#menu-mobile-icon {
  display: flex; align-items: center; justify-content: center;
  width: 50px; height: 50px; font-size: 20px; line-height: 100%;
  background: #000; color: #FFDE17; border-radius: 50px;
  text-shadow: 1px 1px 3px rgba(0,0,0,.5);
  box-shadow: 0 0 0 #000;
  transform: rotate(0);
}
#menu-mobile-icon:hover { box-shadow: 0 0 10px #444; }
#menu-mobile-controller:checked + #menu-mobile-icon { transform: rotate(-270deg); }

/* Lista del menú */
.menu-list {
  position: absolute; top: 75px; left: 0; right: 0;
  margin: 0; padding: 0;
  list-style: none;
  background-color: #000; color: #FFF;
  border-radius: 8px; text-align: center;
  transform: scaleY(0); transform-origin: top; overflow: hidden;
  box-shadow: 0 2px 4px #222;
}
#menu-mobile-controller:checked ~ .menu-list { transform: scaleY(1); }

.menu-item { padding: 20px 10px; }
.menu-item:not(:last-child) { border-bottom: 2px solid #FFDE17; }
.menu-item.active { color: #FFDE17; background: transparent; }
.menu-link { color: inherit; text-decoration: none; }

/* Desktop nav */
@media screen and (min-width: 1024px) {
  .menu-logo { height:60px; margin-left: 20px; }
  #menu-mobile-icon { display: none; }
  .menu-list {
    position: relative; top: 0;
    transform: scaleY(1);
    display: flex; align-items: center; justify-content: center;
    background: transparent; box-shadow: none;
  }
  .menu-item { border-bottom: 0 !important; margin-left: 20px; }
  .menu-item.active {
    background-color: #FFDE17;
    color: #000;
    border-radius: 20px;
    padding: 7.5px 20px;
    font-weight: 300;
  }
}

/* =========================
   Hero
   ========================= */
#hero {
  background-image: url(../images/bg-header.webp);
  background-size: cover; background-repeat: no-repeat; background-position: center;
  color: #FFF;
  font-size: 15px;
  height: 70vh; max-height: 550px;
  text-align: right;
  position: relative;
  z-index: 1; /* asegura que quede por encima de fondos, no de #menu */
}

.hero-container {
  position: relative;
  max-width: 525px;
  margin: 0 auto;
}

/* Teléfono (imagen) + tarjetas de contacto */
#hero .cellphone {
  position: absolute;
  top: 110px; right: 10px;
  height: 300px; width: 150px;
  z-index: 1;
}

/* Título principal (h1 en tu HTML) */
#hero h1 {
  position: absolute;
  top: 150px; left: -200px; right: 165px;
  margin: 0;
  z-index: 1;
}

/* Banda amarilla */
#hero .banner {
  position: absolute;
  top: 270px; left: 10px; right: 160px;
  padding: 10px 5px 10px 20px;
  background-color: #FFDE17; color: #000;
  border-top-left-radius: 60px; border-bottom-left-radius: 60px;
  z-index: 1;
}

/* Tarjetas de llamada/whatsapp (desktop) */
#hero .phone,
#hero .whatsapp {
  position: absolute; right: 10px; left: calc(100% - 160px);
  text-align: center; z-index: 1;
}
#hero .phone { top: 160px; }
#hero .whatsapp { top: 270px; }
#hero .phone p, #hero .whatsapp p { margin: 0; color: #FFF; }

@media screen and (min-width: 768px) {
  #hero .hero-container { margin: 0 20px 0 auto; transform: scale(1.1); }
  #hero .center { width: 90%; margin: 0 auto; max-width: 1248px; }
}

/* ===== FIX DESKTOP: separa hero de la sección de servicios y evita solape */
@media (min-width: 1024px){
  #hero{ padding-bottom: 3.5rem; }       /* colchón inferior extra */
}

/* =========================
   Servicios + Mapa
   ========================= */
#info .services {
  display: flex; justify-content: center; align-items: center;
  flex-wrap: wrap; gap: 0; padding: 20px;
}
.service {
  background-color: #f0f1f4;
  border-radius: 20px;
  display: flex; justify-content: center; align-items: center;
  padding: 10px; margin: 20px 30px;
}
.service img { width: 90%; height: auto; display: block; 
}
.mapa-desktop { position: relative; width: 100%; }
.mapa-description {
  text-align: center; color: #6D6E71;
  padding: 20px 10px 10px;
  font-family: 'Gotham-Light';
}
.mapa-description p, .waze p {
  margin: 0 auto; line-height: 200%; font-weight: 300; max-width: 90%;
}
.waze {
  border-top: 1px solid rgba(109,110,113,.77);
  text-align: center; color: #6D6E71;
  padding: 20px 10px; font-family: 'Gotham-Light';
}

/* Layout desktop: servicios + mapa en grid flexible */
@media screen and (min-width: 1024px) {
  #info {
    position: relative;
    top: 0 !important;                 /* ← antes estaba -75px; ahora NO sube */
    width: 90%; max-width: 1248px; margin: auto;
    margin-top: 16px !important;       /* pequeño espacio respecto al hero */
  }
  .services {
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
    padding: 20px 0 !important;
  }
  .service { max-width: 30%; margin: 0 .5%; }

  .map {
    display: flex; justify-content: center; align-items: center;
    gap: 24px; margin: 50px auto 0;
  }
  .mapa-desktop {
    display: block; overflow: hidden; border-radius: 20px; width: 60%;
  }
  .mapa-description {
    width: 40%; text-align: left; font-size: 18px;
  }
  .waze { text-align: left; }
}

/* =========================
   Contacto (Slider)
   ========================= */
#contact {
  display: flex; justify-content: center; align-items: center;
  flex-wrap: wrap; font-family: 'Gotham-Light'; font-size: 18px;
}

#contact p {
  width: 90%; text-align: center; margin: 40px auto;
}

#contact .bx-wrapper {
  width: 100%; max-width: 590px !important;
  border-radius: 0; box-shadow: none;
}
#contact .bx-viewport { height: 260px; }
#contact .slider { height: 260px; }
#contact .slider > div { width: 100% !important; }

.bx-wrapper .bx-pager, .bx-wrapper .bx-controls-auto { bottom: -22px; }
.bx-wrapper .bx-pager-item { opacity: .7; }

@media screen and (min-width: 1024px) {
  #contact p {
    order: -1; margin-top: 0; margin-bottom: 65px;
  }
  #contact .bx-wrapper {
    width: 50%; margin-top: -85px;
  }
}

/* =========================
   Formularios (si se usan)
   ========================= */
form {
  display: flex; justify-content: center; align-items: center; flex-wrap: wrap;
}
input, textarea {
  border: 1px solid #ccc; outline: none; border-radius: 20px;
  width: 90%; margin: 0 auto 15px; padding: 15px 10px 15px 15px;
  font-size: 15px; font-family: inherit;
}
textarea { min-height: 150px; }
input:hover, textarea:hover { border-color: #FFDE17; }

button {
  width: 200px; border: none; margin: 0 auto;
  background-color: #FFDE17; color: #000;
  padding: 10px 15px; border-radius: 20px;
  text-transform: uppercase; font-weight: bold;
  cursor: pointer;
}

@media screen and (min-width: 1024px) {
  form { width: 45%; margin: -40px 0 60px; }
  input, textarea {
    margin: 0 auto 2% !important; width: 80%;
    padding: 12.5px 17.5px; font-size: 15px;
  }
  textarea { min-height: 100px; padding: 12.5px; }
}

/* =========================
   Footer
   ========================= */
footer {
  background: #000; color: #FFF;
  font-family: 'Gotham-Light', sans-serif;
  min-height: 100px;
  margin-top: -75px;
  padding: 100px 5px 50px;
  display: flex; justify-content: space-around; align-items: center; flex-wrap: wrap;
}
footer a { color: inherit; text-decoration: none; }
footer a:hover { text-decoration: underline; }

.icon {
  width: 80%; min-width: 120px;
  margin: 5% 0; text-align: center; font-size: 18px;
}
@media screen and (min-width: 1024px) {
  .icon { width: 50%; }
}

/* Botón fijo (si se usa) */
.chatea {
  position: fixed; right: 20px; bottom: 0;
  background-color: #FFDE17; color: #000;
  padding: 15px 30px; border-top-left-radius: 30px; border-top-right-radius: 30px;
}

/* =========================
   Responsive ≤ 500px
   ========================= */
/* Header compacto y redes en una fila */
@media screen and (max-width: 500px){
  /* Íconos de redes +15% y prioridad sobre reglas previas */
  .menu-social{
    display:flex !important; flex-direction:row !important; flex-wrap:nowrap !important;
    justify-content:center !important; align-items:center !important;
    gap:10px !important; width:100%;
  }
  .menu-social img,
  .menu-social .social-icon,
  .menu-social .menu-logo{
    height: 30px !important;   /* 26px → 30px */
    width: auto !important; display:block;
  }

  /* Logo empresa un poco más compacto para caber mejor */
  #menu .center > img.menu-logo{ height: 44px !important; }

  /* Hamburguesa más pequeña */
  #menu-mobile-icon{ width: 42px; height: 42px; font-size: 18px; }
}

/* Hero apilado, sin solapes, tarjetas dentro del celular */
@media screen and (max-width: 500px){
  #hero{
    height:auto !important; max-height:none !important;
    padding: calc(80px + 12px) 0 20px !important; /* despeje por menú fijo */
    text-align:center; background-position:center;
  }

  .hero-container{
    display:grid;
    grid-template-areas:
      "device"
      "title"
      "banner";
    row-gap:12px;
    justify-items:center;
    width:100%; max-width:520px; margin:0 auto;
  }

  /* Stack del equipo + tarjetas adentro */
  .phone-stack{ grid-area: device; position: relative; width: min(250px, 72vw); margin: 0 auto; }
  .phone-stack .cellphone{ width: 100%; height: auto; display: block; }

  /* Tarjetas de contacto centradas dentro de la pantalla del PNG */
  .phone-stack .phone,
  .phone-stack .whatsapp{
    position: absolute !important;
    left: 50% !important; transform: translateX(-50%) !important;
    width: 40% !important;  /* ancho de cada tarjeta dentro del cel */
    margin: 0 !important; text-align: center; z-index: 2;

    display:flex; flex-direction:column; align-items:center; justify-content:center;
    gap: 6px; padding: 6px 0;
  }
  /* Ajusta estas cifras si tu PNG cambia */
  .phone-stack .phone{    top: 23% !important; }
  .phone-stack .whatsapp{ bottom: 17% !important; }

  .phone-stack .phone img,
  .phone-stack .whatsapp img{
    width: clamp(44px, 24%, 40px); height: auto;
  }
  .phone-stack .phone p,
  .phone-stack .whatsapp p{
    margin: 0; font-size: 13px; line-height: 1; color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,.6);
  }

  /* Título y banner en bloque, sin posición absoluta */
  #hero h1{
    grid-area: title;
    position: static !important;
    margin: 0; padding: 0 12px; font-size: 22px; line-height: 1.2; color: #FFF;
  }
  #hero .banner{
    grid-area: banner;
    position: static !important;
    width: calc(100% - 24px);
    padding: 12px; border-radius: 16px; margin: 0 auto; color: #000;
  }
}

/* ===== FIX MOBILE: compactar espacios bajo el mapa y antes del slider ===== */
@media (max-width: 500px){
  .section{ padding: 2.25rem 0; }        /* antes: 4rem */
  .section-info{ padding-bottom: 1.25rem; }
  .section-contact{ padding-top: 0.75rem; }

  .mapa-description{ padding-bottom: 8px; }
  .waze{ padding: 12px 10px 8px; }

  #contact .bx-wrapper{ margin-top: 0 !important; }
}
/* =========================
   FIXES FINALES (pegar al FINAL del CSS)
   ========================= */

/* 1) MÓVIL: el celular deja de ser absolute; #hero toma su altura */
@media (max-width: 600px){
  #hero{ 
    height: auto !important;
    max-height: none !important;
    padding: calc(80px + 12px) 0 16px !important; /* despeje superior por el menú */
  }

  /* El contenedor del equipo (ancla para absolutos internos) */
  #hero .phone-stack{
    position: relative !important;
    width: min(260px, 72vw) !important;
    margin: 0 auto !important;
  }

  /* El PNG del celular: estático y dimensionado por ancho */
  #hero .cellphone{
    position: static !important;        /* ← clave para que #hero crezca */
    width: 100% !important;
    height: auto !important;
    display: block !important;
    margin: 0 auto !important;
    z-index: 1 !important;
  }

  /* Tarjetas dentro de la pantalla del PNG (centradas y ancladas al .phone-stack) */
  #hero .phone,
  #hero .whatsapp{
    position: absolute !important;      /* pero ahora relativas a .phone-stack */
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    width: 62% !important;              /* ancho de cada tarjeta dentro de la pantalla */
    margin: 0 !important;
    text-align: center !important;
    z-index: 2 !important;
    background: transparent;
  }
  /* Ajusta estas cifras si tu PNG cambia */
  #hero .phone{    top: 23% !important; }
  #hero .whatsapp{ bottom: 17% !important; }

  #hero .phone img,
  #hero .whatsapp img{
    width: 44px !important;             /* tamaño del icono */
    height: auto !important;
    display: block !important;
    margin: 0 auto !important;
  }
  #hero .phone p,
  #hero .whatsapp p{
    margin: 6px 0 0 !important;
    font-size: 13px !important;
    line-height: 1 !important;
    color: #fff !important;
    text-shadow: 0 1px 2px rgba(0,0,0,.6) !important;
  }

  /* Título y banner como bloques normales (sin solapes) */
  #hero h1{
    position: static !important;
    margin: 8px 0 0 !important;
    padding: 0 12px !important;
    font-size: 22px !important;
    line-height: 1.2 !important;
    color: #FFF !important;
    z-index: 1 !important;
    text-align: center;
  }
  #hero .banner{
    position: static !important;
    width: calc(100% - 24px) !important;
    padding: 12px !important;
    border-radius: 16px !important;
    margin: 8px auto 0 !important;
    color: #000 !important;
  }

  /* 2) Compactar más el espacio entre Waze y el slider */
  .section{ padding: 2rem 0 !important; }      /* antes 2.25rem */
  .section-info{ padding-bottom: 0.75rem !important; }
  .section-contact{ padding-top: 0.5rem !important; }
  .mapa-description{ padding-bottom: 6px !important; }
  .waze{ padding: 10px 10px 6px !important; }
  #contact .bx-wrapper{ margin-top: 0 !important; }
}

/* 3) ESCRITORIO: un poco más de colchón bajo el hero y NO subir #info */
@media (min-width: 1024px){
  #hero{ padding-bottom: 3.75rem !important; }  /* separa del bloque de servicios */
  #info{
    top: 0 !important;
    margin-top: 16px !important;
  }
}

/* === Slider: esquinas 100% redondeadas === */
#contact .bx-wrapper,
#contact .bx-viewport,
#contact .slider,
#contact .slider img{
  border-radius: 18px !important;   /* ajusta 18px si quieres más/menos */
  overflow: hidden !important;
}

#contact .slider img{
  display: block;
  width: 100%;
  height: auto;                     /* mantiene proporción de cada foto */
}

/* === Hero móvil: celular con proporción correcta y tamaño controlado === */
@media (max-width: 600px){
  /* el contenedor del teléfono */
  #hero .phone-stack{
    position: relative !important;
    width: clamp(180px, 48vw, 230px) !important;  /* ↓ menos ancho = menos alto */
    margin: 0 auto !important;
  }

  /* la imagen del celular: sin deformación */
  #hero .cellphone{
    position: static !important;
    width: 100% !important;
    height: auto !important;         /* ← mantiene relación de aspecto */
    display: block !important;
  }

  /* tarjetas dentro del celular (reubico un pelín por el nuevo tamaño) */
  #hero .phone,
  #hero .whatsapp{
    position: absolute !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 62% !important;
    text-align: center !important;
    z-index: 2 !important;
  }
  #hero .phone{    top: 24% !important; }     /* sube/baja si hace falta */
  #hero .whatsapp{ bottom: 18% !important; }

  #hero .phone img,
  #hero .whatsapp img{
    width: 44px !important;
    height: auto !important;
  }
  #hero .phone p,
  #hero .whatsapp p{
    margin: 6px 0 0 !important;
    font-size: 13px !important;
    line-height: 1 !important;
  }
}
/* Footer con 3 items (sin teléfono fijo) */
@media (min-width: 1024px){
  footer .icon{ width: 33.333% !important; }  /* 3 columnas parejas */
}

@media (max-width: 1023px){
  footer .icon{ width: 90% !important; }      /* tarjeta amplia en móvil/tablet */
}

.accordion {
  margin: 20px 0;
  border: 1px solid #ddd;
  border-radius: 6px;
  overflow: hidden;
}

.accordion-btn {
  width: 100%;
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 4px;          /* Bordes redondeados */
  padding: 12px;
  text-align: center;          /* Texto centrado */
  font-size: 1rem;
  font-family: 'Gotham-Light', sans-serif;
  cursor: pointer;
  transition: all 0.3s ease;   /* Suaviza todos los cambios */
  box-shadow: 0 2px 4px rgba(0,0,0,0.1); /* Sombra ligera */
}

.accordion-btn:hover {
  background: #e0e0e0;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15); /* Sombra más notoria en hover */
}

.accordion-content {
  display: none;
  padding: 15px;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #333;
}

.accordion h2 {
  text-align: center; /* centra el texto */
}
.accordion-btn[aria-expanded="true"] {
  background: #e0e0e0;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15); /* Sombra más notoria cuando está abierto */
}
.accordion-btn[aria-expanded="true"]::after {
  content: "▲"; /* Flecha hacia arriba */
  float: right;
}
.accordion-btn[aria-expanded="false"]::after {
  content: "▼"; /* Flecha hacia abajo */
  float: right;
}
.accordion-content[aria-hidden="false"] {
  display: block;
} 