/*
 * Prestadores - Header publico
 * Fase 9K.4 - Header Kadence y dropdown movil.
 * Propietario visual: cabecera publica global de Prestadores.cl.
 */

/* Fix Safari: header Kadence sin blur */
header.kadence-header{
  position:relative;
  top:auto;
  z-index:50;
  backdrop-filter:none;
}
/* 
   HEADER SaaS  Kadence / Prestadores
   Inspirado en barra contenida tipo Clinifica
 */

/* Fondo general del header */
#masthead.site-header{
  background:transparent !important;
  padding:4px 0 2px !important;
  box-shadow:none !important;
  border:0 !important;
}

/* Quitamos fondos planos heredados */
#masthead .site-header-wrap,
#masthead .site-header-row-container,
#masthead .site-main-header-wrap,
#masthead .site-header-inner-wrap{
  background:transparent !important;
  box-shadow:none !important;
  border:0 !important;
}

/* Contenedor principal tipo barra flotante */
#masthead .site-header-row-container-inner,
#masthead .site-header-inner-wrap{
  max-width:1200px !important;
  width:calc(100% - 32px) !important;
  margin:0 auto !important;

  background:#ffffff !important;
  border:1px solid rgba(15,23,42,.06) !important;
  border-radius:18px !important;

  box-shadow:0 2px 8px rgba(15,23,42,.03) !important;

  min-height:54px !important;
  height:54px !important;
  padding:0 14px !important;
}

/* Layout mas limpio en la fila principal */
#masthead .site-main-header-inner-wrap,
#masthead .site-header-row{
  min-height:54px !important;
  height:54px !important;
  align-items:center !important;
}

/* Logo un poco mas limpio */
#masthead .site-branding,
#masthead .site-title,
#masthead .custom-logo-link{
  display:flex !important;
  align-items:center !important;
}

#masthead .custom-logo{
  max-height:28px !important;
  width:auto !important;
}

/* Menu principal mas SaaS */
#masthead .site-navigation .menu,
#masthead .site-navigation .menu > ul{
  display:flex;
  align-items:center;
  gap:26px;
}

#masthead .site-navigation .menu a{
  font-size:14px !important;
  font-weight:600 !important;
  color:#475569 !important;
  text-decoration:none !important;
  padding:4px 0 !important;
  line-height:1.1 !important;
  transition:color .18s ease, opacity .18s ease;
}

#masthead .site-navigation .menu a:hover,
#masthead .site-navigation .current-menu-item > a,
#masthead .site-navigation .current_page_item > a{
  color:#0f172a !important;
}

/* Icono busqueda mas contenido */
#masthead .header-search-toggle,
#masthead .search-toggle-open-container{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  width:34px !important;
  height:34px !important;
  border-radius:999px !important;
  background:transparent !important;
  color:#0f172a !important;
  transition:background .18s ease, transform .18s ease;
}

#masthead .header-search-toggle:hover,
#masthead .search-toggle-open-container:hover{
  background:#f3f6fb !important;
  transform:translateY(-1px);
}

/* Boton derecha tipo Clinifica */
#masthead .header-button-wrap .kb-button,
#masthead .header-button-wrap .button,
#masthead .site-header-button a{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;

  min-height:36px !important;
  height:36px !important;
  padding:0 16px !important;

  border-radius:999px !important;
  background:#ffffff !important;
  border:1px solid rgba(15,23,42,.08) !important;
  color:#1f2937 !important;

  font-size:13px !important;
  font-weight:500 !important;
  text-decoration:none !important;

  box-shadow:none !important;
  transition:background .18s ease, transform .18s ease, box-shadow .18s ease;
}

#masthead .header-button-wrap .kb-button:hover,
#masthead .header-button-wrap .button:hover,
#masthead .site-header-button a:hover{
  background:#ffffff !important;
  transform:translateY(-1px);
  box-shadow:0 10px 24px rgba(15,23,42,.06) !important;
}

/* Mejor reparto de espacios en desktop */
@media (min-width: 1025px){
  #masthead .site-header-main-section-left{
    flex:0 0 auto !important;
  }

  #masthead .site-header-main-section-center{
    flex:1 1 auto !important;
    justify-content:center !important;
  }

  #masthead .site-header-main-section-right{
    flex:0 0 auto !important;
  }
}
/* Sticky mas limpio */
#masthead.item-is-fixed,
#masthead.site-header.is-fixed,
#masthead.site-header.is-sticky,
#masthead .item-is-fixed{
  top:8px !important;
}

#masthead.item-is-fixed .site-header-row-container-inner,
#masthead.site-header.is-fixed .site-header-row-container-inner,
#masthead.site-header.is-sticky .site-header-row-container-inner,
#masthead.item-is-fixed .site-header-inner-wrap,
#masthead.site-header.is-fixed .site-header-inner-wrap,
#masthead.site-header.is-sticky .site-header-inner-wrap{
  box-shadow:0 3px 10px rgba(15,23,42,.04) !important;
}
/* Tablet */
@media (max-width: 1024px){
  #masthead.site-header{
    padding:10px 0 8px !important;
  }

  #masthead .site-header-row-container-inner,
