/*
Theme Name: هیئت | Heyat
Theme URI: https://example.com
Author: Heyat Theme
Author URI: https://example.com
Description: قالب اختصاصی وردپرس برای مساجد و هیئت‌های مذهبی با تابلوی اوقات شرعی، پخش سخنرانی و مداحی، تقویم مناسبت‌ها، فرم عضویت و کمک مالی.
Version: 1.0.0
Requires at least: 5.9
Requires PHP: 7.4
Text Domain: heyat
Tags: rtl, one-column, two-columns, custom-menu, custom-logo, featured-images, translation-ready
*/

/* =========================================================
   0. DESIGN TOKENS
   Color:
     --c-emerald   #0F3D3E  (deep mosque-dome teal — primary)
     --c-emerald-2 #143F37  (secondary emerald, panels)
     --c-gold      #C9A227  (illuminated-manuscript gold — accent)
     --c-gold-dim  #9C7E1F  (gold, low-emphasis / borders)
     --c-maroon    #7A2E2E  (manuscript red — CTA / donate)
     --c-cream     #FAF6EC  (page background, aged paper)
     --c-ink       #241F18  (body text)
     --c-sage      #7C9885  (muted supporting tone)
   Type:
     Display: 'Aref Ruqaa' — calligraphic Naskh, identity/headings only
     Body/UI: 'Vazirmatn' — Persian UI workhorse
   Signature element: تابلوی اوقات شرعی (prayer-times board) — a wall-board
     rendered with an 8-point geometric star frame, used as the front-page
     anchor and repeated (small) in the footer.
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700;800&family=Aref+Ruqaa:wght@400;700&display=swap');

:root{
  --c-emerald:#0F3D3E;
  --c-emerald-2:#143F37;
  --c-emerald-3:#0B2C2D;
  --c-gold:#C9A227;
  --c-gold-dim:#9C7E1F;
  --c-maroon:#7A2E2E;
  --c-maroon-dark:#5E2222;
  --c-cream:#FAF6EC;
  --c-cream-2:#F2EAD8;
  --c-ink:#241F18;
  --c-ink-soft:#4B4438;
  --c-sage:#7C9885;
  --c-line:#E3D9BE;

  --f-display:'Aref Ruqaa', 'Vazirmatn', serif;
  --f-body:'Vazirmatn', Tahoma, sans-serif;

  --radius-s:6px;
  --radius-m:14px;
  --radius-l:26px;
  --shadow-1:0 6px 24px rgba(15,61,62,.10);
  --shadow-2:0 14px 40px rgba(15,61,62,.16);
  --container:1160px;
}

/* =========================================================
   1. RESET / BASE
   ========================================================= */
*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  direction:rtl;
  background:var(--c-cream);
  color:var(--c-ink);
  font-family:var(--f-body);
  font-size:17px;
  line-height:1.85;
  -webkit-font-smoothing:antialiased;
}
img{max-width:100%;height:auto;display:block}
a{color:inherit;text-decoration:none}
ul{margin:0;padding:0;list-style:none}
button{font-family:inherit;cursor:pointer}
input,textarea,select{font-family:inherit;font-size:1rem}

h1,h2,h3,h4{
  font-family:var(--f-display);
  color:var(--c-emerald);
  margin:0 0 .5em;
  line-height:1.35;
  font-weight:700;
}
h1{font-size:clamp(2.1rem,4vw,3.4rem)}
h2{font-size:clamp(1.6rem,3vw,2.3rem)}
h3{font-size:1.3rem}
p{margin:0 0 1em}

.container{max-width:var(--container);margin:0 auto;padding:0 24px}

:focus-visible{outline:3px solid var(--c-gold);outline-offset:3px}

@media(prefers-reduced-motion:reduce){
  *{animation-duration:.001ms !important;transition-duration:.001ms !important;scroll-behavior:auto !important}
}

/* =========================================================
   2. GEOMETRIC DIVIDER (signature motif, reused across theme)
   ========================================================= */
.geo-divider{
  height:22px;
  width:100%;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='22' viewBox='0 0 44 22'%3E%3Cg fill='none' stroke='%23C9A227' stroke-width='1.4'%3E%3Cpath d='M0 11 L11 0 L22 11 L11 22 Z'/%3E%3Cpath d='M22 11 L33 0 L44 11 L33 22 Z'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat:repeat-x;
  background-position:center;
  opacity:.7;
}
.geo-divider.on-dark{opacity:.55}

