/* =============================================================================
   panelCarrusel.css — Unified carousel styles
   Covers three class-name systems used across 6 pages:
     • statistics-carousel-*   (modulo1-1.html)
     • course-content-carousel-* (modulo1-6, modulo1-6-5, modulo11-2, modulo11-3)
     • learning-carousel-* / learning-slide-* (modulo2-1.html)
   ============================================================================= */


/* ─── SECTION / WRAPPER ────────────────────────────────────────────────────── */

.statistics-carousel-section,
.course-content-carousel-section {
    width: 100%;
    padding: 12px 0 28px;
}

.statistics-carousel-wrapper,
.course-content-carousel-wrapper {
    position: relative;
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 64px;
}

/* learning variant uses a different element name */
.learning-carousel-area {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding-left: 72px;
    padding-right: 72px;
    overflow: visible;
}

.learning-carousel-shell {
    position: relative;
    width: 100%;
    overflow: visible;
}


/* ─── CAROUSEL TRACK ────────────────────────────────────────────────────────── */

.statistics-carousel,
.course-content-carousel {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background-color: #ffffff;
    box-shadow: 0 18px 45px rgba(31, 41, 51, 0.12);
}

.statistics-carousel .carousel-item,
.course-content-carousel .carousel-item {
    min-height: 620px;
}

/* modulo11 pages use 500px as min-height */
.course-content-carousel.carousel-item-500 .carousel-item {
    min-height: 500px;
}


/* ─── SLIDE GRID ────────────────────────────────────────────────────────────── */

.statistics-carousel-slide,
.course-content-carousel-slide {
    display: grid;
    grid-template-columns: minmax(280px, 42%) minmax(0, 58%);
    min-height: 620px;
}

.learning-slide {
    display: none;
    width: 100%;
    overflow: hidden;
    border-radius: 22px;
    background-color: #ffffff;
    box-shadow: 0 18px 44px rgba(31, 41, 51, 0.12);
}

.learning-slide.is-active {
    display: grid;
    grid-template-columns: minmax(300px, 42%) minmax(0, 58%);
    min-height: 620px;
}


/* ─── IMAGE PANEL ───────────────────────────────────────────────────────────── */

.statistics-carousel-image,
.course-content-carousel-image,
.learning-slide-image {
    position: relative;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.statistics-carousel-image,
.course-content-carousel-image {
    min-height: 620px;
}

.learning-slide-image {
    min-height: 620px;
    background-image: url("../../assets/images/course/general-images/1586388907.webp");
}

/* Dark visual overlay on all image panels */
.statistics-carousel-image::after,
.course-content-carousel-image::after,
.learning-slide-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(10, 18, 40, 0.40) 0%, rgba(10, 18, 40, 0.12) 100%);
    pointer-events: none;
}


/* ─── CONTENT PANEL ─────────────────────────────────────────────────────────── */

.statistics-carousel-content,
.course-content-carousel-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px 56px;
    color: #111827;
    text-align: center;
}

.statistics-carousel-content p,
.statistics-carousel-content li,
.course-content-carousel-content p {
    font-size: clamp(1rem, 1.25vw, 1.075rem);
    line-height: 1.75;
}

.statistics-carousel-content p:last-child,
.statistics-carousel-content ol:last-child {
    margin-bottom: 0;
}

.course-content-carousel-content p {
    margin-bottom: 0;
}

.statistics-carousel-content strong,
.course-content-carousel-content strong {
    font-weight: 700;
}

.statistics-carousel-content ol {
    margin: 18px 0 0;
    padding-left: 1.25rem;
}

.statistics-carousel-content li {
    margin-bottom: 12px;
    padding-left: 8px;
}

/* learning-slide content panel */
.learning-slide-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(34px, 4vw, 58px);
    text-align: center;
    color: #111827;
}

.learning-slide-title {
    width: 100%;
    max-width: 520px;
    margin: 0 auto 24px auto;
    color: #111827;
    font-size: clamp(1rem, 1.35vw, 1.12rem);
    font-weight: 700;
    line-height: 1.65;
    text-align: center;
}

.learning-slide-text {
    width: 100%;
    max-width: 580px;
    margin: 0 auto;
    color: #111827;
    font-size: clamp(1rem, 1.18vw, 1.08rem);
    line-height: 1.85;
    text-align: center;
}

