/*
Theme Name: Diwan Elementor
Theme URI: https://diwan4media.com
Author: Al-Diwan Media Foundation
Description: قالب احترافي ثنائي اللغة لمؤسسة الديوان الاعلامية متوافق مع Elementor
Version: 3.0.0
License: GNU General Public License v2 or later
Text Domain: diwan-elementor
*/

/* ===== VARIABLES ===== */
:root {
  --gold:     #C9A84C;
  --gold-lt:  #E8C96A;
  --gold-bg:  rgba(201,168,76,0.10);
  --gold-bdr: rgba(201,168,76,0.22);
  --dark:     #0D0D0D;
  --dark2:    #141414;
  --dark3:    #1C1C1C;
  --dark4:    #252525;
  --card:     #181818;
  --txt:      #EEEBE5;
  --txt-m:    #9C9690;
  --txt-f:    #5A5654;
  --white:    #FFFFFF;
  --green:    #4ade80;
  --red:      #f87171;
  --r:        6px;
  --rl:       12px;
  --tr:       .3s cubic-bezier(.4,0,.2,1);
  --font-ar:  'Cairo','Noto Sans Arabic',sans-serif;
  --font-en:  'DM Sans','Inter',system-ui,sans-serif;
  --nav-h:    64px;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { background: var(--dark); color: var(--txt); font-family: var(--font-ar); line-height: 1.75; overflow-x: hidden; direction: rtl; text-align: right; }
body.en { font-family: var(--font-en); direction: ltr; text-align: left; }
a { color: var(--gold); text-decoration: none; transition: color var(--tr); }
a:hover { color: var(--gold-lt); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4, h5 { line-height: 1.3; color: var(--white); }
ul { list-style: none; }
button, input, select, textarea { font-family: inherit; }

/* ===== LAYOUT ===== */
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.sec { padding: 80px 0; }

/* ===== TYPOGRAPHY ===== */
.sec-title { font-size: clamp(1.5rem, 3.5vw, 2.4rem); font-weight: 800; position: relative; display: inline-block; padding-bottom: 10px; margin-bottom: 14px; }
.sec-title::after { content: ''; position: absolute; bottom: 0; right: 0; width: 50px; height: 3px; background: var(--gold); border-radius: 2px; }
body.en .sec-title::after { left: 0; right: auto; }
.lead { font-size: 1rem; color: var(--txt-m); line-height: 1.85; max-width: 600px; }
.gold { color: var(--gold); }
.muted { color: var(--txt-m); }

/* ===== NAVBAR ===== */
#nav { position: fixed; top: 0; left: 0; right: 0; z-index: 9999; height: var(--nav-h); background: rgba(13,13,13,.92); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--gold-bdr); transition: background var(--tr), box-shadow var(--tr); }
#nav.scrolled { background: rgba(13,13,13,.98); box-shadow: 0 2px 20px rgba(0,0,0,.5); }
.nav-w { display: flex; align-items: center; justify-content: space-between; height: var(--nav-h); gap: 12px; }
.nav-logo { display: flex; flex-direction: column; line-height: 1.2; text-decoration: none; flex-shrink: 0; min-width: 0; }
.nav-logo .ar { font-size: clamp(.9rem, 2vw, 1.1rem); font-weight: 900; color: var(--gold); font-family: var(--font-ar); white-space: nowrap; }
.nav-logo .en { font-size: clamp(.55rem, 1vw, .65rem); color: var(--txt-m); letter-spacing: .08em; text-transform: uppercase; font-family: var(--font-en); white-space: nowrap; }
.nav-links { display: flex; gap: clamp(14px, 2vw, 28px); align-items: center; }
.nav-links a { color: var(--txt-m); font-size: clamp(.78rem, 1.2vw, .88rem); font-weight: 600; white-space: nowrap; position: relative; transition: color var(--tr); }
.nav-links a::after { content: ''; position: absolute; bottom: -3px; right: 0; width: 0; height: 1px; background: var(--gold); transition: width var(--tr); }
body.en .nav-links a::after { left: 0; right: auto; }
.nav-links a:hover, .nav-links a.act { color: var(--white); }
.nav-links a:hover::after, .nav-links a.act::after { width: 100%; }
.nav-links a.act { color: var(--gold); }
.nav-links a.featured { color: var(--gold); font-weight: 700; }
.nav-r { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.lang-tog { display: flex; align-items: center; background: var(--dark4); border: 1px solid var(--gold-bdr); border-radius: 20px; padding: 2px; gap: 2px; }
.lng { padding: 4px 10px; border-radius: 16px; font-size: .73rem; font-weight: 700; color: var(--txt-m); cursor: pointer; transition: all var(--tr); border: none; background: transparent; font-family: var(--font-en); white-space: nowrap; }
.lng.on { background: var(--gold); color: var(--dark); }
.ham { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 6px; border: none; background: transparent; }
.ham span { display: block; width: 22px; height: 2px; background: var(--gold); border-radius: 2px; transition: all var(--tr); }
.ham.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.ham.open span:nth-child(2) { opacity: 0; }
.ham.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 820px) {
  .ham { display: flex; }
  .nav-links { position: fixed; top: var(--nav-h); left: 0; right: 0; background: rgba(13,13,13,.98); backdrop-filter: blur(20px); flex-direction: column; padding: 20px 24px 28px; gap: 6px; border-bottom: 1px solid var(--gold-bdr); transform: translateY(-110%); opacity: 0; transition: transform var(--tr), opacity var(--tr); z-index: 9998; }
  .nav-links.open { transform: translateY(0); opacity: 1; }
  .nav-links a { font-size: 1rem; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.05); width: 100%; display: block; }
}
@media (max-width: 380px) {
  .nav-logo .en { display: none; }
  .lng { padding: 4px 8px; font-size: .68rem; }
}

/* ===== BUTTONS ===== */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: var(--r); font-size: .9rem; font-weight: 700; cursor: pointer; transition: all var(--tr); border: none; font-family: inherit; text-decoration: none; white-space: nowrap; }
.btn-g { background: var(--gold); color: var(--dark); }
.btn-g:hover { background: var(--gold-lt); color: var(--dark); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(201,168,76,.3); }
.btn-o { background: transparent; color: var(--gold); border: 1px solid var(--gold-bdr); }
.btn-o:hover { background: var(--gold-bg); border-color: var(--gold); transform: translateY(-2px); }
.btn-w { background: var(--dark4); color: var(--txt); border: 1px solid var(--gold-bdr); }
.btn-w:hover { background: var(--dark3); color: var(--white); }
.btn-lg { padding: 14px 28px; font-size: .97rem; }
.btn-full { width: 100%; justify-content: center; }

