/* ============================================================
   COURSES.CSS - British Training Institute
   Professional Courses Page Styles
   ============================================================ */

/* ============================================================
   CSS VARIABLES
   ============================================================ */
:root {
    --red: #8B0000;
    --red-dark: #6b0000;
    --gold: #D4AF37;
    --gold-dark: #c9a227;
    --black: #111111;
    --dark: #1a1a2e;
    --text: #333333;
    --text-light: #666666;
    --bg-light: #f8f9fa;
    --border: #e9ecef;
    --white: #ffffff;
    --shadow-sm: 0 5px 20px rgba(0,0,0,0.06);
    --shadow-md: 0 10px 40px rgba(0,0,0,0.08);
    --shadow-lg: 0 25px 60px rgba(0,0,0,0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   HERO
   ============================================================ */
.courses-hero {
    position: relative;
    padding: 100px 0 80px;
    background: linear-gradient(135deg, #111 0%, #1a1a2e 60%, #8B0000 130%);
    overflow: hidden;
    color: white;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 15% 25%, rgba(212, 175, 55, 0.18) 0%, transparent 45%),
        radial-gradient(circle at 85% 75%, rgba(139, 0, 0, 0.25) 0%, transparent 45%),
        repeating-linear-gradient(45deg,
            transparent, transparent 40px,
            rgba(255,255,255,0.02) 40px, rgba(255,255,255,0.02) 41px);
    pointer-events: none;
}

.courses-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to top, #f8f9fa, transparent);
    pointer-events: none;
    z-index: 1;
}

.courses-hero .container { position: relative; z-index: 2; }

.hero-inner {
    text-align: center;
    max-width: 850px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid rgba(212, 175, 55, 0.35);
    color: #D4AF37;
    padding: 9px 20px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 22px;
    backdrop-filter: blur(10px);
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 18px;
    background: linear-gradient(135deg, #fff 30%, #D4AF37 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.75);
    line-height: 1.7;
    margin: 0 0 32px;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}

/* ===== Search ===== */
.hero-search {
    max-width: 650px;
    margin: 0 auto 25px;
    display: flex;
    align-items: center;
    background: white;
    border-radius: 60px;
    padding: 6px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    border: 2px solid rgba(255,255,255,0.1);
    transition: var(--transition);
}

.hero-search:focus-within {
    box-shadow: 0 25px 70px rgba(212, 175, 55, 0.4);
    transform: translateY(-3px);
    border-color: rgba(212, 175, 55, 0.5);
}

.search-icon {
    color: #D4AF37;
    font-size: 18px;
    padding: 0 20px;
}

.hero-search input {
    flex: 1;
    border: none;
    outline: none;
    padding: 14px 0;
    font-size: 15px;
    font-family: 'Tajawal', sans-serif;
    color: #111;
    background: transparent;
}

.hero-search input::placeholder { color: #999; }

.search-btn {
    background: linear-gradient(135deg, #D4AF37, #c9a227);
    color: #111;
    border: none;
    padding: 12px 26px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
}

.search-btn:hover {
    background: linear-gradient(135deg, #8B0000, #6b0000);
    color: white;
    transform: translateX(-3px);
}

/* ===== Breadcrumb ===== */
.hero-breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 10px 22px;
    border-radius: 50px;
    font-size: 13px;
}

.hero-breadcrumb a {
    color: #D4AF37;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.hero-breadcrumb a:hover { color: white; }
.hero-breadcrumb .separator { color: rgba(255,255,255,0.4); font-size: 10px; }
.hero-breadcrumb .current { color: rgba(255,255,255,0.75); }

/* ============================================================
   STATS BAR
   ============================================================ */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin: -45px 0 45px;
    position: relative;
    z-index: 10;
}

.stat-item {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: var(--transition);
    border: 2px solid transparent;
}

.stat-item:hover {
    transform: translateY(-6px);
    border-color: #D4AF37;
    box-shadow: 0 20px 50px rgba(212, 175, 55, 0.2);
}

.stat-icon {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.15), rgba(212, 175, 55, 0.05));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #c9a227;
    font-size: 22px;
    transition: var(--transition);
}

.stat-item:hover .stat-icon {
    background: linear-gradient(135deg, #D4AF37, #c9a227);
    color: #111;
    transform: rotate(-10deg) scale(1.05);
}

.stat-info h5 {
    font-size: 1.5rem;
    color: #111;
    font-weight: 800;
    margin: 0 0 2px;
    line-height: 1;
}

.stat-info span {
    font-size: 13px;
    color: #666;
    font-weight: 600;
}

/* ============================================================
   COURSES SECTION
   ============================================================ */
.courses-section {
    padding: 20px 0 80px;
    background: #f8f9fa;
}

/* ============================================================
   FILTER BAR
   ============================================================ */
.filter-bar {
    background: white;
    border-radius: 18px;
    padding: 25px 30px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 30px;
    border: 1px solid var(--border);
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 18px;
    margin-bottom: 20px;
    border-bottom: 2px solid #f0f2f5;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    color: #111;
    font-size: 15px;
}

.filter-title > i {
    color: #D4AF37;
    font-size: 16px;
}

.reset-filters {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #dc3545;
    text-decoration: none;
    font-size: 12px;
    padding: 5px 12px;
    background: rgba(220, 53, 69, 0.08);
    border-radius: 20px;
    font-weight: 600;
    transition: var(--transition);
    margin-right: auto;
}

.reset-filters:hover {
    background: #dc3545;
    color: white;
}

.results-count {
    font-size: 14px;
    color: #666;
    font-weight: 600;
}

.results-count strong {
    color: #8B0000;
    font-size: 18px;
    margin-left: 4px;
}

.filter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 15px;
    align-items: end;
}

.filter-item label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: #555;
    margin-bottom: 8px;
}

.filter-item label i {
    color: #D4AF37;
    font-size: 12px;
}

.filter-item .form-select {
    width: 100%;
    border: 2px solid var(--border);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 14px;
    font-family: inherit;
    font-weight: 600;
    color: #333;
    transition: var(--transition);
    cursor: pointer;
    background-color: white;
    outline: none;
}

.filter-item .form-select:focus {
    border-color: #D4AF37;
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.1);
}

