/* =============================================
   CURSO DETALLE - Estilo alineado con la web nueva
   ============================================= */

:root {
    --brand:        #fb9423;
    --brand-soft:   rgba(251, 148, 35, .12);
    --brand-hover:  #f9a145;
    --text-dark:    #212529;
    --text-muted:   #6c757d;
    --surface:      #ffffff;
    --surface-2:    #f8f9fa;
    --border-soft:  rgba(0, 0, 0, .06);
    --card-radius:  16px;
    --card-shadow:  0 6px 24px rgba(0, 0, 0, .06);
    --transition:   all .25s ease;
}

/* ---------- Contenedor general ---------- */
.custom-section {
    padding: 10px;
    width: 100%;
    margin: 0 auto;
}

/* ---------- Tarjeta Hero ---------- */
.course-hero {
    border-radius: var(--card-radius);
    border: 1px solid var(--border-soft);
    box-shadow: var(--card-shadow);
    background:
        radial-gradient(1200px 200px at 50% -80px, var(--brand-soft), transparent 60%),
        var(--surface);
}

.course-hero__inner      { padding: 8px; }
@media (min-width: 992px) { .course-hero__inner { padding: 24px; } }

.course-hero__subtitle {
    font-size: 1.02rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: .25rem !important;
}

.course-hero__title {
    font-size: clamp(1.4rem, 1.2rem + 1.2vw, 2.2rem);
    line-height: 1.15;
    font-weight: 800;
    color: #111827;
}

.course-hero__divider {
    width: 100%; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0,0,0,.12), transparent);
    margin: 14px 0 0;
}

/* ---------- Precio ---------- */
#divPrecio {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 32px 2px;
    margin-top: 10px;
    border: 2px solid var(--brand);
    border-radius: 999px;
    box-shadow: 0 4px 12px rgba(251, 148, 35, .25);
    font-weight: 700;
    background: #fff;
    transition: var(--transition);
}
#divPrecio:hover { box-shadow: 0 6px 18px rgba(251, 148, 35, .35); }

@media (max-width: 576px) {
    #priceHostMobile #divPrecio span { font-size: 25px; }
}

/* ---------- Meta (horas, créditos, modalidad) ---------- */
.course-hero__meta .meta-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 8px 0;
    font-size: .98rem;
    color: #1f2937;
}
.course-hero__meta i { opacity: .75; }

/* ---------- Sidecard (caja lateral) ---------- */
.course-sidecard {
    border-radius: var(--card-radius);
    border: 1px solid var(--border-soft);
    box-shadow: var(--card-shadow);
    background: var(--surface);
    overflow: hidden;
    transition: var(--transition);
}

.course-sidecard__image {
    position: relative;
    width: 100%;
    background: linear-gradient(180deg, #fefaf5 0%, #ffffff 100%);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.course-sidecard__image img {
    width: 100%; height: 180px; object-fit: cover;
}
@media (max-width: 575.98px) { .course-sidecard__image img { height: 140px; } }
@media (min-width: 576px) and (max-width: 991.98px) { .course-sidecard__image img { height: 220px; } }

.course-sidecard__body { padding: 20px; }

.course-sidecard .form-select {
    background: var(--surface-2);
    border-radius: 10px;
    border: 1px solid var(--border-soft);
    padding: 12px 14px;
    transition: var(--transition);
}
.course-sidecard .form-select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 .15rem var(--brand-soft);
}

.course-sidecard .form-label {
    display: block;
    text-align: center;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-dark);
    font-size: .92rem;
}

/* ---------- Botón principal ---------- */
#botonCurso {
    display: block;
    width: 100%;
    font-size: 1rem !important;
    padding: 12px 15px !important;
    text-align: center;
    border-radius: 10px;
    margin-top: 15px !important;
    background: var(--brand);
    border-color: var(--brand);
    font-weight: 600;
    transition: var(--transition);
}
#botonCurso:hover {
    background: var(--brand-hover);
    border-color: var(--brand-hover);
    transform: translateY(-1px);
}

