/* =========================================================
   MOTOTRAVEL — HEADER Y FOOTER (todo el sitio)

   Blindado frente al tema:
   - todo va bajo #mth-header / #mth-footer (gana a las reglas de clase del tema);
   - medidas en px: el tema usa html{font-size:62.5%}, así que rem no sirve aquí;
   - se neutralizan los estilos globales del tema en a, img, button, p, ul, li, input.
   ========================================================= */

#mth-header,
#mth-footer{
  --mth-red:#E2231A;
  --mth-red-dark:#C11B13;
  --mth-ink:#1D1D1F;
  --mth-ink-2:#3C3C40;
  --mth-gray-2:#8E8E94;
  --mth-line:#E4E4E6;
  --mth-dark:#1A1A1A;
  --mth-ff-h:'Montserrat','Helvetica Neue',Arial,sans-serif;
  --mth-ff-b:'Open Sans','Helvetica Neue',Arial,sans-serif;
  --mth-gut:clamp(18px,3.2vw,32px);

  font-family:var(--mth-ff-b);font-size:15px;line-height:1.62;font-weight:400;
  color:var(--mth-ink);text-align:left;letter-spacing:normal;text-transform:none;
  -webkit-font-smoothing:antialiased;
}

/* ---------- RESET LOCAL ---------- */
#mth-header *,#mth-header *::before,#mth-header *::after,
#mth-footer *,#mth-footer *::before,#mth-footer *::after{box-sizing:border-box;word-break:normal;overflow-wrap:normal}
#mth-header a,#mth-footer a{color:inherit;font-size:inherit;font-weight:inherit;text-decoration:none;background:none;box-shadow:none}
#mth-header img,#mth-footer img{display:block;width:auto;height:auto;max-width:100%;object-fit:fill;border:0;margin:0;padding:0}
#mth-header svg,#mth-footer svg{display:block;max-width:100%}
#mth-header p,#mth-footer p{margin:0;padding:0;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit}
#mth-header ul,#mth-footer ul{margin:0;padding:0;list-style:none;border:0}
#mth-header li,#mth-footer li{margin:0;padding:0;list-style:none;border:0;font-size:inherit;line-height:inherit}
#mth-header form,#mth-header label{margin:0;padding:0;border:0;font-size:inherit}
#mth-header button{
  display:inline-flex;align-items:center;justify-content:center;position:relative;
  margin:0;padding:0;border:0;border-radius:0;background:none;box-shadow:none;
  font:inherit;color:inherit;text-transform:none;letter-spacing:normal;cursor:pointer;
  transform:none;overflow:visible;min-width:0;min-height:0;width:auto;height:auto;
}
#mth-header button:hover,#mth-header button:focus{background:none;color:inherit}
#mth-header button:active{transform:none}
#mth-header button::after,#mth-header button::before{content:none;display:none}
#mth-header input{margin:0;font-family:var(--mth-ff-b);box-shadow:none;-webkit-appearance:none;appearance:none}
#mth-header :focus-visible,#mth-footer :focus-visible{outline:2px solid var(--mth-red);outline-offset:3px}

#mth-header .mth-wrap,#mth-footer .mth-wrap{max-width:1200px;margin-inline:auto;padding-inline:var(--mth-gut)}
#mth-header .mth-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}

/* =========================================================
   HEADER
   ========================================================= */
/* El contenedor es el que se pega arriba: así funciona en cualquier página, sea cual sea el tema */
#mth-header{position:sticky;top:0;z-index:999}
#mth-header .mth-header{position:relative;background:#fff;border-bottom:1px solid var(--mth-line)}
#mth-header .mth-header__in{display:flex;align-items:center;gap:clamp(14px,2vw,34px);height:74px}
#mth-header .mth-header__logo{flex:none;display:block}
#mth-header .mth-header__logo img{height:45px;width:auto}
#mth-header .mth-header__nav{margin-left:auto;height:100%}

