/* ==========================================================================
   Header propio de Cemeba — código puro (sin dependencias de Elementor)
   Colores del sitio: teal #1cba9f → azul #558dca
   ========================================================================== */

:root {
    --cmx-teal: #1cba9f;
    --cmx-blue: #558dca;
    --cmx-text: #223a66;
    --cmx-dark: #222222;
    --cmx-white: #ffffff;
    --cmx-gradient: linear-gradient(90deg, var(--cmx-teal) 40%, var(--cmx-blue) 100%);
    --cmx-navbar-h: 104px;
}

/* ---------- Contenedor ---------- */
.cmx-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ---------- Top bar ---------- */
.cmx-topbar {
    background-image: var(--cmx-gradient);
    color: var(--cmx-white);
    font-size: 13px;
    line-height: 1.4;
}

.cmx-topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 36px;
}

.cmx-topbar__info {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 24px;
    list-style: none;
    margin: 0;
    padding: 5px 0;
}

.cmx-topbar__item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
}

.cmx-topbar__item a {
    color: inherit;
    text-decoration: none;
}

.cmx-topbar__item a:hover {
    text-decoration: underline;
}

.cmx-icon {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.cmx-topbar__wa {
    display: inline-flex;
    align-items: center;
    color: var(--cmx-white);
    opacity: 0.9;
    transition: opacity 0.2s ease;
}

.cmx-topbar__wa:hover {
    opacity: 1;
}

.cmx-topbar__wa .cmx-icon {
    width: 18px;
    height: 18px;
}

/* ---------- Navbar ---------- */
.cmx-navbar {
    position: sticky;
    top: 0;
    z-index: 999;
    background: var(--cmx-white);
    transition: box-shadow 0.25s ease;
}

.cmx-navbar.is-scrolled {
    box-shadow: 0 4px 18px rgba(34, 58, 102, 0.12);
}

.cmx-navbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: var(--cmx-navbar-h);
}

/* ---------- Logo ---------- */
.cmx-brand {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.cmx-brand img {
    height: 82px;
    width: auto;
    display: block;
}

/* ---------- Menú ---------- */
.cmx-nav {
    flex: 1 1 auto;
}

.cmx-nav__list {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 30px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.cmx-nav__item {
    position: relative;
}

.cmx-nav__list > li > a {
    display: inline-block;
    padding: 8px 0;
    color: var(--cmx-text);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s ease;
}

.cmx-nav__list > li > a:hover,
.cmx-nav__list > li.current-menu-item > a {
    color: var(--cmx-teal);
}

/* Subrayado animado al hover (solo desktop; en móvil los links son bloques) */
@media (min-width: 992px) {
    .cmx-nav__list > li {
        position: relative;
    }

    .cmx-nav__list > li > a {
        position: relative;
    }

    .cmx-nav__list > li > a::after {
        content: "";
        position: absolute;
        left: 0;
        bottom: 0;
        width: 100%;
        height: 2.5px;
        border-radius: 2px;
        background-image: var(--cmx-gradient);
        transform: scaleX(0);
        transform-origin: left center;
        transition: transform 0.25s ease;
    }

    .cmx-nav__list > li > a:hover::after,
    .cmx-nav__list > li.current-menu-item > a::after {
        transform: scaleX(1);
    }
}

/* Submenús (si se agregan a futuro) */
.cmx-nav__list li.menu-item-has-children:hover > .sub-menu {
    display: block;
}

.cmx-nav__list .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: var(--cmx-white);
    box-shadow: 0 8px 24px rgba(34, 58, 102, 0.15);
    border-radius: 6px;
    list-style: none;
    margin: 0;
    padding: 8px 0;
    z-index: 10;
}

.cmx-nav__list .sub-menu > li > a {
    display: block;
    padding: 8px 18px;
}

/* ---------- CTA ---------- */
.cmx-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 11px 26px;
    background-image: var(--cmx-gradient);
    color: var(--cmx-white);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 50px;
    box-shadow: 0 4px 14px rgba(28, 186, 159, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
}

.cmx-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(28, 186, 159, 0.45);
    color: var(--cmx-white);
}

.cmx-cta--mobile {
    display: none;
    margin: 10px 20px 16px;
    width: calc(100% - 40px);
}

