/* ── Design tokens — the ONLY place colours are defined. Every page loads this file,
      so var() is always defined (MDT's shared-include blocker cannot happen here). ── */
:root {
    --primary: #14213d;        /* deep navy */
    --primary-2: #1f3158;      /* navy, lighter (gradients) */
    --primary-3: #2b4373;
    --accent: #b08d57;         /* muted gold */
    --accent-hover: #94743f;
    --accent-soft: #f6efe3;    /* gold tint backgrounds */
    --text: #1c2230;
    --muted: #5b6577;
    --line: #e3e6ec;
    --bg-soft: #f6f7f9;
    --white: #fff;
    --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
    --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

@font-face { font-family: 'Newsreader'; font-style: normal; font-weight: 500 700; font-display: swap; src: url(/fonts/newsreader-var.woff2) format('woff2'); }

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--sans); color: var(--text); line-height: 1.65; background: var(--white); }
h1, h2, h3 { font-family: var(--serif); color: var(--primary); font-weight: 600; line-height: 1.15; font-optical-sizing: auto; letter-spacing: -0.2px; }
a { color: var(--primary-3); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }

/* ── Layout ── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* ── Header ── */
.site-header { background: var(--white); padding: 14px 0; position: sticky; top: 0; z-index: 100; box-shadow: 0 1px 3px rgba(20,33,61,0.08); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.site-header a { color: var(--primary); text-decoration: none; }
.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo-mark { width: 40px; height: 40px; flex: none; }  /* small seal variant: the full seal (ring text) is unreadable below ~90px */
.logo-text { font-family: var(--serif); font-size: 21px; font-weight: 600; line-height: 1.1; letter-spacing: 0.2px; }
.logo-text span { display: block; font-family: var(--sans); font-size: 10.5px; font-weight: 600; letter-spacing: 3px; color: var(--accent); }
.header-cta { background: var(--primary); color: var(--white) !important; padding: 10px 22px; border-radius: 8px; font-weight: 600; font-size: 0.9rem; transition: background 0.2s; text-decoration: none; display: inline-block; }
.header-cta:hover { background: var(--primary-3); color: var(--white) !important; }

/* ── Top Nav ── */
.top-nav { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; justify-content: flex-end; }
.top-nav .nav-link { font-size: 0.92rem; color: var(--primary) !important; font-weight: 600; white-space: nowrap; position: relative; padding: 6px 2px; }
.top-nav .nav-link::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left center; transition: transform 0.22s ease; }
.top-nav .nav-link:hover::after { transform: scaleX(1); }
.top-nav .nav-sep { width: 1px; height: 18px; background: var(--line); display: inline-block; }
.top-nav .header-cta { margin-left: 6px; }
@media (max-width: 640px) {
    .site-header .container { flex-wrap: wrap; gap: 10px; }
    .top-nav { width: 100%; justify-content: center; gap: 20px; order: 2; padding-top: 8px; border-top: 1px solid var(--line); }
    .top-nav .header-cta { margin-left: auto; }
    .top-nav .nav-sep { display: none; }
}
@media (max-width: 400px) {
    .top-nav { gap: 14px; }
    .top-nav .nav-link { font-size: 0.85rem; }
    .top-nav .header-cta { padding: 8px 14px; font-size: 0.85rem; }
}

