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

:root {
    --primary: #1e3a8a; /* fallback - overridden by inline style from DB */
    --primary-dark: color-mix(in srgb, var(--primary), black 20%);
    --primary-light: color-mix(in srgb, var(--primary), white 20%);
    --primary-darker: color-mix(in srgb, var(--primary), black 40%);
    --primary-darkest: color-mix(in srgb, var(--primary), black 55%);
    --secondary: #fbbf24; /* yellow/gold */
    --secondary-hover: #f59e0b;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f3f4f6;
    --bg-white: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.15), 0 8px 10px -6px rgba(0,0,0,0.08);
    --transition: all 0.3s ease;
}

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

body {
    background-color: var(--primary-darkest);
    color: var(--text-dark);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* ===== Navbar ===== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background-color: var(--bg-white);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    backdrop-filter: blur(10px);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary);
}

.logo img {
    height: 40px;
}

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

.nav-links li a {
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    position: relative;
}

.nav-links li a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.nav-links li a:hover::after {
    width: 100%;
}

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

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.contact-info {
    font-weight: 600;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ===== Buttons ===== */
.btn {
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

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

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.35);
}

.btn-secondary {
    background-color: var(--secondary);
    color: var(--text-dark);
}

.btn-secondary:hover {
    background-color: var(--secondary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4);
}

/* ===== Hero Section ===== */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 50%, var(--primary-darkest) 100%);
    color: white;
    padding: 60px 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    min-height: 85vh;
}

/* Subtle animated background pattern */
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
    animation: heroPulse 6s ease-in-out infinite;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
    animation: heroPulse 8s ease-in-out 2s infinite;
}

@keyframes heroPulse {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.15); opacity: 1; }
}

.hero-content {
    flex: 1;
    max-width: 55%;
    z-index: 2;
}

.hero-heading {
    font-size: 3.2rem;
    line-height: 1.15;
    margin-bottom: 16px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.hero-heading span {
    color: var(--secondary);
}

.hero-subtitle {
    font-size: 1.05rem;
    margin-bottom: 28px;
    opacity: 0.85;
    line-height: 1.7;
    max-width: 500px;
}

.hero-image-container {
    flex: 1;
    max-width: 40%;
    position: relative;
    z-index: 2;
}

.hero-image-container img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
}

.hero-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.hero-btn-outline {
    background: transparent;
    border: 2px solid rgba(255,255,255,0.6);
    color: white;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
}

.hero-btn-outline:hover {
    background: white;
    color: var(--primary);
    border-color: white;
    transform: translateY(-1px);
}

/* ===== Management Cards (2x2 Grid inside Hero) ===== */
.management-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 28px;
}

.mgmt-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    padding: 20px 16px;
    text-align: center;
    transition: all 0.35s ease;
    cursor: default;
}

.mgmt-card:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.mgmt-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--secondary);
    color: var(--primary-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin: 0 auto 12px;
    transition: var(--transition);
}

.mgmt-card:hover .mgmt-icon {
    transform: scale(1.1);
}

.mgmt-card h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: white;
}

.mgmt-card p {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
    margin: 0;
}

/* ===== Stats Section ===== */
.stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: white;
    padding: 24px 5%;
    flex-wrap: wrap;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-icon {
    font-size: 2rem;
    color: var(--secondary);
}

.stat-text h3 {
    font-size: 1.5rem;
    line-height: 1.1;
}

.stat-text p {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* ===== Sections Common ===== */
.section {
    padding: 80px 5%;
}

.section-dark {
    background: linear-gradient(180deg, var(--primary-darkest) 0%, var(--primary-darker) 100%);
    color: white;
}

.section-darker {
    background: linear-gradient(180deg, var(--primary-darker) 0%, var(--primary-dark) 100%);
    color: white;
}

.section-dark .section-title,
.section-darker .section-title {
    color: white;
}

.section-dark .section-subtitle,
.section-darker .section-subtitle {
    color: var(--secondary);
}

.section-header {
    margin-bottom: 40px;
}

.section-title {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 10px;
    font-weight: 700;
}

.section-subtitle {
    color: var(--text-light);
    text-transform: uppercase;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
}

/* Outline button for dark sections */
.btn-outline-light {
    display: inline-block;
    border: 1.5px solid rgba(255,255,255,0.4);
    padding: 8px 20px;
    border-radius: 20px;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-outline-light:hover {
    background: var(--secondary);
    border-color: var(--secondary);
    color: var(--primary-dark);
}

/* ===== Courses Grid ===== */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.course-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 25px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: var(--transition);
}

.course-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.14);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.25);
}

.course-icon {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.course-card h3 {
    font-size: 1.25rem;
    margin-bottom: 5px;
    color: white;
}

.course-card h3 span {
    font-weight: 400;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.5);
}

.course-card p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.course-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 15px;
}

.course-price {
    font-weight: 700;
    color: var(--secondary);
    font-size: 1.2rem;
}

.course-arrow {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.6);
    transition: var(--transition);
}

.course-card:hover .course-arrow {
    background: var(--secondary);
    color: var(--primary-dark);
    border-color: var(--secondary);
}

/* ===== Why Choose Us ===== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    text-align: center;
}

.feature-item {
    padding: 30px 20px;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.feature-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.25);
    border-color: rgba(251, 191, 36, 0.3);
}

.feature-icon-wrap {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: var(--secondary);
    color: var(--primary-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 18px;
    transition: var(--transition);
}

.feature-item:hover .feature-icon-wrap {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.4);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--secondary);
    margin-bottom: 15px;
}

.feature-item h4 {
    margin-bottom: 10px;
    font-size: 1.1rem;
    color: white;
}

.feature-item p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

/* ===== Footer ===== */
.footer {
    background: var(--primary-darkest);
    color: #94a3b8;
    padding: 60px 5% 20px;
}

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

