/* ========================================
   BinPin Landing Page Styles
   RTL, Responsive, Modern Design
   ======================================== */

/* CSS Variables - Match mobile theme */
:root {
  --primary: #2563eb;
  --primary-dark: #1e40af;
  --primary-light: #dbeafe;
  --secondary: #f59e0b;
  --background: #f8fafc;
  --surface: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --shadow: rgba(0, 0, 0, 0.1);
  --shadow-md: rgba(0, 0, 0, 0.15);
  --radius: 12px;
  --radius-lg: 16px;
  --transition: 0.3s ease;
  --max-width: 1200px;
  --spacing: 1rem;
  --spacing-lg: 2rem;
  --spacing-xl: 4rem;
}

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

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

body {
  font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  direction: rtl;
  background-color: var(--background);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
  margin-bottom: 1rem;
}

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

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1.125rem 2.5rem;
  font-size: 1.0625rem;
  font-weight: 600;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
  color: white;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.4);
  transform: translateY(-3px);
}

.btn-secondary {
  background-color: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.1);
}

.btn-secondary:hover {
  background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%);
  border-color: #1e40af;
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.2);
}

/* ========================================
   Navigation
   ======================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
  z-index: 1000;
  transition: all 0.3s ease;
}

.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 0;
}

.logo {
  font-size: 1.625rem;
  font-weight: 800;
  background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: all 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  color: var(--text);
  font-weight: 500;
  font-size: 1rem;
  position: relative;
  transition: color 0.3s ease;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #2563eb 0%, #3b82f6 100%);
  transition: width 0.3s ease;
}

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

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

.btn-nav {
  background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
  color: white;
  padding: 0.625rem 1.75rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
  transition: all 0.3s ease;
}

.btn-nav:hover {
  background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}

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

.mobile-menu-toggle span {
  width: 24px;
  height: 3px;
  background-color: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
  padding: 8rem 0 4rem;
  background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 50%, #f8fafc 100%);
  margin-top: 64px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.08) 0%, transparent 70%);
  border-radius: 50%;
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-content {
  text-align: right;
}

.hero-title {
  font-size: 3rem;
  color: var(--text);
  margin-bottom: 1.5rem;
  line-height: 1.2;
  background: linear-gradient(135deg, #0f172a 0%, #1e40af 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  line-height: 1.8;
}

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

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

.hero-image::before {
  content: '';
  position: absolute;
  width: 120%;
  height: 120%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  animation: pulse 3s ease-in-out infinite;
}

.hero-image img {
  max-width: 450px;
  filter: drop-shadow(0 25px 50px rgba(37, 99, 235, 0.2));
  animation: float 3s ease-in-out infinite;
  position: relative;
  z-index: 1;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 0.3; }
}

/* ========================================
   Section Common Styles
   ======================================== */
section {
  padding: 5rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
  position: relative;
}

.section-header::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, #2563eb 0%, #3b82f6 100%);
  margin: 1.5rem auto 0;
  border-radius: 2px;
}

.section-title {
  font-size: 2.75rem;
  color: var(--text);
  margin-bottom: 1rem;
  font-weight: 800;
  position: relative;
}

.section-subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ========================================
   Features Section
   ======================================== */
.features {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  position: relative;
}

.features::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, #e2e8f0 50%, transparent 100%);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
}

.feature-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  text-align: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(226, 232, 240, 0.6);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.05) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(37, 99, 235, 0.15), 0 0 0 1px rgba(37, 99, 235, 0.1);
  border-color: rgba(37, 99, 235, 0.2);
}

.feature-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 1.5rem;
  color: var(--primary);
  background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s ease;
}

.feature-card:hover .feature-icon {
  transform: scale(1.1) rotate(5deg);
  background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
  color: white;
}

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

.feature-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text);
  font-weight: 700;
}

.feature-desc {
  color: var(--text-muted);
  line-height: 1.7;
  font-size: 1.0625rem;
}

/* ========================================
   How It Works Section
   ======================================== */
.how-it-works {
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  position: relative;
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 5rem;
}

.step {
  display: grid;
  grid-template-columns: auto 1fr 1fr;
  gap: 3rem;
  align-items: center;
  position: relative;
}

.step-reverse {
  grid-template-columns: auto 1fr 1fr;
  direction: ltr;
}

.step-reverse .step-content {
  direction: rtl;
  text-align: right;
}

.step-number {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.3);
  position: relative;
}

.step-number::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
  opacity: 0.3;
  animation: ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ping {
  75%, 100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

.step-content {
  text-align: right;
}

.step-title {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: var(--text);
  font-weight: 700;
}

.step-desc {
  color: var(--text-muted);
  font-size: 1.125rem;
  line-height: 1.8;
}

.step-image {
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  transition: all 0.4s ease;
  border: 1px solid rgba(226, 232, 240, 0.6);
}

.step-image:hover {
  transform: scale(1.03);
  box-shadow: 0 20px 50px rgba(37, 99, 235, 0.12);
}

.step-image img {
  border-radius: var(--radius);
  max-height: 450px;
  object-fit: contain;
  margin: 0 auto;
}

/* ========================================
   Screenshots Section
   ======================================== */
.screenshots {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 50%, #ffffff 100%);
}

.screenshots-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
}

.screenshot-item {
  text-align: center;
  position: relative;
}

