/*
 Theme Name:   GeneratePress Child
 Theme URI:    https://generatepress.com
 Description:  Default GeneratePress child theme
 Author:       Tom Usborne
 Author URI:   https://tomusborne.com
 Template:     generatepress
 Version:      0.1
*/

/*
Theme Name: RSM Healthcare Child
Template: generatepress
Description: Shared styles used across every page (header, footer, buttons, CTA form).
Page-specific sections (hero, services ledger, testimonials, etc.) live in home.css.

NOTE: If your child theme already has a style.css with its own theme
header (Theme Name / Template lines), keep that header as-is and just
append everything below the header comment block into your existing file.
*/

:root {
  --ink: #10233f;
  --ink-2: #16305a;
  --parchment: #f6f1e7;
  --parchment-2: #eee6d3;
  --stone: #c9c2af;
  --stone-2: #dad3c1;
  --charcoal: #211f1b;
  --charcoal-soft: #4a463e;
  --brass: #a9824a;
  --brass-deep: #8c6b39;
  --brass-light: #c9a56b;
  --shadow-ink: 16, 35, 63;
  --radius-s: 3px;
  --radius-m: 6px;
  --container: 1240px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  /* Font identity — English is the default */
  --font-heading: "Fraunces", serif;
  --font-body: "IBM Plex Sans", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
}

/* Arabic override — kicks in whenever <html lang="ar"> */
html[lang="ar"] {
  --font-heading: "Zain", serif;
  --font-body: "Noto Kufi Arabic", sans-serif;
  --font-mono: "Noto Kufi Arabic", monospace;
}

/* ---------- RESET ---------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: var(--font-body);
  background: var(--parchment);
  color: var(--charcoal);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
  text-wrap: balance;
}

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

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

.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--parchment);
  padding: 12px 20px;
  z-index: 1000;
  border-radius: 0 0 var(--radius-s) 0;
}

.skip-link:focus {
  left: 0;
}

:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}

/* ---------- SHARED TYPOGRAPHY HELPERS ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass-deep);
  display: flex;
  align-items: center;
  gap: 10px;
  direction: ltr;
  width: fit-content;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--brass-deep);
}

[dir="rtl"] .eyebrow::before {
  order: 2;
}

/* ---------- SHARED BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 11px 22px;
  border-radius: 2px;
  transition:
    transform 0.2s var(--ease),
    background 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.btn-primary {
  background: var(--ink);
  color: var(--parchment);
  box-shadow: 0 6px 16px -6px rgba(var(--shadow-ink), 0.55);
}

.btn-primary:hover {
  background: var(--ink-2);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0) scale(0.98);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  color: var(--ink);
  padding-bottom: 2px;
  border-bottom: 1px solid var(--stone);
  transition:
    border-color 0.25s var(--ease),
    gap 0.25s var(--ease);
}

.link-arrow:hover {
  border-color: var(--brass);
  gap: 12px;
}

.link-arrow img {
  width: 14px;
  height: 14px;
}

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

/* ---------- SHARED SECTION HEADERS ---------- */
.section {
  padding: 110px 0;
}

.section-head {
  max-width: 640px;
  margin-bottom: 64px;
}

.section-head h2 {
  font-size: clamp(30px, 3.4vw, 42px);
  margin-top: 16px;
  font-weight: 500;
}

/* ---------- HEADER ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(246, 241, 231, 0.86);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--stone-2);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
}

.logo img.custom-logo {
  max-height: 36px;
  width: auto;
}

.logo .mark {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--brass);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--brass-deep);
  flex: none;
}

nav.primary {
  display: flex;
  align-items: center;
  gap: 38px;
}

nav.primary ul {
  margin: 0;
  list-style: none;
  display: flex;
  gap: 32px;
  font-size: 14.5px;
  font-weight: 500;
}

nav.primary a {
  position: relative;
  padding: 4px 0;
  color: var(--charcoal-soft);
  transition: color 0.25s var(--ease);
}

nav.primary a:hover {
  color: var(--ink);
}

nav.primary a.active {
  color: var(--ink);
}

nav.primary a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--brass);
}

.lang-item {
  list-style: none;
}

.lang-item a {
  font-weight: bold;
  border: 1px solid #10233f;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  letter-spacing: 0.01em;
  padding: 11px 22px;
  border-radius: 2px;
  transition:
    transform 0.2s var(--ease),
    background 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
  cursor: pointer;
  font-family: inherit;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.lang-tog {
  font-size: 13px;
  color: var(--charcoal-soft);
  border: 1px solid var(--stone);
  border-radius: 20px;
  padding: 5px 12px;
  transition: 0.25s var(--ease);
  display: flex;
  align-items: center;
  gap: 6px;
}

.lang-tog:hover {
  border-color: var(--brass);
  color: var(--ink);
}

.lang-tog img {
  width: 14px;
  height: 14px;
  display: inline-block;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
}

/* ---------- MOBILE DRAWER ---------- */
.mobile-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(16, 35, 63, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
  z-index: 150;
}

.mobile-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: -320px;
  width: 300px;
  max-width: 82vw;
  height: 100%;
  background: var(--parchment);
  z-index: 160;
  box-shadow: -20px 0 50px -20px rgba(var(--shadow-ink), 0.5);
  transition: right 0.35s var(--ease);
  display: flex;
  flex-direction: column;
  padding: 28px 26px;
}

[dir="rtl"] .mobile-drawer {
  right: auto;
  left: -320px;
  box-shadow: 20px 0 50px -20px rgba(var(--shadow-ink), 0.5);
  transition: left 0.35s var(--ease);
}

.mobile-drawer.active {
  right: 0;
}

