/********** GEMA – TEMPLATE CSS (FINAL CLEAN THEME) **********/

/* =====================================================
   🎨 ROOT COLORS (GEMA OFFICIAL)
   ===================================================== */
:root {
    --primary: #0dcaf0;        /* GEMA Blue */
    --secondary: #0aa2c0;      /* Darker Blue */
    --light: #F8F9FA;
    --dark: #060315;
}

/* =====================================================
   GLOBAL
   ===================================================== */
.fw-medium {
    font-weight: 600 !important;
}

html {
    scroll-behavior: smooth;
}

/* =====================================================
   BACK TO TOP
   ===================================================== */
.back-to-top {
    position: fixed;
    display: none;
    right: 45px;
    bottom: 45px;
    z-index: 99;
    background-color: var(--primary);
    border-color: var(--primary);
}

.back-to-top:hover {
    background-color: var(--secondary);
    border-color: var(--secondary);
}

/* =====================================================
   SPINNER
   ===================================================== */
#spinner {
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease-out, visibility 0s linear .5s;
    z-index: 99999;
}

#spinner.show {
    visibility: visible;
    opacity: 1;
    transition: opacity .5s ease-out;
}

/* =====================================================
   BUTTONS
   ===================================================== */
.btn {
    font-weight: 600;
    transition: .3s ease;
}

