/* ============================================
   فرامرز بزرگی - Personal Brand Website
   Modern RTL Design with Vazir Font
   ============================================ */

@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css');

:root {
  --primary: #6B0F1A;
  --primary-dark: #4A0A12;
  --primary-light: #8B1A2A;
  --accent: #C9A227;
  --accent-light: #E8C547;
  --bg: #FAFAF8;
  --bg-alt: #F5F0EB;
  --bg-card: #FFFFFF;
  --text: #1A1A1A;
  --text-muted: #5A5A5A;
  --text-light: #8A8A8A;
  --border: #E8E4DF;
  --shadow: 0 4px 24px rgba(107, 15, 26, 0.08);
  --shadow-hover: 0 12px 40px rgba(107, 15, 26, 0.15);
  --radius: 16px;
  --radius-sm: 10px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --header-h: 80px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Vazirmatn', 'Vazir', Tahoma, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  direction: rtl;
  text-align: right;
  overflow-x: hidden;
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul, ol {
  list-style: none;
}

/* ========== HEADER ========== */
.header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: var(--transition);
}

.header.scrolled {
  box-shadow: var(--shadow);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.logo img {
  height: 90px;
  width: auto;
}

.logo-text {
  font-size: 0.02rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.5px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav a {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
}

.nav a:hover,
.nav a.active {
  color: var(--primary);
  background: rgba(107, 15, 26, 0.06);
}

.nav a.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  right: 16px;
  left: 16px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
}

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

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2.5px;
  background: var(--primary);
  border-radius: 2px;
  transition: var(--transition);
}

/* ========== HERO ========== */
.hero {
  margin-top: var(--header-h);
  padding: 80px 24px 60px;
  background: linear-gradient(135deg, #FAFAF8 0%, #F5F0EB 50%, #F0EBE5 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  left: -10%;
  width: 50%;
  height: 80%;
  background: radial-gradient(circle, rgba(107, 15, 26, 0.04) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.hero-content h1 {
  font-size: 2.75rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.35;
  margin-bottom: 16px;
}

.hero-content .tagline {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 28px;
  font-weight: 400;
}

.hero-content .lead {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 36px;
  max-width: 520px;
}

.hero-btns {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 16px rgba(107, 15, 26, 0.3);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(107, 15, 26, 0.35);
}

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

.btn-outline:hover {
  background: var(--primary);
  color: #fff;
}

.hero-image {
  position: relative;
}

.hero-image img {
  width: 100%;
  border-radius: 24px;
  box-shadow: var(--shadow-hover);
  object-fit: cover;
  max-height: 480px;
}

.hero-badge {
  position: absolute;
  bottom: -16px;
  right: 24px;
  background: var(--primary);
  color: #fff;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 8px 24px rgba(107, 15, 26, 0.3);
}

/* ========== SECTIONS ========== */
.section {
  padding: 80px 24px;
}

.section-alt {
  background: var(--bg-alt);
}

.container {
  max-width: 1280px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 12px;
  position: relative;
  display: inline-block;
}

.section-header h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--accent);
  margin: 10px auto 0;
  border-radius: 2px;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 16px auto 0;
}

/* ========== CARDS ========== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

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

.card-img {
  height: 200px;
  overflow: hidden;
  background: var(--bg-alt);
}

.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.card:hover .card-img img {
  transform: scale(1.05);
}

.card-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-body h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.5;
}

.card-body p {
  color: var(--text-muted);
  font-size: 0.95rem;
  flex: 1;
  margin-bottom: 16px;
}

.card-link {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.card-link:hover {
  color: var(--primary-light);
  gap: 10px;
}

/* ========== BOOK FEATURE ========== */
.book-feature {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 48px;
  align-items: center;
  background: var(--bg-card);
  border-radius: 24px;
  padding: 48px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.book-cover {
  text-align: center;
}

.book-cover img {
  max-width: 280px;
  margin: 0 auto;
  border-radius: 8px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.2);
}

.book-info h3 {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 8px;
}

.book-info .subtitle {
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 20px;
  font-size: 1.1rem;
}

.book-info p {
  color: var(--text-muted);
  margin-bottom: 16px;
}

.book-highlights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 24px 0;
}

.book-highlights li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  color: var(--text);
}

.book-highlights li::before {
  content: '✦';
  color: var(--accent);
  font-size: 0.8rem;
}

/* ========== ABOUT PAGE ========== */
.page-hero {
  margin-top: var(--header-h);
  padding: 60px 24px 40px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  text-align: center;
}

