/* Custom Styles for Sada Al Masar Website */

/* ============================================
   Accent Color Icons - Apply accent color to icons next to headings
   ============================================ */

/* Apply accent color to Vector icons next to headings */
img[src*="Vector (1).svg"],
img[src*="Vector(1).svg"],
.service_text3 img,
.service_text2 img,
.text img[src*="Vector"],
.center img[src*="Vector"] {
    filter: brightness(0) saturate(100%) invert(27%) sepia(51%) saturate(2878%) hue-rotate(346deg) brightness(104%) contrast(97%);
    /* Default orange color filter - will be overridden by CSS variable */
}

/* Use CSS variable for dynamic color */
:root {
    --accent-color-filter: brightness(0) saturate(100%) invert(27%) sepia(51%) saturate(2878%) hue-rotate(346deg) brightness(104%) contrast(97%);
}

/* Apply accent color to icons using CSS variable */
.accent-color-icon,
img[src*="Vector (1).svg"],
img[src*="Vector(1).svg"] {
    filter: var(--accent-color-filter, brightness(0) saturate(100%) invert(27%) sepia(51%) saturate(2878%) hue-rotate(346deg) brightness(104%) contrast(97%));
}

/* Arrow icons */
img[src*="ArrowRight.svg"],
img[src*="arrow"] {
    filter: var(--accent-color-filter, brightness(0) saturate(100%) invert(27%) sepia(51%) saturate(2878%) hue-rotate(346deg) brightness(104%) contrast(97%));
}

/* Mark icons */
img[src*="mark.svg"] {
    filter: var(--accent-color-filter, brightness(0) saturate(100%) invert(27%) sepia(51%) saturate(2878%) hue-rotate(346deg) brightness(104%) contrast(97%));
}

/* Template Image Upload Button - Use accent color */
.template-image-upload-btn {
    background: var(--accent-color, #DF8317) !important;
}

.template-image-upload-btn:hover {
    background: var(--accent-color, #DF8317) !important;
    opacity: 1 !important;
}

/* ============================================
   Prevent Word Break in Carousel Slides
   ============================================ */

/* منع كسر الكلمات في السلايدات - الكلمات تبقى كاملة في نفس السطر */
.carousel-item * {
    word-break: keep-all !important;
    overflow-wrap: break-word !important;
    hyphens: none !important;
    -webkit-hyphens: none !important;
    -moz-hyphens: none !important;
    -ms-hyphens: none !important;
}

/* عناوين المشاريع في السلايد - Projects */
.carousel-item .col-md-3 > a > div,
.carousel-item .col-md-3 .d-flex[style*="font-family: Cairo"],
.carousel-item .col-md-3 div[style*="font-family: Cairo"][style*="text-align: center"] {
    word-break: keep-all !important;
    white-space: normal !important;
    overflow-wrap: break-word !important;
    hyphens: none !important;
    line-break: auto !important;
}

/* عناوين البرامج/الدورات في السلايد - Programs/Courses */
.carousel-item .col-md-4 > div > div[style*="font-family: Cairo"],
.carousel-item .col-md-4 .d-flex[style*="font-family: Cairo"],
.carousel-item .col-md-4 div[style*="font-family: Cairo"][style*="text-align: left"],
.carousel-item .col-md-4 div[style*="font-family: Cairo"][style*="text-align: right"] {
    word-break: keep-all !important;
    white-space: normal !important;
    overflow-wrap: break-word !important;
    hyphens: none !important;
    line-break: auto !important;
}

/* عناوين الفاعليات في السلايد - Events */
.carousel-item .col-md-4 .d-flex[style*="font-family: Cairo"][style*="text-align: center"],
.carousel-item .col-md-4 > div > div[style*="font-family: Cairo"][style*="text-align: center"] {
    word-break: keep-all !important;
    white-space: normal !important;
    overflow-wrap: break-word !important;
    hyphens: none !important;
    line-break: auto !important;
}

/* نصوص الفاعليات في السلايد */
.carousel-item .event-container,
.carousel-item .event-container * {
    word-break: keep-all !important;
    overflow-wrap: break-word !important;
    hyphens: none !important;
}

/* ============================================
   General Styles
   ============================================ */

.small-screen-font {
    font-size: 20px;
    line-height: 50px;
}

#home a {
    color: var(--accent-color, #FFE4C5);
}

#home a::after {
    content: '';
    display: block;
    height: 2px;
    width: 75%;
    margin-top: 3px;
    background-color: var(--accent-color, #FFE4C5);
}

[dir="rtl"] #home a::after {
    margin-right: 10px;
}

[dir="ltr"] #home a::after {
    margin-left: 15px;
}

#home a:hover {
    color: var(--accent-color, #FFE4C5);
}

.navbar-nav .nav-item.active a:hover {
    color: var(--accent-color, #FFE4C5);
}

#home a:hover::after {
    background-color: var(--accent-color, #FFE4C5);
}

.responsive-text {
    font-family: Cairo;
    font-size: 22px;
    font-weight: 400;
    line-height: 38px;
    letter-spacing: 0em;
    text-align: right;
    color: #222751;
}

html {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

body {
    overflow: auto;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
    position: relative;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* Prevent horizontal scroll in first three sections - Hide scrollbar completely */
#service,
#US,
#2030 {
    overflow-x: hidden !important;
    overflow: hidden !important;
    max-width: 100% !important;
    width: 100% !important;
    position: relative;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

#service::-webkit-scrollbar,
#US::-webkit-scrollbar,
#2030::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    background: transparent !important;
}

#service .container,
#US .container,
#2030 .container {
    overflow-x: hidden !important;
    overflow: hidden !important;
    max-width: 100% !important;
    width: 100% !important;
    position: relative;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

#service .container::-webkit-scrollbar,
#US .container::-webkit-scrollbar,
#2030 .container::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    background: transparent !important;
}

#service .he,
#US .he,
#2030 .he {
    overflow-x: hidden !important;
    overflow: hidden !important;
    max-width: 100% !important;
    width: 100% !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

#service .he::-webkit-scrollbar,
#US .he::-webkit-scrollbar,
#2030 .he::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    background: transparent !important;
}