/* ===== HERO ===== */
#hero { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; position: relative; overflow: hidden; padding-top: var(--nav-h); }
.hero-bg { position: absolute; inset: 0; background: radial-gradient(ellipse 90% 70% at 50% -10%, rgba(201,168,76,.09) 0%, transparent 60%), var(--dark); }
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(13,13,13,0.82) 0%, rgba(13,13,13,0.55) 50%, rgba(13,13,13,0.70) 100%); z-index: 2; }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; opacity: 0; transition: opacity 1s ease; }
.hero-video.loaded { opacity: 1; }
.hero-slides { position: absolute; inset: 0; z-index: 0; }
.hero-slide { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transform: scale(1.04); transition: opacity 1.2s ease, transform 6s ease; }
.hero-slide.active { opacity: 1; transform: scale(1); }
.hero-grid { position: absolute; inset: 0; background-image: linear-gradient(var(--gold-bdr) 1px, transparent 1px), linear-gradient(90deg, var(--gold-bdr) 1px, transparent 1px); background-size: 55px 55px; opacity: .15; pointer-events: none; z-index: 1; }
.hero-c { position: relative; z-index: 3; padding: 40px 0; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; background: var(--gold-bg); border: 1px solid var(--gold-bdr); border-radius: 20px; padding: 5px 14px; font-size: .76rem; color: var(--gold); margin-bottom: 22px; font-family: var(--font-en); letter-spacing: .07em; text-transform: uppercase; }
.hero-badge::before { content: ''; width: 6px; height: 6px; background: var(--gold); border-radius: 50%; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.4;transform:scale(1.4)} }
.hero-h { font-size: clamp(2rem, 6vw, 4.8rem); font-weight: 900; line-height: 1.15; margin-bottom: 18px; color: var(--white); }
.hero-h .acc { color: var(--gold); display: block; }
.hero-sub { font-size: clamp(.9rem, 1.5vw, 1.05rem); color: var(--txt-m); max-width: 580px; margin-bottom: 32px; line-height: 1.85; }
.hero-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.slide-dots { display: flex; gap: 8px; margin-top: 28px; }
.slide-dot { width: 28px; height: 3px; background: rgba(255,255,255,0.3); border-radius: 2px; cursor: pointer; transition: all 0.4s ease; border: none; padding: 0; }
.slide-dot.active { background: var(--gold); }

