/*
Theme Name: Gapyar
Theme URI: https://gapyar.ir
Author: مجتبی معراجی
Author URI: https://gapyar.ir
Description: قالب وردپرس فوق حرفه‌ای گپیار — صفحه اصلی تک‌صفحه‌ای کاملاً قابل مدیریت از طریق وردپرس، سازگار با المنتور، فارسی/راست‌چین و کاملاً آفلاین (بدون CDN). فونت پیش‌فرض وزیرمتن به‌صورت محلی بارگذاری می‌شود.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: gapyar
Tags: rtl-language-support, full-width-template, custom-colors, custom-menu, featured-images, theme-options, translation-ready, one-page, elementor
*/

/* ============================================================
   فونت محلی وزیرمتن (بدون CDN — همه‌چیز از خود قالب)
   ============================================================ */
@font-face {
  font-family: "Vazirmatn";
  src: url("assets/fonts/Vazirmatn-Regular.woff2") format("woff2");
  font-weight: 100 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Vazirmatn";
  src: url("assets/fonts/Vazirmatn-Bold.woff2") format("woff2");
  font-weight: 600 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Vazirmatn";
  src: url("assets/fonts/Vazirmatn-Black.woff2") format("woff2");
  font-weight: 800 900;
  font-style: normal;
  font-display: swap;
}

/* ============================================================
   متغیرها و پایه
   ============================================================ */
:root {
  --gpy-font: "Vazirmatn", Tahoma, "Segoe UI", system-ui, sans-serif;
  --gpy-navy: #0e1c30;
  --gpy-navy-mid: #152a45;
  --gpy-navy-light: #1e3d62;
  --gpy-navy-glow: #254a75;
  --gpy-orange: #ff6b2c;
  --gpy-orange-glow: #ff9a5c;
  --gpy-orange-dark: #e05520;
  --gpy-white: #ffffff;
  --gpy-cream: #f0f4fa;
  --gpy-ink: #1a2233;
  --gpy-muted-d: #5b6680;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--gpy-font);
  font-size: 16px;
  line-height: 1.8;
  color: var(--gpy-ink);
  background: #ffffff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--gpy-orange-dark); text-decoration: none; }
a:hover { color: var(--gpy-orange); }

img { max-width: 100%; height: auto; }

/* عنوان‌ها با فونت قالب */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--gpy-font);
  line-height: 1.4;
  color: var(--gpy-navy);
}

/* دسترسی‌پذیری */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  width: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  word-wrap: normal !important;
}
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--gpy-orange);
  color: #fff;
  padding: 0.6rem 1rem;
  z-index: 100000;
  border-radius: 0 0 8px 8px;
}
.skip-link:focus { left: 1rem; }

/* هدر و منو: assets/css/header-dm.css */

/* ============================================================
   محتوای عمومی صفحات/نوشته‌ها
   ============================================================ */
.gpy-site-main { min-height: 40vh; }
.gpy-page-wrap {
  max-width: 1140px;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4rem) clamp(1rem, 4vw, 2rem);
}
.gpy-page-wrap.gpy-has-sidebar {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 980px) {
  .gpy-page-wrap.gpy-has-sidebar { grid-template-columns: 1fr 320px; }
}

/* برگه/نوشته تمام‌عرض، بدون قاب و بدون عنوان — ۲۰px فاصله از هدر */
.gpy-fullwidth-entry { width: 100%; padding-top: 20px; }
.gpy-entry-content--full { width: 100%; max-width: none; margin: 0; }
.gpy-entry-content--full > * { margin-top: 0; }
/* وقتی محتوای برگه با ادیتور بلاک ساخته شده، بلوک‌های تراز معمولی کمی فاصله از لبه بگیرند */
.gpy-entry-content--full > :not(.alignfull):not(.alignwide):not(.elementor):not([class*="elementor"]) {
	max-width: 1140px;
	margin-inline: auto;
	padding-inline: clamp(1rem, 4vw, 2rem);
}
.gpy-entry-content--full > .alignfull { margin-inline: 0; }
/* بخش دیدگاه‌ها در حالت تمام‌عرض، خوانا بماند */
.gpy-comments-wrap { max-width: 860px; margin: 2rem auto 0; padding: 0 clamp(1rem, 4vw, 2rem) 2rem; }