/* Hide horizontal scrollbar for all children in first three sections */
#service *,
#US *,
#2030 * {
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

#service *::-webkit-scrollbar,
#US *::-webkit-scrollbar,
#2030 *::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    background: transparent !important;
}

/* Ensure all direct children don't cause overflow */
#service > *,
#US > *,
#2030 > * {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

#service .row,
#US .row,
#2030 .row {
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Fix modal z-index and mobile display issues */
#event-full-text-modal {
    z-index: 9999 !important;
}

#event-full-text-modal .modal-dialog {
    z-index: 10000 !important;
    margin: 2rem auto;
    max-width: 600px;
    width: 90%;
}

#event-full-text-modal .modal-content {
    z-index: 10001 !important;
    border-radius: 15px;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-height: 85vh;
    overflow-y: auto;
    background: #ffffff;
}

#event-full-text-modal .modal-backdrop {
    z-index: 9998 !important;
    background-color: rgba(0, 0, 0, 0.5);
}

#event-full-text-modal .close {
    z-index: 10002 !important;
    cursor: pointer;
    padding: 8px 12px;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

#event-full-text-modal .close:hover {
    opacity: 1;
}

#event-full-text-modal .modal-body {
    padding: 2rem;
}

#event-full-text-modal .modal-header {
    padding: 1.5rem 2rem 0 2rem;
}

/* Mobile specific modal fixes */
@media (max-width: 767px) {
    #event-full-text-modal {
        z-index: 99999 !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
    }
    
    #event-full-text-modal .modal-dialog {
        z-index: 100000 !important;
        margin: 1rem auto !important;
        max-width: calc(100% - 2rem) !important;
        width: calc(100% - 2rem) !important;
        max-height: 90vh !important;
        position: relative !important;
    }
    
    #event-full-text-modal .modal-content {
        z-index: 100001 !important;
        max-height: 90vh !important;
        overflow-y: auto !important;
        position: relative !important;
        -webkit-overflow-scrolling: touch !important;
        border-radius: 20px !important;
        box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3) !important;
    }
    
    #event-full-text-modal .modal-body {
        padding: 1.5rem !important;
    }
    
    #event-full-text-modal .modal-header {
        padding: 1rem 1.5rem 0 1.5rem !important;
    }
    
    #event-full-text-modal .modal-backdrop {
        z-index: 99998 !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        background-color: rgba(0, 0, 0, 0.5) !important;
    }
    
    #event-full-text-modal .close {
        z-index: 100002 !important;
        font-size: 28px !important;
        top: 10px !important;
        right: 15px !important;
        left: auto !important;
        padding: 8px !important;
        background: rgba(255, 255, 255, 0.9) !important;
        border-radius: 50% !important;
        width: 40px !important;
        height: 40px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        position: absolute !important;
        cursor: pointer !important;
        touch-action: manipulation !important;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1) !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
        opacity: 0.8 !important;
        transition: all 0.3s ease !important;
    }
    
    #event-full-text-modal .close:hover,
    #event-full-text-modal .close:active {
        background: rgba(255, 255, 255, 1) !important;
        opacity: 1 !important;
        transform: scale(1.1) !important;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2) !important;
    }
    
    /* For Arabic version, close button should be on the right */
    [dir="rtl"] #event-full-text-modal .close,
    html[lang="ar"] #event-full-text-modal .close {
        right: 10px !important;
        left: auto !important;
    }
    
    /* For English version, close button should be on the left */
    [dir="ltr"] #event-full-text-modal .close,
    html[lang="en"] #event-full-text-modal .close {
        left: 10px !important;
        right: auto !important;
    }
    
    #event-full-text-modal .close:hover,
    #event-full-text-modal .close:active {
        background: rgba(255, 255, 255, 1) !important;
        transform: scale(1.1) !important;
    }
    
    #event-full-text-modal .close span {
        line-height: 1 !important;
        font-weight: bold !important;
    }
    
    /* Ensure modal body is scrollable */
    #event-full-text-modal .modal-body {
        padding: 1rem !important;
        max-height: calc(95vh - 100px) !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
}

* {
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
}

body::-webkit-scrollbar {
    width: 1px;
}

body::-webkit-scrollbar-thumb {
    background-color: #000000;
    width: 1px;
}

.fade-in-animation {
    animation: fadeIn 2s ease;
}

/* ============================================
   Header & Content Spacing
   ============================================ */

section.head {
    position: relative;
}

.content {
    position: relative;
    z-index: 15;
    padding-top: 40px;
    padding-bottom: 20px;
}

.content-text2 {
    margin-top: 30px;
    margin-bottom: 20px;
}

.head-text {
    margin-top: 15px;
}

/* ============================================
   Events Section - General Styles
   ============================================ */

#events {
    margin-top: 3rem !important;
    margin-bottom: 3rem !important;
}

