
/* Page Layout */
.wiki-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-4) var(--spacing-4) var(--spacing-16) var(--spacing-4);
}

/* Hero Section override for Vanilla CSS */
.student-hero {
    position: relative;
    background: linear-gradient(135deg, #4f46e5, #ec4899);
    color: white;
    padding: var(--spacing-16) var(--spacing-6);
    border-radius: var(--radius-2xl);
    text-align: center;
    overflow: hidden;
    margin-bottom: var(--spacing-12);
    box-shadow: var(--shadow-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-shapes i {
    position: absolute;
    opacity: 0.08;
    pointer-events: none;
}

.student-hero-title {
    font-size: 2.75rem;
    font-weight: 800;
    margin-bottom: var(--spacing-2);
    letter-spacing: -0.025em;
    color: white;
}

.student-hero-desc {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin: 0 auto;
    font-weight: 400;
}

/* Continue Learning Section */
.continue-learning-section {
    margin-bottom: var(--spacing-8);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: var(--spacing-4);
    color: var(--color-text-main);
}

.continue-learning-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-4);
}

.continue-card {
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--spacing-4);
    display: flex;
    align-items: center;
    gap: var(--spacing-4);
    text-decoration: none;
    color: var(--color-text-main);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.continue-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-primary);
}

.continue-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    background: rgba(79, 70, 229, 0.1);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.continue-info h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
}

.continue-info p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

/* Documents Hub Banner */
.documents-hub-banner {
    margin-bottom: var(--spacing-8);
    padding: var(--spacing-6);
    border-radius: var(--radius-2xl);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-4);
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.05), rgba(236, 72, 153, 0.05));
    border: 1px solid var(--color-border);
}

@media (min-width: 640px) {
    .documents-hub-banner {
        flex-direction: row;
    }
}

/* Gateway Grid Layout */
.subject-gateway-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: var(--spacing-8);
}

@media (min-width: 768px) {
    .subject-gateway-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Subject Card */
.subject-card {
    background-color: var(--color-bg-surface);
    border-radius: var(--radius-2xl);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.subject-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Gradient Headers */
.subject-card-header {
    padding: var(--spacing-6);
    color: white;
    display: flex;
    align-items: center;
    gap: var(--spacing-4);
    position: relative;
}

.subject-card-header::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.15), transparent);
    pointer-events: none;
}