.page-hero h1 {
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.page-hero p {
  opacity: 0.9;
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

.about-content {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
  align-items: start;
}

.about-img {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-hover);
  position: sticky;
  top: 100px;
}

.about-img img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.about-text h2 {
  font-size: 1.5rem;
  color: var(--primary);
  margin-bottom: 16px;
  font-weight: 700;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 20px;
}

.activity-list {
  margin: 24px 0;
}

.activity-list h3 {
  font-size: 1.15rem;
  color: var(--primary);
  margin-bottom: 12px;
  font-weight: 700;
}

.activity-list ul {
  display: grid;
  gap: 8px;
}

.activity-list li {
  padding: 10px 16px;
  background: var(--bg-alt);
  border-radius: 8px;
  border-right: 3px solid var(--primary);
  font-size: 0.95rem;
  color: var(--text);
}

/* ========== CONTACT ========== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 20px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.contact-icon {
  width: 48px;
  height: 48px;
  background: rgba(107, 15, 26, 0.08);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.4rem;
}

.contact-item h4 {
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text);
}

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

.contact-item a:hover {
  color: var(--primary);
}

.contact-form {
  background: var(--bg-card);
  padding: 36px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.contact-form h3 {
  font-size: 1.35rem;
  color: var(--primary);
  margin-bottom: 24px;
  font-weight: 700;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.9rem;
  color: var(--text);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 1rem;
  background: var(--bg);
  color: var(--text);
  transition: var(--transition);
  direction: rtl;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(107, 15, 26, 0.1);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

/* ========== SOCIAL ========== */
.social-intro {
  max-width: 800px;
  margin: 0 auto 48px;
  text-align: center;
  color: var(--text-muted);
  font-size: 1.1rem;
}

.social-cards {
  display: grid;
  gap: 28px;
}

.social-card {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 28px;
  align-items: center;
  background: var(--bg-card);
  padding: 32px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.social-card:hover {
  box-shadow: var(--shadow-hover);
}

.social-icon {
  width: 100px;
  height: 100px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: #fff;
}

.social-card h3 {
  font-size: 1.25rem;
  color: var(--primary);
  margin-bottom: 10px;
  font-weight: 700;
}

.social-card p {
  color: var(--text-muted);
  font-size: 0.98rem;
}

/* ========== ARTICLES ========== */
.article-page {
  max-width: 800px;
  margin: 0 auto;
}

.article-page h1 {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 12px;
  font-weight: 800;
  line-height: 1.4;
}

.article-meta {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.article-body {
  font-size: 1.05rem;
  color: var(--text);
  line-height: 2;
}

.article-body p {
  margin-bottom: 20px;
}

.article-body h2, .article-body h3 {
  color: var(--primary);
  margin: 32px 0 16px;
  font-weight: 700;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 24px;
}

.back-link:hover {
  gap: 12px;
}

/* ========== FOOTER ========== */
.footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.85);
  padding: 60px 24px 30px;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand h3 {
  color: #fff;
  font-size: 1.35rem;
  margin-bottom: 12px;
  font-weight: 700;
}

.footer-brand p {
  font-size: 0.95rem;
  line-height: 1.7;
  opacity: 0.8;
}

.footer h4 {
  color: #fff;
  font-size: 1.05rem;
  margin-bottom: 16px;
  font-weight: 700;
}

.footer ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer a {
  opacity: 0.8;
  font-size: 0.95rem;
}

.footer a:hover {
  opacity: 1;
  color: var(--accent-light);
}

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.15);
  text-align: center;
  font-size: 0.9rem;
  opacity: 0.7;
}

/* ========== STATS ========== */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.stat-item {
  text-align: center;
  padding: 28px 16px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.stat-num {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-top: 6px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-content .lead {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-btns {
    justify-content: center;
  }
  .hero-image {
    max-width: 480px;
    margin: 0 auto;
  }
  .book-feature {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 32px;
  }
  .book-highlights {
    grid-template-columns: 1fr;
    text-align: right;
  }
  .about-content {
    grid-template-columns: 1fr;
  }
  .about-img {
    position: static;
    max-width: 400px;
    margin: 0 auto;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .social-card {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .social-icon {
    margin: 0 auto;
  }
  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }
  .nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    right: 0;
    left: 0;
    background: #fff;
    flex-direction: column;
    padding: 16px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }
  .nav.open {
    display: flex;
  }
  .nav a {
    width: 100%;
    text-align: center;
    padding: 12px;
  }
  .hero-content h1 {
    font-size: 1.9rem;
  }
  .section {
    padding: 50px 16px;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
  }
  .page-hero h1 {
    font-size: 1.75rem;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 40px 16px 30px;
  }
  .hero-content h1 {
    font-size: 1.6rem;
  }
  .stats {
    grid-template-columns: 1fr;
  }
  .cards-grid {
    grid-template-columns: 1fr;
  }
}

/* ========== ANIMATIONS ========== */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate {
  animation: fadeUp 0.6s ease forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* Extra responsive fixes */
@media (max-width: 768px) {
  .book-feature + div {
    grid-template-columns: 1fr !important;
  }
  .book-highlights {
    grid-template-columns: 1fr !important;
  }
}
