.floating-btn-container {
    position: fixed;
    right: 0;
    top: 50%;
    -webkit-transform: translateY(-50%);
    -moz-transform: translateY(-50%);
    -o-transform: translateY(-50%);
    -ms-transform: translateY(-50%);
    transform: translateY(-50%);
    z-index: 1000;
    font-family: 'Montserrat', sans-serif
}

.floating-btn-container .floating-btn {
    background-color: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1001
}

/* :hover {
    background-color: #e67642
} */

.button-content {
    display: -webkit-box;
    display: -moz-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: box;
    display: flex;
    -webkit-box-orient: vertical;
    -moz-box-orient: vertical;
    -o-box-orient: vertical;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-align: center;
    -moz-box-align: center;
    -o-box-align: center;
    -ms-flex-align: center;
    -webkit-align-items: center;
    align-items: center;
    -webkit-box-pack: space-evenly;
    -moz-box-pack: space-evenly;
    -o-box-pack: space-evenly;
    -ms-flex-pack: space-evenly;
    -webkit-justify-content: space-evenly;
    justify-content: space-evenly
}

.button-content .button-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 0 !important
}

.button-content .button-text {
    writing-mode: vertical-rl;
    -webkit-transform: rotate(180deg);
    -moz-transform: rotate(180deg);
    -o-transform: rotate(180deg);
    -ms-transform: rotate(180deg);
    transform: rotate(180deg);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 1px;
    margin-top: 5px;
    background-color: #ff6d40;
    border-radius: 0 10px 10px 0;
    padding: 15px 10px;
    color: #fff;
    -webkit-box-shadow: -2px 2px 10px rgba(0, 0, 0, 0.2);
    box-shadow: -2px 2px 10px rgba(0, 0, 0, 0.2)
}

.button-content .button-text:hover {
    background-color: #e67642
}

.floating-panel {
    position: fixed;
    right: -400px;
    top: 50%;
    -webkit-transform: translateY(-50%);
    -moz-transform: translateY(-50%);
    -o-transform: translateY(-50%);
    -ms-transform: translateY(-50%);
    transform: translateY(-50%);
    width: 280px;
    background-color: #fff;
    border-radius: 10px 0 0 10px;
    -webkit-box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    -webkit-transition: right 0.4s ease;
    -moz-transition: right 0.4s ease;
    -o-transition: right 0.4s ease;
    -ms-transition: right 0.4s ease;
    transition: right 0.4s ease
}

.floating-panel .panel-header {
    padding: 10px 10px 0;
    text-align: right
}

.floating-panel .panel-header .close-panel {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666
}

.floating-panel .panel-body {
    padding: 0 20px 30px
}

.floating-panel .panel-body .panel-grid {
    display: grid;
    gap: 20px
}

.floating-panel .panel-body .panel-grid .panel-item {
    display: -webkit-box;
    display: -moz-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: box;
    display: flex;
    -webkit-box-orient: vertical;
    -moz-box-orient: vertical;
    -o-box-orient: vertical;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-align: center;
    -moz-box-align: center;
    -o-box-align: center;
    -ms-flex-align: center;
    -webkit-align-items: center;
    align-items: center;
    text-align: center;
    border-radius: 8px;
    -webkit-transition: -webkit-transform 0.3s ease;
    -moz-transition: -moz-transform 0.3s ease;
    -o-transition: -o-transform 0.3s ease;
    -ms-transition: -ms-transform 0.3s ease;
    transition: transform 0.3s ease
}

.floating-panel .panel-body .panel-grid .panel-item:hover {
    -webkit-transform: translateY(-5px);
    -moz-transform: translateY(-5px);
    -o-transform: translateY(-5px);
    -ms-transform: translateY(-5px);
    transform: translateY(-5px)
}

