/* ==========================================================
   Electric Energy Egypt — shared design tokens & components
   Light corporate look (inspired by large engineering groups):
   white space, soft tinted surfaces, one calm accent colour.
   No dark mode, no black. Approved theme: Ocean Blue.
   The logo always keeps its original grey + red colours.
   ========================================================== */

:root {
  /* Theme · Ocean Blue (approved) */
  --primary:   #1F6FB2;   /* buttons, links, labels        */
  --primary-h: #185D96;   /* hover                         */
  --accent:    #8CC2EA;   /* highlights                    */
  --tint:      #E4F0FA;   /* tinted panels, badges         */
  --bg-soft:   #F3F7FB;   /* alternate sections            */
  --ink:       #2E3D4C;   /* headings / body text (slate)  */
  --muted:     #6A7886;   /* secondary text                */
  --line:      #DCE4EC;   /* borders                       */
  /* Original logo colours (sampled from assets/logo.png) — do not theme */
  --logo-grey: #515153;
  --logo-red:  #BE232C;
}

:root {
  --bg: #FFFFFF;
  --surface: #FFFFFF;
  --shadow: 0 1px 2px rgba(40,60,80,.04), 0 6px 20px rgba(40,60,80,.06);
  color-scheme: light;
}

html { scroll-behavior: smooth; scroll-padding-top: 120px; }
body {
  background: var(--bg); color: var(--ink);
  font-family: 'Inter', system-ui, Arial, sans-serif;
  line-height: 1.65; -webkit-font-smoothing: antialiased;
}
html[lang="ar"] body { font-family: 'Cairo', 'Inter', system-ui, Arial, sans-serif; }

/* ---------- Bilingual text: <span data-l="en"> / <span data-l="ar"> ---------- */
html[lang="en"] [data-l="ar"],
html[lang="ar"] [data-l="en"] { display: none !important; }

/* ---------- Typography ---------- */
.display { font-weight: 300; letter-spacing: -.02em; line-height: 1.15; }
html[lang="ar"] .display { font-weight: 600; letter-spacing: 0; line-height: 1.4; }
.h-sec { font-weight: 400; letter-spacing: -.01em; }
html[lang="ar"] .h-sec { font-weight: 700; letter-spacing: 0; }
.eyebrow {
  color: var(--primary); font-weight: 600; font-size: .78rem;
  letter-spacing: .14em; text-transform: uppercase;
}
html[lang="ar"] .eyebrow { letter-spacing: 0; font-size: .9rem; }
.h-rule { width: 40px; height: 3px; background: var(--primary); margin: 1.25rem 0; border-radius: 2px; }
.h-rule.center { margin-inline: auto; }
.text-mute { color: var(--muted); }
.text-primary { color: var(--primary); }

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .8rem 1.6rem; font-weight: 600; font-size: .95rem; border-radius: 4px;
  border: 1px solid transparent; transition: background .2s, color .2s, border-color .2s;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-h); }
.btn-outline { border-color: var(--primary); color: var(--primary); background: transparent; }
.btn-outline:hover { background: var(--tint); }
.link-arrow { color: var(--primary); font-weight: 600; display: inline-flex; align-items: center; gap: .35rem; }
.link-arrow:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Surfaces ---------- */
.section-soft { background: var(--bg-soft); }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 6px; overflow: hidden;
  box-shadow: var(--shadow); transition: border-color .2s, box-shadow .2s, transform .2s;
}
.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.tag {
  display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .08em;
  color: var(--primary); text-transform: uppercase;
}
html[lang="ar"] .tag { letter-spacing: 0; font-size: .8rem; }
.badge {
  position: absolute; top: .75rem; inset-inline-start: .75rem;
  background: rgba(255,255,255,.92); color: var(--ink); border-radius: 3px;
  font-size: 11px; font-weight: 600; padding: .25rem .6rem;
}
.photo { position: relative; height: 12rem; background: var(--tint); overflow: hidden; }
.photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .photo img { transform: scale(1.04); }
.photo .credit {
  position: absolute; bottom: .35rem; inset-inline-end: .5rem; font-size: 10px;
  color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.6);
}
.photo-ph {
  height: 12rem; background: linear-gradient(135deg, var(--bg-soft), var(--tint));
  display: flex; align-items: center; justify-content: center; color: var(--muted); position: relative;
}
.logo-tile {
  height: 7rem; background: #fff; border: 1px solid var(--line); border-radius: 6px;
  display: flex; align-items: center; justify-content: center; padding: 0 .75rem; transition: box-shadow .2s;
}
.logo-tile:hover { box-shadow: var(--shadow); }
.logo-tile img { max-height: 4rem; width: auto; object-fit: contain; }

/* ---------- Header ---------- */
.topbar { background: var(--bg-soft); color: var(--muted); border-bottom: 1px solid var(--line); }
.site-header { background: rgba(255,255,255,.97); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.nav-link { position: relative; color: var(--ink); padding: .25rem 0; }
.nav-link:hover { color: var(--primary); }
.nav-link.active { color: var(--primary); }
.nav-link.active::after {
  content: ""; position: absolute; inset-inline: 0; bottom: -1.45rem; height: 3px; background: var(--primary);
}
.lang-btn {
  border: 1px solid var(--line); padding: .35rem .75rem; font-size: .8rem; font-weight: 600; border-radius: 4px;
  color: var(--ink); background: #fff;
}
.lang-btn:hover { border-color: var(--primary); color: var(--primary); }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(60% 80% at 85% 40%, var(--tint) 0%, transparent 70%),
    linear-gradient(180deg, var(--bg-soft) 0%, #fff 100%);
  border-bottom: 1px solid var(--line);
}
.hero-mark { filter: drop-shadow(0 10px 30px rgba(40,60,80,.08)); }
.hero-mark .dot { animation: dotIn .6s ease-out both; }
@keyframes dotIn { from { opacity: 0; transform: scale(.3); } to { opacity: 1; transform: scale(1); } }
.page-hero {
  background: linear-gradient(180deg, var(--bg-soft) 0%, #fff 100%);
  border-bottom: 1px solid var(--line);
}

/* ---------- Footer (light) ---------- */
.site-footer { background: var(--bg-soft); color: var(--muted); border-top: 1px solid var(--line); }
.site-footer a:hover { color: var(--primary); }
.site-footer .f-title { color: var(--ink); font-weight: 600; }
.site-footer .f-strong { color: var(--ink); }

/* ---------- Timeline (profile page) ---------- */
.timeline { border-inline-start: 2px solid var(--line); }
.timeline-item { position: relative; padding-inline-start: 1.75rem; }
.timeline-item::before {
  content: ""; position: absolute; inset-inline-start: -7px; top: .45rem;
  width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid var(--primary);
}

/* Partner tiles are links to each company's website */
a.logo-tile:hover { border-color: var(--accent); }
a.logo-tile:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

html[dir="rtl"] .flip-rtl { transform: scaleX(-1); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-aos], .hero-mark .dot { opacity: 1 !important; transform: none !important; transition: none !important; animation: none !important; }
}
