/* ==========================================================================
   هوية «أعراس عُمان»: الخنجر والمصر المطرز
   كحلي الدائرة + ذهبي الإطار + أحمر وأزرق التطريز + كريمي القماش
   ========================================================================== */

/* ---------- الخلفية: كحلي عميق مع توهج أزرق ونقش العُقدة الذهبية الخفيف ---------- */
body {
    background-color: var(--brand-navy);
    background-image:
        radial-gradient(ellipse 80% 50% at 85% -10%, rgba(45, 90, 138, .28), transparent 60%),
        radial-gradient(ellipse 60% 40% at 0% 30%, rgba(198, 42, 30, .08), transparent 60%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cg fill='none' stroke='%23d9a441' stroke-opacity='.055' stroke-width='1.2'%3E%3Cpath d='M32 6 L58 32 L32 58 L6 32 Z'/%3E%3Cpath d='M32 18 L46 32 L32 46 L18 32 Z'/%3E%3Cpath d='M0 0 L6 6 M64 0 L58 6 M0 64 L6 58 M64 64 L58 58'/%3E%3C/g%3E%3C/svg%3E");
    background-attachment: fixed;
}
.bg-glow-1 { background: radial-gradient(circle, rgba(217, 164, 65, .10) 0%, transparent 70%); }
.bg-glow-2 { background: radial-gradient(circle, rgba(45, 90, 138, .16) 0%, transparent 70%); }

::selection { background: var(--brand-gold); color: var(--brand-navy); }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--brand-gold), var(--accent-gold-hover)); }
::-webkit-scrollbar-thumb:hover { background: var(--brand-red); }

/* ---------- الخطوط: المسيري للعناوين بطابع تراثي ---------- */
h1, h2, h3, .section-title, .slide-content h2, .brand-name, .dir-head h1, .item-head h1,
.form-title, .details-body h1, .home-hero h1, .sheet-brand strong, .stats-strip strong {
    font-family: 'El Messiri', 'Tajawal', sans-serif;
}
.section-title, .dir-head h1, .item-head h1 { letter-spacing: 0; }

/* ---------- شريط التطريز (مستوحى من حاشية المصر) ---------- */
.brand-band {
    height: 5px;
    background:
        linear-gradient(var(--brand-gold), var(--brand-gold)) top / 100% 1px no-repeat,
        repeating-linear-gradient(90deg,
            var(--brand-red) 0 16px,
            var(--brand-gold) 16px 22px,
            var(--brand-blue) 22px 38px,
            var(--brand-gold) 38px 44px);
    opacity: .9;
}

