@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700&display=swap');

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Cairo', Tahoma, Arial, sans-serif;
    background-color: #ffffff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: #333;
    direction: rtl;

    /* حتى لا يغطي الهيدر المحتوى بعد تثبيته */
    padding-top: 75px;
}

/* ========================
   HEADER
======================== */
.header {
    background: #F8F9FB;
    color: #212529;
    border-bottom: 1px solid #e0e0e0;
    position: fixed;   /* كان sticky */
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0 8.67px;
    height: 75px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    width: 100%;
}

.desktop-header {
    display: none;
    width: 100%;
}

.desktop-header-inner {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 75px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.desktop-brand {
    display: flex;
    align-items: center;
    min-width: 160px;
}

.desktop-logo {
    height: 46px;
    width: auto;
    object-fit: contain;
    display: block;
}

.desktop-nav {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 0;
    padding: 0;
    white-space: nowrap;
}

.desktop-nav a {
    color: #2c3e50;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 4px;
    border-bottom: 2px solid transparent;
    transition: border-color 0.15s, color 0.15s;
}

.desktop-nav a:hover {
    color: #306db5;
}

.desktop-nav a.active {
    color: #306db5;
    border-bottom-color: #306db5;
}

.desktop-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    white-space: nowrap;
}

.desktop-link {
    color: #306db5;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.desktop-login-btn {
    padding: 8px 14px;
    font-size: 13px;
    border-radius: 18px;
    height: 36px;
}

.header-inner {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
    height: 100%;
    direction: rtl;
}

.hamburger {
    background: none;
    border: none;
    color: #5a94d6;
    cursor: pointer;
    line-height: 1;
    padding: 4px 6px;
    display: flex;
    align-items: center;
    order: 2;
}

.sm-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    order: 1;
}

.logo {
    width: 120px;
    height: 50px;
    margin: 0;
    object-fit: contain;
    display: block;
}

/* ========================
   MAIN CONTENT
======================== */
.main-content {
    flex: 1;
    padding: 0 12px 10px;
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

.page-center {
    width: 100%;
}

.hero-title-wrap {
    width: 100%;
    text-align: center;
    margin-top: -10px;
    margin-bottom: 4px;
}

.hero-title-img {
    max-width: 100%;
    height: auto;
    display: inline-block;
}

.sub-heading {
    font-size: 16px;
    color: #798CA1;
    text-align: center;
    line-height: 1.5;
    margin: 12px 0 40px 0;
    width: 100%;
    font-family: 'Cairo', sans-serif;
}

/* ========================
   FORM
======================== */
.input-wrap {
    margin-bottom: 24px;
    width: 100%;
}

.form-control {
    width: 100%;
    height: 36px;
    padding: 8px 14px;
    border: 1px solid #dde3e8;
    border-radius: 6px;
    font-size: 16px;
    font-family: 'Cairo', Tahoma, Arial, sans-serif;
    background-color: #ffffff;
    color: #495057;
    text-align: right;
    direction: rtl;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    display: block;
    margin: 0;
}

.form-control::placeholder {
    color: #6d8194;
    font-family: 'Cairo', Tahoma, Arial, sans-serif;
    font-size: inherit;
}

.form-control:focus {
    border-color: #dde3e8; /* نفس لون الإطار الأصلي */
    outline: none;
    box-shadow: none;
}

/* منع تغيير اللون عند الإكمال التلقائي (Autofill) */
.form-control:-webkit-autofill,
.form-control:-webkit-autofill:hover, 
.form-control:-webkit-autofill:focus {
    -webkit-text-fill-color: #495057;
    -webkit-box-shadow: 0 0 0px 1000px white inset;
    transition: background-color 5000s ease-in-out 0s;
}

.btns-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.btn-blue {
    background-color: #306db5;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 12.8px;
    font-family: 'Cairo', Tahoma, Arial, sans-serif;
    font-weight: 400;
    cursor: pointer;
    transition: background-color 0.2s;
    text-align: center;
    text-decoration: none;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}

.btn-blue:hover {
    background-color: #265a94;
}

#inquiry-btn {
    min-width: 110px;
    width: auto;
    height: 33.19px;
    margin-top: 2px;
    margin-bottom: 0px;
    white-space: nowrap;
}

#back-btn {
    width: 119.05px;
    height: 33.19px;
    margin-top: 16px;
    margin-bottom: 16px;
}

/* ========================
   FOOTER
======================== */
.footer {
    background-color: #306db5;
    color: #fff;
    padding: 60px 20px 0;
    margin-top: 5px;
}

.footer-inner {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

/* Footer Logo */
.footer-logo-section {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    padding-bottom: 60px;
}

.footer-logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 15px;
    margin-bottom: 40px;
}

.footer-logo-img {
    width: 143.19px;
    height: 63.17px;
    display: block;
    filter: brightness(0) invert(1);
}