/* ---------- Packs ---------- */
.pack-simple {
    border-radius: var(--card-radius);
    border: 1px solid var(--border-soft);
    box-shadow: var(--card-shadow);
    background: var(--surface);
    width: min(980px, 100%);
    margin: 20px auto 0;
}
.pack-simple__inner   { padding: 16px 20px; }
.pack-simple__heading { text-align: center; font-weight: 800; font-size: 1.05rem; }
.pack-simple__sub     { text-align: center; margin: 4px 0 10px; color: var(--text-muted); font-size: .95rem; }
.pack-simple__divider { height: 1px; background: linear-gradient(90deg, transparent, rgba(0,0,0,.1), transparent); margin: 10px 0 8px; }

.pack-list-simple { list-style: none; margin: 0; padding: 0; }
.pack-simple__item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 4px;
    border-bottom: 1px dashed rgba(0,0,0,.08);
}
.pack-simple__item:last-child { border-bottom: 0; }
.pack-simple__left  { display: flex; align-items: center; gap: 10px; flex: 1 1 auto; min-width: 0; }
.pack-simple__icon  {
    width: 28px; height: 28px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    background: var(--brand-soft);
    border: 1px solid rgba(251,148,35,.28);
}
.pack-simple__title { font-weight: 700; color: #111827; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pack-simple__title:hover { color: var(--brand); text-decoration: underline; }
.pack-simple__meta  { color: var(--text-muted); font-size: .92rem; white-space: nowrap; }
.pack-simple__right { display: flex; align-items: center; gap: 8px; margin-left: auto; white-space: nowrap; }
.pack-simple__price { font-weight: 800; }
.pack-simple__old   { color: #9ca3af; }

@media (max-width: 767.98px) {
    .pack-simple__item { flex-wrap: wrap; gap: 6px 10px; }
    .pack-simple__left, .pack-simple__right { width: 100%; margin-left: 0; }
    .pack-simple__right { justify-content: flex-start; }
    .pack-simple__title, .pack-simple__meta { white-space: normal; }
}

/* ---------- Tabs tipo acordeón ---------- */
#tabsCard { border: 0 !important; box-shadow: none; }

.acc-btn {
    width: 100%;
    text-align: left;
    padding: 14px 16px;
    font-weight: 600;
    border: 0;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    transition: var(--transition);
    line-height: 1.3;
}

/* Icono + texto agrupados a la izquierda */
.acc-btn__label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;                 /* permite el truncado si el texto es largo */
    flex: 1 1 auto;
}

.acc-btn__label i {
    font-size: .95rem;
    opacity: .8;
    flex-shrink: 0;
}

.acc-btn__label span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Chevron a la derecha, siempre pegado al borde */
.acc-chevron {
    flex-shrink: 0;
    font-size: .8rem;
    opacity: .6;
    transition: transform .25s ease;
}

.acc-btn[aria-expanded="true"] .acc-chevron {
    transform: rotate(180deg);
    opacity: .9;
}

.acc-btn:hover        { background: rgba(0, 0, 0, .03); }
.acc-btn:focus        { box-shadow: none; }

/* ---------- Ajuste móvil ---------- */
@media (max-width: 991.98px) {
    .acc-btn {
        padding: 12px 14px;
        font-size: .9rem;
        min-height: 48px;
    }

    .acc-btn__label {
        gap: 8px;
    }

    /* En móvil es más limpio que el texto NO trunque tan agresivamente */
    .acc-btn__label span {
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }
}

@media (max-width: 575.98px) {
    .acc-btn {
        padding: 11px 12px;
        font-size: .85rem;
    }

    .acc-btn__label i { font-size: .85rem; }

    .acc-chevron { font-size: .7rem; }
}

/* =============================================
   TABS (nav-tabs) — curso detalle
   ============================================= */

#cursoTabs {
    gap: 0.5rem;
}

#cursoTabs .nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: left;
    font-size: .92rem;
    font-weight: 500;
    color: #212529;
    background: #f8f9fa;
    padding: 12px 18px;
    line-height: 1.3;
    transition: all .2s ease;
    border: 0 !important;
}

#cursoTabs .nav-link:hover {
    background: #e9ecef;
    transform: translateY(-1px);
    color: #212529;
}

