/*
 * global.css — base resets, typography, utility classes.
 * Requires tokens.css to be loaded first.
 */

/* ── RESET ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-base);
  color: var(--fg-1);
  background: var(--bg-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-emerald); text-decoration: none; }
a:hover { color: var(--brand-emerald-dark); }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* Remove WP default body padding on admin bar */
@media screen { body.admin-bar .tsu-header { top: 32px; } }
@media screen and (max-width: 782px) { body.admin-bar .tsu-header { top: 46px; } }

/* ── CONTAINER ───────────────────────────────────────────── */
.container,
.tsu-container {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--wide { max-width: var(--container-max); }
.container--narrow { max-width: var(--content-narrow); }

/* ── TYPOGRAPHY ──────────────────────────────────────────── */
h1, .h1 {
  font-family: var(--font-display);
  font-size: var(--fs-h1);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-tight);
  line-height: var(--lh-tight);
  color: var(--fg-1);
  margin: 0;
  text-wrap: pretty;
}
h2, .h2 {
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-tight);
  line-height: var(--lh-snug);
  color: var(--fg-1);
  margin: 0;
  text-wrap: pretty;
}
h3, .h3 {
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-snug);
  line-height: var(--lh-snug);
  color: var(--fg-1);
  margin: 0;
}
h4, .h4 {
  font-family: var(--font-display);
  font-size: var(--fs-h4);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-snug);
  line-height: 1.3;
  color: var(--fg-1);
  margin: 0;
}
p { margin: 0; }
.body-lg {
  font-size: var(--fs-body-lg);
  line-height: var(--lh-base);
  color: var(--fg-2);
}
.small { font-size: var(--fs-sm); line-height: 1.5; color: var(--fg-2); }
.micro { font-size: var(--fs-xs); line-height: 1.4; color: var(--fg-3); }

/* Eyebrow label */
.eyebrow {
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--brand-emerald);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.eyebrow::before {
  content: '';
  display: inline-block;
  width: 28px;
  height: 1.5px;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-bright) 100%);
  box-shadow: 0 0 8px rgba(201,168,97,0.5);
  border-radius: 1px;
  flex-shrink: 0;
}
/* Gold eyebrow variant for dark sections */
.eyebrow--dark {
  color: var(--gold-bright);
}
.eyebrow--dark::before {
  background: linear-gradient(90deg, var(--gold-bright), var(--gold));
}

/* Secondary button (matches design reference btn--secondary) */
.btn--secondary {
  background: white;
  color: var(--brand-emerald);
  border: 1.5px solid var(--brand-emerald);
}
.btn--secondary:hover {
  background: var(--brand-emerald-tint);
  color: var(--brand-emerald-dark);
}

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  line-height: 1;
  white-space: nowrap;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition:
    background var(--dur-base) var(--ease-out),
    box-shadow  var(--dur-base) var(--ease-out),
    transform   var(--dur-fast) var(--ease-spring);
}
.btn:hover  { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--grad-primary);
  color: #fff;
  box-shadow: var(--shadow-brand);
}
.btn--primary:hover {
  background: var(--grad-primary-hover);
  box-shadow: var(--shadow-brand-lg);
  color: #fff;
}
.btn--outline {
  background: transparent;
  color: var(--brand-emerald);
  border: 1.5px solid var(--brand-emerald);
}
.btn--outline:hover {
  background: var(--brand-emerald-tint);
  color: var(--brand-emerald-dark);
}
.btn--outline-white {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.55);
}
.btn--outline-white:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
}
.btn--whatsapp {
  background: linear-gradient(135deg, var(--whatsapp), var(--whatsapp-dark));
  color: #fff;
  box-shadow: 0 8px 20px rgba(37,211,102,0.28);
}
.btn--whatsapp:hover {
  box-shadow: 0 12px 28px rgba(37,211,102,0.40);
  color: #fff;
}
.btn--ghost {
  background: transparent;
  color: var(--fg-1);
  border: 1.5px solid var(--border-default);
}
.btn--ghost:hover { background: var(--bg-soft); }

.btn--sm { padding: 10px 18px; font-size: 12px; }
.btn--lg { padding: 16px 32px; font-size: 15px; }
.btn--xl { padding: 20px 40px; font-size: 16px; font-weight: var(--fw-bold); }
.btn--full { width: 100%; justify-content: center; }

/* ── SECTIONS ────────────────────────────────────────────── */
.section {
  padding-block: var(--section-pad-y);
}
.section--dark {
  background: var(--bg-dark);
  color: var(--fg-on-dark);
}
.section--soft {
  background: var(--bg-soft);
}
.section--emerald {
  background: var(--grad-primary);
  color: #fff;
}

/* ── CARDS ───────────────────────────────────────────────── */
.card {
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: box-shadow var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
}
.card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-4px);
}

/* ── ICON HELPER ─────────────────────────────────────────── */
.tsu-icon {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  stroke-width: 1.75;
}
.tsu-sprite { display: none !important; }

/* ── BREADCRUMBS ─────────────────────────────────────────── */
.tsu-breadcrumbs {
  font-size: var(--fs-sm);
  color: var(--fg-3);
  padding-block: var(--space-4);
}
.tsu-breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.tsu-breadcrumbs a {
  color: var(--fg-2);
  text-decoration: none;
}
.tsu-breadcrumbs a:hover { color: var(--brand-emerald); }
.tsu-breadcrumbs__sep { display: flex; align-items: center; color: var(--ink-200); }
.tsu-breadcrumbs [aria-current="page"] { color: var(--fg-1); font-weight: 500; }

/* ── ACCESSIBILITY ───────────────────────────────────────── */
.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;
}
:focus-visible {
  outline: 2px solid var(--brand-emerald);
  outline-offset: 2px;
}

/* ── MAIN CONTENT AREA ───────────────────────────────────── */
.tsu-main {
  /* Push below the fixed header (header pill ~64px + wrapper padding 16px) */
  padding-top: 96px;
  min-height: 60vh;
}
.tsu-main--home { padding-top: 0; } /* Hero handles its own top padding */

/* Full-bleed homepage sections — strip WP content width constraints */
.tsu-main--home .wp-block-post-content { max-width: none !important; padding: 0 !important; margin: 0 !important; }
.tsu-main--home .wp-block-html { margin: 0 !important; max-width: none !important; }

/* ── RTL / ARABIC ────────────────────────────────────────── */
.tsu-arabic, [dir="rtl"] {
  font-family: var(--font-body-ar);
}
.tsu-arabic h1, .tsu-arabic h2, .tsu-arabic h3, .tsu-arabic h4,
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4 {
  font-family: var(--font-display-ar);
  letter-spacing: 0;
}