[dir="rtl"] .mobile-drawer.active {
  left: 0;
}

.mobile-drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 36px;
}

.mobile-drawer-close {
  background: none;
  border: none;
  cursor: pointer;
}

.mobile-drawer nav ul {
  list-style: none;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.mobile-drawer nav a {
  display: block;
  padding: 14px 4px;
  font-size: 17px;
  font-weight: 500;
  color: var(--charcoal-soft);
  border-bottom: 1px solid var(--stone-2);
}

.mobile-drawer nav a.active,
.mobile-drawer nav a:hover {
  color: var(--ink);
}

.mobile-drawer-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mobile-drawer-footer .lang-tog {
  justify-content: center;
}

.mobile-drawer-footer .btn-primary {
  justify-content: center;
}

/* ---------- CTA / FORM (reused on home + single-services) ---------- */
.cta-section {
  padding: 110px 0;
  background: var(--ink);
  color: var(--parchment);
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: "";
  position: absolute;
  top: -140px;
  right: -140px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  border: 1px solid rgba(201, 165, 107, 0.25);
}

[dir="rtl"] .cta-section::before {
  right: auto;
  left: -140px;
}

.cta-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 64px;
}

.cta-copy .eyebrow {
  color: var(--brass-light);
}

.cta-copy .eyebrow::before {
  background: var(--brass-light);
}

.cta-copy h2 {
  color: var(--parchment);
  font-size: clamp(28px, 3.2vw, 38px);
  margin-top: 16px;
}

.cta-copy p {
  color: rgba(246, 241, 231, 0.7);
  margin-top: 18px;
  max-width: 44ch;
  font-size: 15.5px;
}

.cta-phone {
  margin-top: 34px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.cta-phone .ic {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(201, 165, 107, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cta-phone a {
  font-family: var(--font-mono);
  font-size: 17px;
  color: var(--parchment);
}

.cta-phone span {
  display: block;
  font-size: 12px;
  color: rgba(246, 241, 231, 0.55);
}

form.consult {
  background: var(--parchment);
  border-radius: var(--radius-m);
  padding: 36px;
  color: var(--charcoal);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--charcoal-soft);
}

.field input,
.field select,
.field textarea {
  border: 1px solid var(--stone);
  border-radius: 2px;
  padding: 11px 13px;
  font-family: inherit;
  font-size: 14.5px;
  background: #fff;
  color: var(--charcoal);
  transition:
    border-color 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--brass);
  box-shadow: 0 0 0 3px rgba(169, 130, 74, 0.15);
  outline: none;
}

.field.invalid input,
.field.invalid select {
  border-color: #b4433a;
}

.field-error {
  font-size: 12px;
  color: #b4433a;
  display: none;
}

.field.invalid .field-error {
  display: block;
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 18px 0 22px;
  font-size: 13px;
  color: var(--charcoal-soft);
}

.consent input {
  margin-top: 3px;
}

.form-status {
  font-size: 13.5px;
  margin-top: 14px;
  display: none;
}

.form-status.success {
  display: block;
  color: #3d6b4c;
}

/* ---------- FOOTER (shared on every page) ---------- */
footer {
  background: var(--parchment-2);
  padding: 80px 0 32px;
  border-top: 1px solid var(--stone-2);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr 1fr;
  gap: 48px;
  padding-bottom: 56px;
}

.footer-brand .logo {
  margin-bottom: 16px;
}

.footer-brand p {
  font-size: 14px;
  color: var(--charcoal-soft);
  max-width: 34ch;
  line-height: 1.6;
}

.footer-social {
  display: flex;
  gap: 12px;
  margin-top: 22px;
}

.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--stone);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.25s var(--ease);
}

.footer-social a:hover {
  border-color: var(--brass);
  background: rgba(169, 130, 74, 0.08);
}

.footer-social img {
  width: 15px;
  height: 15px;
}

.footer-col h5 {
  font-family: var(--font-mono);
  font-size: 18px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brass-deep);
  margin-bottom: 18px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin: 0;
}

.footer-col a {
  font-size: 14px;
  color: var(--charcoal-soft);
  transition: color 0.2s var(--ease);
}

.footer-col a:hover {
  color: var(--ink);
}

.footer-contact li {
  display: flex;
  gap: 10px;
  font-size: 13.5px;
  color: var(--charcoal-soft);
  align-items: flex-start;
}

.footer-contact img {
  width: 15px;
  height: 15px;
  margin-top: 2px;
  flex: none;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 26px;
  border-top: 1px solid var(--stone-2);
  font-size: 13px;
  color: var(--charcoal-soft);
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom a {
  margin-left: 20px;
}

[dir="rtl"] .footer-bottom a {
  margin-left: 0;
  margin-right: 20px;
}

.footer-bottom a:hover {
  color: var(--ink);
}

.custom-logo {
  width: 160px;
}

/* ---------- SHARED RESPONSIVE (header / footer / form) ---------- */
@media (max-width: 980px) {
  .menu-toggle {
    display: flex !important;
    justify-content: end;
  }
  .wrap {
    padding: 20px;
  }
  .header-actions > .lang-item {
    display: none;
  }
  .lang-item {
    width: 100%;
  }
  .lang-item a {
    width: 100%;
    justify-content: center;
  }
  nav.primary ul,
  .header-actions .btn-primary,
  .header-actions .lang-tog {
    display: none;
  }

  .cta-grid {
    grid-template-columns: 1fr;
    justify-content: center;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    row-gap: 40px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 786px) {
  .menu-toggle {
    display: flex;
    justify-content: end;
  }
}
@media (max-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 72px 0;
  }
}
