/* Navigation Header */
.nav-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background-color: var(--glass-bg-light);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-bottom: 1px solid var(--glass-border);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.nav-logo {
  flex-shrink: 0;
}

.nav-logo img {
  height: 2.5rem;
  width: auto;
  max-width: 100%;
  transition: transform 0.2s ease;
}

.nav-logo:active img {
  transform: scale(0.95);
}

.nav-links {
  display: none;
}

@media (min-width: 1200px) {
  .nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
  }
}

.nav-link {
  color: var(--color-on-surface-variant);
  transition: color 0.2s ease;
  font-weight: 500;
}

.nav-link:hover {
  color: var(--color-primary);
}

.nav-link.active {
  color: var(--color-primary);
  border-bottom: 2px solid var(--color-primary);
  padding-bottom: 0.25rem;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-actions .material-symbols-outlined {
  color: var(--color-primary);
  font-size: 2rem;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.nav-actions .material-symbols-outlined:active {
  transform: scale(0.9);
}

.nav-phone span:not(.material-symbols-outlined) {
  white-space: nowrap;
}

/* Glass Panels & Cards */
.glass-panel {
  background: var(--glass-bg-light);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  box-shadow: inset 0 0 12px rgba(255, 255, 255, 0.2), 
              0 8px 32px 0 rgba(31, 38, 135, 0.04);
}

.card {
  border-radius: var(--radius-xl);
  padding: 2rem;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-8px) scale(1.01);
  border-color: rgba(61, 35, 255, 0.3);
  box-shadow: inset 0 0 12px rgba(255, 255, 255, 0.3),
              0 20px 40px rgba(61, 35, 255, 0.08);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-full);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.96) translateY(-1px) !important;
}

.btn-lg {
  padding: 1rem 2.25rem;
  font-size: 16px;
}

.btn-primary {
  background: linear-gradient(135deg, #3d23ff 0%, #7000ff 30%, #00f2fe 70%, #3d23ff 100%);
  background-size: 200% auto;
  color: var(--color-on-primary);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 20px rgba(61, 35, 255, 0.25);
}

.btn-primary:hover {
  background-position: right center;
  box-shadow: 0 8px 30px rgba(112, 0, 255, 0.4);
  transform: translateY(-2px);
}

.btn-primary:hover .btn-arrow {
  transform: translateX(4px);
}

.btn-arrow {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-block;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(61, 35, 255, 0.25);
  color: var(--color-primary);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.btn-secondary:hover {
  border-color: rgba(61, 35, 255, 0.8);
  background: rgba(61, 35, 255, 0.08);
  color: #3d23ff;
  box-shadow: 0 8px 25px rgba(61, 35, 255, 0.15);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--color-on-primary);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--color-on-primary);
  transform: translateY(-2px);
}

/* Badges & Chips */
.badge {
  display: inline-block;
  padding: 0.35rem 1rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-outline-variant);
  background: var(--glass-bg-light);
  color: var(--color-primary);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 1.5rem;
}

/* Icon Container */
.icon-circle {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Service card icons: slightly larger (home) */
.service-card .icon-circle {
  width: 4rem;
  height: 4rem;
}
.service-card .icon-circle .material-symbols-outlined {
  font-size: 1.5rem;
}

.card:hover .icon-circle {
  transform: scale(1.1);
}

.bg-primary-tint {
  background-color: rgba(39, 0, 208, 0.1);
  color: var(--color-primary);
}

.bg-secondary-tint {
  background-color: rgba(52, 220, 208, 0.15);
  color: #006a64;
}

.bg-tertiary-tint {
  background-color: rgba(74, 83, 186, 0.1);
  color: var(--color-secondary);
}

/* Department Tab Selector */
.dept-tab-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 4rem;
}

