/*
  ┌─────────────────────────────────────────────────────────────┐
  │                                                             │
  │     ██████╗ ██████╗ ███████╗ █████╗ ███╗   ███╗███████╗     │
  │     ██╔══██╗██╔══██╗██╔════╝██╔══██╗████╗ ████║██╔════╝     │
  │     ██║  ██║██████╔╝█████╗  ███████║██╔████╔██║███████╗     │
  │     ██║  ██║██╔══██╗██╔══╝  ██╔══██║██║╚██╔╝██║╚════██║     │
  │     ██████╔╝██║  ██║███████╗██║  ██║██║ ╚═╝ ██║███████║     │
  │     ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═╝  ╚═╝╚═╝     ╚═╝╚══════╝     │
  │                                                             │
  │     ████████╗██████╗ ██╗██████╗ ███████╗                    │
  │     ╚══██╔══╝██╔══██╗██║██╔══██╗██╔════╝                    │
  │        ██║   ██████╔╝██║██████╔╝███████╗                    │
  │        ██║   ██╔══██╗██║██╔═══╝ ╚════██║                    │
  │        ██║   ██║  ██║██║██║     ███████║                    │
  │        ╚═╝   ╚═╝  ╚═╝╚═╝╚═╝     ╚══════╝                    │
  │                                                             │
  │              ✦  Deleitando vidas.  ✦                        │
  │           https://www.dreamstrips.com.mx                    │
  │                                                             │
  └─────────────────────────────────────────────────────────────┘
 */
/* =============================================
   Dreams Trips — Mobile Stylesheet
   Optimized for phones & small tablets (≤768px)
   ============================================= */

