/*
Theme Name: دليل مطاعم شرم
Theme URI: https://matam-sharm.22web.org/
Author: Muse
Author URI: https://muse.ai/
Description: قالب دليل مطاعم ومحلات أكل شرم الشيخ — ملفات مطاعم ومحلات (أرقام تواصل، سوشيال، منيو، عنوان، ساعات، أسعار) مصنفة حسب نوع الأكل والمنطقة، مع تقييمات عملاء بالنجوم (تظهر بعد اعتماد الإدارة) وقسم وصفات طعام، بثلاث لغات (عربي افتراضي + English + Русский).
Version: 1.4.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: restaurants-sharm
Tags: rtl, restaurants, directory, food, recipes
*/

/* ===== هوية بصرية: أخضر غامق + برتقالي دافئ على خلفية كريمي ===== */
:root{
  --primary:#166534; --primary-dark:#14532d; --accent:#c2410c; --accent-dark:#9a3412;
  --bg:#faf7f0; --card:#fff; --text:#1f2937; --muted:#6b7280; --line:#e7e0d4;
  --green:#16a34a; --green-bg:#dcfce7; --amber:#b45309; --amber-bg:#fef3c7; --red:#dc2626;
  --gold:#d97706; --gold-light:#f59e0b; --gold-soft:#fffbeb;
}
*{box-sizing:border-box; margin:0; padding:0}
body{font-family:"Segoe UI",Tahoma,Arial,sans-serif; background:var(--bg); color:var(--text); line-height:1.7}
a{text-decoration:none; color:inherit}
.wrap{max-width:1150px; margin:0 auto; padding:0 16px}
button{font-family:inherit; cursor:pointer}
input,select,textarea{font-family:inherit; font-size:15px}
img{max-width:100%}