#events .service_text3 {
    font-size: 25px !important;
    line-height: 20px !important;
    margin-top: 20px;
    margin-bottom: 1.5rem !important;
}

#events .carousel-control-prev,
#events .carousel-control-next {
    width: 35px;
    height: 35px;
    opacity: 0.8;
}

/* Events Images - Unified Size and Object Fit */
#events .col-md-4 img,
#events .event-image {
    width: 100% !important;
    height: 258px !important;
    max-width: 350px !important;
    display: block;
    margin: 0 auto;
    object-fit: contain !important;
    object-position: center;
    background-color: #f5f5f5;
}

/* Gallery Images - Object Fit Contain */
#gallery .gallery-item img,
#galleryCarousel .gallery-item img {
    object-fit: contain !important;
    object-position: center;
    background-color: #f5f5f5;
}

/* Hero Section Head - Background Size Contain */
section.head::before {
    background-size: contain !important;
    background-position: center !important;
}

#events .carousel-control-prev img,
#events .carousel-control-next img {
    width: 30px;
    height: 30px;
}

/* ============================================
   Reservations Section - General Styles
   ============================================ */

#reservations {
    margin-top: 3rem !important;
    margin-bottom: 3rem !important;
}

#reservations .service_text3 {
    font-size: 25px !important;
    line-height: 20px !important;
    margin-top: 20px;
    margin-bottom: 1.5rem !important;
}

/* ============================================
   Mobile Styles (max-width: 767px)
   ============================================ */

