/* ============================================================
   COURSES / OLYMPIAD PAGE STYLES
   ============================================================ */

/* Header z-index fix so navbar stays above hero overlay */
header {
    position: relative;
    z-index: 10;
}

/* Hero Override */
.courses-hero {
    background-image: url('https://images.unsplash.com/photo-1509062522246-3755977927d7?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80') !important;
    background-position: center top;
    background-color: #0E212F; /* fallback */
    position: relative;
}
.courses-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, rgba(14,33,47,0.78) 0%, rgba(14,33,47,0.35) 60%, rgba(14,33,47,0.1) 100%);
    z-index: 0;
}
.courses-hero .container { position: relative; z-index: 1; }

/* ============================================================
   WHY STUDENTS WIN WITH US
   ============================================================ */
.why-win-section {
    padding: 90px 0 70px;
    background: #ffffff;
}

/* Left Side */
.why-win-left { padding-top: 8px; }
.why-title {
    font-size: 34px;
    font-weight: 700;
    color: #0E212F;
    margin-bottom: 6px;
    line-height: 1.25;
}
.why-title .teal-text { color: #047185; }
.why-subtitle {
    font-size: 16px;
    color: #777777;
    margin-bottom: 36px;
}
.why-subtitle .gold-text {
    color: #FEBC5A;
    font-weight: 600;
}
.why-illustration {
    max-width: 300px;
}
.why-illustration svg {
    width: 100%;
    height: auto;
    display: block;
}

/* Right Side */
.why-win-right {
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding-top: 8px;
    padding-left: 10px;
}
.win-feature { display: flex; flex-direction: column; gap: 6px; }
.win-tag {
    display: inline-block;
    background: #047185;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    padding: 7px 16px;
    border-radius: 4px;
    width: fit-content;
    letter-spacing: 0.2px;
}
.win-feature p {
    font-size: 13px;
    color: #666666;
    line-height: 1.6;
    margin: 0;
    padding-left: 2px;
    max-width: 480px;
}

/* ============================================================
   OLYMPIAD CARDS SECTION
   ============================================================ */
.olympiad-cards-section {
    padding: 50px 0 30px;
    
}

/* Class Bar */
.class-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #047185;
    color: #ffffff;
    padding: 18px 28px;
    border-radius: 10px;
    cursor: pointer;
    margin-bottom: 24px;
    transition: all 0.3s ease;
}
.class-bar:hover { background: #065e6d; }
.class-bar h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}
.class-bar .toggle-icon {
    font-size: 20px;
    transition: transform 0.3s ease;
}

/* Carousel Wrapper */
.cards-carousel-wrapper {
    position: relative;
    /* arrows are absolute so they don't squeeze cards */
}
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #cccccc;
    background: #ffffff;
    color: #555555;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 3;
    padding: 0;
}
.carousel-arrow.arrow-left { left: 0; }
.carousel-arrow.arrow-right { right: 0; }
.carousel-arrow:hover {
    background: #047185;
    color: #ffffff;
    border-color: #047185;
}
.cards-scroll-row {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -ms-overflow-style: none;
    scrollbar-width: none;
    padding: 4px 44px 14px; /* 44px = arrow width + breathing room */
}
.cards-scroll-row::-webkit-scrollbar { display: none; }

/* ============================================================
   HORIZONTAL OLYMPIAD CARD
   ============================================================ */
.olympiad-card-h {
    flex: 0 0 auto;
    width: 380px;
    display: flex;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
    scroll-snap-align: start;
    transition: all 0.3s ease;
    background: #0E212F;
}
.olympiad-card-h:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.14);
}

/* Card Left */
.card-left {
    width: 42%;
    min-height: 230px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 16px;
}
.card-left.bg-teal { background: #047185; }
.card-left.bg-gold { background: #FEBC5A; }
.card-left img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0; left: 0;
    opacity: 1;
    mix-blend-mode: normal;
}
.card-left::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 60%;
    background: linear-gradient(to top, rgba(0,0,0,0.4), transparent);
}

/* Card Right */
.card-right {
    width: 58%;
    padding: 18px 18px 16px;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #0E212F;
}
.card-right h4 {
    font-size: 16px;
    font-weight: 700;
    color: #FEBC5A;
    margin-bottom: 10px;
    line-height: 1.3;
}
.card-badges {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.cbadge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255,255,255,0.1);
    color: #cccccc;
    font-size: 10px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 4px;
}
.cbadge i { font-size: 10px; color: #FEBC5A; }
.card-specs {
    margin: 0 0 14px;
    padding: 0;
    list-style: none;
    flex: 1;
}
.card-specs li {
    font-size: 12px;
    color: #aaaaaa;
    line-height: 1.9;
    display: flex;
    align-items: center;
    gap: 8px;
}
.card-specs li i {
    color: #FEBC5A;
    font-size: 11px;
}
.card-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
    flex-wrap: nowrap;
}
.btn-enroll {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #0E212F;
    color: #FEBC5A; 
    padding: 20px 69px;
    border-radius: 5px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
    text-align: center;
    white-space: nowrap;
}
.btn-enroll:hover {
    background: #e5a94b;
    color: #0E212F;
}
.btn-subscribe {
    flex: 1 1 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #FEBC5A;
    color: #0E212F;
    padding: 8px 10px;
    border-radius: 5px;
    font-weight: 600;
    font-size: 10px;
    text-decoration: none;
    text-align: center;
    gap: 6px;
    white-space: nowrap;
}
.btn-subscribe span {
    font-weight: 700;
    font-size: 11px;
}

