/*
 * assets/css/style.css — base editorial styling for thebestvpn.it.com.
 * Original stylesheet written for this site; long-form-reading oriented
 * (generous line length limits, serif-leaning headings) rather than the
 * dense comparison-table look of a rankings-first site.
 *
 * Shared across all 6 languages/templates. RTL is handled via [dir="rtl"]
 * overrides near the bottom rather than a separate stylesheet, so layout
 * fixes only need to happen in one place.
 */

:root {
  --color-bg: #fbfaf8;
  --color-text: #1c1a17;
  --color-muted: #5b564e;
  --color-border: #e4dfd6;
  --color-accent: #0b5d4a;
  --color-accent-contrast: #ffffff;
  --color-card-bg: #ffffff;
  --font-body: Georgia, 'Times New Roman', serif;
  --font-ui: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --measure: 68ch;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.65;
}

.wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--color-accent);
  color: var(--color-accent-contrast);
  padding: 0.5rem 1rem;
  z-index: 100;
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

/* Header */
.site-header {
  border-bottom: 1px solid var(--color-border);
  font-family: var(--font-ui);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
  flex-wrap: wrap;
}
.brand {
  font-family: var(--font-body);
  font-weight: bold;
  font-size: 1.35rem;
  color: var(--color-text);
  text-decoration: none;
}
.main-nav { display: flex; gap: 1.1rem; flex-wrap: wrap; margin-inline-start: auto; }
.main-nav a { color: var(--color-muted); text-decoration: none; font-size: 0.95rem; }
.main-nav a:hover { color: var(--color-accent); }
.lang-switch select {
  font-family: var(--font-ui);
  padding: 0.3rem 0.5rem;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: var(--color-card-bg);
  color: var(--color-text);
}

/* Breadcrumbs */
.breadcrumbs { font-family: var(--font-ui); font-size: 0.85rem; padding: 0.75rem 0; color: var(--color-muted); }
.breadcrumbs ol { list-style: none; display: flex; gap: 0.4rem; padding: 0; margin: 0; flex-wrap: wrap; }
.breadcrumbs li:not(:last-child)::after { content: '/'; margin-inline-start: 0.4rem; color: var(--color-border); }
.breadcrumbs a { color: var(--color-muted); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }

/* Main content */
main { padding: 1.5rem 1.25rem 3rem; }
h1, h2, h3 { line-height: 1.25; }
h1 { font-size: 2rem; margin: 0.2rem 0 0.75rem; }
h2 { font-size: 1.4rem; margin-top: 2rem; }
article > header .dek,
.review-header .dek,
.guide-header .dek,
.comparison-header .dek {
  font-family: var(--font-ui);
  font-size: 1.15rem;
  color: var(--color-muted);
  max-width: var(--measure);
}
.byline { font-family: var(--font-ui); font-size: 0.85rem; color: var(--color-muted); }

.review-body, .guide-body, .comparison-body, .page-body, .intro_html, .home-hero, .home-what-matters, .home-how-we-test {
  max-width: var(--measure);
}
.review-body p, .guide-body p, .comparison-body p, .page-body p { margin: 0 0 1.1em; }

/* CTA buttons */
.cta {
  display: inline-block;
  font-family: var(--font-ui);
  background: var(--color-accent);
  color: var(--color-accent-contrast);
  text-decoration: none;
  padding: 0.6rem 1.1rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: 0.75rem;
}
.cta:hover { opacity: 0.9; }
.comparison-cta-row { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* Provider / guide cards */
.provider-cards, .guide-cards, .listing-items {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.provider-card, .guide-cards li {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 1rem;
}
.provider-card h3, .guide-cards h3 { margin-top: 0; font-size: 1.1rem; }

/* Pros/cons */
.review-pros-cons { display: grid; gap: 1.5rem; grid-template-columns: 1fr 1fr; max-width: var(--measure); margin-top: 2rem; }
.review-pros-cons ul { padding-inline-start: 1.2rem; }
@media (max-width: 560px) { .review-pros-cons { grid-template-columns: 1fr; } }

/* FAQ */
.faq-item { margin-bottom: 1.25rem; max-width: var(--measure); }
.faq-item h3 { font-size: 1.05rem; margin-bottom: 0.3rem; }

/* Listing index */
.listing-items li { list-style: none; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--color-border);
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--color-muted);
  padding: 2rem 0;
  margin-top: 3rem;
}
.affiliate-disclosure { max-width: var(--measure); }
.footer-links a { color: var(--color-muted); }

/* RTL (Arabic) */
[dir="rtl"] { text-align: right; }
[dir="rtl"] .breadcrumbs li:not(:last-child)::after { content: '\\'; }

/* Dark mode: respect OS preference since this is a real site, not an artifact */
@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #16140f;
    --color-text: #ece8e0;
    --color-muted: #a39c8e;
    --color-border: #34302a;
    --color-accent: #35c69a;
    --color-accent-contrast: #06231b;
    --color-card-bg: #1f1c17;
  }
}
