/* ==========================================================
   MANWA Beauty Salon – site.css
   الستايل العام (يتحمّل بكل الصفحات من الـ _Layout):
   Variables • Base • Navbar • Buttons • Footer
   ========================================================== */

/* ---------- Variables ---------- */
:root {
    /* الألوان */
    --pink: #E9A0B5;
    --pink-dark: #943D5D;
    --pink-nav: #B85D7B;
    --pink-nav-dark: #9F4565;
    --pink-light: #FCEFF3;
    --gray-bg: #FAF6F8;
    --gray-dark: #42434B;
    --gray-text: #72717A;
    --white: #FFFFFF;
    --border: #EADDE2;

    /* تأثيرات مشتركة */
    --ease-soft: cubic-bezier(.22, .8, .24, 1);
    --shadow-soft: 0 8px 28px rgba(66, 67, 75, .06);
    --shadow-lift: 0 18px 44px rgba(66, 67, 75, .14);
}

/* ---------- Base ---------- */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    /* ارتفاع الهيدر الفعلي (site.js بيقيسه) عشان القسم يبدأ تحته بالضبط */
    scroll-padding-top: var(--header-h, 84px);
}

body {
    margin: 0;
    direction: rtl;
    font-family: "Tajawal", "Segoe UI", sans-serif;
    background: var(--white);
    color: var(--gray-dark);
    line-height: 1.8;
    /* الفوتر يضل بأسفل الشاشة حتى بالصفحات القصيرة */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

    main > section:only-child {
        flex: 1;
    }

a {
    text-decoration: none;
    color: inherit;
}

h1, h2, h3 {
    text-wrap: balance;
    letter-spacing: -.01em;
}

p {
    text-wrap: pretty;
}

/* max-width/padding: none عشان Bootstrap ما يضيّق الكونتينر (كان 960px على شاشة 1024) */
.container {
    width: min(1160px, 90%);
    max-width: none;
    padding-inline: 0;
    margin-inline: auto;
}

/* ---------- Navbar ---------- */
.main-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--pink-nav);
    border-bottom: 1px solid var(--pink-nav-dark);
    box-shadow: 0 4px 18px color-mix(in srgb, var(--pink-dark) 12%, transparent);
    transition: box-shadow .35s var(--ease-soft);
}

    .main-header.is-scrolled {
        box-shadow: 0 10px 30px color-mix(in srgb, var(--pink-dark) 22%, transparent);
    }

.navbar {
    min-height: 84px;
    display: flex;
    flex-wrap: nowrap; /* Bootstrap يخليها wrap، وهذا اللي كان ينزّل زر الدخول لسطر لحاله */
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.brand {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

    .brand img {
        display: block;
        width: 175px;
        max-height: 65px;
        object-fit: contain;
    }

.nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    list-style: none;
    margin: 0;
    padding: 0;
}

    .nav-links a {
        position: relative;
        color: rgba(255, 255, 255, 0.9);
        font-size: 15px;
        font-weight: 600;
        transition: color 0.25s ease;
    }

        .nav-links a:hover,
        .nav-links a.active {
            color: var(--white);
        }

        .nav-links a.active::after {
            content: "";
            position: absolute;
            bottom: -10px;
            right: 0;
            width: 28px;
            height: 2px;
            background: var(--pink-light);
            border-radius: 5px;
        }

.menu-toggle {
    display: none;
    background: var(--pink-light);
    border: 0;
    border-radius: 12px;
    padding: 8px 12px;
    color: var(--pink-dark);
    font-size: 24px;
    cursor: pointer;
}

/* ---------- Buttons ---------- */
.login-btn,
.primary-btn,
.secondary-btn,
.light-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border-radius: 50px;
    padding: 12px 25px;
    font-weight: 700;
    transition: transform .35s var(--ease-soft),
                box-shadow .35s var(--ease-soft),
                background .25s ease,
                color .25s ease;
}

.login-btn,
.primary-btn {
    background: var(--white);
    color: var(--pink-dark);
}

.login-btn {
    white-space: nowrap;
    flex-shrink: 0;
}

    .login-btn:hover,
    .primary-btn:hover {
        background: var(--pink-light);
        color: var(--pink-dark);
    }

    .login-btn:hover,
    .primary-btn:hover,
    .secondary-btn:hover,
    .light-btn:hover {
        transform: translateY(-3px);
        box-shadow: var(--shadow-lift);
    }

    .login-btn:active,
    .primary-btn:active,
    .secondary-btn:active,
    .light-btn:active {
        transform: translateY(0);
        box-shadow: var(--shadow-soft);
    }