/* ============================================================
   دیدگاه‌ها — طراحی حرفه‌ای هماهنگ با قالب
   ============================================================ */
.gpy-comments {
  margin-top: 2.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid #e7ecf3;
}
.gpy-comments-title {
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  font-weight: 900;
  color: var(--gpy-navy);
  margin: 0 0 1.8rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.gpy-comments-title::before {
  content: "";
  width: 6px;
  height: 1.4em;
  border-radius: 6px;
  background: linear-gradient(180deg, var(--gpy-orange), var(--gpy-orange-dark));
  display: inline-block;
}

/* لیست دیدگاه‌ها */
.gpy-comment-list { list-style: none; margin: 0 0 2.5rem; padding: 0; }
.gpy-comment-list .children {
  list-style: none;
  margin: 1rem 0 0;
  padding-inline-start: clamp(1rem, 4vw, 2.5rem);
  border-inline-start: 2px dashed #e1e7f0;
}
.gpy-comment-list li.comment { margin-bottom: 1.1rem; }
.gpy-comment-list .comment-body {
  position: relative;
  background: #fff;
  border: 1px solid #eaeef4;
  border-radius: 16px;
  padding: 1.2rem 1.4rem;
  box-shadow: 0 6px 20px rgba(14, 28, 48, 0.05);
  transition: box-shadow 0.25s, transform 0.25s;
}
.gpy-comment-list .comment-body:hover {
  box-shadow: 0 12px 30px rgba(14, 28, 48, 0.09);
  transform: translateY(-2px);
}
.gpy-comment-list .comment-author {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.6rem;
}
.gpy-comment-list .comment-author .avatar {
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 2px 10px rgba(14, 28, 48, 0.12);
  width: 48px;
  height: 48px;
}
.gpy-comment-list .comment-author .fn {
  font-style: normal;
  font-weight: 800;
  color: var(--gpy-navy);
  font-size: 0.98rem;
}
.gpy-comment-list .comment-author .says { display: none; }
.gpy-comment-list .comment-meta {
  margin-inline-start: auto;
  font-size: 0.78rem;
  color: #93a0b4;
}
.gpy-comment-list .comment-meta a { color: #93a0b4; }
.gpy-comment-list .comment-meta a:hover { color: var(--gpy-orange); }
.gpy-comment-list .comment-content {
  color: #46506a;
  line-height: 2;
  font-size: 0.95rem;
}
.gpy-comment-list .comment-content p { margin: 0 0 0.6rem; }
.gpy-comment-list .reply { margin-top: 0.5rem; }
.gpy-comment-list .comment-reply-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gpy-orange-dark);
  background: #fff3ec;
  border: 1px solid #ffd9c4;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  transition: background 0.2s, color 0.2s;
}
.gpy-comment-list .comment-reply-link:hover {
  background: var(--gpy-orange);
  color: #fff;
  border-color: var(--gpy-orange);
}
.gpy-comment-list .bypostauthor > .comment-body {
  border-color: #ffd9c4;
  background: linear-gradient(180deg, #fff8f3, #fff);
}
.gpy-comments .comment-awaiting-moderation {
  display: inline-block;
  font-size: 0.78rem;
  color: var(--gpy-orange-dark);
  background: #fff3ec;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  margin-top: 0.4rem;
}

/* فرم ثبت دیدگاه */
.gpy-comments .comment-respond {
  background: linear-gradient(180deg, #f7f9fc, #fff);
  border: 1px solid #e7ecf3;
  border-radius: 20px;
  padding: clamp(1.4rem, 4vw, 2.2rem);
  box-shadow: 0 10px 30px rgba(14, 28, 48, 0.05);
}
.gpy-comments .comment-reply-title {
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--gpy-navy);
  margin: 0 0 0.4rem;
}
.gpy-comments .comment-reply-title small { font-weight: 600; }
.gpy-comments .comment-reply-title small a { color: var(--gpy-orange-dark); }
.gpy-comments .comment-notes,
.gpy-comments .logged-in-as {
  font-size: 0.85rem;
  color: #7a8699;
  margin: 0 0 1.2rem;
}
.gpy-comments .comment-form { display: grid; gap: 1rem; }
.gpy-comments .comment-form-author,
.gpy-comments .comment-form-email,
.gpy-comments .comment-form-url { margin: 0; }
@media (min-width: 720px) {
  .gpy-comments .comment-form {
    grid-template-columns: 1fr 1fr;
  }
  .gpy-comments .comment-form-comment,
  .gpy-comments .comment-form-cookies-consent,
  .gpy-comments .form-submit { grid-column: 1 / -1; }
}
.gpy-comments .comment-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gpy-navy);
  margin-bottom: 0.4rem;
}
.gpy-comments .comment-form label .required { color: var(--gpy-orange); }
.gpy-comments .comment-form input[type="text"],
.gpy-comments .comment-form input[type="email"],
.gpy-comments .comment-form input[type="url"],
.gpy-comments .comment-form textarea {
  width: 100%;
  font-family: var(--gpy-font);
  font-size: 0.95rem;
  color: var(--gpy-ink);
  background: #fff;
  border: 1.5px solid #dfe5ee;
  border-radius: 12px;
  padding: 0.75rem 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.gpy-comments .comment-form textarea { min-height: 140px; resize: vertical; line-height: 1.9; }
.gpy-comments .comment-form input:focus,
.gpy-comments .comment-form textarea:focus {
  outline: none;
  border-color: var(--gpy-orange);
  box-shadow: 0 0 0 3px rgba(255, 107, 44, 0.15);
}
.gpy-comments .comment-form-cookies-consent {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.83rem;
  color: #7a8699;
}
.gpy-comments .comment-form-cookies-consent input { width: auto; }
.gpy-comments .form-submit { margin: 0; }
.gpy-comments .form-submit .submit,
.gpy-comments .form-submit input[type="submit"] {
  font-family: var(--gpy-font);
  font-weight: 800;
  font-size: 0.95rem;
  color: #fff;
  background: linear-gradient(135deg, var(--gpy-orange), var(--gpy-orange-dark));
  border: none;
  border-radius: 999px;
  padding: 0.85rem 2.4rem;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(255, 107, 44, 0.3);
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
}
.gpy-comments .form-submit .submit:hover,
.gpy-comments .form-submit input[type="submit"]:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow: 0 14px 30px rgba(255, 107, 44, 0.4);
}
.gpy-comments .comment-pagination,
.gpy-comments .comments-pagination { margin: 0 0 2.2rem; }