@media (max-width: 767px) {
    @keyframes slideFromTop {
        from {
            transform: translateY(-100%);
            opacity: 0;
        }
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
        }
        to {
            opacity: 1;
        }
    }

    /* Header & Content Spacing Mobile */
    section.head {
        position: relative;
        width: 100%;
        max-width: 100%;
        height: 60vh;
        display: flex;
        justify-content: center;
        align-items: center;
        overflow: hidden;
        margin-top: -10px;
        margin-bottom: 5%;
    }

    /* Hero Section Background - Cover on Mobile to Remove Gaps */
    section.head::before {
        background-size: cover !important;
        background-position: center !important;
    }

    .content {
        padding-top: 30px !important;
        padding-bottom: 15px !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    .content-text2 {
        margin-top: 20px !important;
        margin-bottom: 15px !important;
        font-size: 28px !important;
        line-height: 36px !important;
        padding: 0 15px !important;
    }

    .head-text {
        margin-top: 10px !important;
        padding: 0 10px !important;
    }

    .content-text1 {
        font-size: 14px !important;
        line-height: 24px !important;
        padding: 0 10px !important;
    }

    .content-text3 {
        font-size: 16px !important;
        line-height: 24px !important;
        padding: 0 10px !important;
    }

    /* Navbar Mobile */
    .navbar {
        padding: 10px 15px !important;
        flex-wrap: wrap;
        position: relative;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    
    /* Ensure navbar collapse menu is hidden by default and appears as full overlay when shown */
    .navbar-collapse {
        z-index: 10001 !important;
        position: fixed !important;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100% !important;
        height: 100vh !important;
        background-color: rgba(18, 23, 67, 0.98) !important;
        display: none !important; /* Hidden by default */
        overflow-y: auto !important;
        padding: 20px !important;
        margin: 0 !important;
    }
    
    .navbar-collapse.show {
        z-index: 10001 !important;
        display: block !important; /* Show when toggled */
    }
    
    .navbar-collapse.collapsing {
        display: block !important; /* Show during animation */
    }
    
    /* Close Button (X) - Only visible on mobile */
    .navbar-close-btn {
        position: absolute !important;
        top: 20px !important;
        right: 20px !important;
        background: transparent !important;
        border: none !important;
        color: #ffffff !important;
        font-size: 40px !important;
        line-height: 1 !important;
        cursor: pointer !important;
        z-index: 10003 !important;
        width: 50px !important;
        height: 50px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 50% !important;
        transition: background-color 0.3s ease !important;
    }
    
    /* RTL support for close button */
    [dir="rtl"] .navbar-close-btn,
    html[lang="ar"] .navbar-close-btn {
        right: auto !important;
        left: 20px !important;
    }
    
    .navbar-close-btn:hover {
        background-color: rgba(255, 255, 255, 0.1) !important;
    }
    
    .navbar-close-btn span {
        font-weight: 300 !important;
        line-height: 1 !important;
    }

    .navbar-nav {
        background-color: transparent !important;
        padding: 60px 20px 20px 20px !important;
        text-align: left;
        display: block !important;
        margin: 0 !important;
        font-size: 14px;
        width: 100% !important;
        border-radius: 0 !important;
    }

    .navbar-nav .nav-item {
        margin-bottom: 10px;
    }

    .navbar-nav .nav-item:last-child {
        margin-bottom: 0;
    }

    .navbar-nav .nav-link {
        padding: 10px 15px !important;
        font-size: 16px !important;
        display: block;
        border-radius: 4px;
        transition: background-color 0.3s ease;
    }

    .navbar-nav .nav-link:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }

    .navbar-toggler {
        padding: 5px 10px;
        margin-left: auto;
        order: 2;
        border: none;
        background: transparent;
    }

    .navbar-toggler:focus {
        outline: 2px solid rgba(255, 255, 255, 0.5);
        outline-offset: 2px;
    }

    .navbar-toggler img {
        width: 20px !important;
        height: 20px !important;
    }

    .navbar-brand {
        order: 3;
        margin-left: auto;
        margin-right: 10px;
    }

    .navbar-brand img {
        max-height: 40px !important;
        width: auto;
    }

    /* Button Mobile */
    #contactButton {
        width: 120px !important;
        height: 35px !important;
        font-size: 14px !important;
        line-height: 20px !important;
        padding: 5px 10px !important;
        order: 1;
        margin-left: 10px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .btn-link {
        padding: 5px 8px !important;
        font-size: 12px !important;
        order: 4;
    }

    .btn-link img {
        width: 16px !important;
        height: 16px !important;
    }

    form#languageForm {
        order: 4;
    }

    /* Services Section Mobile */
    .services {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    .services .col-md-5,
    .services .col-md-2 {
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
        margin-bottom: 30px;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .services .he.row {
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        margin: 0 auto !important;
        padding: 0 !important;
    }

    /* Center service images and text on mobile */
    .services .he.row .col-md-2 {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    .services .he.row .col-md-2 > div {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        margin: 0 auto !important;
        width: 100% !important;
    }

    .services .he.row .col-md-2 .d-flex.justify-content-center,
    .services .he.row .col-md-2 .d-flex.align-items-center,
    .services .he.row .col-md-2 .d-flex.justify-content-center.align-items-center {
        margin: 0 auto !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        width: auto !important;
    }

    .services .he.row .col-md-2 .position-relative {
        margin: 0 auto !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        width: auto !important;
    }

    .services .he.row .col-md-2 img {
        margin: 0 auto !important;
        display: block !important;
        max-width: 100% !important;
    }

    .services .he.row .col-md-2 img[src*="frameserv.svg"] {
        margin: 0 auto !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        position: absolute !important;
    }

    .services .he.row .col-md-2 p {
        text-align: center !important;
        margin: 0 auto !important;
        width: 100% !important;
    }

    .services .he.row .col-md-2 .description-container {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        width: 100% !important;
        margin: 0 auto !important;
    }

    .services .he.row .col-md-2 .description-container p {
        text-align: center !important;
        margin: 0 auto !important;
        width: 100% !important;
    }

    /* Center service image containers */
    .services .he.row .col-md-2 .service-image-container {
        margin: 0 auto !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        position: relative !important;
    }

    /* Center all text elements in services */
    .services .service_text1,
    .services .service_text2,
    .services .service_text3,
    .services #textd {
        text-align: center !important;
        margin-left: auto !important;
        margin-right: auto !important;
        width: 100% !important;
    }

    /* Center editable spans */
    .services .he.row .col-md-2 .editable-service-title,
    .services .he.row .col-md-2 .editable-service-description,
    .services .he.row .col-md-2 .editable-service-description-short {
        text-align: center !important;
        margin: 0 auto !important;
        display: block !important;
    }

    /* Center read more buttons */
    .services .he.row .col-md-2 .read-more-button,
    .services .he.row .col-md-2 .show-less-button {
        text-align: center !important;
        margin: 0 auto !important;
        display: block !important;
    }

    /* Center all text elements in services */
    .services .service_text1,
    .services .service_text2,
    .services .service_text3,
    .services #textd {
        text-align: center !important;
        margin-left: auto !important;
        margin-right: auto !important;
        width: 100% !important;
    }

    /* Center service image containers */
    .services .he.row .col-md-2 .service-image-container {
        margin: 0 auto !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        position: relative !important;
    }

    /* Override inline styles for centering */
    .services .he.row .col-md-2 .d-flex.justify-content-center.align-items-center.position-relative {
        margin: 0 auto !important;
        left: auto !important;
        right: auto !important;
    }

    /* Footer Section Mobile */
    footer {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    footer .container {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    footer .row {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        gap: 30px !important;
    }

    footer .col-lg-2,
    footer .col-lg-4,
    footer .col-md-2,
    footer .col-md-3,
    footer .col-md-4 {
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
        margin-bottom: 30px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    /* Center footer text elements */
    footer p,
    footer .text-left,
    footer .text-center {
        text-align: center !important;
        margin: 0 auto !important;
        width: 100% !important;
    }

    /* Center footer lists */
    footer ul.list-unstyled {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        width: 100% !important;
        padding: 0 !important;
    }

    footer ul.list-unstyled li {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        width: 100% !important;
        margin-bottom: 15px !important;
    }

    footer ul.list-unstyled li a,
    footer ul.list-unstyled li span {
        text-align: center !important;
        margin: 0 auto !important;
    }

    /* Center footer images */
    footer img {
        margin: 0 auto !important;
        display: block !important;
    }

    /* Center footer logo */
    footer .d-flex.justify-content-end,
    footer .d-flex.justify-content-start {
        justify-content: center !important;
        margin: 0 auto !important;
    }

    /* Center footer social icons */
    footer .row.d-flex.justify-content-end {
        justify-content: center !important;
        margin: 0 auto !important;
    }

    footer .rounded-circle {
        margin: 0 auto !important;
    }

    /* Center zigzag images */
    footer .d-flex.justify-content-end span,
    footer .d-flex.justify-content-end {
        justify-content: center !important;
        margin: 0 auto !important;
    }

    /* Center editable fields */
    footer .editable-footer-field,
    footer .editable-header-routes {
        text-align: center !important;
        margin: 0 auto !important;
        display: block !important;
    }

    /* Center copyright section */
    footer .text-center:last-child {
        text-align: center !important;
        margin: 0 auto !important;
        width: 100% !important;
    }

    /* Projects Section Mobile */
    #projects .col-md-3,
    .projects .col-md-3 {
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
        margin-bottom: 30px;
    }

    #projects .carousel-item .row,
    .projects .carousel-item .row {
        flex-direction: column;
    }

    /* Programs Section Mobile */
    #programs .col-md-6,
    #programs .col-md-3,
    .programs .col-md-6,
    .programs .col-md-3 {
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
        margin-bottom: 30px;
    }

    #programs .carousel-item .row,
    .programs .carousel-item .row {
        flex-direction: column;
    }

    /* Events Section Mobile - كل عنصر في سطر جديد */
    #events {
        margin-top: 2rem !important;
        margin-bottom: 2rem !important;
    }

    #events .service_text3 {
        font-size: 25px !important;
        line-height: 20px !important;
        margin-top: 20px;
        margin-bottom: 1rem !important;
    }

    #events .col-md-4,
    #events .col-md-6 {
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
        padding-left: 10px;
        padding-right: 10px;
        margin-bottom: 20px;
    }

    #events .carousel-item .row {
        flex-direction: column;
        margin-left: 0;
        margin-right: 0;
    }

    #events .col-md-4 img,
    #events .event-image {
        width: 100% !important;
        height: 258px !important;
        max-width: 350px !important;
        display: block;
        margin: 0 auto;
        object-fit: contain !important;
        object-position: center;
    }

    #events .col-md-4 {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
        overflow: visible;
    }

    #events .col-md-4 img,
    #events .event-image {
        position: relative;
        z-index: 0;
        width: 100% !important;
        height: 258px !important;
        max-width: 350px !important;
        object-fit: contain !important;
        object-position: center;
    }

    #events .event-container {
        padding: 0 10px;
        margin-top: 10px;
        width: 100%;
        position: relative;
        z-index: 1;
        overflow: visible;
    }

    #events .col-md-4 .d-flex.justify-content-center {
        width: 100%;
        margin-top: 10px;
        position: relative;
        z-index: 1;
        overflow: visible;
    }

    #events .col-md-4 .short-event {
        position: relative;
        z-index: 1;
        overflow: visible;
    }

    #events .d-flex.justify-content-center {
        font-size: 16px !important;
        line-height: 24px !important;
    }

    #events .carousel-control-prev,
    #events .carousel-control-next {
        width: 30px !important;
        height: 30px !important;
    }

    /* Reservations Section Mobile - كل عنصر في سطر جديد */
    #reservations {
        margin-top: 2rem !important;
        margin-bottom: 2rem !important;
    }

    #reservations .service_text3 {
        font-size: 25px !important;
        line-height: 20px !important;
        margin-top: 20px;
        margin-bottom: 1rem !important;
    }

    #reservations .col-md-6 {
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
        padding-left: 15px;
        padding-right: 15px;
        margin-bottom: 25px;
    }

    #reservations .row.custom-row-style {
        flex-direction: column;
    }

    #reservations .custom-image-style {
        width: 100% !important;
        height: auto !important;
        max-width: 100%;
    }

    #reservations .custom-text-style {
        font-size: 25px !important;
        line-height: 20px !important;
        margin-top: 20px;
        text-align: center !important;
        margin-bottom: 15px !important;
    }

    #reservations .custom-text-container {
        font-size: 16px !important;
        line-height: 26px !important;
        text-align: center !important;
        padding: 0 15px;
    }

    /* Gallery Mobile - صورتين في كل سلايدر */
    #gallery .gallery-item {
        width: calc(50% - 7.5px) !important;
        max-width: calc(50% - 7.5px) !important;
        height: 220px !important;
        margin-bottom: 15px !important;
        flex: 0 0 calc(50% - 7.5px) !important;
    }

    #gallery .carousel-item .row {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 15px !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    #galleryCarousel {
        padding: 0 10px 30px 10px !important;
    }

    #gallery .carousel-control-prev,
    #gallery .carousel-control-next {
        width: 30px !important;
        height: 30px !important;
    }

    #gallery .carousel-control-prev {
        left: 0 !important;
    }

    #gallery .carousel-control-next {
        right: 0 !important;
    }

    #gallery .carousel-indicators {
        position: relative !important;
        bottom: -20px !important;
        margin-top: 20px;
    }

    #gallery .carousel-indicators li {
        width: 8px !important;
        height: 8px !important;
    }

    #imageModal span {
        top: 5px !important;
        right: 15px !important;
        font-size: 30px !important;
    }

    #modalImage {
        max-width: 98% !important;
        max-height: 80% !important;
        margin-top: 15% !important;
    }

    /* Carousel Mobile */
    .carousel {
        overflow: visible;
        position: relative;
    }

    .carousel-inner {
        overflow: visible;
        width: 100%;
    }

    .carousel-item {
        min-height: auto;
        transition: transform 0.6s ease-in-out;
    }

    .carousel-item.active {
        display: block;
    }

    .carousel-item .row {
        margin-left: 0;
        margin-right: 0;
        display: flex;
        flex-wrap: wrap;
    }

    .carousel-control-prev,
    .carousel-control-next {
        width: 40px;
        height: 40px;
        top: 50%;
        transform: translateY(-50%);
        background-color: rgba(0, 0, 0, 0.3);
        border-radius: 50%;
        opacity: 0.8;
    }

    .carousel-control-prev:hover,
    .carousel-control-next:hover {
        opacity: 1;
        background-color: rgba(0, 0, 0, 0.5);
    }

    .carousel-control-prev {
        left: 10px;
    }

    .carousel-control-next {
        right: 10px;
    }

    .carousel-control-prev-icon,
    .carousel-control-next-icon {
        width: 20px;
        height: 20px;
    }

    .carousel-indicators {
        position: relative;
        margin-top: 20px;
        margin-bottom: 20px;
        justify-content: center;
        flex-wrap: wrap;
        padding: 0;
    }

    .carousel-indicators li {
        width: 10px;
        height: 10px;
        margin: 0 5px;
        border-radius: 50%;
        background-color: #bbb;
        border: none;
        cursor: pointer;
        transition: background-color 0.3s ease;
    }

    .carousel-indicators li.active {
        background-color: #121743;
    }

    .carousel-item .col-md-3,
    .carousel-item .col-md-6 {
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Hide carousel indicators that appear after footer */
    footer ~ .carousel-indicators {
        display: none !important;
    }

    /* Hide carousel indicators that are siblings of footer */
    footer + .carousel-indicators {
        display: none !important;
    }

    /* Ensure carousel indicators are only visible within their section */
    section#events .carousel-indicators {
        display: flex !important;
    }
    
    /* Hide carousel indicators for carouselExampleIndicators2 that appear after footer */
    footer ~ section#events .carousel-indicators,
    footer ~ * section#events .carousel-indicators,
    footer ~ .carousel-indicators[data-target="#carouselExampleIndicators2"],
    footer ~ * .carousel-indicators li[data-target="#carouselExampleIndicators2"] {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        line-height: 0 !important;
    }
    
    /* Remove spacing from section#events when it appears after footer */
    footer ~ section#events,
    footer ~ * section#events {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }
    
    /* Remove spacing from carousel indicators container when hidden */
    footer ~ section#events .carousel-indicators,
    footer ~ * section#events .carousel-indicators {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    /* Hide any carousel indicators that come after the content div (where footer is) */
    .content ~ .carousel-indicators,
    #content ~ .carousel-indicators {
        display: none !important;
        margin: 0 !important;
        padding: 0 !important;
        height: 0 !important;
    }
    
    /* Additional rule: Hide indicators that are positioned after footer in the DOM */
    body footer ~ * .carousel-indicators li[data-target="#carouselExampleIndicators2"] {
        display: none !important;
        margin: 0 !important;
        padding: 0 !important;
        height: 0 !important;
    }

    /* Footer Mobile */
    footer {
        padding-top: 60px !important;
        padding-bottom: 20px !important;
        background-size: cover !important;
        background-position: center !important;
        margin-bottom: 0 !important;
    }
    
    /* Remove any spacing after footer */
    footer ~ * {
        margin-top: 0 !important;
    }
    
    /* Ensure body and html don't have extra height */
    html, body {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }
    
    /* Remove any blank space after footer - only hide sections and divs */
    body > footer:last-of-type ~ section,
    body > footer:last-of-type ~ div:not(.fixed-bottom):not(.fixed-bottom-left) {
        display: none !important;
        height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        visibility: hidden !important;
    }
    
    /* Specifically hide section#events when it appears after footer (for lang="en") */
    body > footer:last-of-type ~ section#events {
        display: none !important;
        height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        visibility: hidden !important;
        overflow: hidden !important;
    }
    
    /* Hide any content inside section#events when it's after footer */
    body > footer:last-of-type ~ section#events * {
        display: none !important;
        height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* Ensure body ends at footer */
    body {
        overflow-x: hidden;
    }
    
    /* Remove blank space when lang is en */
    html[lang="en"] body > footer:last-of-type ~ section#events,
    html[lang="en"] body > footer:last-of-type ~ *:not(.fixed-bottom):not(.fixed-bottom-left) {
        display: none !important;
        height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        visibility: hidden !important;
    }

    footer .container {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    footer .row {
        margin-left: 0;
        margin-right: 0;
    }

    footer .col-md-3,
    footer .col-md-4,
    footer .col-md-6 {
        width: 100%;
        margin-bottom: 30px;
        padding-left: 15px;
        padding-right: 15px;
    }

    footer h5,
    footer h4,
    footer h3 {
        font-size: 18px !important;
        margin-bottom: 15px !important;
    }

    footer p,
    footer a,
    footer li {
        font-size: 14px !important;
        line-height: 24px !important;
    }

    /* General Mobile */
    .container,
    .container-fluid {
        padding-left: 15px !important;
        padding-right: 15px !important;
        max-width: 100%;
        overflow-x: hidden;
    }

    .card {
        margin-bottom: 15px;
        max-width: 100%;
        width: 100%;
        height: auto;
    }

    section {
        padding: 20px 0 !important;
    }

    button, .btn, a.btn {
        min-height: 44px;
        min-width: 44px;
    }

    * {
        -webkit-overflow-scrolling: touch;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    }

    html, body {
        max-width: 100%;
        overflow-x: hidden;
    }

    .responsive-text {
        font-size: 18px;
        line-height: 32px;
    }

    .service_text1 {
        font-size: 18px !important;
        line-height: 20px !important;
        text-align: center !important;
        margin: 0 auto !important;
    }

    .service_text2 {
        font-size: 25px !important;
        margin-top: 10px;
        line-height: 20px !important;
        text-align: center !important;
        margin: 0 auto !important;
    }

    .service_text3 {
        font-size: 25px !important;
        margin-top: 20px;
        line-height: 20px !important;
        text-align: center !important;
        margin: 0 auto !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
    }

    .col-md-1 {
        display: block !important;
        margin-top: 40px;
        text-align: center;
    }

    .col-md-2 {
        display: inline-block !important;
        width: 100%;
        text-align: center;
    }

    /* Additional centering for services section on mobile */
    .services .col-md-5 {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .services .col-md-5 p,
    .services .col-md-5 div {
        text-align: center !important;
        margin: 0 auto !important;
    }

    .services #textd {
        text-align: center !important;
        margin: 0 auto !important;
        width: 100% !important;
    }

    .custom-image-style {
        max-width: 80%;
        margin: 0 auto;
        display: block;
    }

    .next {
        margin-top: 4rem !important;
    }

    .prev {
        margin-bottom: 4rem !important;
    }
}

