/* =========================
EDOOLY MATH PRIMARY STYLES
========================= */
/* --- RESET --- */
.edooly-math-primary * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* --- BASE LAYOUT --- */
.edooly-math-primary-dashboard {
    font-family: 'Nunito', sans-serif;
    background-color: white;
    padding: 40px 20px;
    display: flex;
    justify-content: center;
    min-height: calc(100vh - 80px);
}

.edooly-math-primary-main-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    width: 100%;
    max-width: 1200px;
}

.edooly-math-primary-container {
    display: flex;
    gap: 40px;
    width: 100%;
    align-items: center;
}

/* --- LAPTOP (≤1024) --- */
@media (max-width: 1024px) {
    .edooly-math-primary-main-wrapper {
        width: 95%;
        max-width: none;
    }
    .edooly-math-primary-dashboard {
        padding: 24px 0;
    }
    .edooly-math-primary-container {
        flex-direction: column;
        gap: 20px;
        width: 95% !important;
        margin: 0 auto;
    }
    .edooly-math-primary-shortcode-container {
        order: 1 !important;
        width: 100% !important;
        margin-bottom: 18px;
    }
    .edooly-math-primary-left-column {
        order: 2 !important;
        width: 100% !important;
        gap: 20px;
    }
    .edooly-math-primary-right-column {
        width: 100% !important;
        order: 1 !important;
        margin-bottom: 0;
    }
}

/* --- TABLET (≤780px) --- */
@media (max-width: 780px) {
    .edooly-math-primary-main-wrapper {
        width: 99%;
        max-width: none;
    }
    .edooly-math-primary-container {
        flex-direction: column;
        gap: 16px;
        width: 99% !important;
    }
    .edooly-math-primary-shortcode-container,
    .edooly-math-primary-left-column,
    .edooly-math-primary-right-column {
        width: 100% !important;
        max-width: none !important;
    }
    .edooly-math-primary-shortcode-container {
        margin-bottom: 14px;
    }
    .edooly-math-primary-left-column {
        gap: 16px;
        margin-bottom: 12px;
    }
    .edooly-math-primary-dashboard {
        padding: 14px 0;
    }
}

/* --- MOBILE (≤480px) --- */
@media (max-width: 480px) {
    .edooly-math-primary-dashboard {
        padding: 7px 0;
    }

    .edooly-math-primary-shortcode-container {
        margin-bottom: 10px;
        min-height: 160px;
    }
    .edooly-math-primary-left-column {
        gap: 8px;
        margin-bottom: 6px;
    }

    .edooly-math-primary-bg-circle-btn {
        top: auto !important;       /* quita posicionamiento superior */
        bottom: 18px !important;    /* lo pone abajo */
        right: 18px !important;     /* derecha */
        left: auto !important;
        width: 44px;
        height: 44px;
    }
}

/* --- LEFT & RIGHT COLUMNS --- */
.edooly-math-primary-left-column {
    width: 40%;
    display: flex;
    flex-direction: column;
    gap: 30px;
    justify-content: center;
}
@media (max-width: 1024px) { .edooly-math-primary-left-column { gap: 20px; } }
@media (max-width: 780px)  { .edooly-math-primary-left-column { gap: 14px; } }
@media (max-width: 480px)  { .edooly-math-primary-left-column { gap: 8px; } }

