/* ==========================================================================
   ALEGRÍAS TOURS - MOBILE STYLES & LIQUID GLASS DOCK
   Luminous crystal-clear dock (#FAF9F5 / Liquid Glass identity)
   Strictly active on mobile (< 768px). Hidden on desktop.
   Respects safe-area insets and prevents content overlap.
   ========================================================================== */

/* Hide mobile dock and drawer completely on desktop and tablet devices */
.mobile-bottom-dock,
.mobile-more-drawer {
  display: none;
}

/* Floating WhatsApp Assistant Widget (Available on both mobile and desktop) */
.floating-wa-assistant {
  position: fixed;
  bottom: calc(var(--mobile-dock-height, 64px) + 22px);
  right: 16px;
  z-index: 998;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transform: translateZ(0);
  border: 1.2px solid rgba(255, 255, 255, 0.8);
  padding: 8px 16px 8px 12px;
  border-radius: 9999px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12), 0 2px 6px rgba(0, 0, 0, 0.04), inset 0 1px 1px rgba(255, 255, 255, 0.9);
  text-decoration: none;
  color: #0F172A;
  font-family: var(--font-heading, 'Manrope', sans-serif);
  font-size: 0.8125rem;
  font-weight: 700;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

.floating-wa-assistant:hover,
.floating-wa-assistant:active {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 16px 36px rgba(37, 211, 102, 0.25);
  color: #0F172A;
}

.floating-wa-pulse-dot {
  width: 9px;
  height: 9px;
  background-color: #25D366;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
  animation: waPulseRing 1.8s infinite;
  flex-shrink: 0;
}

@keyframes waPulseRing {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

@media (min-width: 769px) {
  .floating-wa-assistant {
    bottom: 24px;
    right: 24px;
    font-size: 0.875rem;
    padding: 10px 18px 10px 14px;
  }
}

@media (max-width: 768px) {
  /* Prevent content from being hidden behind the floating mobile dock */
  body {
    padding-bottom: calc(var(--mobile-dock-height, 64px) + env(safe-area-inset-bottom, 16px) + 20px);
  }

  /* True Liquid Glass Mobile Bottom Dock */
  .mobile-bottom-dock {
    display: flex;
    align-items: center;
    justify-content: space-around;
    position: fixed;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    left: 12px;
    right: 12px;
    height: 56px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transform: translateZ(0);
    border: 1px solid rgba(226, 232, 240, 0.85);
    border-radius: 9999px;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08), 0 1px 4px rgba(0, 0, 0, 0.04), inset 0 1px 1px rgba(255, 255, 255, 0.95);
    z-index: 999;
    padding: 5px 6px;
    box-sizing: border-box;
    transition: transform var(--transition-smooth), opacity var(--transition-smooth);
    -webkit-tap-highlight-color: transparent;
    outline: none;
  }

  .dock-item,
  button.dock-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: #64748B;
    text-decoration: none;
    padding: 4px 6px;
    height: 46px;
    box-sizing: border-box;
    border-radius: 9999px;
    flex: 1;
    min-width: 0;
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    outline: none;
    font-family: var(--font-heading, 'Manrope', sans-serif);
    line-height: 1;
    margin: 0;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
  }

  .dock-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    display: block;
    color: #64748B;
    transition: color 0.2s ease;
  }

  .dock-item span {
    font-family: var(--font-heading, 'Manrope', sans-serif);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    white-space: nowrap;
    line-height: 1;
    color: #64748B;
    transition: color 0.2s ease, font-weight 0.2s ease;
  }

  .dock-item:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
  }

  .dock-item.active {
    color: #0F172A;
    background: rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(15, 23, 42, 0.08);
  }

  .dock-item.active span {
    font-weight: 700;
    color: #0F172A;
  }

  .dock-item.active svg {
    color: #0F172A;
    stroke-width: 2.2;
  }

  /* WhatsApp central highlight in dock if used */
  .dock-item.dock-highlight {
    color: #128C7E;
  }

  .dock-item.dock-highlight svg {
    filter: drop-shadow(0 0 6px rgba(37, 211, 102, 0.35));
  }

  /* Liquid Glass Drawer Menu ("Más") */
  .mobile-more-drawer {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1005;
    visibility: hidden;
    pointer-events: none;
    transition: visibility 0.3s ease;
  }

  .mobile-more-drawer.is-open,
  .mobile-more-drawer.active {
    visibility: visible;
    pointer-events: auto;
  }

  .drawer-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  .mobile-more-drawer.is-open .drawer-backdrop,
  .mobile-more-drawer.active .drawer-backdrop {
    opacity: 1;
  }

  .drawer-panel {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: calc(var(--mobile-dock-height, 64px) + 24px);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1.5px solid rgba(255, 255, 255, 0.85);
    border-radius: 28px;
    padding: 20px 18px 18px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.22);
    transform: translateY(36px) scale(0.96);
    opacity: 0;
    transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .mobile-more-drawer.is-open .drawer-panel,
  .mobile-more-drawer.active .drawer-panel {
    transform: translateY(0) scale(1);
    opacity: 1;
  }

  .drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  }

  .drawer-title {
    font-family: var(--font-heading, 'Manrope', sans-serif);
    font-weight: 800;
    font-size: 1.05rem;
    color: #0F172A;
  }

  .drawer-close-btn {
    background: #F1F5F9;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.25rem;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }

  .drawer-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .drawer-link-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: #FAF9F5;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 14px;
    text-decoration: none;
    color: #0F172A;
    font-family: var(--font-heading, 'Manrope', sans-serif);
    font-size: 0.85rem;
    font-weight: 700;
    transition: background 0.2s, transform 0.2s;
  }

  .drawer-link-card i,
  .drawer-link-card svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    font-size: 1.05rem;
    color: #475569;
  }

  .drawer-link-card:active {
    transform: scale(0.97);
    background: #F1F5F9;
  }

  .drawer-link-card.active {
    background: #F1F5F9;
    border-color: #CBD5E1;
    color: #0F172A;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
  }

  .drawer-link-card.active i,
  .drawer-link-card.active svg {
    color: #0F172A;
  }

  .drawer-link-card.drawer-wa-card {
    grid-column: span 2;
    background: #25D366;
    color: #FFFFFF;
    justify-content: center;
    border-color: #25D366;
  }

  .drawer-link-card.drawer-wa-card i,
  .drawer-link-card.drawer-wa-card svg {
    color: #FFFFFF;
  }

  /* Mobile Layout Nuances */
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-title {
    font-size: 2.25rem;
  }

  .brand-logo {
    height: 40px;
  }
}

@media (max-width: 400px) {
  .mobile-bottom-dock {
    left: 8px;
    right: 8px;
    bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    padding: 4px 4px;
    height: 54px;
  }

  .dock-item,
  button.dock-item {
    height: 44px;
    padding: 2px 4px;
  }
  
  .dock-item span {
    font-size: 0.625rem;
  }

  .dock-item svg {
    width: 18px;
    height: 18px;
  }
}