.subject-card-header.math { background: linear-gradient(135deg, #6366f1, #4f46e5); }
.subject-card-header.ela { background: linear-gradient(135deg, #10b981, #059669); }
.subject-card-header.science { background: linear-gradient(135deg, #ef4444, #dc2626); }
.subject-card-header.social { background: linear-gradient(135deg, #f59e0b, #d97706); }

.subject-header-icon {
    font-size: 2.25rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}

.subject-header-info {
    display: flex;
    flex-direction: column;
}

.subject-card-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.subject-card-subtitle {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
}

/* Subject Body Content */
.subject-card-body {
    padding: var(--spacing-6);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-6);
}

/* Sub-page Links Grid */
.links-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--spacing-3);
}

.subpage-link-btn {
    padding: var(--spacing-4) var(--spacing-3);
    background-color: var(--color-bg-base);
    color: var(--color-text-main);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-2);
    text-align: center;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.subpage-link-btn i {
    font-size: 1.25rem;
    color: var(--color-primary);
    transition: transform 0.2s ease;
}

/* Custom icon colors per subject */
.subject-card.math-card .subpage-link-btn i { color: #4f46e5; }
.subject-card.ela-card .subpage-link-btn i { color: #059669; }
.subject-card.science-card .subpage-link-btn i { color: #dc2626; }
.subject-card.social-card .subpage-link-btn i { color: #d97706; }

.subpage-link-btn:hover {
    background-color: var(--color-bg-surface);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.subject-card.math-card .subpage-link-btn:hover { border-color: #4f46e5; color: #4f46e5; }
.subject-card.ela-card .subpage-link-btn:hover { border-color: #059669; color: #059669; }
.subject-card.science-card .subpage-link-btn:hover { border-color: #dc2626; color: #dc2626; }
.subject-card.social-card .subpage-link-btn:hover { border-color: #d97706; color: #d97706; }

.subpage-link-btn:hover i {
    transform: scale(1.1);
}

/* Accordion Drawer Toggle */
.drawer-toggle-btn {
    width: 100%;
    padding: 0.625rem;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    background-color: var(--color-bg-base);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    margin-top: auto;
}

.drawer-toggle-btn:hover {
    background-color: var(--color-border);
    color: var(--color-text-main);
}

.drawer-toggle-btn i {
    transition: transform 0.25s ease;
}

.drawer-toggle-btn.active i {
    transform: rotate(180deg);
}

/* Expandable Drawer */
.drawer-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-4);
}

.drawer-content.active {
    max-height: 500px; /* Big enough to contain content */
    opacity: 1;
    overflow-y: auto;
}

/* Callout Blocks inside Drawer */
.drawer-callout {
    background-color: var(--color-bg-base);
    border-left: 3px solid var(--color-primary);
    padding: var(--spacing-3) var(--spacing-4);
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}

.subject-card.math-card .drawer-callout { border-color: #4f46e5; }
.subject-card.ela-card .drawer-callout { border-color: #059669; }
.subject-card.science-card .drawer-callout { border-color: #dc2626; }
.subject-card.social-card .drawer-callout { border-color: #d97706; }

.callout-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    margin-bottom: 0.25rem;
}

.callout-body {
    font-size: 0.9rem;
    color: var(--color-text-main);
    line-height: 1.5;
    margin: 0;
}

.formula-list, .tips-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.formula-list li, .tips-list li {
    font-size: 0.85rem;
    line-height: 1.4;
}

/* Drawer Links */
.drawer-links-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    margin: 0 0 0.5rem 0;
}

.external-links-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.external-links-list li {
    font-size: 0.875rem;
    line-height: 1.4;
}

.external-links-list a {
    color: var(--color-primary);
    text-decoration: underline;
    font-weight: 600;
    transition: opacity 0.2s;
}

.external-links-list a:hover {
    opacity: 0.8;
}

.subject-card.math-card .external-links-list a { color: #4f46e5; }
.subject-card.ela-card .external-links-list a { color: #059669; }
.subject-card.science-card .external-links-list a { color: #dc2626; }
.subject-card.social-card .external-links-list a { color: #d97706; }

/* Admin Notice Banner */
.admin-notice-banner {
    position: fixed;
    bottom: var(--spacing-6);
    right: var(--spacing-6);
    z-index: 1000;
    max-width: 400px;
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-left: 5px solid var(--color-warning, #f59e0b);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    padding: var(--spacing-4);
    display: flex;
    gap: var(--spacing-4);
    align-items: flex-start;
    animation: banner-slide-in 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: all 0.3s ease;
}

.admin-notice-banner.hiding {
    animation: banner-slide-out 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes banner-slide-in {
    from {
        transform: translateY(100px) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes banner-slide-out {
    from {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    to {
        transform: translateY(100px) scale(0.9);
        opacity: 0;
    }
}

.banner-icon-container {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--color-warning, #f59e0b);
    padding: var(--spacing-2);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.banner-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-1);
}

.banner-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0;
    color: var(--color-text-main);
}

.banner-text {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    line-height: 1.4;
    margin: 0;
}

.banner-close-btn {
    color: var(--color-text-muted);
    cursor: pointer;
    font-size: 0.875rem;
    transition: color 0.2s ease;
    padding: 0.25rem;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner-close-btn:hover {
    color: var(--color-text-main);
    background-color: var(--color-border);
}

/* Adjust layout on small screens */
@media (max-width: 640px) {
    .admin-notice-banner {
        left: var(--spacing-4);
        right: var(--spacing-4);
        bottom: var(--spacing-4);
        max-width: none;
    }
}

