/* IES PALPA · Adaptación responsiva institucional 2026
   Hoja complementaria. No modifica la vista de escritorio >=1200 px. */

.palpa-mobile-logo { display:none; }
.palpa-mobile-home { display:none !important; }

/* Contenido flexible, fotografías y documentos en pantallas pequeñas. */
@media (max-width:1199px) {
  *, *::before, *::after { box-sizing:border-box; }
  html { -webkit-text-size-adjust:100%; text-size-adjust:100%; }
  .page, .site-main, .ttm-row, .container, .container-fluid { min-width:0; }
  .ttm-row .row > [class*="col-"], .site-main [class*="col-"] { min-width:0; }
  .site-main p, .site-main li, .site-main h1, .site-main h2,
  .site-main h3, .site-main h4, footer p, footer li { overflow-wrap:break-word; }
  .site-main img, footer img { max-width:100%; }
  .site-main iframe, .site-main embed, .site-main object,
  .site-main video { max-width:100%; }
  .palpa-table-scroll { width:100%; max-width:100%; overflow-x:auto; -webkit-overflow-scrolling:touch; overscroll-behavior-x:contain; }
  .palpa-table-scroll table { min-width:560px; margin-bottom:0; }
  .palpa-table-scroll:focus { outline:2px solid #ff4f01; outline-offset:2px; }

  /* Encabezado en el flujo normal: nunca se monta sobre el banner. */
  header.ttm-header-style-04 { position:relative !important; inset:auto !important; z-index:1020; width:100%; }
  header.ttm-header-style-04 .top_bar { display:none !important; }
  header.ttm-header-style-04 .fbar-main { display:none !important; }
  .ttm-header-style-04 #site-header-menu .site-header-menu-inner {
    height:80px !important; line-height:normal !important; background:#121d30 !important;
  }
  .ttm-header-style-04 #site-header-menu .site-navigation {
    height:80px; min-height:80px; display:flex !important; flex-direction:row !important;
    flex-wrap:nowrap !important; justify-content:flex-start !important;
    align-items:center !important; gap:7px; padding:0 12px; position:relative;
    background:#ff4f01 !important;
  }
  .ttm-header-style-04 #site-header-menu .site-navigation:after { display:none !important; content:none !important; }
  .palpa-mobile-logo {
    display:flex; flex:0 0 auto; width:150px; height:76px; margin:0 auto 0 0;
    align-items:center; justify-content:flex-start; position:relative; z-index:4;
  }
  .palpa-mobile-logo img { width:auto; height:auto; max-width:100%; max-height:68px; object-fit:contain; }
  .ttm-header-style-04 #site-header-menu .site-navigation .header_extra {
    display:flex !important; visibility:visible !important; flex:0 0 auto;
    align-items:center !important; flex-direction:row !important;
    order:2; margin:0 0 0 auto !important; gap:6px; height:auto;
    position:static; z-index:5;
  }
  .ttm-header-style-04 .header_extra > div { margin:0 !important; }
  .ttm-header-style-04 .header_extra .header_search { position:static; }
  .ttm-header-style-04 .header_search > a.search_btn {
    display:flex; justify-content:center; align-items:center;
    width:44px; height:44px; padding:0; margin:0; line-height:1;
    color:#fff !important; border:1px solid rgba(255,255,255,.45); border-radius:4px;
    font-size:20px; text-decoration:none;
  }
  .ttm-header-style-04 .header_search > a.search_btn i { color:inherit !important; font-size:20px; }
  .ttm-header-style-04 .header_btn a.ttm-btn {
    display:flex !important; height:44px; min-height:44px; align-items:center;
    justify-content:center; padding:8px 13px !important; margin:0 !important;
    font-size:13px; line-height:1.25; white-space:nowrap;
    color:#121d30 !important; background:#fff !important;
    border:1px solid #fff !important; border-radius:4px;
  }
  .ttm-header-style-04 .header_btn a.ttm-btn:hover,
  .ttm-header-style-04 .header_btn a.ttm-btn:focus { color:#ff4f01 !important; }
  .ttm-header-style-04 #site-header-menu .site-navigation .menubar {
    position:relative !important; top:auto !important; right:auto !important;
    bottom:auto !important; z-index:6; order:3; flex:0 0 44px;
    width:44px; height:44px; min-width:44px; display:flex; align-items:center;
    justify-content:center; cursor:pointer; padding:0; border:1px solid rgba(255,255,255,.45);
    border-radius:4px; background:transparent; appearance:none;
  }
  .ttm-header-style-04 .menubar-box { position:relative; width:30px; height:24px; }
  .ttm-header-style-04 .menubar-inner,
  .ttm-header-style-04 .menubar-inner:before,
  .ttm-header-style-04 .menubar-inner:after { background:#fff !important; }
  .ttm-header-style-04 #site-header-menu nav.main-menu {
    position:absolute !important; top:80px !important; left:0 !important; right:0 !important;
    width:100% !important; z-index:1100 !important; background:#fff !important;
    max-height:calc(100vh - 80px); max-height:calc(100dvh - 80px);
    overflow-x:hidden; overflow-y:auto; -webkit-overflow-scrolling:touch;
    overscroll-behavior:contain; text-align:left;
  }
  .ttm-header-style-04 #site-header-menu nav.main-menu ul.menu { padding:0 !important; }
  .ttm-header-style-04 #site-header-menu nav.main-menu ul.menu > li > a {
    display:block; padding:13px 20px !important; line-height:1.5 !important;
    color:#1c2a3b !important; font-size:16px; font-weight:600;
    min-height:48px; height:auto; white-space:normal; text-align:left;
    border-bottom:1px solid #e9eef2;
  }
  .ttm-header-style-04 #site-header-menu nav.main-menu ul.menu > li > a:before { display:none !important; }
  .ttm-header-style-04 #site-header-menu nav.main-menu ul.mega-submenu {
    background:#f5f7fa !important; padding:2px 0 8px 16px !important;
  }
  .ttm-header-style-04 #site-header-menu nav.main-menu ul.mega-submenu li a {
    display:block; padding:12px 18px 12px 12px !important;
    font-size:15px; line-height:1.45 !important;
    min-height:44px; white-space:normal; overflow-wrap:anywhere; color:#26374a;
  }
  .ttm-header-style-04 #site-header-menu nav.main-menu .palpa-mobile-home { display:block !important; }
  .ttm-header-style-04 .header_search .header_search_content {
    top:calc(100% + 0px) !important; left:auto !important; right:0 !important;
    width:min(430px, calc(100vw - 24px)) !important;
    max-width:calc(100vw - 24px); padding:12px; z-index:1200 !important;
    transform-origin:top right;
    pointer-events:none;
  }
  .ttm-header-style-04 .header_search .header_search_content.on { pointer-events:auto; }
  .ttm-header-style-04 .header_search #searchbox:before { display:none; }
  .ttm-header-style-04 .header_search #searchbox { display:flex; gap:3px; min-width:0; width:100%; }
  .ttm-header-style-04 .header_search #search_query_top {
    display:block; width:auto !important; min-width:0; flex:1 1 0;
    float:none !important; height:48px; line-height:normal; padding:10px 12px;
    font-size:16px;
  }
  .ttm-header-style-04 .header_search_content button.close-search {
    flex:0 0 48px; width:48px; height:48px; float:none !important;
  }
  .ttm-header-style-04 .header_search .palpa-suggest-box { max-height: min(46vh, 330px); }
  .ttm-header-style-04 #site-header-menu .menubar:focus-visible,
  .ttm-header-style-04 #site-header-menu .header_search a:focus-visible,
  .ttm-header-style-04 #site-header-menu .header_btn a:focus-visible { outline:3px solid #121d30; outline-offset:2px; }

  /* El slider utiliza todo el ancho sin forzar desplazamiento lateral. */
  .banner-slider, .banner-slider .banner-slide, .banner-slider .banner-caption { max-width:100%; }
  .banner-slider .banner-caption .container { padding-left:15px; padding-right:15px; }
  .banner-slider .banner-caption h2, .banner-slider .banner-caption h3 {
    overflow-wrap:break-word; white-space:normal;
  }
  .site-main .ttm-single-image-wrapper, .site-main .ttm_single_image-wrapper { max-width:100%; }
  .ttm-page-title-row .page-title-heading h2 { overflow-wrap:break-word; }
}

