/* Taxi 23 · ajustes finales para navegadores móviles Android, iPhone y tabletas */
:root { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
*, *::before, *::after { box-sizing: border-box; }
img, video, iframe, svg { max-width: 100%; }
button, a, select, summary { touch-action: manipulation; }
html { scroll-padding-top: 12px; }

@media (max-width: 820px) {
  html, body { max-width: 100%; overflow-x: hidden; }
  body { min-width: 320px; }
  .container {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  /* Cabecera: marca, selector de idioma y menú siempre en una sola fila */
  .full-hero {
    width: 100% !important;
    min-height: 0 !important;
    height: auto !important;
    padding-bottom: 25px !important;
    background-position: center 48% !important;
  }
  .full-hero .hero-nav,
  .hero-nav {
    display: flex !important;
    width: 100% !important;
    min-height: 58px;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 7px !important;
    padding: 10px max(12px, env(safe-area-inset-left)) 0 !important;
  }
  .hero-nav > a:first-child {
    display: block;
    flex: 0 0 auto !important;
    min-width: 0;
  }
  .hero-brand {
    display: block;
    width: clamp(88px, 27vw, 112px) !important;
    max-width: 30vw !important;
    height: auto !important;
  }
  .hero-links { display: none !important; }
  .hero-nav .hero-lang {
    display: flex !important;
    flex: 1 1 auto !important;
    justify-content: center !important;
    min-width: 0;
    margin: 0 3px !important;
  }
  .hero-lang .locale-picker,
  .locale-picker {
    width: auto !important;
    max-width: min(138px, 36vw) !important;
    min-width: 0;
    min-height: 44px !important;
    padding: 8px 10px !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
  }
  .hero-nav .mobile-menu-btn,
  .mobile-menu-btn {
    display: flex !important;
    flex: 0 0 46px !important;
    align-items: center !important;
    justify-content: center !important;
    width: 46px !important;
    min-width: 46px !important;
    height: 46px !important;
    min-height: 46px !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 24px !important;
    line-height: 1 !important;
  }
  .mobile-menu {
    display: none;
    width: calc(100% - 24px) !important;
    max-width: 420px !important;
    margin: 12px auto 0 !important;
    padding: 8px !important;
    border-radius: 14px !important;
  }
  .mobile-menu.open { display: grid !important; }
  .mobile-menu a {
    display: flex !important;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    padding: 12px 10px !important;
    text-align: center;
    line-height: 1.3;
    overflow-wrap: anywhere;
  }

  /* Logotipo y titulares de la portada */
  .hero-logo {
    display: block;
    width: clamp(190px, 62vw, 245px) !important;
    max-width: 78vw !important;
    height: auto !important;
    margin: clamp(18px, 4.5vw, 32px) auto 9px !important;
  }
  .full-hero .hero-tag,
  .hero-tag {
    width: calc(100% - 24px) !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    font-size: clamp(24px, 5.9vw, 32px) !important;
    line-height: 1.14 !important;
    padding: 3px 8px 5px !important;
    overflow-wrap: anywhere;
    text-wrap: balance;
  }
  .full-hero .hero-keyword-line,
  .hero-keyword-line {
    width: calc(100% - 26px) !important;
    max-width: 100% !important;
    margin: 8px auto 0 !important;
    padding: 0 6px !important;
    font-size: clamp(14px, 3.6vw, 17px) !important;
    line-height: 1.4 !important;
    overflow-wrap: anywhere;
    text-wrap: balance;
  }
  .hero-airports-nowrap { white-space: normal !important; }
  .hero-features {
    display: grid !important;
    width: calc(100% - 28px) !important;
    max-width: 600px !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px 0 !important;
    margin: 22px auto 0 !important;
    padding: 0 2px !important;
  }
  .hero-feature {
    display: flex !important;
    min-width: 0 !important;
    min-height: 82px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 9px 7px !important;
    text-align: center;
    overflow-wrap: anywhere;
  }
  .hero-feature:nth-child(2n) { border-right: 0 !important; }
  .hero-feature strong { font-size: 14px !important; line-height: 1.25 !important; }
  .hero-feature span { font-size: 12px !important; line-height: 1.35 !important; }

  /* Anchuras, tarjetas, precios y secciones */
  main { width: 100%; max-width: 100%; padding: 22px 2px 32px !important; }
  main > section,
  .seo-service-info,
  .about,
  .reviews-section,
  .trust-strip {
    min-width: 0;
    max-width: 100% !important;
  }
  .intro { max-width: 100%; font-size: 16px !important; line-height: 1.55; }
  .trust-strip { padding: 20px 16px !important; }
  .seo-links { grid-template-columns: 1fr !important; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 12px !important; }
  .card { min-width: 0; }
  .card img { width: 100%; height: 165px !important; object-fit: cover; }
  .cardbody { min-width: 0; padding: 13px !important; overflow-wrap: anywhere; }
  .card h3 { font-size: 15px !important; line-height: 1.35 !important; overflow-wrap: anywhere; }
  .price { font-size: 22px !important; }
  .select-trip {
    display: block !important;
    width: 100% !important;
    min-height: 44px;
    padding: 12px 9px !important;
    font-size: 13px !important;
    line-height: 1.3 !important;
    white-space: normal !important;
  }
  .menu-panel > summary {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    min-height: 54px;
    padding: 15px 14px !important;
    font-size: 16px !important;
    line-height: 1.35 !important;
  }
  .menu-panel > summary > span { min-width: 0; }
  .menu-panel > summary > span + span {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    overflow-wrap: anywhere;
  }
  .menu-subpanel > summary {
    min-height: 48px;
    padding: 13px 12px !important;
    font-size: 15px !important;
    line-height: 1.35 !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
  }
  .menu-content { min-width: 0; padding: 6px 8px 12px !important; }
  .service-choice { width: 100%; padding: 18px 13px !important; }
  .service-choice-grid { grid-template-columns: 1fr !important; gap: 10px !important; }
  .service-choice-card {
    width: 100% !important;
    min-width: 0;
    min-height: 100px !important;
    padding: 16px 13px !important;
    overflow-wrap: anywhere;
  }
  .service-choice-card strong { font-size: 16px !important; line-height: 1.35 !important; }

  /* Formulario: controles cómodos y sin zoom automático en Safari iOS */
  #reserva { scroll-margin-top: 12px; }
  #reserva form,
  #booking,
  .form {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 18px 14px !important;
  }
  .row { grid-template-columns: minmax(0, 1fr) !important; gap: 0 12px !important; }
  .row > div { min-width: 0; }
  #booking input:not([type="checkbox"]),
  #booking select,
  #booking textarea,
  input:not([type="checkbox"]),
  select,
  textarea {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 48px;
    font-size: 16px !important;
  }
  input[type="checkbox"] { width: 22px; height: 22px; min-width: 22px; }
  .privacy-check { display: flex; align-items: flex-start; gap: 10px; }
  .privacy-check input { flex: 0 0 22px; margin-top: 3px; }
  .booking-schedule-options { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .booking-slot { min-width: 0; padding: 12px 7px !important; overflow-wrap: anywhere; }
  #booking #waButton,
  #booking #mailButton,
  .booking-actions button,
  .form-actions button {
    width: 100% !important;
    min-height: 52px !important;
    padding: 14px 12px !important;
    font-size: 14px !important;
    line-height: 1.35 !important;
    white-space: normal !important;
  }
  .service-back,
  .cta,
  .route-booking-cta a {
    display: flex;
    width: 100%;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    padding: 12px 14px;
    text-align: center;
    line-height: 1.35;
  }

  /* Páginas SEO, opiniones, tablas y pie */
  .features { grid-template-columns: 1fr !important; gap: 9px !important; }
  .features .feature { min-width: 0; }
  .tablewrap {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
  }
  .tablewrap table { min-width: 500px; }
  .panel { min-width: 0; padding: 18px 14px !important; }
  .panel h2 { font-size: 23px !important; line-height: 1.25; }
  .crumbs { display: flex; flex-wrap: wrap; gap: 5px; padding: 10px 12px; line-height: 1.4; }
  .reviews-section { margin-left: 0 !important; margin-right: 0 !important; padding: 18px 10px !important; }
  .reviews-widget-wrap { width: 100%; max-width: 100%; overflow: hidden; }
  .reviews-widget-wrap iframe { max-width: 100% !important; }
  footer {
    padding: 22px 12px calc(22px + env(safe-area-inset-bottom)) !important;
    overflow-wrap: anywhere;
  }
  footer nav,
  .foot-nav {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 7px 10px !important;
    max-width: 100%;
  }
  footer nav a,
  .foot-nav a {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    padding: 7px 8px;
    text-align: center;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 600px) {
  .grid { grid-template-columns: minmax(0, 1fr) !important; }
  .card img { height: 185px !important; }
  .about-car { height: auto !important; max-height: 260px; }
  .seo-service-info { padding: 18px 12px !important; }
  .destination-video-section { padding-left: 2px !important; padding-right: 2px !important; }
}

@media (max-width: 380px) {
  .hero-nav { gap: 5px !important; }
  .hero-brand { width: 86px !important; max-width: 27vw !important; }
  .locale-picker { max-width: 118px !important; padding: 7px 7px !important; font-size: 11px !important; }
  .hero-nav .mobile-menu-btn { flex-basis: 44px !important; width: 44px !important; min-width: 44px !important; height: 44px !important; min-height: 44px !important; }
  .hero-features { width: calc(100% - 20px) !important; gap: 8px 0 !important; }
  .hero-feature { min-height: 76px; padding: 8px 4px !important; }
  .hero-feature strong { font-size: 13px !important; }
  .hero-feature span { font-size: 11px !important; }
  .full-hero .hero-tag { font-size: 24px !important; }
  .full-hero .hero-keyword-line { font-size: 13px !important; }
  .menu-panel > summary { padding: 13px 11px !important; font-size: 15px !important; }
  .menu-content { padding-left: 5px !important; padding-right: 5px !important; }
  .card img { height: 165px !important; }
  #reserva form, #booking, .form { padding: 15px 11px !important; }
  .booking-schedule-options { grid-template-columns: minmax(0, 1fr) !important; }
}

@media (hover: none) {
  .card:hover,
  .service-choice-card:hover,
  .action:hover { transform: none !important; }
}

:focus-visible { outline: 3px solid rgba(25, 112, 190, .55); outline-offset: 3px; }

/* Acciones principales de portada y orden definitivo del menú en móviles/tabletas */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 11px;
  width: min(620px, calc(100% - 28px));
  margin: 22px auto 0;
}
.hero-actions a {
  display: inline-flex;
  flex: 1 1 220px;
  min-width: 0;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  padding: 13px 18px;
  border: 1px solid rgba(255,255,255,.65);
  border-radius: 13px;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  overflow-wrap: anywhere;
  box-shadow: 0 5px 18px rgba(3, 25, 48, .2);
  transition: transform .16s ease, background-color .16s ease;
}
.hero-actions .hero-action-primary { background: #0f3a5f; border-color: #fff; }
.hero-actions .hero-action-secondary { background: rgba(255,255,255,.94); color: #0f3a5f; }
.hero-actions a:active { transform: translateY(1px); }

@media (max-width: 820px) {
  .hero-nav > a:first-child { order: 1 !important; }
  .hero-nav > .hero-lang { order: 2 !important; }
  .hero-nav > .mobile-menu-btn { order: 3 !important; }
  .mobile-menu .locale-picker-mobile { display: none !important; }
  .mobile-menu > div:has(.locale-picker-mobile) { display: none !important; }
  .hero-actions { width: calc(100% - 28px); margin-top: 18px; }
  .hero-actions a { flex: 1 1 100%; width: 100%; min-height: 50px; }
}

@media (max-width: 380px) {
  .hero-actions { width: calc(100% - 20px); gap: 8px; margin-top: 15px; }
  .hero-actions a { min-height: 48px; padding: 12px 10px; font-size: 14px; }
}
@media (max-width: 820px) {
  /* In the main pages this direct DIV contains only a second copy of the language selector. */
  .mobile-menu > div { display: none !important; }
  /* The individual route pages place the same selector directly in the menu. */
  .mobile-menu > .locale-picker-mobile { display: none !important; }
}
