/* ==========================================================================
   EXAMS SECTION — Homepage (Featured Exams)
   ========================================================================== */

.hp-exams-section {
    margin-bottom: 100px;
}

/* ── 3-column grid ── */
.exams-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    align-items: start;
}

/* ── XCARD (futuristic card) ── */
.xcard {
    border-radius: 24px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1.5px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 6px 30px rgba(33, 40, 66, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.95);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.xcard:hover {
    transform: translateY(-8px) scale(1.01);
}

/* Ambient glow blob */
.xcard-glow {
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    top: -60px;
    right: -60px;
    background: radial-gradient(circle, rgba(33, 40, 66, 0.1), transparent 70%);
    filter: blur(30px);
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.4s;
}

.xglow-amber {
    background: radial-gradient(circle, rgba(245, 158, 11, 0.15), transparent 70%);
}

.xglow-teal {
    background: radial-gradient(circle, rgba(20, 184, 166, 0.15), transparent 70%);
}

.xcard:hover .xcard-glow {
    opacity: 1;
}

.xcard:hover {
    box-shadow: 0 20px 60px rgba(33, 40, 66, 0.18), 0 0 0 1.5px rgba(33, 40, 66, 0.18);
}

/* ── PANEL (dark header) ── */
.xcard-panel {
    position: relative;
    overflow: hidden;
    padding: 28px 24px 22px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    min-height: 190px;
    justify-content: center;
}

.xpanel-navy {
    background: linear-gradient(145deg, #212842 0%, #1a2038 60%, #0f1628 100%);
}

.xpanel-amber {
    background: linear-gradient(145deg, #78400a 0%, #5c3008 60%, #3d1e03 100%);
}

.xpanel-teal {
    background: linear-gradient(145deg, #0c4a45 0%, #093936 60%, #062b29 100%);
}

/* Scan-line overlay */
.xcard-scan {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(0deg,
            rgba(255, 255, 255, .015) 0px,
            rgba(255, 255, 255, .015) 1px,
            transparent 1px,
            transparent 4px);
    pointer-events: none;
    z-index: 1;
}

.xcard-scan::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.04), transparent);
    animation: scanBeam 3.5s ease-in-out infinite;
    pointer-events: none;
}

@keyframes scanBeam {
    0% {
        top: -60px;
    }

    100% {
        top: 110%;
    }
}

/* Circuit/grid decorative lines */
.xcard-circuit {
    position: absolute;
    inset: 0;
    opacity: .06;
    pointer-events: none;
    z-index: 1;
    background-image:
        linear-gradient(rgba(255, 255, 255, .6) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .6) 1px, transparent 1px);
    background-size: 32px 32px;
}

/* Type badge */
.xtype-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 13px;
    border-radius: 100px;
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    z-index: 3;
}

.xbadge-navy {
    background: rgba(255, 255, 255, .12);
    color: rgba(255, 255, 255, .85);
    border: 1px solid rgba(255, 255, 255, .18);
}

.xbadge-amber {
    background: rgba(255, 255, 255, .12);
    color: rgba(255, 200, 100, .9);
    border: 1px solid rgba(255, 200, 100, .22);
}

.xbadge-teal {
    background: rgba(255, 255, 255, .12);
    color: rgba(100, 240, 220, .9);
    border: 1px solid rgba(100, 240, 220, .22);
}

/* Icon wrapper */
.xcard-icon-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    z-index: 2;
}

.xicon-ring {
    position: absolute;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, .18);
    animation: spinRing 8s linear infinite;
}

.xcard-icon-wrap .xicon-ring:first-child {
    width: 72px;
    height: 72px;
}

.xicon-ring2 {
    width: 90px;
    height: 90px;
    border-color: rgba(255, 255, 255, .08);
    animation-direction: reverse;
    animation-duration: 12s;
}

.xring-amber {
    border-color: rgba(251, 191, 36, .3);
}

.xring-amber.xicon-ring2 {
    border-color: rgba(251, 191, 36, .12);
}

.xring-teal {
    border-color: rgba(45, 212, 191, .3);
}

.xring-teal.xicon-ring2 {
    border-color: rgba(45, 212, 191, .12);
}