/* ============================================
   Small Mobile Devices (max-width: 480px)
   ============================================ */

@media (max-width: 480px) {
    section.head {
        height: 50vh !important;
        margin-bottom: 3% !important;
    }

    /* Hero Section Background - Cover on Small Mobile to Remove Gaps */
    section.head::before {
        background-size: cover !important;
        background-position: center !important;
    }

    .content-text2 {
        font-size: 22px !important;
        line-height: 28px !important;
        margin-bottom: 15px !important;
    }

    .content-text1 {
        font-size: 12px !important;
        line-height: 20px !important;
    }

    #contactButton {
        width: 100px !important;
        height: 32px !important;
        font-size: 12px !important;
    }

    .navbar-brand img {
        max-height: 35px !important;
    }

    .navbar-toggler img {
        width: 18px !important;
        height: 18px !important;
    }

    .navbar-nav {
        padding: 15px !important;
    }

    .navbar-nav .nav-link {
        font-size: 14px !important;
        padding: 8px 10px !important;
    }

    footer {
        padding-top: 40px !important;
        padding-bottom: 15px !important;
    }

    footer h5,
    footer h4,
    footer h3 {
        font-size: 16px !important;
    }

    footer p,
    footer a,
    footer li {
        font-size: 13px !important;
    }

    #events .col-md-4 img,
    #events .event-image {
        height: 258px !important;
        width: 100% !important;
        max-width: 350px !important;
        object-fit: contain !important;
        object-position: center;
        display: block;
    }

    #events .col-md-4 {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }

    #events .col-md-4 > * {
        position: relative !important;
        z-index: auto !important;
    }

    #events .service_text3 {
        font-size: 22px !important;
        line-height: 18px !important;
    }

    #reservations .custom-text-style {
        font-size: 22px !important;
        line-height: 18px !important;
    }

    #reservations .service_text3 {
        font-size: 22px !important;
        line-height: 18px !important;
    }
}

