/* ==========================================
   RAYS OF KNOWLEDGE - GLOBAL STYLESHEET
   Empowering Minds • Spreading Education
   ========================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Poppins:wght@400;500;600;700;800&display=swap');

:root {
    /* Color Palette */
    --primary: #003366;       /* Deep Navy Blue */
    --primary-light: #004080;
    --primary-dark: #002244;
    --accent: #F2A900;        /* Warm Golden Yellow */
    --accent-hover: #D89600;
    --bg-cream: #FAF7F2;       /* Creamy Off-White */
    --bg-white: #FFFFFF;
    --text-dark: #1E293B;      /* Slate 800 */
    --text-muted: #64748B;     /* Slate 500 */
    --text-light: #FFFFFF;
    
    /* Layout & Spacing */
    --container-width: 1200px;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 20px;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
    
    /* Fonts */
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Styles */
html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden !important;
    position: relative;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-cream);
    color: var(--text-dark);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.3;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

.text-center {
    text-align: center;
}

.section-padding {
    padding: 80px 0;
}

.section-title {
    font-size: 2.2rem;
    color: var(--primary);
    margin-bottom: 12px;
    text-transform: capitalize;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 48px auto;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: var(--border-radius);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    gap: 8px;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--text-light);
}

.btn-primary:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-accent {
    background-color: var(--accent);
    color: var(--primary-dark);
}

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

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background-color: var(--primary);
    color: var(--text-light);
    transform: translateY(-2px);
}

/* Header & Navigation */
header {
    background-color: var(--bg-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid rgba(0, 51, 102, 0.05);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    height: 55px;
    width: auto;
    border-radius: var(--border-radius-sm);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 0.5px;
}

.mobile-title {
    display: none;
}

.logo-tagline {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 1px;
    text-transform: uppercase;
    text-shadow: 0.5px 0.5px 1px rgba(0, 0, 0, 0.2);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-dark);
    position: relative;
    padding: 6px 0;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent);
    transition: var(--transition);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.nav-auth {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: var(--text-light);
    padding: 100px 0 80px 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(242, 169, 0, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
    align-items: center;
}

.hero-content h1 {
    font-size: 3.2rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 36px;
    max-width: 520px;
}

.hero-stats {
    display: flex;
    gap: 40px;
    margin-top: 48px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 24px;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
}

.stat-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

.hero-image-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
}

.hero-image-card {
    background: var(--bg-white);
    border-radius: var(--border-radius-lg);
    padding: 16px;
    box-shadow: var(--shadow-lg);
    transform: rotate(2deg);
    transition: var(--transition);
    max-width: 420px;
}

.hero-image-card:hover {
    transform: rotate(0) scale(1.02);
}

.hero-image-card img {
    border-radius: var(--border-radius);
    width: 100%;
}

.hero-badge {
    position: absolute;
    bottom: 20px;
    left: -20px;
    background: var(--accent);
    color: var(--primary-dark);
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-weight: 700;
    box-shadow: var(--shadow-md);
    transform: rotate(-3deg);
}

/* Course Explorer Section */
.courses-section {
    background-color: var(--bg-cream);
}

.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    background: var(--bg-white);
    padding: 16px 24px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 40px;
}

.filter-group {
    display: flex;
    gap: 12px;
    align-items: center;
}

.filter-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.filter-btn {
    padding: 8px 18px;
    border-radius: var(--border-radius-sm);
    background: var(--bg-cream);
    border: 1px solid rgba(0, 51, 102, 0.1);
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-btn.active {
    background-color: var(--primary);
    color: var(--text-light);
    border-color: var(--primary);
}

.search-input {
    padding: 10px 16px;
    border-radius: var(--border-radius-sm);
    border: 1px solid rgba(0, 51, 102, 0.1);
    outline: none;
    font-family: var(--font-body);
    font-size: 0.9rem;
    width: 250px;
    transition: var(--transition);
}

.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.1);
}

/* Course Cards Grid */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 32px;
}

.course-card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 51, 102, 0.04);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.course-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(0, 51, 102, 0.1);
}

.course-img-wrapper {
    position: relative;
    height: 180px;
    background-color: #e2e8f0;
    overflow: hidden;
}

.course-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.course-card:hover .course-img-wrapper img {
    transform: scale(1.05);
}

.course-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--primary);
    color: var(--text-light);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.course-medium {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--accent);
    color: var(--primary-dark);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
}

.course-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.course-title {
    font-size: 1.15rem;
    color: var(--primary);
    margin-bottom: 12px;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 3rem;
}

.course-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(0, 51, 102, 0.05);
    padding-bottom: 12px;
}

.course-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.course-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-dark);
}

.course-price-original {
    font-size: 0.9rem;
    text-decoration: line-through;
    color: var(--text-muted);
    margin-left: 6px;
}

/* Features / Counter Section */
.features-section {
    background-color: var(--bg-white);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 32px;
}

