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

:root {
    /* Core Colors */
    --primary: #0f172a;
    /* Deep Ebony */
    --secondary: #3b82f6;
    /* Electric Blue */
    --accent: #22d3ee;
    /* Vivid Cyan */
    --success: #10b981;
    /* Emerald */
    --warning: #f59e0b;
    /* Amber */
    --error: #ef4444;
    /* Rose */

    /* Backgrounds & Text */
    --bg-main: #f8fafc;
    /* Light Slate */
    --bg-card: #ffffff;
    --text-main: #1e293b;
    /* Slate 800 */
    --text-muted: #64748b;
    /* Slate 500 */
    --text-white: #ffffff;

    /* UI Elements */
    --border: #e2e8f0;
    /* Slate 200 */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --glass: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.2);

    /* Transitions */
    --transition: cubic-bezier(0.4, 0, 0.2, 1);
    --speed: 0.3s;
}

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

input,
button,
select,
textarea {
    font-family: 'Inter', 'Noto Serif Bengali', sans-serif;
}

html,
body {
    height: 100%;
}

body {
    font-family: 'Inter', 'Noto Serif Bengali', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.25;
    color: var(--primary);
    margin-bottom: 1rem;
}

a {
    color: var(--secondary);
    text-decoration: none;
    transition: all var(--speed) var(--transition);
}

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

/* Header & Navigation */
header {
    background: var(--primary);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    color: var(--text-white);
    height: 80px;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

header nav {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.site-logo {
    height: 50px;
    border-radius: var(--radius-sm);
    transition: transform var(--speed) var(--transition);
}

.site-logo:hover {
    transform: scale(1.05);
}

.site-title {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    background: linear-gradient(to right, var(--accent), var(--secondary));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.main-nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.main-nav-links a {
    color: var(--text-white);
    padding: 0.5rem 1rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    opacity: 0.8;
}

.main-nav-links a:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}

.main-nav-links a.nav-btn {
    background: var(--secondary);
    color: var(--text-white);
    padding: 0.6rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    opacity: 1;
    box-shadow: 0 4px 14px 0 rgba(59, 130, 246, 0.39);
}

.main-nav-links a.nav-btn:hover {
    background: var(--accent);
    color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(34, 211, 238, 0.23);
}

.mobile-menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Global Sidebar Toggle Hide */
.mobile-sidebar-toggle {
    display: none;
    /* Hidden by default on desktop */
}

.sidebar-toggle {
    display: none;
}

#page-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
}

/* Page Layout for Sidebar */
.page-wrapper {
    display: flex;
    flex-grow: 1;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.admin-student-page .page-wrapper {
    max-width: 100%;
}

/* Sidebar */
.sidebar {
    width: 320px;
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    height: calc(100vh - 80px);
    position: sticky;
    top: 80px;
    padding: 2rem 1.5rem;
    transition: all var(--speed) var(--transition);
}

.sidebar-nav {
    flex-grow: 1;
    overflow-y: auto;
    /* Make main nav scrollable */
    overflow-x: hidden;
    /* Hide horizontal scrollbar if any */
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav ul li {
    margin-bottom: 0.5rem;
}

.sidebar-nav ul li a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1.2rem;
    color: var(--text-muted);
    border-radius: var(--radius-md);
    font-weight: 500;
    text-decoration: none;
    transition: all var(--speed) var(--transition);
}

.sidebar-nav ul li a i {
    width: 20px;
    font-size: 1.1rem;
}

.sidebar-nav ul li a:hover {
    background: rgba(59, 130, 246, 0.05);
    color: var(--secondary);
}

.sidebar-nav ul li a.active {
    background: var(--secondary);
    color: var(--text-white);
    box-shadow: var(--shadow-md);
}

/* Main Content Area */
.main-content,
main {
    flex-grow: 1;
    padding: 2rem;
    width: 100%;
    background-color: var(--bg-main);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    box-sizing: border-box;
    text-align: left;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

section {
    padding: 5rem 0;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-main);
    font-size: 0.9rem;
}

form input[type="text"],
form input[type="password"],
form input[type="date"],
form input[type="email"],
form select,
form textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    color: var(--text-main);
    transition: all var(--speed) var(--transition);
    font-size: 1rem;
    font-family: inherit;
}

form input:focus,
form select:focus,
form textarea:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

form input[type="submit"],
.btn-submit {
    background: var(--secondary);
    color: var(--text-white);
    padding: 0.8rem 2rem;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--speed) var(--transition);
    box-shadow: var(--shadow-sm);
}

