/* ============================================
   YURTS.DEV v2 — Services Page
   Extends the base Monochrome Premium theme (../styles.css).
   Uses logical properties so the Arabic (RTL) page shares this file.
   ============================================ */

/* ---------- Page shell ---------- */
.svc-page main {
  position: relative;
  z-index: 1;
}

.svc-section {
  position: relative;
  z-index: 1;
  padding: 96px 0;
}

.svc-section + .svc-section {
  padding-top: 24px;
}

.svc-header {
  max-width: 720px;
  margin-bottom: 40px;
}

.svc-header.centered {
  margin-inline: auto;
  text-align: center;
}

.svc-lead {
  margin-top: 16px;
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-secondary);
}

/* ---------- Nav: language switch + current page ---------- */
.nav-lang {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  padding: 4px 12px;
  transition: var(--transition);
}

.nav-lang:hover {
  color: var(--text-primary);
  border-color: var(--text-secondary);
}

.nav-link[aria-current="page"] {
  color: var(--text-primary);
}

.nav-link[aria-current="page"] span {
  transform: translateY(-100%);
}

/* ---------- Hero ---------- */
.svc-hero {
  position: relative;
  z-index: 1;
  padding: 168px 24px 72px;
  text-align: center;
}

.svc-hero .hero-content {
  max-width: 780px;
  margin: 0 auto;
}

.svc-hero .hero-subtitle {
  max-width: 660px;
  margin-bottom: 36px;
}

.svc-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
}

.svc-pill {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 8px 14px;
}

/* ---------- Grids ---------- */
.svc-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

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

.svc-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.bento-card.is-featured {
  border-color: rgba(var(--fg-rgb), 0.16);
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(var(--fg-rgb), 0.05), transparent 60%),
    var(--bg-surface);
}

.card-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.card-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.card-text {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.card-price-inline {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-primary);
  background: rgba(var(--fg-rgb), 0.06);
  border-radius: var(--radius-pill);
  padding: 4px 10px;
  margin-bottom: 16px;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.card-link:hover {
  opacity: 0.8;
}

.svc-analogy {
  margin-top: 20px;
  text-align: center;
  font-size: 15px;
  color: var(--text-muted);
}

.svc-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background: rgba(var(--fg-rgb), 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  margin-bottom: 18px;
}

.svc-icon svg {
  width: 18px;
  height: 18px;
}

/* ---------- Pricing ---------- */
.price-card {
  display: flex;
  flex-direction: column;
  padding: 36px;
}

.price-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.price-name {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.price-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--bg-primary);
  background: var(--text-primary);
  border-radius: var(--radius-pill);
  padding: 4px 10px;
  white-space: nowrap;
}

.price-amount {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.price-value {
  font-size: 56px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--text-primary);
}

.price-per {
  font-size: 14px;
  color: var(--text-muted);
}

.price-local {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.price-tagline {
  margin: 18px 0 22px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--text-primary);
}

.price-includes {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.check-list {
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-bottom: 28px;
  flex: 1;
}

.check-list li {
  position: relative;
  padding-inline-start: 26px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-secondary);
}

.check-list li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 4px;
  width: 16px;
  height: 16px;
  background-color: var(--text-primary);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
}

.check-list li strong {
  color: var(--text-primary);
  font-weight: 600;
}

.price-card .btn {
  width: 100%;
}

.price-note {
  margin-top: 20px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
  text-align: center;
}

/* ---------- Comparison table ---------- */
.compare-wrap {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.compare-table th,
.compare-table td {
  padding: 16px 24px;
  text-align: start;
  border-bottom: 1px solid var(--border-subtle);
}

.compare-table tr:last-child td {
  border-bottom: none;
}

.compare-table thead th {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  background: rgba(var(--fg-rgb), 0.02);
}

.compare-table td {
  color: var(--text-secondary);
}

.compare-table th:not(:first-child),
.compare-table td:not(:first-child) {
  text-align: center;
  width: 150px;
  color: var(--text-primary);
}

.compare-table .col-featured {
  background: rgba(var(--fg-rgb), 0.025);
}

.cmp-yes {
  display: inline-block;
  width: 18px;
  height: 18px;
  vertical-align: middle;
  background-color: var(--text-primary);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
}

.cmp-no {
  color: var(--text-muted);
}

.cmp-num {
  font-family: var(--font-mono);
  font-weight: 600;
}

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

/* ---------- Steps ---------- */
.step-num {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.step-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

/* ---------- FAQ ---------- */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 820px;
  margin-inline: auto;
}

.faq-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: border-color var(--transition);
}