.btn-primary,
.btn-info {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.btn-primary:hover,
.btn-info:hover {
    background-color: var(--secondary);
    border-color: var(--secondary);
}

/* ❌ EXCLUDED */
.btn-link {
    background: none !important;
    color: inherit !important;
}

.btn-outline-info,
.btn-outline-primary,
.btn-outline-secondary {
    background: transparent !important;
}

/* =====================================================
   NAVBAR
   ===================================================== */
.navbar .dropdown-toggle::after {
    content: "\f107";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-left: 8px;
    border: none;
}

.navbar-light .navbar-nav .nav-link {
    margin-right: 30px;
    padding: 25px 0;
    font-size: 15px;
    font-weight: 500;
    color: var(--dark);
    text-transform: uppercase;
    transition: color .2s ease;
}

.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link.active {
    color: var(--primary);
}

/* underline */
@media (min-width: 992px) {
    .navbar-light .navbar-nav .nav-link::before {
        content: "";
        position: absolute;
        width: 0;
        height: 4px;
        top: -6px;
        left: 50%;
        background: var(--primary);
        transition: .3s;
    }

    .navbar-light .navbar-nav .nav-link:hover::before,
    .navbar-light .navbar-nav .nav-link.active::before {
        width: 100%;
        left: 0;
    }
}

/* =====================================================
   DROPDOWN
   ===================================================== */
.dropdown-menu {
    border: none;
}

.dropdown-item {
    transition: background-color .2s ease, color .2s ease;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: rgba(13, 202, 240, 0.15);
    color: var(--secondary);
}

/* =====================================================
   HEADER / CAROUSEL
   ===================================================== */
.header-carousel .owl-nav .owl-prev,
.header-carousel .owl-nav .owl-next {
    width: 45px;
    height: 45px;
    border: 1px solid #fff;
    border-radius: 50%;
    background: transparent;
    color: #fff;
    transition: .3s;
}

.header-carousel .owl-nav .owl-prev:hover,
.header-carousel .owl-nav .owl-next:hover {
    background: var(--primary);
    border-color: var(--primary);
}
/* =====================================================
   PAGE HEADER
   ===================================================== */
.page-header {
    background: linear-gradient(
        rgba(6, 3, 21, .5),
        rgba(6, 3, 21, .5)
    ),
    url('/img/carousel-1.jpg') center center no-repeat;
    background-size: cover;
}

/* =====================================================
   SERVICE / TEAM / PRICE
   ===================================================== */
.service-item,
.team-item,
.price-item {
    box-shadow: 0 0 45px rgba(0, 0, 0, .07);
}

.service-item i,
.service-icon,
.fa,
.bi {
    color: var(--primary);
    transition: color .2s ease;
}
.service-item a.btn-slide,
.price-item a.btn-slide,
.team-item div.btn-slide {
    position: relative;
    display: inline-block;
    overflow: hidden;
    font-size: 0;
}

.service-item a.btn-slide i,
.service-item a.btn-slide span,
.price-item a.btn-slide i,
.price-item a.btn-slide span,
.team-item div.btn-slide i,
.team-item div.btn-slide span {
    position: relative;
    height: 40px;
    padding: 0 15px;
    display: inline-flex;
    align-items: center;
    font-size: 16px;
    color: #05227f;
    background: var(--primary);
    border-radius: 0 35px 35px 0;
    transition: .5s;
    z-index: 2;
}

.team-item div.btn-slide span a i {
    padding: 0 10px;
}

.team-item div.btn-slide span a:hover i {
    background: var(--secondary);
}

.service-item a.btn-slide span,
.price-item a.btn-slide span,
.team-item div.btn-slide span {
    padding-left: 0;
    left: -100%;
    z-index: 1;
}

.service-item:hover a.btn-slide i,
.price-item:hover a.btn-slide i,
.team-item:hover div.btn-slide i {
    border-radius: 0;
}

.service-item:hover a.btn-slide span,
.price-item:hover a.btn-slide span,
.team-item:hover div.btn-slide span {
    left: 0;
}

.service-item a.btn-slide:hover i,
.service-item a.btn-slide:hover span,
.price-item a.btn-slide:hover i,
.price-item a.btn-slide:hover span {
    background: var(--secondary);
}

.service-item:hover i {
    color: var(--secondary);
}

/* =====================================================
   TABLES (KEEP DATATABLES SAFE)
   ===================================================== */
table {
    border-color: #dee2e6;
}

.table-info th {
    background-color: var(--primary);
    color: #fff;
}

/* ❌ DO NOT TOUCH DATATABLES */
table.dataTable thead th,
table.dataTable tbody td {
    background-color: inherit !important;
    color: inherit !important;
}

/* =====================================================
   FOOTER
   ===================================================== */
.footer {
    background: linear-gradient(rgba(6, 3, 21, .5), rgba(6, 3, 21, .5)),
                url('/img/map.png') center center no-repeat;
    background-size: cover;
}

.footer .btn.btn-social {
    width: 35px;
    height: 35px;
    border: 1px solid #fff;
    border-radius: 50%;
    color: var(--light);
}

.footer .btn.btn-social:hover {
    color: var(--primary);
}

.footer .btn.btn-link {
    color: #fff;
    text-align: left;
}

.footer .btn.btn-link:hover {
    letter-spacing: 1px;
}

.footer .copyright {
    border-top: 1px solid rgba(255,255,255,.1);
    padding: 25px 0;
    font-size: 15px;
}

/* =====================================================
   DANGER (KEEP RED)
   ===================================================== */
.text-danger,
.alert-danger,
.bg-danger,
.badge.bg-danger {
    color: #0dcaf0 !important;
}

/* =====================================================
   RTL SUPPORT
   ===================================================== */
html[dir="rtl"] {
    direction: rtl;
}

html[dir="rtl"] .navbar-nav {
    margin-right: 0;
}
/* ================= LANG ANIMATION ================= */
body.lang-changing {
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* ================= DROPDOWN ================= */
.navbar .dropdown-menu {
    border-radius: 10px;
    border: none;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    overflow: hidden;
}

.dropdown-item {
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background-color: #0dcaf0;
    color: #fff;
    padding-left: 20px;
}

/* ================= NAVBAR SCROLL ================= */
.navbar {
    transition: all 0.3s ease;
}

.navbar.scrolled {
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    padding-top: 5px !important;
    padding-bottom: 5px !important;
    background: #ffffff !important;
}

/* ================= HOVER DROPDOWN ================= */
@media (min-width: 992px) {
    .navbar .dropdown:hover .dropdown-menu {
        display: block;
        margin-top: 0;
    }
}
.navbar-nav .nav-link {
    position: relative;
}

.navbar-nav .nav-link::after {
    content: "";
    position: absolute;
    width: 0%;
    height: 2px;
    bottom: 0;
    left: 0;
    background: #0dcaf0;
    transition: 0.3s;
}

.navbar-nav .nav-link:hover::after {
    width: 100%;
}
/* DARK MODE */
body.dark-mode {
    background: #121212;
    color: #eee;
}

body.dark-mode .navbar {
    background: #1e1e1e !important;
}

body.dark-mode .dropdown-menu {
    background: #2a2a2a;
    color: #fff;
}

body.dark-mode .dropdown-item {
    color: #ddd;
}

body.dark-mode .dropdown-item:hover {
    background: #0dcaf0;
    color: #fff;
}

body.dark-mode .card {
    background: #1e1e1e;
    color: #eee;
}

body.dark-mode .btn-outline-info {
    border-color: #0dcaf0;
    color: #0dcaf0;
}

/* ================= EVENTS SCROLL ================= */
.events-scroll {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 10px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

/* scrollbar */
.events-scroll::-webkit-scrollbar {
    height: 6px;
}

.events-scroll::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

/* ================= CARD ================= */
.event-card {
    min-width: 300px;
    height: 220px;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    scroll-snap-align: start;
    display: block;
    text-decoration: none;
    color: #fff;
}

/* ================= IMAGE ================= */
.event-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* fallback background */
.event-card .bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}

/* ================= OVERLAY ================= */
.event-card .overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
}

/* ================= CONTENT ================= */
.event-card .content {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 12px;
    color: #fff;
    z-index: 2;
}

/* ================= RTL FIX (CORRECT WAY) ================= */
html[dir="rtl"] .events-scroll {
    direction: rtl;
}

/* مهم: لا نكسر flex-direction */
html[dir="rtl"] .events-scroll .event-card {
    direction: rtl;
    text-align: right;
}