.learning-slide-list {
    width: fit-content;
    margin: 16px auto 0 auto;
    padding-left: 22px;
    color: #111827;
    font-size: clamp(1rem, 1.18vw, 1.08rem);
    line-height: 1.8;
    text-align: left;
}


/* ─── CONTROLS ──────────────────────────────────────────────────────────────── */

.statistics-carousel-control,
.course-content-carousel-control {
    position: absolute;
    top: 50%;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid #d9e2ec;
    border-radius: 50%;
    background-color: #ffffff;
    box-shadow: 0 10px 24px rgba(31, 41, 51, 0.16);
    color: #1f2933;
    opacity: 1;
    text-decoration: none;
    transform: translateY(-50%);
    transition:
        transform 180ms ease,
        box-shadow 180ms ease,
        background-color 180ms ease;
}

.statistics-carousel-control:hover,
.statistics-carousel-control:focus,
.course-content-carousel-control:hover,
.course-content-carousel-control:focus {
    outline: none;
    background-color: #f5f7fa;
    box-shadow: 0 12px 28px rgba(31, 41, 51, 0.22);
    color: #0f172a;
    text-decoration: none;
    transform: translateY(-50%) scale(1.04);
}

.statistics-carousel-control-left,
.course-content-carousel-control-left {
    left: 6px;
}

.statistics-carousel-control-right,
.course-content-carousel-control-right {
    right: 6px;
}

.statistics-carousel-control-symbol,
.course-content-carousel-control-symbol {
    display: block;
    margin-top: -2px;
    font-size: 34px;
    line-height: 1;
}

/* learning variant uses <button> */
.learning-carousel-button {
    position: absolute;
    top: 50%;
    z-index: 20;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d9e2ec;
    border-radius: 50%;
    background-color: #ffffff;
    box-shadow: 0 12px 28px rgba(31, 41, 51, 0.14);
    color: #0f172a;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
    transition:
        transform 160ms ease,
        box-shadow 160ms ease,
        background-color 160ms ease,
        opacity 160ms ease;
}

.learning-carousel-button:hover,
.learning-carousel-button:focus {
    background-color: #f8fafc;
    box-shadow: 0 16px 34px rgba(31, 41, 51, 0.18);
    transform: translateY(-50%) scale(1.04);
    outline: none;
}

.learning-carousel-button:disabled {
    opacity: 0.42;
    cursor: not-allowed;
    transform: translateY(-50%);
}

.learning-carousel-button-previous {
    left: -58px;
}

.learning-carousel-button-next {
    right: -58px;
}


/* ─── INDICATORS ─────────────────────────────────────────────────────────────── */

.statistics-carousel-indicators,
.course-content-carousel-indicators {
    position: absolute;
    left: 50%;
    bottom: 18px;
    z-index: 10;
    transform: translateX(-50%);
    justify-content: center;
    margin: 0;
}

.statistics-carousel-indicators li,
.course-content-carousel-indicators li {
    width: 10px;
    height: 10px;
    border-top: 0;
    border-bottom: 0;
    border-radius: 50%;
    background-color: #9fb3c8;
    opacity: 1;
}

.statistics-carousel-indicators .active,
.course-content-carousel-indicators .active {
    background-color: #1f6feb;
}

/* learning variant uses <button> indicators */
.learning-carousel-indicators {
    position: absolute;
    left: 50%;
    bottom: 18px;
    z-index: 15;
    display: flex;
    justify-content: center;
    gap: 8px;
    transform: translateX(-50%);
}

.learning-carousel-indicator {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background-color: #a8b5c5;
    cursor: pointer;
    transition: transform 160ms ease, background-color 160ms ease;
}

.learning-carousel-indicator.is-active {
    background-color: #2f80ed;
    transform: scale(1.15);
}


/* ─── PAGE-LEVEL HELPERS (learning variant) ──────────────────────────────────── */

.learning-page {
    padding-left: 15px;
    padding-right: 15px;
}

.learning-main-card {
    padding: clamp(22px, 3vw, 42px);
    border: 0;
    border-radius: 18px;
    background-color: #ffffff;
    box-shadow: 0 14px 34px rgba(31, 41, 51, 0.1);
}

.learning-title-row {
    margin-bottom: 28px;
}

.learning-page-title {
    margin: 0;
    color: #a0522d;
    font-size: clamp(1.45rem, 2vw, 1.75rem);
    font-weight: 700;
    line-height: 1.25;
}