.edooly-math-primary-right-column {
    width: 60%;
    border-radius: 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* --- CARDS --- */
.edooly-math-primary-cards {
    display: flex;
    gap: 20px;
}
.edooly-math-primary-card {
    flex: 1;
    background: white;
    border-radius: 15px;
    padding: 15px 15px 56px;
    text-align: center;
    border: 1px solid #e0e0e0;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 140px;
    box-shadow: none;
}
.edooly-math-primary-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.edooly-math-primary-card:first-child { border-top: 3px solid #4A90E2; }
.edooly-math-primary-card:nth-child(2) { border-top: 3px solid #50E3C2; }
.edooly-math-primary-card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.edooly-math-primary-card-number {
    font-size: 32px;
    font-weight: bold;
    color: #666;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 5px 0 12px;
}
.edooly-math-primary-card-icon { width: 24px; height: 24px; }
.edooly-math-primary-card-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 10px 0;
    background-color: #f8f8f8;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    border-top: 1px solid #eee;
}

/* --- XP SECTION --- */
.edooly-math-primary-xp-section {
    background: white;
    border: 1px solid #ddd;
    border-radius: 15px;
    padding: 20px;
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.edooly-math-primary-xp-label {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 12px;
}
.edooly-math-primary-xp-bar-container {
    width: 100%;
    height: 22px;
    background-color: #cdcdcd;
    border-radius: 50px;
    box-sizing: border-box;
    overflow: hidden;
    margin-bottom: 8px;
}
.edooly-math-primary-xp-fill {
    height: 100%;
    background: linear-gradient(to bottom, #ffcc59, #f79c13);
    border-radius: 50px;
    width: 65%;
    transition: width 0.5s ease;
    position: relative;
}
.edooly-math-primary-xp-fill::after {
    content: "";
    position: absolute;
    left: 5px;
    right: 5px;
    top: 2px;
    height: 40%;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.3);
    opacity: 0.9;
    pointer-events: none;
}
.edooly-math-primary-xp-text {
    font-size: 14px;
    color: #666;
    text-align: right;
    margin-top: 5px;
}

/* --- BUTTONS --- */
.edooly-math-primary-btn-detalles {
    padding: 16px;
    background-color: #000;
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 18px;
    font-weight: 600;
    width: 100%;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(.2,.9,.2,1);
    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
    position: relative;
    overflow: hidden;
    font-family: 'Nunito', sans-serif;
    -webkit-tap-highlight-color: transparent;
}
.edooly-math-primary-btn-detalles:hover,
.edooly-math-primary-btn-detalles:focus {
    background-color: #787878;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0,0,0,0.18);
    outline: none;
}

/* --- SHORTCODE CONTAINER --- */
.edooly-math-primary-shortcode-container {
    width: 100%;
    min-height: 240px;
    height: auto;
    max-height: none;
    background: url('https://edooly.com/wp-content/uploads/2025/07/Volcan-activo-en-la-distancia.png') no-repeat center center;
    background-size: cover;
    border-radius: 20px;
    border: 3px solid #333;
    box-shadow: none;
    display: flex;
    justify-content: center;
    align-items: stretch;
    position: relative;
    transition: background-image 0.5s ease;
    overflow: visible;
    padding: 12px;
}

/* --- SVG BUTTON --- */
.edooly-math-primary-bg-circle-btn {
    position: absolute;
    top: 18px;
    right: 18px;
    background: white;
    border-radius: 50%;
    border: 2px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    width: 44px;
    height: 44px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: box-shadow 0.17s, background 0.22s, border-color 0.22s;
    z-index: 10;
}
.edooly-math-primary-bg-circle-btn:hover,
.edooly-math-primary-bg-circle-btn:focus {
    box-shadow: 0 6px 16px rgba(216, 20, 58, 0.25);
    border-color: #FF3F62;
    background: #ffeaea;
}
.edooly-math-primary-bg-circle-btn svg {
    width: 28px;
    height: 28px;
    transition: filter 0.2s;
}
.edooly-math-primary-bg-circle-btn:hover svg {
    filter: brightness(0.85) saturate(1.3);
}

/* --- HIDE TOTAL SECTION --- */
.edooly-math-primary-total-section { display: none; }

/* --- MODAL DETALLES --- */
.edooly-math-primary-modal {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.edooly-math-primary-modal.active {
    opacity: 1;
    visibility: visible;
}
.edooly-math-primary-modal-content {
    background-color: white;
    border-radius: 18px;
    padding: 18px 14px 22px 14px;
    width: 95%;
    max-width: 410px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(22px) scale(0.97);
    transition: transform 0.34s cubic-bezier(0.18, 1.25, 0.4, 1), opacity 0.34s ease;
    opacity: 0;
}
.edooly-math-primary-modal.active .edooly-math-primary-modal-content {
    transform: translateY(0) scale(1);
    opacity: 1;
}
@media (max-width: 780px) {
    .edooly-math-primary-modal {
        align-items: flex-end;
    }
    .edooly-math-primary-modal-content {
        width: 100%;
        max-width: none;
        border-radius: 18px 18px 0 0;
        padding: 13px 7px 24px 7px;
        max-height: 92vh;
        transform: translateY(100%);
    }
    .edooly-math-primary-modal.active .edooly-math-primary-modal-content {
        transform: translateY(0);
    }
}
.edooly-math-primary-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #999;
    width: 28px;
    height: 28px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    z-index: 10;
}
.edooly-math-primary-modal-close:hover {
    background-color: #f5f5f5;
    color: #333;
}
.edooly-math-primary-modal-title {
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #333;
    text-align: center;
    font-family: 'Nunito', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.edooly-math-primary-modal-section {
    margin-bottom: 17px;
    padding: 13px 12px 13px 12px;
    background: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.035);
}
.edooly-math-primary-modal-section-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 13px;
    color: #444;
    padding-bottom: 5px;
    border-bottom: 2px solid #eaeaea;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Nunito', sans-serif;
}
.edooly-math-primary-modal-section-title svg {
    width: 20px;
    height: 20px;
    min-width: 20px;
}
.edooly-math-primary-modal-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 0 2px;
    align-items: center;
}
.edooly-math-primary-modal-info:last-child { margin-bottom: 0; }
.edooly-math-primary-modal-label {
    font-size: 13px;
    color: #666;
    font-family: 'Nunito', sans-serif;
}
.edooly-math-primary-modal-value {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    font-family: 'Nunito', sans-serif;
}
.edooly-math-primary-modal-highlight {
    color: #4A90E2;
    font-weight: 700;
}

/* --- PROGRESS BARS --- */
.edooly-math-primary-progress-container {
    width: 100%;
    background: #e0e0e0;
    height: 7px;
    border-radius: 4px;
    overflow: hidden;
    margin: 7px 0 13px 0;
}
.edooly-math-primary-progress-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}
.edooly-math-primary-progress-bar.progress-blue {
    background: linear-gradient(90deg, #4A90E2, #63B8FF);
}
.edooly-math-primary-progress-bar.progress-green {
    background: linear-gradient(90deg, #50E3C2, #7CFFCB);
}
.edooly-math-primary-progress-bar.progress-orange {
    background: linear-gradient(90deg, #FFB347, #FFCC33);
}

/* --- XP VISUAL --- */
.edooly-math-primary-xp-visual {
    display: flex;
    gap: 6px;
    margin: 10px 0 2px 0;
    justify-content: center;
}
.edooly-math-primary-xp-box {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: #f0f0f0;
    position: relative;
    overflow: hidden;
    transition: background 0.2s;
}
.edooly-math-primary-xp-box.filled {
    background: linear-gradient(135deg, #f7db22 60%, #ffe97a 100%);
}
.edooly-math-primary-xp-detail {
    display: flex;
    justify-content: space-between;
    background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
    padding: 8px 10px;
    border-radius: 7px;
    margin: 10px 0 14px 0;
    color: white;
    font-weight: 600;
}
.edooly-math-primary-xp-detail-item { text-align: center; }
.edooly-math-primary-xp-detail-value { font-size: 15px; margin-bottom: 2px; }
.edooly-math-primary-xp-detail-label { font-size: 10px; opacity: 0.93; }

/* --- MODAL SELECTION/UNSELECT --- */
.edooly-math-primary-btn-detalles,
.edooly-math-primary-modal-close {
    cursor: pointer;
}
.edooly-math-primary-modal-content,
.edooly-math-primary-modal-title,
.edooly-math-primary-modal-section,
.edooly-math-primary-modal-info,
.edooly-math-primary-xp-visual,
.edooly-math-primary-xp-detail {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* ====================
CARRUSEL NUEVO BG
==================== */
.edooly-math-primary-bg-modal {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.edooly-math-primary-bg-modal.active {
    opacity: 1;
    visibility: visible;
}
.edooly-math-primary-bg-modal-content {
    background-color: white;
    border-radius: 18px;
    padding: 18px 14px 22px 14px;
    width: 95%;
    max-width: 1000px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(22px) scale(0.97);
    transition: transform 0.34s cubic-bezier(0.18, 1.25, 0.4, 1), opacity 0.34s ease;
    opacity: 0;
}
.edooly-math-primary-bg-modal.active .edooly-math-primary-bg-modal-content {
    transform: translateY(0) scale(1);
    opacity: 1;
}
.edooly-math-primary-bg-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    font-size: 28px;
    color: #888;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 10;
}
.edooly-math-primary-bg-modal-close:hover {
    background: #f7f7f7;
    color: #222;
}
.edooly-math-primary-bg-modal-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #222;
    margin-bottom: 8px;
    text-align: center;
}
.edooly-math-primary-bg-carousel-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
    justify-content: center;
    position: relative;
    margin: 15px 0 0 0;
}
.edooly-math-primary-bg-carousel-btn {
    background: #fff;
    border: 1px solid #e0e0e0;
    color: #222;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10;
    opacity: 0.9;
    position: relative;
    overflow: hidden;
}
.edooly-math-primary-bg-carousel-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: scale(0.9);
}
.edooly-math-primary-bg-carousel-btn:hover:not(:disabled) {
    background: #4A6CF7;
    transform: scale(1.1);
    opacity: 1;
    box-shadow: 0 6px 16px rgba(74, 108, 247, 0.3);
}
.edooly-math-primary-bg-carousel-btn:hover:not(:disabled) path {
    fill: white;
}
.edooly-math-primary-bg-carousel-btn:active:not(:disabled) {
    transform: scale(0.95);
}
.edooly-math-primary-bg-carousel-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}
.edooly-math-primary-bg-carousel-btn:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}
@keyframes ripple {
    0% { transform: scale(0, 0); opacity: 0.5; }
    100% { transform: scale(20, 20); opacity: 0; }
}
.edooly-math-primary-bg-carousel-btn svg {
    width: 24px;
    height: 24px;
    transition: transform 0.2s ease;
}
.edooly-math-primary-bg-carousel-btn:hover:not(:disabled) svg {
    transform: scale(1.2);
}
.edooly-math-primary-bg-carousel-btn path {
    fill: #222;
    transition: fill 0.2s ease;
}

