/* ============================================================
   Front — Header & Slider responsive
   ============================================================ */

html,
body {
    overflow-x: hidden;
    max-width: 100%;
}

/* ── Site header shell ── */
#site-header {
    width: 100%;
    max-width: 100vw;
    position: relative;
    z-index: 50;
}

/* ── Top bar ── */
.header-top {
    background: #2e60ac;
    color: #fff;
    position: relative;
    z-index: 52;
    overflow: visible;
}

.header-top::before {
    content: "";
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    width: clamp(120px, 28%, 320px);
    background: #5cc1ed;
    opacity: 0.92;
    z-index: 0;
}

.header-top__inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-block: 0.45rem;
    min-height: 36px;
}

@media (min-width: 1024px) {
    .header-top__inner {
        padding-block: 0.5rem;
        min-height: 40px;
    }
}

.header-top__social {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-shrink: 0;
}

@media (min-width: 640px) {
    .header-top__social {
        gap: 1rem;
    }
}

.header-top__social a {
    color: #fff;
    font-size: 0.85rem;
    line-height: 1;
    opacity: 0.95;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.header-top__social a:hover {
    opacity: 1;
    transform: translateY(-1px);
}

.header-top__meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.5rem 0.85rem;
    font-size: 0.7rem;
    line-height: 1.2;
    min-width: 0;
}

@media (min-width: 640px) {
    .header-top__meta {
        font-size: 0.78rem;
        gap: 0.65rem 1rem;
    }
}

@media (min-width: 1024px) {
    .header-top__meta {
        font-size: 0.82rem;
        flex-wrap: nowrap;
        gap: 1rem 1.25rem;
    }
}

.header-top__meta a {
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
    max-width: 100%;
}

.header-top__meta a i {
    color: #5cc1ed;
    flex-shrink: 0;
}

.header-top__meta .header-top__email {
    display: none;
}

@media (min-width: 480px) {
    .header-top__meta .header-top__email {
        display: inline-flex;
    }
}

.header-top__meta .header-top__trainer {
    display: none;
}

@media (min-width: 768px) {
    .header-top__meta .header-top__trainer {
        display: inline-flex;
    }
}

.header-top__meta .header-top__email span,
.header-top__meta .header-top__phone span {
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 639px) {
    .header-top__meta .header-top__phone span {
        max-width: 9rem;
    }
}

.header-top__trainer-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.55rem;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 0.35rem;
    font-size: inherit;
    transition: background 0.2s ease;
}

.header-top__trainer-btn:hover {
    background: rgba(255, 255, 255, 0.12);
}

.header-top .dropdown {
    position: relative;
    z-index: 53;
}

#header-user-menu {
    z-index: 70;
    background: #fff;
    color: #374151;
}

#header-user-menu a {
    color: #374151;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

#header-user-menu a:hover {
    background: #f3f4f6;
    color: #0088c7;
}

#header-user-menu a i {
    color: #0088c7;
}

#header-user-menu a.header-user-menu__logout {
    color: #dc2626;
}

#header-user-menu a.header-user-menu__logout:hover {
    background: #fef2f2;
    color: #b91c1c;
}

#header-user-menu a.header-user-menu__logout i {
    color: #dc2626;
}

#header-user-menu hr {
    border-color: #e5e7eb;
    margin: 0.25rem 0;
}

/* ── Main navigation ── */
.site-nav {
    background: #fff;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 50;
    width: 100%;
}

.site-nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.45rem 0.75rem;
    min-height: 58px;
}

@media (min-width: 640px) {
    .site-nav__inner {
        padding: 0.5rem 1rem;
        min-height: 62px;
    }
}

@media (min-width: 1536px) {
    .site-nav__inner {
        min-height: 68px;
        gap: 0.75rem;
    }
}

.site-nav__logo {
    flex-shrink: 0;
    display: block;
    line-height: 0;
}

.site-nav__logo img {
    display: block;
    height: auto;
    width: auto;
    max-height: 40px;
    max-width: 118px;
}

