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

/* ═══════════════════════════════════════════════════════
   PRACTICE BOOKS PAGE — BFA Ground Class
   Responsive: Mobile / Tablet / Desktop
═══════════════════════════════════════════════════════ */

.practice-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #f0f4ff;
    font-family: 'Outfit', sans-serif;
    isolation: auto;
}

/* ════════════════════════════════════════
   HEADER BANNER
════════════════════════════════════════ */
.practice-header {
    position: relative;
    padding: 36px 40px 30px;
    background: #ffffff;
    border-bottom: 1px solid #e8edf5;
    overflow: hidden;
    z-index: 0; 
}

/* Left accent bar */
.practice-header::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #4f5fe0 0%, #818cf8 100%);
}

/* Dot grid texture */
.practice-header::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, #6366f112 1px, transparent 1px);
    background-size: 22px 22px;
    pointer-events: none;
}

.practice-header-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 18px;
}

.practice-header-icon {
    width: 52px; height: 52px;
    border-radius: 14px;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    display: flex; align-items: center; justify-content: center;
    font-size: 26px; flex-shrink: 0;
}

.practice-header-text { flex: 1; }

.practice-breadcrumb {
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #4f5fe0;
    font-weight: 600;
    margin-bottom: 5px;
    display: flex; align-items: center; gap: 6px;
}

.practice-breadcrumb a {
    color: #94a3b8; text-decoration: none;
    transition: color 0.15s;
}
.practice-breadcrumb a:hover { color: #4f5fe0; }
.practice-breadcrumb-sep { color: #cbd5e1; font-size: 13px; }

.practice-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 28px; color: #0f172a;
    line-height: 1.1; margin: 0 0 4px;
    text-transform: capitalize;
}

.practice-header p {
    font-size: 13.5px; color: #64748b; margin: 0;
}

/* ════════════════════════════════════════
   BOOKS SECTION
════════════════════════════════════════ */
.books-section {
    padding: 32px 40px 40px;
    flex: 1;
}

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

/* ════════════════════════════════════════
   BOOKS GRID — desktop
════════════════════════════════════════ */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    max-width: 860px;
}

/* ════════════════════════════════════════
   BOOK CARD
════════════════════════════════════════ */
.books-card {
    position: relative;
    display: flex; flex-direction: column;
    justify-content: space-between;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 22px 22px 18px;
    text-decoration: none; color: #1e293b;
    overflow: hidden;
    transition: transform 0.25s cubic-bezier(.22,.68,0,1.3),
                box-shadow 0.25s ease, border-color 0.2s;
    animation: bkFadeUp 0.45s ease both;
    min-height: 120px;
}

.books-card::before {
    content: ''; position: absolute;
    top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, #4f5fe0, #818cf8);
    border-radius: 14px 14px 0 0;
}

.books-card::after {
    content: ''; position: absolute;
    bottom: -20px; right: -20px;
    width: 100px; height: 100px;
    background: radial-gradient(circle, #eef2ff 0%, transparent 70%);
    pointer-events: none;
}

@media (hover: hover) {
    .books-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 32px rgba(79,95,224,0.14);
        border-color: #a5b4fc;
    }
}

.books-card:active { transform: scale(0.98); }

.books-card-icon {
    font-size: 28px; margin-bottom: 12px;
    display: block; line-height: 1;
}

.books-card-title {
    font-size: 15px; font-weight: 600;
    color: #1e293b; letter-spacing: -0.01em;
    line-height: 1.3; margin-bottom: 6px;
}

.books-card-sub {
    font-size: 12px; color: #64748b;
    font-weight: 400; line-height: 1.4;
}

.books-card-footer {
    display: flex; align-items: center;
    justify-content: space-between;
    margin-top: 16px; padding-top: 14px;
    border-top: 1px solid #f1f5f9;
}

.books-card-cta {
    display: flex; align-items: center; gap: 5px;
    font-size: 12px; font-weight: 600;
    color: #4f5fe0; letter-spacing: 0.02em;
}

.books-card-arrow {
    width: 26px; height: 26px; border-radius: 50%;
    background: #eef2ff;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s, transform 0.2s;
}

.books-card-arrow svg {
    width: 12px; height: 12px;
    stroke: #4f5fe0; stroke-width: 2.5;
    stroke-linecap: round; stroke-linejoin: round; fill: none;
}

@media (hover: hover) {
    .books-card:hover .books-card-arrow {
        background: #4f5fe0; transform: translateX(2px);
    }
    .books-card:hover .books-card-arrow svg { stroke: #fff; }
}

/* ════════════════════════════════════════
   TABLET  640px – 1023px
   Fixed 2-col instead of auto-fill
════════════════════════════════════════ */
@media (max-width: 1023px) {
    .practice-header  { padding: 26px 24px 22px; }
    .practice-header h1 { font-size: 24px; }
    .books-section    { padding: 24px 24px 36px; }

    /* ✅ Fixed 2-col — prevents 3-col on narrow tablet */
    .books-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 100%;
    }
}

/* ════════════════════════════════════════
   MOBILE  < 640px
   Topbar = 58px fixed — clear it properly
════════════════════════════════════════ */
@media (max-width: 639px) {
    /* Practice-page has a white header banner (not a full-bleed hero)
       Use padding-top on the container — shows page bg colour above header
       which is #f0f4ff matching the page bg — invisible and correct */
    /* Clear fixed 58px topbar */
    .dashboard-content {
        padding-top: 58px !important;
        margin-left: 0 !important;
    }

    .practice-header {
        margin-top: 58px;
        padding: 18px 16px 16px;
    }

    .practice-header::before { width: 3px; }

    .practice-header-inner { gap: 12px; }

    .practice-header-icon {
        width: 42px; height: 42px;
        font-size: 20px; border-radius: 10px;
    }

    .practice-header h1 { font-size: 20px; }
    .practice-header p  { font-size: 12.5px; }

    .books-section { padding: 16px 14px 28px; }

    /* ✅ Single column on mobile */
    .books-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        max-width: 100%;
    }

    .books-card {
        padding: 18px 18px 14px;
        border-radius: 12px;
        min-height: 100px;
    }

    .books-card-icon  { font-size: 24px; margin-bottom: 10px; }
    .books-card-title { font-size: 14px; }
}

/* Small phones < 380px */
@media (max-width: 379px) {
    .practice-header h1  { font-size: 18px; }
    .books-card          { padding: 16px 14px 12px; }
    .books-card-title    { font-size: 13px; }
}

/* ── Entry animation ── */
@keyframes bkFadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}