/* =========================================
   VELLORA CLEAN - RESPONSIVE FINAL
   Fixed Header + Clean Mobile Menu
========================================= */

:root {
    --vellora-topbar-height: 44px;
    --vellora-header-height: 76px;
    --vellora-fixed-header-total: 120px;
}

/* =========================================
   إعدادات عامة
========================================= */

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--vellora-fixed-header-total);
}

body {
    padding-top: var(--vellora-fixed-header-total);
    overflow-x: hidden;
}

/* =========================================
   الهيدر الثابت
========================================= */

.top-bar {
    position: fixed !important;
    z-index: 9000 !important;
    top: 0 !important;
    right: 0 !important;
    left: 0 !important;
    width: 100% !important;

    height: var(--vellora-topbar-height) !important;
    min-height: var(--vellora-topbar-height) !important;
    max-height: var(--vellora-topbar-height) !important;

    margin: 0 !important;
    padding: 0 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    overflow: visible !important;
}

.top-bar .top-bar-content {
    width: min(92%, var(--container-width)) !important;
    height: var(--vellora-topbar-height) !important;
    min-height: var(--vellora-topbar-height) !important;
    max-height: var(--vellora-topbar-height) !important;

    margin: 0 auto !important;
    padding: 0 12px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    overflow: visible !important;
}

.top-bar .top-bar-content p {
    width: 100% !important;
    margin: 0 !important;
    padding: 2px 0 0 !important;

    display: block !important;

    color: #ffffff !important;
    font-family: "Cairo", sans-serif !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 28px !important;

    text-align: center !important;
    white-space: nowrap !important;

    position: static !important;
    inset: auto !important;
    top: auto !important;
    bottom: auto !important;

    transform: none !important;
    overflow: visible !important;
}

.main-header,
.main-header.fixed-header,
.main-header.is-scrolled,
.main-header.scrolled,
.main-header.sticky {
    position: fixed !important;
    z-index: 9100 !important;
    top: var(--vellora-topbar-height) !important;
    right: 0 !important;
    left: 0 !important;
    width: 100% !important;
    margin: 0 !important;
    background-color: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 7px 24px rgba(6, 47, 87, 0.10) !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
}

.main-header .navbar {
    min-height: var(--vellora-header-height) !important;
}

/* منع أي كود قديم من إضافة مسافة للهيدر */
main {
    margin-top: 0 !important;
}

/* =========================================
   الشاشات أقل من 1150px
========================================= */