.primary-btn span {
    display: inline-block;
    transition: transform .35s var(--ease-soft);
}

.primary-btn:hover span {
    transform: translateX(-6px); /* السهم ← يتحرك لليسار (اتجاه RTL) */
}

.primary-btn {
    padding: 14px 27px;
}

/* خارج الهيرو الزر الأساسي يكون معبّى (الأبيض كان يضيع على الخلفيات الفاتحة) */
.primary-btn.is-filled {
    background: var(--pink-dark);
    color: var(--white);
}

    .primary-btn.is-filled:hover {
        background: var(--pink-nav-dark);
        color: var(--white);
    }

.secondary-btn {
    border: 1px solid var(--pink-dark);
    color: var(--pink-dark);
    background: rgba(255, 255, 255, 0.75);
}

    .secondary-btn:hover {
        background: var(--pink-light);
    }

/* ---------- Footer ---------- */
.footer {
    padding-block: 20px;
    background: var(--gray-dark);
    color: #F8F6F7;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    font-size: 13px;
}

    .footer-content p {
        margin: 0;
    }

    .footer-content a {
        color: var(--pink);
        transition: transform .3s var(--ease-soft), opacity .3s;
    }

        .footer-content a:hover {
            transform: translateY(-3px);
            opacity: .8;
        }

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.2;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 3px;
}

    .footer-brand span {
        font-size: 11px;
        font-weight: 500;
        letter-spacing: 2.5px;
        opacity: .8;
    }

/* ---------- Eyebrow (عنوان صغير فوق العناوين، مستخدم بكل الصفحات) ---------- */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .7rem;
    margin-bottom: 12px;
    color: var(--pink-dark);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .12em;
}

    .eyebrow::before {
        content: "";
        width: 28px;
        height: 1.5px;
        background: currentColor;
        opacity: .6;
        border-radius: 2px;
    }

/* ---------- Inner pages (Privacy • Error • ...) ---------- */
.page-section {
    padding-block: 70px 90px;
    background: var(--gray-bg);
    min-height: 60vh;
}

    .page-section h1 {
        margin: 0 0 14px;
        font-size: clamp(1.8rem, 3.6vw, 2.6rem);
        font-weight: 800;
    }

    .page-section p {
        color: var(--gray-text);
        max-width: 680px;
    }

    .page-section .primary-btn {
        margin-top: 12px;
    }

/* ---------- User menu (Navbar) ---------- */
.user-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

    .user-actions form {
        margin: 0;
    }

.logout-btn {
    border: 1px solid rgba(255, 255, 255, .6);
    background: transparent;
    color: var(--white);
    border-radius: 50px;
    padding: 10px 18px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: background .25s ease;
}

    .logout-btn:hover {
        background: rgba(255, 255, 255, .15);
    }

@media (max-width: 650px) {
    .user-actions {
        gap: 6px;
    }

    .logout-btn {
        padding: 8px 11px;
        font-size: 12px;
    }
}

/* ---------- Auth (Login) ---------- */
.auth-section {
    display: grid;
    place-items: center;
    min-height: calc(100vh - 84px - 80px);
    padding: 60px 5%;
    background: linear-gradient(140deg, var(--gray-bg), var(--pink-light));
}

.auth-card {
    width: min(440px, 100%);
    padding: 38px 34px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 26px;
    box-shadow: var(--shadow-lift);
}

.auth-head {
    text-align: center;
    margin-bottom: 26px;
}

    .auth-head .eyebrow {
        margin-bottom: 6px;
        font-size: 12px;
    }

    .auth-head h1 {
        margin: 0 0 6px;
        font-size: 28px;
        font-weight: 800;
    }

    .auth-head p {
        margin: 0;
        color: var(--gray-text);
        font-size: 14px;
    }

.auth-form {
    display: grid;
    gap: 16px;
}

.form-field {
    display: grid;
    gap: 6px;
}

    .form-field label {
        font-size: 14px;
        font-weight: 700;
    }

    .form-field input {
        width: 100%;
        padding: 12px 16px;
        border: 1px solid var(--border);
        border-radius: 14px;
        background: var(--gray-bg);
        color: var(--gray-dark);
        font: inherit;
        text-align: right;
        transition: border-color .25s, box-shadow .25s, background .25s;
    }

        .form-field input:focus {
            outline: none;
            border-color: var(--pink);
            background: var(--white);
            box-shadow: 0 0 0 4px color-mix(in srgb, var(--pink) 25%, transparent);
        }

        .form-field input.input-validation-error {
            border-color: #C2415B;
        }

