/* ==========================================================================
   MAIN STYLESHEET
   ========================================================================== */

/* ==========================================================================
   1. Design Tokens / متغيرات التصميم
   ========================================================================== */

html[dir="rtl"] {
    direction: rtl;
}

html[dir="ltr"] {
    direction: ltr;
}

:root {
    /* Primary - Diamond Blue */
    --color-primary: #013f86;
    --color-primary-light: rgba(79, 198, 228, 0.12);

    /* Surface */
    --color-surface: #ffffff;

    /* Text */
    --color-on-surface-variant: #465968;

    /* Borders */
    --color-outline-variant: #c5d5e2;
}

/* ==========================================================================
   2. Base / Utilities
   ========================================================================== */
.material-symbols-outlined {
    font-variation-settings:
        "FILL" 0,
        "wght" 400,
        "GRAD" 0,
        "opsz" 24;
    display: inline-block;
    line-height: 1;
    text-transform: none;
    letter-spacing: normal;
    word-wrap: normal;
    white-space: nowrap;
    direction: ltr;
}

html[dir="rtl"] .arabic-text {
    direction: rtl;
    font-family: "Tajawal", sans-serif;
}

html[dir="ltr"] .arabic-text {
    direction: ltr;
    text-align: left;
    font-family: "Poppins", "Segoe UI", sans-serif;
}

/* ==========================================================================
   3. Navbar
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 50;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.navbar::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    z-index: -1;
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1280px;
    margin: auto;
    padding: 1rem 1.5rem;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #013f86;
    letter-spacing: -0.05em;
}

.logo img {
    height: 40px;
    width: auto;
}

/* Navigation Links (Desktop) */
.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: #6b7280;
    text-decoration: none;
    transition: 0.3s ease;
}

.nav-links a.active {
    color: #013f86;
    font-weight: bold;
    border-bottom: 2px solid #013f86;
}

.nav-links a:hover {
    color: #013f86;
}

.nav-links a:active {
    transform: scale(0.95);
}

/* Language Button */
.language-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    border: 1px solid #013f86;
    color: #013f86;
    background: transparent;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.language-btn:hover {
    background: #013f86;
    color: white;
}

.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 65;
}

.nav-overlay.active {
    display: block;
}

/* ==========================================================================
   4. Hero Section
   ========================================================================== */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: 100px;
}

.hero-background {
    position: absolute;
    inset: 0;
    z-index: 0;
    padding-top: 150px;
    background-color: white;
}

@media (max-width: 768px) {
    .hero-background {
        padding-top: 80px;
        height: 100vh;
    }
}

.hero-image {
    height: 512px;
    background-repeat: no-repeat;
    background-position: center;
    background-image: var(--desktop-image);
    background-size: contain;
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 1280px;
    width: 100%;
    margin: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    text-align: center;
}

/* ==========================================================================
   5. Contact Section
   ========================================================================== */
.contact-section {
    padding: 80px 0;
    background: #f5f5f5;
}

.contact-container {
    max-width: 1280px;
    margin: auto;
    padding: 0 25px;
}

.contact-box {
    background: #2e3131;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.contact-content {
    padding: 50px;
    color: #fff;
    text-align: start;
}

.contact-header {
    text-align: center;
    margin-bottom: 50px;
}

.contact-header h2 {
    font-size: 38px;
    font-weight: 700;
}

