/*
Theme Name: Accounting Theme
Theme URI: https://example.com/accounting-theme
Author: Antigravity
Author URI: https://example.com
Description: یک قالب وردپرس حرفه‌ای، سریع و کاملاً بهینه برای سئو برای دفاتر حسابداری و مشاوره مالیاتی.
Version: 1.0.0
Text Domain: accounting-theme
Domain Path: /languages
*/

/* ==========================================================================
   Design Tokens (CSS Custom Properties)
   ========================================================================== */
:root {
  /* Colors - Monochrome Modern with Accent */
  --color-bg-dark: #0B0B0C;
  --color-surface-dark: #111214;
  --color-text-on-dark: #FFFFFF;
  --color-border-dark: #181818;

  --color-bg-light: #FFFFFF;
  --color-surface-light: #F9F9F9;
  --color-text-on-light: #181818;
  --color-border-light: #E5E5E5;

  --color-elevated: #FFFFFF;
  --color-muted: #6C6C6C;
  --color-accent: #063633; /* Dark green/gold vibe */
  --color-success: #198754;
  --color-error: #DC3545;

  /* Default Theme (Light Mode Default for Accounting, but can be inverted) */
  --color-bg: var(--color-bg-light);
  --color-surface: var(--color-surface-light);
  --color-text: var(--color-text-on-light);
  --color-border: var(--color-border-light);

  /* Typography */
  --font-primary: 'IRANSansX', Tahoma, sans-serif;
  
  --fs-h1: clamp(2rem, 4vw + 1rem, 4rem); /* 32px to 64px */
  --fs-h2: clamp(1.75rem, 3vw + 1rem, 2.5rem); /* 28px to 40px */
  --fs-h3: clamp(1.5rem, 2vw + 1rem, 1.75rem); /* 24px to 28px */
  --fs-h4: clamp(1.125rem, 1.5vw + 1rem, 1.25rem); /* 18px to 20px */
  --fs-body: 1rem; /* 16px */
  --fs-small: 0.8125rem; /* 13px */

  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;

  --lh-heading: 1.25;
  --lh-body: 1.8;

  /* Spacing Scale (4px increments) */
  --space-1: 0.25rem; /* 4px */
  --space-2: 0.5rem;  /* 8px */
  --space-3: 0.75rem; /* 12px */
  --space-4: 1rem;    /* 16px */
  --space-5: 1.25rem; /* 20px */
  --space-6: 1.5rem;  /* 24px */
  --space-8: 2rem;    /* 32px */
  --space-10: 2.5rem; /* 40px */
  --space-12: 3rem;   /* 48px */
  --space-14: 3.5rem; /* 56px */
  --space-16: 4rem;   /* 64px */

  /* Radii */
  --radius-button: 8px;
  --radius-card: 14px;
  --radius-input: 10px;
  --radius-pill: 999px;

  /* Shadows */
  --shadow-card: 0 3px 20px rgba(0, 0, 0, 0.08);
  --shadow-card-hover: 0 12px 30px rgba(0, 0, 0, 0.15);
  
  /* Layout */
  --container-max-width: 1320px;
  --container-gutter: 20px;

  /* Transitions */
  --transition-default: 200ms ease;
  
  /* Z-Index */
  --z-dropdown: 50;
  --z-header: 100;
  --z-modal: 1000;
  --z-toast: 1100;
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  direction: rtl;
  scroll-behavior: smooth;
  overflow-x: clip;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  font-family: var(--font-primary);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  padding-top: 80px;
}

/* Typography Base */
h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  margin-bottom: var(--space-4);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-heading);
}

h1 { font-size: var(--fs-h1); font-weight: var(--fw-bold); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }

p {
  margin-top: 0;
  margin-bottom: var(--space-4);
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-default);
}
a:hover, a:focus {
  color: var(--color-text);
}

/* Focus Visible for Accessibility */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin-inline: auto;
  padding-inline: var(--container-gutter);
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-button);
  font-weight: var(--fw-medium);
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition-default);
  text-align: center;
}
.button-accent {
  background-color: var(--color-accent);
  color: #fff;
}
.button-accent:hover {
  background-color: #042523;
  color: #fff;
}
.button-outline {
  background-color: transparent;
  border-color: var(--color-border);
  color: var(--color-text);
}
.button-outline:hover {
  border-color: var(--color-text);
}
.button-pill {
  border-radius: var(--radius-pill);
}
.button-large {
  padding: var(--space-4) var(--space-8);
  font-size: 1.125rem;
}

