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

/* ===== CSS Custom Properties ===== */
:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: rgba(79, 70, 229, 0.1);
    --secondary-color: #7c3aed;
    --accent-color: #f59e0b;

    --bg-light: #f8f7ff;
    --bg-white: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f8f7ff;
    --bg-gray: #f1f5f9;
    --bg-deep: #0f0e1a;

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;

    --border-color: #e2e8f0;
    --border-subtle: rgba(79, 70, 229, 0.15);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 30px rgba(79, 70, 229, 0.35), 0 0 60px rgba(124, 58, 237, 0.15);
    --shadow-card: 0 2px 8px rgba(15, 23, 42, 0.06), 0 0 1px rgba(15, 23, 42, 0.06);

    --glass-bg: rgba(255, 255, 255, 0.72);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-blur: 20px;
    --glass-bg-dark: rgba(255, 255, 255, 0.08);

    --gradient-primary: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    --gradient-mesh: radial-gradient(ellipse at 20% 50%, rgba(79, 70, 229, 0.12) 0%, transparent 60%),
                     radial-gradient(ellipse at 80% 20%, rgba(124, 58, 237, 0.1) 0%, transparent 50%),
                     radial-gradient(ellipse at 60% 80%, rgba(245, 158, 11, 0.06) 0%, transparent 50%),
                     linear-gradient(180deg, #f8f7ff 0%, #f0f0fe 100%);
    --gradient-warm: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    --gradient-hero: linear-gradient(135deg, #1e1b4b 0%, #312e81 40%, #4c1d95 100%);

    --font-display: 'Syne', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;

    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 400ms cubic-bezier(0.34, 1.56, 0.64, 1);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-2xl: 32px;

    --section-padding: 5rem;
}

/* ===== Base ===== */
*, *::before, *::after { box-sizing: border-box; }

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-light);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
    margin: 0;
}

/* ===== Keyframes ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.93); }
    to   { opacity: 1; transform: scale(1); }
}

@keyframes shimmer {
    0%   { background-position: -200% center; }
    100% { background-position: 200% center; }
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33%       { transform: translateY(-16px) rotate(2deg); }
    66%       { transform: translateY(-8px) rotate(-1deg); }
}

@keyframes floatAlt {
    0%, 100% { transform: translateY(0px); }
    50%       { transform: translateY(-20px); }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.4); }
    50%       { box-shadow: 0 0 0 8px rgba(79, 70, 229, 0); }
}

@keyframes gradientShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ===== Utilities ===== */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.animate-fadeInUp { animation: fadeInUp 0.6s ease both; }
.animate-scaleIn  { animation: scaleIn 0.5s ease both; }

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.revealed { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ===== Navbar ===== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 0.875rem 0;
    border-bottom: 1px solid var(--border-color);
    transition: all var(--transition-normal);
}

.navbar.scrolled {
    padding: 0.5rem 0;
    background-color: var(--glass-bg) !important;
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
}

.navbar-brand {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--text-primary) !important;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    text-decoration: none;
}

.navbar-brand i {
    width: 32px;
    height: 32px;
    background: var(--gradient-primary);
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
}

.nav-link {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-secondary) !important;
    padding: 0.5rem 0.875rem !important;
    margin: 0 0.125rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    position: relative;
    text-decoration: none;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 2px;
    transition: all var(--transition-normal);
    transform: translateX(-50%);
}

.nav-link:hover {
    color: var(--primary-color) !important;
    background: var(--primary-light);
}

.nav-link:hover::after {
    width: calc(100% - 1.75rem);
}

.search-box {
    display: flex;
    align-items: center;
    background-color: var(--bg-gray);
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    padding: 0.45rem 0.875rem;
    gap: 0.5rem;
    transition: all var(--transition-normal);
}

.search-box:focus-within {
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 3px var(--primary-light);
}

.search-box i {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.search-box input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    outline: none;
    font-size: 0.875rem;
    font-family: var(--font-body);
    width: 140px;
}

.search-box input::placeholder { color: var(--text-muted); }

.btn-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-gray);
    border: 1.5px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.4rem 0.875rem 0.4rem 0.5rem;
    border-radius: 100px;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition-normal);
    cursor: pointer;
}

