:root {
    --primary: #0077B6;
    --dark-navy: #023E8A;
    --light-blue: #E6F3FF;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    scroll-behavior: smooth;
    background-color: #ffffff;
    color: #212529;
}

html[lang="ar"] body {
    font-family: 'Cairo', sans-serif;
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    border-bottom: 2px solid var(--primary);
}

.navbar .nav-link {
    color: #212529 !important;
    font-weight: 500;
    transition: color 0.2s ease-in-out;
}

.navbar .nav-link:hover {
    color: var(--primary) !important;
}

.navbar-toggler {
    border: 1px solid rgba(0, 119, 182, 0.4) !important;
}

.navbar-toggler:focus {
    outline: none !important;
    box-shadow: 0 0 0 0.25rem rgba(0, 119, 182, 0.25) !important;
}

.navbar-toggler-icon {
    width: 1.5em;
    height: 1.5em;
    transition: background-image 0.3s ease-in-out;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280, 0, 0, 0.9%29' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

.navbar-toggle-with-x[aria-expanded="true"] .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%230077B6'%3e%3cpath d='M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e") !important;
}

/* REPLACE WITH THIS: */
.nav-link:not(.dropdown-toggle) {
    position: relative;
}

/* Animate the underline ONLY on normal nav links */
.nav-link:not(.dropdown-toggle)::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

.nav-link:not(.dropdown-toggle):hover::after {
    width: 100%;
}

@media (max-width: 991.98px) {
    .dropdown-menu-end {
        left: 0 !important;
        right: auto !important;
    }
    html[lang="ar"] .dropdown-menu-end {
        right: 0 !important;
        left: auto !important;
    }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background-color: #023E8A;
    padding-top: 100px;
    padding-bottom: 60px;
}

@media (max-width: 991.98px) {
    .hero {
        padding-top: 90px;
        padding-bottom: 40px;
    }
}

.hero-bg-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(2, 62, 138, 0.45), rgba(0, 119, 182, 0.30), rgba(0, 0, 0, 0.50));
    z-index: 2;
}

.hero::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(transparent, #ffffff);
    z-index: 3;
}

.hero-text-shadow {
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.85), 0px 0px 4px rgba(0, 0, 0, 0.5);
}

.hero .text-warning {
    color: #FFC107 !important;
}

/* ============================================================
   HERO BUTTONS
   ============================================================ */
.btn-hero-primary {
    background-color: var(--primary) !important;
    color: #ffffff !important;
    border: 2px solid var(--primary) !important;
    transition: all 0.3s ease;
}
.btn-hero-primary:hover {
    background-color: var(--dark-navy) !important;
    border-color: var(--dark-navy) !important;
    transform: translateY(-2px);
}

.btn-hero-telegram {
    background-color: #24A1DE !important;
    color: #ffffff !important;
    border: 2px solid #24A1DE !important;
    transition: all 0.3s ease;
}
.btn-hero-telegram:hover {
    background-color: #1d82b2 !important;
    border-color: #1d82b2 !important;
    transform: translateY(-2px);
}

.btn-hero-whatsapp {
    background-color: #25D366 !important;
    color: #ffffff !important;
    border: 2px solid #25D366 !important;
    transition: all 0.3s ease;
}
.btn-hero-whatsapp:hover {
    background-color: #1ebd58 !important;
    border-color: #1ebd58 !important;
    transform: translateY(-2px);
}

.hero-btn-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 400px;
    margin: 0 auto 3rem auto;
    padding: 10px;
}

.hero-btn-container .btn {
    white-space: nowrap;
    font-size: 1rem;
    padding: 14px 24px;
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50px;
}

@media (min-width: 768px) {
    .hero-btn-container {
        flex-direction: row;
        justify-content: center;
        max-width: 100%;
        gap: 15px;
    }
    .hero-btn-container .btn {
        width: auto;
        font-size: 1.05rem;
        padding: 15px 32px;
    }
}

@media (min-width: 992px) {
    .hero-btn-container {
        gap: 20px;
    }
    .hero-btn-container .btn {
        font-size: 1.1rem;
        padding: 15px 35px;
    }
}

@media (max-width: 767.98px) {
    .hero-btn-container .btn {
        font-size: 0.85rem;
        padding: 10px 16px;
    }
}

@media (max-width: 380px) {
    .hero-btn-container .btn {
        font-size: 0.75rem;
        padding: 8px 12px;
    }
}

/* ============================================================
   ABOUT
   ============================================================ */
.about-img-container {
    height: 420px;
    background-color: #f0f0f0;
}

.about-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: opacity 1.2s ease-in-out;
    opacity: 0;
    z-index: 1;
}

.about-slide.active {
    opacity: 1 !important;
    z-index: 2;
}

/* ============================================================
   SECTION TITLES
   ============================================================ */
.section-title {
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--primary);
}

/* ============================================================
   SERVICE CARDS
   ============================================================ */
.service-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    height: 100%;
}

.service-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 40px rgba(0, 119, 182, 0.15) !important;
}

/* ============================================================
   TEAM
   ============================================================ */
.team-avatar {
    object-fit: cover;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
    background: #023E8A;
}