/* Menú principal */
#mth-header .mth-nav{display:flex;align-items:stretch;gap:clamp(8px,.95vw,16px);height:100%}
#mth-header .mth-nav > li{position:relative;display:flex;align-items:center;padding:0 5px}
#mth-header .mth-nav a{
  position:relative;display:block;padding:6.4px 0;color:var(--mth-ink);white-space:nowrap;
  font-size:10.5px;font-weight:700;letter-spacing:.045em;text-transform:uppercase;line-height:1.4;
  transition:color .25s ease;
}
#mth-header .mth-nav > li > a::after{content:"";position:absolute;left:0;bottom:0;height:2px;width:0;background:var(--mth-red);transition:width .28s ease}
#mth-header .mth-nav > li:hover > a,
#mth-header .mth-nav > li:focus-within > a{color:var(--mth-red)}
#mth-header .mth-nav > li:hover > a::after,
#mth-header .mth-nav > li:focus-within > a::after{width:100%}
#mth-header .mth-nav > .current-menu-item > a,
#mth-header .mth-nav > .current-menu-ancestor > a,
#mth-header .mth-nav > .current-menu-parent > a{color:var(--mth-red)}
#mth-header .mth-nav > .current-menu-item > a::after,
#mth-header .mth-nav > .current-menu-ancestor > a::after{width:100%}

/* Flecha en los ítems con submenú */
#mth-header .mth-nav > .menu-item-has-children > a{padding-right:13px}
#mth-header .mth-nav > .menu-item-has-children > a::before{
  content:"";position:absolute;right:0;top:50%;width:6px;height:6px;margin-top:-5px;
  border-right:1.6px solid currentColor;border-bottom:1.6px solid currentColor;transform:rotate(45deg);
}

/* Submenú desplegable */
#mth-header .mth-nav .sub-menu{
  position:absolute;left:-12px;top:100%;z-index:5;min-width:230px;padding:8px 0;
  background:#fff;border:1px solid var(--mth-line);border-top:2px solid var(--mth-red);
  border-radius:0 0 6px 6px;box-shadow:0 18px 34px -18px rgba(0,0,0,.35);
  opacity:0;visibility:hidden;transform:translateY(6px);transition:opacity .2s ease,transform .2s ease,visibility .2s;
}
#mth-header .mth-nav > li:hover > .sub-menu,
#mth-header .mth-nav > li:focus-within > .sub-menu{opacity:1;visibility:visible;transform:none}
#mth-header .mth-nav .sub-menu a{
  padding:9px 18px;font-size:13px;font-weight:600;letter-spacing:0;text-transform:none;white-space:normal;color:var(--mth-ink-2);
}
#mth-header .mth-nav .sub-menu a:hover,
#mth-header .mth-nav .sub-menu .current-menu-item > a{color:var(--mth-red);background:#F7F7F7}

/* Idioma (GTranslate) */
#mth-header .mth-lang{flex:none;display:flex;align-items:center}
#mth-header .mth-lang .gtranslate_wrapper{display:flex;align-items:center;gap:6px}
#mth-header .mth-lang a{display:block;line-height:0;opacity:.55;transition:opacity .2s ease}
#mth-header .mth-lang a:hover,#mth-header .mth-lang a.gt-current-lang{opacity:1}
#mth-header .mth-lang img{width:20px;height:20px;border-radius:50%;object-fit:cover}

