/*
Theme Name: Betheme Child
Theme URI: https://themes.muffingroup.com/betheme
Author: Muffin group
Author URI: https://muffingroup.com
Description: Child Theme for Betheme
Template: betheme
Version: 2.0.2
*/


/* ============================================================
   1. PORTFOLIO SLIDER
   Shortcode: [mi_portfolio]
   ============================================================ */

.mi-portfolio-wrapper {
    position: relative;
    overflow: hidden;
    padding: 0 36px;
    margin: 0 -36px;
    box-sizing: border-box;
}

.mi-portfolio {
    display: flex;
    flex-wrap: nowrap;
    gap: 25px;
    overflow: visible;
    transition: transform 0s;
}

/* Tarjeta */
.mi-portfolio .item {
    flex: 0 0 calc(25% - 19px);
    background: #fff;
    overflow: visible;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}
.mi-portfolio .item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}

/* Link */
.mi-portfolio .item-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    flex: 1;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
}

/* Contenido superior */
.mi-portfolio .item-content {
    padding: 18px 18px 14px;
    position: relative;
    z-index: 20;
    overflow: hidden;
    flex: 1 1 auto;
}
.mi-portfolio .item-content::before {
    content: "";
    position: absolute;
    inset: 0;
    background: #183672;
    opacity: 0;
    transition: opacity 0.35s ease;
    z-index: -1;
}
.mi-portfolio .item:hover .item-content::before { opacity: 1; }
.mi-portfolio .item:hover .item-content { background: #0073ff; }

.mi-portfolio .estudio-label {
    font-size: 16px;
    font-weight: 600;
    color: #6EB23C;
    font-family: 'TheBoldFont';
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
}
.mi-portfolio h3 {
    font-size: 20px;
    font-weight: 800;
    font-family: 'TheBoldFont';
    margin-right: 30px;
    color: #6EB23C;
    line-height: 1.25;
}

/* Imagen */
.mi-portfolio .item-media {
    position: relative !important;
    overflow: hidden;
    flex: 0 0 auto;
}
.mi-portfolio .thumb { line-height: 0; }
.mi-portfolio .thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.mi-portfolio .item:hover .thumb img { transform: scale(1.05); }

/* Overlay hover */
.mi-portfolio .item-hover-overlay {
    position: absolute !important;
    inset: 0 !important;
    z-index: 10;
    background: #183672;
    display: flex !important;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.35s ease;
    box-sizing: border-box;
}
.mi-portfolio .item:hover .item-hover-overlay { opacity: 1 !important; }
.mi-portfolio .item-hover-overlay span {
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 17px;
    font-weight: 700;
    text-align: left;
    line-height: 1.4;
}

/* Botones prev/next */
.portfolio-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    background: #fff;
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.portfolio-btn:hover {
    background: #183672;
    color: #fff;
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}
.portfolio-btn svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.portfolio-btn-prev { left: 0; }
.portfolio-btn-next { right: 0; }
.portfolio-btn:disabled {
    opacity: 0.35;
    cursor: default;
    pointer-events: none;
}

/* Portfolio responsive */
@media (max-width: 1024px) {
    .mi-portfolio .item { flex: 0 0 calc(50% - 13px); }
}
@media (max-width: 600px) {
    .mi-portfolio-wrapper {
        padding: 0 !important;
        margin: 0 !important;
        overflow: visible !important;
    }
    .portfolio-btn { display: none !important; }
    .mi-portfolio {
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        overflow-x: scroll !important;
        scroll-snap-type: x mandatory !important;
        -webkit-overflow-scrolling: touch !important;
        gap: 16px !important;
        padding: 0 9px 9px !important;
        scrollbar-width: none !important;
    }
    .mi-portfolio::-webkit-scrollbar { display: none !important; }
    .mi-portfolio .item {
        flex: 0 0 95% !important;
        min-width: 0 !important;
        scroll-snap-align: start !important;
        box-sizing: border-box !important;
    }
    .mi-portfolio .thumb img {
        height: 200px !important;
        object-fit: cover !important;
    }
}


/* ============================================================
   2. MENÚ BURGER MOBILE — BeTheme
   Aplica en móvil y tablet (hasta 1024px)
   Clase clave de BeTheme: mfn-li-hover (se agrega al abrir)
   IDs confirmados: ¿Qué hacemos? = menu-item-539
                    Educación continua = menu-item-551
   ============================================================ */

/* Panel de fondo */
.mfn-menu-mobile-overlay,
.mfn-menu-mobile-panel,
.mfn-menu-mobile-inner,
#mfn-mobile-menu,
#mfn-mobile-menu .inner {
    background-color: #0d2461 !important;
}

