/*
Theme Name: Alborz Lawyer | علی دربندسری
Theme URI: https://example.com/alborz-lawyer
Author: Alborz Lawyer Team
Author URI: https://example.com
Description: قالب اختصاصی، پیشرفته و یک‌صفحه‌ای برای وکلای پایه یک دادگستری؛ طراحی لوکس مشکی-طلایی، راست‌چین کامل، ۱۲ بخش قابل مدیریت با امکان فعال/غیرفعال‌سازی و جابه‌جایی، پنل تنظیمات کامل در پیشخوان وردپرس، فرم تماس داخلی و کاملاً ریسپانسیو.
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: alborz-lawyer
Tags: one-column, custom-menu, custom-logo, featured-images, rtl-language-support, translation-ready
*/

/* =====================================================
   1) متغیرها و پایه
===================================================== */
:root {
  --bg: #0a0a0c;
  --bg-2: #101014;
  --bg-3: #15151b;
  --bg-4: #1b1b23;
  --line: rgba(201, 162, 39, 0.16);
  --line-2: rgba(255, 255, 255, 0.07);
  --gold: #c9a227;
  --gold-2: #e9c767;
  --gold-soft: rgba(201, 162, 39, 0.10);
  --text: #f0ede4;
  --muted: #a5a39b;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  --header-h: 84px;
  --container: 1200px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Vazirmatn', Tahoma, Arial, sans-serif;
  direction: rtl;
  text-align: right;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.9;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-2); text-decoration: none; transition: color 0.25s ease; }
