@import url('https://fonts.googleapis.com/css2?family=Albert+Sans:wght@600;700;800&family=Mulish:wght@600&display=swap');

:root{
  --ib-mobile-header-bg: #3B5998;
  --ib-mobile-header-bg-dark: #35518d;
  --ib-mobile-header-text: #ffffff;

  --ib-mobile-header-panel-bg: #ffffff;
  --ib-mobile-header-panel-text: #3a3a3a;
  --ib-mobile-header-panel-active: #3B5998;

  --ib-mobile-header-sep-dark: rgba(41, 63, 116, .78);
  --ib-mobile-header-sep-light: rgba(255,255,255, .05);

  --ib-mobile-header-shadow-drop: 0 14px 30px rgba(0,0,0,.22);
  --ib-mobile-header-radius-bottom: 0 0 18px 18px;

  --ib-mobile-header-toggle-bg: #ffffff;
  --ib-mobile-header-toggle-icon: #3B5998;
}

/* CONTENEDOR */
.ib-site-mobile-header{
  display: none;
  width: 100%;
  position: relative;
  z-index: 1001;
  font-family: 'Albert Sans', sans-serif;
  -webkit-tap-highlight-color: transparent;
}

/* BARRA */
.ib-site-mobile-header__bar{
  display: grid;
  grid-template-columns: 28% 24% 24% 24%;
  align-items: stretch;
  background: var(--ib-mobile-header-bg);
  border-top: 1px solid rgba(255,255,255,.07);
  border-bottom: 1px solid rgba(20,32,67,.32);
  position: relative;
  z-index: 1003;
}

/* CELDAS */
.ib-site-mobile-header__cell{
  min-width: 0;
  min-height: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: var(--ib-mobile-header-bg);
  color: var(--ib-mobile-header-text) !important;
  text-decoration: none !important;
  transition: none;
  position: relative;
  border: 0 !important;
  outline: none !important;
  -webkit-tap-highlight-color: transparent;
}

.ib-site-mobile-header__cell::after{
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 1px;
  height: 100%;
  background: var(--ib-mobile-header-sep-dark);
  box-shadow:
    1px 0 0 var(--ib-mobile-header-sep-light),
    inset -10px 0 14px rgba(0,0,0,.08);
}

.ib-site-mobile-header__cell:last-child::after{
  display: none;
}

.ib-site-mobile-header__cell:visited,
.ib-site-mobile-header__cell:hover,
.ib-site-mobile-header__cell:focus,
.ib-site-mobile-header__cell:active,
.ib-site-mobile-header__cell:focus-visible{
  color: var(--ib-mobile-header-text) !important;
  text-decoration: none !important;
  outline: none !important;
  box-shadow: none !important;
}

/* LOGO */
.ib-site-mobile-header__cell--logo{
  align-items: flex-start;
  justify-content: center;
  padding: 0 10px 0 12px;
}

.ib-site-mobile-header__logo{
  display: block;
  width: auto;
  max-height: 44px;
  max-width: 96px;
  object-fit: contain;
}

.ib-site-mobile-header__brand-fallback{
  color: #fff;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.02;
}

/* BOTONES ESTUDIO / TEMAS */
.ib-site-mobile-header__cell--nav{
  text-align: center;
}

.ib-site-mobile-header__label{
  color: #fff;
  font-family: 'Albert Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  letter-spacing: 0;
  min-height: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ib-site-mobile-header__icon{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  line-height: 1;
}

.ib-site-mobile-header__icon svg{
  width: 25px;
  height: 25px;
  display: block;
  fill: currentColor;
}

.ib-site-mobile-header__cell--nav:nth-child(3) .ib-site-mobile-header__icon svg{
  width: 34px;
  height: 34px;
}

/* ACTIVO */
.ib-site-mobile-header__cell.is-active{
  background: var(--ib-mobile-header-bg-dark);
}

/* TOGGLE HAMBURGUESA */
.ib-site-mobile-header__cell--toggle{
  appearance: none;
  -webkit-appearance: none;
  border: 0 !important;
  outline: none !important;
  cursor: pointer;
  padding: 0;
  margin: 0;
  background: var(--ib-mobile-header-bg) !important;
  background-image: none !important;
  color: var(--ib-mobile-header-text) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  -webkit-tap-highlight-color: transparent;
  tap-highlight-color: transparent;
}

.ib-site-mobile-header__cell--toggle:hover,
.ib-site-mobile-header__cell--toggle:focus,
.ib-site-mobile-header__cell--toggle:active,
.ib-site-mobile-header__cell--toggle:focus-visible,
.ib-site-mobile-header.is-open .ib-site-mobile-header__cell--toggle{
  background: var(--ib-mobile-header-bg) !important;
  background-image: none !important;
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;
}

.ib-site-mobile-header__cell--toggle::-moz-focus-inner{
  border: 0;
}

/* Caja blanca interna de hamburguesa */
.ib-site-mobile-header__toggle-open,
.ib-site-mobile-header__toggle-close{
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ib-mobile-header-toggle-bg);
  border-radius: 6px;
  color: var(--ib-mobile-header-toggle-icon);
  flex: 0 0 auto;
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;
}