.learning-page-title .badge {
    margin-right: 8px;
    padding: 7px 10px;
    border-radius: 4px;
    background-color: #f7f7f7;
    color: #0f172a;
    font-size: 0.95rem;
}

.learning-instruction {
    width: fit-content;
    max-width: 100%;
    margin: 0 0 36px 0;
    padding: 12px 16px;
    border: 2px solid #d1d5db;
    border-radius: 9px;
    background-color: #ffffff;
    color: #0f172a;
    font-size: 1rem;
    line-height: 1.45;
}

.learning-instruction i {
    margin-right: 8px;
}

.learning-navigation {
    margin-top: 24px;
}

.learning-navigation .btn-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
}

.learning-navigation .btn {
    margin: 0 !important;
    border-radius: 6px !important;
}

.learning-progress-card {
    margin-bottom: 20px;
    border: 0;
    border-radius: 20px;
    box-shadow: 0 14px 34px rgba(31, 41, 51, 0.10);
}

.learning-progress-card .progress {
    overflow: hidden;
    border-radius: 999px;
    background-color: #e9eef5;
}

/* page-intro text used on modulo11-3 */
.course-intro-text {
    margin: 0 0 20px;
    font-size: 1rem;
    line-height: 1.75;
    color: #17202a;
}


/* ─── TABLET BREAKPOINT (≤ 991.98px) ────────────────────────────────────────── */

