/* ===============================================================
   Ayoub Esmaeili — Persian (RTL) Website Stylesheet
   Font: Vazirmatn via Google Fonts
   =============================================================== */

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

/* ── Reset & Base ────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-primary:   #1a6b6b;
  --color-primary-dark: #134f4f;
  --color-accent:    #e8a830;
  --color-bg:        #f7f6f4;
  --color-surface:   #ffffff;
  --color-text:      #2c2c2c;
  --color-muted:     #6b7280;
  --color-border:    #e5e7eb;
  --radius:          10px;
  --shadow:          0 2px 16px rgba(0,0,0,0.08);
  --shadow-card:     0 4px 24px rgba(0,0,0,0.10);
  --max-width:       1100px;
  --font:            'Vazirmatn', Tahoma, sans-serif;
}

html {
  direction: rtl;
  lang: fa;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.8;
  color: var(--color-text);
  background: var(--color-bg);
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover { color: var(--color-primary-dark); }

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

ul { list-style: none; }

/* ── Layout ──────────────────────────────────────────────────── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

section { padding: 5rem 0; }

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  display: block;
  width: 50px;
  height: 3px;
  background: var(--color-accent);
  margin-top: 8px;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header .section-title::after {
  margin: 8px auto 0;
}

/* ── Header / Nav ────────────────────────────────────────────── */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.site-logo {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-primary);
  white-space: nowrap;
}

.site-logo span {
  color: var(--color-accent);
}

.site-nav ul {
  display: flex;
  gap: 0.25rem;
}

.site-nav a {
  display: block;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  color: var(--color-text);
  transition: background 0.2s, color 0.2s;
}

.site-nav a:hover,
.site-nav a.active {
  background: var(--color-primary);
  color: #fff;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ── Hero ────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: #fff;
  padding: 5rem 0;
  overflow: hidden;
}

.hero-inner {
  display: flex;
  align-items: center;
  gap: 3rem;
}

.hero-text { flex: 1; }

.hero-greeting {
  font-size: 1rem;
  letter-spacing: 0.05em;
  opacity: 0.85;
  margin-bottom: 0.5rem;
}

.hero-title {
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1.25rem;
}

.hero-subtitle {
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 520px;
  line-height: 1.9;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1.6rem;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--color-accent);
  color: #1a1a1a;
}

.btn-primary:hover {
  background: #d4941f;
  color: #1a1a1a;
}

.btn-outline {
  background: transparent;
  border-color: rgba(255,255,255,0.7);
  color: #fff;
}

.btn-outline:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

.hero-image {
  flex-shrink: 0;
  width: 300px;
  height: 300px;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  border-radius: 50%;
  border: 5px solid rgba(255,255,255,0.25);
}

/* ── Stats Bar ───────────────────────────────────────────────── */
.stats-bar {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 2rem 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  text-align: center;
}

.stat-item {
  padding: 0.75rem;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-primary);
  display: block;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--color-muted);
  margin-top: 0.25rem;
}

/* ── Cards ───────────────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.75rem;
}

.card {
  background: var(--color-surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.25s, box-shadow 0.25s;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}

.card-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.card-placeholder {
  width: 100%;
  height: 220px;
  background: linear-gradient(135deg, #e0efef 0%, #c5dede 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--color-primary);
}

.card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-date {
  font-size: 0.8rem;
  color: var(--color-muted);
  margin-bottom: 0.5rem;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.card-excerpt {
  font-size: 0.9rem;
  color: var(--color-muted);
  line-height: 1.8;
  flex: 1;
}

.card-link {
  display: inline-block;
  margin-top: 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-primary);
}

.card-link::before {
  content: '← ';
}

.coming-soon-badge {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  background: #f3f4f6;
  color: var(--color-muted);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: auto;
}

/* ── Courses (Home section) ──────────────────────────────────── */
.courses-section { background: var(--color-bg); }
.workshops-section { background: var(--color-surface); }

/* ── View All Link ───────────────────────────────────────────── */
.view-all {
  text-align: center;
  margin-top: 2.5rem;
}

/* ── Page Hero (inner pages) ─────────────────────────────────── */
.page-hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: #fff;
  padding: 3.5rem 0;
  text-align: center;
}

.page-hero h1 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.page-hero p {
  opacity: 0.9;
  font-size: 1.05rem;
}

.breadcrumb {
  font-size: 0.85rem;
  opacity: 0.75;
  margin-top: 0.75rem;
}

.breadcrumb a { color: rgba(255,255,255,0.85); }
.breadcrumb a:hover { color: #fff; }

/* ── About Page ──────────────────────────────────────────────── */
.about-section { background: var(--color-surface); }

.about-inner {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
  align-items: start;
}

.about-portrait {
  position: sticky;
  top: 90px;
}

.about-portrait img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.about-content h2 {
  font-size: 1.5rem;
  color: var(--color-primary);
  margin: 2rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-border);
}

.about-content h2:first-child { margin-top: 0; }