#cursoTabs .nav-link.active {
    background: #fff;
    color: #fb9423 !important;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(251, 148, 35, .12);
}

#cursoTabs .nav-link i {
    flex-shrink: 0;
    font-size: .95rem;
    opacity: .85;
}

#cursoTabs .nav-link.active i {
    opacity: 1;
}

/* ---------- Móvil: apilamos y alineamos a la izquierda ---------- */
@media (max-width: 767.98px) {
    #cursoTabs {
        flex-direction: column;
        flex-wrap: nowrap;
        gap: 6px;
    }

    #cursoTabs .nav-item {
        width: 100%;
        flex: 0 0 auto;
    }

    #cursoTabs .nav-link {
        width: 100%;
        justify-content: flex-start;
        padding: 12px 16px;
        font-size: .88rem;
        border-radius: 12px !important;
    }

    /* Icono con ancho fijo → todos los textos arrancan alineados */
    #cursoTabs .nav-link i {
        width: 18px;
        text-align: center;
        margin-right: 0 !important;
    }
}

/* ---------- Tab content ---------- */
#cursoTabsContent .tab-pane > .p-3 {
    font-size: .95rem;
    line-height: 1.55;
}

/* ---------- Badges tarjeta curso ---------- */
.course-sidecard__badge,
.course-sidecard__badge2 {
    position: absolute;
    top: 8px; left: 12px;
    background: rgb(209, 74, 74) !important;
    color: white;
    padding: 4px 8px;
    font-weight: bold;
    border-radius: 4px;
    font-size: 12px;
    text-transform: uppercase;
    z-index: 2;
}
.course-sidecard__badge2 { background: var(--brand) !important; left: auto; right: 12px; }

/* ---------- Tarjetas curso relacionado ---------- */
.room-grid {
    height: 440px;
    border-radius: var(--card-radius) !important;
    border: 1px solid var(--border-soft) !important;
    transition: var(--transition);
    overflow: hidden;
}
.room-grid:hover {
    transform: scale(1.03);
    box-shadow: 0 10px 26px rgba(251, 148, 35, .18);
}
.room-grid img {
    border-top-left-radius:  var(--card-radius) !important;
    border-top-right-radius: var(--card-radius) !important;
}
@media (max-width: 576px) { .room-grid { height: 400px; } }

.room-grid .price-badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 30px;
    border: 2px solid var(--brand);
    background: #fff;
    border-radius: 25px;
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-dark);
    box-shadow: 0 4px 10px rgba(0,0,0,.06);
    letter-spacing: .2px;
}

.title-zone a {
    color: var(--text-dark);
    font-size: 1.05rem;
    font-weight: 600;
    text-decoration: none;
}
.title-zone a:hover { color: var(--brand); }

/* ---------- Migas de pan ---------- */
#migasPan {
    font-weight: normal;
    font-size: 1.05rem;
    font-style: italic;
}
#migasPan > a { color: var(--text-dark) !important; transition: var(--transition); }
#migasPan > a:hover { color: var(--brand) !important; }
@media (max-width: 990px) { #migasPan { font-size: .8rem; } }

/* ---------- Compartir ---------- */
#webShareBtn {
    background-color: #2a9a62 !important;
    border-color: #2a9a62 !important;
    color: #fff !important;
    font-size: .78rem;
    padding: .25rem .6rem;
    transition: var(--transition);
}
#webShareBtn:hover { background-color: #71bf98 !important; border-color: #54ab80 !important; }
@media (max-width: 767.98px) { #webShareBtn { display: none !important; } }

/* ---------- Vídeo ---------- */
.video-wrapper { display: flex; justify-content: center; margin: 30px 0; }
.video-wrapper iframe {
    width: 100%; max-width: 960px;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .15);
}

/* ---------- Responsive de columnas de tarjetas ---------- */
@media (max-width: 575px)                 { .custom-col { flex: 0 0 100%;     max-width: 100%; } }
@media (min-width: 575px) and (max-width: 992px) { .custom-col { flex: 0 0 50%;      max-width: 50%;  } }
@media (min-width: 992px) and (max-width: 1423px){ .custom-col { flex: 0 0 33.3333%; max-width: 33.3333%; } }
@media (min-width: 1424px)                { .custom-col { flex: 0 0 25%;      max-width: 25%;  } }

