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

:root {
    /* Base Colors - Premium Royal Blue & Amber Theme */
    --primary: #1E3A8A; /* Royal Blue */
    --primary-hover: #1E40AF;
    --secondary: #FFC107; /* Amber / Gold */
    --accent: #EF4444; /* Red */

    /* Neutral Colors */
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;

    /* Dashboard Specific Colors */
    --sidebar-bg: var(--primary);
    --sidebar-text: #cbd5e1;
    --sidebar-hover: var(--primary-hover);
    --sidebar-active: var(--secondary);

    /* Success / Danger / Warning */
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;

    /* Effects */
    --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);

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: 1px solid rgba(255, 255, 255, 0.5);

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;

    /* Transitions */
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

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

ul {
    list-style: none;
}

button,
.btn {
    cursor: pointer;
    border: none;
    outline: none;
    transition: var(--transition);
    font-family: 'Outfit', sans-serif;
}

/* ==================================
   UTILITIES
================================== */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

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

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

.text-muted {
    color: var(--text-muted);
}

.gradient-text {
    background: linear-gradient(135deg, #1d1c36, #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.page-heading {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-main);
    font-weight: 800;
}

.font-bold {
    font-weight: 700;
}

.font-semibold {
    font-weight: 600;
}

.mt-1 {
    margin-top: 0.25rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-3 {
    margin-top: 1rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

.mt-5 {
    margin-top: 2rem;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.mb-5 {
    margin-bottom: 2rem;
}

/* Flexbox */
.d-flex {
    display: flex;
}

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

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

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.gap-1 {
    gap: 0.5rem;
}

.gap-2 {
    gap: 1rem;
}

.gap-3 {
    gap: 1.5rem;
}

.gap-4 {
    gap: 2rem;
}

.gap-5 {
    gap: 3rem;
}

.flex-1 {
    flex: 1;
}

/* ==================================
   BUTTONS
================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
    color: white;
}

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

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

/* ==================================
   CARDS & GLASSMORPHISM
================================== */
.card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: var(--glass-border);
    box-shadow: var(--shadow-lg);
}

/* ==================================
   FORM ELEMENTS
================================== */
.form-group {
    margin-bottom: 1.5rem;
}

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

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--bg-white);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    outline: none;
}

/* ==================================
   HEADER (PUBLIC)
================================== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 0.2rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}

.nav-logo img {
    height: 100px;
    object-fit: contain;
}

.mobile-menu-wrapper {
    display: flex;
    align-items: center;
    gap: 2rem;
}

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

.nav-links a {
    font-weight: 600;
    font-size: 1.15rem;
    color: var(--text-main);
    padding: 0.5rem 0;
}

.nav-links a:hover {
    color: var(--primary);
}

/* ==================================
   HERO SECTION
================================== */
.hero {
    padding: 6rem 0;
    background: linear-gradient(rgba(29, 28, 54, 0.85), rgba(124, 58, 237, 0.75)), url('../images/hero.webp') center/cover;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 600px;
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--bg-white);
}

.hero h1 span {
    background: linear-gradient(135deg, #a78bfa, #c4b5fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
}

/* ==================================
   FOOTER
================================== */
.footer {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.95), rgba(124, 58, 237, 0.8));
    color: rgb(28, 27, 27);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.footer .text-muted {
    color: rgba(255, 255, 255, 0.8);
}

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

.footer-col h3 {
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

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

.footer-col a {
    color: rgba(255, 255, 255, 0.8);
}

.footer-col a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}

/* ==================================
   DASHBOARD LAYOUT (Admin & User)
================================== */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
    background-color: var(--bg-light);
}

.sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    box-shadow: var(--shadow-lg);
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
}

.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: var(--sidebar-text);
    transition: var(--transition);
}

.sidebar-menu li a:hover,
.sidebar-menu li a.active {
    background-color: var(--sidebar-hover);
    color: white;
    border-left: 4px solid var(--sidebar-active);
}

.sidebar-menu li a i {
    font-size: 1.25rem;
}