/* ── Hero (homepage + every subpage; lib/head.php sets the subpage background-image) ── */
.hero { position: relative; background-color: var(--primary); background-position: center; background-size: cover; background-repeat: no-repeat; color: var(--white); padding: 60px 20px; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(20,33,61,0.94) 0%, rgba(20,33,61,0.78) 45%, rgba(31,49,88,0.45) 100%); }
.hero .container { position: relative; z-index: 2; max-width: 900px; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.08); border: 1px solid rgba(176,141,87,0.55); border-radius: 50px; padding: 6px 16px; font-size: 0.82rem; font-weight: 500; margin-bottom: 20px; }
.hero h1 { color: var(--white); font-size: 2.7rem; margin: 0 0 16px; letter-spacing: -0.5px; }
.hero h1 .accent { color: #d9bf8f; }
.hero p { font-size: 1.05rem; color: rgba(255,255,255,0.8); margin: 0 0 28px; max-width: 600px; }
.hero-actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.btn-primary { display: inline-flex; align-items: center; gap: 8px; background: var(--accent); color: var(--white); padding: 14px 30px; border-radius: 10px; font-size: 1rem; font-weight: 600; transition: background 0.2s, transform 0.2s; text-decoration: none; box-shadow: 0 4px 14px rgba(176,141,87,0.35); }
.btn-primary:hover { background: var(--accent-hover); color: var(--white); transform: translateY(-1px); }
.btn-secondary { display: inline-flex; align-items: center; gap: 8px; background: transparent; color: rgba(255,255,255,0.92); padding: 14px 26px; border-radius: 10px; font-size: 1rem; font-weight: 500; border: 1px solid rgba(255,255,255,0.3); text-decoration: none; }
.btn-secondary:hover { background: rgba(255,255,255,0.08); color: var(--white); }
@media (max-width: 768px) { .hero { padding: 44px 20px; } .hero h1 { font-size: 2rem; } }
@media (max-width: 480px) { .hero h1 { font-size: 1.65rem; } .hero { padding: 36px 16px; } .hero-actions { flex-direction: column; align-items: stretch; } .btn-primary, .btn-secondary { justify-content: center; } }

/* ── CTA band (lib/cta-band.php) ── */
.cta-band { background: var(--primary) url("/images/cta.jpg") center/cover no-repeat; min-height: 360px; display: flex; align-items: center; justify-content: center; padding: 48px 20px; text-align: center; position: relative; overflow: hidden; }
.cta-band::before { content: ""; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(20,33,61,0.93) 0%, rgba(31,49,88,0.82) 100%); }
.cta-band .container { position: relative; z-index: 1; }
.cta-band h2 { font-size: 1.8rem; color: var(--white); margin: 0 0 10px; }
.cta-band p { color: rgba(255,255,255,0.78); font-size: 0.98rem; margin: 0 auto 24px; max-width: 560px; }

/* ── CTA section ── */
.cta-section { background: var(--bg-soft); padding: 50px 0; }
.cta-section h2 { font-size: 22px; text-align: center; margin-bottom: 8px; }
.cta-section p { text-align: center; color: var(--muted); margin-bottom: 30px; font-size: 15px; }

