/*
Theme Name: Trans Reza
Theme URI: https://transereza.ir
Author: Trans Reza
Author URI: https://transereza.ir
Description: پوسته رسمی ترانس رضا — طراحی و ساخت ترانسفورماتورهای صنعتی و سفارشی. تک‌صفحه‌ای، فارسی و راست‌چین با تم مشکی–سبز یشمی.
Version: 1.0
Requires at least: 6.0
Tested up to: 6.6
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: transreza
Tags: right-to-left, custom-colors, one-column
*/

:root {
  --bg: oklch(0.16 0.006 250);
  --fg: oklch(0.96 0.004 250);
  --card: oklch(0.21 0.008 250);
  --primary: oklch(0.52 0.09 168);
  --primary-fg: oklch(0.98 0.005 168);
  --secondary: oklch(0.26 0.009 250);
  --accent: oklch(0.62 0.1 168);
  --muted: oklch(0.72 0.012 250);
  --line: rgb(255 255 255 / 12%);
  --line-strong: rgb(255 255 255 / 16%);
  --panel-shadow: 0 24px 60px -30px rgb(0 0 0 / 0.8);
  --container: 1152px;
  --radius: 3px;
}

* { box-sizing: border-box; }

html {
  font-family: "Vazirmatn", system-ui, sans-serif;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.7;
}

img { display: block; max-width: 100%; }

h1, h2, h3 { letter-spacing: -0.01em; line-height: 1.25; margin: 0; }

p { margin: 0; }

a { color: inherit; }

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

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  border-radius: var(--radius);
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color .2s, color .2s;
}

.btn-sm { padding: 8px 16px; }

.btn-primary {
  background: var(--primary);
  color: var(--primary-fg);
  border: 1px solid transparent;
}

.btn-primary:hover { background: var(--accent); color: var(--bg); }

.btn-outline {
  border: 1px solid var(--line);
  color: var(--fg);
  background: transparent;
}

.btn-outline:hover { background: var(--secondary); }

/* ---------- Panels ---------- */

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--panel-shadow);
  border-radius: var(--radius);
}

/* ---------- Sections ---------- */

.section { padding-block: 80px; }

.section-alt {
  border-block: 1px solid var(--line);
  background: color-mix(in oklab, var(--card) 30%, transparent);
}

.section-title {
  font-size: 24px;
  font-weight: 700;
}

.rule-line::before {
  content: "";
  display: block;
  width: 48px;
  height: 2px;
  background: var(--primary);
  margin-bottom: 16px;
}

.lead {
  max-width: 672px;
  margin-top: 12px;
  font-size: 14px;
  line-height: 2;
  color: var(--muted);
}

.body-text {
  font-size: 14px;
  line-height: 2;
  color: var(--muted);
}

.body-text + .body-text { margin-top: 16px; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: color-mix(in oklab, var(--bg) 85%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.header-inner {
  max-width: var(--container);
  margin-inline: auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand img {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  object-fit: cover;
}

.brand-name {
  display: block;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .02em;
}

.brand-sub {
  display: block;
  font-size: 11px;
  color: var(--muted);
}

.main-nav {
  display: none;
  align-items: center;
  gap: 24px;
}

.main-nav a:not(.btn) {
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  transition: color .2s;
}

.main-nav a:not(.btn):hover { color: var(--fg); }

.menu-btn {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: transparent;
  color: var(--fg);
  padding: 8px 14px;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
}

#mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  padding: 12px 20px;
  gap: 4px;
}

#mobile-nav.open { display: grid; }

#mobile-nav a {
  padding: 8px;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  border-radius: var(--radius);
}

#mobile-nav a:hover { background: var(--secondary); color: var(--fg); }

/* ---------- Hero ---------- */

.hero { position: relative; }

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: relative;
  background: linear-gradient(
    180deg,
    color-mix(in oklab, oklch(0.12 0.006 250) 92%, transparent),
    color-mix(in oklab, oklch(0.12 0.006 250) 55%, transparent)
  );
}

.hero-inner { padding-block: 96px; }