.main-content {
    flex: 1;
    margin-left: 260px;
    display: flex;
    flex-direction: column;
}

.dashboard-header {
    background-color: var(--bg-white);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 90;
}

.dashboard-header .user-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.dashboard-header .user-profile img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.content-wrapper {
    padding: 2rem;
    flex: 1;
}

/* ==================================
   COURSES GRID
================================== */
.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.course-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

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

.course-thumbnail {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background-color: var(--border-color);
}

.course-content {
    padding: 1.5rem;
}

.course-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.course-meta {
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.course-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
}

/* ==================================
   TABLES
================================== */
.table-responsive {
    overflow-x: auto;
}

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

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    background-color: var(--bg-light);
    font-weight: 600;
    color: var(--text-muted);
}

.table tbody tr:hover {
    background-color: var(--bg-light);
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

/* ==================================
   RESPONSIVE DESIGN & MEDIA QUERIES
================================== */
.mobile-menu-btn,
.dashboard-mobile-toggle {
    display: none;
}

@media (max-width: 992px) {

    /* Navbar styling for mobile */
    .mobile-menu-wrapper {
        display: none;
    }

    .mobile-menu-wrapper.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-white);
        padding: 1.5rem 0;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        gap: 1.5rem;
    }

    .mobile-menu-wrapper .nav-links {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        gap: 1rem;
    }

    .mobile-menu-wrapper .nav-auth {
        display: flex;
        justify-content: center;
        width: 100%;
    }

    .mobile-menu-btn {
        display: block;
        background: none;
        border: none;
        font-size: 1.75rem;
        color: var(--primary);
        cursor: pointer;
    }

    /* Hero section */
    .hero {
        padding: 4rem 0;
    }

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

    /* Grids */
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    /* Dashboard Sidebar */
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        position: fixed;
        z-index: 1000;
        height: 100vh;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .dashboard-mobile-toggle {
        display: block;
        margin-right: 1rem;
        font-size: 1.25rem;
        background: none;
        border: none;
        cursor: pointer;
        color: var(--primary);
    }
}

@media (max-width: 768px) {

    /* Typography */
    .page-heading {
        font-size: 2.25rem;
    }

    /* Grids */
    .footer-grid,
    .course-grid,
    .feature-grid,
    .pricing-grid {
        grid-template-columns: 1fr;
    }

    .reverse-on-mobile {
        flex-direction: column-reverse;
    }

    .flex-column-mobile {
        flex-direction: column;
    }

    .flex-column-mobile>div {
        width: 100%;
        min-width: 100% !important;
    }

    /* Gaps & Padding */
    .gap-4,
    .gap-5 {
        gap: 1.5rem;
    }

    .auth-container {
        padding: 1rem;
    }

    .auth-card {
        padding: 2rem 1.5rem;
    }
}

/* ==================================
   CUSTOM COMPONENTS (Stats & Features)
================================== */
@keyframes pulseGlow {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}
.pulse-btn { animation: pulseGlow 2s infinite; }

.feature-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.25rem;
    padding: 2rem 1.5rem;
    background: transparent;
    transition: var(--transition);
}
.feature-box .icon {
    width: 80px;
    height: 80px;
    background: var(--secondary);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    flex-shrink: 0;
    box-shadow: var(--shadow-md);
}
.feature-box h4 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--secondary);
    text-transform: uppercase;
}
.feature-box p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
}

.trainer-table-container {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    width: 100%;
    overflow-x: auto;
}
.trainer-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
}
.trainer-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 700;
    color: var(--text-main);
    border-bottom: 1px solid var(--border-color);
}
.trainer-table td {
    padding: 1.2rem 1rem;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}
.trainer-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.trainer-profile img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}
.trainer-profile div h5 {
    font-weight: 700;
    color: var(--text-main);
    font-size: 1rem;
    margin-bottom: 0;
}
.trainer-profile div p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0;
}
.checklist-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--text-main);
}
.checklist-item i {
    color: var(--accent);
    font-size: 1.25rem;
}