/*
Theme Name: Nour Al-Islam
Theme URI: https://zat-it.com/
Author: ذات لتكنولوجيا المعلومات (ZAT IT)
Author URI: https://zat-it.com/
Description: نور الإسلام الأزهرية لغات — ثيم مخصص RTL يعتمد على ACF Free بدون Page Builders.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: nour-alislam
Domain Path: /languages
*/

/* ══════════ VARIABLES ══════════ */
:root {
  --c-primary:   #0a3d78;
  --c-dark:      #022a54;
  --c-mid:       #366090;
  --c-pale:      #bac9d9;
  --c-bg:        #f0f3f7;
  --c-gold:      #c9952d;
  --c-gold-lt:   #e7c77f;
  --c-cream:     #f7f3ee;
  --c-card:      #fdf9f5;
  --c-card-line: #e9e0d3;
  --c-text:      #1f2a3a;
  --c-gray:      #566274;
  --c-border:    #e9e0d3;
  --shadow:      0 6px 24px rgba(2,42,84,.09);
  --radius:      14px;
  --radius-sm:   8px;
  --tr:          all .3s ease;
  --f-head:      'Cairo', sans-serif;
  --f-body:      'Tajawal', sans-serif;
}

/* ══════════ RESET ══════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--f-body); color: var(--c-text); direction: rtl; background: var(--c-cream); line-height: 1.75; font-size: 16px; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: var(--tr); }
ul { list-style: none; }
.screen-reader-text { position: absolute; left: -9999px; }

/* ══════════ UTILITIES ══════════ */
.container { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.section { padding: 56px 0; }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 11px 26px; border-radius: 50px; font-family: var(--f-head); font-weight: 700; font-size: .98rem; border: 2px solid transparent; cursor: pointer; transition: var(--tr); line-height: 1.4; }
.btn svg { width: 1.1em; height: 1.1em; }
.btn-gold { background: var(--c-gold); color: #fff; box-shadow: 0 6px 16px rgba(201,149,45,.35); }
.btn-gold:hover { background: #b0821f; transform: translateY(-2px); }
.btn-navy { background: var(--c-dark); color: #fff; }
.btn-navy:hover { background: var(--c-primary); transform: translateY(-2px); }
.btn-sm { padding: 7px 18px; font-size: .85rem; }
.btn-primary { background: var(--c-primary); color: #fff; }
.btn-primary:hover { background: var(--c-dark); }
.pill-gold { display: inline-block; background: var(--c-gold); color: #fff; font-family: var(--f-head); font-weight: 700; padding: 4px 26px; border-radius: 50px; font-size: 1rem; }
.pill-navy { display: inline-block; background: var(--c-dark); color: #fff; font-family: var(--f-head); font-weight: 800; padding: 6px 40px; border-radius: 50px; font-size: 1.35rem; }
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
svg.ico { width: 1em; height: 1em; }
.sec-title { font-family: var(--f-head); font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 800; color: var(--c-dark); text-align: center; margin-bottom: 32px; }

/* section heading: pill with gold lines either side */
.sec-head { display: flex; align-items: center; gap: 24px; margin-bottom: 28px; }
.sec-head::before, .sec-head::after { content: ''; flex: 1; height: 2px; background: linear-gradient(90deg, transparent, var(--c-gold)); }
.sec-head::before { background: linear-gradient(270deg, transparent, var(--c-gold)); }
.sec-head h2 { font-family: var(--f-head); font-weight: 800; font-size: 1.5rem; color: var(--c-dark); }
.sec-head .sec-head-btn { position: relative; }

/* ══════════ TOP BAR ══════════ */
.topbar { background: var(--c-dark); color: #fff; font-size: .82rem; }
.topbar-in { display: flex; align-items: center; gap: 18px; min-height: 44px; }
.tb-item { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.tb-item svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; flex-shrink: 0; }
.tb-phone + .tb-phone { padding-right: 18px; border-right: 1px solid rgba(255,255,255,.35); }
.tb-phone:hover { color: var(--c-gold-lt); }
.tb-spacer { flex: 1; }
.tb-slogan { padding-left: 18px; border-left: 1px solid rgba(255,255,255,.35); font-family: var(--f-head); font-weight: 600; }

/* social circles (brand colours) */
.socials { display: flex; gap: 10px; }
.soc { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; background: var(--c-primary); }
.soc svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }
.soc:hover { transform: translateY(-2px); filter: brightness(1.1); }
.soc-facebook { background: #1877f2; } .soc-youtube { background: #e62117; } .soc-whatsapp { background: #25d366; }
.soc-instagram { background: linear-gradient(45deg, #f09433, #dc2743 60%, #bc1888); } .soc-twitter { background: #111; }
.socials--sm .soc { width: 26px; height: 26px; }
.socials--sm .soc svg { width: 14px; height: 14px; }

/* ══════════ HEADER ══════════ */
#site-header { position: sticky; top: 0; z-index: 100; background: #fff; box-shadow: 0 2px 12px rgba(0,0,0,.06); }
.hdr-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 84px; }
.site-logo img { max-height: 72px; width: auto; }
.main-nav > ul { display: flex; align-items: center; gap: 4px; }
.main-nav li { position: relative; }
.main-nav a { display: flex; align-items: center; gap: 6px; padding: 8px 12px; font-family: var(--f-head); font-weight: 700; font-size: .88rem; border-radius: 50px; color: var(--c-dark); white-space: nowrap; }
.main-nav a svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2.2; }
.main-nav a:hover { color: var(--c-gold); }
.main-nav .current-menu-item > a, .main-nav .current_page_item > a { background: var(--c-gold); color: #fff; }
.main-nav .menu-item-has-children > a::after { content: ''; width: 6px; height: 6px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg) translateY(-2px); margin-right: 2px; opacity: .8; }
.main-nav .menu-cta > a, .nav-cta-btn { background: var(--c-dark); color: #fff !important; padding: 9px 22px; }
.main-nav .sub-menu { position: absolute; top: 100%; right: 0; min-width: 210px; background: #fff; box-shadow: var(--shadow); border-radius: var(--radius-sm); display: none; padding: 6px; z-index: 5; }
.main-nav li:hover > .sub-menu, .main-nav li:focus-within > .sub-menu { display: block; }
.main-nav .sub-menu a { border-radius: var(--radius-sm); }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; width: 40px; height: 40px; flex-direction: column; justify-content: center; gap: 6px; }
.nav-toggle span { display: block; height: 3px; background: var(--c-dark); border-radius: 2px; }

/* ══════════ PAGE BANNER ══════════ */
.page-banner { position: relative; background-size: cover; background-position: center; background-color: var(--c-dark); padding: 80px 0; color: #fff; text-align: center; }
.page-banner::before { content: ''; position: absolute; inset: 0; background: var(--c-dark); opacity: var(--overlay, .75); }
.page-banner .container { position: relative; z-index: 1; }
.page-banner h1 { font-family: var(--f-head); font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; }
.page-banner .sub { opacity: .85; margin-top: 8px; }
.breadcrumb { margin-top: 14px; font-size: .9rem; opacity: .85; }
.breadcrumb a:hover { color: var(--c-gold-lt); }

/* ══════════ HERO (fade slider — RTL safe) ══════════ */
.hero { position: relative; color: var(--c-dark); overflow: hidden; background: #e8eef5; }
.hero-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .8s ease; display: flex; align-items: center; }
.hero-slide.active { opacity: 1; visibility: visible; position: relative; min-height: clamp(400px, 34vw, 500px); }
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: right center; }
.hero-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255,255,255,.88) 0%, rgba(255,255,255,.55) 32%, rgba(255,255,255,0) 58%); }
.hero-slide .container { width: 100%; position: relative; z-index: 2; padding-bottom: 60px; }
.hero-content { max-width: 470px; margin-right: auto; text-align: right; }
.hero h1 { font-family: var(--f-head); font-size: clamp(2.2rem, 4.6vw, 3.7rem); font-weight: 900; line-height: 1.3; color: var(--c-dark); }
.hero p { margin: 14px 0 26px; font-size: 1.05rem; color: var(--c-primary); max-width: 400px; }
.hero-wave { position: absolute; bottom: -1px; left: 0; width: 100%; height: 90px; z-index: 2; pointer-events: none; }
.hero-wave .w-navy { fill: var(--c-dark); } .hero-wave .w-gold { stroke: var(--c-gold); stroke-width: 3; }
.hero-ctrl { position: absolute; z-index: 4; bottom: 18px; left: 40px; display: flex; align-items: center; gap: 10px; }
.hero-arrow { width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(255,255,255,.2); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.hero-arrow:hover { background: var(--c-gold); }
.hero-arrow svg { width: 15px; height: 15px; stroke: #fff; fill: none; stroke-width: 3; }
.hero-dots { display: flex; gap: 7px; }
.hero-dots button { width: 9px; height: 9px; border-radius: 50%; border: 0; background: rgba(255,255,255,.45); cursor: pointer; padding: 0; }
.hero-dots button.active { background: var(--c-gold); }

/* ══════════ TILES (strip + stages) ══════════ */
.strip { margin-top: 18px; }
.tile { background: var(--c-card); border: 1px solid var(--c-card-line); border-radius: var(--radius); padding: 18px 14px; text-align: center; box-shadow: 0 4px 14px rgba(2,42,84,.05); transition: var(--tr); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 108px; }
.tile:hover { box-shadow: var(--shadow); transform: translateY(-4px); }
.tile-ico { font-size: 2.6rem; line-height: 1; }
.tile-ico svg { width: 1em; height: 1em; stroke: url(#na-grad); fill: none; stroke-width: 1.6; }
.tile h3 { font-family: var(--f-head); font-weight: 700; font-size: .95rem; color: var(--c-dark); line-height: 1.5; }
.tile h3 small { display: block; font-size: .95rem; font-weight: 700; }
.tile--stage { min-height: 120px; }
.tile--stage h3 { font-size: 1.05rem; }

/* ══════════ ABOUT ══════════ */
.about { padding: 42px 0 20px; background: linear-gradient(180deg, #fbf8f4, var(--c-cream)); }
.about-grid { display: grid; grid-template-columns: 220px 1fr 1.1fr; gap: 36px; align-items: center; }
.about-quote { border: 2px solid var(--c-gold-lt); border-radius: 28px 28px 60px 60px / 40px 40px 60px 60px; padding: 28px 18px 22px; text-align: center; background: rgba(231,199,127,.12); box-shadow: inset 0 0 0 6px #fff, inset 0 0 0 7px var(--c-gold-lt); }
.about-quote p { font-family: var(--f-head); font-weight: 800; font-size: 1.25rem; color: var(--c-primary); line-height: 1.7; }
.about-quote svg { width: 46px; height: 46px; margin: 10px auto 0; stroke: var(--c-primary); fill: none; stroke-width: 1.6; }
.about-text h2 { font-family: var(--f-head); font-weight: 800; font-size: 1.6rem; color: var(--c-dark); margin: 12px 0; }
.about-text p { color: var(--c-gray); margin-bottom: 18px; }
.about-img img { width: 100%; border-radius: 34px 10px 34px 10px; border: 5px solid #fff; box-shadow: var(--shadow); aspect-ratio: 16/8; object-fit: cover; }

/* ══════════ STAGES / NEWS ══════════ */
.stages .sec-head { margin-bottom: 26px; }
.sec-head--pill h2 { margin: 0; }
.news-card { background: var(--c-card); border: 1px solid var(--c-card-line); border-radius: var(--radius); padding: 10px 10px 14px; transition: var(--tr); display: block; }
.news-card:hover { box-shadow: var(--shadow); transform: translateY(-4px); }
.news-thumb { display: block; aspect-ratio: 16/8; border-radius: var(--radius-sm); overflow: hidden; background: linear-gradient(135deg, var(--c-primary), var(--c-dark)); margin-bottom: 12px; }
.news-thumb img { width: 100%; height: 100%; object-fit: cover; }
.news-card h3 { font-family: var(--f-head); font-weight: 700; font-size: .98rem; color: var(--c-dark); padding: 0 6px; line-height: 1.6; }
.news-date { display: flex; align-items: center; justify-content: flex-end; gap: 6px; font-size: .8rem; color: var(--c-gray); padding: 8px 6px 0; }
.news-date svg { width: 14px; height: 14px; stroke: var(--c-primary); fill: none; stroke-width: 2; }

/* ══════════ CTA ══════════ */
.cta-wrap { padding-top: 10px; padding-bottom: 36px; }
.cta { position: relative; border-radius: 10px; background: var(--c-dark) center/cover; color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px 24% 24px 22%; min-height: 100px; }
.cta-text { text-align: right; }
.cta h2 { font-family: var(--f-head); font-size: 1.7rem; font-weight: 800; line-height: 1.4; }
.cta p { opacity: .92; font-size: .98rem; }

/* ══════════ CARDS (inner pages / archives) ══════════ */
.card { display: block; background: var(--c-card); border: 1px solid var(--c-card-line); border-radius: var(--radius); padding: 22px; transition: var(--tr); }
.card:hover { box-shadow: var(--shadow); transform: translateY(-4px); }
.card h3 { font-family: var(--f-head); font-weight: 800; color: var(--c-dark); margin-bottom: 8px; }
.card p { color: var(--c-gray); font-size: .95rem; }
.card .ico-wrap { width: 52px; height: 52px; border-radius: 14px; background: var(--c-bg); color: var(--c-primary); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; }
.entry { line-height: 2; } .entry p { margin-bottom: 16px; } .entry h2, .entry h3 { font-family: var(--f-head); color: var(--c-dark); margin: 24px 0 10px; }
.entry img { border-radius: var(--radius-sm); }

/* ══════════ CONTACT ══════════ */
.cf-form { display: flex; flex-direction: column; gap: 18px; }
.cf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cf-form label { display: block; font-family: var(--f-head); font-size: .85rem; font-weight: 700; margin-bottom: 6px; }
.cf-form input, .cf-form textarea { width: 100%; padding: 12px 16px; border: 1.5px solid var(--c-border); border-radius: var(--radius-sm); font: inherit; outline: none; transition: var(--tr); background: #fff; }
.cf-form input:focus, .cf-form textarea:focus { border-color: var(--c-primary); }
.cf-hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.cf-notice { padding: 16px 20px; border-radius: var(--radius); margin-bottom: 20px; font-family: var(--f-head); font-weight: 700; }
.cf-notice--ok { background: var(--c-bg); color: var(--c-dark); border: 1px solid var(--c-pale); }
.cf-notice--err { background: #fff0f0; color: #721c24; border: 1px solid #f5c6cb; }
.contact-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 60px; align-items: start; }
.info-item { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border: 1px solid var(--c-border); border-radius: var(--radius); margin-bottom: 12px; background: var(--c-card); }
.info-item .ico-wrap { width: 48px; height: 48px; border-radius: 12px; background: var(--c-bg); color: var(--c-primary); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; flex-shrink: 0; }

/* ══════════ FOOTER ══════════ */
#site-footer { background: var(--c-dark); color: rgba(255,255,255,.85); }
.foot-top { padding: 34px 0 26px; }
.foot-grid { display: grid; grid-template-columns: 1.3fr 1.3fr 1fr 1fr; gap: 0; align-items: start; }
.foot-col { padding: 4px 28px; border-right: 1px solid rgba(255,255,255,.18); }
.foot-col:first-child { border-right: 0; padding-right: 0; }
.foot-logo { height: 92px; width: auto; }
.foot-slogan { margin-top: 6px; font-family: var(--f-head); font-weight: 700; color: #fff; text-align: center; max-width: 240px; }
.foot-col h4 { color: #fff; font-family: var(--f-head); font-size: 1.05rem; margin-bottom: 14px; }
.foot-links li { margin-bottom: 6px; font-size: .88rem; }
.foot-links a:hover, .foot-contact a:hover { color: var(--c-gold-lt); }
.foot-contact li { display: flex; gap: 10px; margin-bottom: 8px; align-items: center; justify-content: space-between; font-size: .92rem; }
.foot-contact svg { width: 18px; height: 18px; stroke: #fff; fill: none; stroke-width: 2; flex-shrink: 0; }
.foot-follow .socials { justify-content: flex-start; }
.foot-btm { background: #e5b556; color: var(--c-dark); font-size: .85rem; font-weight: 700; }
.foot-btm-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 52px; }
.foot-credit { display: inline-flex; align-items: center; gap: 10px; }
.foot-credit img { height: 21px; width: auto; mix-blend-mode: multiply; }
.foot-credit:hover { opacity: .75; }
#btt { position: fixed; bottom: 24px; left: 24px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--c-gold); cursor: pointer; opacity: 0; pointer-events: none; transition: var(--tr); z-index: 90; display: flex; align-items: center; justify-content: center; }
#btt.show { opacity: 1; pointer-events: auto; }
#btt svg { width: 20px; height: 20px; stroke: #fff; fill: none; stroke-width: 2.5; }

/* ══════════ RESPONSIVE ══════════ */
@media (max-width: 1100px) {
  .main-nav a { padding: 8px 8px; font-size: .82rem; }
  .about-grid { grid-template-columns: 1fr 1fr; }
  .about-quote { display: none; }
}
@media (max-width: 992px) {
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 24px 0; }
  .foot-col:nth-child(3) { border-right: 0; padding-right: 0; }
  .contact-grid { grid-template-columns: 1fr; }
  .tb-addr { display: none; }
  .cta { flex-direction: column; text-align: center; padding: 28px 24px; }
  .cta::before { content: ''; position: absolute; inset: 0; background: rgba(2,42,84,.7); border-radius: inherit; }
  .cta > * { position: relative; }
  .cta-text { text-align: center; }
}
@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .main-nav { display: none; position: absolute; top: 100%; right: 0; left: 0; background: #fff; box-shadow: var(--shadow); padding: 12px 20px; max-height: 75vh; overflow: auto; }
  .main-nav.open { display: block; }
  .main-nav > ul { flex-direction: column; align-items: stretch; }
  .main-nav .sub-menu { position: static; display: block; box-shadow: none; padding: 0 16px 0 0; }
  .main-nav .menu-item-has-children > a::after { display: none; }
}
@media (max-width: 640px) {
  .section { padding: 40px 0; }
  .grid-3, .cf-row, .about-grid { grid-template-columns: 1fr; }
  .grid-4 { gap: 12px; }
  .tb-slogan, .tb-phone + .tb-phone { padding: 0; border: 0; }
  .topbar-in { gap: 12px; flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }
  .hero-bg::after { background: linear-gradient(0deg, rgba(255,255,255,.85) 0%, rgba(255,255,255,.55) 55%, rgba(255,255,255,.2) 100%); }
  .hero-content { max-width: 100%; margin: 0; text-align: center; }
  .hero p { margin-inline: auto; }
  .hero-slide.active { min-height: 440px; }
  .hero-ctrl { left: 50%; transform: translateX(-50%); }
  .sec-head { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .sec-head::before, .sec-head::after { display: none; }
  .foot-grid { grid-template-columns: 1fr; }
  .foot-col { border-right: 0; padding: 12px 0; }
  .foot-btm-in { flex-direction: column; padding-top: 10px; padding-bottom: 10px; text-align: center; }
}