form input[type="submit"]:hover,
.btn-submit:hover {
    background: var(--primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

form .error-message {
    color: var(--error);
    font-size: 0.85rem;
    margin-top: 0.4rem;
    font-weight: 500;
}

/* Tables */
.table-container {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin: 2rem 0;
    overflow-x: auto;
    /* Added for horizontal scrolling */
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: var(--bg-main);
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: 1rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

td {
    padding: 1rem 1.5rem;
    color: var(--text-main);
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: rgba(59, 130, 246, 0.02);
}

/* Course Listing */
.course-list-public {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    padding: 2rem 0;
}

.course-item-public {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all var(--speed) var(--transition);
    display: flex;
    flex-direction: column;
    width: 350px;
    max-width: 100%;
    flex: 0 1 350px;
    /* Don't grow, can shrink, base 350px */
}

.course-item-public:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--secondary);
}

.course-item-public img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.5s var(--transition);
}

.course-item-public:hover img {
    transform: scale(1.05);
}

.course-details-public {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    text-align: center;
    align-items: center;
}

.course-details-public h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--primary);
}

.course-description {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
}

.course-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    list-style: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    justify-content: center;
}

.course-meta li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.course-price {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.price-box {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.current-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--secondary);
}

.actual-price {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

.btn-primary {
    background: var(--secondary);
    color: var(--text-white);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: all var(--speed) var(--transition);
}

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

/* Video Player */
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
    margin-bottom: 20px;
    border-radius: 8px;
}

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

.pdf-viewer-container {
    width: 100%;
    /* Ensure it takes full width */
    height: 500px;
    /* Changed height to 500px */
    margin-bottom: 15px;
}

.pdf-viewer-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Footer */
footer {
    background: var(--primary);
    color: var(--text-muted);
    padding: 5rem 0 2rem;
    border-top: 1px solid var(--glass-border);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-brand h2 {
    color: var(--text-white);
    margin-bottom: 1rem;
}

.footer-links h4 {
    color: var(--text-white);
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 0.75rem;
}

.footer-links ul li a {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-links ul li a:hover {
    color: var(--accent);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    font-size: 0.85rem;
}

/* Dashboard Stats */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.stat-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: all var(--speed) var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--secondary);
}

.stat-card h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.stat-card p {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0;
    line-height: 1;
}

.stat-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, transparent 50%, rgba(59, 130, 246, 0.05) 50%);
}

/* Sidebar Bottom Navigation */
.sidebar-bottom-nav {
    list-style: none;
    padding: 0;
    flex-shrink: 0;
    /* Prevent bottom nav from shrinking */
    border-top: 1px solid var(--border);
    /* Separator */
    padding-top: 1.5rem;
}

.sidebar-bottom-nav li a {
    border-bottom: none;
    /* Remove bottom border for last item */
}

/* Homepage-specific styles */
/* Homepage Structure */
.homepage-wrapper {
    width: 100%;
}

/* Hero Section */
.hero-section {
    background: radial-gradient(circle at top right, #1e293b, #0f172a);
    color: var(--text-white);
    padding: 10rem 1rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    /* Added min-height to push subsequent sections down */
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 1000px;
    height: 1000px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 900px;
    margin: 0 auto;
}

.hero-section h1 {
    font-size: 4rem;
    font-weight: 900;
    letter-spacing: -0.05em;
    margin-bottom: 1.5rem;
    color: var(--text-white);
}

.hero-section p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.btn-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-section .btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-white);
    backdrop-filter: blur(5px);
    border: 1px solid var(--glass-border);
}

.hero-section .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 2rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    transition: all var(--speed) var(--transition);
    cursor: pointer;
    text-decoration: none;
    border: none;
    font-family: 'Inter', 'Noto Serif Bengali', sans-serif;
}

.btn-primary {
    background-color: var(--secondary);
    color: #fff;
    box-shadow: 0 4px 6px rgba(59, 130, 246, 0.2);
}

.btn-primary:hover {
    background-color: var(--primary);
    box-shadow: 0 6px 12px rgba(15, 23, 42, 0.2);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--bg-main);
    color: var(--text-main);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border);
    color: var(--primary);
    transform: translateY(-2px);
}

/* Dashboard Hero Override */
.admin-student-page .hero-section.dashboard-hero {
    min-height: 65vh !important;
    padding: 6rem 1rem !important;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
}

@media (max-width: 991px) {
    .admin-student-page .hero-section.dashboard-hero {
        min-height: 45vh !important;
        padding: 4rem 1rem !important;
    }
}

@media (max-width: 575px) {
    .admin-student-page .hero-section.dashboard-hero {
        min-height: 40vh !important;
    }
}

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

.btn-outline:hover {
    background: var(--secondary);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.btn-white {
    background: #fff;
    color: var(--primary);
}

.btn-white:hover {
    background: var(--bg-main);
    transform: translateY(-2px);
}

/* Features Section */
.features-section {
    background: var(--bg-main);
    padding: 8rem 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 4rem;
}

.features-grid {
    display: grid;
    /* Use minmax with a smaller base to allow 4 items on desktop (1200px / 4 = 300px roughly, considering gaps) */
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    justify-content: center;
}

/* Force 4 columns on large screens for features */
@media (min-width: 1200px) {
    .features-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.feature-item {
    background: var(--bg-card);
    padding: 3rem 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    transition: all var(--speed) var(--transition);
    text-align: center;
}

.feature-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--secondary);
}