.dept-tab {
  padding: 0.75rem 2rem;
  border-radius: var(--radius-full);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--color-outline-variant);
  background: var(--glass-bg-light);
  color: var(--color-on-surface-variant);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.dept-tab:hover {
  background: rgba(39, 0, 208, 0.08);
  color: var(--color-primary);
  border-color: rgba(61, 35, 255, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(61, 35, 255, 0.12);
}

.dept-tab.active {
  background: linear-gradient(135deg, #3d23ff 0%, #7000ff 30%, #00f2fe 70%, #3d23ff 100%);
  background-size: 200% auto;
  color: var(--color-on-primary);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 20px rgba(61, 35, 255, 0.3);
}

.dept-tab.active:hover {
  background-position: right center;
  box-shadow: 0 8px 30px rgba(112, 0, 255, 0.45);
  transform: translateY(-2px);
  color: var(--color-on-primary);
}

/* Before / After Layout */
.comparison-card {
  padding: 2.5rem;
  border-radius: var(--radius-xl);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.comparison-card.before {
  border-color: rgba(186, 26, 26, 0.1);
  background: rgba(255, 255, 255, 0.5);
}

.comparison-card.before:hover {
  transform: scale(1.02);
  box-shadow: 0 15px 30px rgba(186, 26, 26, 0.04);
  border-color: rgba(186, 26, 26, 0.2);
}

.comparison-card.after {
  border-color: rgba(61, 35, 255, 0.15);
  box-shadow: 0 10px 30px rgba(61, 35, 255, 0.03);
}

.comparison-card.after:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(21, 207, 195, 0.15);
  border-color: var(--color-secondary-fixed-dim);
}

.comparison-label {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
}

.comparison-label.error {
  background-color: rgba(186, 26, 26, 0.1);
  color: var(--color-error);
}

.comparison-label.success {
  background-color: rgba(52, 220, 208, 0.15);
  color: #006a64;
}

.comparison-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.comparison-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.comparison-list li .material-symbols-outlined {
  font-size: 1.25rem;
  margin-top: 0.15rem;
}

.comparison-list li .material-symbols-outlined.text-error {
  color: var(--color-error);
}

.comparison-list li .material-symbols-outlined.text-success {
  color: var(--color-secondary-fixed-dim);
}

/* FAQ Accordion */
.faq-list {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.faq-item {
  background: var(--color-surface);
  border: 1px solid var(--color-outline-variant);
  border-radius: var(--radius-lg);
  transition: border-color 0.2s ease;
}
.faq-item[open] { border-color: rgba(39, 0, 208, 0.3); }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-on-surface);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--color-primary);
  flex-shrink: 0;
}
.faq-item[open] summary::after { content: '−'; }
.faq-item .faq-answer {
  padding: 0 1.5rem 1.5rem 1.5rem;
  font-size: 15px;
  line-height: 1.65;
  color: var(--color-on-surface-variant);
}

/* Contact Form */
.form-panel {
  min-width: 0;
  background: rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  border: 1px solid var(--glass-border);
}

.form-group {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-on-surface-variant);
  font-weight: 600;
}

.form-input {
  min-width: 0;
  max-width: 100%;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--color-outline-variant);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 16px;
  color: var(--color-on-surface);
  transition: all 0.3s ease;
}

.form-input:focus {
  background: rgba(255, 255, 255, 0.9);
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(61, 35, 255, 0.1);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
  .form-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Premium Social Links in Footer */
.social-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--color-on-surface-variant);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  align-self: flex-start;
}

.social-link:hover {
  color: #3d23ff;
  background: rgba(61, 35, 255, 0.06);
  border-color: rgba(61, 35, 255, 0.15);
  transform: translateY(-2px);
}

.social-link svg {
  width: 1.25rem;
  height: 1.25rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.3s ease;
}

.social-link:hover svg {
  transform: scale(1.1);
}

/* Status indicator in footer */
.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  background: var(--glass-bg-light);
  border: 1px solid rgba(39, 0, 208, 0.1);
  border-radius: var(--radius-full);
  box-shadow: 0 2px 10px rgba(39, 0, 208, 0.05);
}

.status-dot {
  width: 10px;
  height: 10px;
  background-color: var(--color-primary);
  border-radius: 50%;
  position: relative;
}

.status-dot::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: var(--color-primary);
  border-radius: 50%;
  animation: status-pulse 1.5s infinite ease-in-out;
}

@keyframes status-pulse {
  0% {
    transform: scale(1);
    opacity: 0.75;
  }
  100% {
    transform: scale(2.5);
    opacity: 0;
  }
}

/* Interactive Efficiency Calculator Slider Styling */
input[type="range"]#hours-slider {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  border-radius: var(--radius-full);
  background: rgba(39, 0, 208, 0.12);
  outline: none;
  transition: background 0.3s ease;
}

input[type="range"]#hours-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--gradient-btn);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(61, 35, 255, 0.4);
  border: 2px solid #ffffff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

input[type="range"]#hours-slider::-webkit-slider-thumb:hover {
  transform: scale(1.25);
  box-shadow: 0 6px 18px rgba(112, 0, 255, 0.6);
}

input[type="range"]#hours-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--gradient-btn);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(61, 35, 255, 0.4);
  border: 2px solid #ffffff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