.logo-text {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    letter-spacing: -1px;
}

.agency-logo {
    max-height: 45px;
    width: 45px;
    object-fit: cover;
    border-radius: 8px;
}

/* ============================================================
   GALLERY - HORIZONTAL SCROLL
   ============================================================ */
#gallery .section-title::after {
    background: var(--primary);
}

.horizontal-gallery-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 10px 0;
}

.horizontal-gallery-scroll {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    overflow-y: visible;
    padding: 15px 10px 25px 10px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
}

.horizontal-gallery-scroll.auto-scroll {
    animation: autoScrollGallery 30s linear infinite;
}

.horizontal-gallery-scroll.auto-scroll:hover {
    animation-play-state: paused;
}

@keyframes autoScrollGallery {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.horizontal-gallery-scroll::-webkit-scrollbar {
    height: 6px;
}

.horizontal-gallery-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.horizontal-gallery-scroll::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

.horizontal-gallery-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--dark-navy);
}

.horizontal-gallery-item {
    flex: 0 0 280px;
    scroll-snap-align: start;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 16px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.horizontal-gallery-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 119, 182, 0.15);
    z-index: 10;
}

.horizontal-gallery-item .gallery-img-container {
    height: 200px;
    width: 100%;
    position: relative;
    overflow: hidden;
    background: #f0f0f0;
}

.horizontal-gallery-item .gallery-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.horizontal-gallery-item:hover .gallery-img-container img {
    transform: scale(1.08);
}

.horizontal-gallery-item .gallery-card-body {
    padding: 14px 16px;
    border-top: 1px solid #f1f3f5;
}

.horizontal-gallery-item .gallery-card-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0;
    color: #212529;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 38px;
}

.gallery-scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid #e0e0e0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    color: var(--dark-navy);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 20;
    backdrop-filter: blur(10px);
}

.gallery-scroll-btn:hover {
    background: var(--dark-navy);
    color: white;
    border-color: var(--dark-navy);
    transform: translateY(-50%) scale(1.1);
}

.gallery-scroll-btn-left { left: -10px; }
.gallery-scroll-btn-right { right: -10px; }

.gallery-auto-toggle {
    position: absolute;
    bottom: -10px;
    right: 20px;
    z-index: 25;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--dark-navy);
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.gallery-auto-toggle:hover {
    background: var(--dark-navy);
    color: white;
    border-color: var(--dark-navy);
}

.gallery-auto-toggle .bi {
    margin-right: 5px;
}

.gallery-counter {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    z-index: 5;
    backdrop-filter: blur(5px);
}

.gallery-platform-badge {
    position: absolute;
    bottom: 10px;
    left: 10px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    color: white;
    z-index: 5;
    backdrop-filter: blur(5px);
}

.gallery-platform-badge.youtube { background: rgba(255, 0, 0, 0.85); }
.gallery-platform-badge.tiktok { background: rgba(0, 0, 0, 0.85); }
.gallery-platform-badge.vimeo { background: rgba(26, 183, 234, 0.85); }
.gallery-platform-badge.image { background: rgba(0, 119, 182, 0.85); }

.video-count-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 119, 182, 0.9);
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 4px;
}

.gallery-pause-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 15px 25px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    z-index: 30;
    display: none;
    backdrop-filter: blur(10px);
    pointer-events: none;
}

.gallery-pause-indicator.show {
    display: flex;
    align-items: center;
    gap: 10px;
    animation: fadeInOut 1.5s ease forwards;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
    15% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    85% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
}

.video-overlay-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(0, 119, 182, 0.9);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(0,0,0,0.2);
    cursor: pointer;
    z-index: 3;
}

.gallery-card-wrapper:hover .video-overlay-icon {
    background: var(--primary);
    transform: translate(-50%, -50%) scale(1.1);
}

@media (max-width: 768px) {
    .horizontal-gallery-item { flex: 0 0 220px; }
    .horizontal-gallery-item .gallery-img-container { height: 160px; }
    .gallery-scroll-btn { width: 36px; height: 36px; font-size: 0.9rem; }
    .gallery-scroll-btn-left { left: -5px; }
    .gallery-scroll-btn-right { right: -5px; }
}

@media (max-width: 480px) {
    .horizontal-gallery-item { flex: 0 0 180px; }
    .horizontal-gallery-item .gallery-img-container { height: 140px; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 576px) {
    .hero h1.display-3 { font-size: 2rem !important; }
    .hero .display-3.fw-bold.mb-5 { font-size: 2.5rem !important; }
    .section-title { font-size: 1.5rem !important; }
    .about-img-container { height: 250px; }
}

/* ============================================================
   MISC
   ============================================================ */
.map-wrapper {
    border-color: var(--primary) !important;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.25rem rgba(0, 119, 182, 0.25);
}

.btn-primary {
    background-color: var(--primary);
    border: none;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--dark-navy);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 119, 182, 0.3);
}

.btn-outline-primary {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-outline-primary:hover {
    background-color: var(--primary);
    color: #fff;
}

.bg-primary {
    background-color: var(--primary) !important;
}

.text-primary {
    color: var(--primary) !important;
}