/* ---------- Ajuste móvil del precio ---------- */
@media (max-width: 767.98px) {
    #priceHostMobile { display: flex; justify-content: center; align-items: center; width: 100%; }
    #priceHostMobile #divPrecio { text-align: center; margin: 20px 0; }
}

/* =============================================
   PANEL LATERAL (sin card, con borde discreto)
   ============================================= */

.course-panel {
    padding: 0;
    background: transparent;
}

/* Borde lateral que separa del contenido principal (solo desktop) */
@media (min-width: 992px) {
    .course-panel {
        border-left: 1px solid rgba(0, 0, 0, .07);
        padding-left: 24px;
    }
}

/* ---------- Bloque de precio ---------- */
.course-panel__price {
    text-align: center;
    padding: 0 0 4px;
}

/* Separador degradado entre precio y formulario */
.course-panel__divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, .1), transparent);
    margin: 18px 0 22px;
}

/* ---------- Cuerpo del panel (formulario) ---------- */
.course-panel__body {
    /* Sin estilos extra, solo agrupa semánticamente */
}

/* =============================================
   PRECIO DESTACADO
   ============================================= */

.price-block__label {
    display: block;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #6c757d;
    margin-bottom: 8px;
}

.price-block__main {
    display: flex;
    align-items: baseline;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    line-height: 1;
    margin-bottom: 4px;
}

.price-block__amount {
    font-size: 2.6rem;
    font-weight: 700;
    color: #212529;
    letter-spacing: -.02em;
    line-height: 1;
}

.price-block__old {
    font-size: 1.05rem;
    font-weight: 500;
    color: #adb5bd;
    text-decoration: line-through;
    text-decoration-thickness: 2px;
}

.price-block__badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: #e8f6ee;
    color: #198754;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.price-block__extra {
    margin: 10px 0 0;
    font-size: .88rem;
    color: #495057;
}
.price-block__extra del {
    color: #adb5bd;
    margin-left: 4px;
}

.price-block__note {
    margin: 10px 0 0;
    font-size: .78rem;
    color: #6c757d;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.price-block__note i {
    color: #28a745;
    font-size: .85rem;
}

/* Móvil */
@media (max-width: 767.98px) {
    .course-panel__price { padding: 16px 0 4px; }
    .price-block__amount { font-size: 2.1rem; }
}

/* =============================================
   BREADCRUMB BAR (franja diferenciada)
   ============================================= */

.breadcrumb-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;

    background: #f8f9fa;
    border: 1px solid rgba(0, 0, 0, .06);
    border-radius: 14px;
    padding: 10px 16px;

    margin-bottom: 24px;         /* 👈 separación clara con el título */
}

/* ---------- Breadcrumb interno ---------- */
.breadcrumb-clean {
    background: transparent;
    padding: 0;
    margin: 0;
    font-size: .84rem;
    color: #6c757d;
    flex-wrap: wrap;
}

.breadcrumb-clean .breadcrumb-item {
    display: inline-flex;
    align-items: center;
    color: #6c757d;
}

/* Separador sutil */
.breadcrumb-clean .breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: #ced4da;
    font-size: 1.05rem;
    line-height: 1;
    padding: 0 .5rem;
    font-weight: 400;
}

.breadcrumb-clean a {
    color: #6c757d;
    text-decoration: none;
    transition: color .2s ease;
}
.breadcrumb-clean a:hover {
    color: #fb9423;
}

