/* ===== CSS Variables (Design Tokens) ===== */
:root {
  --primary: #8b7355;
  --accent: #2d5016;
  --surface: #faf7f2;
  --ink: #1a1410;
  --gold: #c8a24c;

  --color-primary-50: #f8f7f7;
  --color-primary-100: #f0ece6;
  --color-primary-200: #e5e1dc;
  --color-primary-500: #8b7355;
  --color-primary-700: #4d3f2e;
  --color-primary-800: #36291e;
  --color-primary-900: #2b2319;
  --color-primary-50: #f8f7f7;
  --color-primary-600: #6e5c42;
  --color-accent-500: #2d5016;
  --color-gold: #c8a24c;
  --color-surface: #faf7f2;

  --shadow-card: 0 4px 12px rgba(26,20,16,0.08);
  --shadow-lift: 0 12px 32px rgba(26,20,16,0.14);

  --ease-smooth-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast: 180ms;
  --dur-normal: 320ms;
  --dur-slow: 640ms;
}

/* ===== Global Reset ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--color-surface);
  font-family: 'Vazirmatn', system-ui, sans-serif;
  color: var(--ink);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

/* ===== Navbar ===== */
#navbar {
  background: transparent;
}

#navbar.scrolled {
  background: rgba(250, 247, 242, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(139, 115, 85, 0.12);
}

#navbar.scrolled .nav-link {
  color: var(--color-primary-700);
}

#navbar.scrolled .nav-link:hover {
  color: var(--color-primary-500);
}

.nav-link {
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-smooth);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  right: 0;
  width: 0;
  height: 2px;
  background: var(--color-gold);
  transition: width var(--dur-normal) var(--ease-smooth-out);
}

.nav-link:hover::after {
  width: 100%;
}

/* scrolled state for nav logo and text */
#navbar.scrolled .logo-text {
  color: var(--color-primary-800);
}

/* ===== Hero Slider ===== */
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.2s ease-in-out, transform 8s ease;
  transform: scale(1.05);
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1.0);
}

/* ===== Slide Dots ===== */
.slide-dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: rgba(255,255,255,0.4);
  border: none;
  cursor: pointer;
  transition: all var(--dur-normal) var(--ease-smooth-out);
  padding: 0;
}

.slide-dot.active {
  background: var(--color-gold);
  width: 24px;
}

/* ===== Hero Animations ===== */
.hero-badge {
  animation: fadeSlideUp 0.7s var(--ease-smooth-out) 0.3s both;
}

.hero-title {
  animation: fadeSlideUp 0.8s var(--ease-smooth-out) 0.5s both;
}

.hero-subtitle {
  animation: fadeSlideUp 0.8s var(--ease-smooth-out) 0.7s both;
}

.hero-ctas {
  animation: fadeSlideUp 0.8s var(--ease-smooth-out) 0.9s both;
}

@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(32px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Trust Band ===== */
.trust-item {
  animation: fadeIn 0.6s var(--ease-smooth-out) both;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Scroll Reveal ===== */
.reveal-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s var(--ease-smooth-out), transform 0.7s var(--ease-smooth-out);
}

.reveal-up.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Destination Cards ===== */
.destination-card {
  transition: transform var(--dur-normal) var(--ease-smooth-out);
}

.destination-card:hover {
  transform: translateY(-4px);
}

/* ===== Tour Filter ===== */
.tour-filter {
  padding: 0.5rem 1.25rem;
  border-radius: 9999px;
  border: 1.5px solid var(--color-primary-200);
  background: transparent;
  color: var(--color-primary-600);
  font-size: 0.875rem;
  font-family: 'Vazirmatn', sans-serif;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-smooth-out);
}

.tour-filter:hover {
  border-color: var(--color-primary-500);
  color: var(--color-primary-800);
  background: var(--color-primary-50);
}

.tour-filter.active {
  background: var(--color-primary-800);
  border-color: var(--color-primary-800);
  color: #fff;
}

/* ===== Tour Rows ===== */
.tour-row {
  transition: background var(--dur-fast) var(--ease-smooth);
}

.tour-row.hidden-tour {
  display: none;
}

/* ===== Form Styles ===== */
.form-input {
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--color-primary-200);
  border-radius: 0.75rem;
  background: var(--color-surface);
  font-family: 'Vazirmatn', sans-serif;
  font-size: 0.9rem;
  color: var(--color-primary-900);
  transition: border-color var(--dur-fast) var(--ease-smooth), box-shadow var(--dur-fast) var(--ease-smooth);
  outline: none;
  direction: rtl;
}

.form-input:focus {
  border-color: var(--color-primary-500);
  box-shadow: 0 0 0 3px rgba(139, 115, 85, 0.12);
}

.form-input.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.field-error {
  display: block;
  margin-top: 0.25rem;
}

/* ===== Testimonial Cards ===== */
.testimonial-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 1rem;
  padding: 1.75rem;
  transition: transform var(--dur-normal) var(--ease-smooth-out), background var(--dur-normal) var(--ease-smooth);
}

.testimonial-card:hover {
  background: rgba(255,255,255,0.1);
  transform: translateY(-4px);
}

/* ===== Social Icons ===== */
.social-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.7);
  transition: all var(--dur-fast) var(--ease-smooth-out);
}

.social-icon:hover {
  background: var(--color-primary-500);
  color: #fff;
  transform: translateY(-2px);
}

/* ===== Footer Links ===== */
.footer-link {
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-smooth);
}

.footer-link:hover {
  color: var(--color-gold);
}

/* ===== Persian Numerals ===== */
/* اطمینان از نمایش ارقام فارسی در Vazirmatn با ss01 */
.trust-item .text-3xl,
.tour-row td .font-extrabold,
.form-input option {
  font-feature-settings: 'ss01';
}

/* ===== Counter Animation ===== */
@keyframes countUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== CTA Buttons ===== */
.cta-primary, .cta-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
}

/* ===== Dest Explore Btn ===== */
.dest-explore-btn {
  text-decoration: none;
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
  .hero-badge, .hero-title, .hero-subtitle, .hero-ctas {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .reveal-up {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .hero-slide {
    transition: opacity 0.3s ease;
  }
}

/* ===== Mobile ===== */
@media (max-width: 767px) {
  .hero-section h1 {
    font-size: clamp(2rem, 8vw, 3rem);
  }
  .destinations-grid {
    grid-template-columns: 1fr;
  }
}