.footer-col h4 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

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

.footer-links li a:hover {
    color: white;
}

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

/* ===== Forms & Dashboards ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.auth-container {
    max-width: 400px;
    margin: 100px auto;
    background: var(--bg-white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

.alert {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
}

/* ===== Dashboards Grid ===== */
.dashboard-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    min-height: 100vh;
}

.sidebar {
    background: var(--primary);
    color: white;
    padding: 20px 0;
}

.sidebar-header {
    padding: 0 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 20px;
}

.sidebar-nav li a {
    display: block;
    padding: 12px 20px;
    color: rgba(255,255,255,0.8);
    transition: all 0.3s;
}

.sidebar-nav li a:hover, .sidebar-nav li a.active {
    background: rgba(255,255,255,0.1);
    color: white;
    border-left: 4px solid var(--secondary);
}

.main-content {
    padding: 30px;
    background: var(--bg-light);
}

.card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.table-responsive {
    overflow-x: auto;
}

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

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

th {
    font-weight: 600;
    color: var(--text-dark);
    background-color: #f9fafb;
}

.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}
.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }

/* ===== Responsive Layout ===== */
.menu-toggle {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--primary);
    order: 1;
}

/* ---------- Tablet & Small Desktop ---------- */
@media (max-width: 992px) {
    .hero {
        flex-direction: column-reverse;
        text-align: center;
        padding: 40px 5%;
        min-height: auto;
    }
    .hero-content, .hero-image-container {
        max-width: 100%;
        width: 100%;
    }
    .hero-image-container {
        margin-bottom: 30px;
    }
    .hero-image-container img {
        max-height: 320px;
    }
    .hero-heading {
        font-size: 2.6rem;
    }
    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }
    .hero-buttons {
        justify-content: center;
    }
    .management-grid {
        max-width: 420px;
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 28px;
    }
}

/* ---------- Mobile ---------- */
@media (max-width: 768px) {
    /* Navbar */
    .navbar {
        flex-wrap: wrap;
        align-items: center;
        padding: 0.7rem 5%;
    }
    .logo {
        flex: 1;
        font-size: 1.3rem;
    }
    .menu-toggle {
        display: block;
    }
    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        text-align: center;
        margin-top: 15px;
        gap: 15px;
        order: 2;
    }
    .nav-right {
        display: none;
        width: 100%;
        flex-direction: column;
        text-align: center;
        align-items: center;
        margin-top: 15px;
        gap: 15px;
        order: 3;
    }
    .nav-links.active, .nav-right.active {
        display: flex;
    }
    
    /* Hero */
    .hero {
        padding: 30px 5%;
    }
    .hero-heading {
        font-size: 2rem;
    }
    .hero-subtitle {
        font-size: 0.95rem;
        margin-bottom: 20px;
    }
    .hero-buttons {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }
    .hero-buttons a {
        justify-content: center;
        text-align: center;
        width: 100%;
        padding: 10px 8px;
        font-size: 0.85rem;
    }

    /* Management cards - stay 2x2 */
    .management-grid {
        gap: 12px;
        max-width: 100%;
    }
    .mgmt-card {
        padding: 16px 10px;
        border-radius: 12px;
    }
    .mgmt-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        border-radius: 10px;
        margin-bottom: 8px;
    }
    .mgmt-card h4 {
        font-size: 0.85rem;
    }
    .mgmt-card p {
        font-size: 0.72rem;
    }

    /* Stats */
    .stats {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
        padding: 30px 5%;
    }
    .stat-item {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        gap: 10px;
    }
    
    /* Sections */
    .section {
        padding: 50px 5%;
    }

    /* Dashboards - Drawer Sidebar */
    .sidebar-toggle {
        display: inline-block;
        font-size: 1.5rem;
        color: var(--primary);
        cursor: pointer;
        background: none;
        border: none;
        margin-right: 15px;
    }
    
    .dashboard-layout {
        display: block;
    }
    
    .sidebar {
        position: fixed;
        top: 0;
        left: -300px;
        width: 260px;
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s ease;
        padding: 20px;
        overflow-y: auto;
    }
    
    .sidebar.active {
        left: 0;
    }
    
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 999;
    }
    .sidebar-overlay.active {
        display: block;
    }
    
    .sidebar-header {
        text-align: center;
        margin-bottom: 20px;
    }
    .sidebar-header i {
        font-size: 2rem !important;
    }
    .sidebar-header p {
        display: block;
    }
    
    .sidebar-nav {
        display: block;
    }
    
    .sidebar-nav a {
        padding: 10px 15px;
        white-space: normal;
    }
    
    .main-content {
        padding: 15px;
        width: 100%;
    }
    .card {
        padding: 15px;
    }
}

/* ---------- Small phones ---------- */
@media (max-width: 480px) {
    .hero-heading {
        font-size: 1.7rem;
    }
    .hero-subtitle {
        font-size: 0.85rem;
    }
    .hero-buttons {
        grid-template-columns: 1fr;
    }
    .management-grid {
        gap: 10px;
    }
    .mgmt-card {
        padding: 14px 8px;
    }
    .mgmt-icon {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
    .mgmt-card h4 {
        font-size: 0.8rem;
    }
    .mgmt-card p {
        font-size: 0.7rem;
    }
}
