/* ============================================
   TRAINING PAGE SPECIFIC STYLES
   ============================================ */

/* Hero Section - Matches Home page dark theme */
.training-hero {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
    padding: calc(80px + var(--space-16)) var(--space-6) var(--space-16);
    overflow: hidden;
    background: #040a18;
}

.training-hero .hero-content {
    position: relative;
    z-index: 10;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    display: block;
    grid-template-columns: unset;
    gap: unset;
}

.training-hero .hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--cyan);
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
    animation: fadeUp 1s ease-out 0.3s both;
}

.training-hero .badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--cyan);
    animation: blink 2s ease-in-out infinite;
    box-shadow: 0 0 8px var(--cyan);
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    color: var(--white);
    line-height: 1.1;
    margin-bottom: var(--space-6);
    letter-spacing: -1.5px;
    animation: fadeUp 1s ease-out 0.5s both;
}

.hero-subtitle {
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    color: var(--white-dim);
    margin-bottom: var(--space-8);
    line-height: 1.8;
    font-weight: 300;
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeUp 1s ease-out 0.7s both;
}

/* Search Bar */
.search-bar {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: var(--space-8);
}

.search-icon {
    position: absolute;
    left: 12px;
    color: #9B968A;
    pointer-events: none;
}

.search-bar input {
    width: 100%;
    padding: var(--space-3) var(--space-4) var(--space-3) 38px;
    border: 2px solid #D1D9E6;
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: var(--font-sans);
    color: var(--navy-mid);
    background: #FFFFFF;
    transition: all 0.2s ease;
}

.search-bar input::placeholder {
    color: #9B968A;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--blue-primary);
    box-shadow: 0 0 0 4px rgba(59,130,246,0.1);
}

.clear-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--gray-200);
    border: none;
    color: var(--gray-600);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.clear-btn:hover {
    background: var(--gray-300);
}

/* ============================================
   DELIVERY MODES - COMPACT
   ============================================ */

.delivery-modes-compact {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
    justify-content: center;
    animation: fadeUp 1s ease-out 1.1s both;
}

.delivery-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-5);
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50px;
    color: var(--white-dim);
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.delivery-badge:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    color: var(--white);
}

.delivery-badge.featured {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
    color: var(--blue-light);
}

.delivery-badge.featured:hover {
    background: rgba(59, 130, 246, 0.25);
}

.delivery-badge svg {
    width: 18px;
    height: 18px;
}

/* ============================================
   COURSE CATALOG - Matches Home light theme
   ============================================ */

.course-catalog {
    padding: var(--space-16) 0;
    background: var(--section-bg);
    background-image: none;
    position: relative;
}

.course-catalog::before {
    content: '';
    position: absolute;
    top: -120px;
    left: 50%;
    transform: translateX(-50%);
    width: 700px;
    height: 500px;
    background: radial-gradient(ellipse, rgba(59,130,246,0.06) 0%, transparent 70%);
    pointer-events: none;
}

.catalog-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: var(--space-10);
}

/* Filters Sidebar */
.filters-sidebar {
    position: sticky;
    top: 100px;
    align-self: start;
}

.filter-section {
    background: #FFFFFF;
    border-radius: 20px;
    padding: var(--space-8);
    border: 1px solid #D1D9E6;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: var(--shadow-sm);
}

/* Custom scrollbar styling */
.filter-section::-webkit-scrollbar {
    width: 8px;
}

.filter-section::-webkit-scrollbar-track {
    background: #E2E6EF;
    border-radius: 10px;
}

.filter-section::-webkit-scrollbar-thumb {
    background: var(--blue-primary);
    border-radius: 10px;
}

.filter-section::-webkit-scrollbar-thumb:hover {
    background: var(--blue-light);
}

/* Firefox scrollbar */
.filter-section {
    scrollbar-width: thin;
    scrollbar-color: var(--blue-primary) #E2E6EF;
}

.filter-title {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: 1.5rem;
    color: var(--navy-mid);
    margin-bottom: var(--space-6);
}

.filter-title svg {
    color: var(--blue-primary);
}

.filter-group {
    margin-bottom: var(--space-8);
}

.filter-group h4 {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--navy);
    opacity: 0.6;
    margin-bottom: var(--space-4);
    font-weight: 600;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.filter-option {
    display: flex;
    align-items: center;
    padding: var(--space-3);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.filter-option:hover {
    background: rgba(59, 130, 246, 0.04);
}

.filter-option input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #D1D9E6;
    border-radius: 6px;
    margin-right: var(--space-3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.filter-option input:checked ~ .checkmark {
    background: var(--blue-primary);
    border-color: var(--blue-primary);
}

.filter-option input:checked ~ .checkmark::after {
    content: '\2713';
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
}

.option-label {
    flex: 1;
    font-size: 0.95rem;
    color: var(--navy-mid);
}

.option-count {
    font-size: 0.75rem;
    color: var(--navy);
    opacity: 0.5;
    background: #E2E6EF;
    padding: var(--space-1) var(--space-2);
    border-radius: 6px;
    font-weight: 600;
}

/* Toolbar */
.list-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-8);
    flex-wrap: wrap;
    gap: var(--space-4);
}