@media (min-width: 640px) {
    .site-nav__logo img {
        max-height: 46px;
        max-width: 140px;
    }
}

@media (min-width: 1024px) {
    .site-nav__logo img {
        max-height: 52px;
        max-width: 165px;
    }
}

@media (min-width: 1536px) {
    .site-nav__logo img {
        max-height: 58px;
        max-width: 190px;
    }
}

/* Mobile / tablet off-canvas drawer.
   Wrapper is a viewport-sized, clipped box so the off-screen panel
   never creates horizontal overflow (fixed elements ignore body overflow). */
.site-nav__drawer {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 60;
}

.site-nav__menu {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    position: absolute;
    top: 0;
    bottom: 0;
    width: min(100%, 320px);
    max-width: 88vw;
    background: #fff;
    padding: 1.25rem 1rem 1.5rem;
    overflow-y: auto;
    box-shadow: 0 0 24px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
    pointer-events: auto;
}

/* LTR: drawer anchored to the left edge, slides in from the left */
html[dir="ltr"] .site-nav__menu {
    left: 0;
    right: auto;
    transform: translateX(-100%);
}

/* RTL: drawer anchored to the right edge, slides in from the right */
html[dir="rtl"] .site-nav__menu {
    right: 0;
    left: auto;
    transform: translateX(100%);
}

.site-nav__menu.is-open {
    transform: translateX(0) !important;
}

@media (min-width: 1280px) {
    .site-nav__drawer {
        position: static;
        display: contents;
        overflow: visible;
        pointer-events: auto;
    }

    .site-nav__menu {
        position: static;
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: center;
        flex: 1 1 auto;
        min-width: 0;
        width: auto;
        max-width: none;
        height: auto;
        padding: 0;
        margin-inline: 0.5rem;
        overflow: visible;
        box-shadow: none;
        transform: none !important;
        gap: 0;
    }
}

@media (min-width: 1536px) {
    .site-nav__menu {
        margin-inline: 0.75rem;
        gap: 0.15rem;
    }
}

/* ── Header typography (AR / EN) ── */
html[dir="rtl"] .header-top,
html[dir="rtl"] .site-nav {
    font-family: "Tajawal", "Segoe UI", Tahoma, sans-serif;
}

html[dir="ltr"] .header-top,
html[dir="ltr"] .site-nav {
    font-family: "Outfit", "Segoe UI", Roboto, sans-serif;
}

html[dir="rtl"] .site-nav__link,
html[dir="rtl"] .site-nav__cert,
html[dir="rtl"] .site-nav__lang-btn {
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1.55;
}

html[dir="ltr"] .site-nav__link,
html[dir="ltr"] .site-nav__cert,
html[dir="ltr"] .site-nav__lang-btn {
    font-weight: 500;
    letter-spacing: 0.02em;
    line-height: 1.45;
}