@media (max-width: 991.98px) {
    .statistics-carousel-wrapper,
    .course-content-carousel-wrapper {
        padding: 0 54px;
    }

    .statistics-carousel .carousel-item,
    .statistics-carousel-slide,
    .course-content-carousel .carousel-item,
    .course-content-carousel-slide {
        min-height: auto;
    }

    .statistics-carousel-slide,
    .course-content-carousel-slide {
        grid-template-columns: 1fr;
    }

    .statistics-carousel-image,
    .course-content-carousel-image {
        min-height: 230px;
    }

    .statistics-carousel-content,
    .course-content-carousel-content {
        padding: 34px 36px 40px;
    }

    /* learning */
    .learning-slide.is-active {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .learning-slide-image {
        min-height: 250px;
    }

    .learning-slide-content {
        min-height: 360px;
        padding: 34px 30px 58px 30px;
    }
}

@media (max-width: 1199.98px) {
    .learning-carousel-area {
        padding-left: 58px;
        padding-right: 58px;
    }

    .learning-carousel-button-previous {
        left: -48px;
    }

    .learning-carousel-button-next {
        right: -48px;
    }
}


/* ─── SMALL TABLET (≤ 767.98px) ─────────────────────────────────────────────── */

@media (max-width: 767.98px) {
    .learning-main-card {
        padding: 18px 14px 24px 14px;
    }

    .learning-title-row {
        margin-bottom: 18px;
    }

    .learning-instruction {
        width: 100%;
        margin-bottom: 22px;
        font-size: 0.95rem;
    }

    .learning-carousel-area {
        padding-left: 0;
        padding-right: 0;
    }

    .learning-carousel-shell {
        padding-bottom: 68px;
    }

    .learning-slide {
        border-radius: 18px;
    }

    .learning-slide-image {
        min-height: 180px;
    }

    .learning-slide-content {
        min-height: 0;
        padding: 24px 20px 56px 20px;
    }

    .learning-carousel-button {
        top: auto;
        bottom: 0;
        width: 44px;
        height: 44px;
        font-size: 28px;
        transform: none;
    }

    .learning-carousel-button:hover,
    .learning-carousel-button:focus {
        transform: scale(1.04);
    }

    .learning-carousel-button:disabled {
        transform: none;
    }

    .learning-carousel-button-previous {
        left: calc(50% - 58px);
    }

    .learning-carousel-button-next {
        right: calc(50% - 58px);
    }

    .learning-carousel-indicators {
        bottom: 82px;
    }
}


/* ─── PHONE BREAKPOINT (≤ 575.98px) ─────────────────────────────────────────── */

@media (max-width: 575.98px) {
    /* statistics */
    .statistics-carousel-section {
        padding: 6px 0 20px;
    }

    .statistics-carousel-container {
        margin-right: 0 !important;
        margin-left: 0 !important;
    }

    .statistics-carousel-wrapper {
        padding: 0 0 72px;
    }

    .statistics-carousel,
    .statistics-carousel .carousel-inner,
    .statistics-carousel .carousel-item,
    .statistics-carousel .carousel-item.active,
    .statistics-carousel .carousel-item-next,
    .statistics-carousel .carousel-item-prev,
    .statistics-carousel-slide,
    .statistics-carousel-content {
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
    }

    .statistics-carousel {
        overflow: hidden;
        border-radius: 18px;
    }

    .statistics-carousel .carousel-inner {
        overflow: hidden !important;
    }

    .statistics-carousel-slide {
        grid-template-columns: 1fr;
    }

    .statistics-carousel-image {
        min-height: 170px;
        height: 170px;
    }

    .statistics-carousel-content {
        display: flex;
        justify-content: flex-start;
        overflow: visible !important;
        padding: 22px 18px 24px;
    }

    .statistics-carousel-content p,
    .statistics-carousel-content li {
        font-size: 0.95rem;
        line-height: 1.55;
        overflow-wrap: break-word;
    }

    .statistics-carousel-content p {
        margin-bottom: 14px;
    }

    .statistics-carousel-content ol {
        margin-top: 12px;
        padding-left: 1.1rem;
    }

    .statistics-carousel-content li {
        margin-bottom: 10px;
        padding-left: 4px;
    }

    .statistics-carousel-indicators {
        margin: 14px 0 18px;
    }

    .statistics-carousel-control {
        top: auto;
        bottom: 10px;
        width: 46px;
        height: 46px;
        transform: none;
    }

    .statistics-carousel-control:hover,
    .statistics-carousel-control:focus {
        transform: scale(1.04);
    }

    .statistics-carousel-control-left {
        left: calc(50% - 58px);
    }

    .statistics-carousel-control-right {
        right: calc(50% - 58px);
    }

    /* course-content */
    .course-content-carousel-section {
        padding: 6px 0 20px;
    }

    .course-content-carousel-container {
        margin-right: 0 !important;
        margin-left: 0 !important;
    }

    .course-content-carousel-wrapper {
        padding: 0 0 66px;
    }

    .course-content-carousel,
    .course-content-carousel .carousel-inner,
    .course-content-carousel .carousel-item,
    .course-content-carousel .carousel-item.active,
    .course-content-carousel .carousel-item-next,
    .course-content-carousel .carousel-item-prev,
    .course-content-carousel-slide,
    .course-content-carousel-content {
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
    }

    .course-content-carousel {
        overflow: hidden;
        border-radius: 18px;
    }

    .course-content-carousel .carousel-inner {
        overflow: hidden !important;
    }

    .course-content-carousel-slide {
        grid-template-columns: 1fr;
    }

    .course-content-carousel-image {
        height: 170px;
        min-height: 170px;
    }

    .course-content-carousel-content {
        display: flex;
        justify-content: flex-start;
        overflow: visible !important;
        padding: 22px 18px 24px;
    }

    .course-content-carousel-content p,
    .course-intro-text {
        font-size: 0.98rem;
        line-height: 1.65;
        overflow-wrap: break-word;
    }

    .course-content-carousel-indicators {
        margin: 14px 0 18px;
    }

    .course-content-carousel-control {
        top: auto;
        bottom: 10px;
        width: 46px;
        height: 46px;
        transform: none;
    }

    .course-content-carousel-control:hover,
    .course-content-carousel-control:focus {
        transform: scale(1.04);
    }

    .course-content-carousel-control-left {
        left: calc(50% - 56px);
    }

    .course-content-carousel-control-right {
        right: calc(50% - 56px);
    }

    /* learning */
    .learning-page {
        padding-left: 0;
        padding-right: 0;
    }

    .learning-main-card {
        border-radius: 0;
        padding-left: 14px;
        padding-right: 14px;
    }

    .learning-page-title {
        font-size: 1.35rem;
    }

    .learning-page-title .badge {
        display: inline-block;
        margin-bottom: 6px;
    }

    .learning-slide-image {
        min-height: 150px;
    }

    .learning-slide-title {
        margin-bottom: 16px;
        line-height: 1.55;
    }

    .learning-slide-text {
        line-height: 1.7;
    }
}


/* ─── REDUCED MOTION ─────────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
    .statistics-carousel-control,
    .course-content-carousel-control,
    .learning-carousel-button,
    .learning-carousel-indicator {
        transition: none;
    }

    .carousel-item {
        transition: none;
    }
}
