/* =========================================================
   Prode Tours — V106.29
   Final mobile/tablet polish layer
   Visual/responsive only. Loaded after page-specific styles.
   ========================================================= */

@media (max-width: 980px){
  html{scroll-padding-top:78px;}
  body.public-v5{overflow-x:clip;}

  .public-v5 main,
  .public-v5 .section,
  .public-v5 .section > *,
  .public-v5 .site-footer,
  .public-v5 .footer-grid > *,
  .public-v5 .contact-grid > *,
  .public-v5 .content-grid > *,
  .public-v5 .tour-layout > *,
  .public-v5 .about-story-grid > *,
  .public-v5 .reviews-hero-shell > *,
  .public-v5 .experiences-hero-shell > *{min-width:0;}

  /* Header / menu: reliable touch targets and viewport fit */
  .public-v5 .site-header,
  .public-v5 .site-header.scrolled{
    padding-left:max(16px,env(safe-area-inset-left));
    padding-right:max(16px,env(safe-area-inset-right));
  }
  .public-v5 .site-header .brand-logo{width:60px;}
  .public-v5 .site-header.scrolled .brand-logo{width:58px;}
  .public-v5 .nav-toggle{
    width:44px;
    height:44px;
    min-width:44px;
    min-height:44px;
    touch-action:manipulation;
  }
  .public-v5 .main-nav{
    left:max(12px,env(safe-area-inset-left));
    right:max(12px,env(safe-area-inset-right));
    max-height:calc(100dvh - 78px - env(safe-area-inset-bottom));
    overscroll-behavior:contain;
    scrollbar-width:thin;
  }
  .public-v5 .main-nav.open{
    border:1px solid rgba(255,255,255,.09);
    box-shadow:0 24px 60px rgba(0,0,0,.30);
    backdrop-filter:blur(20px);
  }
  .public-v5 .main-nav a,
  .public-v5 .nav-dropdown-toggle,
  .public-v5 .language-current,
  .public-v5 .language-option,
  .public-v5 .nav-cta{
    min-height:46px;
    touch-action:manipulation;
  }
  .public-v5 .language-menu{max-height:min(42dvh,360px);}

  /* Global type / actions */
  .public-v5 h1,
  .public-v5 h2,
  .public-v5 h3{
    overflow-wrap:break-word;
    text-wrap:balance;
  }
  .public-v5 p,
  .public-v5 li{overflow-wrap:break-word;}
  .public-v5 .actions{
    flex-wrap:wrap;
    row-gap:12px;
  }
  .public-v5 .btn,
  .public-v5 .book-button{
    min-height:50px;
    text-align:center;
    justify-content:center;
    touch-action:manipulation;
  }

  /* Cards and media should never escape the viewport */
  .public-v5 .destination-card,
  .public-v5 .tour-card,
  .public-v5 .vehicle,
  .public-v5 .feature,
  .public-v5 .review-card,
  .public-v5 .info-box,
  .public-v5 .booking-card,
  .public-v5 .booking-panel,
  .public-v5 .quote-panel,
  .public-v5 .contact-form,
  .public-v5 .contact-info,
  .public-v5 .legal-block{
    max-width:100%;
  }
  .public-v5 img,
  .public-v5 video,
  .public-v5 iframe{height:auto;}

  /* Footer: reduce dead space while preserving hierarchy */
  .public-v5 .site-footer{padding-top:72px;}
  .public-v5 .footer-bottom{margin-top:44px;}

  /* Experience / Reviews editorial layouts */
  .public-v5 .experiences-collage,
  .public-v5 .reviews-hero-voices{max-width:100%;}
  .public-v5 .experience-page-link,
  .public-v5 .experience-page-link.active{min-width:0;}

  /* Transfer / forms */
  .public-v5 .transfer-grid,
  .public-v5 .journey-card__fields,
  .public-v5 .form-grid{min-width:0;}
  .public-v5 input,
  .public-v5 select,
  .public-v5 textarea{font-size:16px;}

  /* Legal content */
  .public-v5 .legal-table-wrap{
    max-width:100%;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
  }
}