/* Buscador: la lupa despliega el campo */
#mth-header .mth-search{position:relative;display:flex;align-items:center}
#mth-header .mth-search input{
  font-size:12.5px;line-height:1.3;color:var(--mth-ink);background:#fff;
  border:1px solid var(--mth-line);border-radius:4px;height:auto;max-width:none;
}
#mth-header .mth-search input::placeholder{color:var(--mth-gray-2);opacity:1}
#mth-header .mth-search input:focus{outline:none;border-color:var(--mth-red);box-shadow:0 0 0 3px rgba(226,35,26,.14)}
#mth-header .mth-search input::-webkit-search-cancel-button{-webkit-appearance:none;appearance:none}
#mth-header .mth-header__search{flex:none}
#mth-header .mth-search__toggle{display:flex;width:38px;height:38px;color:var(--mth-ink);transition:color .25s ease}
#mth-header .mth-search__toggle:hover{color:var(--mth-red)}
#mth-header .mth-search__toggle svg{width:18px;height:18px}
#mth-header .mth-header__search input{
  width:0;padding:8.8px 0;margin-left:0;border-width:0;opacity:0;pointer-events:none;
  transition:width .3s ease,padding .3s ease,margin .3s ease,opacity .22s ease;
}
#mth-header .mth-header__search.is-open input{
  width:clamp(150px,15vw,210px);padding:8.8px 12px;margin-left:6.4px;border-width:1px;opacity:1;pointer-events:auto;
}
#mth-header .mth-header__search.is-open .mth-search__toggle{color:var(--mth-red)}

/* Botón hamburguesa */
#mth-header .mth-burger{display:none;width:42px;height:42px;flex-direction:column;justify-content:center;align-items:center;gap:5px}
#mth-header .mth-burger span{display:block;width:23px;height:2px;background:var(--mth-ink);transition:transform .3s ease,opacity .3s ease}
#mth-header .mth-burger[aria-expanded="true"] span:nth-child(1){transform:translateY(7px) rotate(45deg)}
#mth-header .mth-burger[aria-expanded="true"] span:nth-child(2){opacity:0}
#mth-header .mth-burger[aria-expanded="true"] span:nth-child(3){transform:translateY(-7px) rotate(-45deg)}

/* Menú móvil */
#mth-header .mth-mobilenav{
  position:fixed;left:0;right:0;bottom:0;top:74px;z-index:998;background:#fff;
  padding:16px var(--mth-gut) 40px;overflow-y:auto;-webkit-overflow-scrolling:touch;
  transform:translateY(-8px);opacity:0;visibility:hidden;transition:.3s ease;
}
#mth-header .mth-mobilenav.is-open{opacity:1;visibility:visible;transform:none}
#mth-header .mth-mobilenav__list a{
  display:block;padding:15px 0;border-bottom:1px solid var(--mth-line);
  font-size:13px;font-weight:700;letter-spacing:.055em;text-transform:uppercase;color:var(--mth-ink);
}
#mth-header .mth-mobilenav__list .current-menu-item > a{color:var(--mth-red)}
#mth-header .mth-mobilenav__list .sub-menu a{
  padding:11px 0 11px 16px;font-size:14px;font-weight:600;letter-spacing:0;text-transform:none;color:var(--mth-ink-2);
}
#mth-header .mth-mobilenav__search{margin-top:22px;width:100%}
#mth-header .mth-mobilenav__search .mth-search__icon{position:absolute;left:13px;width:17px;height:17px;color:var(--mth-gray-2);pointer-events:none}
#mth-header .mth-mobilenav__search:focus-within .mth-search__icon{color:var(--mth-red)}
#mth-header .mth-mobilenav__search input{width:100%;font-size:14px;padding:13.6px 12.8px 13.6px 37px}
html.mth-menu-open,html.mth-menu-open body{overflow:hidden}
/* Los saltos a anclas (#salidas, etc.) no quedan tapados por el header fijo */
html{scroll-padding-top:90px}

/* =========================================================
   FOOTER
   ========================================================= */