/* ---------- الشريط العلوي والشعار ---------- */
header { background: rgba(6, 26, 36, .88); border-bottom: 0; }
.nav-container { padding-block: 9px; }
.logo-area a { gap: 12px; }
.brand-logo {
    width: 58px; height: 58px; object-fit: contain;
    filter: drop-shadow(0 3px 8px rgba(217, 164, 65, .35));
    transition: transform .3s;
}
.logo-area a:hover .brand-logo { transform: rotate(-4deg) scale(1.05); }
.brand-name { display: flex; flex-direction: column; line-height: 1.15; font-size: 1.45rem; font-weight: 700; }
.brand-name small { font-family: 'Tajawal', sans-serif; font-size: .68rem; font-weight: 500; color: var(--text-muted); letter-spacing: .2px; }
.logo-area span.gold { border-bottom: 0; background: linear-gradient(180deg, var(--brand-gold-light), var(--brand-gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
main { margin-top: 82px; }

.nav-links a.active::after, .nav-links a::after { background: linear-gradient(90deg, var(--brand-red), var(--brand-gold)); }
.nav-btn { background: var(--brand-red); }
.nav-btn-gold { border-color: rgba(217, 164, 65, .7); }

/* ---------- الأزرار ---------- */
.btn-submit {
    background: linear-gradient(180deg, #e8bb5c, var(--brand-gold));
    color: var(--brand-navy);
    box-shadow: 0 4px 14px rgba(217, 164, 65, .25), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.btn-submit:hover { background: linear-gradient(180deg, var(--brand-gold), var(--accent-gold-hover)); }
.btn-submit.btn-secondary { background: rgba(255, 255, 255, .06); color: var(--text-white); box-shadow: none; border: 1px solid var(--border-glass); }
.wedding-card:hover .card-btn { background: var(--brand-red); }

/* ---------- العناوين والأقسام ---------- */
.section-title::before { background: linear-gradient(180deg, var(--brand-gold), var(--brand-red)); }
.section-title.upcoming::before { background: linear-gradient(180deg, var(--brand-gold-light), var(--brand-gold)); }
.section-title.past::before { background: linear-gradient(180deg, var(--brand-blue), var(--brand-green)); }

/* ---------- البطاقات ---------- */
.wedding-card, .strip-card, .cat-tile, .stats-strip div, .filter-panel, .glass-form-card, .details-main-card, .empty-results {
    background: linear-gradient(180deg, rgba(15, 51, 70, .55), rgba(12, 39, 53, .55));
}
.wedding-card:hover, .strip-card:hover, .cat-tile:hover {
    border-color: rgba(217, 164, 65, .55);
    box-shadow: 0 14px 34px rgba(0, 0, 0, .45), 0 0 0 1px rgba(217, 164, 65, .15);
}
.card-fee, .strip-price { border-color: rgba(217, 164, 65, .35); }
.cat-tile i, .stats-strip i { background: linear-gradient(180deg, var(--brand-gold-light), var(--brand-gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* صورة بديلة بهوية المنصة عند عدم وجود صورة */
.dir-placeholder { background: radial-gradient(circle at 50% 45%, var(--brand-navy-3), var(--brand-navy) 75%); color: var(--brand-gold); }
.brand-placeholder { display: grid; place-items: center; }
.brand-placeholder img { width: auto; height: 78%; max-width: 70%; object-fit: contain; opacity: .9; filter: drop-shadow(0 6px 16px rgba(0, 0, 0, .5)); }
.wedding-card:hover .brand-placeholder img { transform: scale(1.04); transition: transform .4s; }

/* ---------- الواجهة ---------- */
.slide-overlay { background: linear-gradient(270deg, rgba(6, 26, 36, .92) 0%, rgba(6, 26, 36, .55) 55%, rgba(6, 26, 36, .15) 100%); }
.slide-content h2 { border-right-color: var(--brand-gold); }
.slide-btn { background: linear-gradient(180deg, #e8bb5c, var(--brand-gold)); color: var(--brand-navy); }
.home-hero {
    display: flex; flex-direction: column; align-items: center;
    background:
        radial-gradient(ellipse at 50% 30%, rgba(45, 90, 138, .35), transparent 65%),
        linear-gradient(160deg, var(--brand-navy-3), var(--brand-navy));
    border-color: rgba(217, 164, 65, .25);
    padding-top: 40px;
}
.hero-logo { width: clamp(140px, 18vw, 220px); height: auto; margin-bottom: 10px; filter: drop-shadow(0 12px 30px rgba(0, 0, 0, .55)); }
.home-hero h1 span { background: linear-gradient(180deg, var(--brand-gold-light), var(--brand-gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.home-search { background: rgba(10, 37, 51, .94); border-color: rgba(217, 164, 65, .35); }
.home-search-tab input:checked + span,
.dir-tabs a.active, .seg-tabs a.active, .pill-options input:checked + span {
    background: linear-gradient(180deg, #e8bb5c, var(--brand-gold)); color: var(--brand-navy); border-color: var(--brand-gold);
}

/* ---------- التذييل ---------- */
footer { position: relative; padding-top: 0; background: linear-gradient(180deg, var(--brand-navy-2), #04121a); border-top: 0; }
footer .container { padding-top: 34px; }
.footer-logo { width: 110px; height: 110px; object-fit: contain; margin-bottom: 10px; filter: drop-shadow(0 8px 20px rgba(0, 0, 0, .5)); }
.footer-socials a { color: var(--text-muted); }

/* ---------- نافذة الحساب ---------- */
.sheet { background: linear-gradient(180deg, #0f3346, #0a2533 40%); border-color: rgba(217, 164, 65, .25); }
.sheet-brand { display: flex; align-items: center; gap: 12px; padding: 0 4px 14px; }
.sheet-brand img { width: 56px; height: 56px; object-fit: contain; }
.sheet-brand strong { display: block; font-size: 1.1rem; }
.sheet-brand small { color: var(--text-muted); font-size: .82rem; }
.sheet-link.primary { background: linear-gradient(180deg, #e8bb5c, var(--brand-gold)); }
.avatar { background: rgba(217, 164, 65, .18); color: var(--brand-gold-light); }

/* ---------- الجوال ---------- */
@media (max-width: 1024px) {
    .brand-logo { width: 40px; height: 40px; }
    .brand-name { font-size: 1.2rem; }
    .brand-name small { display: none; }
    .brand-band { height: 4px; }
    main { margin-top: calc(var(--appbar-h) + 4px + var(--safe-top)); }
    .tab-bar { background: rgba(6, 26, 36, .95); border-top: 1px solid rgba(217, 164, 65, .22); }
    .tab-bar .active::before { background: linear-gradient(90deg, var(--brand-red), var(--brand-gold)); }
    .action-bar { background: rgba(10, 37, 51, .97); border-top-color: rgba(217, 164, 65, .22); }
    .action-bar .primary { background: linear-gradient(180deg, #e8bb5c, var(--brand-gold)); }
    .results-bar { background: rgba(6, 26, 36, .96); }
    .filter-panel.open { background: linear-gradient(180deg, #0f3346, #0a2533 30%); }
    .footer-logo { width: 84px; height: 84px; }
}

/* شعار أعلى نماذج الدخول والتسجيل */
.form-logo { display: block; width: 96px; height: 96px; object-fit: contain; margin: 0 auto 6px; filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .45)); }
.brand-title { white-space: nowrap; }

/* ---------- قائمة سطح المكتب: لا تنكسر في الشاشات المتوسطة ---------- */
.nav-links { flex-wrap: nowrap; }
.nav-links a, .nav-links button, .user-greeting span { white-space: nowrap; }
.logo-area { flex-shrink: 0; }

@media (min-width: 1025px) and (max-width: 1320px) {
    .nav-links { gap: 16px; }
    .nav-links a { font-size: .9rem; }
    .nav-btn, .nav-btn-gold { padding: 7px 14px !important; }
    .brand-name { font-size: 1.3rem; }
    .brand-name small { display: none; }
    /* «إنشاء حساب» متاح من صفحة تسجيل الدخول، فنخفيه هنا لإفساح المجال */
    .nav-links .nav-register { display: none; }
    .user-greeting { display: none; }
}

/* ---------- نموذج طلب الخدمة ---------- */
.contact-card { position: static; }
.request-card { margin: 16px 0 0; padding: 24px; max-width: 100%; scroll-margin-top: 100px; border-color: rgba(217, 164, 65, .35); }
.request-card h3 { font-size: 1.15rem; margin-bottom: 4px; }
.request-card h3 i { color: var(--brand-gold); }
.request-card .note { color: var(--text-muted); font-size: .85rem; margin-bottom: 14px; }
.request-card .form-group { margin-bottom: 12px; }
.request-card label { font-size: .85rem; }
.request-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.action-bar .wa-icon { color: #25d366; }
@media (max-width: 1024px) {
    .request-card { scroll-margin-top: calc(var(--appbar-h) + 16px); }
}

/* ---------- انضم إلينا / تسجيل مقدم الخدمة ---------- */
.join-head { text-align: center; margin: 10px 0 26px; }
.join-head img { width: 110px; height: 110px; object-fit: contain; filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .5)); }
.join-head h1 { font-size: clamp(1.5rem, 4vw, 2.2rem); margin-top: 6px; }
.join-head p { color: var(--text-muted); }
.join-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 20px; max-width: 980px; margin: 0 auto; }
.join-card {
    display: flex; flex-direction: column; gap: 10px; padding: 28px; text-decoration: none; color: var(--text-white);
    background: linear-gradient(180deg, rgba(15, 51, 70, .6), rgba(12, 39, 53, .6));
    border: 1px solid var(--border-glass); border-radius: var(--radius-premium); transition: var(--transition-smooth);
}
.join-card:hover { border-color: var(--brand-gold); transform: translateY(-4px); }
.join-card.featured { border-color: rgba(217, 164, 65, .55); }
.join-card > i { font-size: 2.2rem; color: var(--brand-gold); }
.join-card h2 { font-size: 1.4rem; }
.join-card p { color: var(--text-muted); font-size: .92rem; line-height: 1.8; }
.join-card ul { list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: .9rem; margin: 4px 0 8px; }
.join-card ul i { color: #5fd79a; margin-left: 6px; }
.join-btn { margin-top: auto; align-self: flex-start; padding: 10px 20px; border-radius: 50px; font-weight: 800; background: linear-gradient(180deg, #e8bb5c, var(--brand-gold)); color: var(--brand-navy); }
.join-note { text-align: center; color: var(--text-muted); margin-top: 24px; font-size: .92rem; }
.join-note a { color: var(--brand-gold); font-weight: 700; }

.provider-register { max-width: 860px; }
.reg-step { display: flex; align-items: center; gap: 10px; font-size: 1.1rem; margin: 26px 0 14px; padding-top: 18px; border-top: 1px solid var(--border-glass); }
.reg-step:first-of-type { border-top: 0; padding-top: 0; }
.reg-step span { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-gold); color: var(--brand-navy); font-size: .9rem; }
.reg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.reg-grid .full { grid-column: 1 / -1; }
.reg-grid select.form-control { background-color: var(--bg-slate); color: var(--text-white); }
.reg-hint { color: var(--text-muted); font-size: .85rem; margin-top: 10px; }
.reg-hint i { color: var(--brand-gold); }
.field-error { color: #ff8798; font-size: .88rem; margin-top: 8px; }

.service-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 12px; }
.service-option input { position: absolute; opacity: 0; pointer-events: none; }
.so-box {
    position: relative; display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 16px; cursor: pointer;
    border: 1.5px solid var(--border-glass); border-radius: 14px; background: rgba(255, 255, 255, .03); transition: var(--transition-smooth);
}
.so-box > i:first-child { font-size: 1.5rem; color: var(--brand-gold); margin-bottom: 4px; }
.so-box strong { font-size: 1rem; }
.so-box small { color: var(--text-muted); font-size: .78rem; line-height: 1.6; }
.so-check { position: absolute; top: 12px; left: 12px; color: var(--brand-gold); font-size: 1.2rem; opacity: 0; transform: scale(.6); transition: .2s; }
.service-option:hover .so-box { border-color: rgba(217, 164, 65, .5); }
.service-option input:checked + .so-box { border-color: var(--brand-gold); background: rgba(217, 164, 65, .1); box-shadow: 0 0 0 3px rgba(217, 164, 65, .15); }
.service-option input:checked + .so-box .so-check { opacity: 1; transform: scale(1); }
.service-option input:focus-visible + .so-box { outline: 2px solid var(--brand-gold); outline-offset: 2px; }

@media (max-width: 640px) {
    .reg-grid { grid-template-columns: 1fr; }
    .service-picker { grid-template-columns: 1fr 1fr; gap: 8px; }
    .so-box { padding: 12px; }
    .so-box small { display: none; }
}

.provider-cta {
    display: flex; align-items: center; gap: 16px; margin-top: 30px; padding: 20px 22px; text-decoration: none; color: var(--text-white);
    border: 1px dashed rgba(217, 164, 65, .5); border-radius: var(--radius-premium); background: rgba(217, 164, 65, .06);
}
.provider-cta > i { font-size: 2rem; color: var(--brand-gold); }
.provider-cta div { flex: 1; }
.provider-cta strong { display: block; font-size: 1.1rem; }
.provider-cta span { color: var(--text-muted); font-size: .9rem; }
.provider-cta .join-btn { margin: 0; color: var(--brand-navy); flex-shrink: 0; }
@media (max-width: 640px) { .provider-cta { flex-wrap: wrap; } }

/* ---------- التقييمات ---------- */
.stars { display: inline-flex; gap: 2px; color: var(--brand-gold); }
.stars .fa-regular { color: rgba(255, 255, 255, .22); }
.card-rating { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--text-muted); margin-bottom: 10px; }
.card-rating strong { color: var(--brand-gold-light); }
.strip-body .stars { font-size: .72rem; }

.reviews-section { margin-top: 30px; }
.reviews-summary { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; align-items: center; padding: 22px; margin-bottom: 18px;
    background: linear-gradient(180deg, rgba(15, 51, 70, .55), rgba(12, 39, 53, .55)); border: 1px solid var(--border-glass); border-radius: var(--radius-premium); }
.rs-score { text-align: center; }
.rs-score strong { display: block; font-size: 3rem; line-height: 1; font-family: 'El Messiri', sans-serif; color: var(--brand-gold-light); }
.rs-score .stars { font-size: 1.1rem; margin: 6px 0; }
.rs-score small { color: var(--text-muted); }
.rs-bars { display: flex; flex-direction: column; gap: 6px; }
.rs-bar { display: grid; grid-template-columns: 54px 1fr 34px; gap: 10px; align-items: center; font-size: .85rem; color: var(--text-muted); }
.rs-bar .track { height: 8px; border-radius: 50px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.rs-bar .fill { height: 100%; background: linear-gradient(90deg, var(--brand-gold), var(--brand-gold-light)); border-radius: 50px; }

.review-list { display: flex; flex-direction: column; gap: 12px; }
.review { padding: 16px 18px; border-radius: 14px; background: rgba(255, 255, 255, .035); border: 1px solid var(--border-glass); }
.review-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.review-head strong { font-size: .98rem; }
.review-head small { color: var(--text-muted); margin-inline-start: auto; }
.review p { color: var(--text-white); opacity: .92; white-space: pre-line; line-height: 1.8; }

.review-form { margin-top: 18px; padding: 22px; max-width: 100%; }
.star-input { display: inline-flex; flex-direction: row-reverse; gap: 4px; margin-bottom: 12px; }
.star-input input { position: absolute; opacity: 0; pointer-events: none; }
.star-input label { font-size: 1.9rem; color: rgba(255, 255, 255, .2); cursor: pointer; transition: color .15s, transform .15s; margin: 0; }
.star-input label:hover, .star-input label:hover ~ label,
.star-input input:checked ~ label { color: var(--brand-gold); }
.star-input label:active { transform: scale(.9); }
.star-input input:focus-visible + label { outline: 2px solid var(--brand-gold); border-radius: 4px; }
.review-note { padding: 12px 14px; border-radius: 12px; background: rgba(217, 164, 65, .1); border: 1px solid rgba(217, 164, 65, .3); font-size: .9rem; margin-bottom: 12px; }
@media (max-width: 640px) {
    .reviews-summary { grid-template-columns: 1fr; gap: 14px; }
}

/* ---------- إصلاح متصفح سامسونج وأندرويد ----------
   الجمع بين خلفية ثابتة (background-attachment: fixed) وتأثير التمويه (backdrop-filter)
   على الأشرطة الثابتة يجعل متصفح سامسونج يُخفي الهيدر أو المحتوى عشوائياً.
   الآيفون يتجاهل الخلفية الثابتة أصلاً، لذلك لم تظهر المشكلة عليه. */
@media (max-width: 1024px), (hover: none) {
    body { background-attachment: scroll; }
    *, *::before, *::after { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
    header, body.scrolled header { background: rgba(6, 26, 36, .98); }
    .tab-bar { background: rgba(6, 26, 36, .98); }
    .action-bar { background: rgba(10, 37, 51, .99); }
}

/* بيانات التواصل في أسفل الموقع (من إعدادات الموقع) */
.footer-contact { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 18px; margin-top: 10px; font-size: .85rem; }
.footer-contact a { color: var(--text-muted); text-decoration: none; }
.footer-contact a:hover { color: var(--accent-gold); }
.footer-contact i { color: var(--accent-gold); margin-inline-end: 4px; }

/* رقم إصدار المنصة */
footer .app-version { margin: 14px 0 0; font-size: .72rem; color: var(--text-muted); opacity: .6; letter-spacing: .5px; }
.sheet-version { text-align: center; font-size: .72rem; color: var(--text-muted); opacity: .6; margin-top: 14px; }

/* ---------- شعار المنصة كأيقونة (بدلاً من أيقونة الأعراس) ---------- */
.icon-logo {
    display: inline-block; width: 1.35em; height: 1.35em; vertical-align: -0.3em; flex-shrink: 0;
    background: var(--logo-url, url("../images/logo-96.png")) center / contain no-repeat;
}
.icon-logo::before { content: none !important; }
/* شريط التبويب: باهت عند عدم التحديد، وبألوانه الكاملة عند التحديد */
.tab-bar .icon-logo { width: 1.5em; height: 1.5em; filter: grayscale(1) brightness(1.25); opacity: .7; transition: filter .2s, opacity .2s; }
.tab-bar .active .icon-logo { filter: none; opacity: 1; }
.gallery-empty .icon-logo, .dir-placeholder > .icon-logo { width: 4em; height: 4em; opacity: .85; }