@media (max-width: 768px) {
  :root {
    --header-height: 64px;
    --mobile-bar-height: 64px;
  }

  html {
    scroll-padding-top: calc(var(--header-height) + 8px);
  }

  body {
    padding-bottom: calc(var(--mobile-bar-height) + env(safe-area-inset-bottom, 0px));
  }

  body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
  }

  body.modal-open {
    overflow: hidden;
  }

  .container {
    padding: 0 16px;
  }

  /* ---- Header & Navigation ---- */
  .header:not(.scrolled) {
    background: transparent;
    border-bottom: none;
    box-shadow: none;
  }

  .header.scrolled {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
  }

  .header.scrolled .nav-links a {
    color: #475569;
  }

  .header.scrolled .nav-toggle span {
    background: #1e293b;
  }

  .logo-img {
    height: 40px;
  }

  .nav-toggle {
    display: flex;
    z-index: 110;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
  }

  .nav-toggle span {
    width: 22px;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  .nav-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
  }

  .nav-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .nav-links {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(100dvh - var(--header-height));
    background: rgba(10, 11, 15, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: stretch;
    padding: 16px 20px calc(24px + env(safe-area-inset-bottom));
    gap: 0;
    border-bottom: none;
    transform: translateX(100%);
    opacity: 1;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 105;
  }

  .nav-links.open {
    transform: translateX(0);
    pointer-events: all;
  }

  .nav-links li {
    border-bottom: 1px solid var(--border);
  }

  .nav-item--cta {
    border-bottom: none !important;
    margin-top: 8px;
  }

  .nav-item--has-submenu .nav-submenu-toggle {
    display: flex;
    width: 100%;
    justify-content: space-between;
    padding: 16px 4px;
    font-size: 1rem;
    color: var(--text-primary);
  }

  .nav-item--has-submenu.open .nav-submenu-toggle {
    color: var(--accent);
  }

  .nav-submenu {
    position: static;
    transform: none;
    min-width: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 1;
    visibility: hidden;
    pointer-events: none;
    padding: 0;
    margin: 0;
    border: none;
    box-shadow: none;
    background: transparent !important;
    transition: max-height 0.35s ease, visibility 0.35s ease;
  }

  .nav-item--has-submenu.open .nav-submenu {
    visibility: visible;
    pointer-events: all;
    max-height: 320px;
    padding-bottom: 8px;
  }

  .nav-item--has-submenu:hover .nav-submenu {
    opacity: 1;
    visibility: hidden;
    pointer-events: none;
    transform: none;
  }

  .nav-item--has-submenu.open:hover .nav-submenu {
    visibility: visible;
    pointer-events: all;
  }

  .nav-submenu a {
    padding: 12px 4px 12px 16px;
    font-size: 0.95rem;
    color: var(--text-secondary) !important;
  }

  .nav-submenu a:hover,
  .nav-submenu a.active {
    color: var(--accent) !important;
    background: transparent;
  }

  .nav-links li:last-child {
    border-bottom: none;
  }

  .nav-links a {
    display: block;
    padding: 16px 4px;
    font-size: 1rem;
    color: var(--text-primary);
  }

  .nav-links a.active {
    color: var(--accent);
  }

  .nav-cta {
    text-align: center !important;
    padding: 16px 24px !important;
    border-radius: var(--radius-sm) !important;
    display: block;
  }

  .header.scrolled .nav-cta {
    background: #0a0b0f !important;
    color: var(--accent-light) !important;
  }

  /* ---- Mobile bottom bar ---- */
  .mobile-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 190;
    height: calc(var(--mobile-bar-height) + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: rgba(10, 11, 15, 0.95);
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--border);
  }

  .mobile-bar__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 4px;
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition);
    min-height: 44px;
  }

  .mobile-bar__item svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.75;
  }

  .mobile-bar__item--active,
  .mobile-bar__item:hover {
    color: var(--accent);
  }

  .mobile-bar__item--cta {
    color: var(--accent);
  }

  .mobile-bar__item--cta svg {
    stroke: var(--accent);
  }

  /* ---- Carousel ---- */
  .carousel {
    height: min(540px, calc(100svh - var(--header-height)));
    min-height: 440px;
    max-height: 600px;
    margin-top: var(--header-height);
  }

  .carousel-track {
    height: 100%;
  }

  .carousel-slide {
    display: flex;
    align-items: flex-end;
  }

  .carousel-slide__overlay {
    background: linear-gradient(
      to top,
      rgba(10, 11, 15, 0.98) 0%,
      rgba(10, 11, 15, 0.75) 35%,
      rgba(10, 11, 15, 0.25) 65%,
      rgba(10, 11, 15, 0.15) 100%
    );
  }

  .carousel-slide__content {
    position: relative;
    z-index: 2;
    width: 100%;
    height: auto !important;
    min-height: 0;
    justify-content: flex-end !important;
    padding: 0 16px 52px;
    margin-top: auto;
    max-width: 100%;
  }

  .carousel-tag {
    margin-bottom: 8px;
  }

  .carousel-title {
    font-size: clamp(1.6rem, 7vw, 2.1rem);
    margin-bottom: 10px;
  }

  .carousel-desc {
    font-size: 0.9rem;
    margin-bottom: 12px;
    line-height: 1.55;
  }

  .carousel-meta {
    gap: 8px;
    margin-bottom: 14px;
    width: 100%;
  }

  .carousel-meta__chip {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
    gap: 8px;
  }

  .carousel-meta__chip strong {
    font-size: 0.9rem;
  }

  .carousel-meta__chip small {
    font-size: 0.58rem;
  }

  .carousel-actions {
    flex-direction: row;
    gap: 10px;
  }

  .carousel-action-btn {
    width: 44px;
    height: 44px;
  }

  .carousel-btn {
    width: 34px;
    height: 34px;
    top: 38%;
    bottom: auto;
    transform: translateY(-50%);
    opacity: 0.85;
  }

  .carousel-btn--prev { left: 8px; }
  .carousel-btn--next { right: 8px; }

  .carousel-dots {
    bottom: 16px;
    z-index: 12;
  }

  /* ---- Intro strip ---- */
  .intro-strip {
    padding: 24px 0;
  }

  .intro-slogan {
    font-size: 1.15rem;
  }

  .hero-stats {
    width: 100%;
    justify-content: space-around;
  }

  .stat-number {
    font-size: 1.5rem;
  }

  /* ---- Sections ---- */
  .destinations,
  .express-sales,
  .calendar-section,
  .experiences,
  .why-us,
  .dreamworkers,
  .testimonials,
  .avisos,
  .location,
  .contact,
  .gallery-section,
  .legal-section {
    padding: 60px 0;
  }

  .page-hero {
    padding: calc(var(--header-height) + 32px) 0 32px;
  }

  .section-header {
    margin-bottom: 32px;
  }

  .section-title {
    font-size: clamp(1.65rem, 6vw, 2.25rem);
  }

  .section-desc {
    font-size: 0.95rem;
  }

  /* ---- Destination cards ---- */
  .dest-card {
    min-height: 280px !important;
  }

  .dest-card__content {
    padding: 20px;
  }

  .dest-card__desc,
  .dest-card__link {
    opacity: 1;
    transform: none;
  }

  /* ---- Express sales ---- */
  .sales-carousel {
    padding: 0 44px;
  }

  .sales-carousel__btn {
    width: 38px;
    height: 38px;
  }

  .sales-carousel__slide {
    padding: 0 4px;
  }

  .sales-carousel__slide .sale-card {
    max-width: none;
  }

  .sale-card__content {
    padding: 20px;
  }

  .countdown-timer span {
    min-width: 40px;
    padding: 5px 6px;
  }

  /* ---- Calendar week view (mobile) ---- */
  .calendar-week-view {
    display: block;
  }

  .calendar-month-view {
    display: none;
  }

  .week-strip {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    margin-bottom: 16px;
  }

  .week-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 4px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font-body);
    cursor: pointer;
    transition: var(--transition);
    min-height: 64px;
  }

  .week-day__name {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.04em;
  }

  .week-day__num {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1;
  }

  .week-day__dots {
    display: flex;
    gap: 3px;
    min-height: 6px;
  }

  .week-day--today .week-day__num {
    color: var(--accent);
  }

  .week-day--has-event {
    background: var(--bg-elevated);
  }

  .week-day--selected {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg-primary);
  }

  .week-day--selected .week-day__name,
  .week-day--selected .week-day__num {
    color: var(--bg-primary);
  }

  .week-events {
    min-height: 80px;
  }

  .week-events__hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
    padding: 16px 8px;
  }

  .week-event-card {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    text-align: left;
    padding: 14px;
    margin-bottom: 8px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-body);
    cursor: pointer;
    transition: var(--transition);
  }

  .week-event-card:hover,
  .week-event-card:active {
    border-color: var(--accent);
  }

  .week-event-card__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
  }

  .week-event-card__info {
    flex: 1;
    min-width: 0;
  }

  .week-event-card__title {
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .week-event-card__meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
  }

  .calendar-legend--compact {
    margin-top: 12px;
    padding-top: 12px;
    font-size: 0.75rem;
  }

  /* ---- Calendar ---- */
  .calendar-widget {
    padding: 20px 16px;
  }

  .cal-filters {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px 12px;
    margin-bottom: 8px;
  }

  .cal-filters__search {
    flex: none;
    padding: 0 10px;
  }

  .cal-filters__search svg {
    width: 16px;
    height: 16px;
  }

  .cal-filters__search input {
    padding: 9px 0;
    font-size: 0.875rem;
  }

  .cal-filters__select {
    flex: none;
    width: 100%;
    padding: 9px 12px;
    font-size: 0.8125rem;
  }

  .cal-filters__types {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 6px;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .cal-filters__types::-webkit-scrollbar {
    display: none;
  }

  .cal-filter-pill {
    flex-shrink: 0;
    padding: 6px 12px;
    font-size: 0.75rem;
  }

  .cal-filters__clear.btn {
    margin-left: 0;
    width: auto;
    align-self: flex-end;
    min-height: 0;
    padding: 6px 12px;
    font-size: 0.75rem;
  }

  .cal-filters__active {
    font-size: 0.78rem;
    margin-bottom: 12px;
  }

  /* ---- Buttons ---- */
  .btn {
    min-height: 48px;
    padding: 12px 20px;
    font-size: 0.9rem;
  }

  .event-panel__actions {
    flex-direction: column;
  }

  .event-panel__actions .btn {
    width: 100%;
  }

  /* ---- Contact ---- */
  .contact-card {
    padding: 24px 20px;
    gap: 32px;
    border-radius: var(--radius-lg);
  }

  .social-links {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  /* ---- Footer ---- */
  .footer {
    padding: 32px 0 24px;
  }

  .footer-brand {
    align-items: center;
    width: 100%;
  }

  .footer-nav {
    gap: 16px;
    font-size: 0.8rem;
  }

  .footer-social {
    width: 100%;
  }

  /* ---- WhatsApp float: above bottom bar ---- */
  .whatsapp-float {
    bottom: calc(var(--mobile-bar-height) + 16px + env(safe-area-inset-bottom, 0px));
    right: 16px;
    width: 50px;
    height: 50px;
  }

  .back-to-top {
    bottom: calc(var(--mobile-bar-height) + 16px + env(safe-area-inset-bottom, 0px));
    left: 16px;
    width: 44px;
    height: 44px;
  }

  /* ---- Gallery ---- */
  .gallery-filters {
    gap: 8px;
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .gallery-filters::-webkit-scrollbar {
    display: none;
  }

  .gallery-filter {
    flex-shrink: 0;
    padding: 8px 16px;
    font-size: 0.8rem;
  }

  /* ---- Legal ---- */
  .legal-doc {
    padding: 24px 20px;
  }

  .legal-nav {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 16px;
  }

  .legal-nav__link {
    flex-shrink: 0;
    white-space: nowrap;
  }

  /* ---- Event modal ---- */
  .event-modal__dialog {
    max-height: 85dvh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }

  .lightbox {
    padding: 16px;
    padding-bottom: calc(var(--mobile-bar-height) + 16px);
  }
}

/* Small phones */
@media (max-width: 380px) {
  .carousel-title {
    font-size: 1.6rem;
  }

  .countdown-timer {
    gap: 4px;
  }

  .countdown-timer span {
    min-width: 36px;
  }

  .mobile-bar__item span {
    font-size: 0.6rem;
  }

  /* ---- Notification System Mobile ---- */
  .notif-wrapper {
    margin-left: auto;
    margin-right: 8px;
  }

  .notif-panel {
    position: fixed;
    top: calc(var(--header-height) + 8px);
    left: 12px;
    right: 12px;
    width: auto;
    max-height: calc(100vh - var(--header-height) - var(--mobile-bar-height) - 40px);
    border-radius: var(--radius-md);
  }

  .notif-toast-container {
    bottom: calc(var(--mobile-bar-height) + 12px + env(safe-area-inset-bottom, 0px));
    right: 12px;
    left: 12px;
    max-width: none;
    width: auto;
  }
}

/* Hide mobile bar on desktop */
@media (min-width: 769px) {
  .mobile-bar {
    display: none;
  }

  .calendar-week-view {
    display: none;
  }

  .calendar-month-view {
    display: block;
  }

  body {
    padding-bottom: 0;
  }
}