.footer-desc {
    font-size: 0.95rem;
    line-height: 1.9;
    color: rgba(255,255,255,0.9);
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

/* Footer Sections */
.footer-section {
    max-width: 600px;
    margin: 0 auto;
    padding: 22px 10px 0;
    text-align: center;
}

.contact-section {
    padding-top: 35px;
    padding-bottom: 20px;
}

.footer-section-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    position: relative;
    display: inline-block;
    padding-bottom: 14px;
    margin-bottom: 20px;
}

.footer-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 50%;
    transform: translateX(50%);
    width: 120px;
    height: 2.5px;
    background: #8bb8e4;
    border-radius: 2px;
}

/* Footer Links */
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    border-bottom: 1px solid rgba(255,255,255,0.15);
    padding: 15px 0;
    text-align: center;
}

.footer-links li:last-child {
    border-bottom: none;
}

.footer-links a {
    color: #fff;
    text-decoration: none;
    font-size: 1.05rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #e0e0e0;
}

/* Contact and Partners */
.contact-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 50px;
}

.contact-details {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    position: relative;
}

.contact-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    flex-direction: row;
}

.contact-num {
    font-size: 0.75rem;
    color: #fff;
    font-family: Arial, sans-serif;
}

.contact-icon {
    color: #8bb8e4;
    width: 16px;
    height: 16px;
}

.footer-partners {
    display: flex;
    align-items: center;
}

.partners-img {
    height: 100px;
    width: auto;
    object-fit: contain;
}

/* Footer Hours */
.footer-hours {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.9);
    position: absolute;
    bottom: -35px;
    right: 0;
    white-space: nowrap;
}

/* Social & Copyright */
.social-links {
    display: flex;
    justify-content: flex-end;
    flex-direction: row-reverse;
    gap: 20px;
    margin-bottom: 40px;
}

.social-link {
    color: #fff;
    transition: color 0.2s;
}

.social-link:hover {
    color: #8bb8e4;
}

.footer-copyright {
    text-align: center;
    font-size: 0.75rem;
    color: #fff;
    padding-bottom: 20px;
}

.footer-copyright p {
    margin-bottom: 10px;
}

.copyright-links {
    margin-top: 5px;
}

.copyright-links a {
    color: #fff;
    text-decoration: none;
}

.copyright-links .separator {
    margin: 0 10px;
    color: #fff;
}

/* ========================
   FIX: منع التمدد الأفقي
======================== */
html {
    overflow-x: clip;
}

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

/* ========================
   MOBILE MENU
======================== */
.mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fafafa;
    border-top: 1px solid #e0e0e0;
    box-shadow: 0 8px 16px rgba(0,0,0,0.06);
    padding: 20px 0 40px;
    z-index: 999;
}

.mobile-menu.active {
    display: block;
}

.mobile-nav {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
}

.mobile-nav li {
    display: block;
}

.mobile-nav a {
    display: inline-block;
    padding: 14px 0;
    color: #306db5;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    border-bottom: 1px solid #e8e8e8;
    width: 150px;
}

.mobile-nav a.active {
    border-bottom: 2px solid #306db5;
    font-weight: 700;
}

.mobile-nav li:last-child a {
    border-bottom: none;
}

.mobile-login-wrap {
    text-align: center;
    margin-top: 25px;
    padding: 0 20px;
}

.login-btn {
    width: 90%;
    max-width: 320px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 12px 24px;
    font-size: 1.05rem;
    border-radius: 12px;
}

/* ========================
   RESPONSIVE — DESKTOP
======================== */
@media (min-width: 768px) {
    .main-content {
        max-width: 900px;
        padding: 0 40px 40px;
    }

    .header-inner {
        max-width: 900px;
    }

    .footer-logo-section,
    .footer-section {
        max-width: 900px;
    }
}