.gpy-entry-title { font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 900; margin: 0 0 1rem; }
.gpy-entry-content { line-height: 2; }
.gpy-entry-content > * + * { margin-top: 1.1rem; }
.gpy-entry-content h2 { font-size: 1.5rem; margin-top: 2rem; }
.gpy-entry-content h3 { font-size: 1.2rem; margin-top: 1.6rem; }
.gpy-entry-content img { border-radius: 14px; }
.gpy-entry-content blockquote {
  border-right: 4px solid var(--gpy-orange);
  background: #f6f8fc;
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-radius: 0 12px 12px 0;
}

.gpy-post-meta { font-size: 0.85rem; color: #7a8699; margin-bottom: 1rem; }
.gpy-post-thumb { border-radius: 18px; overflow: hidden; margin-bottom: 1.5rem; }

/* کارت‌های آرشیو */
.gpy-posts-grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .gpy-posts-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .gpy-posts-grid { grid-template-columns: 1fr 1fr 1fr; } }
.gpy-card {
  background: #fff;
  border: 1px solid #eceff4;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(14, 28, 48, 0.06);
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
}
.gpy-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(14, 28, 48, 0.12); }
.gpy-card-thumb { aspect-ratio: 16/9; overflow: hidden; background: #f0f4fa; }
.gpy-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gpy-card-body { padding: 1.1rem 1.25rem 1.4rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.gpy-card-body h3 { font-size: 1.05rem; margin: 0; }
.gpy-card-body p { font-size: 0.88rem; color: #6b7689; margin: 0; flex: 1; }
.gpy-card-more { font-size: 0.82rem; font-weight: 700; color: var(--gpy-orange-dark); }

/* ناوبری برگه‌بندی */
.gpy-pagination { margin-top: 2.5rem; }
.gpy-pagination .page-numbers {
  display: inline-block;
  padding: 0.5rem 0.85rem;
  margin: 0 0.15rem;
  border-radius: 10px;
  background: #f0f4fa;
  color: var(--gpy-navy);
  font-weight: 600;
}
.gpy-pagination .page-numbers.current { background: var(--gpy-orange); color: #fff; }

/* سایدبار/ابزارک */
.gpy-sidebar .widget {
  background: #fff;
  border: 1px solid #eceff4;
  border-radius: 16px;
  padding: 1.25rem 1.4rem;
  margin-bottom: 1.5rem;
}
.gpy-sidebar .widget-title { font-size: 1rem; margin: 0 0 0.85rem; padding-bottom: 0.6rem; border-bottom: 2px solid #f0f4fa; }
.gpy-sidebar ul { list-style: none; margin: 0; padding: 0; }
.gpy-sidebar li { padding: 0.4rem 0; border-bottom: 1px solid #f4f6fa; }

/* فرم جست‌وجو */
.gpy-search-form { display: flex; gap: 0.5rem; }
.gpy-search-form input[type="search"] {
  flex: 1;
  padding: 0.65rem 0.9rem;
  border: 1px solid #d9dfe8;
  border-radius: 10px;
  font-family: inherit;
}
.gpy-search-form button {
  padding: 0.65rem 1.1rem;
  border: none;
  border-radius: 10px;
  background: var(--gpy-orange);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

/* ============================================================
   فوتر سایت
   ============================================================ */
.gpy-site-footer {
  background: linear-gradient(180deg, #0e1c30, #0a1525);
  color: var(--gpy-cream);
  margin-top: 0;
}
.gpy-footer-widgets {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(2.5rem, 5vw, 4rem) clamp(1rem, 4vw, 2rem) 2rem;
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .gpy-footer-widgets { grid-template-columns: 1fr 1fr; }
  .gpy-footer-col--enamad { grid-column: 1 / -1; justify-self: center; }
}
@media (min-width: 1020px) {
  .gpy-footer-widgets { grid-template-columns: 1.25fr 1fr 1fr 1fr minmax(140px, 160px); }
  .gpy-footer-col--enamad { grid-column: auto; justify-self: center; align-self: start; }
}
.gpy-footer-widgets .widget-title { color: #fff; font-size: 1rem; margin: 0 0 1rem; }
/* ستون اینماد */
.gpy-footer-col--enamad { text-align: center; }
.gpy-enamad-title { text-align: center; margin-bottom: 0.85rem !important; }
.gpy-enamad-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}
.gpy-enamad-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.gpy-enamad-link:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 107, 44, 0.55);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 107, 44, 0.2);
}
.gpy-enamad-img {
  display: block;
  width: 110px;
  height: auto;
  max-width: 100%;
  cursor: pointer;
  border-radius: 8px;
}
.gpy-footer-widgets a { color: rgba(240,244,250,0.78); }
.gpy-footer-widgets a:hover { color: var(--gpy-orange-glow); }
.gpy-footer-widgets ul { list-style: none; margin: 0; padding: 0; }
.gpy-footer-widgets li { padding: 0.35rem 0; }
.gpy-footer-about p { color: rgba(240,244,250,0.7); font-size: 0.9rem; line-height: 1.9; }
.gpy-footer-brand { font-size: 1.4rem; font-weight: 900; color: #fff; margin-bottom: 0.75rem; }
.gpy-footer-brand span { color: var(--gpy-orange); }

.gpy-footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  text-align: center;
  padding: 1.25rem 1rem;
  font-size: 0.82rem;
  color: rgba(240,244,250,0.55);
}
.gpy-footer-bottom a { color: var(--gpy-orange-glow); }

/* ============================================================
   فونت پیش‌فرض بلوک‌های گوتنبرگ و المنتور
   ============================================================ */
.editor-styles-wrapper,
.wp-block,
.elementor,
.elementor-widget-container,
.elementor-widget-text-editor .elementor-text-editor,
.elementor-widget-text-editor .elementor-text-editor p,
.elementor-widget-text-editor .elementor-text-editor li,
.elementor-widget-text-editor .elementor-text-editor span,
.elementor-widget-text-editor .elementor-text-editor a,
.elementor-widget-heading .elementor-heading-title,
.elementor button,
.elementor input,
.elementor textarea,
.elementor select {
  font-family: var(--gpy-font);
}

/* دکمه بازگشت به بالا */
.gpy-to-top {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: var(--gpy-orange);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.3s, transform 0.3s;
  z-index: 9500;
  box-shadow: 0 10px 26px rgba(255, 107, 44, 0.4);
}
.gpy-to-top.gpy-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
