/**
 * vSkul Frontend - Main Styles
 * Mobile-First Responsive Design
 * Starry Night Blue Theme
 */

/* ===================================
   CSS VARIABLES
   =================================== */
:root {
    /* Colors - Starry Night Blue */
    --vskul-navy: #003366;
    --vskul-blue: #0f52ba;
    --vskul-light-blue: #4a90e2;
    --vskul-dark: #001a33;
    
    /* Grays */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* Semantic Colors */
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
    
    /* Typography */
    --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-heading: var(--font-body);
    
    /* Transitions */
    --transition: 0.2s ease;
    
    /* Header Height */
    --header-height: 70px;
}

/* ===================================
   RESET & BASE
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

html, body {
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden;
}

body {
    position: relative;
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--gray-800);
    background: #fff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-top: var(--header-height) !important;  /* ADD THIS LINE */
}

/* ===================================
   TYPOGRAPHY
   =================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
    color: var(--gray-900);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: var(--spacing-sm);
}

a {
    color: var(--vskul-blue);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--vskul-navy);
}

/* ===================================
   LAYOUT
   =================================== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.main-content {
    margin-top: 0;
    padding-top: 0;
}

/* Skip Link (Accessibility) */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--vskul-navy);
    color: white;
    padding: var(--spacing-sm);
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* ===================================
   HEADER
   =================================== */
.main-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    margin: 0 !important;
    background: white;
    box-shadow: var(--shadow-sm);
    z-index: 1000 !important;
    height: var(--header-height);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-sm) 0;
    gap: var(--spacing-md);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
}

.logo-text {
    width: 80px;
    height: 30px;
}

/* Desktop Navigation */
.main-nav {
    display: none;
    gap: var(--spacing-lg);
}

.nav-link {
    color: var(--gray-700);
    font-weight: 500;
    padding: var(--spacing-xs) 0;
    border-bottom: 2px solid transparent;
}

.nav-link:hover,
.nav-link.active {
    color: var(--vskul-blue);
    border-bottom-color: var(--vskul-blue);
}

/* Search */
.search-container {
    flex: 1;
    max-width: 500px;
    display: none;
}

.search-form {
    display: flex;
    background: var(--gray-100);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.75rem var(--spacing-md);
    font-size: 0.95rem;
}

.search-input:focus {
    outline: none;
}

.search-btn {
    background: transparent;
    border: none;
    padding: 0 var(--spacing-md);
    cursor: pointer;
    color: var(--gray-600);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--vskul-navy), var(--vskul-blue));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-xs);
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--gray-700);
    transition: var(--transition);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 100;
    display: none;
}

.mobile-menu-overlay.active {
    display: block;
}

.mobile-menu {
    position: absolute;
    top: 0;
    right: 0;
    width: 80%;
    max-width: 300px;
    height: 100%;
    background: white;
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-xl);
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.mobile-menu-overlay.active .mobile-menu {
    transform: translateX(0);
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--gray-600);
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.mobile-nav a {
    padding: var(--spacing-sm);
    color: var(--gray-700);
    font-weight: 500;
    border-radius: var(--radius-sm);
}

.mobile-nav a:hover {
    background: var(--gray-100);
}

.mobile-nav hr {
    border: none;
    border-top: 1px solid var(--gray-200);
    margin: var(--spacing-sm) 0;
}

/* ===================================
   BUTTONS
   =================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    line-height: 1;
    gap: 0.5rem;
    min-height: 44px; /* Touch-friendly */
}

.btn-primary {
    background: linear-gradient(135deg, var(--vskul-navy), var(--vskul-blue));
    color: white;
    padding: 5px;
    border-radius:5px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--gray-200);
    color: var(--gray-800);
}