input[type="range"]#hours-slider::-moz-range-thumb:hover {
  transform: scale(1.25);
  box-shadow: 0 6px 18px rgba(112, 0, 255, 0.6);
}

/* Floating WhatsApp CTA */
.floating-whatsapp {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 999;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.35);
  text-decoration: none;
  opacity: 0;
  transform: translateY(20px) scale(0.9);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease, bottom 0.3s ease;
}
.floating-whatsapp.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.floating-whatsapp:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 12px 28px rgba(37, 211, 102, 0.45);
}
.floating-whatsapp.cookie-active {
  bottom: 5rem;
}
@media (max-width: 768px) {
  .floating-whatsapp {
    bottom: 1rem;
    right: 1rem;
    width: 52px;
    height: 52px;
  }
  .floating-whatsapp.cookie-active {
    bottom: 4.5rem;
  }
}

@media (min-width: 769px) {
  .floating-whatsapp {
    display: none !important;
  }
}

/* =========================================================
   Mobile menu: hamburger toggle + slide-down drawer
   Drawer se transforma en layout inline en desktop (≥1200px).
   ========================================================= */

/* Toggle (☰) — solo visible en móvil (<1200px) */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-left: auto;
  background: transparent;
  border: 0;
  border-radius: var(--radius-md);
  color: var(--color-on-surface);
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.nav-toggle:hover {
  background: rgba(39, 0, 208, 0.06);
}
.nav-toggle[aria-expanded="true"] {
  background: rgba(39, 0, 208, 0.12);
}
.nav-toggle .material-symbols-outlined {
  font-size: 1.75rem;
}
@media (min-width: 1200px) {
  .nav-toggle {
    display: none;
  }
}

/* Drawer — solo móvil. Por defecto cerrado (translateY(-110%)) */
.nav-drawer {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(20px) saturate(120%);
  -webkit-backdrop-filter: blur(20px) saturate(120%);
  border-bottom: 1px solid rgba(26, 28, 28, 0.12);
  box-shadow: 0 18px 40px rgba(26, 28, 28, 0.12);
  z-index: 99;
  padding: 1rem var(--margin-mobile);
  gap: 0.25rem;
  transform: translateY(-110%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}
.nav-drawer.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.nav-drawer .nav-links {
  display: flex !important;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  margin: 0;
}
.nav-drawer .nav-links .nav-link {
  display: block;
  padding: 0.9rem 0;
  font-size: 1.05rem;
  font-weight: 500;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}
.nav-drawer .nav-links .nav-link.active {
  color: var(--color-primary);
  border-bottom: 1px solid var(--color-primary);
  padding-bottom: 0.9rem;
}
.nav-drawer .nav-actions {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: stretch;
}
.nav-drawer .nav-actions .btn,
.nav-drawer .nav-actions .nav-phone {
  justify-content: center;
}

/* En desktop: el drawer se vuelve layout inline (display: contents).
   Mantiene el flujo visual original del header. */
@media (min-width: 1200px) {
  .nav-drawer {
    position: static;
    flex-direction: row;
    align-items: center;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 0;
    box-shadow: none;
    padding: 0;
    transform: none;
    opacity: 1;
    pointer-events: auto;
    flex: 1;
    justify-content: space-between;
  }
  .nav-drawer .nav-links {
    flex-direction: row;
    align-items: center;
    gap: 2rem;
    margin-left: 2rem;
    border: 0 !important;
  }
  .nav-drawer .nav-links .nav-link {
    padding: 0;
    border-bottom: 0 !important;
  }
  .nav-drawer .nav-actions {
    margin-top: 0;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
  }
}

/* Icono SVG inline del toggle (sustituye al Material Symbols 'menu'
   que tenía problemas de ligaduras en algunos navegadores móviles). */
.nav-toggle-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

/* ReCAPTCHA v3 badge: lo integramos en el formulario de contacto,
   debajo de la política de privacidad, ocultando el badge flotante
   y mostrando el texto obligatorio que exige Google. */
.form-captcha-wrapper {
  display: block !important;
  min-height: 0 !important;
  margin: 0.5rem 0 !important;
  text-align: left !important;
  justify-content: flex-start !important;
}

.form-recaptcha-notice {
  display: block;
  font-size: 11px;
  line-height: 1.4;
  color: var(--color-on-surface-variant);
  margin: 0;
}

.grecaptcha-badge,
.grecaptcha-badge-container {
  display: none !important;
}