.view-toggle-item { min-width: 110px; }

.view-toggle {
    display: flex;
    background: #f0f2f5;
    border-radius: 10px;
    padding: 4px;
    gap: 4px;
}

.view-btn {
    flex: 1;
    border: none;
    background: transparent;
    padding: 8px;
    border-radius: 7px;
    cursor: pointer;
    color: #666;
    font-size: 14px;
    transition: var(--transition);
    font-family: inherit;
}

.view-btn:hover { color: #D4AF37; }

.view-btn.active {
    background: white;
    color: #8B0000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* ============================================================
   ACTIVE FILTERS
   ============================================================ */
.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.15), rgba(139, 0, 0, 0.05));
    border: 1px solid rgba(212, 175, 55, 0.4);
    color: #8B0000;
    padding: 8px 14px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
}

.filter-tag > i:first-child { color: #D4AF37; }

.remove-tag {
    color: #dc3545;
    text-decoration: none;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(220, 53, 69, 0.1);
    transition: var(--transition);
    font-size: 10px;
}

.remove-tag:hover {
    background: #dc3545;
    color: white;
}

/* ============================================================
   COURSES GRID
   ============================================================ */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 30px;
}

/* ============================================================
   COURSE CARD
   ============================================================ */
.course-card {
    background: white;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    border: 2px solid transparent;
    position: relative;
}

.course-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(212, 175, 55, 0.3);
}

/* ===== Image ===== */
.course-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: #f0f2f5;
}

.course-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.course-card:hover .course-image img {
    transform: scale(1.1);
}

.image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e, #8B0000);
    color: #D4AF37;
    font-size: 60px;
}