.field-error,
.form-alert {
    color: #C2415B;
    font-size: 13px;
}

.form-alert ul {
    margin: 0;
    padding: 12px 16px;
    list-style: none;
    background: #FDECEF;
    border-radius: 12px;
}

.form-alert.validation-summary-valid {
    display: none;
}

.form-check-line {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
}

    .form-check-line input {
        width: 17px;
        height: 17px;
        accent-color: var(--pink-dark);
    }

.auth-submit {
    width: 100%;
    margin-top: 4px;
    border: 0;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
}

/* ---------- Accessibility ---------- */
a:focus-visible,
button:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 4px;
    border-radius: 8px;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }
}

/* ---------- Responsive ---------- */

/* شاشات كبيرة جداً (1600px وأكثر): محتوى أعرض وخط أكبر شوي */
@media (min-width: 1600px) {
    html {
        font-size: 17px;
    }

    .container {
        width: min(1360px, 88%);
    }

    .brand img {
        width: 195px;
        max-height: 72px;
    }

    .nav-links a {
        font-size: 16px;
    }
}

/* تابلت وأصغر: تفعيل قائمة الموبايل (بدري عشان زر الدخول ما ينزل لسطر لحاله) */
@media (max-width: 992px) {
    .navbar {
        min-height: 74px;
        gap: 12px;
    }

    .brand img {
        width: 140px;
    }

    .menu-toggle {
        display: block;
        margin-right: auto;
    }

    .login-btn {
        padding: 10px 18px;
        font-size: 14px;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 10px 18px;
        background: var(--pink-nav);
        border: 1px solid var(--pink-nav-dark);
        border-radius: 0 0 16px 16px;
        box-shadow: 0 15px 25px rgba(66, 67, 75, 0.12);
    }

        .nav-links.show {
            display: flex;
        }

        .nav-links a {
            display: block;
            padding: 12px 5px;
            color: var(--white);
        }

            .nav-links a:hover,
            .nav-links a.active {
                color: var(--pink-light);
            }

            .nav-links a.active::after {
                display: none;
            }
}

@media (max-width: 650px) {
    .brand img {
        width: 125px;
    }

    .login-btn {
        padding: 9px 13px;
        font-size: 12px;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
}

/* شاشات صغيرة جداً */
@media (max-width: 400px) {
    .brand img {
        width: 105px;
    }

    .login-btn {
        padding: 8px 11px;
        font-size: 11.5px;
        gap: 6px;
    }

    .menu-toggle {
        padding: 6px 10px;
        font-size: 22px;
    }

    /* لما المستخدم مسجّل دخول في زرّين بالهيدر – نصغّرهم عشان ما يطلعوا برّا الشاشة */
    .navbar {
        gap: 8px;
    }

    .login-btn span {
        display: none;
    }

    .user-actions {
        gap: 4px;
    }

        .user-actions ~ .menu-toggle,
        .user-actions .logout-btn {
            padding: 7px 9px;
        }
}

@media (max-width: 330px) {
    .brand img {
        width: 88px;
    }

    .login-btn,
    .logout-btn {
        font-size: 11px;
    }
}

/* رقم الصالون بالفوتر */
.footer-content .footer-phone {
    color: #F8F6F7;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .5px;
    white-space: nowrap;
}

    .footer-content .footer-phone:hover {
        color: var(--pink);
    }

/* أيقونات التواصل الاجتماعي بالفوتر */
.footer-social {
    display: flex;
    gap: 8px;
}

    .footer-content .footer-social a {
        display: grid;
        place-items: center;
        width: 34px;
        height: 34px;
        border-radius: 50%;
        background: rgba(255,255,255,.08);
        color: #F8F6F7;
    }

        .footer-content .footer-social a:hover {
            background: var(--pink);
            color: #fff;
            opacity: 1;
        }

    .footer-social svg {
        width: 17px;
        height: 17px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.8;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

/* سطر "تصميم وتطوير" أسفل الفوتر */
.footer-credit {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,.08);
    text-align: center;
    font-size: 12px;
    color: rgba(248,246,247,.6);
}

.footer-credit-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-inline-start: 3px;
    padding: 3px 10px 3px 12px;
    border-radius: 999px;
    color: #F8F6F7;
    font-weight: 700;
    background: rgba(255,255,255,.06);
    transition: background .25s, color .25s;
}

    .footer-credit-link:hover {
        background: #25D366;
        color: #fff;
    }

    .footer-credit-link svg {
        width: 14px;
        height: 14px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.8;
        stroke-linejoin: round;
    }