﻿/* ==========================================================
   GLOBAL RESET
========================================================== */

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    font-size: 14px; /* صغّر الموقع بالكامل بشكل متوازن */
}

body {
    overflow-x: hidden;
    font-family: 'Cairo', sans-serif;
    background: #f8fafc;
    color: #0f172a;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

/* منع كسر العرض */
*,
*::before,
*::after {
    box-sizing: border-box;
    min-width: 0;
}

/* ==========================================================
   MEDIA ELEMENTS
========================================================== */

img,
video,
canvas,
svg,
model-viewer,
iframe {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==========================================================
   CUSTOM CONTAINER
========================================================== */

.container-custom {
    width: 100%;
    max-width: 1400px;
    margin-inline: auto;
    padding-inline: 1rem;
}

@media (min-width: 640px) {
    .container-custom {
        padding-inline: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .container-custom {
        padding-inline: 2rem;
    }
}

/* ==========================================================
   SECTION OFFSET (للـ Fixed Header)
========================================================== */

section {
    scroll-margin-top: 100px;
}

/* ==========================================================
   MOBILE MENU
========================================================== */

#mobileMenu {
    transition: opacity .25s ease, transform .25s ease;
}

    #mobileMenu.show {
        display: block;
    }

/* ==========================================================
   TYPOGRAPHY HELPERS
========================================================== */

.hero-title {
    line-height: 1.2;
    word-break: break-word;
}

.hero-subtitle {
    line-height: 2;
    opacity: .95;
}

/* ==========================================================
   TABLET
========================================================== */

@media (max-width: 1023px) {

    /* إخفاء اسم الموقع عند ضيق المساحة */
    .logo-title {
        display: none;
    }

    /* منع الفراغات الكبيرة */
    section {
        overflow: hidden;
    }

    /* Footer */
    .footer-grid {
        gap: 2.5rem;
    }

    .footer-bottom {
        text-align: center;
    }
}

/* ==========================================================
   MOBILE
========================================================== */

@media (max-width: 640px) {

    html {
        font-size: 13px;
    }

    /* Hero */
    .hero-title {
        font-size: 2rem;
        line-height: 1.35;
    }

    .hero-subtitle {
        font-size: 1rem;
        line-height: 1.9;
    }

    /* تحسين المسافات */
    section {
        padding-inline: 0;
    }

    footer {
        overflow: hidden;
    }

    /* منع أي عنصر من كسر العرض */
    .grid,
    .flex {
        min-width: 0;
    }
}

/* ==========================================================
   LARGE DESKTOP
========================================================== */

@media (min-width: 1536px) {

    html {
        font-size: 15px;
    }
}