/* ---------- Botón hamburguesa ---------- */
.cmx-burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 8px;
    background: transparent;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
}

.cmx-burger__bar {
    display: block;
    width: 100%;
    height: 2.5px;
    border-radius: 2px;
    background: var(--cmx-text);
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.cmx-burger.is-open .cmx-burger__bar:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
}

.cmx-burger.is-open .cmx-burger__bar:nth-child(2) {
    opacity: 0;
}

.cmx-burger.is-open .cmx-burger__bar:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
}

/* ---------- Responsive ---------- */
@media (max-width: 1199px) {
    .cmx-topbar__item--address {
        display: none;
    }
}

@media (max-width: 991px) {
    .cmx-topbar {
        display: none; /* igual que el header anterior: top bar oculta en móvil */
    }

    .cmx-navbar__inner {
        min-height: 88px;
    }

    .cmx-brand img {
        height: 62px;
    }

    .cmx-burger {
        display: flex;
    }

    .cmx-cta--desktop {
        display: none;
    }

    .cmx-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--cmx-white);
        border-top: 1px solid rgba(34, 58, 102, 0.08);
        box-shadow: 0 12px 24px rgba(34, 58, 102, 0.15);
        max-height: 0;
        overflow: hidden;
        visibility: hidden;
        transition: max-height 0.3s ease, visibility 0.3s ease;
    }

    .cmx-nav.is-open {
        max-height: 480px;
        visibility: visible;
        overflow-y: auto;
    }

    .cmx-nav__list {
        display: block;
        padding: 8px 0 0;
    }

    .cmx-nav__list > li > a {
        display: block;
        padding: 13px 20px;
        font-size: 16px;
        border-bottom: 1px solid rgba(34, 58, 102, 0.06);
    }

    .cmx-cta--mobile {
        display: inline-flex;
    }
}

@media (max-width: 479px) {
    .cmx-brand img {
        height: 54px;
    }
}

/* ==========================================================================
   Cartel flotante + modal "Atendemos IOMA"
   ========================================================================== */

.cmx-ioma__badge {
    position: fixed;
    right: 18px;
    top: 50%;               /* media altura */
    bottom: auto;
    transform: translateY(-50%);
    z-index: 9990;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 22px;
    background-image: var(--cmx-gradient);
    color: var(--cmx-white);
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    border: 0;
    border-radius: 50px;
    box-shadow: 0 8px 24px rgba(28, 186, 159, 0.45);
    cursor: pointer;
    transition: transform 0.2s ease;
    animation: cmx-ioma-pulse 2.8s ease-in-out infinite;
}

.cmx-ioma__badge:hover {
    transform: translateY(calc(-50% - 3px));
}

.cmx-ioma__badge strong {
    font-weight: 800;
    letter-spacing: 0.5px;
}

.cmx-ioma__badge-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

@keyframes cmx-ioma-pulse {
    0%,
    100% {
        box-shadow: 0 8px 24px rgba(28, 186, 159, 0.45), 0 0 0 0 rgba(28, 186, 159, 0.45);
    }
    50% {
        box-shadow: 0 8px 24px rgba(28, 186, 159, 0.45), 0 0 0 14px rgba(28, 186, 159, 0);
    }
}

/* ---------- Modal ---------- */
.cmx-ioma-modal {
    position: fixed;
    inset: 0;
    z-index: 9991;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cmx-ioma-modal[hidden] {
    display: none;
}

.cmx-ioma-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(7, 25, 47, 0.65);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.cmx-ioma-modal.is-open .cmx-ioma-modal__backdrop {
    opacity: 1;
}

.cmx-ioma-modal__card {
    position: relative;
    width: 100%;
    max-width: 640px;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--cmx-white);
    border-radius: 20px;
    box-shadow: 0 30px 60px rgba(7, 25, 47, 0.35);
    transform: translateY(24px) scale(0.97);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.cmx-ioma-modal.is-open .cmx-ioma-modal__card {
    transform: none;
    opacity: 1;
}

.cmx-ioma-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: rgba(255, 255, 255, 0.2);
    color: var(--cmx-white);
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s ease;
}