/* ==========================================================================
   Responsive Queries
   ========================================================================== */
@media (max-width: 1100px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .main-navigation ul {
    gap: var(--space-3) !important;
  }
  .main-navigation a {
    font-size: 0.85rem;
  }
  .header-inner {
    gap: 8px;
  }
  .site-title {
    font-size: 1rem !important;
  }
  .cta-header-btn {
    padding: 8px 12px !important;
    font-size: 0.85rem !important;
  }
}

@media (max-width: 768px) {
  :root {
    --fs-h1: 2rem;
    --fs-h2: 1.75rem;
    --fs-h3: 1.25rem;
    --fs-h4: 1.1rem;
    --space-12: var(--space-8);
  }
  
  .header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .site-branding {
    order: 3;
    margin-right: auto;
  }

  .site-title {
    font-size: 1.1rem;
  }
  
  .header-actions {
    order: 2;
    margin: 0 auto;
  }
  
  .cta-header-btn {
    font-size: 0.75rem !important;
    padding: 6px 12px !important;
  }
  
  .cta-header-btn svg {
    width: 14px !important;
    height: 14px !important;
    margin-left: 4px !important;
  }
  
  .main-navigation {
    order: 1;
    margin-left: auto;
  }
  
  .contact-form-row {
    grid-template-columns: 1fr !important;
  }
  
  .contact-phone-link {
    width: 100%;
    text-align: left;
    margin-top: 4px;
  }

  .hero-subtitle {
    margin-bottom: 45px !important;
  }
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: var(--z-header);
  background-color: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}
.site-title {
  margin: 0;
  font-size: var(--fs-h3);
}
.main-navigation ul {
  display: flex;
  gap: var(--space-6);
  list-style: none;
  margin: 0;
  padding: 0;
}
.main-navigation a {
  color: var(--color-text);
  font-weight: var(--fw-medium);
}
.main-navigation a:hover {
  color: var(--color-accent);
}
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
}

/* ==========================================================================
   Sections & Utilities
   ========================================================================== */
.section-padding {
  padding-block: var(--space-14);
}
.text-center {
  text-align: center;
}
.section-header {
  margin-bottom: var(--space-10);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  padding-block: var(--space-16) var(--space-12);
  text-align: center;
}
.hero-content {
  max-width: 800px;
  margin-inline: auto;
}
.hero-subtitle {
  font-size: var(--fs-h4);
  color: var(--color-muted);
  margin-bottom: var(--space-8);
}
.hero-actions {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
}

/* ==========================================================================
   Stats Section
   ========================================================================== */
.stats-section {
  background-color: var(--color-surface);
  padding-block: var(--space-8);
  border-block: 1px solid var(--color-border);
}
.stats-inner {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: var(--space-6);
  text-align: center;
}
.stat-number {
  display: block;
  font-size: var(--fs-h2);
  font-weight: var(--fw-bold);
  color: var(--color-accent);
}
.stat-label {
  color: var(--color-muted);
}

/* ==========================================================================
   Services Grid
   ========================================================================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-6);
}
.service-card {
  background-color: var(--color-surface);
  padding: var(--space-6);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-default), box-shadow var(--transition-default);
  border: 1px solid var(--color-border);
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card-hover);
}
.service-icon {
  margin-bottom: var(--space-4);
}
.service-excerpt {
  color: var(--color-muted);
  margin-bottom: var(--space-4);
}
.read-more {
  font-weight: var(--fw-semibold);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

/* ==========================================================================
   Calculator CTA
   ========================================================================== */
.calculator-cta {
  text-align: center;
  border-radius: var(--radius-card);
  margin-block: var(--space-10);
  padding: var(--space-14) var(--space-6);
}
.calculator-content {
  max-width: 600px;
  margin-inline: auto;
}

/* ==========================================================================
   Why Us & Features
   ========================================================================== */
.features-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-6);
}
.feature-item {
  padding: var(--space-6);
  background-color: var(--color-surface);
  border-radius: var(--radius-card);
  border: 1px solid var(--color-border);
  text-align: center;
}