.floating-panel .panel-body .panel-grid .panel-item .item-circle {
    width: 120px;
    height: 120px;
    display: -webkit-box;
    display: -moz-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: box;
    display: flex;
    -webkit-box-align: center;
    -moz-box-align: center;
    -o-box-align: center;
    -ms-flex-align: center;
    -webkit-align-items: center;
    align-items: center;
    -webkit-box-pack: center;
    -moz-box-pack: center;
    -o-box-pack: center;
    -ms-flex-pack: center;
    -webkit-justify-content: center;
    justify-content: center
}

.floating-panel .panel-body .panel-grid .panel-item .item-circle img {
    width: 120px;
    height: 120px;
    object-fit: contain
}

.floating-panel .panel-body .panel-grid .panel-item .item-title {
    font-size: 14px;
    margin-bottom: 15px;
    color: #333;
    font-weight: 600
}

.floating-panel .panel-body .panel-grid .panel-item .item-button {
    display: inline-block;
    padding: 6px 25px;
    border-radius: 20px;
    text-decoration: none;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase
}

.floating-panel .panel-body .panel-grid .panel-item .secundaria-btn {
    background-color: #3498db
}

.floating-panel .panel-body .panel-grid .panel-item .bachillerato-btn {
    background-color: #e67e22
}

.floating-panel .panel-body .panel-grid .panel-item .universidad-btn {
    background-color: #9b59b6
}

.active {
    right: 0
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
    pointer-events: auto
}

.overlay .active {
    display: block
}

/*
  Sustituye el botón flotante anterior de Prepárate.
  Mantiene la misma posición lateral y vertical de .floating-btn-container,
  pero cambia el contenido a Mentes Curiosas con nuevo fondo y animación.
*/

.floating-btn-container.mentes-curiosas-container {
    position: fixed;
    right: 0;
    top: 50%;
    -webkit-transform: translateY(-50%);
    -moz-transform: translateY(-50%);
    -o-transform: translateY(-50%);
    -ms-transform: translateY(-50%);
    transform: translateY(-50%);
    z-index: 1000;
    font-family: 'Montserrat', sans-serif;
}

.floating-btn-container.mentes-curiosas-container .mentes-curiosas-floating {
    background-color: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1001;
    text-decoration: none !important;
    color: #fff !important;
    animation: mentesCuriosasFloat 2.4s ease-in-out infinite;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.floating-btn-container.mentes-curiosas-container .mentes-curiosas-floating:hover,
.floating-btn-container.mentes-curiosas-container .mentes-curiosas-floating:focus {
    color: #fff !important;
    text-decoration: none !important;
    filter: brightness(1.04);
    outline: none;
}

.floating-btn-container.mentes-curiosas-container .mentes-curiosas-floating:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.95);
    outline-offset: 4px;
    border-radius: 12px;
}

.floating-btn-container.mentes-curiosas-container .mentes-curiosas-content {
    display: -webkit-box;
    display: -moz-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -moz-box-orient: vertical;
    -o-box-orient: vertical;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-align: center;
    -moz-box-align: center;
    -o-box-align: center;
    -ms-flex-align: center;
    -webkit-align-items: center;
    align-items: center;
    -webkit-box-pack: space-evenly;
    -moz-box-pack: space-evenly;
    -o-box-pack: space-evenly;
    -ms-flex-pack: space-evenly;
    -webkit-justify-content: space-evenly;
    justify-content: space-evenly;
}

/* Icono a la misma altura/lógica visual del icono anterior */
.floating-btn-container.mentes-curiosas-container .mentes-curiosas-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6d40 0%, #f24998 55%, #844998 100%);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    box-shadow: -2px 2px 10px rgba(0, 0, 0, 0.20);
}