.feature-item i {
    font-size: 3rem;
    color: var(--secondary);
    margin-bottom: 1.5rem;
    background: rgba(59, 130, 246, 0.05);
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-left: auto;
    margin-right: auto;
}

.feature-item h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.feature-item p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Audience Panels */
.target-audience-section {
    padding: 8rem 0;
    background: var(--bg-card);
}

.audience-panels {
    display: grid;
    /* Use minmax with a smaller base to allow 3 items on desktop */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    justify-content: center;
}

/* Force 3 columns on large screens for audience panels */
@media (min-width: 992px) {
    .audience-panels {
        grid-template-columns: repeat(3, 1fr);
    }
}

.panel-item {
    background: var(--bg-main);
    padding: 3rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    transition: all var(--speed) var(--transition);
    text-align: center;
}

.panel-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
    border-color: var(--secondary);
}

.panel-item i {
    font-size: 3.5rem;
    color: var(--secondary);
    margin-bottom: 2rem;
}

.panel-item h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

/* Featured Courses Section (one by one) */
.featured-courses-section {
    padding: 5rem 1rem;
    background-color: #fff;
    text-align: center;
}

.featured-courses-section .section-title {
    margin-bottom: 3rem;
}

/* Featured Courses (Single Highlight) */
.featured-course-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    background: var(--bg-card);
    padding: 4rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    align-items: center;
    margin-bottom: 4rem;
}

.featured-course-item img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
}

@media (max-width: 992px) {
    .featured-course-item {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2rem;
    }

    .featured-course-item img {
        height: 300px;
    }
}

.featured-course-item .featured-course-details {
    text-align: left;
    /* Align text within details to left */
}

.featured-course-item .featured-course-details h3 {
    font-size: 1.8em;
    color: var(--text-color-dark);
    margin-bottom: 0.75em;
}

.featured-course-item .featured-course-details p.course-description {
    font-size: 1.1em;
    color: var(--text-color-light);
    line-height: 1.8;
    margin-bottom: 1.5em;
}

.featured-course-item ul.course-meta {
    list-style: none;
    padding: 0;
    margin: 1em 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    color: #6c757d;
    font-size: 1em;
}

.featured-course-item ul.course-meta li {
    display: flex;
    align-items: center;
}

.featured-course-item ul.course-meta li i {
    margin-right: 8px;
    color: var(--primary-blue);
}

.featured-course-item .course-price {
    margin-top: 1.5em;
    margin-bottom: 1.5em;
    display: flex;
    align-items: baseline;
    justify-content: flex-start;
    /* Align price to left */
}

.featured-course-item .current-price {
    font-size: 2em;
    font-weight: bold;
    color: var(--primary-blue);
}

.featured-course-item .actual-price {
    margin-left: 15px;
    color: #dc3545;
    text-decoration: line-through;
    font-size: 1.3em;
}

.featured-courses-section .btn-primary {
    margin-top: 1.5em;
}


/* Slider Styles */
/* Slider Styles (Background) */
.slider-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    /* Behind content */
}

/* Overlay for text readability */
.slider-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    /* Dark overlay */
    z-index: 2;
}

.slider-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.slider {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

.slide {
    min-width: 100%;
    height: 100%;
    box-sizing: border-box;
    flex-shrink: 0;
    /* Prevent slides from shrinking */
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Responsive adjustment for slider images on small screens */
@media (max-width: 768px) {
    .hero-section {
        min-height: 50vh;
        /* Adjust hero section minimum height for mobile */
        padding: 4rem 1rem;
        /* Reduce padding for mobile */
    }

    .hero-section h1 {
        font-size: 2.5em;
        /* Adjust font size for mobile */
    }

    .hero-section p {
        font-size: 1em;
        /* Adjust font size for mobile */
    }

    .slider-background,
    .slider,
    .slide {
        height: 100%;
        /* Ensure full height of hero section */
    }

    .slide img {
        width: 100%;
        height: 100%;
        /* Let object-fit handle the height within the slide container */
        object-fit: cover;
    }
}

/* Hero Content z-index adjustment */
.hero-content {
    position: relative;
    z-index: 3;
    /* Above slider and overlay */
}

.prev-slide,
.next-slide {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    padding: 18px 12px;
    color: white;
    font-weight: bold;
    font-size: 24px;
    background-color: rgba(0, 0, 0, 0.4);
    border: none;
    border-radius: 5px;
    user-select: none;
    transition: background-color 0.3s ease;
    z-index: 10;
    /* Topmost */
}

.next-slide {
    right: 10px;
}

.prev-slide {
    left: 10px;
}

.prev-slide:hover,
.next-slide:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* Course Detail Page */
.course-detail-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    margin: 3rem 0;
}

.course-info-left img {
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    margin-bottom: 2rem;
}

.course-chapters-right {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    height: sticky;
    top: 100px;
}

.course-detail-layout h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.course-detail-layout .description {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.8;
}

.course-price-info {
    margin: 2rem 0;
    display: flex;
    align-items: baseline;
    gap: 1rem;
}

.btn-enroll {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: var(--secondary);
    color: var(--text-white);
    padding: 1rem 2.5rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.3);
}

