/* Perfect Co. - shared styles. Uses logical properties (inline-start/end) so RTL mostly works for free;
   rtl.css only holds the few true overrides. */
:root {
  --navy: #1E3A8A;
  --navy-dark: #162b68;
  --orange: #E97B2E;
  --orange-dark: #d16a20;
  --white: #fff;
  --gray: #F5F7FA;
  --text: #1A1F2E;
  --muted: #5B6474;
  --radius: 10px;
  --header-h: 72px;
  --font-latin: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-ar: "Cairo", "Tajawal", system-ui, sans-serif;
  --font: var(--font-latin);
}
html[lang="ar"] { --font: var(--font-ar); }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--white); line-height: 1.6; display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1; }
img { max-width: 100%; height: auto; }
a { color: var(--navy); }
ul { list-style: none; margin: 0; padding: 0; }
.container { width: min(1180px, 100% - 2rem); margin-inline: auto; }

/* Buttons */
.btn { display: inline-block; padding: .75rem 1.5rem; background: var(--orange); color: #fff; border-radius: var(--radius); font-weight: 600; text-decoration: none; transition: transform .2s ease-out, background-color .2s ease-out; }
.btn:hover { background: var(--orange-dark); transform: scale(1.04); }

/* Header / nav */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--white); box-shadow: 0 1px 8px rgba(26,31,46,.08); }
.nav-bar { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); gap: 1rem; }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 700; font-size: 1.15rem; color: var(--navy); text-decoration: none; }
.brand--light { color: #fff; }
.site-nav { display: flex; align-items: center; gap: 1.75rem; }
.site-nav ul { display: flex; gap: 1.5rem; }
.site-nav li a { position: relative; display: inline-block; padding: .4rem 0; color: var(--text); text-decoration: none; font-weight: 500; transition: color .2s ease-out; }
.site-nav li a::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 2px; background: var(--orange); transform: scaleX(0); transform-origin: left; transition: transform .25s ease-out; }
.site-nav li a:hover, .site-nav li a.is-active { color: var(--navy); }
.site-nav li a:hover::after, .site-nav li a.is-active::after { transform: scaleX(1); }
.lang-switch { padding: .4rem .9rem; border: 1.5px solid var(--navy); border-radius: 999px; color: var(--navy); font-weight: 600; font-size: .9rem; text-decoration: none; transition: background-color .2s ease-out, color .2s ease-out; }
.lang-switch:hover { background: var(--navy); color: #fff; }

.nav-toggle { display: none; width: 44px; height: 44px; padding: 10px; background: none; border: 0; cursor: pointer; flex-direction: column; justify-content: center; gap: 5px; }
.nav-toggle span { display: block; height: 2px; background: var(--navy); transition: transform .25s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-backdrop { position: fixed; inset: 0; background: rgba(26,31,46,.45); z-index: 40; }

/* Placeholder sections (Phase 1) */
.hero-placeholder { padding: 6rem 0; text-align: center; background: linear-gradient(135deg, var(--navy), var(--navy-dark)); color: #fff; }
.hero-placeholder h1 { margin: 0 0 .5rem; font-size: clamp(2rem, 5vw, 3.25rem); }
.hero-placeholder p { margin: 0 0 1.5rem; opacity: .85; }

/* Footer */
.site-footer { background: var(--text); color: #cfd5e2; margin-top: auto; }
.site-footer a { color: #cfd5e2; text-decoration: none; }
.site-footer a:hover { color: var(--orange); }
.site-footer h3 { color: #fff; margin: 0 0 .75rem; font-size: 1rem; }
.site-footer li { margin-bottom: .4rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; padding-block: 3rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-block: 1rem; font-size: .875rem; }

/* Mobile: slide-in drawer */
@media (max-width: 900px) {
  .nav-toggle { display: flex; position: relative; z-index: 60; }
  .site-nav { position: fixed; inset-block: 0; inset-inline-end: 0; width: min(300px, 82vw); flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 1.5rem; padding: calc(var(--header-h) + 1rem) 1.5rem 1.5rem; background: var(--white); box-shadow: -4px 0 24px rgba(0,0,0,.15); transform: translateX(100%); transition: transform .3s ease-out; z-index: 55; }
  .site-nav.is-open { transform: none; }
  .site-nav ul { flex-direction: column; gap: .25rem; }
  .site-nav li a { display: block; padding: .7rem 0; }
  .lang-switch { align-self: flex-start; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* Logo */
.brand img { height: 46px; width: auto; display: block; }
.brand--light { background: #fff; padding: .5rem .75rem; border-radius: var(--radius); margin-bottom: 1rem; }