a:hover { color: var(--gold); }
ul, ol { list-style: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
h1, h2, h3, h4, h5, h6 { font-weight: 800; line-height: 1.5; color: var(--text); }

::selection { background: var(--gold); color: #111; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: #2c2c36; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

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

.section { padding: 96px 0; position: relative; }
.section-alt { background: var(--bg-2); border-block: 1px solid var(--line-2); }

/* سرتیتر یکسان بخش‌ها */
.section-head { max-width: 720px; margin-bottom: 56px; text-align: center; margin-inline: auto; }
.section-head.right { text-align: right; margin-inline: 0; }
.section-kicker {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--gold); font-weight: 700; font-size: 14px; letter-spacing: 0.02em;
  background: var(--gold-soft); border: 1px solid var(--line);
  padding: 6px 16px; border-radius: 999px; margin-bottom: 18px;
}
.section-kicker::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.section-title { font-size: clamp(26px, 4vw, 40px); font-weight: 900; margin-bottom: 14px; }
.section-title .gold { color: var(--gold-2); }
.section-sub { color: var(--muted); font-size: 16.5px; }

/* =====================================================
   2) دکمه‌ها و کامپوننت‌های عمومی
===================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 32px; border-radius: 999px; font-weight: 700; font-size: 15.5px;
  border: 1px solid transparent; cursor: pointer; transition: all 0.3s ease; white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn-gold {
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  color: #151003; box-shadow: 0 10px 26px rgba(201, 162, 39, 0.28);
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(201, 162, 39, 0.4); color: #151003; }
.btn-line { border-color: rgba(201, 162, 39, 0.55); color: var(--gold-2); background: rgba(201, 162, 39, 0.05); }
.btn-line:hover { background: rgba(201, 162, 39, 0.14); color: var(--gold-2); transform: translateY(-2px); }
.btn-sm { padding: 10px 22px; font-size: 14px; }

.icon-badge {
  width: 56px; height: 56px; border-radius: 50%; display: inline-flex;
  align-items: center; justify-content: center; flex: none;
  background: var(--gold-soft); border: 1px solid var(--line); color: var(--gold-2);
  transition: all 0.3s ease;
}
.icon-badge svg { width: 24px; height: 24px; }

/* =====================================================
   3) نوار بالایی
===================================================== */
.topbar { background: #070708; border-bottom: 1px solid var(--line-2); font-size: 13.5px; color: var(--muted); position: relative; z-index: 60; }
.topbar .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 42px; flex-wrap: wrap; }
.topbar-note { display: flex; align-items: center; gap: 8px; }
.topbar-note svg { width: 15px; height: 15px; color: var(--gold); }
.topbar-info { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.topbar-info a, .topbar-info span { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); }
.topbar-info a:hover { color: var(--gold-2); }
.topbar-info svg { width: 15px; height: 15px; color: var(--gold); }
.topbar-social { display: flex; align-items: center; gap: 6px; }
.topbar-social a {
  width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  color: var(--muted); border: 1px solid var(--line-2);
}
.topbar-social a:hover { color: var(--gold); border-color: var(--line); }
.topbar-social svg { width: 14px; height: 14px; }

/* =====================================================
   4) هدر و منو
===================================================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 10, 12, 0.85);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-2);
  transition: box-shadow 0.3s ease, background 0.3s ease;
}
.site-header.scrolled { background: rgba(8, 8, 10, 0.96); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: var(--header-h); }

.brand { display: flex; align-items: center; gap: 12px; flex: none; }
.brand-img { height: 52px; width: auto; }
.brand-mark {
  width: 46px; height: 46px; border-radius: 12px; flex: none;
  background: linear-gradient(135deg, rgba(201, 162, 39, 0.2), rgba(201, 162, 39, 0.05));
  border: 1px solid var(--line); color: var(--gold-2);
  display: inline-flex; align-items: center; justify-content: center;
}
.brand-mark svg { width: 26px; height: 26px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.4; white-space: nowrap; }
.brand-name { font-weight: 900; font-size: 19px; color: var(--text); }
.brand-name .gold { color: var(--gold-2); }
.brand-tagline { font-size: 11.5px; color: var(--muted); }

.main-nav { flex: 1; display: flex; justify-content: center; min-width: 0; }
.main-nav ul { display: flex; align-items: center; gap: 2px; flex-wrap: nowrap; }
.main-nav a {
  display: block; padding: 10px 11px; color: var(--text); font-size: 14px; font-weight: 500;
  border-radius: 8px; position: relative; white-space: nowrap;
}
.main-nav a::after {
  content: ""; position: absolute; right: 11px; left: 11px; bottom: 4px; height: 2px;
  background: var(--gold); border-radius: 2px; transform: scaleX(0); transform-origin: right;
  transition: transform 0.3s ease;
}
.main-nav a:hover::after, .main-nav a.active::after { transform: scaleX(1); }
.main-nav a:hover, .main-nav a.active { color: var(--gold-2); }

.header-actions { display: flex; align-items: center; gap: 12px; }
.nav-toggle {
  display: none; width: 46px; height: 46px; border-radius: 12px;
  background: var(--gold-soft); border: 1px solid var(--line); cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav-toggle span { width: 20px; height: 2px; background: var(--gold-2); border-radius: 2px; transition: all 0.3s ease; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* منوی موبایل */
.mobile-nav {
  position: fixed; inset: 0; z-index: 100; visibility: hidden; pointer-events: none;
}
.mobile-nav.open { visibility: visible; pointer-events: auto; }
.mobile-nav-overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.65); opacity: 0; transition: opacity 0.3s ease; }
.mobile-nav.open .mobile-nav-overlay { opacity: 1; }
.mobile-nav-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(320px, 85vw);
  background: var(--bg-2); border-left: 1px solid var(--line);
  padding: 24px; transform: translateX(100%); transition: transform 0.35s ease;
  display: flex; flex-direction: column; gap: 8px; overflow-y: auto;
}
.mobile-nav.open .mobile-nav-panel { transform: translateX(0); }
.mobile-nav-panel .brand { margin-bottom: 16px; }
.mobile-nav-panel a.m-link {
  display: block; padding: 12px 14px; border-radius: 10px; color: var(--text); font-weight: 600;
  border: 1px solid transparent;
}
.mobile-nav-panel a.m-link:hover, .mobile-nav-panel a.m-link.active {
  background: var(--gold-soft); border-color: var(--line); color: var(--gold-2);
}
.mobile-nav-close {
  position: absolute; top: 18px; left: 18px; width: 38px; height: 38px; border-radius: 10px;
  background: var(--bg-3); border: 1px solid var(--line-2); color: var(--text); cursor: pointer; font-size: 18px;
}