@media (min-width: 992px) {
    /* show the full desktop header and keep mobile header for small screens only */
    .desktop-header {
        display: block;
    }

    /* header spacing + alignment to match reference */
    .desktop-header-inner {
        direction: rtl;
        flex-direction: row;
        justify-content: space-between;
        gap: 28px;
        max-width: none;
        padding: 0 40px;
    }

    .desktop-brand {
        min-width: 180px;
        justify-content: flex-end; /* stick logo to the right edge */
        flex: 0 0 auto;
    }

    .desktop-nav {
        margin: 0 auto;
        gap: 20px;
        justify-content: center;
        flex: 1 1 auto;
    }

    .desktop-actions {
        min-width: 220px;
        justify-content: flex-start; /* stick actions to the left edge */
        flex: 0 0 auto;
    }

    .desktop-login-btn {
        border-radius: 6px;
        height: 34px;
        padding: 6px 14px;
    }

    .header-inner {
        display: none;
    }

    .mobile-menu {
        display: none !important;
    }

    .main-content {
        max-width: 1200px;
        padding: 0 24px 60px;
    }

    /* keep the form centered like official desktop */
    .page-center {
        max-width: 520px;
        margin: 0 auto;
    }

    .hero-title-wrap {
        margin-top: 0;
        margin-bottom: 8px;
    }

    .hero-title-img {
        max-width: 340px;
        width: 100%;
    }

    .sub-heading {
        max-width: 680px;
        margin: 10px auto 34px;
        font-size: 14px;
        line-height: 1.7;
    }

    #inquiryForm {
        margin-top: 2px;
    }

    .input-wrap {
        margin-bottom: 18px;
    }

    .form-control {
        height: 38px;
        border-radius: 4px;
    }

    .btns-wrap {
        margin-top: 8px;
    }

    /* footer layout: 3 columns on desktop only */
    .footer {
        padding: 70px 20px 0;
    }

    .footer-inner {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 24px 0;
        display: grid;
        grid-template-columns: 1.2fr 0.8fr 1fr;
        gap: 36px;
        align-items: start;
    }

    .footer-logo-section,
    .footer-section {
        max-width: none;
        margin: 0;
        text-align: right;
    }

    .footer-logo-section {
        padding-bottom: 0;
    }

    .footer-logo-wrap {
        justify-content: flex-end;
        margin-bottom: 24px;
    }

    .footer-desc {
        text-align: right;
        margin: 0;
        max-width: 520px;
    }

    .footer-section {
        padding-top: 0;
    }

    .footer-links li {
        text-align: right;
    }

    .contact-container {
        justify-content: space-between;
        gap: 18px;
    }

    .contact-details {
        align-items: flex-start;
    }

    /* في التصميم المرجعي لا تظهر شعارات الشركاء داخل الفوتر على الديسكتوب */
    .footer-partners {
        display: none;
    }

    .footer-hours {
        position: static;
        margin-top: 10px;
        white-space: normal;
    }

    /* في المرجع: السوشيال + الحقوق تكون تحت الأعمدة */
    .social-links {
        grid-column: 1 / -1;
        justify-content: flex-end;
        flex-direction: row-reverse;
        gap: 20px;
        margin: 12px 0 26px;
    }

    .footer-copyright {
        grid-column: 1 / -1;
        text-align: center;
        padding-bottom: 20px;
    }

    /* تقليل خطوط الفصل في قائمة الديسكتوب لتطابق المرجع */
    .footer-links li {
        border-bottom: none;
        padding: 10px 0;
    }
}

/* ========================
   SEHA PAGE STYLES
======================== */
.seha-home {
    max-width: 1000px;
    padding: 20px;
}

.hero-slider {
    background: linear-gradient(135deg, rgba(48,109,181,0.05) 0%, rgba(48,109,181,0.1) 100%);
    border-radius: 12px;
    padding: 40px;
    margin-bottom: 40px;
    text-align: right;
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 600px;
}

.service-title {
    color: #2b6ead;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 16px;
}

.service-description {
    color: #555;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 24px;
}

.btn-enter-service {
    padding: 10px 24px;
    font-size: 16px;
    border-radius: 8px;
    background-color: #2b6ead;
    color: #fff;
    border: none;
    cursor: pointer;
}

.btn-enter-service:hover {
    background-color: #225a8e;
}

.services-container {
    margin-bottom: 40px;
}

.section-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-header h2 {
    font-size: 22px;
    color: #333;
    margin-bottom: 10px;
}

.services-tabs {
    display: flex;
    gap: 10px;
}

.tab-button {
    background: none;
    border: none;
    padding: 8px 16px;
    font-size: 16px;
    font-family: inherit;
    color: #555;
    cursor: pointer;
    border-radius: 20px;
    transition: 0.3s;
}

.tab-button.active {
    background-color: #2b6ead;
    color: #fff;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.service-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    border-color: #2b6ead;
}

.card-icon {
    width: 60px;
    height: 60px;
    background: rgba(43, 110, 173, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.service-card h3 {
    font-size: 18px;
    color: #333;
    margin-bottom: 10px;
}

.service-card p {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    height: 40px;
}

.service-link {
    display: inline-block;
    color: #2b6ead;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid transparent;
    transition: 0.2s;
}

.service-link:hover {
    border-color: #2b6ead;
}

.floating-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #2b6ead;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
}

/* ========================
   RESULT SECTION
======================== */
.result-wrapper {
    background-color: #f9fafa;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 10px 20px 10px;
    margin-top: -15px;
    width: 100%;
}

.result-item {
    margin-bottom: 8px;
    text-align: center;
    padding-bottom: 8px;
}

.result-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.result-label {
    display: block;
    font-weight: 700;
    font-size: 16.5px;
    color: #333;
    margin-bottom: 4px;
}

.result-value {
    display: block;
    font-weight: 400;
    font-size: 16px;
    color: #555;
}

.new-inquiry-btn-wrap {
    margin-top: 12px;
    text-align: center;
}

#new-inquiry-btn {
    width: 140px;
    height: 38px;
    font-size: 14px;
}