.btn-user:hover {
    background: var(--bg-white);
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.15);
}

.user-avatar-initial {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    flex-shrink: 0;
}

.btn-user .fa-user-circle {
    font-size: 1.25rem;
    color: var(--primary-color);
}

.dropdown-menu {
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 0.5rem;
    margin-top: 0.5rem;
    min-width: 200px;
    box-shadow: var(--shadow-xl);
    animation: scaleIn 0.15s ease both;
    transform-origin: top right;
}

.dropdown-item {
    color: var(--text-secondary);
    padding: 0.625rem 0.875rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-family: var(--font-body);
    font-weight: 500;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.625rem;
    text-decoration: none;
}

.dropdown-item:hover {
    background-color: var(--bg-gray);
    color: var(--primary-color);
}

.dropdown-item i { width: 16px; color: var(--text-muted); }
.dropdown-divider { border-color: var(--border-color); margin: 0.375rem 0; }

.navbar-toggler {
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.5rem;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(71, 85, 105, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.btn-outline-light {
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    background: transparent;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.875rem;
    font-family: var(--font-body);
    color: white;
    transition: all var(--transition-normal);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.6);
    color: white;
}

/* Navbar login/register buttons */
.navbar-right .btn-outline-light {
    border-color: var(--border-color);
    color: var(--text-secondary);
    padding: 0.45rem 1rem;
    font-size: 0.875rem;
}

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

/* ===== Buttons ===== */
.btn-primary {
    background: var(--gradient-primary);
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    font-family: var(--font-body);
    color: white;
    transition: all var(--transition-normal);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    justify-content: center;
}

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

.btn-primary.btn-sm { padding: 0.45rem 1rem; font-size: 0.825rem; }
.btn-primary.btn-lg { padding: 0.875rem 2rem; font-size: 1rem; }
.btn-block { width: 100%; }

/* ===== Hero Section ===== */
.hero-section {
    position: relative;
    background: var(--gradient-hero);
    padding: 5.5rem 0 4rem;
    min-height: 560px;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 25% 50%, rgba(99, 102, 241, 0.4) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(139, 92, 246, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse at 60% 90%, rgba(167, 139, 250, 0.2) 0%, transparent 40%);
    pointer-events: none;
}

.hero-section::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.05) 1px, transparent 0);
    background-size: 32px 32px;
    pointer-events: none;
}

.hero-shapes { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }

.hero-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.12;
}