@media (max-width:767px) {
  .ttm-header-style-04 #site-header-menu .site-navigation { gap:5px; padding:0 10px; }
  .palpa-mobile-logo { width:123px; }
  .palpa-mobile-logo img { max-height:60px; }
  .ttm-header-style-04 .header_btn a.ttm-btn { font-size:12px; padding:7px 10px !important; }
  .banner-slider .banner-caption h2, .banner-slider .banner-caption .banner-text h2,
  .banner-slider .banner-caption .banner-text_1 h2 {
    font-size:clamp(22px,5vw,36px) !important; line-height:1.23 !important;
  }
  .banner-slider .banner-caption h3 { font-size:clamp(20px,4vw,28px) !important; line-height:1.3 !important; }
  .banner-slider .banner-caption br { display:none; }
  .site-main .row, .ttm-row .row { min-width:0; }
  .site-main h1 { font-size:clamp(27px,7vw,40px); line-height:1.2; }
  .site-main h2 { font-size:clamp(24px,6vw,34px); line-height:1.23; }
  .ttm-row .container, footer .container { padding-left:14px !important; padding-right:14px !important; }
  .ttm-row .container .row, footer .container .row { margin-left:-14px; margin-right:-14px; }
  .site-main .ttm-tabs ul.tabs, .site-main .nav-tabs { flex-wrap:wrap; }
  .site-main .ttm-tabs ul.tabs li { max-width:100%; }
  .site-main iframe { display:block; width:100%; }
  .site-main embed[type="application/pdf"],
  .site-main object[type="application/pdf"] { display:block; width:100%; height:70vh; min-height:400px; }
}