/* ============================================
   Tablet Styles (768px - 1024px)
   ============================================ */

@media (min-width: 768px) and (max-width: 1024px) {
    section.head {
        height: 70vh;
    }

    .navbar {
        padding: 15px 20px;
    }

    #contactButton {
        width: 140px;
        height: 38px;
        font-size: 18px;
    }

    .navbar-brand img {
        max-height: 50px;
    }

    .content-text2 {
        font-size: 38px !important;
        line-height: 50px !important;
    }

    .content-text1 {
        font-size: 18px !important;
        line-height: 32px !important;
    }

    .navbar-nav .nav-link {
        font-size: 16px !important;
        padding: 8px 12px !important;
    }

    footer {
        padding-top: 80px !important;
    }

    footer .col-md-3,
    footer .col-md-4 {
        width: 50%;
    }

    .features .col-md-6 {
        width: 50%;
    }

    .services .col-md-2 {
        width: 50% !important;
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }

    #projects .col-md-3,
    .projects .col-md-3 {
        width: 50% !important;
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }

    #programs .col-md-3,
    .programs .col-md-3 {
        width: 50% !important;
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }

    #events .col-md-4 {
        width: 50% !important;
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }
}

/* ============================================
   Gallery Section - General Styles
   ============================================ */

#gallery {
    margin-top: 3rem !important;
    margin-bottom: 3rem !important;
}

