/* ============================================
   Nasim - Afghanistan Calendar App Website
   Elegant, Clean, Professional Design
   ============================================ */

:root {
  /* Primary: Deep Emerald (Shamsi) */
  --primary-50: #E8F5F0;
  --primary-100: #C2E6D9;
  --primary-200: #9AD7C1;
  --primary-300: #72C8A9;
  --primary-400: #4ABA91;
  --primary-500: #2DAE7A;
  --primary-600: #248C62;
  --primary-700: #1B6A4A;
  --primary-800: #124732;
  --primary-900: #09251A;

  /* Secondary: Warm Coral (Hijri Qamari) */
  --secondary-50: #FFF3F0;
  --secondary-100: #FFE0D9;
  --secondary-200: #FFCCBF;
  --secondary-300: #FFB8A6;
  --secondary-400: #FFA48C;
  --secondary-500: #FF8A65;
  --secondary-600: #F4511E;
  --secondary-700: #D84315;

  /* Accent: Royal Blue (Gregorian) */
  --accent-50: #E3F2FD;
  --accent-100: #BBDEFB;
  --accent-200: #90CAF9;
  --accent-500: #2196F3;
  --accent-600: #1E88E5;
  --accent-700: #1976D2;

  /* Holiday Purple */
  --holiday: #9C27B0;
  --holiday-bg: #F3E5F5;

  /* Today Red */
  --today: #FF6B6B;
  --today-bg: #FFE5E5;

  /* Neutrals */
  --text-primary: #1A1A1A;
  --text-secondary: #4F4F4F;
  --text-tertiary: #9E9E9E;
  --text-light: #BDBDBD;
  --background: #FFFFFF;
  --background-soft: #F8F9FA;
  --background-secondary: #F1F3F5;
  --border: #E0E0E0;
  --border-light: #F0F0F0;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.16);

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  --radius-full: 9999px;
}

/* ============================================
   Reset & Base Styles
   ============================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scrollbar-gutter: stable;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--background);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 16px;
  overflow-y: scroll;
}

/* Persian/Arabic Font Support */
.persian-text,
.rtl {
  font-family: 'Vazirmatn', 'Tahoma', 'Arial', sans-serif;
}

.rtl {
  direction: rtl;
}

.persian-text {
  direction: rtl;
  text-align: right;
}

/* ============================================
   Navigation
   ============================================ */

.navbar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
  padding: 0.75rem 1.25rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.logo-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  display: block;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 8px rgba(45, 174, 122, 0.25);
}

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

.logo-text-persian {
  font-size: 0.9rem;
  color: var(--text-tertiary);
  margin-left: 0.5rem;
  font-family: 'Vazirmatn', 'Tahoma', sans-serif;
}

