/*
 * CHILE AVIACION · V48
 * Recupera los DOS logos originales del navbar (parche + logotipo horizontal).
 * Corrige las fuentes diminutas introducidas por el V47 en laptops de 14/15".
 * Carga DESPUES de navbar-desktop-14-v47.css.
 * No cambia las imagenes, los enlaces, el hero ni las galerias.
 */

/* La insignia y el wordmark deben seguir visibles. V47 los ocultaba en 1024-1499px. */
body.f35-body .ca31-header .ca31-brand,
body .app-bar .app-logo-wrap {
  display: flex !important;
  align-items: center;
  flex-shrink: 0;
  min-width: 0;
}
body.f35-body .ca31-header .ca31-brand > a,
body .app-bar .app-logo-wrap > a {
  display: inline-flex !important;
  flex: 0 0 auto;
  align-items: center;
  max-width: 100%;
}
body.f35-body .ca31-header .ca31-brand .ca31-icon-logo,
body .app-bar .app-logo-wrap .app-logo-icon,
body .app-bar .app-logo-wrap .app-logo-icon img {
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}
body.f35-body .ca31-header .ca31-brand .ca31-icon-logo,
body .app-bar .app-logo-wrap .app-logo-icon img {
  object-fit: contain !important;
  flex: 0 0 auto;
}
body.f35-body .ca31-header .ca31-brand .ca31-text-logo,
body .app-bar .app-logo-wrap .app-logo-text img {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
  object-fit: contain !important;
}

/* Notebooks 14/15": menu completo, texto legible, marca ORIGINAL de dos piezas. */
@media (min-width: 1340px) and (max-width: 1599.98px) {
  body.f35-body .ca31-header { height: 94px !important; }
  body.f35-body .ca31-header .ca31-header-inner {
    display: flex !important;
    flex-wrap: nowrap !important;
    width: 100%; max-width: 100%;
    gap: 10px !important;
    padding: 0 16px !important;
  }
  body.f35-body .ca31-header .ca31-brand { gap: 10px !important; }
  body.f35-body .ca31-header .ca31-brand .ca31-icon-logo {
    width: 66px !important; height: 66px !important;
    border-radius: 17px;
  }
  body.f35-body .ca31-header .ca31-brand .ca31-text-logo {
    width: 207px !important; max-width: 207px !important;
  }
  body.f35-body .f35-main-nav {
    display: flex !important;
    flex: 1 1 auto;
    min-width: 0;
    flex-wrap: nowrap !important;
    align-items: center;
    justify-content: flex-end;
    gap: 1px !important;
    margin-left: auto !important;
  }
  body.f35-body .f35-main-nav .nav-item {
    display: inline-flex !important;
    white-space: nowrap !important;
    font-size: clamp(.95rem, 1.1vw, 1.03rem) !important;
    line-height: 1.15 !important;
    font-weight: 780 !important;
    padding: 10px clamp(5px, .48vw, 8px) !important;
    min-height: 42px;
    gap: 4px !important;
  }
  body.f35-body .ca31-header-social {
    display: flex !important;
    flex: 0 0 auto;
    align-items: center;
    gap: 3px !important;
  }
  body.f35-body .ca31-header-social a { width: 31px !important; height: 37px !important; }
  body.f35-body .f35-mobile-toggle { display: none !important; }

  body .app-bar .app-bar-container {
    max-width: 100% !important;
    padding: 0 18px !important;
    gap: 12px !important;
    flex-wrap: nowrap !important;
  }
  body .app-bar .app-logo-wrap { gap: 10px !important; }
  body .app-bar .app-logo-wrap .app-logo-icon img,
  body .app-bar.scrolled .app-logo-wrap .app-logo-icon img {
    width: 68px !important; height: 68px !important;
    border-radius: 17px;
  }
  body .app-bar .app-logo-wrap .app-logo-text img,
  body .app-bar.scrolled .app-logo-wrap .app-logo-text img {
    width: 223px !important; max-width: 223px !important;
  }
  body .app-bar .nav-area { min-width: 0; gap: 8px !important; }
  body .app-bar .nav-links {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center;
    gap: 2px !important;
  }
  body .app-bar .nav-links .nav-item {
    white-space: nowrap;
    font-size: clamp(.96rem, 1.10vw, 1.04rem) !important;
    font-weight: 800;
    padding: 10px clamp(7px, .64vw, 11px) !important;
  }
  body .app-bar .social-links { gap: 2px; }
  body .app-bar .social-btn { width: 34px !important; height: 38px !important; }
  body .app-bar .menu-toggle { display: none !important; }
}