.hero-shape-1 {
    width: 400px; height: 400px;
    background: radial-gradient(circle, #818cf8 0%, transparent 70%);
    top: -100px; right: -50px;
    animation: float 8s ease-in-out infinite;
}

.hero-shape-2 {
    width: 280px; height: 280px;
    background: radial-gradient(circle, #a78bfa 0%, transparent 70%);
    bottom: -60px; right: 30%;
    animation: floatAlt 10s ease-in-out infinite;
    opacity: 0.08;
}

.hero-shape-3 {
    width: 180px; height: 180px;
    background: radial-gradient(circle, #c4b5fd 0%, transparent 70%);
    top: 20%; right: 12%;
    animation: float 12s ease-in-out infinite reverse;
    opacity: 0.15;
}

.hero-content { position: relative; z-index: 2; }

.hero-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
    padding: 0.375rem 1rem;
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(8px);
}

.hero-label .dot {
    width: 6px; height: 6px;
    background: #34d399;
    border-radius: 50%;
    animation: pulse-glow 2s ease-in-out infinite;
    display: inline-block;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.25rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.12;
    color: #ffffff;
    margin-bottom: 1.25rem;
    letter-spacing: -0.03em;
}

.hero-title .highlight {
    background: linear-gradient(135deg, #a5b4fc 0%, #c4b5fd 50%, #fbcfe8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.72);
    margin-bottom: 2.5rem;
    line-height: 1.75;
    max-width: 480px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.btn-hero-primary {
    background: white;
    color: var(--primary-color);
    padding: 0.875rem 2rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.95rem;
    font-family: var(--font-display);
    border: none;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.btn-hero-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
    color: var(--primary-color);
}

.btn-hero-outline {
    background: transparent;
    color: white;
    padding: 0.875rem 2rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    font-family: var(--font-display);
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    backdrop-filter: blur(8px);
}

.btn-hero-outline:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.7);
    color: white;
    transform: translateY(-2px);
}

.hero-stats {
    display: flex;
    gap: 2.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.hero-stat { display: flex; flex-direction: column; gap: 0.125rem; }

.hero-stat-number {
    font-family: var(--font-display);
    font-size: 1.875rem;
    font-weight: 800;
    color: white;
    line-height: 1;
    letter-spacing: -0.02em;
}

.hero-stat-label {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.55);
    font-weight: 500;
}

.hero-stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
}

.hero-image-area {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-image img {
    width: 100%;
    max-width: 480px;
    height: auto;
    border-radius: var(--radius-xl);
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.4);
}

/* ===== Sections Common ===== */
.section-title {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    margin-bottom: 0.75rem;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.75;
    max-width: 560px;
    margin: 0 auto 3rem;
}

/* ===== Course Section ===== */
.course-section {
    padding: var(--section-padding) 0;
    background: var(--bg-light);
}

.course-section .section-title {
    font-size: 1.375rem;
    margin-bottom: 1.5rem;
}

.course-tabs {
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2.5rem;
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
}
.course-tabs::-webkit-scrollbar { display: none; }

.course-tabs .nav-link {
    background: transparent !important;
    border: none !important;
    border-bottom: 2px solid transparent !important;
    color: var(--text-secondary) !important;
    padding: 0.875rem 1.25rem !important;
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    border-radius: 0 !important;
    transition: all var(--transition-fast);
    margin: 0;
}

.course-tabs .nav-link::after { display: none; }

.course-tabs .nav-link:hover {
    color: var(--primary-color) !important;
    background: transparent !important;
}

.course-tabs .nav-link.active {
    color: var(--primary-color) !important;
    border-bottom: 2px solid var(--primary-color) !important;
    background: transparent !important;
}

/* ===== Course Cards ===== */
.course-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-normal);
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-card);
}

.course-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(79, 70, 229, 0.15), 0 0 0 1px rgba(79, 70, 229, 0.1);
    border-color: rgba(79, 70, 229, 0.2);
}

.course-image {
    position: relative;
    padding-top: 56.25%;
    overflow: hidden;
}

.course-image img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.course-card:hover .course-image img { transform: scale(1.08); }

.category-badge {
    position: absolute;
    top: 0.75rem; left: 0.75rem;
    padding: 0.28rem 0.7rem;
    border-radius: 100px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    backdrop-filter: blur(8px);
    z-index: 1;
}

.category-badge.cat-software    { background: rgba(79, 70, 229, 0.85); color: white; }
.category-badge.cat-non-software { background: rgba(16, 185, 129, 0.85); color: white; }
.category-badge.cat-devops       { background: rgba(245, 158, 11, 0.85); color: white; }
.category-badge.cat-custom       { background: rgba(239, 68, 68, 0.85); color: white; }

.type-badge {
    position: absolute;
    top: 0.75rem; left: 0.75rem;
    padding: 0.28rem 0.7rem;
    border-radius: 100px;
    font-size: 0.68rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    backdrop-filter: blur(8px);
    z-index: 1;
}

.type-badge.physical { background: rgba(79, 70, 229, 0.85); color: white; }
.type-badge.online   { background: rgba(16, 185, 129, 0.85); color: white; }

.discount-badge {
    position: absolute;
    top: 0.75rem; right: 0.75rem;
    background: #ef4444;
    color: white;
    padding: 0.22rem 0.6rem;
    border-radius: var(--radius-sm);
    font-size: 0.68rem;
    font-weight: 700;
    z-index: 1;
}

.course-content {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 0.625rem;
}

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

.course-meta span {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.course-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.4;
    letter-spacing: -0.01em;
}

.course-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
    margin: 0;
}

.course-tags {
    display: flex;
    gap: 0.375rem;
    flex-wrap: wrap;
}

.tag {
    background: var(--bg-gray);
    color: var(--text-secondary);
    padding: 0.2rem 0.625rem;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 600;
    border: 1px solid var(--border-color);
}

.course-instructor {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-top: 0.625rem;
    border-top: 1px solid var(--border-color);
}