#gallery .service_text3 {
    font-size: 25px !important;
    line-height: 20px !important;
    margin-top: 20px;
    margin-bottom: 1.5rem !important;
}

#galleryCarousel {
    padding: 0 60px 60px 60px;
    overflow: visible;
}

#gallery .carousel-control-prev,
#gallery .carousel-control-next {
    width: 50px;
    height: 50px;
    opacity: 0.8;
}

#gallery .carousel-control-prev {
    left: 0;
}

#gallery .carousel-control-next {
    right: 0;
}

#gallery .carousel-indicators {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
}

#gallery .carousel-indicators li {
    width: 12px;
    height: 12px;
    margin: 0 5px;
}

/* Gallery Modal */
#imageModal {
    padding: 20px;
}

#imageModal span {
    top: 20px;
    right: 35px;
    font-size: 40px;
}

#modalImage {
    max-width: 90%;
    max-height: 90%;
    margin-top: 5%;
}


@media (max-width: 480px) {
    #gallery .gallery-item {
        height: 200px !important;
    }

    #gallery .service_text3 {
        font-size: 22px !important;
        line-height: 18px !important;
    }

    #galleryCarousel {
        padding: 0 5px 25px 5px !important;
    }
}

/* Tablet Gallery */
@media (min-width: 768px) and (max-width: 1024px) {
    #gallery .gallery-item {
        width: 50% !important;
        max-width: 50% !important;
        flex: 0 0 50% !important;
        height: 240px !important;
    }

    #gallery .carousel-item .row {
        flex-direction: row;
        flex-wrap: wrap;
    }
}

