/* =============================================================================
   MAI PHYSIOTHERAPY CLINIC: BASE STYLES (loaded first on every page)

   WHAT LIVES HERE   design tokens, reset, typography, and the components every page shares:
                     .wrap (content column), .back (back link), .lang (EN/AR button), .btn (buttons)
   WHAT DOES NOT     page layouts: css/home.css, css/service.css, css/page.css (exercises, tips, privacy)
                     the booking popup: css/booking.css

   HOW TO CHANGE THE LOOK
     Colours:  edit the tokens in :root below (light) and in the dark-mode block. Never hard-code a
               colour in a page file when a token exists.
     Fonts:    Bricolage Grotesque (headings), Source Sans 3 (text), Cairo (Arabic). They are loaded by the
               single Google Fonts <link> in each page <head>.
   ============================================================================= */

/* ---- 1. Design tokens ------------------------------------------------------- */
:root {
  /* The site is ALWAYS dark, in every browser (also TikTok / Instagram in-app browsers, which ignore the phone's theme). */
  color-scheme: dark;
  --bg: #15211A;        /* page background */
  --surface: #1D2B22;   /* soft panels, chips */
  --card: #233529;      /* cards, form fields */
  --ink: #EBF3E8;       /* main text */
  --muted: #B9CCB5;     /* secondary text */
  --pine: #A6DCA0;      /* brand green */
  --accent: #F2AC3A;    /* brand amber: Book buttons, highlights */
  --on-pine: #15211A;   /* text on green */
  --line: #3A5142;      /* borders and dividers */
}

/* ---- 2. Reset and typography ------------------------------------------------ */
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;scroll-padding-top:env(safe-area-inset-top,0px);overflow-x:hidden}
body{margin:0;background:var(--bg);color:var(--ink);font:400 1.0625rem/1.6 "Source Sans 3","El Messiri","Cairo",system-ui,sans-serif;overflow-x:hidden}
h1,h2,h3{font-family:"Bricolage Grotesque","El Messiri","Cairo","Trebuchet MS",sans-serif;line-height:1.2;margin:0}
a{color:inherit;text-decoration:none}
ul{list-style:none;padding:0;margin:0}
:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
[hidden]{display:none!important}

/* ---- 3. Layout helper ------------------------------------------------------- */
.wrap{max-width:720px;margin:0 auto;padding:0 1.25rem}   /* centred content column */

/* ---- 4. Shared components --------------------------------------------------- */
/* Back link (arrow flips automatically in Arabic) */
.back{font-weight:600;color:var(--muted);font-size:.95rem}
.back:hover{color:var(--ink)}
.back::before{content:"\2190\00a0"}
html[lang="ar"] .back::before{content:"\2192\00a0"}

/* English / Arabic switch button */
.lang{margin-inline-start:auto;border:2px solid var(--pine);background:transparent;color:var(--ink);padding:.15rem .85rem;border-radius:999px;font:600 .9rem "Source Sans 3","El Messiri","Cairo",system-ui,sans-serif;cursor:pointer}
.lang:hover{background:var(--pine);color:var(--on-pine)}

/* Buttons: .btn (green) + .accent (amber) + .ghost (outline). Works on <a> and <button>. */
.btn{display:inline-block;background:var(--pine);color:var(--on-pine);padding:.85rem 1.5rem;border:0;border-radius:999px;font-family:inherit;font-weight:600;font-size:1rem;cursor:pointer;touch-action:manipulation;transition:transform .2s}
.btn:hover{transform:translateY(-2px) scale(1.03)}
.btn.accent{background:var(--accent);color:#10241F}
.btn.ghost{background:transparent;color:var(--ink);border:2px solid var(--pine)}

/* Gentle attention pulse used on the main Book button */
.pulse{animation:pulse 2.4s infinite}
@keyframes pulse{0%{box-shadow:0 0 0 0 rgba(232,163,61,.6)}100%{box-shadow:0 0 0 18px rgba(232,163,61,0)}}

/* ---- 5. Arabic ---------------------------------------------------------------- */
html[lang="ar"] body,html[lang="ar"] .lang{font-family:"El Messiri","Cairo","Source Sans 3",system-ui,sans-serif}
html[lang="ar"] h1,html[lang="ar"] h2,html[lang="ar"] h3{font-family:"El Messiri","Cairo",sans-serif}
html[lang="ar"] *{letter-spacing:0!important}   /* negative tracking breaks Arabic letter joining */

/* ---- 6. Accessibility --------------------------------------------------------- */
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

/* clinic name link at the top of inner pages: gold, like the clinic name on the home page */
.back{color:#F3D88A;text-shadow:0 1px 0 rgba(0,0,0,.5)}
.back:hover{color:#F6BE5C}
html[lang="ar"] .back{font-family:"El Messiri","Cairo",sans-serif;font-weight:700}

/* 3D touch on every button: light top edge, dark bottom edge, presses down when tapped */
.btn{box-shadow:inset 0 1px 0 rgba(255,255,255,.45),inset 0 -3px 0 rgba(0,0,0,.2),0 10px 16px -8px rgba(0,0,0,.85)}
.btn:active{transform:translateY(2px);box-shadow:inset 0 1px 0 rgba(255,255,255,.3),inset 0 -1px 0 rgba(0,0,0,.2),0 4px 8px -4px rgba(0,0,0,.85)}
.btn.ghost,.btn.outline{box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 8px 14px -8px rgba(0,0,0,.85)}
.lang{box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 6px 10px -6px rgba(0,0,0,.9)}