/* Botón burger */
.mfn-menu-toggle span,
.mfn-hamburger span,
button.mfn-menu-btn span {
    background-color: #ffffff !important;
}

/* Links de primer nivel */
li.mfn-menu-li > a.mfn-menu-link {
    color: rgba(255,255,255,0.85) !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
    border-bottom: 1px solid rgba(255,255,255,0.08) !important;
    padding: 16px 20px !important;
    background: transparent !important;
    transition: background 0.15s, color 0.15s !important;
}
li.mfn-menu-li > a.mfn-menu-link:hover {
    background-color: rgba(255,255,255,0.06) !important;
    color: #fff !important;
}
li.mfn-menu-li > a.mfn-menu-link .menu-label { color: inherit !important; }

/* Flecha */
li.mfn-menu-li .mfn-menu-subicon .fas {
    color: rgba(255,255,255,0.5) !important;
}

/* Submenú: oculto por defecto, BeTheme agrega mfn-li-hover al abrir */
ul.sub-menu.mfn-submenu {
    display: none !important;
    background-color: rgba(0,0,0,0.25) !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}
li.mfn-li-hover > ul.sub-menu.mfn-submenu {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
    padding: 12px !important;
}

/* Tarjetas del submenú */
ul.sub-menu.mfn-submenu > li.mfn-menu-li {
    background-color: #1a6abf !important;
    border-radius: 8px !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    width: auto !important;
    display: block !important;
    transition: background 0.18s !important;
}
ul.sub-menu.mfn-submenu > li.mfn-menu-li:hover {
    background-color: #1e7ad8 !important;
}

/* Link dentro de tarjeta */
ul.sub-menu.mfn-submenu > li.mfn-menu-li > a.mfn-menu-link {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 16px 8px 14px !important;
    min-height: 105px !important;
    border-bottom: none !important;
    background: transparent !important;
    width: 100% !important;
}
ul.sub-menu.mfn-submenu > li.mfn-menu-li > a.mfn-menu-link .mfn-menu-label-wrapper {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 10px !important;
    width: 100% !important;
}
ul.sub-menu.mfn-submenu > li.mfn-menu-li > a.mfn-menu-link .menu-label {
    color: #fff !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    letter-spacing: 0.07em !important;
    text-transform: uppercase !important;
    line-height: 1.35 !important;
    white-space: normal !important;
    text-align: center !important;
    display: block !important;
}

/* Ocultar flecha y helper dentro de tarjetas */
ul.sub-menu.mfn-submenu > li.mfn-menu-li .mfn-menu-subicon,
ul.sub-menu.mfn-submenu > li.mfn-menu-li .mfn-menu-item-helper {
    display: none !important;
}

/* Ícono base ::before */
ul.sub-menu.mfn-submenu > li.mfn-menu-li > a.mfn-menu-link .mfn-menu-label-wrapper::before {
    content: '' !important;
    display: block !important;
    width: 40px !important;
    height: 40px !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: contain !important;
    flex-shrink: 0 !important;
}

/* --- Íconos: ¿Qué hacemos? (menu-item-539) --- */