/* ── Cards (shared by home, services hub, languages, cities) ── */
.card { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 28px 24px; position: relative; transition: transform 0.2s, box-shadow 0.2s; }
.card::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 3px; background: var(--accent); opacity: 0; transition: opacity 0.2s; }
.card:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(20,33,61,0.08); }
.card:hover::before { opacity: 1; }
.card-icon { width: 44px; height: 44px; border-radius: 50%; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.card-icon svg { width: 22px; height: 22px; stroke: var(--primary); fill: none; stroke-width: 1.8; }

/* ── Content pages (services, languages, cities, guides — lib/page-parts.php) ── */
.breadcrumb { padding: 14px 0; font-size: 0.82rem; color: var(--muted); }
.content-section { padding: 40px 0; }
.content-section .container, .faq-section .container { max-width: 860px; }
.content-section h2 { font-size: 1.45rem; margin: 30px 0 10px; }
.content-section h2:first-child { margin-top: 0; }
.content-section p { margin-bottom: 14px; }
.content-section ul { margin: 0 0 16px 22px; }
.content-section li { margin-bottom: 6px; }
.note-box { background: var(--accent-soft); border-left: 4px solid var(--accent); border-radius: 0 10px 10px 0; padding: 18px 22px; margin: 30px 0 0; }
.note-box h3 { font-size: 1.05rem; margin-bottom: 6px; }
.note-box p { margin: 0 0 6px; font-size: 0.95rem; }
.languages-section { background: var(--bg-soft); padding: 36px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.languages-section h2 { font-size: 1.35rem; margin-bottom: 16px; }
.lang-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.lang-tag { background: var(--white); border: 1px solid var(--line); border-radius: 6px; padding: 5px 12px; font-size: 0.82rem; color: var(--primary); }
a.lang-tag { text-decoration: none; }
a.lang-tag:hover { border-color: var(--accent); }
.faq-section { padding: 40px 0; }
.faq-section h2 { font-size: 1.45rem; margin-bottom: 18px; }
.faq-item { border: 1px solid var(--line); border-radius: 8px; margin-bottom: 10px; overflow: hidden; }
.faq-item summary { padding: 15px 20px; font-weight: 600; color: var(--primary); cursor: pointer; background: var(--bg-soft); list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; float: right; color: var(--accent); font-weight: 700; }
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p { padding: 12px 20px 16px; font-size: 0.95rem; color: var(--text); }
.page-cta { text-align: center; margin-top: 28px; }
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card-grid a.card { display: block; text-decoration: none; color: inherit; }
.card-grid .card h3 { font-size: 1.1rem; margin-bottom: 6px; }
.card-grid .card p { font-size: 0.9rem; color: var(--muted); }
@media (max-width: 900px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .card-grid { grid-template-columns: 1fr; } }
.reviewed { font-size: 0.85rem; color: var(--muted); margin-bottom: 18px; }
.sources { font-size: 0.85rem; word-break: break-all; }

/* ── Subtle motion: sections fade up as they enter the viewport. JS (footer.php) adds .js-reveal only when
      IntersectionObserver exists and the visitor has not asked for reduced motion, so content is never hidden otherwise. ── */
.js-reveal .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js-reveal .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js-reveal .reveal { opacity: 1; transform: none; transition: none; } }

/* ── Mobile quote bar (footer.php): always one tap from a quote on phones ── */
.mobile-quote { display: none; }
@media (max-width: 640px) {
    .mobile-quote { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 200; gap: 10px; align-items: center; justify-content: space-between;
        padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(20,33,61,0.97); box-shadow: 0 -6px 20px rgba(20,33,61,0.25); }
    .mobile-quote span { color: rgba(255,255,255,0.85); font-size: 0.85rem; }
    .mobile-quote a { background: var(--accent); color: var(--white); padding: 10px 18px; border-radius: 8px; font-weight: 700; font-size: 0.92rem; text-decoration: none; white-space: nowrap; }
    body.has-mobile-quote { padding-bottom: 66px; }
}

/* ── Language switcher (lib/header.php, translated core pages only) ── */
.lang-switch { position: relative; margin-left: 4px; }
.lang-switch summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px; font-size: 0.82rem; font-weight: 600; color: var(--primary); background: var(--white); }
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-switch summary svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.lang-switch ul { list-style: none; position: absolute; right: 0; top: calc(100% + 6px); z-index: 300; min-width: 180px; max-height: 360px; overflow-y: auto; background: var(--white); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 30px rgba(20,33,61,0.14); padding: 6px 0; }
.lang-switch li a { display: block; padding: 7px 16px; font-size: 0.88rem; color: var(--text); text-decoration: none; }
.lang-switch li a:hover { background: var(--bg-soft); }
.lang-switch li a[aria-current] { font-weight: 700; color: var(--primary); background: var(--accent-soft); }
/* ── Right-to-left (Arabic) ── */
[dir="rtl"] .top-nav .header-cta { margin-left: 0; margin-right: 6px; }
[dir="rtl"] .lang-switch ul { right: auto; left: 0; }
[dir="rtl"] .card::before { left: auto; right: 0; }
[dir="rtl"] .note-box { border-left: 0; border-right: 4px solid var(--accent); border-radius: 10px 0 0 10px; }
[dir="rtl"] .content-section ul, [dir="rtl"] .tier ul { margin: 0 22px 16px 0; }
[dir="rtl"] .faq-item summary::after, [dir="rtl"] .faq summary::after { float: left; }
[dir="rtl"] .pills a::after { content: "←"; }
[dir="rtl"] .trust span::before { margin-right: 0; margin-left: 7px; }
