/* Hand-written additions on top of the compiled Tailwind stylesheet (styles.css).
   These replace the small bits of React state (mobile menu, dropdowns, FAQ accordion)
   with CSS-only equivalents so the site works without any JavaScript. */

/* Mobile menu: checkbox-driven drawer */
.mobile-menu-toggle-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.mobile-overlay {
  position: fixed;
  inset: 0;
  background: #000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  z-index: 40;
  border: 0;
  padding: 0;
  cursor: default;
  display: block;
}

.mobile-drawer {
  transform: translateX(100%);
  transition: transform 0.3s ease-out;
}

.mobile-menu-toggle-input:checked ~ .mobile-overlay {
  opacity: 0.3;
  pointer-events: auto;
}

.mobile-menu-toggle-input:checked ~ .mobile-drawer {
  transform: translateX(0);
}

/* Desktop dropdown menus (Reparación / Mantenimiento / Técnicos) */
.nav-dropdown-menu {
  display: none;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  display: block;
}

/* Mobile accordion submenus inside the drawer */
.mobile-nav-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  list-style: none;
  cursor: pointer;
}

.mobile-nav-summary::-webkit-details-marker,
.mobile-nav-summary::marker {
  display: none;
  content: '';
}

details[open] > .mobile-nav-summary .mobile-nav-chevron {
  transform: rotate(180deg);
}

/* FAQ accordion (native <details>/<summary>, no JS) */
.faq-summary {
  list-style: none;
  cursor: pointer;
}

.faq-summary::-webkit-details-marker,
.faq-summary::marker {
  display: none;
  content: '';
}

details.faq-item[open] > .faq-summary .faq-chevron {
  transform: rotate(180deg);
}

/* Floating action buttons (WhatsApp + Llamar).
   Written as plain, self-contained CSS (not Tailwind utility chains) so their
   circular shape and position never depend on which utility classes survived
   the Tailwind purge. */
.float-btn {
  position: fixed;
  right: 1.25rem;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, .35), 0 8px 10px -6px rgba(0, 0, 0, .25);
  color: #fff;
  text-decoration: none;
  line-height: 0;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.float-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, .4), 0 8px 10px -6px rgba(0, 0, 0, .3);
}

.float-btn-icon {
  width: 1.75rem;
  height: 1.75rem;
}

/* WhatsApp: bottom-right corner */
.float-whatsapp {
  bottom: 1.5rem;
  width: 3.5rem;
  height: 3.5rem;
  background-color: #22c55e;
}

.float-whatsapp:hover {
  background-color: #16a34a;
}

/* Llamar: vertically centered on the right edge, a bit bigger than WhatsApp */
.float-call {
  top: 50%;
  width: 4rem;
  height: 4rem;
  background-color: #2563eb;
  transform: translateY(-50%);
}

.float-call .float-btn-icon {
  width: 2rem;
  height: 2rem;
}

.float-call:hover {
  background-color: #1d4ed8;
  transform: translateY(-50%) scale(1.1);
}

/* Ringing/shaking phone icon */
.float-call-icon {
  animation: float-call-ring 2.6s ease-in-out infinite;
  transform-origin: 50% 15%;
}

@keyframes float-call-ring {
  0%, 55%, 100% { transform: rotate(0deg); }
  60% { transform: rotate(-22deg); }
  65% { transform: rotate(18deg); }
  70% { transform: rotate(-16deg); }
  75% { transform: rotate(10deg); }
  80% { transform: rotate(-6deg); }
  85% { transform: rotate(0deg); }
}

@media (max-width: 480px) {
  .float-btn-icon {
    width: 1.5rem;
    height: 1.5rem;
  }

  .float-whatsapp {
    right: 1rem;
    bottom: 1rem;
    width: 3rem;
    height: 3rem;
  }

  .float-call {
    right: 1rem;
    width: 3.5rem;
    height: 3.5rem;
  }

  .float-call .float-btn-icon {
    width: 1.75rem;
    height: 1.75rem;
  }
}