.nav-links {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  flex-wrap: wrap;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.nav-links a:hover {
  color: var(--primary-600);
  background: var(--primary-50);
}

.nav-links a.active {
  color: var(--primary-600);
  background: var(--primary-50);
}

/* ============================================
   Hero Section
   ============================================ */

.hero {
  background: linear-gradient(180deg, var(--primary-50) 0%, var(--background) 100%);
  padding: 4rem 1.5rem 5rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 60%;
  height: 100%;
  background: radial-gradient(ellipse, rgba(45, 174, 122, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--background);
  color: var(--primary-700);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--primary-100);
}

.hero-badge svg {
  width: 16px;
  height: 16px;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.hero .persian-title {
  font-size: 2rem;
  color: var(--primary-600);
  margin-bottom: 1.5rem;
  font-family: 'Vazirmatn', 'Tahoma', sans-serif;
  font-weight: 600;
}

.hero-description {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  max-width: 480px;
  line-height: 1.7;
}

.hero-description-persian {
  font-size: 1rem;
  color: var(--text-tertiary);
  margin-bottom: 2rem;
  max-width: 480px;
  direction: rtl;
  font-family: 'Vazirmatn', 'Tahoma', sans-serif;
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
}

.btn svg {
  width: 20px;
  height: 20px;
}

.btn-primary {
  background: linear-gradient(145deg, var(--primary-500), var(--primary-600));
  color: white;
  box-shadow: 0 4px 14px rgba(45, 174, 122, 0.35);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(45, 174, 122, 0.45);
}

.btn-secondary {
  background: var(--background);
  color: var(--text-primary);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-xs);
}

.btn-secondary:hover {
  border-color: var(--primary-300);
  background: var(--primary-50);
  color: var(--primary-700);
}

/* ============================================
   Phone Mockup & Calendar Preview
   ============================================ */

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.phone-mockup {
  position: relative;
  width: 280px;
  transform: perspective(1000px) rotateY(-5deg) rotateX(2deg);
}

.phone-frame {
  background: linear-gradient(145deg, #1a1a1a, #2d2d2d);
  border-radius: 36px;
  padding: 12px;
  box-shadow:
    0 50px 100px rgba(0, 0, 0, 0.25),
    0 30px 60px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.phone-screen {
  background: var(--background);
  border-radius: 28px;
  overflow: hidden;
  aspect-ratio: 9 / 19;
}

.phone-notch {
  width: 120px;
  height: 28px;
  background: #1a1a1a;
  border-radius: 0 0 16px 16px;
  margin: 0 auto;
  position: relative;
}

.phone-notch::after {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: #333;
  border-radius: 2px;
}

/* Calendar App Preview */
.calendar-preview {
  padding: 8px 10px 16px;
}

.calendar-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 4px 12px;
}

.calendar-preview-toggle {
  display: flex;
  background: var(--background-secondary);
  border-radius: 8px;
  padding: 3px;
}

.toggle-btn {
  padding: 4px 10px;
  font-size: 9px;
  font-weight: 600;
  color: var(--text-tertiary);
  border-radius: 6px;
  background: transparent;
}

.toggle-btn.active {
  background: var(--background);
  color: var(--primary-600);
  box-shadow: var(--shadow-xs);
}

.calendar-preview-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-arrow {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-500);
  font-size: 14px;
  font-weight: 700;
}

.calendar-preview-date {
  display: flex;
  gap: 6px;
}

.date-pill {
  background: var(--background);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 9px;
  font-weight: 600;
  color: var(--text-primary);
  box-shadow: var(--shadow-xs);
}

/* Calendar Month Info */
.calendar-month-info {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 6px 0 8px;
  font-size: 8px;
}

.month-info-hijri {
  color: var(--secondary-500);
  font-weight: 500;
}

.month-info-gregorian {
  color: var(--accent-500);
  font-weight: 500;
}

/* Calendar Grid */
.calendar-preview-grid {
  background: var(--background);
  border-radius: 12px;
  padding: 8px;
  box-shadow: var(--shadow-md);
}

.weekday-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px;
  margin-bottom: 4px;
}