.site-nav__link,
.site-nav__cert,
.site-nav__lang-btn {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.site-nav__link {
    display: block;
    color: #2f3b46;
    font-size: 1.02rem;
    padding: 0.55rem 0.75rem;
    border-radius: 0.5rem;
    white-space: nowrap;
    transition: color 0.2s ease, background 0.2s ease;
}

.site-nav__link:hover {
    color: #0088c7;
    background: rgba(0, 136, 199, 0.06);
}

@media (min-width: 1280px) {
    .site-nav__link {
        font-size: 0.92rem;
        padding: 0.44rem 0.52rem;
        border-radius: 0.4rem;
    }
}

@media (min-width: 1400px) {
    .site-nav__link {
        font-size: 0.97rem;
        padding: 0.46rem 0.6rem;
    }
}

@media (min-width: 1536px) {
    .site-nav__link {
        font-size: 1.03rem;
        padding: 0.48rem 0.7rem;
    }
}

@media (min-width: 1700px) {
    .site-nav__link {
        font-size: 1.08rem;
        padding: 0.5rem 0.78rem;
    }
}

.site-nav__cert {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #0088c7;
    background: rgba(0, 136, 199, 0.1);
    border: 1px solid rgba(0, 136, 199, 0.22);
    border-radius: 0.5rem;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease;
}

.site-nav__cert:hover {
    background: #0088c7;
    color: #fff;
}

.site-nav__cert--drawer {
    padding: 0.55rem 1rem;
    font-size: 0.98rem;
    width: fit-content;
}

.site-nav__cert--bar {
    display: none;
    padding: 0.42rem 0.62rem;
    font-size: 0.78rem;
    line-height: 1.35;
    max-width: 8rem;
    text-align: center;
}

@media (min-width: 1280px) {
    .site-nav__cert--bar {
        display: inline-flex;
    }
}

@media (min-width: 1400px) {
    .site-nav__cert--bar {
        font-size: 0.84rem;
        padding: 0.44rem 0.7rem;
        max-width: 9rem;
    }
}

@media (min-width: 1536px) {
    .site-nav__cert--bar {
        font-size: 0.9rem;
        padding: 0.46rem 0.78rem;
        max-width: none;
    }
}

@media (min-width: 1700px) {
    .site-nav__cert--bar {
        font-size: 0.95rem;
        padding: 0.48rem 0.9rem;
    }
}

.site-nav__actions {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    flex-shrink: 0;
}

@media (min-width: 640px) {
    .site-nav__actions {
        gap: 0.35rem;
    }
}

.site-nav__icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.5rem;
    color: #374151;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease;
}

.site-nav__icon-btn:hover {
    background: #f3f4f6;
}

.site-nav__lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.38rem 0.6rem;
    font-size: 0.88rem;
    border-radius: 0.5rem;
    background: #fff;
    border: none;
    cursor: pointer;
    color: #2f3b46;
    transition: background 0.2s ease;
}

@media (min-width: 1280px) {
    .site-nav__lang-btn {
        font-size: 0.9rem;
    }
}

@media (min-width: 1536px) {
    .site-nav__lang-btn {
        font-size: 0.95rem;
    }
}

.site-nav__lang-btn:hover {
    background: #f9fafb;
}

.site-nav__divider {
    display: none;
    width: 1px;
    height: 1.35rem;
    background: #d1d5db;
    margin-inline: 0.15rem;
}

@media (min-width: 640px) {
    .site-nav__divider {
        display: block;
    }
}

.site-nav__toggle {
    display: inline-flex;
}

@media (min-width: 1280px) {
    .site-nav__toggle {
        display: none;
    }
}

.site-nav__drawer-only {
    display: block;
}

@media (min-width: 1280px) {
    .site-nav__drawer-only {
        display: none !important;
    }
}

#navOverlay {
    position: fixed;
    inset: 0;
    z-index: 55;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#navOverlay.is-visible {
    opacity: 1;
    visibility: visible;
}

@media (min-width: 1280px) {
    #navOverlay {
        display: none !important;
    }
}

body.nav-menu-open {
    overflow: hidden;
}

html[dir="rtl"] body.font-ar {
    font-family: "Tajawal", "Segoe UI", Tahoma, sans-serif;
}

html[dir="ltr"] body.font-en {
    font-family: "Outfit", "Segoe UI", Roboto, sans-serif;
}

/* ── Home slider ── */
#homeSlider {
    width: 100%;
    max-width: 100vw;
}

#homeSlider .swiper,
#homeSlider .swiper-wrapper,
#homeSlider .swiper-slide {
    width: 100%;
    height: auto !important;
}

#homeSlider .item {
    position: relative;
    width: 100%;
    height: auto;
    line-height: 0;
    background: #1c1c1c;
}

#homeSlider .item img.slide-image {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    object-fit: contain;
    object-position: center top;
}

#homeSlider .item video,
#homeSlider .item .slide-video {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
}

#homeSlider .item .slide-embed {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
}