/* ============================================
   Prevent Layout Shifts (Fix Shaking)
   ============================================ */

#US,
.US,
[id="2030"],
[class*="2030"] {
    will-change: transform;
    backface-visibility: hidden;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

#US .custom-image-style,
.US .custom-image-style,
[id="2030"] .custom-image-style,
[class*="2030"] .custom-image-style {
    will-change: transform;
    backface-visibility: hidden;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

#US .fade-in,
.US .fade-in,
[id="2030"] .fade-in,
[class*="2030"] .fade-in {
    will-change: transform, opacity;
    backface-visibility: hidden;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

/* Prevent layout shifts during ScrollReveal animations */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ============================================
   Landscape Mobile
   ============================================ */

@media (max-width: 767px) and (orientation: landscape) {
    section.head {
        height: 80vh !important;
    }

    .navbar {
        padding: 8px 15px !important;
    }
}

/* ============================================
   Statistics Section (the_range) - Responsive Styles
   ============================================ */

/* Default: 4 items in one row (700px and above) */
.the_range .container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.the_range .col-md-3 {
    flex: 0 0 calc(25% - 0.75rem);
    max-width: calc(25% - 0.75rem);
    margin-bottom: 1rem;
}

/* Below 700px: 2 items per row */
@media (max-width: 699px) {
    .the_range .col-md-3 {
        flex: 0 0 calc(50% - 0.5rem);
        max-width: calc(50% - 0.5rem);
        margin-bottom: 1.5rem;
        padding: 0.5rem;
    }
}

@media (max-width: 767px) {
    .he {
        max-width: 100%;
        width: 100%;
    }
    
    .the_range {
        height: auto !important;
        padding: 1.5rem 0 !important;
    }
    
    .the_range .container {
        padding: 0.5rem;
    }
    
    .the_range .mt-5 {
        margin-top: 1rem !important;
    }
    
    .the_range [style*="font-size: 25px"] {
        font-size: 20px !important;
    }
    
    .the_range [style*="font-size: 18px"] {
        font-size: 16px !important;
    }
}

/* Small mobile: 1 item per row */
@media (max-width: 575px) {
    .the_range {
        height: auto !important;
        padding: 1rem 0 !important;
    }
    
    .the_range .col-md-3 {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 1rem;
        padding: 0.5rem;
    }
    
    .the_range .mt-5 {
        margin-top: 0.75rem !important;
    }
    
    .the_range [style*="font-size: 25px"] {
        font-size: 18px !important;
        line-height: 24px !important;
    }
    
    .the_range [style*="font-size: 18px"] {
        font-size: 14px !important;
        line-height: 20px !important;
    }
}

.col-md-3 a:hover {
    color: blue;
}

.col-md-3 a {
    color: #000000;
}

/* Hide close button on tablets and desktop */
@media (min-width: 768px) {
    .navbar-close-btn {
        display: none !important;
    }
}

/* Ensure WhatsApp and scroll to top buttons are always visible - HIGHEST PRIORITY */
#scrollToTopButton,
.scroll-to-top-btn,
.whatsapp-btn,
a.fixed-bottom-left,
a.fixed-bottom,
.fixed-bottom,
.fixed-bottom-left {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 10000 !important;
    position: fixed !important;
    height: auto !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    pointer-events: auto !important;
    background: transparent !important;
    border: none !important;
}

/* WhatsApp button styling - Transparent background */
.whatsapp-btn,
a.fixed-bottom-left {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 10000 !important;
    position: fixed !important;
    background: transparent !important;
    border: none !important;
}

.whatsapp-btn:hover,
a.fixed-bottom-left:hover {
    opacity: 0.9 !important;
}

.whatsapp-btn:active,
a.fixed-bottom-left:active {
    opacity: 0.8 !important;
}

/* Scroll to top button styling - Transparent background */
.scroll-to-top-btn,
#scrollToTopButton,
a.fixed-bottom {
    z-index: 10000 !important;
    position: fixed !important;
    background: transparent !important;
    border: none !important;
}

.scroll-to-top-btn:hover,
#scrollToTopButton:hover,
a.fixed-bottom:hover {
    opacity: 0.9 !important;
}

.scroll-to-top-btn:active,
#scrollToTopButton:active,
a.fixed-bottom:active {
    opacity: 0.8 !important;
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .whatsapp-btn {
        width: 50px !important;
        height: 50px !important;
        bottom: 15px !important;
        right: 15px !important;
        border-radius: 8px !important;
    }
    
    .scroll-to-top-btn,
    #scrollToTopButton {
        width: 50px !important;
        height: 50px !important;
        bottom: 15px !important;
        left: 15px !important;
        border-radius: 8px !important;
    }
    
    html[lang="ar"] .whatsapp-btn {
        left: 15px !important;
        bottom: 80px !important;
    }
}

/* ============================================
   Hero Text - Keep words together on same line
   ============================================ */

#textContent,
#heroText,
.head-text.content-text1 {
    white-space: normal !important;
    word-break: keep-all !important;
    overflow-wrap: break-word !important;
    hyphens: none !important;
    -webkit-hyphens: none !important;
    -moz-hyphens: none !important;
    -ms-hyphens: none !important;
    word-spacing: normal !important;
    line-break: auto !important;
}

/* For Arabic text specifically */
[dir="rtl"] #textContent,
[dir="rtl"] #heroText,
html[lang="ar"] #textContent,
html[lang="ar"] #heroText {
    word-break: keep-all !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
}