.feature-card {
    text-align: center;
    padding: 40px 24px;
    border-radius: var(--border-radius);
    background: var(--bg-cream);
    transition: var(--transition);
    border: 1px solid rgba(0, 51, 102, 0.02);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    background-color: var(--bg-white);
    border-color: rgba(242, 169, 0, 0.2);
}

.feature-icon-wrapper {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: rgba(242, 169, 0, 0.1);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px auto;
    font-size: 1.8rem;
    transition: var(--transition);
}

.feature-card:hover .feature-icon-wrapper {
    background-color: var(--primary);
    color: var(--bg-white);
}

.feature-title {
    font-size: 1.2rem;
    margin-bottom: 12px;
    color: var(--primary);
}

.feature-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Testimonials */
.testimonials-section {
    background-color: var(--bg-cream);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}

.testimonial-card {
    background: var(--bg-white);
    padding: 32px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    position: relative;
}

.testimonial-quote {
    color: var(--text-dark);
    font-style: italic;
    font-size: 0.95rem;
    margin-bottom: 24px;
}

.testimonial-user {
    display: flex;
    align-items: center;
    gap: 16px;
}

.testimonial-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary);
    color: var(--text-light);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.testimonial-name {
    font-weight: 600;
    color: var(--primary);
    font-size: 0.95rem;
}

.testimonial-role {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Footer Section */
footer {
    background-color: var(--primary-dark);
    color: var(--text-light);
    padding: 70px 0 30px 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 0.8fr 1.2fr;
    gap: 40px;
    margin-bottom: 48px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 48px;
}

.footer-column h4 {
    color: var(--accent);
    margin-bottom: 24px;
    font-size: 1.1rem;
}

.footer-about p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-top: 16px;
    margin-bottom: 20px;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--accent);
    padding-left: 4px;
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.footer-contact i {
    color: var(--accent);
    margin-top: 3px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    flex-wrap: wrap;
    gap: 20px;
}

/* ==========================================
   LOGIN / SIGNUP PAGE
   ========================================== */
.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-cream);
    padding: 24px;
}

.login-card {
    background: var(--bg-white);
    padding: 48px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 480px;
    border-top: 5px solid var(--primary);
}

.login-header {
    text-align: center;
    margin-bottom: 36px;
}

.login-header h2 {
    color: var(--primary);
    font-size: 1.8rem;
    margin-top: 12px;
}

.login-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-dark);
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--border-radius-sm);
    border: 1px solid rgba(0, 51, 102, 0.15);
    outline: none;
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.1);
}

.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    margin-bottom: 24px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
}

.forgot-password {
    color: var(--primary);
    font-weight: 600;
}

.forgot-password:hover {
    color: var(--accent);
}

.form-btn {
    width: 100%;
}

.signup-prompt {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 24px;
}

.signup-prompt a {
    color: var(--primary);
    font-weight: 700;
}

.signup-prompt a:hover {
    color: var(--accent);
}

/* ==========================================
   STUDENT DASHBOARD PAGE
   ========================================== */
.dashboard-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: calc(100vh - 80px);
}

.dashboard-sidebar {
    background: var(--primary-dark);
    color: var(--text-light);
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    transition: var(--transition);
    color: rgba(255, 255, 255, 0.7);
}

.sidebar-link:hover, .sidebar-link.active {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--text-light);
}

.sidebar-link.active {
    background-color: var(--accent);
    color: var(--primary-dark);
    font-weight: 700;
}

.dashboard-main {
    padding: 40px;
    background-color: var(--bg-cream);
    overflow-y: auto;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.welcome-text h2 {
    color: var(--primary);
    font-size: 1.8rem;
}

.welcome-text p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Course Player View */
.player-grid {
    display: grid;
    grid-template-columns: 1.5fr 0.9fr;
    gap: 32px;
    align-items: start;
}

.video-section {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    background: #000;
}

.video-container iframe, .video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-info-box {
    padding: 24px;
}

.video-title {
    font-size: 1.3rem;
    color: var(--primary);
    margin-bottom: 8px;
}

.video-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Tabs for Lecture / Materials */
.tab-headers {
    display: flex;
    border-bottom: 1px solid rgba(0, 51, 102, 0.08);
    margin-top: 16px;
}

.tab-btn {
    padding: 12px 24px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9rem;
    background: none;
    border: none;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    color: var(--text-muted);
    transition: var(--transition);
}

.tab-btn:hover {
    color: var(--primary);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--accent);
}

.tab-content {
    padding: 24px 0 0 0;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

/* PDF Material List */
.material-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.material-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-cream);
    padding: 16px;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
}

.material-item:hover {
    background: rgba(242, 169, 0, 0.05);
}

.material-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.material-icon {
    font-size: 1.4rem;
    color: #e11d48; /* Red for PDF */
}