.btn-secondary:hover {
    background: var(--gray-300);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-white {
    background: white;
    color: var(--vskul-navy);
}

.btn-outline-white {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-text {
    background: none;
    color: var(--gray-700);
    padding: 0.5rem 1rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-block {
    width: 100%;
}

/* ===================================
   GRADIENT BACKGROUND
   =================================== */
.gradient-bg {
    background: linear-gradient(135deg, var(--vskul-navy) 0%, var(--vskul-blue) 100%);
    color: white;
}

/* ===================================
   HERO SECTION
   =================================== */
.hero {
    padding: var(--spacing-2xl) 0;
    text-align: center;
}

.hero-title {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-md);
    color: white;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-xl);
    opacity: 0.95;
}

.hero-cta {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    align-items: center;
}

/* ===================================
   SECTIONS
   =================================== */
section {
    padding: var(--spacing-2xl) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.section-header h2 {
    font-size: 2rem;
    margin-bottom: var(--spacing-sm);
}

.section-header p {
    font-size: 1.125rem;
    color: var(--gray-600);
}

.section-cta {
    text-align: center;
    margin-top: var(--spacing-xl);
}

/* ===================================
   GRIDS
   =================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
}

.stat-item {
    text-align: center;
    padding: var(--spacing-lg);
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--vskul-blue);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--gray-600);
    font-size: 0.95rem;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
}

.category-card {
    background: white;
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.category-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-sm);
}

/* ===================================
   COURSES GRID - 2 COLUMNS MAX
   =================================== */

/* Mobile: 1 column */
.courses-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
}

/* Tablet and up: 2 columns */
@media (min-width: 768px) {
    .courses-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop: Still 2 columns (removed the 3-4 column layouts) */
@media (min-width: 1024px) {
    .courses-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Large Desktop: Still 2 columns */
@media (min-width: 1280px) {
    .courses-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===================================
   COURSE CARDS
   =================================== */
.course-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.course-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.course-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 */
    overflow: hidden;
    background: var(--gray-200);
}

.course-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.course-thumbnail-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.course-duration {
    position: absolute;
    bottom: var(--spacing-xs);
    right: var(--spacing-xs);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
}

.course-info {
    padding: var(--spacing-md);
}

.course-teacher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: var(--spacing-sm);
    font-size: 0.875rem;
    color: var(--gray-600);
}

.teacher-avatar {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-full);
    background: var(--vskul-blue);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
}

.course-title {
    font-size: 1.125rem;
    margin-bottom: var(--spacing-sm);
}

.course-title a {
    color: var(--gray-900);
}

.course-meta {
    display: flex;
    gap: var(--spacing-md);
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-bottom: var(--spacing-sm);
}

.course-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--vskul-blue);
}

/* ===================================
   BADGES
   =================================== */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-full);
}

.badge-success {
    background: var(--success);
    color: white;
}

.badge-beginner {
    background: var(--success);
    color: white;
}

.badge-intermediate {
    background: var(--warning);
    color: white;
}

.badge-advanced {
    background: var(--error);
    color: white;
}

/* ===================================
   FORMS
   =================================== */
.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--gray-700);
}

.form-input,
.form-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: var(--transition);
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--vskul-blue);
    box-shadow: 0 0 0 3px rgba(15, 82, 186, 0.1);
}

/* ===================================
   FLASH MESSAGES
   =================================== */
.flash-message {
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    border-radius: var(--radius-md);
}

.flash-success {
    background: #d1fae5;
    color: #065f46;
}

.flash-error {
    background: #fee2e2;
    color: #991b1b;
}

/* ===================================
   FOOTER
   =================================== */
.main-footer {
    background: var(--gray-900);
    color: var(--gray-400);
    padding: var(--spacing-2xl) 0 var(--spacing-lg);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.footer-logo-icon,
.footer-logo-text {
    margin-bottom: var(--spacing-sm);
}

.footer-logo-icon {
    width: 40px;
}

.footer-logo-text {
    width: 80px;
}

.social-links {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
}

.social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    background: var(--gray-800);
    color: var(--gray-400);
    transition: var(--transition);
}

.social-link:hover {
    background: var(--vskul-blue);
    color: white;
}

.footer-col h4 {
    color: white;
    font-size: 1rem;
    margin-bottom: var(--spacing-sm);
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 0.5rem;
}

.footer-col a {
    color: var(--gray-400);
}

.footer-col a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid var(--gray-800);
    padding-top: var(--spacing-lg);
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: var(--spacing-lg);
    margin-top: var(--spacing-sm);
}

/* ===================================
   PROGRESS BAR
   =================================== */
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--gray-200);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--vskul-navy), var(--vskul-blue));
    transition: width 0.3s ease;
}

/* ===================================
   EMPTY STATES
   =================================== */
.empty-state {
    text-align: center;
    padding: var(--spacing-2xl);
}

.empty-state h3 {
    margin-bottom: var(--spacing-sm);
}

.empty-state p {
    color: var(--gray-600);
    margin-bottom: var(--spacing-lg);
}

.logo img,
.logo-icon,
.logo-text {
    background: white !important;
    mix-blend-mode: darken; /* Or 'multiply' */
}