@media (max-width: 1150px) {
    .navbar {
        gap: 20px;
    }

    .navigation {
        gap: 20px;
    }

    .header-call,
    .header-whatsapp {
        padding-inline: 12px;
        font-size: 12px;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .why-us-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .why-us-card {
        max-width: 650px;
    }

    .footer-grid {
        grid-template-columns: 1.3fr 1fr 1fr;
    }

    .footer-about {
        grid-column: span 3;
    }
}

/* =========================================
   التابلت + قائمة الموبايل
========================================= */

@media (max-width: 950px) {
    .navbar {
        display: grid;
        grid-template-columns: auto 1fr auto;
        gap: 14px;
        min-height: var(--vellora-header-height) !important;
    }

    .logo {
        position: relative;
        z-index: 9200;
    }

    .logo img {
        width: 105px;
        height: 58px;
    }

    .header-actions {
        position: relative;
        z-index: 9200;
        justify-self: center;
    }

    /* -----------------------------------------
       طبقة التعتيم
       بدون عنصر HTML إضافي
    ----------------------------------------- */

    body.menu-open::before {
        position: fixed;
        z-index: 9500;
        inset: 0;
        background-color: rgba(3, 24, 44, 0.58);
        content: "";
        pointer-events: none;
    }

    body.menu-open {
        overflow: hidden !important;
        touch-action: none;
    }

    /* -----------------------------------------
       زر القائمة
    ----------------------------------------- */

    .menu-toggle {
        position: relative !important;
        z-index: 9800 !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        gap: 5px;
        justify-self: end;
        width: 44px;
        height: 44px;
        padding: 0;
        border: 2px solid var(--primary-color);
        border-radius: 12px;
        background-color: #ffffff;
        cursor: pointer;
        transition:
            background-color 0.25s ease,
            box-shadow 0.25s ease,
            transform 0.25s ease;
    }

    .menu-toggle span {
        display: block;
        width: 21px;
        height: 2px;
        margin: 0;
        border-radius: 30px;
        background-color: var(--primary-color);
        transform-origin: center;
        transition:
            transform 0.3s ease,
            opacity 0.2s ease,
            width 0.3s ease;
    }

    .menu-toggle.active {
        position: fixed !important;
        z-index: 10100 !important;
        top: 18px !important;
        right: 18px !important;
        width: 46px !important;
        height: 46px !important;
        border: 1px solid rgba(6, 47, 87, 0.18) !important;
        background-color: #ffffff !important;
        box-shadow: 0 10px 28px rgba(6, 47, 87, 0.18) !important;
    }

    .menu-toggle.active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg) !important;
    }

    .menu-toggle.active span:nth-child(2) {
        width: 0 !important;
        opacity: 0 !important;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg) !important;
    }

    /* -----------------------------------------
       القائمة
    ----------------------------------------- */

    .navigation {
        position: fixed !important;
        z-index: 10000 !important;
        top: 0 !important;
        right: 0 !important;
        bottom: auto !important;

        display: flex !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
        flex-direction: column !important;
        gap: 9px !important;

        width: min(390px, 90%) !important;
        height: 100vh !important;
        height: 100dvh !important;

        margin: 0 !important;
        padding: 92px 22px 32px !important;

        border: 0 !important;
        background-color: #ffffff !important;
        box-shadow: -18px 0 50px rgba(6, 47, 87, 0.22) !important;

        overflow-x: hidden !important;
        overflow-y: auto !important;
        overscroll-behavior: contain;

        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;

        transform: translate3d(105%, 0, 0) !important;
        will-change: transform, opacity;

        transition:
            transform 0.36s cubic-bezier(0.22, 1, 0.36, 1),
            opacity 0.22s ease,
            visibility 0.36s ease !important;
    }

    .navigation.active {
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        transform: translate3d(0, 0, 0) !important;
    }

    .navigation a {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        min-height: 53px !important;
        margin: 0 !important;
        padding: 13px 16px !important;
        border-radius: 12px !important;
        color: var(--primary-color) !important;
        text-align: center !important;
        font-size: 15px !important;
        font-weight: 800 !important;
        opacity: 1 !important;
        transform: none !important;
        transition:
            color 0.25s ease,
            background-color 0.25s ease !important;
    }

    .navigation a::after {
        display: none !important;
    }

    .navigation a:hover,
    .navigation a.active {
        background-color: var(--light-blue) !important;
        color: var(--secondary-color) !important;
        transform: none !important;
    }

    /* نخفي عناصر الهيدر فقط أثناء فتح القائمة */
    body.menu-open .main-header {
        z-index: 9700 !important;
        background-color: transparent !important;
        box-shadow: none !important;
        pointer-events: none !important;
    }

    body.menu-open .main-header .logo,
    body.menu-open .main-header .header-actions {
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }

    body.menu-open .main-header .navigation,
    body.menu-open .main-header .menu-toggle {
        pointer-events: auto !important;
    }

    /* لا نصفر ارتفاع navbar */
    body.menu-open .main-header .navbar {
        min-height: var(--vellora-header-height) !important;
        height: auto !important;
        padding-top: initial !important;
        padding-bottom: initial !important;
    }

    /* -----------------------------------------
       باقي التابلت
    ----------------------------------------- */

    .hero {
        min-height: 680px;
        background-position: 60% center;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 55px;
    }

    .about-image {
        min-height: auto;
    }

    .about-image > img {
        height: 520px;
    }

    .experience-box {
        right: 25px;
        bottom: -25px;
    }

    .about-content {
        margin-top: 20px;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .process-grid {
        grid-template-columns: 1fr 1fr;
    }

    .faq-grid {
        grid-template-columns: 1fr;
        gap: 45px;
    }

    .faq-intro {
        position: static;
    }

    .cta-content {
        align-items: flex-start;
        flex-direction: column;
    }

    .cta-buttons {
        width: 100%;
        max-width: 430px;
    }
}