/* ===== Badges ===== */
.course-badges {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 2;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.badge-new {
    background: linear-gradient(135deg, #D4AF37, #c9a227);
    color: #111;
}

.badge-level { color: white; }
.level-green  { background: linear-gradient(135deg, #10b981, #059669); }
.level-orange { background: linear-gradient(135deg, #f97316, #ea580c); }
.level-red    { background: linear-gradient(135deg, #ef4444, #dc2626); }

/* ===== Wishlist ===== */
.wishlist-btn {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
    border: none;
    cursor: pointer;
    color: #666;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    z-index: 2;
}

.wishlist-btn:hover,
.wishlist-btn.active {
    color: #dc3545;
    transform: scale(1.1);
}

/* ===== Body ===== */
.course-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 12px;
}

.course-category {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 700;
    color: #8B0000;
    background: rgba(139, 0, 0, 0.06);
    padding: 4px 12px;
    border-radius: 20px;
    align-self: flex-start;
}

.course-category i {
    color: #D4AF37;
    font-size: 10px;
}

.course-title {
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.4;
    margin: 0;
    color: #111;
}

.course-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s;
}

.course-title a:hover { color: #8B0000; }

.course-desc {
    font-size: 13.5px;
    color: #666;
    line-height: 1.7;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.course-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 0;
    border-top: 1px solid #f0f2f5;
    border-bottom: 1px solid #f0f2f5;
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #666;
    font-weight: 600;
}

.meta-item i {
    color: #D4AF37;
    font-size: 12px;
}

.course-rating {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stars {
    display: inline-flex;
    gap: 2px;
}

.stars i {
    color: #e9ecef;
    font-size: 13px;
}

.stars i.active { color: #D4AF37; }

.rating-text {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #666;
}

.rating-text strong {
    color: #111;
    font-size: 14px;
}

/* ===== Footer ===== */
.course-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #f0f2f5;
}

.course-price {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.price-old {
    font-size: 12px;
    color: #999;
    text-decoration: line-through;
    font-weight: 600;
}

.price-current {
    font-size: 18px;
    font-weight: 800;
    color: #8B0000;
}

.price-free {
    font-size: 16px;
    font-weight: 800;
    color: #10b981;
}

.btn-course {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: linear-gradient(135deg, #D4AF37, #c9a227);
    color: #111;
    padding: 9px 18px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 800;
    font-size: 13px;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-course:hover {
    background: linear-gradient(135deg, #8B0000, #6b0000);
    color: white;
    transform: translateX(-3px);
    box-shadow: 0 8px 25px rgba(139, 0, 0, 0.3);
}

/* ============================================================
   LIST VIEW
   ============================================================ */
.courses-grid.list-view {
    grid-template-columns: 1fr;
}

.courses-grid.list-view .course-card {
    display: grid;
    grid-template-columns: 280px 1fr;
    max-height: 240px;
}

.courses-grid.list-view .course-image {
    height: 100%;
}

.courses-grid.list-view .course-desc {
    -webkit-line-clamp: 2;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
    text-align: center;
    padding: 80px 30px;
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
}

.empty-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 25px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.12), rgba(139, 0, 0, 0.06));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 50px;
    color: #D4AF37;
}

.empty-state h3 {
    font-size: 1.6rem;
    color: #111;
    font-weight: 800;
    margin: 0 0 12px;
}

.empty-state p {
    color: #666;
    font-size: 15px;
    margin: 0 0 30px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.empty-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-empty {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 28px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 14px;
    text-decoration: none;
    transition: var(--transition);
}

.btn-empty.primary {
    background: linear-gradient(135deg, #D4AF37, #c9a227);
    color: #111;
}

.btn-empty.primary:hover {
    background: linear-gradient(135deg, #8B0000, #6b0000);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(139, 0, 0, 0.3);
}

.btn-empty.outline {
    border: 2px solid #8B0000;
    color: #8B0000;
    background: transparent;
}

.btn-empty.outline:hover {
    background: #8B0000;
    color: white;
}

/* ============================================================
   CTA SECTION
   ============================================================ */
.cta-section {
    padding: 60px 0;
    background: #f8f9fa;
}

.cta-box {
    background: linear-gradient(135deg, #111 0%, #1a1a2e 100%);
    border-radius: 25px;
    padding: 55px 50px;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 25px 70px rgba(0,0,0,0.15);
}

.cta-decoration {
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.18) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 15s ease-in-out infinite;
}

.cta-decoration::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -15%;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(139, 0, 0, 0.25) 0%, transparent 70%);
    border-radius: 50%;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%      { transform: translate(-30px, 30px) scale(1.1); }
}

.cta-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin: 0 auto;
}

.cta-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid rgba(212, 175, 55, 0.35);
    color: #D4AF37;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 20px;
}

.cta-content h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin: 0 0 15px;
    background: linear-gradient(135deg, #fff 30%, #D4AF37 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.3;
}

.cta-content p {
    color: rgba(255,255,255,0.75);
    font-size: 15.5px;
    line-height: 1.7;
    margin: 0 0 30px;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 800;
    font-size: 14px;
    transition: var(--transition);
}

.btn-cta.primary {
    background: linear-gradient(135deg, #D4AF37, #c9a227);
    color: #111;
}

.btn-cta.primary:hover {
    background: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255,255,255,0.2);
    color: #111;
}

.btn-cta.whatsapp {
    background: #25d366;
    color: white;
}

.btn-cta.whatsapp:hover {
    background: #1ebe5b;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.4);
    color: white;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    25%      { transform: scale(1.3); }
    50%      { transform: scale(1.1); }
    75%      { transform: scale(1.25); }
}

.wishlist-btn.animating i {
    animation: heartBeat 0.6s ease;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1200px) {
    .courses-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 991px) {
    .courses-hero {
        padding: 80px 0 60px;
    }

    .hero-title { font-size: 2.4rem; }
    .hero-subtitle { font-size: 1rem; }

    .stats-bar {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-top: -30px;
    }

    .filter-grid {
        grid-template-columns: 1fr 1fr;
    }

    .filter-grid .view-toggle-item {
        grid-column: 1 / -1;
    }

    .courses-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .courses-grid.list-view .course-card {
        grid-template-columns: 240px 1fr;
        max-height: 260px;
    }

    .cta-content h2 { font-size: 1.8rem; }
}

@media (max-width: 768px) {
    .courses-grid {
        grid-template-columns: 1fr;
    }

    .courses-grid.list-view .course-card {
        grid-template-columns: 1fr;
        max-height: none;
    }

    .courses-grid.list-view .course-image {
        height: 200px;
    }
}

@media (max-width: 576px) {
    .courses-hero {
        padding: 60px 0 50px;
    }

    .hero-title { font-size: 1.9rem; }
    .hero-subtitle { font-size: 0.95rem; }
    .hero-badge { font-size: 11px; padding: 7px 14px; }

    .hero-search {
        flex-direction: column;
        border-radius: 15px;
        padding: 10px;
    }

    .hero-search input {
        padding: 12px 15px;
        text-align: center;
    }

    .search-icon { display: none; }

    .search-btn {
        width: 100%;
        justify-content: center;
    }

    .stats-bar {
        grid-template-columns: 1fr;
        margin-top: -20px;
    }

    .stat-item { padding: 15px; gap: 12px; }
    .stat-icon { width: 44px; height: 44px; font-size: 18px; }
    .stat-info h5 { font-size: 1.2rem; }

    .filter-bar {
        padding: 18px 20px;
        border-radius: 14px;
    }

    .filter-header {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-grid {
        grid-template-columns: 1fr;
    }

    .course-image { height: 180px; }
    .course-title { font-size: 1.05rem; }

    .course-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .btn-course { justify-content: center; }

    .cta-box {
        padding: 40px 25px;
        border-radius: 18px;
    }

    .cta-content h2 { font-size: 1.5rem; }

    .cta-buttons { flex-direction: column; }
    .btn-cta { justify-content: center; }
}