@media (max-width: 720px){
  html{scroll-padding-top:70px;}

  .public-v5 .site-header,
  .public-v5 .site-header.scrolled{
    padding-left:max(14px,env(safe-area-inset-left));
    padding-right:max(14px,env(safe-area-inset-right));
  }
  .public-v5 .site-header .brand-logo{width:56px;}
  .public-v5 .site-header.scrolled .brand-logo{width:54px;}
  .public-v5 .main-nav{
    left:max(10px,env(safe-area-inset-left));
    right:max(10px,env(safe-area-inset-right));
    padding:12px;
    border-radius:20px;
  }

  /* Consistent mobile page rhythm */
  .public-v5 .section-head{gap:16px;}
  .public-v5 .section-head > *{min-width:0;}
  .public-v5 .cta-panel{
    gap:22px;
    border-radius:26px;
  }
  .public-v5 .cta-panel .btn{width:100%;}

  /* Generic multi-column layouts collapse cleanly */
  .public-v5 .destination-grid,
  .public-v5 .tour-grid,
  .public-v5 .fleet-grid,
  .public-v5 .feature-grid,
  .public-v5 .reviews-grid,
  .public-v5 .content-grid,
  .public-v5 .contact-grid,
  .public-v5 .about-story-grid,
  .public-v5 .reviews-page-intro{
    grid-template-columns:minmax(0,1fr);
  }

  /* About */
  .public-v5.about-v1 .about-story-grid{gap:22px;}
  .public-v5.about-v1 .about-inline-media{width:100%;}

  /* Experiences */
  .public-v5 .experience-page-switch{grid-template-columns:minmax(0,1fr);}
  .public-v5 .experience-page-link,
  .public-v5 .experience-page-link.active{width:100%;}
  .public-v5 .filters{
    max-width:100%;
    overflow-x:auto;
    overscroll-behavior-inline:contain;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:thin;
  }
  .public-v5 .filter-btn{flex:0 0 auto;min-height:44px;}

  /* Reviews hero cards remain readable even in longer translations */
  .public-v5.reviews-v3 .reviews-hero-voices{min-height:520px;}
  .public-v5.reviews-v3 .reviews-voice-card p{overflow-wrap:break-word;}

  /* Transfer: prevent cramped two-column field rows */
  .public-v5 .journey-card__fields{grid-template-columns:minmax(0,1fr);}
  .public-v5 .quote-panel{width:100%;}

  /* Contact / FAQ */
  .public-v5.contact-v2 .faq-q{min-height:58px;}
  .public-v5.contact-v2 .faq-q__text{min-width:0;}

  /* Footer and floating contacts */
  .public-v5 .site-footer{padding:64px 18px 22px;}
  .public-v5 .footer-grid{gap:28px;}
  .public-v5 .footer-grid a,
  .public-v5 .footer-grid p,
  .public-v5 .footer-wechat{max-width:100%;overflow-wrap:anywhere;}
  .public-v5 .footer-bottom{margin-top:36px;padding-top:20px;}

  .public-v5 .social-float{
    width:46px;
    height:46px;
    right:max(12px,env(safe-area-inset-right));
  }
  .public-v5 .social-float img{width:20px;height:20px;}
  .public-v5 .whatsapp.social-float{bottom:max(12px,env(safe-area-inset-bottom));}
  .public-v5 .instagram.social-float{bottom:calc(max(12px,env(safe-area-inset-bottom)) + 54px);}
  .public-v5 .wechat.social-float{bottom:calc(max(12px,env(safe-area-inset-bottom)) + 108px);}

  .public-v5 .wechat-modal{padding:max(12px,env(safe-area-inset-top)) 12px max(12px,env(safe-area-inset-bottom));}
  .public-v5 .wechat-modal__dialog{
    width:min(100%,430px);
    max-height:calc(100dvh - 24px);
    overflow-y:auto;
  }
}

@media (max-width: 520px){
  .public-v5 .main-nav{border-radius:18px;}

  /* Mobile CTA groups should be thumb-friendly */
  .public-v5 .actions{
    width:100%;
    flex-direction:column;
    align-items:stretch;
    gap:10px;
  }
  .public-v5 .actions .btn,
  .public-v5 .actions .book-button{width:100%;max-width:none;}

  /* Cards: consistent compact radius / padding without touching content */
  .public-v5 .info-box,
  .public-v5 .booking-card{border-radius:22px;}

  /* Home trust strip stays compact but avoids clipped translations */
  .public-v5.home-v6 .trust-item{min-width:0;}
  .public-v5.home-v6 .trust-main,
  .public-v5.home-v6 .trust-item b,
  .public-v5.home-v6 .trust-item .trust-copy{overflow-wrap:break-word;}

  /* Transfer journey type: one column on very narrow devices */
  .public-v5 .radio-row{grid-template-columns:minmax(0,1fr);}

  /* Reviews: slightly less overlap at the narrowest width */
  .public-v5.reviews-v3 .reviews-hero-voices{min-height:530px;}
  .public-v5.reviews-v3 .reviews-voice-card--primary{width:92%;}
  .public-v5.reviews-v3 .reviews-voice-card--secondary{width:86%;}
  .public-v5.reviews-v3 .reviews-voice-card--tertiary{width:84%;}

  /* Legal tables remain intentionally scrollable rather than crushed */
  .public-v5.legal-v2 .legal-table{min-width:520px;}

  /* Footer logo reads better with the new square premium mark */
  .public-v5 .brand-footer .brand-logo{width:82px;}
}

@media (max-width: 380px){
  .public-v5 .site-header .brand-logo{width:52px;}
  .public-v5 .site-header.scrolled .brand-logo{width:50px;}
  .public-v5 .main-nav{left:7px;right:7px;padding:10px;}
  .public-v5 .btn,
  .public-v5 .book-button{padding-left:15px;padding-right:15px;}
  .public-v5 .site-footer{padding-left:16px;padding-right:16px;}
}

@media (prefers-reduced-motion: reduce){
  .public-v5 *,
  .public-v5 *::before,
  .public-v5 *::after{
    scroll-behavior:auto!important;
    transition-duration:.01ms!important;
    animation-duration:.01ms!important;
    animation-iteration-count:1!important;
  }
}