/* Mantiene aspecto vertical del botón Prepárate, con nuevo background */
.floating-btn-container.mentes-curiosas-container .mentes-curiosas-text {
    writing-mode: vertical-rl;
    -webkit-transform: rotate(180deg);
    -moz-transform: rotate(180deg);
    -o-transform: rotate(180deg);
    -ms-transform: rotate(180deg);
    transform: rotate(180deg);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-top: 5px;
    background: linear-gradient(180deg, #ff6d40 0%, #f24998 55%, #844998 100%);
    border-radius: 0 10px 10px 0;
    padding: 15px 10px;
    color: #fff;
    -webkit-box-shadow: -2px 2px 10px rgba(0, 0, 0, 0.20);
    box-shadow: -2px 2px 10px rgba(0, 0, 0, 0.20);
    transition: filter 0.3s ease, box-shadow 0.3s ease;
}

.floating-btn-container.mentes-curiosas-container .mentes-curiosas-floating:hover .mentes-curiosas-text,
.floating-btn-container.mentes-curiosas-container .mentes-curiosas-floating:focus .mentes-curiosas-text,
.floating-btn-container.mentes-curiosas-container .mentes-curiosas-floating:hover .mentes-curiosas-icon,
.floating-btn-container.mentes-curiosas-container .mentes-curiosas-floating:focus .mentes-curiosas-icon {
    filter: brightness(1.08);
    box-shadow: -4px 4px 14px rgba(0, 0, 0, 0.28);
}

@keyframes mentesCuriosasFloat {
    0%, 100% {
        -webkit-transform: translateX(0);
        -moz-transform: translateX(0);
        -o-transform: translateX(0);
        -ms-transform: translateX(0);
        transform: translateX(0);
    }
    50% {
        -webkit-transform: translateX(-6px);
        -moz-transform: translateX(-6px);
        -o-transform: translateX(-6px);
        -ms-transform: translateX(-6px);
        transform: translateX(-6px);
    }
}

@media screen and (max-width: 768px) {
    .floating-btn-container.mentes-curiosas-container {
        right: 0;
        top: 50%;
        -webkit-transform: translateY(-50%);
        -moz-transform: translateY(-50%);
        -o-transform: translateY(-50%);
        -ms-transform: translateY(-50%);
        transform: translateY(-50%);
    }

    .floating-btn-container.mentes-curiosas-container .mentes-curiosas-icon {
        width: 36px;
        height: 36px;
        font-size: 20px;
    }

    .floating-btn-container.mentes-curiosas-container .mentes-curiosas-text {
        font-size: 14px;
        padding: 13px 9px;
        letter-spacing: 0.5px;
        border-radius: 0 9px 9px 0;
    }
}

@media screen and (max-width: 420px) {
    .floating-btn-container.mentes-curiosas-container .mentes-curiosas-text {
        font-size: 13px;
        padding: 12px 8px;
    }

    .floating-btn-container.mentes-curiosas-container .mentes-curiosas-icon {
        width: 34px;
        height: 34px;
        font-size: 19px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .floating-btn-container.mentes-curiosas-container .mentes-curiosas-floating {
        animation: none;
    }
}


@media (max-height:620px) {
    .floating-panel {
        max-height: 100vh !important;
        overflow-y: auto !important
    }

    .panel-header {
        position: sticky !important;
        top: 0 !important;
        background-color: #fff !important;
        padding: 0 10px !important;
        z-index: 2 !important
    }

    .close-panel {
        font-size: 30px !important;
        padding: 0 10px !important
    }

    .floating-button-container {
        top: 50% !important
    }
}

@media (max-width:400px) {
    .floating-panel {
        max-height: 85vh !important
    }

    .panel-grid {
        display: -webkit-box !important;
        display: -moz-box !important;
        display: -webkit-flex !important;
        display: -ms-flexbox !important;
        display: box !important;
        display: flex !important;
        -webkit-box-lines: single;
        -moz-box-lines: single;
        -o-box-lines: single;
        -webkit-flex-wrap: nowrap !important;
        -ms-flex-wrap: nowrap !important;
        flex-wrap: nowrap !important;
        padding-bottom: 10px !important;
        overflow-x: auto !important;
        overflow-y: visible !important
    }

    .panel-item {
        min-width: 120px !important;
        margin-right: 0 !important;
        overflow-x: auto !important;
        overflow-y: visible !important
    }
}