.cmx-ioma-modal__close:hover {
    background: rgba(255, 255, 255, 0.35);
}

.cmx-ioma-modal__close svg {
    width: 16px;
    height: 16px;
}

.cmx-ioma-modal__header {
    padding: 30px 28px 22px;
    background-image: var(--cmx-gradient);
    color: var(--cmx-white);
    text-align: center;
}

.cmx-ioma__header-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 8px;
}

.cmx-ioma-modal__header h2 {
    margin: 0 0 6px;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 0.3px;
}

.cmx-ioma-modal__header p {
    margin: 0;
    font-size: 14px;
    opacity: 0.95;
}

.cmx-ioma-modal__body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding: 26px 28px;
}

.cmx-ioma-col h3 {
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(28, 186, 159, 0.25);
    color: var(--cmx-text);
    font-size: 17px;
    font-weight: 700;
}

.cmx-ioma-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cmx-ioma-list li {
    position: relative;
    padding: 7px 0 7px 30px;
    color: var(--cmx-dark);
    font-size: 15px;
}

.cmx-ioma-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: rgba(28, 186, 159, 0.15);
    color: var(--cmx-teal);
    font-size: 12px;
    font-weight: 800;
    border-radius: 50%;
}

.cmx-ioma-modal__footer {
    padding: 0 28px 28px;
    text-align: center;
}

/* ---------- Responsive IOMA ---------- */
@media (max-width: 639px) {
    .cmx-ioma__badge {
        right: 12px;
        left: auto;
        top: 50%;
        bottom: auto;
        padding: 11px 18px;
        font-size: 14px;
    }

    .cmx-ioma-modal {
        align-items: flex-end;
        padding: 0;
    }

    .cmx-ioma-modal__card {
        max-width: 100%;
        max-height: 86vh;
        border-radius: 20px 20px 0 0;
    }

    .cmx-ioma-modal__body {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 22px 20px;
    }

    .cmx-ioma-modal__header {
        padding: 26px 20px 18px;
    }

    .cmx-ioma-modal__header h2 {
        font-size: 22px;
    }

    .cmx-ioma-modal__footer {
        padding: 0 20px 24px;
    }
}

/* ==========================================================================
   Botón flotante de WhatsApp (propio)
   ========================================================================== */
.cmx-wa-float {
    position: fixed;
    right: 20px;
    bottom: 22px;
    z-index: 9800;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    font-family: inherit;
}

.cmx-wa-float__label {
    padding: 10px 16px;
    background: #ffffff;
    color: var(--cmx-dark, #223142);
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    border-radius: 50px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.18);
    opacity: 0;
    transform: translateX(8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
}

.cmx-wa-float:hover .cmx-wa-float__label {
    opacity: 1;
    transform: translateX(0);
}

.cmx-wa-float__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    background: linear-gradient(135deg, #2fd66f 0%, #1fab54 100%);
    color: #ffffff;
    border-radius: 50%;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    animation: cmx-wa-pulse 3s ease-in-out infinite;
}

.cmx-wa-float__btn svg {
    width: 32px;
    height: 32px;
}

.cmx-wa-float:hover .cmx-wa-float__btn {
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 10px 26px rgba(37, 211, 102, 0.55);
    animation-play-state: paused;
}

@keyframes cmx-wa-pulse {
    0%, 100% { box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45), 0 0 0 0 rgba(37, 211, 102, 0.35); }
    50%      { box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45), 0 0 0 14px rgba(37, 211, 102, 0); }
}

/* El widget del plugin uwac quedó roto (su CSS dinámico no aplica en los
   navegadores). Lo ocultamos mientras usemos nuestro botón propio.
   Para volver al plugin: eliminar estas dos líneas. */
.cs-uwac__popup-wrapper,
.cs-uwac__popup-overlay {
    display: none !important;
}

/* ---------- Responsive WhatsApp ---------- */
@media (max-width: 639px) {
    .cmx-wa-float {
        right: 14px;
        bottom: 16px;
    }

    .cmx-wa-float__label {
        display: none;
    }

    .cmx-wa-float__btn {
        width: 54px;
        height: 54px;
    }

    .cmx-wa-float__btn svg {
        width: 30px;
        height: 30px;
    }
}


