/* ==========================================================================
   MODUL SELICA: ULTRA-PREMIUM INTERACTIVE GLASSMORPHISM CURRICULUM ARCHITECTURE
   ========================================================================== */

/* Background Animation */
.night-lottie-bg-wrap {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.95;
    overflow: hidden;
}

.night-lottie-bg-wrap svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    min-width: 100% !important;
    min-height: 100% !important;
    object-fit: cover !important;
}

/* Header Tipografi Hero Section */
.ag-section-head {
    text-align: center;
    position: relative;
    z-index: 3;
    margin-bottom: clamp(30px, 5vw, 54px);
}

.ag-section-head__row {
    overflow: hidden;
    line-height: 0.92;
}

.ag-head-solid {
    display: block;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(3rem, 7.5vw, 6.5rem);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.03em;
    color: #ffffff;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.ag-section-head__row--outline {
    margin-top: 2px;
}

.ag-head-stroke {
    display: block;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(3rem, 7.5vw, 6.5rem);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.03em;
    color: #FEE156;
    -webkit-text-stroke: 2px #E5B800;
    text-shadow: 0 4px 24px rgba(254, 225, 86, 0.35), 0 2px 10px rgba(0,0,0,0.8);
}

.ag-head-sub {
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
    margin-top: 20px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

/* Section Wrapper Utama Modul */
.modul-futuristic-section {
    background: radial-gradient(circle at 50% 15%, #173715 0%, #0c200e 45%, #061107 100%);
    color: #f0ece4;
    padding: clamp(110px, 14vh, 160px) 0 140px;
    position: relative;
    overflow: hidden;
}

/* 3-Deck Grid Layout */
.modul-deck-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(24px, 2.5vw, 36px);
    max-width: 1280px;
    margin: 0 auto;
    position: relative;
    z-index: 4;
}

@media (min-width: 1600px) {
    .modul-deck-container {
        max-width: 1400px;
        gap: 40px;
    }
}

/* Individual Futuristic Card Deck */
.modul-card-deck {
    position: relative;
    background: linear-gradient(165deg, rgba(16, 36, 15, 0.94) 0%, rgba(10, 24, 10, 0.98) 100%);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 28px;
    padding: 28px 24px 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.35s ease;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.modul-card-deck:hover {
    transform: translateY(-8px);
    border-color: rgba(254, 225, 86, 0.5);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.7), 0 0 40px rgba(254, 225, 86, 0.18), inset 0 1px 0 rgba(254, 225, 86, 0.4);
}

/* Glowing Dynamic Ambient Light */
.deck-glow-backdrop {
    position: absolute;
    top: -50px;
    right: -50px;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(254, 225, 86, 0.22) 0%, rgba(82, 146, 56, 0.08) 60%, transparent 100%);
    filter: blur(45px);
    pointer-events: none;
    transition: transform 0.5s ease, opacity 0.5s ease;
    z-index: 1;
}

.modul-card-deck:hover .deck-glow-backdrop {
    transform: scale(1.4);
    opacity: 0.9;
}

/* Deck Header: Code Pill & Active Radar */
.deck-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    position: relative;
    z-index: 3;
}

.deck-code-pill {
    display: flex;
    align-items: center;
    gap: 12px;
}

.deck-icon-badge {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(254, 225, 86, 0.2) 0%, rgba(254, 225, 86, 0.05) 100%);
    border: 1px solid rgba(254, 225, 86, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    transition: transform 0.3s ease;
}

.modul-card-deck:hover .deck-icon-badge {
    transform: scale(1.1) rotate(5deg);
}

.deck-code-group {
    display: flex;
    flex-direction: column;
}

.deck-code-main {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.3rem;
    font-weight: 900;
    color: #ffffff;
    line-height: 1.1;
    letter-spacing: 0.5px;
}

.deck-badge-status {
    font-size: 0.68rem;
    font-weight: 800;
    color: var(--idm-secondary-yellow, #fee156);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-top: 2px;
}

.deck-active-radar {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 12px;
    background: rgba(82, 224, 56, 0.12);
    border: 1px solid rgba(82, 224, 56, 0.3);
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(82, 224, 56, 0.15);
}

.radar-dot {
    position: relative;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #52e038;
    box-shadow: 0 0 8px #52e038;
}

.radar-dot::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 1.5px solid #52e038;
    animation: pingRadar 2s cubic-bezier(0, 0.2, 0.8, 1) infinite;
}

@keyframes pingRadar {
    0% { transform: scale(1); opacity: 0.9; }
    80%, 100% { transform: scale(2.6); opacity: 0; }
}

.radar-text {
    font-size: 0.68rem;
    font-weight: 800;
    color: #8aff78;
    letter-spacing: 0.5px;
}