/* =========================================
   الموبايل
========================================= */

@media (max-width: 700px) {
    .container {
        width: min(93%, var(--container-width));
    }

    .section-padding {
        padding: 75px 0;
    }

    body {
        text-align: center;
    }

    .top-bar {
        display: flex !important;
        height: var(--vellora-topbar-height) !important;
        min-height: var(--vellora-topbar-height) !important;
        max-height: var(--vellora-topbar-height) !important;
        padding: 0 !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .top-bar-content {
        height: var(--vellora-topbar-height) !important;
        min-height: var(--vellora-topbar-height) !important;
        max-height: var(--vellora-topbar-height) !important;
        padding: 0 10px !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
    }

    .top-bar-content p {
        width: 100% !important;
        margin: 0 !important;
        padding: 2px 0 0 !important;
        text-align: center !important;
        font-size: 12px !important;
        line-height: 28px !important;
        white-space: nowrap !important;
        overflow: visible !important;
    }

    .navbar {
        grid-template-columns: auto 1fr auto;
        gap: 9px;
    }

    .logo {
        justify-self: start;
    }

    .logo img {
        width: 88px;
        height: 51px;
    }

    .header-actions {
        justify-self: center;
        gap: 6px;
    }

    .header-call,
    .header-whatsapp {
        min-height: 40px;
        padding: 7px 10px;
        font-size: 11px;
    }

    .header-call i,
    .header-whatsapp i {
        font-size: 13px;
    }

    .menu-toggle {
        width: 42px;
        height: 42px;
    }

    .navigation {
        width: min(370px, 92%) !important;
        padding: 88px 20px 30px !important;
    }

    .menu-toggle.active {
        top: 15px !important;
        right: 15px !important;
    }

    .hero {
        min-height: 650px;
        background-position: 58% center;
    }

    .hero::before,
    .hero::after {
        display: none;
    }

    .hero-text {
        margin-inline: auto;
        padding: 80px 0 100px;
        text-align: center;
    }

    .hero-text h1 {
        font-size: 38px;
    }

    .hero-text > p {
        margin-inline: auto;
        font-size: 15px;
    }

    .hero-buttons {
        justify-content: center;
        flex-direction: column;
    }

    .hero-buttons a {
        width: 100%;
        max-width: 370px;
    }

    .hero-features {
        justify-content: center;
        gap: 12px;
    }

    .hero-features div {
        justify-content: center;
        width: calc(50% - 6px);
        font-size: 12px;
    }

    .about-image > img {
        height: auto;
        max-height: none;
        border-radius: 30px;
        object-fit: contain;
    }

    .about-image::before {
        display: none;
    }

    .experience-box {
        position: relative;
        right: auto;
        bottom: auto;
        width: calc(100% - 30px);
        min-width: auto;
        margin: -40px auto 0;
        justify-content: center;
        text-align: center;
    }

    .about-content {
        text-align: center;
    }

    .about-content h2,
    .section-heading h2,
    .center-heading h2,
    .why-us-content h2,
    .faq-intro h2 {
        font-size: 30px;
    }

    .about-content > p {
        text-align: center;
    }

    .about-points {
        grid-template-columns: 1fr;
    }

    .about-points > div {
        justify-content: center;
        text-align: center;
    }

    .about-points span {
        align-items: center;
    }

    .about-buttons {
        justify-content: center;
    }

    .section-heading {
        align-items: center;
        text-align: center;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .service-card {
        max-width: 430px;
        margin-inline: auto;
    }

    .service-content {
        text-align: center;
    }

    .service-content h3,
    .service-content p {
        min-height: auto;
    }

    .service-link {
        justify-content: center;
        gap: 10px;
    }

    .service-contact-buttons {
        grid-template-columns: 1fr;
    }

    .why-us-content {
        text-align: center;
    }

    .why-us-content > p {
        margin-inline: auto;
    }

    .why-list {
        grid-template-columns: 1fr;
    }

    .why-list > div {
        align-items: center;
        justify-content: center;
        flex-direction: column;
        text-align: center;
    }

    .why-us-card {
        padding: 35px 22px;
    }

    .process-grid {
        grid-template-columns: 1fr;
    }

    .faq-intro,
    .faq-contact-box {
        text-align: center;
    }

    .faq-contact-buttons {
        justify-content: center;
    }

    .faq-question {
        gap: 14px;
        text-align: center;
    }

    .faq-question span {
        flex: 1;
    }

    .faq-answer p {
        text-align: center;
    }

    .cta-section {
        padding: 60px 0;
    }

    .cta-content {
        align-items: center;
        text-align: center;
    }

    .cta-content h2 {
        font-size: 30px;
    }

    .cta-buttons {
        margin-inline: auto;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 38px;
        padding: 60px 0 45px;
        text-align: center;
    }

    .footer-about {
        grid-column: auto;
    }

    .footer-logo {
        margin-inline: auto;
    }

    .footer-about p {
        margin-inline: auto;
    }

    .footer-contact-buttons {
        justify-content: center;
    }

    .footer-column h3::after {
        right: 50%;
        transform: translateX(50%);
    }

    .contact-list li {
        justify-content: center;
    }

    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }

    .floating-contact {
        right: 13px;
        bottom: 13px;
    }

    .floating-call,
    .floating-whatsapp {
        width: 54px;
        height: 54px;
        min-height: 54px;
        padding: 0;
        border-radius: 50%;
    }

    .floating-call span,
    .floating-whatsapp span {
        display: none;
    }

    .back-to-top {
        left: 13px;
        bottom: 16px;
        width: 44px;
        height: 44px;
    }
}

/* =========================================
   الموبايلات الصغيرة
========================================= */

@media (max-width: 470px) {
    .top-bar .top-bar-content p {
        font-size: 10.5px !important;
        line-height: 26px !important;
    }

    .header-actions {
        display: none;
    }

    .navbar {
        grid-template-columns: auto 1fr;
    }

    .menu-toggle {
        justify-self: end;
    }

    .navigation {
        width: 100% !important;
        max-width: none !important;
        padding: 84px 18px 28px !important;
        box-shadow: none !important;
    }

    .menu-toggle.active {
        top: 14px !important;
        right: 14px !important;
    }

    .hero-text h1 {
        font-size: 33px;
    }

    .hero-features div {
        width: 100%;
    }

    .about-content h2,
    .section-heading h2,
    .center-heading h2,
    .why-us-content h2,
    .faq-intro h2 {
        font-size: 27px;
    }

    .service-card {
        max-width: 100%;
    }

    .faq-question {
        padding: 18px 15px;
        font-size: 14px;
    }

    .faq-answer p {
        padding-inline: 15px;
    }
}

/* =========================================
   تقليل الحركة
========================================= */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .navigation,
    .menu-toggle,
    .menu-toggle span {
        transition: none !important;
    }
}


/* =========================================
   TOP BAR - FINAL SAFETY OVERRIDE
========================================= */
.top-bar,
.top-bar .top-bar-content {
    overflow: visible !important;
}

.top-bar .top-bar-content p {
    height: auto !important;
    min-height: 28px !important;
    max-height: none !important;
    vertical-align: middle !important;
    clip: auto !important;
    clip-path: none !important;
}
