@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Playfair+Display:wght@700&display=swap');

/* ═══════════════════════════════════════════════════════
   PRACTICE PAGE — BFA Ground Class
   Globe hero + subject cards
   Desktop: auto-fill minmax(185px)
   Tablet:  2 columns
   Mobile:  1 column stacked
═══════════════════════════════════════════════════════ */

.practice-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #eef2ff;
    font-family: 'Outfit', sans-serif;
    isolation: auto; /* prevent stacking context trapping fixed sidebar */
}

/* ════════════════════════════════════════
   HERO BANNER
════════════════════════════════════════ */
.practice-hero {
    position: relative;
    height: 260px;
    overflow: hidden;
    background: linear-gradient(160deg, #1e3a8a 0%, #1d4ed8 40%, #3b82f6 70%, #7dd3fc 100%);
    flex-shrink: 0;
    z-index: 0; /* keep below fixed sidebar */
}

#starsCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#globeCanvas {
    position: absolute;
    right: -30px;
    bottom: -40px;
    z-index: 2;
    opacity: 0.92;
}

.practice-hero-text {
    position: absolute;
    left: 44px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
}

.practice-eyebrow {
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #93c5fd;
    font-weight: 600;
    margin-bottom: 8px;
    font-family: 'Outfit', sans-serif;
}

.practice-hero-text h1 {
    font-family: 'Playfair Display', serif;
    font-size: 34px;
    color: #ffffff;
    line-height: 1.1;
    margin-bottom: 8px;
    text-shadow: 0 2px 20px rgba(0,0,0,0.2);
}

.practice-hero-text p {
    font-size: 14px;
    color: #bfdbfe;
    font-weight: 400;
    margin-bottom: 0;
}

/* ── CLOUD STRIP ── */
.practice-clouds {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 40px; z-index: 4; overflow: hidden;
}

.practice-cloud {
    position: absolute;
    bottom: 0;
    background: #eef2ff;
    border-radius: 50% 50% 0 0;
}

.pc1 { width: 200px; height: 35px; left: -5%;  animation: cloudDrift 18s linear infinite; }
.pc2 { width: 140px; height: 25px; left: 15%;  animation: cloudDrift 24s -8s linear infinite; }
.pc3 { width: 180px; height: 30px; left: 35%;  animation: cloudDrift 20s -4s linear infinite; }
.pc4 { width: 120px; height: 22px; left: 58%;  animation: cloudDrift 22s -12s linear infinite; }
.pc5 { width: 160px; height: 28px; left: 78%;  animation: cloudDrift 17s -6s linear infinite; }

@keyframes cloudDrift {
    0%,  100% { transform: translateX(0); }
    50%        { transform: translateX(15px); }
}

/* ════════════════════════════════════════
   CONTENT AREA
════════════════════════════════════════ */
.practice-content {
    padding: 28px 36px 40px;
    flex: 1;
}

.subjects-section h2 {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 18px;
    font-family: 'Outfit', sans-serif;
    animation: prFadeUp 0.6s 0.1s ease both;
}

/* ════════════════════════════════════════
   SUBJECTS GRID — desktop auto-fill
════════════════════════════════════════ */
.subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
    gap: 16px;
}

/* ════════════════════════════════════════
   SUBJECT CARD
════════════════════════════════════════ */
.subject-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    height: 145px;
    border-radius: 16px;
    text-decoration: none;
    padding: 18px 18px 16px;
    overflow: hidden;
    border: 1px solid transparent;
    transition: transform 0.3s cubic-bezier(.22,.68,0,1.4),
                box-shadow 0.3s ease,
                border-color 0.2s;
    animation: prFadeUp 0.55s ease both;
    font-family: 'Outfit', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

.hidden{
    display:none !important;
}

.subject-card:nth-child(1) { animation-delay: 0.15s; }
.subject-card:nth-child(2) { animation-delay: 0.22s; }
.subject-card:nth-child(3) { animation-delay: 0.29s; }
.subject-card:nth-child(4) { animation-delay: 0.36s; }
.subject-card:nth-child(5) { animation-delay: 0.43s; }
.subject-card:nth-child(6) { animation-delay: 0.50s; }
.subject-card:nth-child(7) { animation-delay: 0.57s; }

