/* ============================================================
   SUBJECT PAGE — Quick Actions + Units + Chapter Cards
   Usage: Subjects/English, Subjects/Hindi... /index.php
   ============================================================ */

/* ============ QUICK ACTIONS ============ */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 26px;
}

.qa-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 16px;
    text-decoration: none;
    color: #0f172a;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(15,23,42,0.04);
}

.qa-card:hover {
    transform: translateY(-2px);
    border-color: #1e40af;
    box-shadow: 0 8px 18px rgba(30,64,175,0.10);
}

.qa-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.qa-icon.notes     { background: #eff6ff; }
.qa-icon.questions { background: #fef3c7; }
.qa-icon.grammar   { background: #f0fdf4; }
.qa-icon.pdf       { background: #fef2f2; }

.qa-info { flex: 1; min-width: 0; }

.qa-title {
    font-size: 13.5px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 2px;
    display: block;
}

.qa-sub {
    font-size: 11px;
    color: #64748b;
    margin: 0;
    font-weight: 500;
}

.qa-arrow {
    font-size: 16px;
    color: #cbd5e1;
    transition: 0.2s;
}

.qa-card:hover .qa-arrow {
    color: #1e40af;
    transform: translateX(3px);
}

/* ============ UNIT SECTIONS ============ */
.unit-section {
    margin-bottom: 30px;
}

.unit-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-radius: 12px;
    border-left: 5px solid #2563eb;
    margin-bottom: 16px;
}

.unit-header.unit2 { border-left-color: #10b981; }
.unit-header.unit3 { border-left-color: #f59e0b; }
.unit-header.unit4 { border-left-color: #8b5cf6; }
.unit-header.unit5 { border-left-color: #ef4444; }

.unit-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    background: #fff;
    border: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.unit-text h3 {
    font-size: 16px;
    font-weight: 900;
    color: #0f172a;
    margin: 0 0 3px;
}

.unit-text p {
    font-size: 12.5px;
    color: #64748b;
    margin: 0;
    font-weight: 500;
}

/* ============ CHAPTER CARDS ============ */
.chapter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 12px;
}

.chapter-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    text-decoration: none;
    color: #0f172a;
    transition: all 0.25s ease;
    box-shadow: 0 1px 3px rgba(15,23,42,0.04);
    position: relative;
    overflow: hidden;
}

.chapter-card::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: #2563eb;
    transform: scaleY(0);
    transition: transform 0.25s ease;
}

.chapter-card:hover {
    transform: translateY(-3px);
    border-color: #2563eb;
    box-shadow: 0 10px 24px rgba(37,99,235,0.12);
}

.chapter-card:hover::before {
    transform: scaleY(1);
}

.chapter-num {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    font-weight: 900;
    flex-shrink: 0;
    line-height: 1;
}

.chapter-num.unit2 { background: linear-gradient(135deg, #34d399, #10b981); }
.chapter-num.unit3 { background: linear-gradient(135deg, #fbbf24, #f59e0b); }
.chapter-num.unit4 { background: linear-gradient(135deg, #a78bfa, #8b5cf6); }
.chapter-num.unit5 { background: linear-gradient(135deg, #f87171, #ef4444); }

.chapter-info { flex: 1; min-width: 0; }

.chapter-title {
    font-size: 14.5px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 5px;
    line-height: 1.4;
}

.chapter-tags {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.chapter-tag {
    display: inline-block;
    padding: 2px 8px;
    background: #eff6ff;
    color: #1e40af;
    border-radius: 50px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.chapter-tag.unit2 { background: #ecfdf5; color: #10b981; }
.chapter-tag.unit3 { background: #fffbeb; color: #d97706; }
.chapter-tag.unit4 { background: #f5f3ff; color: #8b5cf6; }
.chapter-tag.unit5 { background: #fef2f2; color: #ef4444; }

/* ============ RESPONSIVE ============ */
@media (max-width: 600px) {
    .quick-actions { grid-template-columns: 1fr 1fr; gap: 8px; }
    .qa-card { padding: 10px 12px; gap: 8px; }
    .qa-icon { width: 36px; height: 36px; font-size: 17px; }
    .qa-title { font-size: 12px; }
    .qa-sub { font-size: 10px; }

    .chapter-grid { grid-template-columns: 1fr; gap: 10px; }
    .chapter-card { padding: 12px; gap: 12px; }
    .chapter-num { width: 40px; height: 40px; font-size: 15px; }
    .chapter-title { font-size: 13.5px; }

    .unit-header { padding: 12px 14px; }
    .unit-icon { width: 40px; height: 40px; font-size: 18px; }
    .unit-text h3 { font-size: 14px; }
    .unit-text p { font-size: 11px; }
}