.breadcrumb-clean .breadcrumb-item.active {
    color: #212529;
    font-weight: 600;
    max-width: 340px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Móvil */
@media (max-width: 767.98px) {
    .breadcrumb-bar  { padding: 8px 12px; border-radius: 12px; }
    .breadcrumb-clean { font-size: .78rem; }
    .breadcrumb-clean .breadcrumb-item.active { max-width: 180px; }
}

/* =============================================
   BOTÓN COMPARTIR
   ============================================= */

.btn-share {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .08);
    color: #495057;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: .8rem;
    font-weight: 500;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    transition: all .2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-share:hover {
    background: #fb9423;
    border-color: #fb9423;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(251, 148, 35, .25);
}
.btn-share i { font-size: .82rem; }

/* =============================================
   FONDO DIFUMINADO DEL DETALLE DE CURSO
   ============================================= */

.fondo-tope {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -100;
    overflow: hidden;
    pointer-events: none;
    /* Opcional: suaviza transiciones al cambiar entre cursos */
    transition: opacity .4s ease;
}

/* Capa 1: imagen de fondo con blur */
.fondo-tope::before {
    content: '';
    position: absolute;
    inset: -20px;                       /* 👈 expansión para evitar bordes visibles del blur */
    background-image: var(--bg-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(10px);                 /* 👈 el difuminado */
    transform: scale(1.05);             /* 👈 evita halos en los bordes */
    will-change: filter;                /* 👈 acelera el render en GPUs */
}

/* Capa 2: oscurecido + tinte de marca sutil */
.fondo-tope::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            180deg,
            rgba(245, 244, 244, 0.719) 0%,
            rgba(207, 206, 206, 0.616) 100%
        );
}

/* =============================================
   FOOTER DE CARD RELACIONADA (precio + botón)
   ============================================= */

.related-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 0;
    padding-top: 12px;
    border-top: 1px dashed rgba(0, 0, 0, .06);
    flex-wrap: wrap;
}

/* =============================================
   PRECIO EN CURSOS RELACIONADOS (price pill)
   ============================================= */

.related-price {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #fff;
    border: 1.5px solid rgba(251, 148, 35, .35);
    font-weight: 700;
    line-height: 1;
    transition: all .2s ease;
}

.related-price--simple {
    border-color: rgba(0, 0, 0, .08);
}

.related-price__final {
    color: #212529;
    font-size: 1.05rem;
    letter-spacing: -.01em;
    line-height: 1;
}

.related-price__old {
    color: #adb5bd;
    font-size: .8rem;
    font-weight: 500;
    text-decoration: line-through;
    text-decoration-thickness: 1.5px;
    line-height: 1;
}

/* Hover sobre la card: ilumina sutilmente */
.card:hover .related-price {
    border-color: rgba(251, 148, 35, .65);
    background: #fffaf3;
}

/* Botón alineado */
.related-footer__btn {
    white-space: nowrap;
    flex-shrink: 0;
    border-radius: 8px;
    font-weight: 500;
    padding: 6px 12px;
    transition: all .2s ease;
}

.related-footer__btn:hover {
    background: #28a745;
    border-color: #28a745;
    color: #fff;
    transform: translateY(-1px);
}

/* Móvil */
@media (max-width: 575.98px) {
    .related-price__final { font-size: .95rem; }
    .related-price__old   { font-size: .75rem; }
    .related-footer__btn  { padding: 6px 10px; font-size: .78rem; }
}

/* =============================================
   ENTIDAD ACREDITADORA EN CURSOS RELACIONADOS
   ============================================= */

.related-accreditation {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;

    min-height: 68px;                    /* 👈 altura estable entre cards */
    padding: 10px 12px;
    margin: auto 0 12px;

    background: #f8f9fa;
    border: 1px solid rgba(0, 0, 0, .04);
    border-radius: 10px;

    text-align: center;
    transition: background .2s ease, border-color .2s ease;
}

.card:hover .related-accreditation {
    background: #fffaf3;
    border-color: rgba(251, 148, 35, .18);
}

.related-accreditation__logo {
    max-height: 34px;
    max-width: 90%;
    width: auto;
    object-fit: contain;
    display: block;

    /* Filtro sutil para que el logo no compita con el título */
    filter: saturate(.9);
    opacity: .9;
    transition: opacity .2s ease, filter .2s ease;
}

.card:hover .related-accreditation__logo {
    opacity: 1;
    filter: saturate(1);
}