/* Colour themes */
.sc-met  { background: linear-gradient(145deg, #dbeafe, #eff6ff); }
.sc-reg  { background: linear-gradient(145deg, #fce7f3, #fff1f5); }
.sc-nav  { background: linear-gradient(145deg, #d1fae5, #f0fdf4); }
.sc-rnav { background: linear-gradient(145deg, #e0e7ff, #f0f4ff); }
.sc-ins  { background: linear-gradient(145deg, #fed7aa, #fff7ed); }
.sc-per  { background: linear-gradient(145deg, #fef9c3, #fffde7); }
.sc-tec  { background: linear-gradient(145deg, #cffafe, #f0fdfe); }

@media (hover: hover) {
    .subject-card:hover {
        transform: translateY(-6px) scale(1.025);
        box-shadow: 0 16px 40px rgba(0,0,0,0.13);
    }
    .sc-met:hover  { border-color: #93c5fd; }
    .sc-reg:hover  { border-color: #f9a8d4; }
    .sc-nav:hover  { border-color: #6ee7b7; }
    .sc-rnav:hover { border-color: #a5b4fc; }
    .sc-ins:hover  { border-color: #fdba74; }
    .sc-per:hover  { border-color: #fde047; }
    .sc-tec:hover  { border-color: #67e8f9; }
    .subject-card:hover .sc-icon  { transform: rotate(-8deg) scale(1.15); }
    .subject-card:hover .sc-arrow { opacity: 1; transform: translateX(0); }
    .subject-card:hover::before   { transform: translateX(100%); transition: transform 0.5s ease; }
}

.subject-card:active {
    transform: scale(0.97);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.subject-card::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.5) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0s;
    pointer-events: none;
}

.sc-icon {
    position: absolute;
    top: 13px; right: 13px;
    width: 42px; height: 42px;
    border-radius: 11px;
    display: flex; align-items: center; justify-content: center;
    font-size: 21px;

    transition: transform 0.3s cubic-bezier(.22,.68,0,1.4);
}


.sc-met .sc-icon  { background: rgba(191,219,254,0.55); }
.sc-reg .sc-icon  { background: rgba(251,207,232,0.55); }
.sc-nav .sc-icon  { background: rgba(167,243,208,0.55); }
.sc-rnav .sc-icon { background: rgba(199,210,254,0.55); }
.sc-ins .sc-icon  { background: rgba(254,215,170,0.55); }
.sc-per .sc-icon  { background: rgba(253,230,138,0.55); }
.sc-tec .sc-icon  { background: rgba(165,243,252,0.55); }

.sc-badge {
    font-size: 9.5px; font-weight: 600;
    letter-spacing: 0.1em; text-transform: uppercase;
    padding: 3px 7px; border-radius: 5px;
    margin-bottom: 5px; display: inline-block;
}

.sc-met .sc-badge  { background: #dbeafe; color: #1d4ed8; }
.sc-reg .sc-badge  { background: #fce7f3; color: #be185d; }
.sc-nav .sc-badge  { background: #d1fae5; color: #065f46; }
.sc-rnav .sc-badge { background: #e0e7ff; color: #3730a3; }
.sc-ins .sc-badge  { background: #ffedd5; color: #9a3412; }
.sc-per .sc-badge  { background: #fef9c3; color: #854d0e; }
.sc-tec .sc-badge  { background: #cffafe; color: #0e7490; }

.sc-title {
    font-size: 14px; font-weight: 600;
    color: #0f172a; line-height: 1.25;
    letter-spacing: -0.01em; display: block;
}

.sc-arrow {
    position: absolute;
    bottom: 14px; right: 14px;
    width: 26px; height: 26px;
    border-radius: 50%;
    background: rgba(255,255,255,0.85);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transform: translateX(-4px);
    transition: opacity 0.2s, transform 0.2s;
}

.sc-arrow svg {
    width: 12px; height: 12px;
    stroke: #0f172a; stroke-width: 2.5;
    stroke-linecap: round; stroke-linejoin: round; fill: none;
}

/* ════════════════════════════════════════
   TABLET  640px – 1023px
   Exactly 2 columns — prevents auto-fill
   giving 3 narrow cards
════════════════════════════════════════ */
@media (max-width: 1023px) {
    .practice-hero       { height: 220px; }
    .practice-hero-text  { left: 28px; }
    .practice-hero-text h1 { font-size: 28px; }

    #globeCanvas {
        width: 240px; height: 240px;
        right: -20px; bottom: -30px;
    }

    .practice-content { padding: 24px 24px 36px; }

    /* ✅ Fixed 2-column on tablet */
    .subjects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .subject-card { height: 140px; }
}

/* ════════════════════════════════════════
   MOBILE  < 640px
   Single column — one card per row
════════════════════════════════════════ */
@media (max-width: 639px) {
    /* Clear the fixed 58px topbar — use margin on hero so no gap above it */
    .practice-page.dashboard-content {
        padding-top: 0 !important;
    }
    .practice-hero {
        margin-top: 58px;
        height: 180px;
    }
    .practice-hero-text  { left: 20px; right: 20px; }
    .practice-hero-text h1 { font-size: 22px; }
    .practice-hero-text p  { font-size: 13px; }
    .practice-eyebrow      { font-size: 10px; }

    #globeCanvas {
        width: 150px; height: 150px;
        right: -10px; bottom: -15px;
        opacity: 0.45;
    }

    .practice-content { padding: 18px 14px 32px; }
    .subjects-section h2 { margin-bottom: 12px; }

    /* ✅ Single column — cards stack vertically */
    .subjects-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    /* Card row — no icon, just badge + title + arrow */
    .subject-card {
        height: auto;
        min-height: 60px;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        padding: 14px 16px;
        border-radius: 12px;
        gap: 10px;
    }

    /* Hide icon on mobile */
    .sc-icon { display: none !important; }

    /* Text block */
    .sc-card-text {
        display: flex !important;
        flex-direction: column !important;
        gap: 4px !important;
        flex: 1 !important;
        min-width: 0 !important;
        overflow: hidden !important;
    }

    .sc-badge {
        font-size: 9px !important;
        padding: 2px 6px !important;
        margin-bottom: 0 !important;
        display: inline-block !important;
    }

    .sc-title {
        font-size: 13.5px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        display: block !important;
    }

    /* Arrow — visible on mobile */
    .sc-arrow {
        position: relative !important;
        bottom: auto !important;
        right: auto !important;
        opacity: 1 !important;
        transform: none !important;
        width: 26px !important;
        height: 26px !important;
        flex-shrink: 0 !important;
        background: rgba(255,255,255,0.7) !important;
    }

    /* Cloud strip — fewer clouds */
    .pc1, .pc3, .pc5 { display: none; }
    .pc2 { left: 5%; }
    .pc4 { left: 55%; }
}

/* Small phones < 380px */
@media (max-width: 379px) {
    .practice-hero-text h1 { font-size: 20px; }
    .subject-card { min-height: 66px; padding: 12px 14px; }
    .sc-icon { width: 38px; height: 38px; font-size: 19px; }
}

@keyframes prFadeUp {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: translateY(0); }
}