/* =========================================
   Ultimate Telegram Media Downloader
   Documentation / Getting Started Page
   ========================================= */

:root {
  --bg: #ffffff;
  --surface: #f7f8fa;
  --surface-strong: #eef1f5;
  --text: #17191c;
  --muted: #68707c;
  --border: #e4e7eb;
  --primary: #226dd4;
  --primary-dark: #1b5db8;
  --radius: 20px;
  --shadow: 0 12px 35px rgba(20, 28, 40, 0.08);
  --container: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Helvetica,
    Arial,
    sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.container {
  width: min(calc(100% - 40px), var(--container));
  margin: 0 auto;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(228, 231, 235, 0.8);
}

.nav {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.brand-name {
  line-height: 110%;
}

.nav-button,
.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  font-weight: 700;
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.nav-button,
.primary-button {
  background: var(--primary);
  color: white;
}

.nav-button:hover,
.primary-button:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(34, 158, 217, 0.22);
}

.secondary-button {
  background: white;
  border: 1px solid var(--border);
}

.secondary-button:hover {
  background: var(--surface);
  transform: translateY(-1px);
}

/* Hero */

.hero {
  padding: 105px 0 95px;
  background:
    radial-gradient(
      circle at 50% 0%,
      rgba(34, 158, 217, 0.13),
      transparent 38%
    ),
    linear-gradient(180deg, #f9fcff 0%, #ffffff 100%);
  text-align: center;
}

.hero-content {
  max-width: 800px;
}

.badge,
.eyebrow {
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid rgba(34, 158, 217, 0.18);
  border-radius: 999px;
  background: rgba(34, 158, 217, 0.07);
  letter-spacing: 0;
  text-transform: none;
  font-size: 13px;
}

.hero h1 {
  margin: 22px 0 18px;
  font-size: clamp(42px, 6vw, 68px);
  line-height: 1.03;
  letter-spacing: -0.055em;
}

.hero p {
  max-width: 680px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 19px;
}

.hero-actions {
  margin-top: 32px;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Sections */

.steps-section,
.features-section,
.help-section {
  padding: 100px 0;
}

.features-section {
  background: var(--surface);
}

.section-heading {
  max-width: 700px;
  margin: 0 auto 65px;
  text-align: center;
}

.section-heading h2 {
  margin: 12px 0 12px;
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

/* Steps */

.step {
  padding: 60px 0;
  border-top: 1px solid var(--border);
}

.step:first-of-type {
  border-top: 0;
}

.step-number {
  margin-bottom: 28px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.12em;
}

.step-content {
  display: grid;
  grid-template-columns: minmax(280px, 0.75fr) minmax(420px, 1.25fr);
  align-items: center;
  gap: 70px;
}

.step:nth-of-type(even) .step-content {
  grid-template-columns: minmax(420px, 1.25fr) minmax(280px, 0.75fr);
}

.step:nth-of-type(even) .step-copy {
  order: 2;
}

.step:nth-of-type(even) .media-placeholder {
  order: 1;
}

.step-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.step-copy h3 {
  margin: 8px 0 15px;
  font-size: 34px;
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.step-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

.media-placeholder {
  min-height: 330px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 2px dashed #d8dde4;
  border-radius: var(--radius);
  background: var(--surface);
}

.media-placeholder span {
  margin-bottom: 15px;
  font-size: 42px;
}

.media-placeholder strong {
  font-size: 16px;
}

.media-placeholder small {
  margin-top: 5px;
  color: var(--muted);
}

/*
  When you have a real screenshot, replace the placeholder with:

  <img src="images/step-1-pin.png" alt="How to pin the extension">

  and add class="step-image" if desired.
*/

.step-image {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Features */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.feature-card {
  padding: 30px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.feature-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  border-radius: 13px;
  background: rgba(34, 158, 217, 0.09);
  font-size: 22px;
}

.feature-card h3 {
  margin: 0 0 8px;
  font-size: 19px;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

/* Help */

.help-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 35px;
  padding: 50px;
  border-radius: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.help-card h2 {
  margin: 10px 0;
  font-size: 32px;
  letter-spacing: -0.035em;
}

.help-card p {
  margin: 0;
  color: var(--muted);
}

.help-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

/* Footer */

.site-footer {
  padding: 30px 0;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.footer-content div {
  display: flex;
  gap: 20px;
}

.footer-content a:hover {
  color: var(--text);
}

/* Responsive */

@media (max-width: 800px) {
  .container {
    width: min(calc(100% - 28px), var(--container));
  }

  .nav {
    min-height: 64px;
  }

  .brand span:last-child {
    max-width: 190px;
    line-height: 1.15;
  }

  .hero {
    padding: 75px 0 70px;
  }

  .steps-section,
  .features-section,
  .help-section {
    padding: 70px 0;
  }

  .step-content,
  .step:nth-of-type(even) .step-content {
    grid-template-columns: 1fr;
    gap: 35px;
  }

  .step:nth-of-type(even) .step-copy,
  .step:nth-of-type(even) .media-placeholder {
    order: initial;
  }

  .step-copy h3 {
    font-size: 29px;
  }

  .media-placeholder {
    min-height: 260px;
  }

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

  .help-card {
    padding: 32px;
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-content {
    flex-direction: column;
  }
}

@media (max-width: 500px) {
  .nav-button {
    display: none;
  }

  .hero h1 {
    font-size: 42px;
  }

  .hero p {
    font-size: 17px;
  }

  .hero-actions,
  .help-actions {
    width: 100%;
  }

  .hero-actions a,
  .help-actions a {
    flex: 1;
  }

  .footer-content div {
    flex-direction: column;
    gap: 6px;
  }
}

/* Language selector and real screenshot cards */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.language-picker select {
  min-height: 44px;
  padding: 0 34px 0 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: white;
  color: var(--text);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

.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;
}

.step-media {
  margin: 0;
}

.step-image {
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--surface);
}

[dir="rtl"] .step-content,
[dir="rtl"] .help-card,
[dir="rtl"] .footer-content {
  direction: rtl;
}

@media (max-width: 800px) {
  .nav-actions {
    gap: 6px;
  }

  .language-picker select {
    max-width: 120px;
    min-height: 40px;
  }
}

@media (max-width: 500px) {
  .language-picker select {
    max-width: 105px;
    padding-left: 8px;
    padding-right: 20px;
  }
}