.faq-item[open],
.faq-item:hover {
  border-color: var(--border-hover);
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 400;
  color: var(--text-muted);
  transition: transform var(--transition);
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item p {
  padding: 0 24px 22px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
}

/* ---------- Contact CTA additions ---------- */
.svc-page .contact-subtitle {
  max-width: 520px;
  margin-inline: auto;
}

.btn svg {
  flex-shrink: 0;
  margin-inline-end: 8px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .svc-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .svc-grid-3 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .svc-hero {
    padding: 128px 20px 48px;
  }

  .svc-section {
    padding: 64px 0;
  }

  .svc-grid-2,
  .svc-grid-4 {
    grid-template-columns: 1fr;
  }

  .price-card {
    padding: 28px 24px;
  }

  .price-value {
    font-size: 48px;
  }

  .compare-table th,
  .compare-table td {
    padding: 14px 12px;
    font-size: 14px;
  }

  .compare-table th:not(:first-child),
  .compare-table td:not(:first-child) {
    width: 72px;
  }

  .compare-table thead th {
    letter-spacing: 1px;
    font-size: 10px;
  }

  .svc-pills {
    margin-top: 28px;
  }

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

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

}

/* ---------- Arabic (RTL) ---------- */
/* Letter-spacing and uppercase break Arabic letter joining, so every
   spaced/uppercased label is reset for the RTL page. */
[dir="rtl"] body {
  font-family: 'IBM Plex Sans Arabic', var(--font-main);
}

[dir="rtl"] .hero-title,
[dir="rtl"] .section-title,
[dir="rtl"] .contact-title,
[dir="rtl"] .card-title,
[dir="rtl"] .price-value {
  letter-spacing: 0;
  line-height: 1.3;
}

[dir="rtl"] .hero-label,
[dir="rtl"] .section-label,
[dir="rtl"] .card-kicker,
[dir="rtl"] .price-includes,
[dir="rtl"] .compare-table thead th {
  font-family: 'IBM Plex Sans Arabic', var(--font-main);
  letter-spacing: 0;
  text-transform: none;
  font-size: 13px;
}

[dir="rtl"] .svc-pill,
[dir="rtl"] .step-num,
[dir="rtl"] .price-local {
  font-family: 'IBM Plex Sans Arabic', var(--font-mono);
}

[dir="rtl"] .card-link svg {
  transform: scaleX(-1);
}

[dir="rtl"] .mobile-menu a {
  font-family: 'IBM Plex Sans Arabic', var(--font-main);
}

/* ---------- Terms: icons draw themselves once the card is on screen ---------- */
.term-icon {
  width: 30px;
  height: 30px;
  margin-bottom: 18px;
  color: var(--text-primary);
}
.term-icon * { stroke-dasharray: 80; stroke-dashoffset: 0; }
.js .term-card:not(.visible) .term-icon * { stroke-dashoffset: 80; }
.js .term-card .term-icon * { transition: stroke-dashoffset 0.9s cubic-bezier(.2,.8,.2,1) 0.15s; }
.term-card:hover .term-icon { transform: translateY(-1px); }

/* ---------- Process: one line connects the four steps and fills as you scroll ---------- */
.timeline { position: relative; }
.timeline-track {
  position: absolute;
  left: 0; top: 0; width: 0;
  height: 2px;
  background: var(--border-subtle);
  border-radius: 2px;
  z-index: 2;
  overflow: hidden;
}
.timeline-fill {
  display: block; height: 100%;
  background: var(--text-primary);
  transform-origin: left;
  transform: scaleX(var(--tl, 1));
  transition: transform 0.25s linear;
}
[dir="rtl"] .timeline-fill { transform-origin: right; }
[dir="rtl"] .step-dot { left: auto; right: 30px; }
.timeline-step { position: relative; z-index: 1; }
/* Each dot sits on its card’s top edge, so the track reads as one rail. */
.step-dot {
  position: absolute; top: -7px; left: 30px; z-index: 3;
  width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid var(--text-primary);
  background: var(--text-primary);
  transition: background 0.3s, box-shadow 0.3s;
}
.timeline[data-progress] .timeline-step:not(.is-reached) .step-dot { background: var(--bg-surface); border-color: var(--border-strong); }
.timeline[data-progress] .timeline-step.is-reached .step-dot { box-shadow: 0 0 0 5px rgba(var(--fg-rgb), 0.08); }
.timeline[data-progress] .timeline-step:not(.is-reached) .step-title { color: var(--text-secondary); }
.timeline-step .step-title { transition: color 0.3s; }

@media (max-width: 1024px) {
  .timeline-track { display: none; }
}

/* Single column: short vertical links join each dot to the card above. */
@media (max-width: 768px) {
  .timeline-step + .timeline-step::before {
    content: "";
    position: absolute;
    top: -17px;
    left: 35px;
    width: 2px;
    height: 12px;
    background: var(--border-strong);
    transition: background 0.3s;
  }
  [dir="rtl"] .timeline-step + .timeline-step::before { left: auto; right: 35px; }
  .timeline-step.is-reached + .timeline-step.is-reached::before { background: var(--text-primary); }
}

@media (prefers-reduced-motion: reduce) {
  .term-icon *, .js .term-card:not(.visible) .term-icon * { stroke-dashoffset: 0 !important; transition: none !important; }
  .timeline-fill, .step-dot { transition: none !important; }
}