/* ===== STATS ===== */
#stats { background: var(--dark2); border-top: 1px solid var(--gold-bdr); border-bottom: 1px solid var(--gold-bdr); padding: 32px 0; }
.stats-g { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { text-align: center; padding: 16px 8px; border-right: 1px solid var(--gold-bdr); }
.stat:first-child { border-right: none; }
.stat-n { font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 900; color: var(--gold); line-height: 1; font-family: var(--font-en); }
.stat-l { font-size: clamp(.72rem, 1.2vw, .82rem); color: var(--txt-m); margin-top: 5px; }
@media (max-width: 600px) { .stats-g { grid-template-columns: 1fr 1fr; } .stat:nth-child(2) { border-right: none; } }

/* ===== CARDS ===== */
.card { background: var(--card); border: 1px solid var(--gold-bdr); border-radius: var(--rl); padding: 24px 20px; transition: all var(--tr); position: relative; overflow: hidden; }
.card:hover { border-color: var(--gold); transform: translateY(-4px); box-shadow: 0 8px 30px rgba(201,168,76,.1); }
.card-icon { width: 48px; height: 48px; background: var(--gold-bg); border: 1px solid var(--gold-bdr); border-radius: var(--r); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; font-size: 1.4rem; }
.card h3 { font-size: clamp(.92rem, 1.5vw, 1.05rem); margin-bottom: 8px; }
.card p { font-size: clamp(.8rem, 1.2vw, .86rem); color: var(--txt-m); line-height: 1.7; }

/* ===== GRIDS ===== */
.g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.g3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.g4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 900px) { .g3, .g4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .g2 { grid-template-columns: 1fr; } .g3 { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .g4 { grid-template-columns: 1fr; } }

/* ===== FORMS ===== */
.form-box { background: var(--card); border: 1px solid var(--gold-bdr); border-radius: var(--rl); padding: 36px 28px; }
@media (max-width: 560px) { .form-box { padding: 24px 16px; } }
.fg-g { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .fg-g { grid-template-columns: 1fr; } }
.fg { display: flex; flex-direction: column; gap: 6px; margin-bottom: 4px; }
.fg-full { grid-column: 1 / -1; }
.fl { font-size: .78rem; font-weight: 700; color: var(--txt-m); letter-spacing: .03em; }
.fc { padding: 11px 14px; background: var(--dark3); border: 1px solid var(--gold-bdr); border-radius: var(--r); color: var(--txt); font-size: .88rem; outline: none; transition: border-color var(--tr); width: 100%; }
.fc:focus { border-color: var(--gold); }
textarea.fc { resize: vertical; min-height: 96px; }
.msg { display: none; padding: 14px; border-radius: var(--r); text-align: center; font-size: .88rem; margin-top: 14px; }
.msg.ok { background: rgba(74,222,128,.1); border: 1px solid rgba(74,222,128,.3); color: var(--green); }
.msg.err { background: rgba(248,113,113,.1); border: 1px solid rgba(248,113,113,.3); color: var(--red); }

/* ===== STARS ===== */
.rate-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 20px 0; }
@media (max-width: 480px) { .rate-grid { grid-template-columns: 1fr; } }
.rate-box { background: var(--card); border: 1px solid var(--gold-bdr); border-radius: var(--r); padding: 16px; text-align: center; }
.rate-box label { font-size: .8rem; color: var(--txt-m); display: block; margin-bottom: 8px; }
.stars { display: flex; gap: 5px; justify-content: center; }
.star { font-size: clamp(1.3rem, 3vw, 1.6rem); cursor: pointer; color: var(--txt-f); transition: color var(--tr); user-select: none; }
.star.on { color: var(--gold); }

/* ===== GALLERY ===== */
.gal-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.gal-tab { padding: 7px 16px; border-radius: 20px; font-size: .8rem; font-weight: 700; cursor: pointer; transition: all var(--tr); border: 1px solid var(--gold-bdr); background: transparent; color: var(--txt-m); }
.gal-tab.on, .gal-tab:hover { background: var(--gold); color: var(--dark); border-color: var(--gold); }
.gal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 600px) { .gal-grid { grid-template-columns: 1fr 1fr; gap: 8px; } }
.gal-item { aspect-ratio: 1; background: var(--card); border: 1px solid var(--gold-bdr); border-radius: var(--r); overflow: hidden; cursor: pointer; }
.gal-ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 2rem; background: linear-gradient(135deg, var(--dark3), var(--dark4)); transition: all var(--tr); }
.gal-item:hover .gal-ph { transform: scale(1.06); }

/* ===== CLIENT PORTAL ===== */
.portal-card { max-width: 500px; margin: 44px auto 0; background: var(--card); border: 1px solid var(--gold-bdr); border-radius: var(--rl); padding: 36px 28px; text-align: center; }
.portal-ic { width: 64px; height: 64px; background: var(--gold-bg); border: 1px solid var(--gold-bdr); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; margin: 0 auto 18px; }
.inp-grp { display: flex; gap: 8px; margin-bottom: 12px; }
.inp { flex: 1; padding: 12px 14px; background: var(--dark3); border: 1px solid var(--gold-bdr); border-radius: var(--r); color: var(--txt); font-size: .9rem; outline: none; text-align: center; letter-spacing: .1em; }
.inp:focus { border-color: var(--gold); }