/* ==========================================================================
   Blog Preview
   ========================================================================== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-6);
}
.post-card {
  background-color: var(--color-bg);
  padding: var(--space-6);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-border);
}
.post-meta {
  font-size: var(--fs-small);
  color: var(--color-muted);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background-color: var(--color-bg-dark);
  color: var(--color-text-on-dark);
  padding-top: var(--space-14);
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-8);
  margin-bottom: var(--space-10);
}
.footer-widget h3 {
  color: var(--color-text-on-dark);
  margin-bottom: var(--space-4);
}
.footer-widget p {
  color: var(--color-muted);
}
.footer-widget a {
  color: var(--color-muted);
}
.footer-widget a:hover {
  color: var(--color-elevated);
}
.footer-widget ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-widget ul li {
  margin-bottom: var(--space-2);
}
.site-info {
  border-top: 1px solid var(--color-border-dark);
  padding-block: var(--space-6);
  text-align: center;
  color: var(--color-muted);
}

.cta-header-btn {
  padding: 10px 24px !important;
}

/* Responsive Overrides */
@media (max-width: 768px) {
  .header-inner {
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    height: 80px !important;
    padding: 0 15px;
    position: relative;
  }
  .site-branding {
    order: 1;
    margin: 0 !important;
    max-width: 80% !important;
    text-align: right;
  }
  .header-actions {
    display: none !important;
  }
  .main-navigation {
    position: static;
    order: 2;
  }
  .menu-toggle {
    position: absolute !important;
    left: 15px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
  }
  .menu-toggle .icon-burger { display: block; }
  .menu-toggle[aria-expanded="true"] .icon-burger { display: none !important; }
  .menu-toggle[aria-expanded="true"] .icon-close { display: block !important; }
  .mobile-hero-cta {
    display: block !important;
  }
  .mobile-hero-cta .wave-button {
    padding: 12px 24px !important;
    font-size: 1.1rem !important;
  }
  .mobile-hero-cta svg {
    width: 20px !important;
    height: 20px !important;
  }

  .hero-subtitle {
    font-size: 0.95rem !important;
    line-height: 1.8 !important;
    margin-bottom: 45px !important; /* Extra spacing (approx 2 enters) */
  }
  .wave-button {
    padding: 6px 12px !important;
    font-size: 0.85rem !important;
    white-space: nowrap;
  }
  .wave-button svg {
    width: 14px !important;
    height: 14px !important;
    margin-left: 4px !important;
  }
  .site-title {
    font-size: 1.2rem !important;
    white-space: nowrap;
  }
  .main-navigation ul {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg);
    padding: var(--space-6);
    box-shadow: var(--shadow-card);
    text-align: right;
  }
  .main-navigation a {
    justify-content: flex-start !important;
    padding: 10px 0;
  }
  .main-navigation ul.toggled { display: flex; }
  .menu-toggle { display: block; color: var(--color-text); }
  .hero-actions { flex-direction: column; }
  .hero-actions .button { width: 100%; }
  .journey-inner { grid-template-columns: 1fr !important; }
  .features-list { grid-template-columns: 1fr !important; }
  .contact-form-row { grid-template-columns: 1fr !important; }
  .contact-phone-link { width: 100%; text-align: left; margin-top: 4px; }
  .footer-copyright-text { font-size: 0.75rem !important; margin: 0 6px !important; }
}

/* Scroll Animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Highlight Paragraph with Animated Gradient Line */
.journey-highlight-paragraph {
  position: relative;
  padding-right: 36px !important;
}
.journey-highlight-paragraph::before {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  width: 20px; /* Same width as the 20px square icon below it */
  height: 100%;
  background-image: 
    radial-gradient(circle at 6px 15px, rgba(255, 255, 255, 0.7) 1.5px, transparent 2px),
    radial-gradient(circle at 14px 30px, rgba(255, 255, 255, 0.4) 1px, transparent 1.5px),
    linear-gradient(180deg, #00a8ff, #e67e22);
  background-size: 20px 35px, 20px 50px, 100% 200%;
  border-radius: 4px;
  animation: glowGradientMove 4s ease-in-out infinite alternate;
}
@keyframes glowGradientMove {
  0% { background-position: 0px 0px, 0px 0px, 0% 0%; }
  100% { background-position: 0px -70px, 0px -100px, 0% 100%; }
}

/* Icon Animations */
@keyframes iconZoomLoop {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}
.anim-zoom-loop {
  animation: iconZoomLoop 4s ease-in-out infinite;
}

@keyframes iconLockLoop {
  0%, 15%, 100% { transform: translateY(0); }
  40%, 75% { transform: translateY(-4px); }
}
.anim-lock-loop {
  animation: iconLockLoop 4s ease-in-out infinite;
}

@keyframes iconClockSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.anim-clock-loop {
  transform-origin: center;
  transform-box: view-box;
  animation: iconClockSpin 6s linear infinite;
}

/* Specific Section Tweaks */
.hero-section {
  position: relative;
  color: white;
}
.hero-subtitle {
  color: rgba(255, 255, 255, 0.9);
}
.hero-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  padding: var(--space-1) var(--space-4);
  border-radius: var(--radius-pill);
  margin-bottom: var(--space-4);
  font-size: var(--fs-small);
}
.section-subtitle {
  display: block;
  color: var(--color-accent);
  font-weight: var(--fw-bold);
  margin-bottom: var(--space-2);
}