.contact-divider {
    width: 90px;
    height: 6px;
    background: #9ccbff;
    margin: 15px auto 0;
    border-radius: 5px;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.contact-icon {
    font-size: 42px;
    color: #9ccbff;
}

.contact-title {
    font-weight: 700;
    margin-bottom: 8px;
    font-size: 18px;
}

.contact-text {
    color: #d1d5db;
    margin: 3px 0;
}

.contact-link {
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s ease;
}

.whatsapp-link:hover {
    color: #25d366;
    text-decoration: none;
}

.whatsapp-link i {
    font-size: 16px;
}

/* ==========================================================================
   6. Footer
   ========================================================================== */
.footer {
    background: #2e3131;
    color: #d1d5db;
    padding: 70px 0 30px;
}

.footer-container {
    max-width: 1280px;
    margin: auto;
    padding: 0 25px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 50px;
    margin-bottom: 50px;
}

.footer-company {
    text-align: start;
}

.footer-logo {
    font-size: 42px;
    font-weight: 900;
    color: white;
    margin-bottom: 20px;
}

.footer-description {
    max-width: 450px;
    line-height: 1.9;
    opacity: 0.8;
}

.footer-column {
    text-align: start;
}

.footer-column h5 {
    color: white;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column li {
    margin-bottom: 12px;
}

.footer-column a {
    color: #9ccbff;
    text-decoration: none;
    transition: 0.3s;
}

.footer-column a:hover {
    text-decoration: underline;
}

.footer-bottom {
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ==========================================================================
   7. Responsive / Mobile (max-width: 768px)
   ========================================================================== */
@media (max-width: 768px) {
    .hero-section {
        padding-top: 0px;
    }

    .hero-image {
        background-image: var(--mobile-image);
        padding-left: 100px;
    }

    .navbar-container {
        padding: 1rem;
    }

    .nav-links {
        display: none;
    }
}

@media (max-width: 992px) {
    .contact-info {
        grid-template-columns: 1fr;
    }

    .contact-content {
        padding: 35px 25px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-company,
    .footer-column {
        text-align: center;
    }

    .footer-description {
        margin: auto;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .contact-header h2 {
        font-size: 28px;
    }
}

/* ==========================================================================
   8. Bottom Navigation (mobile)
   ========================================================================== */
:root {
    --nav-bg: rgba(255, 255, 255, 0.92);
    --nav-border: rgba(1, 63, 134, 0.15);
    --nav-text: #718397;
    --nav-active: #013f86;
    --nav-active-label: #013f86;
    --nav-active-soft: rgba(79, 198, 228, 0.16);
    --nav-height: 64px;
}

.bottom-nav {
    display: none;
}

@media (max-width: 991.98px) {
    html {
        scroll-padding-top: 16px;
        scroll-behavior: smooth;
    }

    body {
        padding-bottom: calc(
            var(--nav-height) + env(safe-area-inset-bottom, 0px) + 12px
        );
    }

    .bottom-nav {
        position: fixed;
        inset-inline: 12px;
        bottom: calc(10px + env(safe-area-inset-bottom, 0px));
        z-index: 1000;

        display: grid;
        grid-template-columns: repeat(4, 1fr);
        height: var(--nav-height);
        padding: 6px;

        background: var(--nav-bg);
        backdrop-filter: saturate(180%) blur(16px);
        -webkit-backdrop-filter: saturate(180%) blur(16px);
        border: 1px solid var(--nav-border);
        border-radius: 22px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.14);
    }

    .bottom-nav__item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        color: var(--nav-text);
        text-decoration: none;
        border-radius: 16px;
        -webkit-tap-highlight-color: transparent;
        transition: color 0.25s ease;
    }

    .bottom-nav__icon {
        display: grid;
        place-items: center;
        width: 46px;
        height: 28px;
        border-radius: 14px;
        font-size: 1.05rem;
        transition:
            background 0.25s ease,
            transform 0.25s cubic-bezier(0.3, 1.4, 0.5, 1);
    }

    .bottom-nav__label {
        font-size: 0.68rem;
        font-weight: 600;
        line-height: 1;
        white-space: nowrap;
    }

    .bottom-nav__item:active .bottom-nav__icon {
        transform: scale(0.9);
    }

    .bottom-nav__item.active {
        color: var(--nav-active-label);
    }

    .bottom-nav__item.active .bottom-nav__icon {
        background: var(--nav-active);
        color: #1c1409;
        transform: translateY(-2px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .bottom-nav__item,
    .bottom-nav__icon {
        transition: none;
    }
    html {
        scroll-behavior: auto;
    }
}