.btn-enroll:hover {
    background: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(59, 130, 246, 0.4);
}

/* Accordion */
.chapters-accordion {
    margin-top: 2rem;
}

.accordion-item {
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
    overflow: hidden;
}

.accordion-header {
    width: 100%;
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-main);
}

.accordion-header:hover {
    background: rgba(59, 130, 246, 0.02);
}

.accordion-content {
    background: var(--bg-card);
    max-height: 0;
    overflow: hidden;
    transition: all var(--speed) var(--transition);
}

.accordion-content.show {
    max-height: 1000px;
    padding: 1.5rem;
    border-top: 1px solid var(--border);
}

.accordion-content ul {
    list-style: none;
}

.accordion-content ul li {
    padding: 0.5rem 0;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
}

.accordion-content ul li::before {
    content: '\f04b';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 0.75rem;
    color: var(--secondary);
}

/* Play Video Button in Admin Panel */
.btn-play-video {
    background-color: var(--text-color-light);
    /* Muted color */
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9em;
    transition: background-color 0.3s ease;
}

.btn-play-video i {
    margin-right: 5px;
}

.btn-play-video:hover {
    background-color: var(--neutral-dark);
    /* A darker shade for hover */
    text-decoration: none;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .sidebar {
        position: fixed;
        left: -320px;
        z-index: 2000;
        height: 100vh;
        top: 0;
    }

    body.sidebar-open .sidebar {
        left: 0;
        box-shadow: 20px 0 50px rgba(0, 0, 0, 0.5);
    }

    .main-content {
        padding: 1.5rem;
    }

    .mobile-sidebar-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        background: rgba(255, 255, 255, 0.1);
        border: none;
        border-radius: var(--radius-sm);
        color: var(--text-white);
        font-size: 1.25rem;
        cursor: pointer;
        transition: all 0.2s ease;
        z-index: 1001;
        /* Ensure above other header elements */
    }

    .mobile-sidebar-toggle:hover {
        background: rgba(255, 255, 255, 0.2);
    }
}

