/* Barensa - Custom Styles */

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

body {
  text-rendering: optimizeLegibility;
}

/* Top-bar (teléfono, email, idioma) */
.header-sticky .hidden.md\:block > div {
  font-size: 0.7rem; /* ~11px, más pequeño que text-xs (12px) */
}

/* Sticky header */
.header-sticky {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  transition: box-shadow 0.3s ease;
}

.header-sticky.scrolled {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

/* Dropdown menu (hamburger) */
.mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.mobile-menu.open {
  max-height: 800px;
}

/* Dropdown */
.dropdown-menu {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Fade-in animation on scroll */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* FAQ accordion */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-answer.open {
  max-height: 1000px;
}

.faq-icon {
  transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

/* Button hover effects */
.btn-primary {
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
iframe:focus-visible {
  outline: 3px solid rgba(45, 140, 90, 0.4);
  outline-offset: 3px;
}

/* Card hover */
.card-hover {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* Stats counter animation */
@keyframes countUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Form focus styles */
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: #2d8c5a;
  box-shadow: 0 0 0 3px rgba(45, 140, 90, 0.15);
}

/* WhatsApp floating button */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99;
  width: 60px;
  height: 60px;
  background-color: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}

.whatsapp-float svg {
  width: 32px;
  height: 32px;
  fill: white;
}

/* Placeholder image styling */
.placeholder-img {
  background-color: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  font-size: 0.875rem;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .fade-in {
    opacity: 1;
    transform: none;
  }
}
