/* responsive.css
   Contiene solo reglas relacionadas a la navegación móvil (hamburger)
   y algunos ajustes móviles básicos. */

/* --- base: ocultar toggle en desktop --- */
.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 6px;
}

/* hamburger lines */
.nav-toggle .hamburger {
  width: 22px;
  height: 2px;
  background: #222;
  display: block;
  position: relative;
  border-radius: 2px;
}
.nav-toggle .hamburger::before,
.nav-toggle .hamburger::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: inherit;
  border-radius: 2px;
}
.nav-toggle .hamburger::before { top: -7px; }
.nav-toggle .hamburger::after  { top:  7px; }

/* Nav links default (desktop) kept as flex row in main.css */
/* .main-nav .nav-links { display:flex; gap:... } */

/* mobile breakpoints: show toggle, hide inline nav */
@media (max-width: 900px) {
  .nav-toggle { display: flex; }

  /* hide the normal inline nav links */
  .main-nav .nav-links {
    display: none;
  }

  /* show actions in menu (if you hide .nav-actions on mobile in main.css, they can be included in menu) */

  /* menu when opened: we use absolute panel */
  .main-nav .nav-links.open {
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: absolute;
    top: calc(100% + 8px);   /* below the topbar */
    right: 18px;
    min-width: 200px;
    background: rgba(255,255,255,0.98);
    border-radius: 10px;
    padding: 12px;
    box-shadow: 0 18px 50px rgba(0,0,0,0.12);
    z-index: 9999;
  }

  /* style links inside the dropdown */
  .main-nav .nav-links.open a {
    display: block;
    padding: 8px 10px;
    color: var(--text);
    font-weight: 700;
    white-space: nowrap;
  }
  .main-nav .nav-links.open a:hover,
  .main-nav .nav-links.open a:focus {
    background: rgba(0,0,0,0.04);
    border-radius: 6px;
  }

  /* ensure header topbar is positioned so menu absolute works */
  .site-header .topbar { position: relative; z-index: 50; }

  /* optional: hide nav-actions (CONTACTOS) to keep menu compact */
  .nav-actions { display: none; }

  /* small adjustments to layout for hero etc (kept minimal here) */
  .hero { grid-template-columns: 1fr; gap: 20px; padding-top: 18px; text-align: center; }
  .hero-left { order: -1; margin-top: 0; }
  .hero-ctas { justify-content: center; flex-wrap: wrap; }
}

/* Very small screens: make menu full width popover (optional) */
@media (max-width: 420px) {
  .main-nav .nav-links.open {
    right: 8px;
    left: 8px;
    top: calc(100% + 10px);
    min-width: auto;
    padding: 12px;
  }
}

/* Services grid */
.services-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 1.25rem;
  align-items: stretch;
}

/* Card */
.service-card {
  background: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(7, 18, 34, 0.06);
  display: flex;
  flex-direction: column;
  transition: transform 280ms cubic-bezier(.2,.8,.2,1), box-shadow 280ms ease;
}

/* Image container */
.service-card figure {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
}
.service-card img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  display: block;
  transition: transform 400ms ease, filter 300ms ease;
}

/* Content */
.service-body {
  padding: 1rem;
  flex: 1 1 auto;
}
.service-body h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.05rem;
}
.service-body p {
  margin: 0;
  color: #444;
  line-height: 1.45;
  font-size: 0.95rem;
}

/* Hover / focus effect */
.service-card:hover,
.service-card:focus-within {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(8,20,40,0.12);
}
.service-card:hover img,
.service-card:focus-within img {
  transform: scale(1.03);
  filter: saturate(1.05);
}

/* Responsive */
@media (max-width: 1000px) {
  .services-list { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .services-list { grid-template-columns: 1fr; }
  .service-card img { height: 160px; }
}


@media (max-width: 768px) {
  .nav-actions {
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
  }

  .fb-icon {
    width: 32px;
    height: 32px;
  }
}

/* ===== Ajustes para móviles ===== */
@media (max-width: 768px) {
  .nav-actions {
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
  }

  .fb-icon {
    width: 48px;
    height: 48px;
    margin-top: 6px;
    transition: transform 0.3s ease;
  }

  .fb-icon:hover {
    transform: scale(1.15);
  }
}


/* ===== BOTÓN FLOTANTE FACEBOOK (estilo WhatsApp-like) ===== */
.facebook-float {
  position: fixed;
  right: 18px;               /* misma distancia desde la derecha que WhatsApp */
  bottom: 92px;              /* 92 para quedar encima del WhatsApp (ajusta si hace falta) */
  width: 64px;               /* mismo tamaño visual */
  height: 64px;
  border-radius: 50%;
  background-color: #ffffff; /* si tu icono ya tiene fondo transparente, puedes poner transparent */
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 8px 20px rgba(0,0,0,0.22);
  z-index: 99999;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

/* imagen dentro del botón */
.facebook-float img {
  width: 36px;
  height: 36px;
  display: block;
}

/* feedback táctil/hover */
.facebook-float:active,
.facebook-float:hover {
  transform: translateY(-4px) scale(1.04);
  box-shadow: 0 10px 28px rgba(0,0,0,0.28);
}

/* mostrar sólo en móviles (opcional) */
@media (min-width: 769px) {
  .facebook-float { display: none; }
}

/* si el WhatsApp tiene otra altura, ajusta */
@media (max-width: 420px) {
  .facebook-float {
    right: 14px;
    bottom: 88px;
    width: 56px;
    height: 56px;
  }
  .facebook-float img { width: 32px; height: 32px; }
}