.ib-site-mobile-header__toggle-open svg,
.ib-site-mobile-header__toggle-close svg{
  width: 18px;
  height: 18px;
  display: block;
  fill: currentColor;
}

.ib-site-mobile-header__toggle-close{
  display: none;
}

.ib-site-mobile-header.is-open .ib-site-mobile-header__toggle-open{
  display: none;
}

.ib-site-mobile-header.is-open .ib-site-mobile-header__toggle-close{
  display: inline-flex;
}

/* PANEL */
.ib-site-mobile-header__panel{
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: transparent;
  z-index: 1002;
  pointer-events: none;
}

.ib-site-mobile-header.is-open .ib-site-mobile-header__panel{
  pointer-events: auto;
}

.ib-site-mobile-header__panel-inner{
  background: var(--ib-mobile-header-panel-bg);
  border-radius: var(--ib-mobile-header-radius-bottom);
  box-shadow: var(--ib-mobile-header-shadow-drop);
  overflow: hidden;
  transform-origin: top center;
  animation: ibMobileHeaderDrop .34s ease;
}

/* LINKS PANEL */
.ib-site-mobile-header__panel-link{
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 12px 18px;
  background: #fff;
  color: var(--ib-mobile-header-panel-text) !important;
  text-decoration: none !important;
  font-family: 'Mulish', sans-serif;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  border-bottom: 1px solid rgba(0,0,0,.05);
  transition: color .20s ease, background .20s ease;
  outline: none !important;
  -webkit-tap-highlight-color: transparent;
}

.ib-site-mobile-header__panel-link:last-child{
  border-bottom: 0;
}

.ib-site-mobile-header__panel-link:hover,
.ib-site-mobile-header__panel-link:focus,
.ib-site-mobile-header__panel-link:active,
.ib-site-mobile-header__panel-link:visited{
  text-decoration: none !important;
  outline: none !important;
  box-shadow: none !important;
}

.ib-site-mobile-header__panel-link:hover,
.ib-site-mobile-header__panel-link:focus-visible{
  color: var(--ib-mobile-header-panel-active) !important;
}

.ib-site-mobile-header__panel-link.is-active{
  background: #3B5998;
  color: #ffffff !important;
}

.ib-site-mobile-header__panel-link--logout:hover,
.ib-site-mobile-header__panel-link--logout:focus-visible{
  color: var(--ib-mobile-header-panel-active) !important;
}

/* ANIMACIÓN */
@keyframes ibMobileHeaderDrop{
  from{
    opacity: 0;
    transform: translateY(-14px);
  }
  to{
    opacity: 1;
    transform: translateY(0);
  }
}

/* RESPONSIVE */
@media (max-width: 980px){
  .ib-site-mobile-header{
    display: block;
  }
}

@media (max-width: 640px){
  .ib-site-mobile-header__bar{
    grid-template-columns: 28% 24% 24% 24%;
  }

  .ib-site-mobile-header__cell{
    min-height: 60px;
    gap: 3px;
  }

  .ib-site-mobile-header__cell--logo{
    padding: 0 10px 0 12px;
  }

  .ib-site-mobile-header__logo{
    max-height: 44px;
    max-width: 96px;
  }

  .ib-site-mobile-header__label{
    font-size: 13px;
    min-height: 5px;
  }
  
  .ib-site-mobile-header__cell--nav:nth-child(2){
  gap: 3px;
}

.ib-site-mobile-header__cell--nav:nth-child(3){
  gap: 0px;
}

  .ib-site-mobile-header__icon{
    min-height: 30px;
  }

  .ib-site-mobile-header__icon svg{
    width: 25px;
    height: 25px;
  }

  .ib-site-mobile-header__cell--nav:nth-child(3) .ib-site-mobile-header__icon svg{
    width: 34px;
    height: 34px;
  }

  .ib-site-mobile-header__toggle-open,
  .ib-site-mobile-header__toggle-close{
    width: 30px;
    height: 30px;
    border-radius: 6px;
  }

  .ib-site-mobile-header__toggle-open svg,
  .ib-site-mobile-header__toggle-close svg{
    width: 18px;
    height: 18px;
  }

  .ib-site-mobile-header__panel-link{
    min-height: 54px;
    font-size: 15px;
  }
}

/* STICKY HEADER */
.smart-header{
  transition: transform .30s ease, box-shadow .22s ease;
  will-change: transform;
}

.smart-header.is-fixed{
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  z-index: 99999;
}

.smart-header.is-hidden{
  transform: translateY(-100%);
}

.smart-header-spacer{
  width: 100%;
  height: 0;
  pointer-events: none;
}

@media (min-width:783px){
  body.admin-bar .smart-header.is-fixed{
    top: 32px;
  }
}

@media (max-width:782px){
  body.admin-bar .smart-header.is-fixed{
    top: 46px;
  }
}

@media (prefers-reduced-motion: reduce){
  .smart-header{
    transition: none;
  }
}