@keyframes spinRing {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.xbig-icon {
    position: relative;
    z-index: 2;
    font-size: 2rem;
    color: rgba(255, 255, 255, .92);
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, .25));
}

.xpanel-amber .xbig-icon {
    color: rgba(253, 224, 110, .95);
    filter: drop-shadow(0 0 10px rgba(251, 191, 36, .4));
}

.xpanel-teal .xbig-icon {
    color: rgba(110, 245, 230, .95);
    filter: drop-shadow(0 0 10px rgba(45, 212, 191, .4));
}

/* Meta strip */
.xcard-meta-strip {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    z-index: 2;
}

.xcard-meta-strip>span {
    font-size: .7rem;
    font-weight: 600;
    color: rgba(255, 255, 255, .6);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.xdot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .25);
}

.xdiff {
    padding: 3px 10px;
    border-radius: 100px;
    font-size: .65rem !important;
    font-weight: 700 !important;
}

.xdiff-easy {
    background: rgba(34, 197, 94, .2);
    color: rgba(134, 239, 172, .9) !important;
}

.xdiff-mid {
    background: rgba(251, 191, 36, .2);
    color: rgba(253, 224, 110, .9) !important;
}

.xdiff-hard {
    background: rgba(239, 68, 68, .2);
    color: rgba(252, 165, 165, .9) !important;
}

/* ── CARD BODY ── */
.xcard-body {
    padding: 20px 22px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.xtags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.xtag {
    display: inline-flex;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: .68rem;
    font-weight: 700;
    background: rgba(33, 40, 66, .06);
    color: rgba(33, 40, 66, .6);
    letter-spacing: .4px;
}

.xcard-title {
    font-size: 1rem;
    font-weight: 800;
    color: #212842;
    line-height: 1.35;
    letter-spacing: -.3px;
}

.xcard-desc {
    font-size: .82rem;
    color: rgba(33, 40, 66, .52);
    line-height: 1.65;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Progress row */
.xprogress-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 2px;
}

.xprogress-track {
    flex: 1;
    height: 5px;
    border-radius: 100px;
    background: rgba(33, 40, 66, .08);
    overflow: hidden;
}

.xprogress-fill {
    height: 100%;
    border-radius: 100px;
}

.xfill-navy {
    background: linear-gradient(90deg, #212842, #2f3d60);
}

.xfill-amber {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.xfill-teal {
    background: linear-gradient(90deg, #14b8a6, #2dd4bf);
}

.xprogress-label {
    font-size: .7rem;
    font-weight: 600;
    color: rgba(33, 40, 66, .38);
    white-space: nowrap;
}

/* ── CARD FOOTER ── */
.xcard-footer {
    padding: 14px 22px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-top: 1px solid rgba(33, 40, 66, .06);
}

.xauthor-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.xavatar {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .68rem;
    font-weight: 800;
    flex-shrink: 0;
}

.xav-navy {
    background: linear-gradient(135deg, #212842, #2f3d60);
    color: #fff;
}

.xav-amber {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    color: #fff;
}

.xav-teal {
    background: linear-gradient(135deg, #14b8a6, #2dd4bf);
    color: #fff;
}

.xauthor-name {
    font-size: .78rem;
    font-weight: 700;
    color: #212842;
}

.xbtn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: 100px;
    font-size: .8rem;
    font-weight: 700;
    text-decoration: none;
    font-family: inherit;
    border: none;
    cursor: pointer;
    transition: all .25s ease;
    white-space: nowrap;
}

.xbtn-navy {
    background: linear-gradient(135deg, #212842, #2f3d60);
    color: #fff;
    box-shadow: 0 4px 14px rgba(33, 40, 66, .28);
}

.xbtn-amber {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    color: #fff;
    box-shadow: 0 4px 14px rgba(245, 158, 11, .35);
}

.xbtn-teal {
    background: linear-gradient(135deg, #14b8a6, #2dd4bf);
    color: #fff;
    box-shadow: 0 4px 14px rgba(20, 184, 166, .35);
}

.xbtn:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 900px) {
    .exams-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 580px) {
    .exams-grid {
        grid-template-columns: 1fr;
    }
}