/* 1. Inteligencia de Mercado — bombilla */
li.menu-item-539 ul.mfn-submenu > li:nth-child(1) a .mfn-menu-label-wrapper::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='9' r='6'/%3E%3Cpath d='M9 17h6M10 20h4'/%3E%3Cline x1='12' y1='3' x2='12' y2='1'/%3E%3Cline x1='18.36' y1='5.64' x2='19.78' y2='4.22'/%3E%3Cline x1='21' y1='12' x2='23' y2='12'/%3E%3Cline x1='5.64' y1='5.64' x2='4.22' y2='4.22'/%3E%3Cline x1='3' y1='12' x2='1' y2='12'/%3E%3C/svg%3E") !important;
}

/* 2. Soluciones de Software — código */
li.menu-item-539 ul.mfn-submenu > li:nth-child(2) a .mfn-menu-label-wrapper::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='16 18 22 12 16 6'/%3E%3Cpolyline points='8 6 2 12 8 18'/%3E%3C/svg%3E") !important;
}

/* 3. Formación Digital — gráfica */
li.menu-item-539 ul.mfn-submenu > li:nth-child(3) a .mfn-menu-label-wrapper::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='22 12 18 12 15 21 9 3 6 12 2 12'/%3E%3C/svg%3E") !important;
}

/* 4. Sistemas Geográficos — capas */
li.menu-item-539 ul.mfn-submenu > li:nth-child(4) a .mfn-menu-label-wrapper::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='12 2 22 8.5 12 15 2 8.5'/%3E%3Cpolyline points='2 13.5 12 20 22 13.5'/%3E%3C/svg%3E") !important;
}

/* --- Íconos: Educación continua (menu-item-551) --- */

/* 1. Nuestra oferta — capas */
li.menu-item-551 ul.mfn-submenu > li:nth-child(1) a .mfn-menu-label-wrapper::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='12 2 22 8.5 12 15 2 8.5'/%3E%3Cpolyline points='2 13.5 12 20 22 13.5'/%3E%3C/svg%3E") !important;
}

/* 2. Aula Virtual — libro */
li.menu-item-551 ul.mfn-submenu > li:nth-child(2) a .mfn-menu-label-wrapper::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z'/%3E%3Cpath d='M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z'/%3E%3C/svg%3E") !important;
}

/* SWITCH IDIOMA */
.gt-simple-switch {
  display: inline-flex !important;
  align-items: center;
  gap: 4px;
  width: auto !important;
  max-width: none !important;
  overflow: visible !important;
  white-space: nowrap !important;
  background: #e9e9e9;
  border: 1px solid #d2d2d2;
  border-radius: 999px;
  padding: 2px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.2 !important;
}

.gt-simple-switch a {
  display: inline-flex !important;
  align-items: center;
  gap: 0 !important;
  width: auto !important;
  max-width: none !important;
  overflow: visible !important;
  white-space: nowrap !important;
  padding: 4px 4px;
  border-radius: 999px;
  text-decoration: none !important;
  color: #4a4a4a;
  opacity: .85;
  transition: .18s ease;
}

.gt-simple-switch img,
.gt-simple-switch .gt_flag,
.gt-simple-switch .flag,
.gt-simple-switch i,
.gt-simple-switch svg,
.gt-simple-switch a img,
.gt-simple-switch a svg {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  visibility: hidden !important;
}

.gt-simple-switch a span {
  display: inline-block !important;
  white-space: nowrap !important;
  line-height: 1.2 !important;
}

.gt-simple-switch a:hover {
  opacity: 1;
  background: rgba(25, 41, 81, 0.10);
}

.gt-simple-switch a.gt-current-lang,
.gt-simple-switch a[aria-current="page"] {
  background: #192951;
  color: #fff !important;
  opacity: 1;
}

.gt-simple-switch a[data-gt-lang="es"]::after { content: "ES"; }
.gt-simple-switch a[data-gt-lang="en"]::after { content: "EN"; }