.weekday-cell {
  text-align: center;
  font-size: 7px;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 2px 0;
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.day-cell {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2px;
  border-top: 1px solid var(--border-light);
  border-left: 1px solid var(--border-light);
  position: relative;
}

.day-cell:nth-child(7n+1) {
  border-left: none;
}

.day-cell:nth-child(-n+7) {
  border-top: none;
}

.day-cell.today {
  background: var(--today-bg);
}

.day-cell.other-month .shamsi-date {
  color: var(--text-light) !important;
}

.day-cell.other-month .gregorian-date,
.day-cell.other-month .hijri-date {
  opacity: 0.4 !important;
}

.day-cell.friday .shamsi-date {
  color: var(--today) !important;
}

.day-cell.holiday::after {
  content: '';
  position: absolute;
  top: 2px;
  right: 2px;
  width: 3px;
  height: 3px;
  background: var(--holiday);
  border-radius: 50%;
}

.shamsi-date {
  font-size: 11px;
  font-weight: 600;
  color: var(--primary-500);
  text-align: center;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.day-bottom {
  display: flex;
  justify-content: space-between;
  padding: 0 1px;
}

.gregorian-date {
  font-size: 6px;
  color: var(--accent-500);
  opacity: 0.75;
}

.hijri-date {
  font-size: 6px;
  color: var(--secondary-500);
  opacity: 0.85;
}

/* Calendar Legend Preview */
.calendar-legend-preview {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 10px 8px;
  margin-top: 8px;
  background: var(--background-soft);
  border-radius: 8px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

.legend-dot.shamsi { background: var(--primary-500); }
.legend-dot.hijri { background: var(--secondary-500); }
.legend-dot.gregorian { background: var(--accent-500); }

.legend-text {
  font-size: 7px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ============================================
   Features Section
   ============================================ */

.features {
  padding: 5rem 1.5rem;
  background: var(--background);
}

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

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

.section-header h2 {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.0625rem;
  max-width: 520px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.feature-card {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  transition: all 0.25s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.feature-icon svg {
  width: 26px;
  height: 26px;
}

.feature-icon.shamsi {
  background: var(--primary-100);
  color: var(--primary-600);
}

.feature-icon.hijri {
  background: var(--secondary-100);
  color: var(--secondary-600);
}

.feature-icon.gregorian {
  background: var(--accent-100);
  color: var(--accent-600);
}

.feature-icon.privacy {
  background: var(--holiday-bg);
  color: var(--holiday);
}

.feature-card h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.feature-card h4 {
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  font-weight: 500;
  margin-bottom: 0.75rem;
  font-family: 'Vazirmatn', 'Tahoma', sans-serif;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.6;
}

/* ============================================
   Calendar Colors Section
   ============================================ */

.calendar-colors {
  padding: 3rem 1.5rem;
  background: var(--background-secondary);
}

.calendar-legend {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
}

.calendar-type {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.calendar-dot {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  box-shadow: var(--shadow-sm);
}

.calendar-dot.shamsi { background: var(--primary-500); }
.calendar-dot.hijri { background: var(--secondary-500); }
.calendar-dot.gregorian { background: var(--accent-500); }

.calendar-type span {
  font-weight: 500;
  color: var(--text-primary);
  font-size: 0.9375rem;
}

/* ============================================
   App Info Section
   ============================================ */

.app-section {
  padding: 5rem 1.5rem;
  background: linear-gradient(180deg, var(--background) 0%, var(--background-secondary) 100%);
}

.app-info-box {
  background: var(--background);
  border: 1.5px solid var(--primary-100);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.app-info-box .app-name {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary-700);
  margin-bottom: 0.5rem;
}

.app-info-box .developer {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.8;
}

/* ============================================
   Page Headers
   ============================================ */

.page-header {
  background: linear-gradient(180deg, var(--primary-50) 0%, var(--background) 100%);
  padding: 3rem 1.25rem 2.25rem;
  text-align: center;
}

.page-header h1 {
  font-size: clamp(1.85rem, 3.2vw, 2.35rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.page-header .persian-title {
  font-size: clamp(1.05rem, 2.2vw, 1.2rem);
  color: var(--primary-600);
  margin-bottom: 1rem;
  font-family: 'Vazirmatn', 'Tahoma', sans-serif;
  font-weight: 600;
}

.page-header .last-updated {
  color: var(--text-tertiary);
  font-size: 0.875rem;
}

/* ============================================
   Content Sections
   ============================================ */

.content-section {
  max-width: 760px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 3.5rem;
}

.policy-section {
  margin-bottom: 2.25rem;
}

.policy-section h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary-100);
}

.policy-section h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--primary-700);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.policy-section p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.8;
  font-size: 0.9rem;
}

.policy-section ul {
  list-style: none;
  padding: 0;
  margin-bottom: 1rem;
}

.policy-section ul li {
  padding: 0.5rem 0 0.5rem 1.75rem;
  position: relative;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

.policy-section ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.9rem;
  width: 8px;
  height: 8px;
  background: var(--primary-500);
  border-radius: 50%;
}

.rtl .policy-section ul li {
  padding-left: 0;
  padding-right: 1.75rem;
}

.rtl .policy-section ul li::before {
  left: auto;
  right: 0;
}

.persian-text ul li {
  padding-left: 0;
  padding-right: 1.75rem;
}

.persian-text ul li::before {
  left: auto;
  right: 0;
}

.section-divider {
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--primary-100);
}

.callout {
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-light);
  background: var(--background-soft);
  padding: 1.25rem;
  box-shadow: var(--shadow-xs);
}

.callout--primary {
  border-color: var(--primary-200);
  background: linear-gradient(145deg, var(--primary-50), var(--background));
}

.callout--soft {
  border-color: var(--border);
}

.callout > :first-child {
  margin-top: 0;
}

.callout > :last-child {
  margin-bottom: 0;
}

.fine-print {
  font-size: 0.875rem;
  color: var(--text-tertiary);
  line-height: 1.6;
}

.u-text-center {
  text-align: center;
}

.u-mt-sm {
  margin-top: 0.5rem;
}

.u-mt-md {
  margin-top: 1rem;
}

.u-mt-lg {
  margin-top: 1.5rem;
}

.u-mt-xl {
  margin-top: 2.25rem;
}

.u-mb-sm {
  margin-bottom: 0.5rem;
}

.u-mb-md {
  margin-bottom: 1rem;
}

.u-mb-lg {
  margin-bottom: 1.5rem;
}

/* ============================================
   Contact Box
   ============================================ */

.contact-box {
  background: linear-gradient(145deg, var(--primary-50), var(--background));
  border: 1px solid var(--primary-200);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  margin-top: 2rem;
}

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

.contact-box p {
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  line-height: 1.7;
}

.contact-box a {
  color: var(--primary-600);
  text-decoration: none;
  font-weight: 500;
}

.contact-box a:hover {
  text-decoration: underline;
}

.email-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* ============================================
   Footer
   ============================================ */

.footer {
  background: linear-gradient(180deg, var(--primary-900), #051510);
  color: white;
  padding: 3rem 1.25rem 1.75rem;
}

.footer-content {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
}

.footer-section h4 {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: var(--primary-200);
  font-weight: 600;
}

.footer-section p {
  color: var(--primary-100);
  line-height: 1.7;
  opacity: 0.9;
  font-size: 0.9rem;
}

.footer-section a {
  color: var(--primary-100);
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-section a:hover {
  color: white;
}

.footer-links {
  list-style: none;
}

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

.footer-bottom {
  max-width: 1100px;
  margin: 0 auto;
  padding-top: 2rem;
  margin-top: 2.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  color: var(--primary-300);
  font-size: 0.8125rem;
}

/* ============================================
   About Page Styles
   ============================================ */

.calendar-type-card {
  padding: 1.75rem;
  border-radius: var(--radius-lg);
  margin-bottom: 1.25rem;
}

.calendar-type-card.shamsi {
  background: var(--primary-50);
  border-left: 4px solid var(--primary-500);
}

.calendar-type-card.hijri {
  background: var(--secondary-50);
  border-left: 4px solid var(--secondary-500);
}

.calendar-type-card.gregorian {
  background: var(--accent-50);
  border-left: 4px solid var(--accent-500);
}

.calendar-type-card h3 {
  margin-bottom: 0.75rem !important;
  margin-top: 0 !important;
}

.calendar-type-card.shamsi h3 { color: var(--primary-700); }
.calendar-type-card.hijri h3 { color: var(--secondary-700); }
.calendar-type-card.gregorian h3 { color: var(--accent-700); }

.persian-block {
  direction: rtl;
  text-align: right;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  font-family: 'Vazirmatn', 'Tahoma', sans-serif;
}

/* CTA Section */
.cta-section {
  text-align: center;
  margin-top: 2.5rem;
  padding: 2rem;
  background: linear-gradient(145deg, var(--primary-50), var(--background));
  border-radius: var(--radius-xl);
  border: 1px solid var(--primary-100);
}

.cta-section h3 {
  color: var(--primary-700);
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
  font-weight: 600;
}

.cta-section p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3rem;
  }

  .hero-content {
    order: 1;
  }

  .hero-visual {
    order: 2;
  }

  .hero-description,
  .hero-description-persian {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-buttons {
    justify-content: center;
  }

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

  .footer-content {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .navbar {
    padding: 0.75rem 1rem;
  }

  .logo-text-persian {
    display: none;
  }

  .nav-links {
    gap: 0.25rem;
  }

  .nav-links a {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
  }

  .hero {
    padding: 3rem 1rem 4rem;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero .persian-title {
    font-size: 1.5rem;
  }

  .phone-mockup {
    width: 240px;
    transform: none;
  }

  .features {
    padding: 4rem 1rem;
  }

  .section-header h2 {
    font-size: 1.75rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .calendar-legend {
    gap: 1.5rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }

  .page-header {
    padding: 3rem 1rem 2rem;
  }

  .page-header h1 {
    font-size: 2rem;
  }

  .content-section {
    padding: 2rem 1rem 3rem;
  }
}

@media (max-width: 480px) {
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .hero-buttons .btn {
    width: 100%;
    max-width: 280px;
  }

  .phone-mockup {
    width: 220px;
  }
}

/* ============================================
   Web Calendar (Homepage)
   ============================================ */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 200;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--background);
  color: var(--text-primary);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--background);
  color: var(--text-primary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.5rem 0.75rem;
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: var(--shadow-xs);
}

.select:focus {
  outline: none;
  border-color: var(--primary-300);
  box-shadow: 0 0 0 4px rgba(45, 174, 122, 0.18);
}

.input {
  width: 100%;
  background: var(--background);
  color: var(--text-primary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.5rem 0.75rem;
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: var(--shadow-xs);
}

.input:focus {
  outline: none;
  border-color: var(--primary-300);
  box-shadow: 0 0 0 4px rgba(45, 174, 122, 0.18);
}

.jump-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
  align-items: end;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-label {
  font-size: 0.75rem;
  font-weight: 900;
  color: var(--text-tertiary);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.btn-sm {
  padding: 0.5rem 0.85rem;
  font-size: 0.85rem;
}

.nav-download.btn-primary:hover {
  transform: none;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: var(--background);
  color: var(--text-secondary);
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: all 0.2s ease;
}

.icon-btn:hover {
  background: var(--primary-50);
  color: var(--primary-700);
  border-color: var(--primary-100);
}

.icon-btn:focus {
  outline: none;
  border-color: var(--primary-300);
  box-shadow: 0 0 0 4px rgba(45, 174, 122, 0.18);
}

.icon-stack {
  width: 20px;
  height: 20px;
  display: block;
}

.icon-stack svg {
  width: 20px;
  height: 20px;
  display: none;
}

#themeToggle[data-theme="auto"] .icon-auto,
#themeToggle[data-theme="light"] .icon-light,
#themeToggle[data-theme="dark"] .icon-dark {
  display: block;
}

.calendar-page {
  background: linear-gradient(180deg, var(--primary-50) 0%, var(--background) 75%);
}

.calendar-section {
  padding: 1.25rem 1rem 2rem;
}

.calendar-page-container {
  max-width: 980px;
  margin: 0 auto;
}

.calendar-shell {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.calendar-shell-header {
  padding: 0.9rem 0.9rem 0.75rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--border-light);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.75));
}

.calendar-title {
  font-size: clamp(1.25rem, 2.2vw, 1.45rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 0.25rem;
}

.calendar-subtitle {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.9rem;
}

.calendar-shell-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.view-toggle {
  display: inline-flex;
  padding: 0.25rem;
  background: var(--background-secondary);
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
}

.view-toggle .toggle-btn {
  background: transparent;
  border: 0;
  padding: 0.45rem 0.8rem;
  border-radius: var(--radius-full);
  font-weight: 800;
  font-size: 0.82rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.view-toggle .toggle-btn.active {
  background: linear-gradient(145deg, var(--primary-500), var(--primary-600));
  color: white;
  box-shadow: 0 8px 18px rgba(45, 174, 122, 0.25);
}

.calendar-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: var(--background);
  color: var(--text-primary);
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: all 0.2s ease;
}

.nav-btn:hover {
  background: var(--primary-50);
  border-color: var(--primary-100);
}

.nav-btn:focus {
  outline: none;
  border-color: var(--primary-300);
  box-shadow: 0 0 0 4px rgba(45, 174, 122, 0.18);
}

.nav-label {
  height: 38px;
  min-width: 170px;
  padding: 0 0.85rem;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: var(--background);
  color: var(--text-primary);
  font-weight: 800;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-label:hover {
  background: var(--primary-50);
  border-color: var(--primary-100);
}

.nav-label:focus {
  outline: none;
  border-color: var(--primary-300);
  box-shadow: 0 0 0 4px rgba(45, 174, 122, 0.18);
}

.calendar-shell-body {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
}

body.view-yearly .calendar-shell-body {
  /* Keeps layout stable when switching views */
}

.calendar-main {
  padding: 1rem;
  border-right: 1px solid var(--border-light);
  background: rgba(250, 251, 252, 0.6);
}

.calendar-ranges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.range.hijri {
  color: var(--secondary-600);
  font-weight: 700;
}

.range.gregorian {
  color: var(--accent-700);
  font-weight: 700;
}

.range-sep {
  color: var(--text-tertiary);
}

.weekday-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0;
  border-bottom: 0;
  padding-bottom: 0;
  margin-bottom: 0.3rem;
}

.weekday-cell {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--text-tertiary);
  padding: 0.3rem 0;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--background);
}

.day-cell {
  position: relative;
  appearance: none;
  -webkit-appearance: none;
  border: none;
  display: block;
  text-align: inherit;
  font-family: inherit;
  aspect-ratio: auto;
  padding: clamp(0.35rem, 0.8vw, 0.5rem) clamp(0.45rem, 0.9vw, 0.6rem);
  min-height: clamp(56px, 7.5vw, 74px);
  border-top: none;
  border-left: none;
  border-right: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  background: var(--background);
  transition: background 0.2s ease, transform 0.08s ease;
}

.day-cell:nth-child(7n) {
  border-right: none;
}

.day-cell:hover {
  background: var(--background-secondary);
}

.day-cell:active {
  transform: scale(0.99);
}

.day-cell.is-today {
  background: var(--today-bg);
}

.day-cell.is-other {
  background: rgba(255, 255, 255, 0.6);
}

.day-cell.is-selected {
  outline: 3px solid rgba(45, 174, 122, 0.28);
  outline-offset: -3px;
}

.day-cell:focus-visible {
  outline: 3px solid rgba(33, 150, 243, 0.28);
  outline-offset: -3px;
}

.day-cell.is-empty {
  cursor: default;
  pointer-events: none;
  background: transparent;
}

.day-indicators {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  display: flex;
  gap: 0.25rem;
}

.dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

.dot.holiday {
  background: var(--holiday);
}

.dot.note {
  background: var(--primary-500);
}

.day-shamsi {
  font-size: clamp(1.02rem, 2.3vw, 1.2rem);
  font-weight: 900;
  text-align: center;
  color: var(--primary-600);
  line-height: 1;
  margin-top: 0.1rem;
}

.day-shamsi.weekend {
  color: var(--today);
}

.day-cell.is-other .day-shamsi {
  color: var(--text-light);
}

.day-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 0;
  margin-top: 0.4rem;
  font-size: 0.68rem;
}

.day-gregorian {
  color: var(--accent-700);
  opacity: 0.8;
  font-weight: 700;
}

.day-hijri {
  color: var(--secondary-600);
  opacity: 0.9;
  font-weight: 700;
}

.day-cell.is-other .day-gregorian,
.day-cell.is-other .day-hijri {
  opacity: 0.45;
}

.calendar-side {
  padding: 1rem;
  background: var(--background);
}

.side-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.side-title {
  font-size: 1.05rem;
  font-weight: 900;
}

.side-tabs {
  display: flex;
  gap: 0.4rem;
}

.chip {
  border: 1.5px solid var(--border);
  background: var(--background-secondary);
  color: var(--text-secondary);
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-full);
  font-weight: 800;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chip:hover {
  background: var(--primary-50);
  border-color: var(--primary-100);
  color: var(--primary-700);
}

.chip.active {
  background: var(--primary-50);
  border-color: var(--primary-200);
  color: var(--primary-700);
}

.side-subtitle {
  color: var(--text-tertiary);
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

.side-content {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.card-item {
  padding: 0.9rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-light);
  background: var(--background-soft);
  box-shadow: var(--shadow-xs);
}

.card-item.event,
.card-item.note {
  border-inline-start: 4px solid var(--marker, var(--primary-500));
}

.event-title {
  font-weight: 900;
  color: var(--text-primary);
}

.note-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.6rem;
}

.month-event-row {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 0.75rem;
  align-items: start;
}

.date-badge {
  border-radius: var(--radius-xl);
  background: linear-gradient(145deg, var(--primary-500), var(--primary-600));
  color: white;
  padding: 0.75rem 0.55rem;
  text-align: center;
  box-shadow: 0 10px 18px rgba(45, 174, 122, 0.22);
}

.date-badge-day {
  font-weight: 900;
  font-size: 1.25rem;
  line-height: 1;
}

.date-badge-month {
  margin-top: 0.35rem;
  font-size: 0.72rem;
  font-weight: 800;
  opacity: 0.92;
}

.card-item .meta {
  font-size: 0.82rem;
  color: var(--text-tertiary);
  margin-top: 0.35rem;
}

.badges {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.badge {
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 900;
}

.badge.official {
  background: var(--primary-100);
  color: var(--primary-800);
}

.badge.religious {
  background: var(--secondary-100);
  color: var(--secondary-700);
}

.badge.international {
  background: var(--accent-100);
  color: var(--accent-700);
}

.badge.historical {
  background: var(--holiday-bg);
  color: var(--holiday);
}

/* Year view */
.year-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.mini-month {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--background);
  padding: 0.75rem;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.2s ease;
}

.mini-month:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.mini-month-title {
  text-align: center;
  font-weight: 900;
  color: var(--primary-700);
  margin-bottom: 0.5rem;
}

.mini-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  font-size: 0.65rem;
  color: var(--text-tertiary);
  margin-bottom: 0.35rem;
}

.mini-weekday {
  text-align: center;
  font-weight: 800;
  opacity: 0.9;
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.mini-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  border-right: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  position: relative;
}

.mini-day:nth-child(7n) {
  border-right: none;
}

.mini-day.is-today {
  background: var(--today-bg);
}

.mini-dot {
  position: absolute;
  bottom: 2px;
  width: 3px;
  height: 3px;
  border-radius: 1.5px;
  background: var(--holiday);
}

/* Modal */
.modal[aria-hidden="true"] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.modal-panel {
  position: relative;
  width: min(720px, calc(100vw - 2rem));
  max-height: min(85vh, 820px);
  overflow: auto;
  background: var(--background);
  border-radius: var(--radius-2xl);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-xl);
}