.related-accreditation__name {
    font-size: .72rem;
    line-height: 1.25;
    font-weight: 500;
    color: #6c757d;
    letter-spacing: .01em;

    /* Truncado limpio a 2 líneas */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Variante cuando no hay logo, solo texto */
.related-accreditation--text-only .related-accreditation__name {
    font-size: .76rem;
    color: #495057;
    -webkit-line-clamp: 3;
}

/* =============================================
   CARD DE CURSO RELACIONADO (hover global)
   ============================================= */

.related-card {
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.related-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .08) !important;
}

/* Aseguramos que el stretched-link quede por encima del contenido,
   pero dejando que el footer se pueda "iluminar" en hover */
.related-card .stretched-link {
    z-index: 2;
    border-radius: 16px;
}

/* El contenido visual no intercepta el click */
.related-card .card-body,
.related-card .card-img-top {
    position: relative;
    z-index: 1;
    pointer-events: none;
}

/* Hover: botón se pone verde sólido */
.related-card:hover .related-footer__btn {
    background: #28a745;
    border-color: #28a745;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, .28);
}

/* Hover: precio se ilumina también */
.related-card:hover .related-price {
    border-color: rgba(251, 148, 35, .65);
    background: #fffaf3;
}

/* =============================================
   BARRA MÓVIL INFERIOR
   ============================================= */

.mobile-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1030;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;

    padding: 10px 16px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));

    background: rgba(255, 255, 255, .98);
    backdrop-filter: blur(8px);
    border-top: 1px solid rgba(0, 0, 0, .08);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, .06);
}

.mobile-bar__price {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    min-width: 0;
}

.mobile-bar__label {
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #6c757d;
}

.mobile-bar__amount {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
}

.mobile-bar__amount strong {
    font-size: 1.4rem;
    font-weight: 700;
    color: #212529;
    letter-spacing: -.01em;
}

.mobile-bar__amount del {
    font-size: .85rem;
    color: #adb5bd;
    font-weight: 500;
}

.mobile-bar__free {
    background: #e8f6ee;
    color: #198754;
    font-size: .68rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.mobile-bar__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    background: #fb9423;
    color: #fff;
    border: none;
    border-radius: 999px;
    font-weight: 600;
    font-size: .95rem;
    line-height: 1;
    flex-shrink: 0;
    transition: transform .15s ease, box-shadow .2s ease;
    box-shadow: 0 4px 14px rgba(251, 148, 35, .3);
}

.mobile-bar__btn:active {
    transform: scale(.97);
}

.mobile-bar__btn i { font-size: 1rem; }

/* Deja sitio para que la barra no tape el contenido */
@media (max-width: 991.98px) {
    body { padding-bottom: 82px; }
}

/* =============================================
   MODALES COMPACTOS (popup confirmación + share)
   ============================================= */

/* Aseguramos que queden SIEMPRE por encima de cualquier navbar */
#popupModal,
#shareModal,
#mobileOptionsModal {
    z-index: 1060;
}
.modal-backdrop {
    z-index: 1055;
}

/* ---------- Popup de confirmación ---------- */
#popupModal .modal-dialog {
    max-width: 480px;
}

#popupModal .modal-content {
    border: 0;
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .18);
    overflow: hidden;
}

#popupModal .modal-header {
    padding: 20px 24px 12px;
    border-bottom: 0;
}

#popupModal .modal-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #212529;
    display: flex;
    align-items: center;
}

#popupModal .modal-body {
    padding: 4px 24px 20px;
    font-size: .95rem;
    color: #495057;
    line-height: 1.5;
}

#popupModal .modal-footer {
    padding: 4px 24px 22px;
    border-top: 0;
    gap: 10px;
    flex-wrap: wrap;
}

#popupModal .modal-footer .btn {
    border-radius: 10px;
    padding: 10px 18px;
    font-size: .92rem;
    font-weight: 500;
}

/* ---------- Share modal ---------- */
#shareModal .modal-dialog {
    max-width: 380px;
}
#shareModal .modal-content {
    border: 0;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .15);
}
#shareModal .modal-header {
    padding: 16px 20px 8px;
    border-bottom: 0;
}
#shareModal .modal-body {
    padding: 4px 20px 16px;
}
#shareModal .modal-footer {
    padding: 0 20px 18px;
    border-top: 0;
}