.about-content p {
  margin-bottom: 1rem;
  line-height: 2;
  color: var(--color-text);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.tag {
  background: #e0efef;
  color: var(--color-primary);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}

/* ── Contact Page ────────────────────────────────────────────── */
.contact-section { background: var(--color-surface); }

.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contact-info h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 2rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 2rem;
}

.contact-icon {
  width: 48px;
  height: 48px;
  background: #e0efef;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  color: var(--color-primary);
}

.contact-detail h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.25rem;
}

.contact-detail p, .contact-detail a {
  color: var(--color-text);
  font-size: 0.95rem;
}

.contact-photo img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.contact-note {
  text-align: center;
  padding: 3rem 0;
  font-size: 1.15rem;
  color: var(--color-muted);
  background: var(--color-bg);
}

/* ── Consulting Page ─────────────────────────────────────────── */
.consulting-section { background: var(--color-surface); }

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.75rem;
  margin-top: 1rem;
}

.service-card {
  background: var(--color-bg);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  border: 1px solid var(--color-border);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.service-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow);
}

.service-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.service-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
}

.service-card p {
  font-size: 0.9rem;
  color: var(--color-muted);
  line-height: 1.9;
}

.consulting-cta {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: #fff;
  text-align: center;
  padding: 4rem 0;
}

.consulting-cta h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.consulting-cta p {
  font-size: 1.05rem;
  opacity: 0.9;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.btn-white {
  background: #fff;
  color: var(--color-primary);
  border-color: #fff;
}

.btn-white:hover {
  background: #f0fafa;
  color: var(--color-primary);
}

/* ── Gallery ─────────────────────────────────────────────────── */
.gallery-section { background: var(--color-surface); }

.gallery-grid {
  columns: 3;
  gap: 1rem;
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: 1rem;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  position: relative;
}

.gallery-item img {
  width: 100%;
  display: block;
  transition: transform 0.3s;
}

.gallery-item:hover img { transform: scale(1.03); }

.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: rgba(26, 107, 107, 0.5);
  opacity: 0;
  transition: opacity 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #fff;
}

.gallery-item:hover .gallery-item-overlay { opacity: 1; }

/* ── Course Post ─────────────────────────────────────────────── */
.post-section { background: var(--color-surface); }

.post-inner {
  max-width: 800px;
  margin: 0 auto;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.post-tag {
  background: #e0efef;
  color: var(--color-primary);
  padding: 0.3rem 0.9rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.post-date {
  font-size: 0.85rem;
  color: var(--color-muted);
}

.post-image {
  width: 100%;
  border-radius: var(--radius);
  margin-bottom: 2.5rem;
  max-height: 450px;
  object-fit: cover;
}

.post-content h2 {
  font-size: 1.4rem;
  color: var(--color-primary);
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-border);
}

.post-content p {
  margin-bottom: 1.25rem;
  line-height: 2;
}

.post-content ul {
  padding-right: 1.5rem;
  margin-bottom: 1.25rem;
  list-style: disc;
}

.post-content ul li {
  margin-bottom: 0.5rem;
  line-height: 1.9;
}

/* ── Courses List ────────────────────────────────────────────── */
.courses-list-section { background: var(--color-surface); }

/* ── Footer ──────────────────────────────────────────────────── */
.site-footer {
  background: #1a2a2a;
  color: rgba(255,255,255,0.8);
  padding: 3rem 0 1.5rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2.5rem;
}

.footer-brand .site-logo {
  color: #fff;
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
  display: block;
}

.footer-brand p {
  font-size: 0.875rem;
  line-height: 1.8;
  color: rgba(255,255,255,0.65);
  max-width: 300px;
}

.footer-col h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1rem;
}

.footer-col ul li {
  margin-bottom: 0.5rem;
}

.footer-col ul a {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.65);
  transition: color 0.2s;
}

.footer-col ul a:hover { color: var(--color-accent); }

.footer-col address {
  font-style: normal;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.65);
  line-height: 2;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.45);
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero-inner { flex-direction: column-reverse; text-align: center; }
  .hero-image { width: 220px; height: 220px; }
  .hero-subtitle { margin: 0 auto 2rem; }
  .hero-actions { justify-content: center; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); }

  .about-inner { grid-template-columns: 1fr; }
  .about-portrait { position: static; }
  .about-portrait img { max-width: 320px; margin: 0 auto; }

  .contact-inner { grid-template-columns: 1fr; }

  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }

  .gallery-grid { columns: 2; }
}

@media (max-width: 640px) {
  .nav-toggle { display: flex; }

  .site-nav {
    position: fixed;
    top: 70px;
    right: 0;
    left: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: 1rem;
    transform: translateY(-120%);
    opacity: 0;
    transition: transform 0.3s, opacity 0.3s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  }

  .site-nav.open {
    transform: translateY(0);
    opacity: 1;
  }

  .site-nav ul { flex-direction: column; gap: 0.25rem; }
  .site-nav a { padding: 0.6rem 1rem; }

  .hero { padding: 3.5rem 0; }
  .hero-title { font-size: 2rem; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }

  section { padding: 3.5rem 0; }

  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }

  .gallery-grid { columns: 1; }

  .card-grid { grid-template-columns: 1fr; }
}