.modal-header {
  position: sticky;
  top: 0;
  z-index: 2;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.9));
  border-bottom: 1px solid var(--border-light);
  padding: 0.95rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.modal-title {
  font-size: 1.05rem;
  font-weight: 900;
}

.modal-body {
  padding: 1rem;
}

.date-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.date-card {
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-light);
  background: var(--background-soft);
  padding: 0.85rem;
}

.date-card .label {
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  margin-bottom: 0.25rem;
}

.date-card .value {
  font-weight: 900;
  color: var(--text-primary);
}

.modal-section {
  margin-top: 1rem;
}

.modal-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.modal-section-title {
  font-size: 0.95rem;
  font-weight: 900;
  color: var(--text-primary);
}

.note-form textarea {
  width: 100%;
  padding: 0.75rem;
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--border);
  background: var(--background);
  color: var(--text-primary);
  font-family: inherit;
  resize: vertical;
}

.note-form textarea:focus {
  outline: none;
  border-color: var(--primary-300);
  box-shadow: 0 0 0 4px rgba(45, 174, 122, 0.18);
}

.note-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.5rem;
}


body.modal-open {
  overflow: hidden;
  padding-right: var(--scrollbar-gap, 0px);
}

/* Responsive calendar layout */
@media (max-width: 1024px) {
  .calendar-shell-body {
    grid-template-columns: 1fr;
  }

  .calendar-main {
    border-right: none;
    border-bottom: 1px solid var(--border-light);
  }

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

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

@media (max-width: 768px) {
  .nav-right {
    gap: 0.75rem;
  }

  .nav-download {
    display: none;
  }

  .calendar-shell-header {
    flex-direction: column;
    align-items: stretch;
  }

  .calendar-shell-controls {
    justify-content: space-between;
  }

  .nav-label {
    min-width: 0;
    flex: 1;
  }

  .date-cards {
    grid-template-columns: 1fr;
  }
}