#masthead .site-header-inner-wrap{
    width:calc(100% - 20px) !important;
    min-height:64px !important;
    padding:0 14px !important;
    border-radius:20px !important;
  }

  #masthead .site-main-header-inner-wrap{
    min-height:64px !important;
  }

  #masthead .custom-logo{
    max-height:34px !important;
  }
}

/* Mobile */
@media (max-width: 767px){
#masthead.site-header{
  padding:3px 0 2px !important;
}

#masthead .site-header-row-container-inner,
#masthead .site-header-inner-wrap{
  width:calc(100% - 16px) !important;
  min-height:50px !important;
  height:50px !important;
  padding:0 12px !important;
  border-radius:16px !important;
}

#masthead .site-main-header-inner-wrap,
#masthead .site-header-row{
  min-height:50px !important;
  height:50px !important;
}

#masthead .custom-logo{
  max-height:24px !important;
}

  /* Boton CTA menos dominante en movil */
#masthead .header-button-wrap .kb-button,
#masthead .header-button-wrap .button,
#masthead .site-header-button a{
  min-height:32px !important;
  height:32px !important;
  padding:0 12px !important;
  font-size:12px !important;
}

  /* Hamburguesa mas limpia */
#masthead .header-search-toggle,
#masthead .search-toggle-open-container,
#masthead .mobile-toggle-open-container,
#masthead .menu-toggle-open{
  width:32px !important;
  height:32px !important;
  border-radius:10px !important;
  background:transparent !important;
}
}
#masthead .site-header-row-container-inner:hover{
  transform:none !important;
  box-shadow:0 3px 10px rgba(15,23,42,.04) !important;
}

/* =========================
   EFECTO FLOTANTE MAS SUTIL
========================= */

.site-header{
  margin-top:8px !important;
  border-radius:16px !important;
  box-shadow:0 4px 14px rgba(15,23,42,.04) !important;
}

.site-header.is-fixed,
.site-header.is-sticky{
  top:10px !important;
}

/*

 21) HEADER MOVIL  DROPDOWN SaaS PRESTADORES
 (nuevo menu movil custom)

*/
@media (max-width: 1024px){

  /* Neutralizar drawer lateral nativo de Kadence */
  #mobile-drawer,
.popup-drawer.popup-drawer-layout-sidepanel{
    display:none !important;
  }

  .prestadores-mobile-backdrop{
    display:none;
    position:fixed;
    inset:0;
    background:rgba(15,23,42,.28);
    z-index:99990;
  }

  .prestadores-mobile-backdrop.is-open{
    display:block;
  }

  #prestadores-mobile-dropdown{
    display:none;
    position:fixed;
    top:72px;
    left:12px;
    right:12px;
    background:#fff;
    border:1px solid rgba(15,23,42,.08);
    border-radius:18px;
    box-shadow:0 20px 60px rgba(15,23,42,.12);
    padding:10px 0 14px;
    z-index:99999;
  }

  #prestadores-mobile-dropdown.is-open{
    display:block;
  }

  #prestadores-mobile-dropdown .pmd-close{
    display:flex;
    justify-content:flex-end;
    padding:0 14px 6px;
  }

  #prestadores-mobile-dropdown .pmd-close-btn{
    appearance:none;
    border:0;
    background:transparent;
    font-size:28px;
    line-height:1;
    color:#94a3b8;
    cursor:pointer;
  }

  #prestadores-mobile-dropdown .pmd-links{
    display:grid;
    gap:2px;
    padding:2px 8px 0;
  }

  #prestadores-mobile-dropdown .pmd-links a{
    display:block;
    padding:14px 16px;
    border-radius:12px;
    text-decoration:none;
    color:#0f172a;
    font-size:16px;
    font-weight:600;
  }

  #prestadores-mobile-dropdown .pmd-links a:hover{
    background:#f8fafc;
  }

  #prestadores-mobile-dropdown .pmd-cta{
    padding:14px 14px 0;
  }

  #prestadores-mobile-dropdown .pmd-cta a{
    display:flex;
    align-items:center;
    justify-content:center;
    min-height:46px;
    border-radius:14px;
    text-decoration:none;
    font-weight:700;
    color:#fff;
    background:linear-gradient(135deg,#4f7cff,#6a5cff);
    box-shadow:0 12px 26px rgba(79,124,255,.28);
  }

  html.showing-popup-drawer-from-right,
body.showing-popup-drawer-from-right,
html.showing-popup-drawer,
body.showing-popup-drawer{
    overflow:auto !important;
    height:auto !important;
  }
}