.course-instructor img {
    width: 24px; height: 24px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid var(--border-color);
}

.course-instructor span {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.course-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.625rem;
    border-top: 1px solid var(--border-color);
}

.course-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.course-rating .fa-star { color: #fbbf24; font-size: 0.8rem; }

.course-rating span {
    font-size: 0.8rem;
    color: var(--text-primary);
    font-weight: 600;
}

.course-rating .reviews { color: var(--text-muted); font-weight: 400; }

.course-price .price {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.course-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

/* Course Index page filter */
.page-header {
    background: var(--gradient-mesh);
    padding: 4rem 0;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.page-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 800;
    margin-bottom: 0.875rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.03em;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.7;
}

.courses-section { padding: 3rem 0; }

.courses-filter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.filter-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: var(--bg-white);
    border: 1.5px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.5rem 1.125rem;
    border-radius: 100px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: var(--font-body);
    transition: all var(--transition-fast);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--gradient-primary);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.filter-sort .form-select {
    background-color: var(--bg-white);
    border: 1.5px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem 2.25rem 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-family: var(--font-body);
    cursor: pointer;
}

.filter-sort .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
    outline: none;
}

/* Course Index card override (uses padding-top ratio) */
.courses-section .course-image {
    height: auto;
    padding-top: 56.25%;
}

/* ===== Services Section ===== */
.services-section {
    padding: var(--section-padding) 0;
    background: var(--bg-white);
    position: relative;
    overflow: hidden;
}

.services-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    opacity: 0.3;
}

.service-card {
    text-align: center;
    padding: 2.5rem 2rem;
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.service-card:hover {
    border-color: rgba(79, 70, 229, 0.25);
    box-shadow: 0 16px 40px rgba(79, 70, 229, 0.1);
    transform: translateY(-6px);
}

.service-icon {
    width: 64px; height: 64px;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    position: relative;
    z-index: 1;
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.3);
    transition: all var(--transition-normal);
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(-5deg);
    box-shadow: var(--shadow-glow);
}

.service-icon i { font-size: 1.5rem; color: white; }

.service-card h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.875rem;
    color: var(--text-primary);
    position: relative;
    z-index: 1;
}

.service-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    position: relative;
    z-index: 1;
    margin: 0;
}

/* ===== Footer ===== */
.site-footer {
    background-color: #0f172a;
    color: rgba(255, 255, 255, 0.5);
    padding: 4rem 0 2rem;
    position: relative;
    overflow: hidden;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(79, 70, 229, 0.6), transparent);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand-name {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 800;
    color: white;
    margin-bottom: 0.875rem;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.footer-brand-icon {
    width: 30px; height: 30px;
    background: var(--gradient-primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    color: white;
}

.footer-desc {
    font-size: 0.875rem;
    line-height: 1.75;
    max-width: 260px;
    margin-bottom: 1.5rem;
}

.footer-social { display: flex; gap: 0.625rem; }

.footer-social-link {
    width: 34px; height: 34px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.45);
    text-decoration: none;
    font-size: 0.8rem;
    transition: all var(--transition-fast);
}

.footer-social-link:hover {
    background: var(--gradient-primary);
    border-color: transparent;
    color: white;
    transform: translateY(-2px);
}

.footer-col-title {
    font-family: var(--font-display);
    font-size: 0.875rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1.25rem;
}

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

.footer-links li a {
    color: rgba(255, 255, 255, 0.45);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color var(--transition-fast);
}

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

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    gap: 1rem;
}

.footer-bottom-links {
    display: flex;
    gap: 1.5rem;
}

.footer-bottom-links a {
    color: rgba(255, 255, 255, 0.35);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

/* ===== Instructor Pages ===== */
.instructors-section { padding: var(--section-padding) 0; }

.instructor-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.instructor-card {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all var(--transition-normal);
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-card);
}

.instructor-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(79, 70, 229, 0.12);
    border-color: rgba(79, 70, 229, 0.2);
}

.instructor-avatar {
    width: 100%; height: 220px;
    overflow: hidden; position: relative;
}

.instructor-avatar img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.instructor-card:hover .instructor-avatar img { transform: scale(1.05); }