.material-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.material-size {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Lecture Outline / Playlist */
.playlist-section {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.playlist-header {
    background: var(--primary);
    color: var(--text-light);
    padding: 20px 24px;
}

.playlist-header h3 {
    font-size: 1.1rem;
}

.playlist-items {
    max-height: 480px;
    overflow-y: auto;
}

.playlist-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(0, 51, 102, 0.05);
    cursor: pointer;
    transition: var(--transition);
}

.playlist-item:hover {
    background-color: rgba(242, 169, 0, 0.03);
}

.playlist-item.active {
    background-color: rgba(0, 51, 102, 0.04);
    border-left: 4px solid var(--accent);
}

.playlist-index {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
}

.playlist-info {
    flex-grow: 1;
}

.playlist-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
}

.playlist-item.active .playlist-title {
    color: var(--primary);
}

.playlist-duration {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.playlist-status {
    color: var(--primary-light);
    font-size: 1.1rem;
}



/* Responsive Breakpoints & Mobile Optimization */
@media (max-width: 1024px) {
    /* 1. Dashboard Mobile Flow */
    .dashboard-layout {
        display: flex;
        flex-direction: column;
    }
    
    .dashboard-sidebar {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        white-space: nowrap;
        padding: 10px 15px;
        gap: 12px;
        border-right: none;
        border-bottom: 1px solid rgba(0, 51, 102, 0.08);
        position: sticky;
        top: 70px;
        background: var(--primary);
        z-index: 99;
        width: 100%;
        border-radius: 0;
        box-shadow: var(--shadow-sm);
    }
    
    .dashboard-sidebar::-webkit-scrollbar {
        display: none; /* Hide scroll bar for premium aesthetics */
    }
    
    .sidebar-link {
        padding: 8px 16px;
        font-size: 0.8rem;
        border-radius: var(--border-radius-sm);
    }
    
    .sidebar-link.active {
        background-color: var(--accent);
        color: var(--text-dark);
        border-left: none;
    }
    
    .dashboard-sidebar hr {
        display: none; /* Hide separator line on horizontal scroll view */
    }

    /* 2. Admin Panel Mobile Flow */
    .admin-layout {
        display: flex;
        flex-direction: column;
    }
    
    .admin-sidebar {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        white-space: nowrap;
        padding: 10px 15px;
        gap: 10px;
        border-right: none;
        border-bottom: 1px solid rgba(0, 51, 102, 0.08);
        position: sticky;
        top: 70px;
        background: var(--bg-white);
        z-index: 99;
        width: 100%;
        box-shadow: var(--shadow-sm);
    }
    
    .admin-sidebar::-webkit-scrollbar {
        display: none;
    }
    
    .sidebar-item {
        padding: 8px 14px;
        font-size: 0.8rem;
        border-radius: var(--border-radius-sm);
    }
    
    .sidebar-item.active {
        background-color: var(--primary);
        color: var(--text-light);
        border-left: none;
    }
    
    .admin-panel {
        padding: 20px 15px;
    }
    
    .panel-grid {
        grid-template-columns: 1fr !important;
        gap: 24px;
    }

    .player-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    /* Make large database tables scrollable horizontally so they don't break page layout */
    .data-table {
        display: block;
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
    }
}

@media (max-width: 768px) {
    .desktop-title {
        display: none !important;
    }
    
    .mobile-title {
        display: block !important;
        font-size: 1.25rem;
        font-weight: 800;
        letter-spacing: 1px;
    }
    
    .logo-tagline {
        display: none !important;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        margin: 0 auto 24px auto;
        font-size: 0.95rem;
    }
    
    .hero-stats {
        justify-content: center;
        gap: 15px;
        flex-wrap: wrap;
    }
    
    .hero-image-wrapper {
        display: none; /* Hide illustrative image on mobile to save vertical space */
    }
    
    .nav-links {
        display: none; /* Responsive hamburger menu can be added later */
    }
    
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        padding: 12px 16px;
        max-width: 100%;
        box-sizing: border-box;
    }

    .filter-group {
        display: flex;
        flex-direction: row !important;
        overflow-x: auto !important;
        white-space: nowrap;
        width: 100%;
        gap: 8px;
        padding: 4px 0;
        -webkit-overflow-scrolling: touch;
    }
    
    .filter-group::-webkit-scrollbar {
        display: none; /* Hide scrollbar */
    }
    
    .filter-btn {
        flex-shrink: 0 !important;
        padding: 6px 14px;
        font-size: 0.8rem;
    }
    
    .search-input {
        width: 100%;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
        text-align: left;
    }
    
    .footer-contact li {
        justify-content: flex-start;
    }
    
    .courses-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 10px;
    }
}

/* Fallback Logo Icon Thin Primary Border */
#fallback-logo-icon, #login-fallback-icon, #dash-fallback-icon {
    border: 1px solid var(--primary) !important;
    background-color: var(--bg-white) !important;
    overflow: hidden;
    padding: 2px;
}

#fallback-logo-icon img, #login-fallback-icon img, #dash-fallback-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
}