.results-title {
    font-size: 1.5rem;
    color: var(--navy-mid);
    font-weight: 700;
}

.results-title span {
    color: var(--blue-primary);
}

.toolbar-right {
    display: flex;
    gap: var(--space-4);
    align-items: center;
}

.sort-label {
    font-size: 0.95rem;
    color: var(--navy);
    opacity: 0.6;
    font-weight: 500;
}

.sort-select {
    padding: var(--space-3) var(--space-4);
    border: 2px solid #D1D9E6;
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: var(--font-sans);
    color: var(--navy-mid);
    background: #FFFFFF;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sort-select:hover {
    border-color: var(--blue-primary);
}

.view-toggle {
    display: flex;
    gap: var(--space-2);
    background: #D1D9E6;
    padding: var(--space-1);
    border-radius: 10px;
}

.view-btn {
    padding: var(--space-2);
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    color: var(--navy);
    opacity: 0.5;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.view-btn:hover {
    color: var(--blue-primary);
    opacity: 1;
}

.view-btn.active {
    background: #FFFFFF;
    color: var(--blue-primary);
    opacity: 1;
    box-shadow: var(--shadow-sm);
}

/* Course Grid */
.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-6);
    transition: all 0.3s ease;
}

.course-grid.list-view {
    grid-template-columns: 1fr;
}

.course-card {
    background: #FFFFFF;
    border: 2px solid #D1D9E6;
    border-radius: 16px;
    padding: var(--space-6);
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.course-card:hover {
    transform: translateY(-4px);
    box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px;
    border-color: var(--blue-primary);
}

.course-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-4);
}

.course-duration {
    font-size: 0.875rem;
    color: var(--navy);
    opacity: 0.6;
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.course-duration svg {
    color: var(--blue-primary);
}

.course-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--navy-mid);
    margin-bottom: var(--space-3);
    line-height: 1.4;
}

.course-meta {
    display: flex;
    gap: var(--space-4);
    flex-wrap: wrap;
}

.meta-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 0.875rem;
    color: var(--navy);
    opacity: 0.6;
}

.meta-badge svg {
    color: var(--blue-primary);
    width: 14px;
    height: 14px;
}

.category-badge {
    display: inline-block;
    padding: var(--space-1) var(--space-3);
    background: #E2E6EF;
    color: var(--navy-mid);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid #D1D9E6;
}

/* List View Styling */
.course-grid.list-view .course-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: var(--space-6);
    align-items: center;
}

.course-grid.list-view .course-card-header {
    margin: 0;
}

/* No Results */
.no-results {
    text-align: center;
    padding: var(--space-20) var(--space-6);
}

.no-results svg {
    color: #D1D9E6;
    margin-bottom: var(--space-6);
}

.no-results h3 {
    font-size: 1.5rem;
    color: var(--navy-mid);
    margin-bottom: var(--space-3);
}

.no-results p {
    color: var(--navy);
    opacity: 0.6;
    margin-bottom: var(--space-6);
}

.btn-lg {
    padding: var(--space-5) var(--space-8);
    font-size: 1.125rem;
}

.btn-block {
    width: 100%;
}

/* Clear Filters Button */
.course-catalog .btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid #D1D9E6;
    background: #FFFFFF;
    color: var(--navy);
    opacity: 0.7;
    cursor: pointer;
}

.course-catalog .btn-outline:hover {
    background: var(--blue-primary);
    border-color: var(--blue-primary);
    color: #fff;
    opacity: 1;
    box-shadow: 0 4px 20px rgba(59,130,246,0.3);
}

/* ============================================
   CTA SECTION - Matches Home dark sections
   ============================================ */

.cta-section {
    padding: var(--space-16) var(--space-6);
    background: #0a1120;
    text-align: center;
    display: block;
    gap: unset;
    margin-top: 0;
    padding-top: var(--space-16);
    border-top: none;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(59,130,246,0.15), transparent);
}

.cta-content h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--text-primary);
    margin-bottom: var(--space-4);
}

.cta-content p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-8);
}

.cta-buttons {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1200px) {
    .catalog-layout {
        grid-template-columns: 280px 1fr;
    }
}

@media (max-width: 992px) {
    .catalog-layout {
        grid-template-columns: 1fr;
    }

    .filters-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .training-hero {
        padding-top: calc(70px + var(--space-8));
        min-height: 70vh;
    }

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

    .toolbar-right {
        width: 100%;
        flex-direction: column;
    }

    .sort-select {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .delivery-modes-compact {
        padding: 0 var(--space-4);
    }

    .delivery-badge {
        padding: var(--space-2) var(--space-4);
        font-size: 0.8rem;
    }

    .delivery-badge svg {
        width: 16px;
        height: 16px;
    }
}