/* Laptops con ancho reducido / tablet horizontal: dos filas, sin hamburger. */
@media (min-width: 1024px) and (max-width: 1339.98px) {
  body.f35-body .ca31-header { height: 134px !important; }
  body.f35-body .ca31-header .ca31-header-inner {
    max-width: 100% !important;
    padding: 5px 17px !important;
    display: flex !important;
    flex-wrap: wrap !important;
    align-content: center !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 0 10px !important;
  }
  body.f35-body .ca31-header .ca31-brand {
    width: 100%; height: 73px;
    flex: 0 0 100%;
    justify-content: flex-start !important;
    gap: 12px !important;
  }
  body.f35-body .ca31-header .ca31-brand .ca31-icon-logo {
    width: 64px !important; height: 64px !important;
  }
  body.f35-body .ca31-header .ca31-brand .ca31-text-logo {
    width: 223px !important; max-width: 223px !important;
  }
  body.f35-body .f35-main-nav {
    display: flex !important;
    flex: 0 0 100% !important;
    width: 100% !important;
    min-width: 0;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    gap: clamp(3px, .8vw, 12px) !important;
  }
  body.f35-body .f35-main-nav .nav-item {
    display: inline-flex !important;
    white-space: nowrap;
    min-height: 40px;
    font-weight: 780 !important;
    font-size: clamp(.95rem, 1.18vw, 1rem) !important;
    padding: 9px clamp(5px, .9vw, 12px) !important;
    gap: 5px !important;
  }
  body.f35-body .ca31-header-social { display: none !important; }
  body.f35-body .f35-mobile-toggle { display: none !important; }

  body .app-bar,
  body .app-bar.scrolled { height: 132px !important; }
  body .app-bar .app-bar-container {
    max-width: 100% !important;
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    align-content: center !important;
    gap: 0 !important;
    padding: 5px 17px !important;
  }
  body .app-bar .app-logo-wrap {
    height: 74px;
    width: 100%;
    flex: 0 0 100%;
    justify-content: flex-start !important;
    gap: 12px !important;
  }
  body .app-bar .app-logo-wrap .app-logo-icon img,
  body .app-bar.scrolled .app-logo-wrap .app-logo-icon img {
    width: 64px !important; height: 64px !important;
  }
  body .app-bar .app-logo-wrap .app-logo-text img,
  body .app-bar.scrolled .app-logo-wrap .app-logo-text img {
    width: 221px !important; max-width: 221px !important;
  }
  body .app-bar .nav-area {
    width: 100%; height: 43px;
    flex: 0 0 100%;
    margin-left: 0 !important;
    justify-content: center !important;
  }
  body .app-bar .nav-links {
    display: flex !important;
    align-items: center;
    flex-wrap: nowrap !important;
    justify-content: center !important;
    gap: clamp(3px, .7vw, 12px) !important;
  }
  body .app-bar .nav-links .nav-item {
    font-size: clamp(.94rem, 1.20vw, 1.02rem) !important;
    font-weight: 800;
    padding: 9px clamp(7px, 1vw, 14px) !important;
  }
  body .app-bar .social-links { display: none !important; }
  body .app-bar .menu-toggle { display: none !important; }
  body .main-content,
  body.nav-scrolled .main-content {
    padding-top: 132px !important;
  }
}