@media (max-width: 768px) {
    header nav {
        padding: 0 1rem;
    }

    .main-nav-links {
        display: none;
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        height: calc(100vh - 80px);
        width: 100%;
        background: var(--primary);
        flex-direction: column;
        padding: 0;
        gap: 0;
        z-index: 9999;
        overflow-y: auto;
    }

    .main-nav-links.active {
        display: flex;
    }

    .main-nav-links a {
        display: block;
        width: 100%;
        padding: 1rem 1.25rem;
        border-radius: 0;
        font-size: 1rem;
        font-weight: 500;
        color: white !important;
        opacity: 1;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        background: transparent;
        text-decoration: none;
    }

    .main-nav-links a:hover {
        background: rgba(255, 255, 255, 0.1);
        color: var(--accent) !important;
    }

    .main-nav-links a:first-child {
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .main-nav-links a.nav-btn {
        margin-top: 1.5rem;
        margin-bottom: 0.5rem;
        text-align: center;
        background: var(--secondary) !important;
        border-radius: var(--radius-md);
        border: none;
        padding: 1rem 1.5rem;
    }

    .main-nav-links a.nav-btn:hover {
        background: var(--accent) !important;
        color: var(--primary) !important;
    }

    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        background: rgba(255, 255, 255, 0.1);
        border: none;
        border-radius: var(--radius-md);
        color: var(--text-white);
        font-size: 1.25rem;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .mobile-menu-toggle:hover {
        background: rgba(255, 255, 255, 0.2);
    }

    .mobile-menu-toggle.active {
        background: var(--secondary);
    }

    .hero-section h1 {
        font-size: 2.5rem;
    }

    .course-detail-layout {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Responsive adjustments for extra small devices (phones) */
@media (max-width: 575px) {

    .col-lg-4,
    .col-md-6,
    .col-sm-6 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    .site-title {
        font-size: 1.2em;
    }

    .mobile-menu-toggle {
        font-size: 1.5em;
        padding: 8px 12px;
    }

    .main-nav-links a {
        font-size: 1em;
        /* Further reduce font size */
    }

    .mobile-menu-close {
        font-size: 1.2em;
        /* Smaller close icon for very small screens */
        padding: 8px 15px;
    }

    .hero-section h1 {
        font-size: 2em;
    }

    .hero-section p {
        font-size: 1em;
    }

    .btn {
        padding: 10px 20px;
        font-size: 1em;
    }

    .sidebar {
        width: var(--sidebar-width);
    }

    .page-wrapper {
        flex-direction: column;
    }

    .main-content {
        margin: 10px;
    }

    .featured-course-item {
        padding: 20px;
    }

    .featured-course-item img {
        height: 180px;
    }

    .featured-course-item h3 {
        font-size: 1.6em;
    }

    .featured-course-item p.course-description {
        font-size: 0.9em;
    }

    .featured-course-item ul.course-meta {
        font-size: 0.85em;
    }

    .featured-course-item .current-price {
        font-size: 1.8em;
    }

    .featured-course-item .actual-price {
        font-size: 1em;
    }
}

/* Scroll Top Button */
#scrollTopBtn {
    display: none;
    /* Initially hidden, JS will toggle flex */
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 999;
    border: none;
    outline: none;
    background: var(--secondary);
    color: var(--text-white);
    cursor: pointer;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.25rem;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    transition: all var(--speed) var(--transition);
    align-items: center;
    justify-content: center;
}

#scrollTopBtn:hover {
    background: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

#scrollTopBtn i {
    margin: 0;
    padding: 0;
    line-height: 1;
}

/* WhatsApp Floating Button */
#whatsappFloatBtn {
    display: flex;
    /* Use flexbox to center content */
    align-items: center;
    /* Center vertically */
    justify-content: center;
    /* Center horizontally */
    position: fixed;
    /* Fixed/sticky position */
    bottom: 20px;
    /* Place the button at the bottom of the page */
    left: 20px;
    /* Place the button at the left */
    z-index: 99;
    /* Make sure it does not overlap */
    border: none;
    /* Remove borders */
    outline: none;
    /* Remove outline */
    background-color: #25D366;
    /* WhatsApp green */
    color: white;
    /* Text color */
    cursor: pointer;
    /* Add a mouse pointer on hover */
    width: 50px;
    /* Explicit width */
    height: 50px;
    /* Explicit height */
    border-radius: 50%;
    /* Rounded corners */
    font-size: 24px;
    /* Increase font size */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s, transform 0.3s;
    text-decoration: none;
    /* Remove underline */
}

#whatsappFloatBtn:hover {
    background-color: #1DA851;
    /* Darker green on hover */
    transform: scale(1.1);
    /* Slightly enlarge on hover */
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

#whatsappFloatBtn.pulse-animation {
    animation: pulse 2s infinite;
}

/* Basic Grid System (Mimicking Bootstrap) */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    /* Compensate for column padding */
    margin-left: -15px;
    /* Compensate for column padding */
    justify-content: center;
    /* Center flex items horizontally */
}

.col-lg-4,
.col-md-6,
.col-sm-6 {
    /* Add .col-sm-6 for small devices */
    position: relative;
    width: 100%;
    padding-right: 15px;
    /* Gutter */
    padding-left: 15px;
    /* Gutter */
    box-sizing: border-box;
    /* Ensure padding is included in the width */
    min-width: 0;
    /* Allow flex items to shrink */
}

/* Extra small devices (portrait phones, less than 576px) - default is 100% width */

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
    .col-sm-6 {
        flex: 0 0 50% !important;
        /* Two columns */
        max-width: 50% !important;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
    .col-md-6 {
        flex: 0 0 50% !important;
        /* Two columns */
        max-width: 50% !important;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .col-lg-4 {
        flex: 0 0 33.333333% !important;
        /* Three columns */
        max-width: 33.333333% !important;
    }
}

/* Margin Bottom */
.mb-4 {
    margin-bottom: 1.5rem !important;
    /* ~24px */
}

.section-title,
.section-subtitle {
    text-align: center;
}

.section-subtitle {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 3rem 0 2rem;
    color: var(--text-main);
    position: relative;
    padding-bottom: 1rem;
}

.section-subtitle::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--secondary);
    border-radius: 2px;
}

/* Language Switcher in Header */
.lang-switcher {
    display: flex;
    align-items: center;
    margin-left: 20px;
    /* Adjust spacing from other nav items */
}