/* ===== الترويسة ===== */
.site-header{background:var(--primary); color:#fff; position:sticky; top:0; z-index:50; box-shadow:0 2px 10px rgba(0,0,0,.15)}
.topbar{display:flex; align-items:center; gap:14px; padding:10px 16px; flex-wrap:wrap}
.logo{display:flex; align-items:center; gap:8px; font-size:22px; font-weight:800; color:#fff}
.logo-img{width:44px; height:44px; border-radius:10px; object-fit:cover; background:#fff}
.logo .logo-emoji{font-size:28px}
.menu-toggle{display:none; background:rgba(255,255,255,.15); color:#fff; border:1px solid rgba(255,255,255,.35); border-radius:8px; padding:7px 12px; font-size:14px; font-weight:700}
.header-panel{display:flex; align-items:center; gap:14px; flex:1; flex-wrap:wrap}
.main-nav{display:flex; gap:4px; flex-wrap:wrap; flex:1}
.main-nav a{color:#e7f5e9; padding:8px 12px; border-radius:8px; font-weight:700; font-size:14px}
.main-nav a:hover{background:rgba(255,255,255,.15); color:#fff}
.nav-close{display:none}
.nav-overlay{display:none}
.lang-switch{display:flex; gap:4px; align-items:center}
.lang-switch button{background:rgba(255,255,255,.15); color:#fff; border:1px solid rgba(255,255,255,.35); border-radius:8px; padding:6px 10px; font-size:13px; font-weight:700; font-family:inherit; cursor:pointer}
.lang-switch button.on{background:var(--accent); border-color:var(--accent)}
.lang-switch button:hover{background:rgba(255,255,255,.28)}

/* ===== أزرار ===== */
.btn{display:inline-block; padding:10px 18px; border-radius:10px; font-weight:700; font-size:14px; border:1px solid transparent; text-align:center}
.btn-primary{background:var(--primary); color:#fff}
.btn-primary:hover{background:var(--primary-dark)}
.btn-accent{background:var(--accent); color:#fff}
.btn-accent:hover{background:var(--accent-dark)}
.btn-wa{background:#25d366; color:#fff}
.btn-call{background:#fff; color:var(--primary); border-color:var(--primary)}
.btn-ghost{background:#fff; color:var(--text); border-color:var(--line)}
.btn-sm{padding:7px 12px; font-size:13px}
.btn-lg{padding:14px 26px; font-size:16px}

/* ===== الهيرو والبحث ===== */
.hero{background:linear-gradient(135deg,var(--primary),#1e7a45); color:#fff; padding:52px 0 44px; text-align:center}
.hero h1{font-size:32px; line-height:1.4; margin-bottom:10px}
.hero p{font-size:17px; color:#dcfce7; max-width:720px; margin:0 auto 22px}
.searchbar{display:flex; gap:8px; max-width:860px; margin:0 auto; flex-wrap:wrap; justify-content:center}
.searchbar input[type="text"]{flex:2; min-width:220px; padding:12px 14px; border-radius:10px; border:none; font-size:15px}
.searchbar select{flex:1; min-width:150px; padding:12px 10px; border-radius:10px; border:none; font-size:15px; background:#fff; color:var(--text)}
.stats{display:flex; gap:18px; justify-content:center; margin-top:26px; flex-wrap:wrap}
.stat{background:rgba(255,255,255,.12); border:1px solid rgba(255,255,255,.25); border-radius:12px; padding:10px 18px; min-width:110px}
.stat b{display:block; font-size:26px; line-height:1.2}
.stat span{font-size:13px; color:#dcfce7}

/* ===== الأقسام العامة ===== */
section{padding:34px 0}
section h2{font-size:24px; margin-bottom:6px}
section h2 .sec-emoji{margin-inline-end:6px}
.sub{color:var(--muted); margin-bottom:18px; font-size:15px}
.grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:16px}
.count{color:var(--muted); font-size:14px; align-self:center}

/* ===== شبكة الأقسام ===== */
.cats{display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:12px}
.cat-card{background:var(--card); border:1px solid var(--line); border-radius:14px; padding:18px 10px; text-align:center; cursor:pointer; transition:transform .15s, box-shadow .15s}
.cat-card:hover{transform:translateY(-2px); box-shadow:0 6px 18px rgba(0,0,0,.08); border-color:var(--accent)}
.cat-card .cat-emoji{font-size:34px; display:block; margin-bottom:6px}
.cat-card b{display:block; font-size:15px}
.cat-card small{color:var(--muted); font-size:12px}
.cat-card.active{border-color:var(--accent); background:#fff7ed; box-shadow:0 0 0 2px var(--accent) inset}

/* ===== الفلاتر ===== */
.filters{display:flex; gap:10px; flex-wrap:wrap; align-items:center; margin-bottom:16px}
.filters select,.filters input[type="text"]{padding:10px 12px; border:1px solid var(--line); border-radius:10px; background:#fff; font-size:14px}
.filters input[type="text"]{flex:1; min-width:180px}
.filters label{font-size:14px; color:var(--muted)}

/* ===== بطاقة مطعم ===== */
.card{background:var(--card); border:1px solid var(--line); border-radius:16px; overflow:hidden; display:flex; flex-direction:column}
/* v1.4.0: الإعلان المميز — إطار ذهبي وخلفية ذهبية خفيفة. */
.card-featured{border:2px solid var(--gold); background:var(--gold-soft); box-shadow:0 4px 18px rgba(217,119,6,.25)}
.featured-badge{display:inline-block; background:linear-gradient(135deg,var(--gold),var(--gold-light)); color:#fff; font-size:12px; font-weight:800; border-radius:20px; padding:2px 10px}
.card-photo{width:100%; height:170px; object-fit:cover; display:block; background:#f3f4f6}
.card-photo-fallback{width:100%; height:170px; display:flex; align-items:center; justify-content:center; font-size:64px; background:linear-gradient(135deg,#dcfce7,#fef3c7)}
.card-body{padding:16px; display:flex; flex-direction:column; gap:8px; flex:1}
.card-body h3{font-size:18px; line-height:1.4}
.card-body h3 a:hover{color:var(--primary); text-decoration:underline}
.cat-tag{display:inline-block; background:#fff7ed; color:var(--accent-dark); font-size:12px; font-weight:700; border-radius:20px; padding:2px 10px}
.delivery-badge{display:inline-block; background:var(--green-bg); color:var(--primary); font-size:12px; font-weight:700; border-radius:20px; padding:2px 10px}
.area-tag{display:inline-block; background:#f0fdf4; color:var(--primary); font-size:12px; font-weight:700; border-radius:20px; padding:2px 10px}
.stars{color:var(--gold); font-size:16px; letter-spacing:1px}
.stars small{color:var(--muted); font-size:13px; letter-spacing:0}
.card-desc{color:#4b5563; font-size:14px}
.card-meta{font-size:13px; color:var(--muted)}
.card-actions{display:flex; gap:8px; flex-wrap:wrap; margin-top:auto}
.card-actions .btn{flex:1; padding:9px 8px; font-size:13px; min-width:90px}
.empty{color:var(--muted); text-align:center; padding:30px 10px; grid-column:1/-1}

/* ===== بطاقة وصفة ===== */
.recipe-card .card-photo,.recipe-card .card-photo-fallback{height:150px}
.recipe-meta{display:flex; gap:10px; flex-wrap:wrap; font-size:13px; color:var(--muted)}

/* ===== الملف الشخصي (single) ===== */
.profile-page{padding:20px 0 40px}
.profile{background:#fff; border:1px solid var(--line); border-radius:18px; padding:28px; margin-top:16px}
/* v1.4.0: الملف المميز — إطار ذهبي. */
.profile-featured{border:2px solid var(--gold); box-shadow:0 4px 18px rgba(217,119,6,.2)}
.profile-back{display:inline-block; color:var(--primary); font-weight:700; font-size:14px; margin-bottom:8px}
.profile-top{display:flex; gap:22px; align-items:flex-start; flex-wrap:wrap}
.profile-photo{width:220px; height:170px; border-radius:14px; object-fit:cover; border:1px solid var(--line); flex:0 0 auto}
.profile-photo-initials{width:220px; height:170px; border-radius:14px; background:linear-gradient(135deg,var(--primary),#4b5563); color:#fff; font-size:64px; font-weight:800; display:flex; align-items:center; justify-content:center; flex:0 0 auto}
.profile-info{flex:1; min-width:260px}
.profile-info h1{font-size:28px; line-height:1.35; margin-bottom:6px}
.profile-info .meta{margin-top:10px; display:flex; gap:10px; flex-wrap:wrap; font-size:14px; color:var(--muted)}
.profile-desc{font-size:16px; color:#374151; margin-top:16px; max-width:720px}
.profile-actions{display:flex; gap:10px; flex-wrap:wrap; margin-top:18px}
.profile-actions .btn{padding:12px 22px; font-size:15px}
.profile-details{margin-top:22px; border-top:1px solid var(--line); padding-top:18px; display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:12px}
.detail-item{background:#fafaf9; border:1px solid var(--line); border-radius:12px; padding:12px 14px}
.detail-item b{display:block; font-size:13px; color:var(--muted); margin-bottom:2px}
.detail-item span{font-size:15px}
.profile-social{margin-top:18px}
.social-title{font-weight:700; font-size:14px; color:var(--muted)}
.social-links{display:flex; gap:8px; flex-wrap:wrap; margin-top:8px}
.social-btn{padding:9px 16px; border-radius:10px; font-weight:700; font-size:14px; background:#f3f4f6; color:var(--text); border:1px solid var(--line)}
.social-btn:hover{background:#e5e7eb}
.views{color:var(--muted); font-size:13px; margin-top:8px}

/* ===== الخريطة المضمّنة والمنيو المضمّن (v1.3.0) ===== */
.hidden{display:none!important}
.map-section{margin-top:26px}
.map-section h2{margin-bottom:10px}
.single-map{width:100%; height:340px; border:1px solid var(--line); border-radius:14px; overflow:hidden; background:#eef2f7}
.single-map iframe{width:100%; height:100%; border:0; display:block}
.map-fallback{width:100%; height:340px; object-fit:cover; border:1px solid var(--line); border-radius:14px; display:block}
.map-open{margin-top:8px; font-size:14px}
.map-open a{color:var(--primary); font-weight:700}
.menu-section{margin-top:26px}
.menu-section h2{margin-bottom:10px}
.menu-embed{width:100%; height:600px; border:1px solid var(--line); border-radius:14px; background:#fff}
.menu-image{width:100%; border:1px solid var(--line); border-radius:14px; display:block}
.menu-open{margin-top:8px; font-size:14px}
.menu-open a{color:var(--primary); font-weight:700}

/* ===== أعلن معنا — البانر والباقات وخطوات الإعلان (v1.4.0) ===== */
.ad-banner{background:linear-gradient(135deg,#7c2d12,var(--accent)); color:#fff; padding:30px 0}
.ad-banner-in{display:flex; align-items:center; gap:20px; flex-wrap:wrap; justify-content:space-between}
.ad-banner-text h2{color:#fff; margin-bottom:4px}
.ad-banner-text p{color:#ffedd5; font-size:16px; margin:0}
.ad-banner-btn{padding:13px 26px; font-size:16px}
.ad-packages{background:#fff}
.pkg-grid{display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:16px}
.pkg-card{background:var(--bg); border:1px solid var(--line); border-radius:16px; padding:22px; text-align:center}
.pkg-card h3{font-size:20px; margin-bottom:6px}
.pkg-price{font-size:28px; margin-bottom:2px}
.pkg-price b{color:var(--accent)}
.pkg-dur{color:var(--muted); font-size:14px; margin-bottom:12px}
.pkg-feats{list-style:none; text-align:start; display:flex; flex-direction:column; gap:6px; font-size:14px}
.pkg-feats li::before{content:"✓ "; color:var(--primary); font-weight:800}
.paymethods{display:flex; gap:10px; flex-wrap:wrap; justify-content:center; margin-top:20px}
.pay-btn{display:flex; flex-direction:column; align-items:center; gap:2px; background:var(--bg); border:1px solid var(--line); border-radius:12px; padding:12px 20px; font-weight:700; font-size:15px; color:var(--text)}
.pay-btn:hover{border-color:var(--accent)}
.pay-btn b{font-size:18px; direction:ltr}
.pay-btn-vf b{color:#e11d48}
.pay-btn-insta b{color:#7c3aed}
.pay-btn-hint{font-size:12px; color:var(--muted); font-weight:400}
.howto-steps{display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:16px}
.howto-step{background:#fff; border:1px solid var(--line); border-radius:14px; padding:18px}
.howto-num{display:inline-flex; width:34px; height:34px; border-radius:50%; background:var(--accent); color:#fff; font-weight:800; align-items:center; justify-content:center; margin-bottom:8px}
.howto-step h3{font-size:17px; margin-bottom:4px}
.howto-step p{color:var(--muted); font-size:14px}

/* ===== التقييمات ===== */
.review-item{border:1px solid var(--line); border-radius:12px; padding:14px 16px; margin-bottom:10px; background:#fff}
.review-item p{margin:6px 0}
.review-item small{color:var(--muted)}
.review-form{background:#fff; border:1px solid var(--line); border-radius:14px; padding:20px; margin-top:16px}
.review-form h3{margin-bottom:12px}
.field{margin-bottom:14px}
.field label{display:block; font-weight:700; margin-bottom:5px; font-size:14px}
.field input[type="text"],.field input[type="tel"],.field textarea,.field select{width:100%; padding:11px 12px; border:1px solid var(--line); border-radius:10px; background:#fff}
.field textarea{min-height:90px; resize:vertical}
.star-picker{display:flex; gap:4px; font-size:30px; color:#d1d5db; cursor:pointer}
.star-picker .star.on{color:var(--gold)}
.form-row{display:grid; grid-template-columns:1fr 1fr; gap:14px}
.actions{display:flex; gap:10px; flex-wrap:wrap; margin-top:8px}
.note{font-size:13px; color:var(--muted); margin-top:10px}

/* ===== الطلب من المطعم (v1.1.0) ===== */
.order-section{background:#fff; border:1px solid var(--line); border-radius:14px; padding:20px; margin-top:26px}
.order-section h2{margin-bottom:8px}
.order-sub{color:var(--muted); font-size:14px; margin-bottom:14px}
.menu-items{display:flex; flex-direction:column; gap:8px; margin-bottom:14px}
.menu-item{display:flex; align-items:center; gap:10px; flex-wrap:wrap; border:1px solid var(--line); border-radius:12px; padding:10px 12px; cursor:pointer; background:#fff}
.menu-item:hover{border-color:var(--accent)}
.menu-item-check{width:18px; height:18px; accent-color:var(--primary); flex:0 0 auto}
.menu-item-name{flex:1; min-width:140px; font-weight:700}
.menu-item-price{font-weight:800; color:var(--primary); white-space:nowrap}
.menu-item-qty{display:flex; align-items:center; gap:6px}
.qty-btn{width:30px; height:30px; border-radius:8px; border:1px solid var(--line); background:#f3f4f6; font-size:16px; font-weight:800; line-height:1}
.qty-btn:hover{background:#e5e7eb}
.qty-input{width:52px; padding:6px 4px; border:1px solid var(--line); border-radius:8px; text-align:center; font-size:15px}
.order-total{font-size:17px; margin-bottom:14px}
.order-total b{color:var(--primary)}

/* ===== الوصفة (single-recipe) ===== */
.recipe-photo{width:100%; max-height:380px; object-fit:cover; border-radius:16px; margin-top:14px}
.recipe-facts{display:flex; gap:12px; flex-wrap:wrap; margin:16px 0}
.recipe-fact{background:#fff; border:1px solid var(--line); border-radius:12px; padding:10px 18px; text-align:center}
.recipe-fact b{display:block; font-size:18px}
.recipe-fact span{font-size:13px; color:var(--muted)}
.ing-list,.steps-list{background:#fff; border:1px solid var(--line); border-radius:14px; padding:20px 22px; margin:12px 0}
.ing-list li{margin-bottom:6px}
.steps-list li{margin-bottom:10px}

/* ===== الفوتر ===== */
.site-footer{background:var(--primary-dark); color:#d1fae5; padding:28px 0; margin-top:20px; text-align:center; font-size:14px}
.site-footer b{color:#fff}
.site-footer a{color:#fde68a; font-weight:700}
.visits-line{margin-top:8px; font-size:13px; color:#a7f3d0}

/* ===== النوافذ المنبثقة والتنبيهات ===== */
.modal-bg{display:none; position:fixed; inset:0; background:rgba(0,0,0,.55); z-index:100; align-items:center; justify-content:center; padding:16px}
.modal-bg.show{display:flex}
.modal{background:#fff; border-radius:16px; padding:24px; max-width:520px; width:100%; max-height:90vh; overflow:auto}
.modal h3{margin-bottom:8px}
#toast{position:fixed; bottom:20px; left:50%; transform:translateX(-50%) translateY(20px); background:#111827; color:#fff; padding:12px 20px; border-radius:10px; font-weight:700; opacity:0; pointer-events:none; transition:all .25s; z-index:200; max-width:90vw; text-align:center}
#toast.show{opacity:1; transform:translateX(-50%) translateY(0)}
#lightbox{display:none; position:fixed; inset:0; background:rgba(0,0,0,.85); z-index:150; align-items:center; justify-content:center; padding:20px}
#lightbox.show{display:flex}
#lightbox img{max-width:92vw; max-height:88vh; border-radius:12px}
.share-row{display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin-top:14px}
.share-lbl{font-weight:700; font-size:14px; color:var(--muted)}
.share-btn{width:38px; height:38px; border-radius:50%; border:1px solid var(--line); background:#fff; display:inline-flex; align-items:center; justify-content:center; font-weight:800; font-size:15px}
.share-btn:hover{background:#f3f4f6}

/* ===== موبايل ===== */
@media (max-width: 860px){
  .menu-toggle{display:inline-block}
  .header-panel{display:none; position:fixed; top:0; inset-inline-end:0; bottom:0; width:280px; max-width:85vw; background:var(--primary-dark); z-index:90; flex-direction:column; align-items:stretch; padding:20px 16px; gap:12px; overflow:auto}
  .header-panel.open{display:flex}
  .main-nav{flex-direction:column}
  .nav-close{display:block; position:absolute; top:10px; inset-inline-start:10px; background:none; border:none; color:#fff; font-size:26px}
  .nav-overlay{display:block; position:fixed; inset:0; background:rgba(0,0,0,.5); z-index:80; opacity:0; pointer-events:none; transition:opacity .2s}
  .nav-overlay.show{opacity:1; pointer-events:auto}
  .hero h1{font-size:24px}
  .hero{padding:36px 0 30px}
  .form-row{grid-template-columns:1fr}
  .profile-photo,.profile-photo-initials{width:100%; height:190px}
  .profile{padding:18px}
  .single-map,.map-fallback{height:300px}
  .menu-embed{height:480px}
}

/* ===== تعديلات الاتجاه LTR (الإنجليزية / الروسية) ===== */
html[dir="ltr"] .cat-card{text-align:center}
html[dir="ltr"] .ing-list,html[dir="ltr"] .steps-list{padding-left:34px}