/* Holographic Visual Stage */
.deck-visual-stage {
    position: relative;
    width: 100%;
    height: 195px;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 22px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    cursor: pointer;
    background: #091508;
    z-index: 3;
}

.deck-image-holo {
    position: relative;
    width: 100%;
    height: 100%;
}

.deck-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1), filter 0.4s ease;
    filter: brightness(0.92) contrast(1.05);
}

.deck-visual-stage:hover .deck-img {
    transform: scale(1.08);
    filter: brightness(1.05);
}

.deck-holo-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(8, 18, 7, 0) 0%, rgba(8, 18, 7, 0.85) 100%);
    pointer-events: none;
}

.deck-holo-lines {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(255, 255, 255, 0.025) 4px, rgba(255, 255, 255, 0.025) 5px);
    pointer-events: none;
}

.deck-visual-preview-hint {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(10, 24, 10, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 0.68rem;
    font-weight: 800;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    opacity: 0;
    transform: translateY(-6px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.deck-visual-stage:hover .deck-visual-preview-hint {
    opacity: 1;
    transform: translateY(0);
}

.deck-stat-overlay-chip {
    position: absolute;
    bottom: 12px;
    left: 12px;
    right: 12px;
    background: rgba(8, 20, 8, 0.88);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 14px;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.stat-chip-left {
    display: flex;
    align-items: center;
    gap: 7px;
}

.stat-chip-icon {
    font-size: 0.85rem;
    color: var(--idm-secondary-yellow, #fee156);
}

.chip-val {
    font-size: 0.92rem;
    font-weight: 900;
    color: var(--idm-secondary-yellow, #fee156);
    letter-spacing: 0.3px;
}

.chip-lbl {
    font-size: 0.72rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.75);
}

/* Body Content */
.deck-body {
    margin-bottom: 26px;
    position: relative;
    z-index: 3;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.deck-title {
    font-size: 1.35rem;
    font-weight: 900;
    color: #ffffff;
    line-height: 1.25;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.deck-title a,
.deck-title-link,
.deck-title-link:visited,
.deck-title-link:link {
    color: #ffffff !important;
    text-decoration: none !important;
    display: inline-block;
    transition: color 0.25s ease;
}

.deck-title a:hover,
.deck-title-link:hover,
.deck-title-link:focus,
.deck-title-link:active {
    color: var(--idm-secondary-yellow, #fee156) !important;
    text-decoration: none !important;
}

.deck-desc {
    font-size: 0.86rem;
    color: rgba(240, 236, 228, 0.78);
    line-height: 1.6;
    margin: 0;
}

/* Futuristic Syllabus Accordion / Interactive Matrix List */
.deck-syllabus-matrix {
    background: rgba(9, 22, 8, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 16px;
    margin-bottom: 24px;
    position: relative;
    z-index: 3;
}

.matrix-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 12px;
}

.matrix-head-left {
    display: flex;
    align-items: center;
    gap: 6px;
}

.matrix-head-icon {
    font-size: 0.85rem;
    color: var(--idm-secondary-yellow, #fee156);
}

.matrix-title-lbl {
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 1.2px;
    color: rgba(254, 225, 86, 0.95);
    text-transform: uppercase;
}

.matrix-count-lbl {
    font-size: 0.68rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.55);
}

.matrix-items-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.matrix-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
}

.matrix-item:hover {
    background: rgba(254, 225, 86, 0.06);
    border-color: rgba(254, 225, 86, 0.3);
}

.matrix-item.is-expanded {
    background: rgba(254, 225, 86, 0.09);
    border-color: rgba(254, 225, 86, 0.45);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
}

.matrix-item-summary {
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.matrix-num-indicator {
    font-family: 'Space Mono', monospace;
    font-size: 1.05rem;
    font-weight: 900;
    color: var(--idm-secondary-yellow, #fee156);
    opacity: 0.95;
    flex-shrink: 0;
}

.matrix-info {
    flex-grow: 1;
}

.matrix-tags-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.matrix-tag-badge {
    font-size: 0.62rem;
    font-weight: 800;
    color: var(--idm-secondary-yellow, #fee156);
    background: rgba(254, 225, 86, 0.16);
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.3px;
}

.matrix-level-badge {
    font-size: 0.62rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.55);
}

.matrix-mod-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.35;
    margin: 0;
}

.matrix-action {
    flex-shrink: 0;
}

.matrix-btn-toggle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.78rem;
    transition: transform 0.3s ease, background 0.3s ease, color 0.3s ease;
    padding: 0;
}

.matrix-item.is-expanded .matrix-btn-toggle {
    transform: rotate(180deg);
    background: var(--idm-secondary-yellow, #fee156);
    border-color: var(--idm-secondary-yellow, #fee156);
    color: #081406;
}

/* Expandable Drawer */
.matrix-item-drawer {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    padding: 0 14px;
    transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease, padding 0.3s ease;
}

.matrix-item.is-expanded .matrix-item-drawer {
    max-height: 160px;
    opacity: 1;
    padding: 0 14px 14px;
}

.matrix-drawer-desc {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.5;
    margin: 0 0 10px;
    padding-top: 8px;
    border-top: 1px dashed rgba(255, 255, 255, 0.12);
}

.matrix-drawer-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.7rem;
}

.matrix-status-done {
    color: #8aff78;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.matrix-action-link {
    color: var(--idm-secondary-yellow, #fee156);
    text-decoration: none;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: transform 0.2s ease;
}

.matrix-action-link:hover {
    transform: translateX(3px);
    color: #ffffff;
}

/* Deck Footer Action Button */
.deck-footer-action {
    margin-top: auto;
    position: relative;
    z-index: 3;
}

.deck-cta-btn {
    width: 100%;
    padding: 14px 20px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(254, 225, 86, 0.16) 0%, rgba(82, 146, 56, 0.25) 100%);
    border: 1px solid rgba(254, 225, 86, 0.4);
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    position: relative;
    overflow: hidden;
}

.btn-circle-arrow {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    transition: transform 0.3s ease, background 0.3s ease;
}

.deck-cta-btn:hover {
    background: var(--idm-secondary-yellow, #fee156);
    border-color: var(--idm-secondary-yellow, #fee156);
    color: #081406;
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(254, 225, 86, 0.4);
}

.deck-cta-btn:hover .btn-circle-arrow {
    background: #081406;
    color: var(--idm-secondary-yellow, #fee156);
    transform: rotate(45deg);
}

/* ==========================================================================
   LIGHTBOX MODAL PREVIEW FOR ROADMAPS
   ========================================================================== */
.modul-lightbox-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.modul-lightbox-modal.is-open {
    opacity: 1;
    visibility: visible;
}

.modul-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 10, 4, 0.88);
    backdrop-filter: blur(16px);
}

.modul-lightbox-dialog {
    position: relative;
    z-index: 2;
    max-width: 900px;
    width: 100%;
    background: #0d220e;
    border: 1px solid rgba(254, 225, 86, 0.4);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.8), 0 0 40px rgba(254, 225, 86, 0.2);
    transform: scale(0.92) translateY(20px);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.modul-lightbox-modal.is-open .modul-lightbox-dialog {
    transform: scale(1) translateY(0);
}

.modul-lightbox-header {
    padding: 16px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(16, 38, 16, 0.95);
}

.lightbox-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lightbox-title-wrap h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 800;
    color: #ffffff;
}

.modul-lightbox-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.modul-lightbox-close:hover {
    background: #ff4757;
    border-color: #ff4757;
    transform: rotate(90deg);
}

.modul-lightbox-body {
    padding: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #081406;
}

.modul-lightbox-img {
    max-width: 100%;
    max-height: 75vh;
    border-radius: 16px;
    object-fit: contain;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Responsiveness */
/* Responsiveness */
@media (max-width: 1200px) {
    .modul-deck-container {
        grid-template-columns: repeat(2, 1fr);
    }
    .modul-card-deck:nth-child(3) {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .modul-futuristic-section {
        padding: 95px 0 80px;
    }

    .ag-head-solid,
    .ag-head-stroke {
        font-size: clamp(2.4rem, 11vw, 4rem);
    }

    .modul-deck-container {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .modul-card-deck:nth-child(3) {
        grid-column: span 1;
    }

    .modul-card-deck {
        padding: 22px 16px 18px;
        border-radius: 22px;
    }

    .deck-visual-stage {
        height: 155px;
        margin-bottom: 16px;
    }

    .deck-title {
        font-size: 1.15rem;
    }

    .deck-desc {
        font-size: 0.82rem;
    }

    .matrix-item-summary {
        padding: 10px 12px;
        gap: 10px;
    }

    .matrix-mod-title {
        font-size: 0.78rem;
    }

    .modul-lightbox-dialog {
        border-radius: 18px;
        margin: 12px;
    }

    .modul-lightbox-header {
        padding: 12px 16px;
    }

    .lightbox-title-wrap h4 {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .ag-head-solid,
    .ag-head-stroke {
        font-size: clamp(2.1rem, 11.5vw, 2.9rem);
    }

    .deck-action-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .deck-btn-read,
    .deck-btn-download {
        width: 100%;
        justify-content: center;
    }
}