/* Tablet vertical: marca visible con ambos logos y menu movil utilizable. */
@media (min-width: 768px) and (max-width: 1023.98px) {
  body.f35-body .ca31-header { height: 96px !important; }
  body.f35-body .ca31-header .ca31-header-inner { padding: 0 20px !important; gap: 12px !important; }
  body.f35-body .ca31-header .ca31-brand { gap: 12px !important; }
  body.f35-body .ca31-header .ca31-brand .ca31-icon-logo { width: 66px !important; height: 66px !important; }
  body.f35-body .ca31-header .ca31-brand .ca31-text-logo { width: 238px !important; max-width: 238px !important; }
  body.f35-body .f35-main-nav, body.f35-body .ca31-header-social { display: none !important; }
  body.f35-body .f35-mobile-toggle { display: block !important; margin-left: auto !important; }

  body .app-bar, body .app-bar.scrolled { height: 96px !important; }
  body .app-bar .app-bar-container { padding: 0 20px !important; gap: 10px !important; }
  body .app-bar .app-logo-wrap { gap: 12px !important; }
  body .app-bar .app-logo-wrap .app-logo-icon img,
  body .app-bar.scrolled .app-logo-wrap .app-logo-icon img { width: 66px !important; height: 66px !important; }
  body .app-bar .app-logo-wrap .app-logo-text img,
  body .app-bar.scrolled .app-logo-wrap .app-logo-text img { width: 238px !important; max-width: 238px !important; }
  body .app-bar .nav-area { margin-left: auto !important; }
  body .app-bar .nav-links, body .app-bar .social-links { display: none !important; }
  body .app-bar .menu-toggle { display: inline-flex !important; }
  body .main-content, body.nav-scrolled .main-content { padding-top: 96px !important; }
}

/* Celulares: parche redondo junto al logotipo, sin cortar ni amontonar. */
@media (max-width: 767.98px) {
  body.f35-body .ca31-header { height: 80px !important; }
  body.f35-body .ca31-header .ca31-header-inner {
    max-width: 100%;
    padding: 0 12px !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;
  }
  body.f35-body .ca31-header .ca31-brand { gap: 8px !important; flex-shrink: 1 !important; }
  body.f35-body .ca31-header .ca31-brand .ca31-icon-logo {
    width: 50px !important; height: 50px !important;
    border-radius: 13px;
  }
  body.f35-body .ca31-header .ca31-brand .ca31-text-logo {
    width: clamp(146px, 44vw, 195px) !important;
    max-width: 100% !important;
  }
  body.f35-body .f35-main-nav, body.f35-body .ca31-header-social { display: none !important; }
  body.f35-body .f35-mobile-toggle { display: block !important; margin-left: auto !important; flex-shrink: 0; }

  body .app-bar, body .app-bar.scrolled { height: 80px !important; }
  body .app-bar .app-bar-container {
    padding: 0 12px !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
  }
  body .app-bar .app-logo-wrap { gap: 8px !important; flex-shrink: 1 !important; }
  body .app-bar .app-logo-wrap .app-logo-icon img,
  body .app-bar.scrolled .app-logo-wrap .app-logo-icon img {
    width: 50px !important; height: 50px !important; border-radius: 13px;
  }
  body .app-bar .app-logo-wrap .app-logo-text img,
  body .app-bar.scrolled .app-logo-wrap .app-logo-text img {
    width: clamp(146px, 44vw, 195px) !important;
    max-width: 100% !important;
  }
  body .app-bar .nav-area { margin-left: auto !important; }
  body .app-bar .nav-links, body .app-bar .social-links { display: none !important; }
  body .app-bar .menu-toggle { display: inline-flex !important; flex-shrink: 0; }
  body .main-content, body.nav-scrolled .main-content { padding-top: 80px !important; }
}

@media (max-width: 390px) {
  body.f35-body .ca31-header { height: 74px !important; }
  body.f35-body .ca31-header .ca31-header-inner { padding: 0 9px !important; gap: 5px !important; }
  body.f35-body .ca31-header .ca31-brand { gap: 5px !important; }
  body.f35-body .ca31-header .ca31-brand .ca31-icon-logo { width: 44px !important; height: 44px !important; }
  body.f35-body .ca31-header .ca31-brand .ca31-text-logo { width: clamp(133px, 43vw, 166px) !important; }
  body.f35-body .f35-mobile-toggle > summary { padding: 9px 10px !important; }

  body .app-bar, body .app-bar.scrolled { height: 74px !important; }
  body .app-bar .app-bar-container { padding: 0 9px !important; gap: 5px !important; }
  body .app-bar .app-logo-wrap { gap: 5px !important; }
  body .app-bar .app-logo-wrap .app-logo-icon img,
  body .app-bar.scrolled .app-logo-wrap .app-logo-icon img { width: 44px !important; height: 44px !important; }
  body .app-bar .app-logo-wrap .app-logo-text img,
  body .app-bar.scrolled .app-logo-wrap .app-logo-text img { width: clamp(133px, 43vw, 166px) !important; }
  body .app-bar .menu-toggle { width: 42px !important; height: 42px !important; }
  body .main-content, body.nav-scrolled .main-content { padding-top: 74px !important; }
}