.lang-btn {
    background-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 5px 10px;
    margin: 0 2px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.lang-btn:hover {
    background-color: rgba(255, 255, 255, 0.4);
    color: #fff;
    text-decoration: none;
}

.lang-btn.active {
    background-color: #fff;
    color: var(--primary-blue);
    font-weight: bold;
}

/* Responsive adjustments for language switcher */
@media (max-width: 768px) {
    .main-nav-links .lang-switcher {
        flex-direction: row;
        /* Keep buttons in a row */
        justify-content: center;
        /* Center them in mobile menu */
        width: 100%;
        margin: 10px 0;
        /* Add some vertical margin */
        padding: 10px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .main-nav-links .lang-btn {
        flex-grow: 1;
        /* Make buttons take equal space */
        text-align: center;
        margin: 0 5px;
        /* Adjust horizontal margin */
        padding: 8px 10px;
        /* Adjust padding for better touch targets */
    }
}

/* --- TESTIMONIALS SECTION STYLES --- */
.testimonials-section {
    background-color: var(--bg-main);
    padding: 8rem 0;
    overflow: hidden;
    position: relative;
}

.testimonial-slider {
    margin-top: 4rem;
    position: relative;
    width: 100%;
}

/* Masking effect for the edges */
.testimonial-slider::before,
.testimonial-slider::after {
    content: "";
    position: absolute;
    top: 0;
    width: 15rem;
    height: 100%;
    z-index: 5;
    pointer-events: none;
}

.testimonial-slider::before {
    left: 0;
    background: linear-gradient(to right, var(--bg-main), transparent);
}

.testimonial-slider::after {
    right: 0;
    background: linear-gradient(to left, var(--bg-main), transparent);
}

.testimonial-track {
    display: flex;
    gap: 2rem;
    width: max-content;
    animation: marquee 50s linear infinite;
    padding: 1rem 0;
}

.testimonial-track:hover {
    animation-play-state: paused;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.testimonial-card {
    flex-shrink: 0;
    width: 450px;
    background: var(--bg-card);
    padding: 3rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    justify-content: space-between;
    transition: var(--transition);
}

.testimonial-card:hover {
    transform: translateY(-5px);
    border-color: var(--secondary);
    box-shadow: var(--shadow-lg);
}

.testimonial-stars {
    color: #ffc107;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    display: flex;
    justify-content: center;
    gap: 0.25rem;
}

.testimonial-text {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-main);
    margin-bottom: 2.5rem;
    flex-grow: 1;
}

.testimonial-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
    width: 100%;
}

.author-img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--secondary);
}

.author-placeholder {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.1);
    color: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 700;
    color: var(--primary);
    font-size: 1rem;
}

.author-title {
    font-size: 0.85rem;
    color: var(--text-muted);
}

@media (max-width: 992px) {
    .testimonial-card {
        width: 380px;
        padding: 2.5rem;
    }
}

@media (max-width: 768px) {
    .testimonial-card {
        width: 320px;
        padding: 2rem;
    }

    .testimonial-track {
        animation-duration: 35s;
    }

    .testimonial-slider::before,
    .testimonial-slider::after {
        width: 100px;
    }
}

/* No specific media queries needed for testimonial items, grid handles responsiveness */
/* The general .col-lg-4, .col-md-6, .col-sm-6 will apply to other sections */
/* Homepage Section Spacing and Alignment */
.homepage-wrapper section {
    margin-top: 3rem;
}

.category-showcase h3 {
    text-align: center;
    margin-top: 2rem;
}

/* --- COURSE PLAYER STYLES --- */
.course-player-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
    height: calc(100vh - 120px);
    margin-top: 1rem;
}

.video-main-area {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.video-container-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

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

.video-info-box {
    padding: 1.5rem;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.video-info-box h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.video-sidebar-area {
    background: var(--bg-card);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg-main);
}

.playlist-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.playlist-chapter {
    margin-bottom: 1.5rem;
}

.playlist-chapter-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    padding-left: 0.5rem;
}

.playlist-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.playlist-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    color: var(--text-main);
    text-decoration: none;
    transition: var(--transition);
    margin-bottom: 2px;
}

.playlist-item:hover {
    background: var(--bg-main);
    color: var(--secondary);
}

.playlist-item.active {
    background: rgba(59, 130, 246, 0.1);
    color: var(--secondary);
    font-weight: 600;
}

.playlist-item i {
    font-size: 1rem;
    opacity: 0.6;
}

.playlist-item.active i {
    opacity: 1;
}

/* Responsive Player */
@media (max-width: 1024px) {
    .course-player-layout {
        grid-template-columns: 1fr;
        height: auto;
    }

    .video-sidebar-area {
        height: 500px;
    }
}

/* --- ADMIN MANAGEMENT STYLES --- */
.admin-course-card {
    border: 1px solid var(--border);
    transition: var(--transition);
}

.admin-course-card:hover {
    border-color: var(--secondary);
    transform: translateY(-4px);
}

.course-meta-admin {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.course-actions-admin {
    display: flex;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.btn-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--bg-main);
    color: var(--text-main);
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
}

.btn-edit:hover {
    background: rgba(59, 130, 246, 0.1);
    color: var(--secondary);
    border-color: var(--secondary);
}

.btn-chapters:hover {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent);
    border-color: var(--accent);
}