/* ===== PAGE HERO ===== */
.pg-hero { padding: clamp(100px, 15vw, 150px) 0 clamp(40px, 6vw, 70px); background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(201,168,76,.07) 0%, transparent 60%), var(--dark); border-bottom: 1px solid var(--gold-bdr); text-align: center; }
.pg-hero h1 { font-size: clamp(1.7rem, 4.5vw, 3rem); margin-bottom: 10px; }
.pg-hero p { color: var(--txt-m); font-size: clamp(.85rem, 1.3vw, .97rem); }
.breadcrumb { display: flex; justify-content: center; align-items: center; gap: 8px; font-size: .78rem; color: var(--txt-f); margin-bottom: 12px; flex-wrap: wrap; }
.breadcrumb a { color: var(--txt-m); }
.breadcrumb span { color: var(--gold); }

/* ===== CTA ===== */
.cta-sec { background: var(--dark2); border-top: 1px solid var(--gold-bdr); padding: 72px 0; text-align: center; }
.cta-sec h2 { font-size: clamp(1.4rem, 3.5vw, 2.2rem); margin-bottom: 12px; }
.cta-sec p { color: var(--txt-m); max-width: 480px; margin: 0 auto 28px; }
.cta-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ===== FOOTER ===== */
#footer { background: var(--dark2); border-top: 1px solid var(--gold-bdr); padding: 56px 0 26px; }
.footer-g { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
@media (max-width: 768px) { .footer-g { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-g { grid-template-columns: 1fr; } }
.f-brand .ar { font-size: 1.3rem; font-weight: 900; color: var(--gold); display: block; margin-bottom: 3px; }
.f-brand .en { font-size: .62rem; color: var(--txt-f); letter-spacing: .08em; text-transform: uppercase; display: block; margin-bottom: 12px; }
.f-desc { font-size: .82rem; color: var(--txt-m); line-height: 1.8; max-width: 280px; }
.f-col h5 { font-size: .72rem; letter-spacing: .09em; text-transform: uppercase; color: var(--gold); margin-bottom: 12px; }
.f-links { display: flex; flex-direction: column; gap: 8px; }
.f-links a { font-size: .84rem; color: var(--txt-m); }
.f-links a:hover { color: var(--white); }
.footer-btm { border-top: 1px solid var(--gold-bdr); padding-top: 20px; display: flex; justify-content: space-between; align-items: center; font-size: .76rem; color: var(--txt-f); flex-wrap: wrap; gap: 10px; }
.soc { display: flex; gap: 8px; flex-wrap: wrap; }
.soc a { padding: 7px 14px; background: var(--dark4); border: 1px solid var(--gold-bdr); border-radius: 20px; font-size: .78rem; color: var(--txt-m); }
.soc a:hover { background: var(--gold-bg); border-color: var(--gold); color: var(--gold); }

/* ===== FLOATING ===== */
#scrolltop { position: fixed; bottom: 28px; left: 28px; width: 40px; height: 40px; background: var(--gold); color: var(--dark); border: none; border-radius: 50%; cursor: pointer; font-size: 1rem; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: all var(--tr); z-index: 500; font-weight: 900; }
body.en #scrolltop { left: auto; right: 84px; }
#scrolltop.show { opacity: 1; pointer-events: all; }
.wa-float { position: fixed; bottom: 28px; right: 28px; width: 48px; height: 48px; background: #25D366; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; box-shadow: 0 4px 16px rgba(37,211,102,.4); z-index: 500; transition: all var(--tr); }
body.en .wa-float { right: auto; left: 28px; }
.wa-float:hover { transform: scale(1.1); }

/* ===== ANIMATIONS ===== */
.fu { opacity: 0; transform: translateY(24px); transition: opacity .65s ease, transform .65s ease; }
.fu.vis { opacity: 1; transform: translateY(0); }

/* ===== ELEMENTOR COMPATIBILITY ===== */
.elementor-section .elementor-container { max-width: 1160px; }
.elementor-page #nav { z-index: 9999; }
.elementor-widget-heading .elementor-heading-title { font-family: var(--font-ar); color: var(--white); }
.elementor-widget-text-editor p { color: var(--txt-m); line-height: 1.85; }
.elementor-button { font-family: var(--font-ar); border-radius: var(--r); }

/* ===== PAGE HERO BACKGROUNDS ===== */
.pg-hero {
  position: relative;
  overflow: hidden;
}
.pg-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0;
}
.pg-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(13,13,13,0.88) 0%, rgba(13,13,13,0.72) 50%, rgba(13,13,13,0.85) 100%);
  z-index: 1;
}
.pg-hero .wrap {
  position: relative;
  z-index: 2;
}
.pg-hero h1 {
  text-shadow: 0 2px 12px rgba(0,0,0,0.5);
}