.screenshot-item::before {
  content: '';
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%);
  border-radius: 20px;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -1;
}

.screenshot-item:hover::before {
  opacity: 0.6;
}

.screenshot-item img {
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  margin-bottom: 1.5rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(226, 232, 240, 0.6);
}

.screenshot-item img:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: 0 20px 50px rgba(37, 99, 235, 0.15);
}

.screenshot-label {
  font-weight: 600;
  color: var(--text);
  font-size: 1.125rem;
}

/* ========================================
   FAQ Section
   ======================================== */
.faq {
  background-color: var(--background);
}

.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background-color: var(--surface);
  border-radius: var(--radius-lg);
  margin-bottom: 1rem;
  overflow: hidden;
  box-shadow: 0 2px 8px var(--shadow);
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  background: none;
  border: none;
  font-size: 1.125rem;
  font-weight: 600;
  text-align: right;
  cursor: pointer;
  transition: var(--transition);
}

.faq-question:hover {
  background-color: var(--primary-light);
}

.faq-icon {
  width: 24px;
  height: 24px;
  color: var(--primary);
  transition: transform var(--transition);
  flex-shrink: 0;
  margin-left: 1rem;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition);
}

.faq-item.active .faq-answer {
  max-height: 500px;
}

.faq-answer p {
  padding: 0 1.5rem 1.5rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ========================================
   About Section
   ======================================== */
.about {
  background-color: var(--surface);
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-text {
  text-align: right;
}

.about-desc {
  font-size: 1.125rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

.stat {
  text-align: center;
  padding: 1.5rem;
  background-color: var(--primary-light);
  border-radius: var(--radius);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--text-muted);
  font-size: 1rem;
}

.about-image img {
  max-width: 100%;
}

/* ========================================
   Download Section
   ======================================== */
.download {
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 50%, #3b82f6 100%);
  color: white;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.download::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.download::after {
  content: '';
  position: absolute;
  bottom: -50%;
  left: -20%;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
  border-radius: 50%;
}

.download .container {
  position: relative;
  z-index: 1;
}

.download .section-title,
.download .section-subtitle {
  color: white;
}

.download .section-title {
  font-size: 2.75rem;
}

.download-buttons {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin: 2.5rem 0;
  flex-wrap: wrap;
}

.download-btn {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 2.5rem;
  background-color: white;
  color: var(--text);
  border-radius: 16px;
  font-weight: 600;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.download-btn:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.download-btn svg {
  width: 48px;
  height: 48px;
}

.download-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-align: right;
}

.download-store {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
}

.download-note {
  color: rgba(255, 255, 255, 0.9);
  font-style: italic;
  font-size: 1.0625rem;
}

/* ========================================
   Footer
   ======================================== */
.footer {
  background-color: var(--text);
  color: white;
  padding: 3rem 0 1rem;
}

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

.footer-section {
  text-align: right;
}

.footer-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--primary);
}

.footer-desc {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 1.5rem;
}

.footer-social {
  display: flex;
  gap: 1rem;
}

.social-link {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transition: var(--transition);
}

.social-link:hover {
  background-color: var(--primary);
  transform: translateY(-3px);
}

.social-link svg {
  width: 20px;
  height: 20px;
}

.footer-heading {
  font-size: 1.125rem;
  margin-bottom: 1rem;
  color: white;
}

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

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

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--primary);
  padding-right: 5px;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
}

.footer-made {
  margin-top: 0.5rem;
  font-size: 0.875rem;
}

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

/* Tablet */
@media (max-width: 768px) {
  :root {
    --spacing-xl: 3rem;
  }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  
  .container {
    padding: 0 var(--spacing);
  }

  /* Navigation */
  .nav-links {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background-color: var(--surface);
    flex-direction: column;
    padding: 2rem;
    box-shadow: 0 4px 12px var(--shadow);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
  }

  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  /* Hero */
  .hero {
    padding: 6rem 0 3rem;
  }

  .hero .container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hero-content {
    text-align: center;
  }

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

  .hero-subtitle {
    font-size: 1.125rem;
  }

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

  .hero-image img {
    max-width: 300px;
  }

  /* Steps */
  .step,
  .step-reverse {
    grid-template-columns: 1fr;
    direction: rtl;
    text-align: center;
  }

  .step-number {
    margin: 0 auto;
  }

  .step-content {
    text-align: center;
  }

  /* About */
  .about-content {
    grid-template-columns: 1fr;
  }

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

  .about-stats {
    grid-template-columns: 1fr;
  }

  /* Footer */
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-section {
    text-align: center;
  }

  .footer-social {
    justify-content: center;
  }
}

/* Mobile */
@media (max-width: 480px) {
  :root {
    --spacing: 0.75rem;
    --spacing-lg: 1rem;
    --spacing-xl: 2rem;
  }

  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }

  .hero-title {
    font-size: 1.75rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .btn {
    padding: 0.875rem 1.5rem;
    font-size: 0.9375rem;
  }

  .section-title {
    font-size: 1.75rem;
  }

  .section-subtitle {
    font-size: 1rem;
  }

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

  .screenshots-gallery {
    grid-template-columns: 1fr;
  }

  .download-buttons {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Print styles */
@media print {
  .navbar,
  .mobile-menu-toggle,
  .download,
  .footer-social {
    display: none;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus visible for keyboard navigation */
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}