#mth-footer .mth-footer{
  display:block;background:var(--mth-dark);color:rgba(255,255,255,.72);
  padding:clamp(38px,4.4vw,56px) 0 0;margin:0;width:auto;
}
#mth-footer .mth-footer__grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,.85fr) minmax(0,.85fr) auto;gap:clamp(22px,3vw,44px)}
#mth-footer .mth-footer__logo img{height:40px;width:auto;filter:brightness(0) invert(1);margin-bottom:19px}
#mth-footer .mth-footer__contact li{display:flex;gap:9.6px;align-items:flex-start;font-size:13.5px;line-height:1.55}
#mth-footer .mth-footer__contact li + li{margin-top:12px}
#mth-footer .mth-footer__contact svg{width:15px;height:15px;flex:none;margin-top:3px;color:rgba(255,255,255,.75)}
#mth-footer .mth-footer__contact a{transition:color .25s ease}
#mth-footer .mth-footer__contact a:hover{color:#fff;text-decoration:underline}
#mth-footer .mth-footer__menu li + li{margin-top:8.8px}
#mth-footer .mth-footer__menu a{font-size:13.5px;line-height:1.5;transition:color .25s ease}
#mth-footer .mth-footer__menu a:hover,
#mth-footer .mth-footer__menu .current-menu-item > a{color:#fff}
#mth-footer .mth-social{display:flex;gap:16px;align-items:center;align-self:start}
#mth-footer .mth-social a{color:rgba(255,255,255,.85);transition:color .25s ease,opacity .25s ease}
#mth-footer .mth-social a:hover{color:var(--mth-red)}
#mth-footer .mth-social svg{width:35px;height:35px}
#mth-footer .mth-social__ta img{width:35px;height:35px;filter:invert(1)}
#mth-footer .mth-social__ta:hover{opacity:.7}

#mth-footer .mth-footer__bar{
  margin-top:clamp(30px,3.4vw,44px);border-top:1px solid rgba(255,255,255,.12);padding:17px 0;
  display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center;
  font-size:12px;line-height:1.5;color:rgba(255,255,255,.5);
}
#mth-footer .mth-legal{display:flex;flex-wrap:wrap;justify-content:center;gap:4px 18px}
#mth-footer .mth-legal a{color:rgba(255,255,255,.66);transition:color .25s ease}
#mth-footer .mth-legal a:hover{color:#fff}
#mth-footer .mth-credit{white-space:nowrap}
#mth-footer .mth-credit::before{content:"·";margin:0 6px}
#mth-footer .mth-credit a{text-decoration:underline;text-underline-offset:2px}
#mth-footer .mth-credit a:hover{color:#fff}

/* WhatsApp flotante */
#mth-footer .mth-wa{
  position:fixed;right:16px;bottom:16px;z-index:997;display:none;
  height:54px;min-width:54px;padding:0 15px;border-radius:27px;background:#25D366;color:#fff;
  align-items:center;justify-content:center;gap:9px;box-shadow:0 10px 26px -8px rgba(0,0,0,.45);
  font-family:var(--mth-ff-b);font-size:14px;font-weight:700;transition:transform .2s ease,box-shadow .2s ease;
}
#mth-footer .mth-wa:hover{transform:translateY(-2px);box-shadow:0 14px 30px -8px rgba(0,0,0,.5);color:#fff}
#mth-footer .mth-wa svg{width:27px;height:27px;flex:none}
#mth-footer .mth-wa__label{display:none}
#mth-footer .mth-wa--always{display:flex}
@media (min-width:641px){
  #mth-footer .mth-wa--always{padding:0 20px 0 16px}
  #mth-footer .mth-wa--always .mth-wa__label{display:inline}
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width:1180px){
  #mth-header .mth-header__nav,#mth-header .mth-header__search{display:none}
  #mth-header .mth-lang{margin-left:auto}
  #mth-header .mth-burger{display:flex;margin-left:auto}
  #mth-header .mth-lang + .mth-header__search + .mth-burger{margin-left:0}
  #mth-footer .mth-footer__grid{grid-template-columns:1fr 1fr}
}
@media (max-width:640px){
  #mth-footer .mth-footer__grid{grid-template-columns:1fr}
  #mth-footer .mth-wa{display:flex;width:54px;padding:0}
  #mth-footer .mth-credit{display:block;white-space:normal}
  #mth-footer .mth-credit::before{content:none}
}
@media (prefers-reduced-motion:reduce){
  #mth-header *,#mth-footer *{transition-duration:.01ms !important}
}
@media print{
  #mth-header{position:static}
  #mth-header .mth-mobilenav,#mth-footer .mth-wa{display:none !important}
}