/* =========================================================
   3. HEADER
   ========================================================= */
.site-header{
  background:var(--c-emerald);
  color:var(--c-cream);
  position:sticky;top:0;z-index:50;
  box-shadow:var(--shadow-1);
}
.site-header .container{
  display:flex;align-items:center;justify-content:space-between;
  min-height:78px;gap:24px;
}
.site-branding{display:flex;align-items:center;gap:12px}
.site-branding img.custom-logo{max-height:52px;width:auto;border-radius:var(--radius-s)}
.site-title{font-family:var(--f-display);font-size:1.7rem;color:var(--c-cream);margin:0}
.site-title a{color:inherit}
.site-description{font-size:.8rem;color:var(--c-gold);margin:2px 0 0}

.primary-menu{display:flex;gap:6px;align-items:center}
.primary-menu li a{
  display:block;padding:10px 14px;border-radius:var(--radius-s);
  font-weight:600;font-size:.98rem;color:var(--c-cream);
  transition:background .2s, color .2s;
}
.primary-menu li a:hover,
.primary-menu li a:focus{background:rgba(201,162,39,.18);color:var(--c-gold)}
.primary-menu .current-menu-item > a{color:var(--c-gold)}

.header-cta{
  display:inline-flex;align-items:center;gap:8px;
  background:var(--c-maroon);color:#fff;
  padding:10px 18px;border-radius:999px;font-weight:700;font-size:.92rem;
  box-shadow:var(--shadow-1);
  transition:transform .15s, background .2s;
}
.header-cta:hover{background:var(--c-maroon-dark);transform:translateY(-1px);color:#fff}

.menu-toggle{
  display:none;background:none;border:1px solid rgba(250,246,236,.4);
  color:var(--c-cream);padding:8px 12px;border-radius:var(--radius-s);
}

/* =========================================================
   4. PRAYER TIMES BOARD  (signature section)
   ========================================================= */
.prayer-board-wrap{background:var(--c-emerald-3)}
.prayer-board{
  position:relative;
  background:var(--c-emerald-2);
  border:1px solid rgba(201,162,39,.5);
  border-radius:var(--radius-l);
  padding:34px 28px 26px;
  margin:-46px auto 0;
  max-width:980px;
  box-shadow:var(--shadow-2);
}
.prayer-board::before,.prayer-board::after{
  content:"";position:absolute;top:14px;bottom:14px;width:1px;
  background:repeating-linear-gradient(to bottom,var(--c-gold-dim) 0 6px,transparent 6px 12px);
  opacity:.6;
}
.prayer-board::before{right:14px}
.prayer-board::after{left:14px}
.prayer-board-title{
  text-align:center;color:var(--c-gold);font-family:var(--f-display);
  font-size:1.5rem;margin-bottom:4px;
}
.prayer-board-date{text-align:center;color:var(--c-cream-2);font-size:.85rem;margin-bottom:22px;opacity:.85}
.prayer-grid{
  display:grid;grid-template-columns:repeat(5,1fr);gap:14px;
}
.prayer-item{
  text-align:center;background:rgba(250,246,236,.04);
  border:1px solid rgba(201,162,39,.28);
  border-radius:var(--radius-m);padding:16px 8px;
  transition:border-color .2s, background .2s;
}
.prayer-item.is-next{
  border-color:var(--c-gold);
  background:rgba(201,162,39,.12);
}
.prayer-item .label{display:block;color:var(--c-cream-2);font-size:.82rem;margin-bottom:8px}
.prayer-item .time{
  display:block;font-family:var(--f-body);font-weight:800;letter-spacing:.5px;
  color:var(--c-gold);font-size:1.4rem;font-variant-numeric:tabular-nums;
}
.prayer-next-note{
  text-align:center;margin-top:18px;color:var(--c-cream-2);font-size:.9rem;
}
.prayer-next-note strong{color:var(--c-gold)}

@media(max-width:720px){
  .prayer-grid{grid-template-columns:repeat(3,1fr)}
  .prayer-item:nth-child(4),.prayer-item:nth-child(5){grid-column:span 1}
}
@media(max-width:480px){.prayer-grid{grid-template-columns:repeat(2,1fr)}}

/* =========================================================
   5. HERO
   ========================================================= */
.hero{
  background:
    radial-gradient(circle at 85% -10%, rgba(201,162,39,.25), transparent 55%),
    linear-gradient(180deg,var(--c-emerald) 0%, var(--c-emerald) 70%, var(--c-emerald-3) 100%);
  color:var(--c-cream);
  padding:64px 0 96px;
  position:relative;
  overflow:hidden;
}
.hero::before{
  content:"";position:absolute;inset:0;opacity:.10;pointer-events:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23FAF6EC' stroke-width='1'%3E%3Cpath d='M60 6 L94 30 L94 90 L60 114 L26 90 L26 30 Z'/%3E%3Cpath d='M60 6 L60 114 M26 30 L94 90 M94 30 L26 90'/%3E%3C/g%3E%3C/svg%3E");
  background-size:220px 220px;
}
.hero-inner{position:relative;text-align:center;max-width:760px;margin:0 auto}
.hero-eyebrow{
  display:inline-block;color:var(--c-gold);font-weight:700;font-size:.85rem;
  letter-spacing:.5px;margin-bottom:16px;
}
.hero h1{color:var(--c-cream);text-shadow:0 2px 20px rgba(0,0,0,.25)}
.hero-lead{color:var(--c-cream-2);font-size:1.12rem;max-width:560px;margin:0 auto 30px}
.hero-actions{display:flex;justify-content:center;gap:14px;flex-wrap:wrap}
.btn{
  display:inline-flex;align-items:center;gap:8px;
  padding:13px 26px;border-radius:999px;font-weight:700;font-size:.98rem;
  transition:transform .15s, box-shadow .2s, background .2s;
  border:1px solid transparent;
}
.btn-primary{background:var(--c-gold);color:var(--c-emerald-3)}
.btn-primary:hover{transform:translateY(-2px);box-shadow:0 10px 24px rgba(201,162,39,.35)}
.btn-outline{border-color:rgba(250,246,236,.55);color:var(--c-cream)}
.btn-outline:hover{background:rgba(250,246,236,.1)}
.btn-maroon{background:var(--c-maroon);color:#fff}
.btn-maroon:hover{background:var(--c-maroon-dark);transform:translateY(-2px)}

/* =========================================================
   6. SECTIONS / CARDS
   ========================================================= */
.section{padding:72px 0}
.section-cream-2{background:var(--c-cream-2)}
.section-head{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:34px;flex-wrap:wrap}
.section-head .eyebrow{color:var(--c-gold-dim);font-weight:700;font-size:.82rem;display:block;margin-bottom:6px}
.section-head p{color:var(--c-ink-soft);margin:8px 0 0;max-width:520px}
.link-more{color:var(--c-maroon);font-weight:700;font-size:.92rem;white-space:nowrap}
.link-more:hover{text-decoration:underline}

.grid{display:grid;gap:26px}
.grid-3{grid-template-columns:repeat(3,1fr)}
.grid-2{grid-template-columns:repeat(2,1fr)}
@media(max-width:900px){.grid-3{grid-template-columns:repeat(2,1fr)}}
@media(max-width:640px){.grid-3,.grid-2{grid-template-columns:1fr}}

/* Event card (with day-block calendar tab) */
.event-card{
  display:flex;gap:16px;background:#fff;border:1px solid var(--c-line);
  border-radius:var(--radius-m);padding:16px;box-shadow:var(--shadow-1);
  transition:transform .15s, box-shadow .2s;
}
.event-card:hover{transform:translateY(-3px);box-shadow:var(--shadow-2)}
.event-date-block{
  flex:0 0 68px;height:68px;border-radius:var(--radius-s);
  background:var(--c-emerald);color:var(--c-cream);
  display:flex;flex-direction:column;align-items:center;justify-content:center;
}
.event-date-block .day{font-size:1.5rem;font-weight:800;color:var(--c-gold);line-height:1}
.event-date-block .month{font-size:.72rem;margin-top:2px}
.event-card .event-body h3{margin-bottom:4px;font-size:1.08rem}
.event-meta{color:var(--c-ink-soft);font-size:.85rem}

/* Lecture / media card */
.lecture-card{
  background:#fff;border:1px solid var(--c-line);border-radius:var(--radius-m);
  overflow:hidden;box-shadow:var(--shadow-1);transition:transform .15s, box-shadow .2s;
}
.lecture-card:hover{transform:translateY(-3px);box-shadow:var(--shadow-2)}
.lecture-thumb{
  position:relative;aspect-ratio:16/9;background:var(--c-emerald-2);
  display:flex;align-items:center;justify-content:center;
}
.lecture-thumb img{width:100%;height:100%;object-fit:cover}
.play-badge{
  position:absolute;inset:auto auto 12px 12px;
  width:44px;height:44px;border-radius:50%;background:var(--c-gold);
  display:flex;align-items:center;justify-content:center;color:var(--c-emerald-3);
  box-shadow:0 6px 16px rgba(0,0,0,.25);
}
.lecture-type{
  position:absolute;top:12px;right:12px;background:rgba(15,61,62,.85);color:var(--c-gold);
  font-size:.72rem;padding:4px 10px;border-radius:999px;font-weight:700;
}
.lecture-body{padding:16px}
.lecture-body h3{font-size:1.05rem;margin-bottom:6px}
.lecture-meta{display:flex;justify-content:space-between;color:var(--c-ink-soft);font-size:.82rem}

/* Blog card */
.post-card{border-bottom:1px solid var(--c-line);padding:26px 0;display:flex;gap:20px}
.post-card:first-child{padding-top:0}
.post-card img{width:180px;height:130px;object-fit:cover;border-radius:var(--radius-m);flex-shrink:0}
.post-card h3{margin-bottom:6px}
.post-card .excerpt{color:var(--c-ink-soft);font-size:.95rem}
.post-meta{color:var(--c-gold-dim);font-size:.82rem;font-weight:700;margin-bottom:6px}
@media(max-width:560px){.post-card{flex-direction:column}.post-card img{width:100%;height:180px}}

/* =========================================================
   7. DONATION CTA BAND
   ========================================================= */
.donate-band{
  background:linear-gradient(135deg,var(--c-maroon) 0%, var(--c-maroon-dark) 100%);
  color:#fff;padding:60px 0;text-align:center;position:relative;overflow:hidden;
}
.donate-band h2{color:#fff}
.donate-band p{color:rgba(255,255,255,.85);max-width:560px;margin:0 auto 26px}
.donate-amounts{display:flex;gap:12px;justify-content:center;flex-wrap:wrap;margin-bottom:22px}
.donate-amounts button{
  background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.35);
  color:#fff;padding:10px 20px;border-radius:999px;font-weight:700;
  transition:background .2s;
}
.donate-amounts button.is-active,
.donate-amounts button:hover{background:var(--c-gold);color:var(--c-emerald-3);border-color:var(--c-gold)}

/* =========================================================
   8. FORMS (membership / donation / comments)
   ========================================================= */
.heyat-form{
  background:#fff;border:1px solid var(--c-line);border-radius:var(--radius-m);
  padding:28px;box-shadow:var(--shadow-1);max-width:560px;margin:0 auto;
}
.heyat-form .form-row{margin-bottom:16px}
.heyat-form label{display:block;font-weight:700;font-size:.9rem;margin-bottom:6px;color:var(--c-emerald)}
.heyat-form input[type=text],
.heyat-form input[type=email],
.heyat-form input[type=tel],
.heyat-form input[type=number],
.heyat-form select,
.heyat-form textarea{
  width:100%;padding:11px 14px;border:1px solid var(--c-line);border-radius:var(--radius-s);
  background:var(--c-cream);color:var(--c-ink);
}
.heyat-form input:focus,.heyat-form textarea:focus,.heyat-form select:focus{border-color:var(--c-gold)}
.heyat-form textarea{min-height:110px;resize:vertical}
.heyat-form .form-submit{margin-top:6px}
.heyat-form .form-submit button{width:100%;justify-content:center}
.form-note{font-size:.8rem;color:var(--c-ink-soft);margin-top:10px;text-align:center}
.form-success{background:#eaf5ec;border:1px solid #bcdec2;color:#245c31;padding:14px;border-radius:var(--radius-s);margin-bottom:16px;font-size:.92rem}
.form-error{background:#fbeaea;border:1px solid #edc3c3;color:#7a2e2e;padding:14px;border-radius:var(--radius-s);margin-bottom:16px;font-size:.92rem}

/* =========================================================
   9. SINGLE / PAGE / ARCHIVE CONTENT
   ========================================================= */
.page-header-band{
  background:var(--c-emerald);color:var(--c-cream);padding:46px 0 30px;text-align:center;
}
.page-header-band h1{color:var(--c-cream)}
.breadcrumbs{color:var(--c-gold);font-size:.85rem}

.content-area{max-width:820px;margin:0 auto;padding:52px 24px}
.entry-content{font-size:1.05rem}
.entry-content h2{margin-top:1.6em}
.entry-content img{border-radius:var(--radius-m);margin:20px 0}
.entry-content blockquote{
  border-right:4px solid var(--c-gold);margin:24px 0;padding:10px 20px;
  background:var(--c-cream-2);border-radius:0 var(--radius-s) var(--radius-s) 0;
  font-family:var(--f-display);font-size:1.15rem;color:var(--c-emerald);
}
.media-player{margin:24px 0;background:var(--c-emerald-2);border-radius:var(--radius-m);padding:18px}
.media-player audio,.media-player video{width:100%;border-radius:var(--radius-s)}
.speaker-line{color:var(--c-gold-dim);font-weight:700;margin-bottom:12px}

.entry-tags{margin-top:30px;display:flex;gap:8px;flex-wrap:wrap}
.entry-tags a{background:var(--c-cream-2);padding:6px 14px;border-radius:999px;font-size:.82rem;color:var(--c-emerald)}

/* =========================================================
   10. WIDGET / SIDEBAR / FOOTER
   ========================================================= */
.widget{margin-bottom:34px}
.widget-title{font-family:var(--f-display);color:var(--c-emerald);font-size:1.15rem;margin-bottom:14px;border-bottom:2px solid var(--c-gold);padding-bottom:8px}

.site-footer{background:var(--c-emerald-3);color:var(--c-cream-2)}
.footer-top{padding:56px 0 30px}
.footer-grid{display:grid;grid-template-columns:1.4fr 1fr 1fr 1fr;gap:34px}
@media(max-width:800px){.footer-grid{grid-template-columns:1fr 1fr}}
@media(max-width:520px){.footer-grid{grid-template-columns:1fr}}
.footer-grid h4{color:var(--c-gold);font-family:var(--f-display);font-size:1.1rem;margin-bottom:14px}
.footer-grid p,.footer-grid a{color:var(--c-cream-2);font-size:.92rem}
.footer-grid ul li{margin-bottom:8px}
.footer-grid a:hover{color:var(--c-gold)}
.footer-mini-prayer{display:flex;justify-content:space-between;font-size:.82rem;border-bottom:1px dashed rgba(201,162,39,.3);padding:6px 0}
.footer-mini-prayer span:last-child{color:var(--c-gold);font-weight:700}
.footer-bottom{border-top:1px solid rgba(201,162,39,.2);padding:18px 0;text-align:center;font-size:.82rem;color:rgba(250,246,236,.6)}
.social-links{display:flex;gap:10px;margin-top:14px}
.social-links a{width:36px;height:36px;border-radius:50%;border:1px solid rgba(201,162,39,.4);display:flex;align-items:center;justify-content:center}
.social-links a:hover{background:var(--c-gold);color:var(--c-emerald-3);border-color:var(--c-gold)}

/* =========================================================
   11. PAGINATION / MISC
   ========================================================= */
.pagination{display:flex;justify-content:center;gap:8px;margin-top:36px}
.pagination a,.pagination span{
  padding:9px 15px;border-radius:var(--radius-s);border:1px solid var(--c-line);color:var(--c-emerald);font-weight:700;font-size:.9rem;
}
.pagination .current{background:var(--c-emerald);color:var(--c-cream);border-color:var(--c-emerald)}

.skip-link{position:absolute;right:-9999px;top:0;background:var(--c-gold);color:var(--c-emerald-3);padding:12px 20px;z-index:999}
.skip-link:focus{right:12px;top:12px}

/* =========================================================
   12. RESPONSIVE NAV
   ========================================================= */
@media(max-width:920px){
  .menu-toggle{display:inline-flex;align-items:center;gap:6px}
  .primary-menu{
    position:fixed;inset:78px 0 0 0;background:var(--c-emerald);
    flex-direction:column;align-items:stretch;padding:20px;gap:2px;
    transform:translateY(-12px);opacity:0;pointer-events:none;transition:opacity .2s, transform .2s;
    overflow-y:auto;
  }
  .primary-menu.is-open{opacity:1;transform:translateY(0);pointer-events:auto}
  .primary-menu li a{padding:14px 16px;border-bottom:1px solid rgba(201,162,39,.15)}
  .header-cta{display:none}
  .prayer-board{margin-top:-30px;padding:26px 18px 20px}
}