.instructor-info { padding: 1.5rem; flex-grow: 1; }

.instructor-name {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.375rem;
}

.instructor-title {
    font-size: 0.8rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.875rem;
}

.instructor-bio {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.instructor-expertise {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.expertise-tag {
    background: var(--primary-light);
    color: var(--primary-color);
    padding: 0.22rem 0.625rem;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 600;
}

.view-profile {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.875rem;
    transition: all var(--transition-fast);
}

.instructor-card:hover .view-profile {
    background: var(--primary-light);
    gap: 0.75rem;
}

.view-profile i { transition: transform var(--transition-fast); }
.instructor-card:hover .view-profile i { transform: translateX(4px); }

.join-section {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
    padding: 4rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.join-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.05) 1px, transparent 0);
    background-size: 32px 32px;
}

.join-section h2 {
    font-family: var(--font-display);
    font-size: 1.875rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.875rem;
    position: relative;
    z-index: 1;
}

.join-section p {
    color: rgba(255, 255, 255, 0.65);
    max-width: 500px;
    margin: 0 auto 2rem;
    line-height: 1.7;
    position: relative;
    z-index: 1;
}

/* ===== Auth Pages ===== */
.auth-section {
    min-height: calc(100vh - 160px);
    display: flex;
    background: var(--bg-light);
}

.auth-split {
    display: flex;
    width: 100%;
    min-height: calc(100vh - 160px);
}

.auth-panel-left {
    flex: 0 0 42%;
    background: var(--gradient-hero);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    overflow: hidden;
}

.auth-panel-left::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 30% 30%, rgba(99, 102, 241, 0.5) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 70%, rgba(139, 92, 246, 0.4) 0%, transparent 50%);
}

.auth-panel-left::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.06) 1px, transparent 0);
    background-size: 28px 28px;
}

.auth-brand-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
}

.auth-brand-logo {
    width: 64px; height: 64px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin: 0 auto 1.5rem;
    backdrop-filter: blur(8px);
}

.auth-brand-title {
    font-family: var(--font-display);
    font-size: 1.875rem;
    font-weight: 800;
    color: white;
    margin-bottom: 0.875rem;
    letter-spacing: -0.03em;
}

.auth-brand-tagline {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.75;
    max-width: 300px;
    margin: 0 auto 2rem;
}

.auth-features {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    text-align: left;
    max-width: 280px;
    margin: 0 auto;
}

.auth-feature {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.875rem;
    font-weight: 500;
}

.auth-feature i {
    width: 28px; height: 28px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.auth-panel-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    background: var(--bg-white);
}

.auth-form-container {
    width: 100%;
    max-width: 420px;
}

.auth-form-header { margin-bottom: 2rem; }

.auth-form-header h1 {
    font-family: var(--font-display);
    font-size: 1.875rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    letter-spacing: -0.03em;
}

.auth-form-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0;
}

.form-group { margin-bottom: 1.25rem; }

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.input-wrapper { position: relative; }

.form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    background-color: var(--bg-gray);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: var(--font-body);
    transition: all var(--transition-fast);
}

.form-control:focus {
    border-color: var(--primary-color);
    background-color: white;
    box-shadow: 0 0 0 3px var(--primary-light);
    outline: none;
}

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

.password-toggle {
    position: absolute;
    right: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    font-size: 0.9rem;
    transition: color var(--transition-fast);
}

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

.text-danger {
    color: #ef4444 !important;
    font-size: 0.8rem;
    margin-top: 0.375rem;
    display: block;
    font-weight: 500;
}

.alert-danger {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 0.875rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-check-input {
    width: 16px; height: 16px;
    border-radius: 4px;
    border: 1.5px solid var(--border-color);
    cursor: pointer;
    accent-color: var(--primary-color);
}

.form-check-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    cursor: pointer;
}

.auth-footer-text {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.auth-footer-text a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

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

/* ===== My Courses ===== */
.my-courses-section { padding: 3rem 0; }

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

.my-course-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-normal);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
}

.my-course-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(79, 70, 229, 0.15);
}

.my-course-card .course-image {
    position: relative;
    padding-top: 56.25%;
    overflow: hidden;
    height: auto;
}