/* ============================================================
   ACCORDION SECTION
   ============================================================ */
.accordion-section {
    padding: 0 0 60px;
    
}
.accordion-item-custom { margin-bottom: 14px; }
.accordion-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 28px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.accordion-bar h4 {
    font-size: 17px;
    font-weight: 600;
    margin: 0;
}
.accordion-bar .acc-icon {
    font-size: 22px;
    transition: transform 0.3s ease;
}
/* Bar colors */
.accordion-bar.bar-teal {
    background: #047185;
    color: #ffffff;
}
.accordion-bar.bar-teal:hover { background: #065e6d; }
.accordion-bar.bar-light-teal {
    background: #5FB3B3;
    color: #ffffff;
}
.accordion-bar.bar-light-teal:hover { background: #4fa0a0; }
.accordion-bar.bar-gold {
    background: #FEBC5A;
    color: #0E212F;
}
.accordion-bar.bar-gold:hover { background: #e5a94b; }
.accordion-bar.bar-gold .acc-icon { color: #0E212F; }
.accordion-bar.bar-teal .acc-icon, .accordion-bar.bar-light-teal .acc-icon { color: #ffffff; }
.accordion-body-custom {
    padding: 20px 0 6px;
}

/* ============================================================
   BOTTOM CTA SECTION
   ============================================================ */
.courses-cta-section { padding: 0; }
.cta-bg {
    background-image: url('https://images.unsplash.com/photo-1456513080510-7bf3a84b82f8?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    position: relative;
    min-height: 420px;
    display: flex;
    align-items: center;
}
.cta-bg::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, rgba(14,33,47,0.9) 0%, rgba(14,33,47,0.6) 50%, rgba(14,33,47,0.2) 100%);
}
.cta-overlay {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 80px 0;
}
.cta-content h2 {
    font-size: 36px;
    font-weight: 700;
    color: #FEBC5A;
    margin-bottom: 16px;
    line-height: 1.3;
}
.cta-content p {
    font-size: 15px;
    color: rgba(255,255,255,0.85);
    line-height: 1.7;
    margin-bottom: 28px;
    max-width: 520px;
}
.btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #FEBC5A;
    color: #0E212F;
    padding: 14px 32px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
}
.btn-cta:hover {
    background: #e5a94b;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    color: #0E212F;
}
.btn-cta i { transition: transform 0.3s ease; }
.btn-cta:hover i { transform: translateX(4px); }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 991px) {
    .why-win-section { padding: 60px 0 50px; }
    .why-win-right {
        padding-left: 0;
        margin-top: 30px;
    }
    .why-title { font-size: 28px; }
    .why-illustration { max-width: 240px; }

    .olympiad-card-h { width: 340px; }
    .card-left { min-height: 210px; }
    .card-right { padding: 16px 14px 14px; }
    .card-right h4 { font-size: 15px; }
    .cards-scroll-row { padding: 4px 40px 14px; }

    .cta-content h2 { font-size: 30px; }
    .cta-bg { min-height: 380px; }
}

@media (max-width: 768px) {
    .why-win-section { padding: 40px 0 35px; }
    .why-title { font-size: 24px; }
    .why-subtitle { font-size: 14px; margin-bottom: 24px; }
    .why-illustration { max-width: 200px; }
    .win-tag { font-size: 12px; padding: 6px 12px; }
    .win-feature p { font-size: 12px; }

    .olympiad-cards-section { padding: 35px 0 20px; }
    .class-bar { padding: 14px 18px; border-radius: 8px; }
    .class-bar h3 { font-size: 16px; }
    .carousel-arrow { display: none; }
    .olympiad-card-h {
        width: 300px;
        flex-direction: column;
    }
    .cards-scroll-row { padding: 4px 0 14px; }
    .carousel-arrow { display: none; }
    .card-left {
        width: 100%;
        min-height: 160px;
    }
    .card-right {
        width: 100%;
        padding: 16px;
    }
    .card-right h4 { font-size: 15px; }
    .card-actions { gap: 6px; }
    .btn-enroll, .btn-subscribe { white-space: nowrap; font-size: 11px; padding: 8px 10px; }

    .accordion-bar { padding: 14px 18px; border-radius: 8px; }
    .accordion-bar h4 { font-size: 15px; }
    .accordion-bar .acc-icon { font-size: 18px; }
    .accordion-body-custom { padding: 14px 0 4px; }

    .cta-bg { min-height: 360px; background-position: 65% center; }
    .cta-overlay { padding: 50px 0; }
    .cta-content h2 { font-size: 26px; }
    .cta-content p { font-size: 13px; }
    .btn-cta {
        width: 100%;
        justify-content: center;
        padding: 14px;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .olympiad-card-h { width: 360px; }
    .card-left { min-height: 220px; }
    .cta-bg { background-position: 70% center; }
}