/* Móvil: ajustes finos para los popups */
@media (max-width: 575.98px) {
    #popupModal .modal-dialog {
        max-width: calc(100% - 24px);
        margin: 1rem auto;
    }
    #popupModal .modal-header,
    #popupModal .modal-body,
    #popupModal .modal-footer {
        padding-left: 18px;
        padding-right: 18px;
    }
    #popupModal .modal-footer .btn,
    #shareModal .modal-footer .btn {
        flex: 1 1 auto;
    }
}

/* =============================================
   BOTTOM SHEET MÓVIL — 70% de alto máximo
   ============================================= */

@media (max-width: 991.98px) {
    .mobile-options-modal .modal-dialog {
        position: fixed;
        margin: 0;
        bottom: 0;
        left: 0;
        right: 0;
        max-width: 100%;
        max-height: 70vh;                 /* 👈 altura máxima 70% */
        transform: translateY(100%) !important;
        transition: transform .35s cubic-bezier(.22, .61, .36, 1);
        will-change: transform;
    }

    .mobile-options-modal.show .modal-dialog {
        transform: translateY(0) !important;
    }
}

.mobile-options-modal .modal-content {
    max-height: 70vh;                     /* 👈 coherencia con el dialog */
    overflow-y: auto;
    border-radius: 20px 20px 0 0;
    border: 0;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, .15);
}

.mobile-options-modal .modal-header {
    padding: 14px 18px 10px;
    border-bottom: 1px solid rgba(0, 0, 0, .05);
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 2;
}

.mobile-options-modal .modal-title {
    font-size: .98rem;
}

.mobile-options-modal .modal-body {
    padding: 14px 18px;
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
}

/* =============================================
   CAMPOS COMPACTOS DENTRO DEL BOTTOM SHEET
   ============================================= */

/* Ahorramos altura en labels y selects */
.mobile-options-modal #cursoFormContainer .mb-3 {
    margin-bottom: 12px !important;
}

.mobile-options-modal #cursoFormContainer .form-label {
    text-align: left;
    font-size: .78rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 4px;
}

.mobile-options-modal #cursoFormContainer .form-select,
.mobile-options-modal #cursoFormContainer .form-control {
    padding: 8px 12px;
    font-size: .85rem;
    border-radius: 8px;
    min-height: 38px;
    background: #f8f9fa;
    border: 1px solid rgba(0, 0, 0, .06);
    transition: all .2s ease;
}

.mobile-options-modal #cursoFormContainer .form-select:focus,
.mobile-options-modal #cursoFormContainer .form-control:focus {
    border-color: #fb9423;
    box-shadow: 0 0 0 .15rem rgba(251, 148, 35, .12);
    background: #fff;
}

/* Input group del código promocional */
.mobile-options-modal #cursoFormContainer .input-group .btn {
    padding: 6px 12px;
    font-size: .8rem;
    border-radius: 0 8px 8px 0;
}

/* Bloque de info rápida más compacto */
.mobile-options-modal #cursoFormContainer .bg-light {
    padding: 10px 12px !important;
    border-radius: 10px !important;
    font-size: .8rem;
    margin-bottom: 14px !important;
}

.mobile-options-modal #cursoFormContainer .bg-light p {
    margin-bottom: 2px !important;
}

/* CTA del modal */
.mobile-options-modal #cursoFormContainer #botonCurso {
    padding: 12px 18px !important;
    font-size: .95rem !important;
    border-radius: 10px;
    background: #fb9423;
    border-color: #fb9423;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(251, 148, 35, .22);
    margin-top: 0 !important;
}

/* Mensaje de WhatsApp más discreto */
.mobile-options-modal #cursoFormContainer .text-muted.small {
    font-size: .78rem !important;
    margin-top: 10px !important;
}

.mobile-options-modal .modal-handle {
    width: 40px;
    height: 4px;
    background: #d1d5db;
    border-radius: 999px;
    margin: 10px auto 4px;
}