#homeSlider .item .slide-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

#homeSlider .item a {
    z-index: 2;
}

#homeSlider .item:before {
    display: none !important;
}

#homeSlider .swiper-button-next,
#homeSlider .swiper-button-prev {
    color: #fff;
}

@media (max-width: 639px) {
    #homeSlider .swiper-button-next,
    #homeSlider .swiper-button-prev {
        display: none !important;
    }
}

#homeSlider .swiper-pagination {
    bottom: 12px !important;
}

/* ============================================================
   Shine sweep + course CTA buttons
   Used by: front/partials/course_card.blade.php (View Details)
            front/course-page.blade.php (sidebar CTAs)
   ============================================================ */

/* Reusable "flash" highlight that sweeps across a button, on loop. */
.thiep-shine {
    position: relative;
    overflow: hidden;
}

.thiep-shine::after {
    content: '';
    position: absolute;
    top: 0;
    left: -60%;
    width: 45%;
    height: 100%;
    background: linear-gradient(100deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, .45) 50%,
            rgba(255, 255, 255, 0) 100%);
    transform: skewX(-20deg);
    animation: thiep-shine-sweep 1.8s linear infinite;
    pointer-events: none;
}

@keyframes thiep-shine-sweep {
    0%   { left: -60%; }
    100% { left: 130%; }
}

/* Sidebar call-to-action buttons on the course detail page */
.thiep-cta-group {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid #f3f4f6;
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.thiep-cta-hint {
    margin: 0;
    text-align: center;
    font-size: .8125rem;
    font-weight: 600;
    letter-spacing: .02em;
    color: #6b7280;
}

.thiep-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    width: 100%;
    padding: .8125rem 1rem;
    border: 0;
    border-radius: .625rem;
    font-size: .9375rem;
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.thiep-cta:hover,
.thiep-cta:focus-visible {
    color: #fff;
    text-decoration: none;
    transform: translateY(-2px);
    filter: brightness(1.06);
}

.thiep-cta:active {
    transform: translateY(0);
}

.thiep-cta:focus-visible {
    outline: 2px solid #fff;
    outline-offset: -4px;
}

.thiep-cta--primary {
    background: linear-gradient(135deg, #0088C7 0%, #053A58 100%);
    box-shadow: 0 4px 14px rgba(0, 136, 199, .35);
    animation: thiep-cta-glow 2.4s ease-in-out infinite;
}

.thiep-cta--primary:hover,
.thiep-cta--primary:focus-visible {
    box-shadow: 0 8px 22px rgba(0, 136, 199, .5);
    animation-play-state: paused;
}

@keyframes thiep-cta-glow {
    0%, 100% { box-shadow: 0 4px 14px rgba(0, 136, 199, .35); }
    50%      { box-shadow: 0 4px 22px rgba(0, 136, 199, .65); }
}

.thiep-cta--whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    box-shadow: 0 4px 14px rgba(37, 211, 102, .32);
}

.thiep-cta--whatsapp:hover,
.thiep-cta--whatsapp:focus-visible {
    box-shadow: 0 8px 22px rgba(37, 211, 102, .45);
}

/* "View Details" button inside the course card */
.thiep-card-cta {
    background: linear-gradient(135deg, #0088C7 0%, #053A58 100%);
    color: #fff;
    border: 0;
    box-shadow: 0 4px 12px rgba(0, 136, 199, .28);
    transition: box-shadow .3s ease, filter .3s ease;
}

.thiep-card-cta:hover,
.group:hover .thiep-card-cta {
    color: #fff;
    filter: brightness(1.08);
    box-shadow: 0 8px 20px rgba(0, 136, 199, .45);
}

@media (prefers-reduced-motion: reduce) {
    .thiep-shine::after {
        display: none;
    }

    .thiep-cta,
    .thiep-cta--primary {
        animation: none;
        transition: none;
    }
}

@media print {
    .thiep-cta-group {
        display: none;
    }
}