.hero-eyebrow {
  font-size: 60px;
  font-weight: 600;
  color: var(--accent);
  text-align: center;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.hero h1 {
  margin-top: 12px;
  font-size: 30px;
  font-weight: 800;
}

.hero .lead {
  font-size: 16px;
  margin-top: 20px;
}

.hero-actions {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-inner > * {
  max-width: 672px;
}

.hero h1 {
  margin-top: 12px;
  font-size: 30px;
  font-weight: 800;
}

.hero .lead { font-size: 16px; margin-top: 20px; }

.hero-actions {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-inner > * { max-width: 672px; }

/* ---------- Stats ---------- */

.stats {
  border-block: 1px solid var(--line);
  background: color-mix(in oklab, var(--card) 40%, transparent);
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.stat {
  padding-block: 32px;
  text-align: center;
}

.stat-value {
  font-size: 30px;
  font-weight: 800;
  color: var(--accent);
}

.stat-label {
  margin-top: 8px;
  font-size: 14px;
  color: var(--muted);
}

/* ---------- Grids ---------- */

.grid-3 {
  display: grid;
  gap: 24px;
  margin-top: 40px;
}

.pillar { padding: 24px; }

.pillar h3 { font-size: 18px; font-weight: 700; }

.pillar p {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.9;
  color: var(--muted);
}

/* ---------- Products ---------- */

.prod-grid {
  display: grid;
  gap: 24px;
  margin-top: 40px;
}

.prod { overflow: hidden; }

.prod img {
  height: 224px;
  width: 100%;
  object-fit: cover;
}

.prod-body { padding: 20px; }

.prod-body h3 { font-size: 16px; font-weight: 700; }

.prod-body p {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.9;
  color: var(--muted);
}

.prod-use {
  margin-top: 12px;
  font-size: 12px;
  color: var(--accent);
}

/* ---------- Process ---------- */

.process-grid {
  display: grid;
  gap: 32px;
  margin-top: 40px;
  align-items: start;
}

.steps {
  display: grid;
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.step {
  display: flex;
  gap: 16px;
  padding: 20px;
}

.step-n {
  font-size: 18px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1.4;
}

.step h3 { font-size: 16px; font-weight: 700; }

.step p {
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.9;
  color: var(--muted);
}

.process-imgs {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr 1fr;
}

.process-imgs img {
  width: 100%;
  border-radius: var(--radius);
  object-fit: cover;
}

.pi-wide { grid-column: span 2; height: 256px; }

.pi { height: 192px; }

/* ---------- Two-column rows ---------- */

.two {
  display: grid;
  gap: 40px;
  align-items: center;
}

.two > img,
.two .two-img {
  height: 320px;
  width: 100%;
  object-fit: cover;
  border-radius: var(--radius);
}

/* ---------- Contact ---------- */

.contact-grid {
  display: grid;
  gap: 40px;
  margin-top: 8px;
}

.info-list {
  margin: 32px 0 0;
  display: grid;
  gap: 16px;
}

.info-card { padding: 16px; }

.info-card dt {
  font-size: 14px;
  color: var(--muted);
}

.info-card dd {
  margin: 4px 0 0;
  font-size: 15px;
  font-weight: 700;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  background: color-mix(in oklab, var(--card) 40%, transparent);
}

.footer-inner {
  max-width: var(--container);
  margin-inline: auto;
  padding: 32px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-size: 14px;
  color: var(--muted);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-brand img {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  object-fit: cover;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

.footer-links a:hover { color: var(--fg); }

/* ---------- Responsive ---------- */

@media (min-width: 640px) {
  .prod-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 768px) {
  .section-title { font-size: 30px; }
  .hero-inner { padding-block: 128px; }
  .hero h1 { font-size: 48px; }
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .menu-btn { display: none; }
  .main-nav { display: flex; }
  .footer-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

@media (min-width: 1024px) {
  .prod-grid { grid-template-columns: repeat(3, 1fr); }
  .process-grid { grid-template-columns: 1fr 1fr; }
  .process-imgs {
    position: sticky;
    top: 96px;
  }
  .two { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr 1fr; }
}


/* ---------- Image Lightbox ---------- */
.lightbox-img { cursor: zoom-in; transition: transform .25s ease, filter .25s ease; }
.lightbox-img:hover { transform: scale(1.03); }
.image-lightbox {
 position: fixed; inset:0; z-index:9999; background:rgba(0,0,0,.88);
 display:none; align-items:center; justify-content:center; padding:30px;
 direction:rtl;
}
.image-lightbox.active { display:flex; }
.lightbox-content { max-width:min(1000px,95vw); max-height:90vh; text-align:center; }
.lightbox-content img { max-width:100%; max-height:70vh; object-fit:contain; cursor:zoom-in; transform-origin:center; transition:transform .2s; }
.lightbox-content img.zoomed { transform:scale(2); cursor:zoom-out; }
.lightbox-caption { background:#111; padding:18px 24px; margin-top:15px; border-radius:12px; border:1px solid rgba(255,255,255,.12); }
.lightbox-caption h3 { margin:0 0 8px; color:#fff; }
.lightbox-caption p { margin:0; color:#bbb; }
.lightbox-close { position:absolute; top:20px; right:30px; background:none; border:0; color:#fff; font-size:42px; cursor:pointer; }
body.lightbox-open { overflow:hidden; }