.my-course-card .course-image img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.my-course-card:hover .course-image img { transform: scale(1.04); }

.progress-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(79,70,229,0.85) 0%, rgba(124,58,237,0.85) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.my-course-card:hover .progress-overlay { opacity: 1; }

.progress-circle {
    width: 72px; height: 72px;
    border-radius: 50%;
    background: conic-gradient(rgba(255,255,255,0.9) calc(var(--progress, 0) * 1%), rgba(255,255,255,0.2) 0);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.progress-circle::before {
    content: '';
    position: absolute;
    width: 52px; height: 52px;
    background: rgba(79, 70, 229, 0.9);
    border-radius: 50%;
}

.progress-circle span {
    position: relative;
    z-index: 1;
    color: white;
    font-weight: 700;
    font-size: 0.875rem;
    font-family: var(--font-display);
}

.my-course-card .course-content {
    padding: 1.25rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.my-course-card h3 {
    font-family: var(--font-display);
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 700;
}

.enrolled-date {
    color: var(--text-muted);
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.progress-bar-container {
    height: 6px;
    background: var(--bg-gray);
    border-radius: 100px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 100px;
    transition: width 0.8s ease;
}

.course-actions { margin-top: auto; }
.course-actions .btn { width: 100%; justify-content: center; }

.empty-state {
    text-align: center;
    padding: 5rem 2rem;
    background: var(--bg-white);
    border-radius: var(--radius-2xl);
    border: 1px solid var(--border-color);
}

.empty-icon {
    width: 96px; height: 96px;
    background: var(--gradient-primary);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: var(--shadow-glow);
}

.empty-icon i { font-size: 2.5rem; color: white; }

.empty-state h3 {
    font-family: var(--font-display);
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.625rem;
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* ===== Breadcrumb ===== */
.breadcrumb { background: transparent; margin: 0; padding: 0; }
.breadcrumb-item a { color: var(--text-secondary); text-decoration: none; font-size: 0.875rem; transition: color var(--transition-fast); }
.breadcrumb-item a:hover { color: var(--primary-color); }
.breadcrumb-item.active { color: var(--text-primary); font-size: 0.875rem; }
.breadcrumb-item + .breadcrumb-item::before { color: var(--text-muted); }

/* ===== Scroll Top ===== */
.scroll-top {
    position: fixed;
    bottom: 2rem; right: 2rem;
    width: 44px; height: 44px;
    background: var(--gradient-primary);
    border: none; border-radius: 50%;
    color: white; font-size: 1rem;
    cursor: pointer;
    opacity: 0;
    transform: translateY(16px);
    transition: all var(--transition-normal);
    z-index: 100;
    box-shadow: var(--shadow-lg);
    display: flex; align-items: center; justify-content: center;
}

.scroll-top.visible { opacity: 1; transform: translateY(0); }
.scroll-top:hover { box-shadow: var(--shadow-glow); transform: translateY(-2px); }

/* ===== Responsive ===== */
@media (max-width: 1199px) {
    :root { --section-padding: 4rem; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

@media (max-width: 991px) {
    :root { --section-padding: 3.5rem; }
    .hero-section { padding: 4rem 0 3rem; }
    .hero-image-area { margin-top: 2.5rem; }
    .auth-panel-left { display: none; }
    .auth-panel-right { padding: 2rem 1.5rem; }
    .search-box { width: 100%; margin-top: 0.75rem; }
    .search-box input { width: 100%; }
}

@media (max-width: 767px) {
    :root { --section-padding: 3rem; }
    .hero-section { padding: 3rem 0 2.5rem; min-height: auto; }
    .hero-title { font-size: 1.875rem; }
    .hero-buttons { flex-direction: column; }
    .hero-buttons a, .hero-buttons .btn { width: 100%; justify-content: center; }
    .hero-stats { gap: 1.25rem; }
    .hero-stat-number { font-size: 1.375rem; }
    .hero-stat-divider { display: none; }
    .footer-grid { grid-template-columns: 1fr; gap: 1.75rem; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .courses-grid { grid-template-columns: 1fr; }
    .page-header { padding: 3rem 0; }
}

@media (min-width: 768px) {
    html { font-size: 16px; }
}