/* =====================================================
   5) پیش‌بارگذار، دکمه شناور، بازگشت به بالا
===================================================== */
.preloader {
  position: fixed; inset: 0; z-index: 9999; background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.preloader.hidden { opacity: 0; visibility: hidden; }
.preloader .scale-icon { width: 64px; height: 64px; color: var(--gold); animation: pulse-scale 1.4s ease-in-out infinite; }
@keyframes pulse-scale { 0%, 100% { transform: scale(1); opacity: 0.85; } 50% { transform: scale(1.12); opacity: 1; } }

.float-btns { position: fixed; bottom: 24px; left: 24px; z-index: 90; display: flex; flex-direction: column; gap: 12px; }
.float-wa {
  width: 54px; height: 54px; border-radius: 50%; background: #1faa53; color: #fff;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 24px rgba(31, 170, 83, 0.4);
  transition: transform 0.3s ease;
}
.float-wa:hover { transform: scale(1.08); color: #fff; }
.float-wa svg { width: 27px; height: 27px; }
.back-top {
  width: 46px; height: 46px; border-radius: 50%; background: var(--bg-3); color: var(--gold-2);
  border: 1px solid var(--line); cursor: pointer; display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transform: translateY(14px); transition: all 0.35s ease;
}
.back-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-top:hover { background: var(--gold); color: #151003; }
.back-top svg { width: 20px; height: 20px; }

/* =====================================================
   6) انیمیشن‌های نمایش
===================================================== */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-d1 { transition-delay: 0.1s; }
.reveal-d2 { transition-delay: 0.2s; }
.reveal-d3 { transition-delay: 0.3s; }
.reveal-d4 { transition-delay: 0.4s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* =====================================================
   7) فوتر
===================================================== */
.site-footer { background: #070708; border-top: 1px solid var(--line); position: relative; overflow: hidden; }
.site-footer::before {
  content: ""; position: absolute; top: 0; right: 0; left: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; padding: 72px 0 48px; }
.footer-col h4 { font-size: 17px; margin-bottom: 20px; position: relative; padding-bottom: 12px; }
.footer-col h4::after { content: ""; position: absolute; bottom: 0; right: 0; width: 40px; height: 2px; background: var(--gold); border-radius: 2px; }
.footer-about { color: var(--muted); font-size: 14.5px; }
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: var(--muted); font-size: 14.5px; display: inline-flex; align-items: center; gap: 8px; transition: all 0.25s ease; }
.footer-links a::before { content: "›"; color: var(--gold); font-size: 16px; line-height: 1; }
.footer-links a:hover { color: var(--gold-2); transform: translateX(-4px); }
.footer-contact li { display: flex; gap: 12px; margin-bottom: 14px; color: var(--muted); font-size: 14.5px; align-items: flex-start; }
.footer-contact svg { width: 17px; height: 17px; color: var(--gold); flex: none; margin-top: 4px; }
.footer-social { display: flex; gap: 10px; margin-top: 20px; }
.footer-social a {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-2);
  display: inline-flex; align-items: center; justify-content: center; color: var(--muted);
}
.footer-social a:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-3px); }
.footer-social svg { width: 17px; height: 17px; }
.footer-bottom { border-top: 1px solid var(--line-2); padding: 20px 0; }
.footer-bottom .container { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 13.5px; }
.footer-bottom .gold { color: var(--gold-2); }

/* =====================================================
   8) صفحات داخلی (وبلاگ، برگه، ۴۰۴)
===================================================== */
.page-hero { background: var(--bg-2); border-bottom: 1px solid var(--line-2); padding: 64px 0 48px; text-align: center; }
.page-hero h1 { font-size: clamp(26px, 4vw, 38px); margin-bottom: 8px; }
.breadcrumbs { color: var(--muted); font-size: 14px; }
.breadcrumbs a { color: var(--gold-2); }

.posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.pagination { margin-top: 48px; display: flex; justify-content: center; gap: 8px; }
.pagination .page-numbers {
  min-width: 44px; height: 44px; padding-inline: 12px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-3); border: 1px solid var(--line-2); color: var(--text);
}
.pagination .page-numbers.current, .pagination .page-numbers:hover { background: var(--gold); color: #151003; border-color: var(--gold); }

.single-content { max-width: 820px; margin-inline: auto; }
.single-content .entry-thumb { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line-2); margin-bottom: 32px; }
.single-content h2, .single-content h3 { margin: 32px 0 14px; }
.single-content p { color: #cfcdbf; margin-bottom: 18px; }
.single-meta { display: flex; gap: 20px; color: var(--muted); font-size: 13.5px; margin-bottom: 24px; flex-wrap: wrap; }
.single-meta span { display: inline-flex; align-items: center; gap: 7px; }
.single-meta svg { width: 15px; height: 15px; color: var(--gold); }
.entry-tags { margin-top: 28px; display: flex; gap: 8px; flex-wrap: wrap; }
.entry-tags a { background: var(--bg-3); border: 1px solid var(--line-2); padding: 4px 14px; border-radius: 999px; font-size: 13px; color: var(--muted); }
.entry-tags a:hover { border-color: var(--gold); color: var(--gold-2); }

.comments-area { max-width: 820px; margin: 56px auto 0; border-top: 1px solid var(--line-2); padding-top: 40px; }
.comment-list .comment { background: var(--bg-3); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.comment-list .children { margin-right: 24px; margin-top: 16px; }
.comment-form input:not([type="submit"]):not([type="checkbox"]), .comment-form textarea {
  width: 100%; background: var(--bg-3); border: 1px solid var(--line-2); color: var(--text);
  border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 14px;
}
.comment-form input:focus, .comment-form textarea:focus { border-color: var(--gold); outline: none; }
.comment-form .submit { background: linear-gradient(135deg, var(--gold-2), var(--gold)); color: #151003; border: none; border-radius: 999px; padding: 12px 32px; font-weight: 700; cursor: pointer; }

.error-404 { text-align: center; padding: 120px 0; }
.error-404 .num { font-size: 120px; font-weight: 900; color: var(--gold); line-height: 1; }
.error-404 p { color: var(--muted); margin: 16px 0 28px; }

/* سوییچ ویرایش برای کاربران واردشده */
.edit-link a { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--gold-2); }