/* --- PREVIEW CONTAINER --- */
.edooly-math-primary-bg-preview-container {
    display: flex;
    width: 100%;
    justify-content: center;
    margin: 15px 0 0 0;
    gap: 25px;
    align-items: center;
    position: relative;
    height: 200px;
    overflow: hidden;
    touch-action: pan-x;
    -webkit-overflow-scrolling: touch;
}
.edooly-math-primary-preview-item {
    position: absolute;
    width: 220px;
    height: 160px;
    border-radius: 12px;
    overflow: hidden;
    opacity: 0.7;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: none;
    cursor: pointer;
    z-index: 1;
    border: 0 solid transparent;
}
.edooly-math-primary-preview-item.prev {
    transform: translateX(-120%) perspective(500px) rotateY(15deg) scale(0.9);
    filter: brightness(0.8);
}
.edooly-math-primary-preview-item.current {
    width: 260px;
    height: 190px;
    opacity: 1;
    z-index: 3;
    box-shadow: none;
    transform: translateX(0) scale(1);
}
.edooly-math-primary-preview-item.next {
    transform: translateX(120%) perspective(500px) rotateY(-15deg) scale(0.9);
    filter: brightness(0.8);
}
.edooly-math-primary-preview-item.locked {
    filter: grayscale(100%) brightness(0.7);
    cursor: not-allowed;
}
.edooly-math-primary-preview-item.selected {
    border: 3px solid #4A6CF7;
    animation: pulse 2s infinite;
}
.edooly-math-primary-preview-item.preselected {
    border: 3px solid #2222ee;
}
.edooly-math-primary-preview-item img {
    display: block;            
    width: 100% !important;
    height: 100% !important;
    max-width: 100%;
    object-fit: cover;
    object-position: center center;
    vertical-align: middle;
    line-height: 0;             
    background-color: transparent;
}
.edooly-math-primary-slide-info {
    text-align: center;
    margin: 24px 0 0 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.edooly-math-primary-slide-level {
    font-weight: 700;
    font-size: 1.1rem;
    color: #222;
    margin-bottom: 4px;
}
.edooly-math-primary-slide-name {
    font-size: 0.95rem;
    color: #666;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.edooly-math-primary-bg-modal-footer {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}
.edooly-math-primary-bg-modal-btn {
    padding: 13px 35px;
    background: linear-gradient(90deg, #4A6CF7 60%, #3A5AE0 100%);
    color: white;
    font-size: 16px;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 12px rgba(74, 108, 247, 0.25);
    opacity: 0.9;
    letter-spacing: 0.04em;
    position: relative;
    overflow: hidden;
    font-family: 'Nunito', sans-serif;
}
.edooly-math-primary-bg-modal-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: scale(0.98);
}
.edooly-math-primary-bg-modal-btn:not(:disabled):hover {
    opacity: 1;
    background: linear-gradient(90deg, #3A5AE0 30%, #4A6CF7 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(74, 108, 247, 0.35);
}
.edooly-math-primary-bg-modal-btn:not(:disabled):active {
    transform: translateY(0);
}

/* --- LOCKED PREVIEW --- */
.edooly-math-primary-lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.edooly-math-primary-preview-item.locked .edooly-math-primary-lock-overlay {
    opacity: 1;
}
.edooly-math-primary-lock-icon {
    width: 30px;
    height: 30px;
}
.edooly-math-primary-active-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #4CAF50;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* --- ANIMATIONS --- */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(74, 108, 247, 0.4);}
    70% { box-shadow: 0 0 0 10px rgba(74, 108, 247, 0);}
    100% { box-shadow: 0 0 0 0 rgba(74, 108, 247, 0);}
}
@keyframes popIn {
    0% { transform: translateX(0) scale(0.9); opacity: 0;}
    100% { transform: translateX(0) scale(1); opacity: 1;}
}
.edooly-math-primary-preview-item.current.pop-in {
    animation: popIn 0.4s forwards;
}

/* --- ADAPTIVE CAROUSEL SIZES --- */
@media (max-width: 1200px) {
    .edooly-math-primary-preview-item { 
        width: 200px; 
        height: 150px; 
    }
    .edooly-math-primary-preview-item.current { 
        width: 230px; 
        height: 170px; 
    }
}
@media (max-width: 1000px) {
    .edooly-math-primary-bg-modal-content { 
        max-width: 95vw; 
    }
    .edooly-math-primary-preview-item { 
        width: 180px; 
        height: 130px; 
    }
    .edooly-math-primary-preview-item.current { 
        width: 200px; 
        height: 150px; 
    }
}
@media (max-width: 780px) {
    .edooly-math-primary-bg-modal { 
        align-items: flex-end; 
    }
    .edooly-math-primary-bg-modal-content {
        border-radius: 20px 20px 0 0;
        max-width: 100%;
        width: 100%;
        max-height: 85vh;
        padding: 20px 15px;
    }
    .edooly-math-primary-bg-carousel-container { 
        margin: 10px 0 0 0; 
    }
    .edooly-math-primary-bg-carousel-btn { 
        display: none; 
    }
    .edooly-math-primary-bg-preview-container { 
        height: 160px; 
    }
    .edooly-math-primary-preview-item { 
        width: 140px; 
        height: 100px; 
    }
    .edooly-math-primary-preview-item.current { 
        width: 160px; 
        height: 120px; 
    }
    .edooly-math-primary-preview-item.prev { 
        transform: translateX(-110%) perspective(500px) rotateY(15deg) scale(0.9); 
    }
    .edooly-math-primary-preview-item.next { 
        transform: translateX(110%) perspective(500px) rotateY(-15deg) scale(0.9); 
    }
    .edooly-math-primary-bg-modal-footer {
        position: sticky;
        bottom: 0;
        background: white;
        padding: 15px 0 5px;
        margin-top: 15px;
    }
    .edooly-math-primary-slide-info { 
        margin-top: 16px; 
    }
}