.btn-delete:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
    border-color: var(--error);
}

.inline-form {
    display: inline-block;
}

/* --- ADMINISTRATIVE & DASHBOARD UI --- */

/* Dashboard Header */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.dashboard-header.h-content {
    margin-bottom: 2rem;
}

.header-text h1 {
    font-size: 2.25rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.header-search {
    display: flex;
    gap: 0.75rem;
}

/* Content Body */
.content-body {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Settings Grid */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.settings-grid .full-width {
    grid-column: span 2;
}

/* Admin Forms */
.admin-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.admin-form-grid .full-width {
    grid-column: span 2;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon .form-control,
.input-with-icon input {
    padding-left: 1.25rem !important;
    height: 54px;
    border-radius: var(--radius-md);
    background: var(--bg-main);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.input-with-icon i {
    display: none;
}

.input-with-icon .form-control:focus {
    background: #fff;
    border-color: var(--secondary);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

/* Custom Checkbox */
.checkbox-container {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 35px;
    cursor: pointer;
    font-size: 1rem;
    user-select: none;
    min-height: 25px;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    height: 25px;
    width: 25px;
    background-color: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: 6px;
    transition: var(--transition);
}

.checkbox-container:hover input~.checkmark {
    background-color: rgba(59, 130, 246, 0.05);
}

.checkbox-container input:checked~.checkmark {
    background-color: var(--secondary);
    border-color: var(--secondary);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked~.checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 9px;
    top: 5px;
    width: 6px;
    height: 11px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Asset Previews */
.asset-upload-preview {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.preview-box {
    background: var(--bg-main);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    border: 1px dashed var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.preview-box img {
    max-height: 80px;
    width: auto;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.preview-box.compact img {
    max-height: 40px;
}

/* Visibility Control */
.visibility-control-wrapper {
    background: var(--bg-main);
    padding: 1.5rem;
    border-radius: var(--radius-md);
}

.toggle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* No Content States */
.no-content-card {
    background: var(--bg-card);
    padding: 5rem;
    border-radius: var(--radius-lg);
    text-align: center;
    border: 1px solid var(--border);
}

.no-content-card i {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.3;
}

.no-content-inline {
    text-align: center;
    opacity: 0.6;
}

/* Admin Meta & Profiles */
.student-profile-meta {
    display: flex;
    align-items: center;
}

.student-initials {
    width: 48px;
    height: 48px;
    background: var(--secondary);
    color: #fff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
}

.academic-meta {
    display: flex;
    flex-direction: column;
}

.meta-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Alert Styling */
.alert {
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.alert-success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Responsive Admin */
@media (max-width: 1200px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }

    .admin-form-grid {
        grid-template-columns: 1fr;
    }
}

/* --- SPECIALIZED ADMIN COMPONENTS --- */

/* Course Grid */
.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    border-radius: 2rem;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-accent {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.status-success {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-error {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Info with Icon Inline */
.info-with-icon {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.info-with-icon i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

/* File Upload System */
.file-upload-wrapper {
    margin-top: 0.5rem;
}

.file-upload-box {
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    padding: 2.5rem;
    text-align: center;
    background: var(--bg-main);
    transition: var(--transition);
    position: relative;
    cursor: pointer;
}

.file-upload-box:hover {
    border-color: var(--secondary);
    background: rgba(59, 130, 246, 0.02);
}

.file-upload-box i {
    font-size: 2.5rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.file-upload-box .file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* Current Asset Preview */
.current-asset-preview {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.current-asset-preview .asset-info {
    display: flex;
    align-items: center;
}

/* Row Disabled State */
.row-disabled {
    opacity: 0.6;
    background: #f8fafc;
}

/* Enhanced Table Typography */
.data-table td .font-bold {
    color: var(--primary);
}

/* --- FINAL ADMIN REFINEMENTS --- */

/* Learning & Back Navigation */
.learning-meta {
    margin-bottom: 0.75rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.back-link:hover {
    color: var(--secondary);
    transform: translateX(-4px);
}

/* Specific List Badges */
.order-badge {
    padding: 0.4rem 0.8rem;
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-family: inherit;
    color: var(--primary);
}

/* Mapping warning status */
.status-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

/* Action View Group */
.access-config-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.inline-date-group {
    display: flex;
    gap: 0.5rem;
}

.access-config-view {
    display: flex;
    flex-direction: column;
}

/* Registration Redesign Styles */
.registration-container {
    display: flex;
    width: 100%;
    min-height: calc(100vh - 80px);
    background: var(--bg-card);
    box-shadow: var(--shadow-lg);
}

.registration-side-image {
    flex: 1;
    background: url('../assets/images/registration_bg.png') no-repeat center center;
    background-size: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.registration-side-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.8), rgba(59, 130, 246, 0.4));
    z-index: 1;
}

.registration-image-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--text-white);
    max-width: 500px;
}

.registration-image-content h2 {
    color: var(--text-white);
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.registration-image-content p {
    font-size: 1.25rem;
    opacity: 0.9;
    line-height: 1.6;
}

.registration-side-form {
    width: 600px;
    padding: 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--bg-card);
}

.registration-form-card {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
}

.registration-form-header {
    margin-bottom: 2.5rem;
}

.registration-form-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.registration-form-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.registration-form .form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.registration-form .form-group {
    margin-bottom: 1.5rem;
}

.registration-form label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    display: block;
}

.registration-form .input-group {
    position: relative;
}

.registration-form .input-group i {
    display: none;
}

.registration-form input,
.registration-form select,
.registration-form textarea {
    width: 100%;
    padding: 0.9rem 1.25rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: all 0.3s var(--transition);
}

.registration-form textarea {
    padding-left: 1.2rem;
}

.registration-form input:focus,
.registration-form select:focus,
.registration-form textarea:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 5px rgba(59, 130, 246, 0.1);
    outline: none;
}

.registration-form input:focus+i {
    color: var(--secondary);
}

.registration-form .btn-submit-container {
    margin-top: 2rem;
}

.btn-primary.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    width: 100%;
}

.registration-form-footer {
    margin-top: 2rem;
    text-align: center;
    color: var(--text-muted);
}

.registration-form-footer a {
    color: var(--secondary);
    font-weight: 700;
}

.registration-form-footer a:hover {
    text-decoration: underline;
}

.registration-error {
    color: var(--error);
    font-size: 0.8rem;
    margin-top: 0.4rem;
    display: block;
    font-weight: 500;
}

@media (max-width: 1024px) {
    .registration-side-image {
        display: none;
    }

    .registration-side-form {
        width: 100%;
        padding: 3rem 1.5rem;
    }
}


/* Ensure buttons are full width on auth pages */
.btn-block {
    display: block;
    width: 100%;
}

/* --- Course Builder Styles --- */
.course-builder-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

.chapter-item {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
    background: var(--bg-card);
    transition: box-shadow 0.2s;
}

.chapter-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.chapter-item .card-header {
    background: rgba(var(--primary-rgb), 0.03);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 20px;
}

.video-list {
    background: var(--bg-body);
}

.video-item {
    background: var(--bg-card);
    transition: background 0.2s;
    border-bottom: 1px solid var(--border-color);
}

.video-item:last-child {
    border-bottom: none;
}

.video-item:hover {
    background: rgba(var(--primary-rgb), 0.02);
}

.video-item .actions {
    opacity: 0.6;
    transition: opacity 0.2s;
}

.video-item:hover .actions {
    opacity: 1;
}

.badge.bg-secondary {
    background: #e2e8f0;
    color: #475569;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 4px;
}

/* --- Settings Page Styles --- */
.settings-wrapper {
    max-width: 1200px;
    margin: 0 auto;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
}

.card.full-width {
    grid-column: 1 / -1;
}

.card-header-custom {
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-color);
    background: transparent;
}

.card-header-custom h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    display: flex;
    align-items: center;
}

.card-header-custom h3 i {
    margin-right: 10px;
    color: var(--primary);
    background: rgba(var(--primary-rgb), 0.1);
    padding: 8px;
    border-radius: 6px;
    font-size: 0.9rem;
}

.asset-upload-box {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
    background: var(--bg-body);
    position: relative;
    cursor: pointer;
}

.asset-upload-box:hover {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb), 0.02);
}

.asset-upload-box input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload-icon {
    font-size: 2rem;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.upload-label {
    font-weight: 500;
    margin-bottom: 5px;
    display: block;
}

.upload-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.preview-image-container {
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.preview-image-container img {
    max-height: 100px;
    /* Limit height for logo */
    display: block;
}

.preview-image-container.compact img {
    max-height: 48px;
    /* Limit height for favicon */
}

/* Custom Checkbox Toggles */
.toggle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.custom-toggle {
    display: flex;
    align-items: center;
    padding: 15px;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.custom-toggle:hover {
    border-color: var(--primary);
}

.custom-toggle input {
    display: none;
}

.toggle-switch {
    width: 40px;
    height: 22px;
    background: #e2e8f0;
    border-radius: 20px;
    position: relative;
    transition: background 0.3s;
    margin-right: 15px;
    flex-shrink: 0;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.custom-toggle input:checked+.toggle-switch {
    background: var(--primary);
}

.custom-toggle input:checked+.toggle-switch::after {
    transform: translateX(18px);
}

.toggle-label {
    font-weight: 500;
    font-size: 0.95rem;
}


.homepage-wrapper,
.hero-section {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Hero Section Updates */
.hero-content {
    margin-top: 80px;
}

.hero-content p {
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    /* Improved readability on slider */
}