/* Premium Animated Border (Google AI Style) */
.premium-border-card {
  position: relative;
  border: none !important;
  background: transparent !important;
  z-index: 1;
  overflow: hidden;
  /* border-radius already handled by inline or generic styles, but let's enforce */
  border-radius: var(--radius-card);
}

.premium-border-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  /* Conic gradient with Google colors: Blue, Red, Yellow, Green */
  background: conic-gradient(
    from 0deg, 
    transparent 0%, 
    transparent 60%, 
    rgba(66, 133, 244, 0) 65%, 
    #4285f4 75%, 
    #ea4335 82%, 
    #fbbc05 89%, 
    #34a853 96%, 
    rgba(52, 168, 83, 0) 100%
  );
  animation: spin-gradient-border 10s linear infinite;
  z-index: -2;
}

.premium-border-card::after {
  content: '';
  position: absolute;
  inset: 2px; /* Border thickness */
  background: var(--color-bg); /* Inner background matching theme */
  border-radius: calc(var(--radius-card) - 2px);
  z-index: -1;
}

@keyframes spin-gradient-border {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Typewriter Reveal Animation */
@keyframes typewriter-reveal {
  0% {
    opacity: 0;
    transform: translateX(15px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Why Us Premium Glass Cards */
.why-card:hover {
  transform: translateY(-10px) !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(139, 195, 74, 0.3) !important;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4), 0 0 40px rgba(139, 195, 74, 0.05) !important;
}
.why-card:hover .why-card-watermark {
  color: rgba(139, 195, 74, 0.1) !important;
  transform: scale(1.1) rotate(-5deg) !important;
}
.why-card:hover .why-icon {
  transform: scale(1.1) !important;
  background: rgba(139, 195, 74, 0.2) !important;
}

@keyframes pulse-dot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(139, 195, 74, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(139, 195, 74, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(139, 195, 74, 0); }
}

/* Wave Button Effect */
.wave-button {
  background-color: #8bc34a !important; /* Pistachio Green */
  color: #ffffff !important; /* White text and icon */
  border-radius: 6px !important; /* Less rounded corners */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800 !important;
  animation: pulse-wave 2s infinite;
}
@keyframes pulse-wave {
  0% { box-shadow: 0 0 0 0 rgba(139, 195, 74, 0.7); }
  70% { box-shadow: 0 0 0 15px rgba(139, 195, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(139, 195, 74, 0); }
}

/* Menu Icons & Corporate Hover */
#primary-menu a {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  position: relative;
  padding-bottom: 6px;
  overflow: hidden;
}
#primary-menu a svg {
  transition: transform 0.3s ease, color 0.3s ease;
}
#primary-menu a:hover svg {
  transform: translateY(-2px);
  color: var(--color-accent);
}
#primary-menu a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 2px;
  background-color: var(--color-accent);
  transform: translateX(101%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
#primary-menu a:hover::after {
  transform: translateX(0);
}

/* Hero Image Slider */
.hero-slider-container {
  position: relative;
  width: 100%;
  max-width: 900px;
  height: 350px;
  margin: var(--space-8) auto var(--space-8);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}
.hero-slider-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  animation: hero-crossfade 12s infinite;
}
.hero-slider-img:nth-child(2) {
  animation-delay: 6s;
}
.hero-gradient-overlay {
  position: absolute;
  inset: auto 0 0 0;
  height: 60%;
  background: linear-gradient(to top, rgba(4, 37, 35, 1), transparent);
  z-index: 2;
  pointer-events: none;
}
@keyframes hero-crossfade {
  0%, 45% { opacity: 1; transform: scale(1); }
  50%, 95% { opacity: 0; transform: scale(1.05); }
  100% { opacity: 1; transform: scale(1); }
}