@media (max-width:420px) {
  .palpa-mobile-logo { width:94px; height:76px; }
  .palpa-mobile-logo img { max-height:50px; }
  .ttm-header-style-04 #site-header-menu .site-navigation { gap:4px; padding:0 7px; }
  .ttm-header-style-04 .header_extra > div { margin:0 !important; }
  .ttm-header-style-04 .header_extra { gap:4px !important; }
  .ttm-header-style-04 .header_search > a.search_btn,
  .ttm-header-style-04 #site-header-menu .site-navigation .menubar {
    width:42px; height:44px; min-width:42px; flex-basis:42px;
  }
  .ttm-header-style-04 .header_btn a.ttm-btn { font-size:11.5px; padding:6px 7px !important; }
  .ttm-header-style-04 .header_search .header_search_content { right:0 !important; }
}

@media (max-width:340px) {
  .palpa-mobile-logo { width:76px; }
  .palpa-mobile-logo img { max-height:44px; }
  .ttm-header-style-04 .header_btn a.ttm-btn { padding:6px 5px !important; font-size:11px; }
  .ttm-header-style-04 #site-header-menu .site-navigation { gap:2px; padding:0 5px; }
}

/* Desktop: el control táctil no debe alterar la barra horizontal tradicional. */
@media (min-width:1200px) {
  .ttm-header-style-04 .btn-show-menu-mobile { display:none !important; }
}
@media (max-width:1199px) {
  /* El fondo de la barra móvil debe llegar a ambos bordes de la pantalla. */
  .ttm-header-style-04 #site-header-menu > .site-header-menu-inner > .container {
    padding-left:0 !important; padding-right:0 !important;
  }
}

/* Elementos heredados con márgenes de escritorio que recortaban imágenes
   en Misión/Visión y las cifras destacadas de la portada. */
@media (max-width:1199px) {
  .ttm-row .spacing-16 { margin-right:0 !important; max-width:100%; }
  .ttm-row .ttm-left-span .ttm-col-wrapper-bg-layer,
  .ttm-row .ttm-right-span .ttm-col-wrapper-bg-layer {
    margin-left:0 !important; margin-right:0 !important;
  }
  .site-main .ml_100 { margin-left:0 !important; }
  .site-main .ttm-col-bgimage-yes, .site-main .ttm-col-bgcolor-yes { max-width:100%; }
}
@media (max-width:767px) {
  .site-main .res-991-pl-100 { padding-left:18px !important; padding-right:18px !important; }
}

/* Menú institucional: sólo la opción específica del submenú actual
   se marca en naranja. Los títulos principales no se resaltan. */
.ttm-header-style-04 #site-header-menu nav.main-menu ul.menu li ul.mega-submenu li.active > a {
  background-color: #ff4f01 !important;
  color: #fff !important;
  font-weight: 600;
}
