/* ===========================================================================
   ColorCode shared site chrome (header + footer) for sub-pages.
   Self-contained: scoped class names (cc-*) and scoped CSS vars (--cc-*) so it
   never collides with a page's own styles. Visually mirrors the main homepage.
   Theme is driven by the html[data-theme] attribute (same as the rest of site).
   =========================================================================== */

/* ---- Service-page hero: the side showcase was removed, so let the title use the
       full width instead of being trapped in the old left grid column. ---- */
.hero-layout { grid-template-columns: 1fr !important; }
.hero-content { max-width: 1100px; }
/* The service hero sits on a dark image in BOTH themes, so its title must stay
   light — otherwise in light mode it inherits the dark body text and disappears.
   (.hero-content only exists on service pages, so the About hero is unaffected.) */
.hero-content h1 { color: #fff; }

/* ---- Service-page CTA buttons: use the brand magenta (like the rest of the site)
       instead of the multicolor magenta→cyan→yellow gradient. ---- */
.primary, .view-more {
  background: linear-gradient(135deg, #ec008c, #bd0071) !important;
  box-shadow: 0 16px 35px rgba(236, 0, 140, .22) !important;
}

/* ---- GE-Flow font (shared with main site; Arabic) ---- */
@font-face {
  font-family: 'GE-Flow';
  src: url('../../GE-Flow-Regular.otf') format('opentype');
  font-weight: normal; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'GE-Flow';
  src: url('../../alfont_com_AlFont_com_GE-Flow-Bold.otf') format('opentype');
  font-weight: bold; font-style: normal; font-display: swap;
}

/* ---- Theme tokens ---- */
html[data-theme='dark'] {
  --cc-bg: #282828;
  --cc-text: #ffffff;
  --cc-muted: #a0a0a0;
  --cc-card-bg: #ffffff;
  --cc-card-text: #000000;
  --cc-card-border: #e5e5e5;
}
html[data-theme='light'] {
  --cc-bg: #ffffff;
  --cc-text: #1a1a1a;
  --cc-muted: #6b7280;
  --cc-card-bg: #1a1a1a;
  --cc-card-text: #ffffff;
  --cc-card-border: #404040;
}
/* default to dark if attribute missing */
.cc-header, .cc-footer, .cc-mobile-nav, .cc-modal {
  --cc-accent: #ec008c;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  box-sizing: border-box;
}
html[lang='ar'] .cc-header,
html[lang='ar'] .cc-footer,
html[lang='ar'] .cc-mobile-nav,
html[lang='ar'] .cc-modal { font-family: 'GE-Flow', Arial, sans-serif; }

.cc-header *, .cc-footer *, .cc-mobile-nav *, .cc-modal * { box-sizing: border-box; }

/* =========================== HEADER =========================== */
.cc-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: var(--cc-bg, #282828);
  border-bottom-left-radius: 24px; border-bottom-right-radius: 24px;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transition: background .4s ease;
}
.cc-header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px clamp(16px, 2.5vw, 48px);
}
.cc-logo { display: flex; align-items: center; cursor: pointer; }
.cc-logo img { height: 40px; width: auto; }
.cc-logo .cc-logo-light { display: none; }
html[data-theme='light'] .cc-logo .cc-logo-dark { display: none; }
html[data-theme='light'] .cc-logo .cc-logo-light { display: block; }

.cc-nav { display: flex; align-items: center; gap: clamp(12px, 1.6vw, 28px); }
.cc-nav a, .cc-nav button {
  position: relative; background: none; border: 0; cursor: pointer;
  color: var(--cc-text, #fff); font-size: 16px; font-weight: 500;
  padding: 0; transition: color .2s ease;
}
.cc-nav a::after, .cc-nav button::after {
  content: ''; position: absolute; left: 0; bottom: -4px; height: 2px; width: 100%;
  background: var(--cc-accent); transform: scaleX(0); transform-origin: left;
  transition: transform .3s ease;
}
.cc-nav a:hover::after, .cc-nav button:hover::after { transform: scaleX(1); }

/* ---- Explore dropdown (desktop) ---- */
.cc-explore { position: relative; display: inline-flex; }
.cc-explore-toggle { display: inline-flex; align-items: center; gap: 6px; }
.cc-explore-caret { font-size: 11px; transition: transform .3s ease; }
.cc-explore.cc-open .cc-explore-caret { transform: rotate(180deg); }
.cc-explore-menu {
  position: absolute; top: 100%; left: 0; margin-top: 14px;
  min-width: 250px; max-height: 70vh; overflow-y: auto;
  background: var(--cc-bg, #282828); border: 1px solid rgba(150, 150, 150, .28);
  border-radius: 12px; box-shadow: 0 24px 60px rgba(0, 0, 0, .4);
  padding: 8px 0; z-index: 1200;
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}
html[dir='rtl'] .cc-explore-menu { left: auto; right: 0; }
.cc-explore.cc-open .cc-explore-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.cc-explore-menu a {
  display: block; width: 100%; padding: 10px 18px; font-size: 14px; font-weight: 500;
  color: var(--cc-text, #fff); white-space: nowrap;
}
.cc-explore-menu a::after { display: none; }
.cc-explore-menu a:hover { background: rgba(236, 0, 140, .12); color: var(--cc-accent); }

/* ---- Explore collapsible (mobile menu) ---- */
.cc-mnav-explore { display: flex; flex-direction: column; align-items: center; gap: 16px; width: 100%; }
.cc-mnav-explore-toggle { display: inline-flex; align-items: center; gap: 8px; }
.cc-mnav-explore .cc-explore-caret { font-size: 14px; }
.cc-mnav-explore.cc-open .cc-explore-caret { transform: rotate(180deg); }
.cc-mnav-explore-menu { display: none; flex-direction: column; align-items: center; gap: 12px; }
.cc-mnav-explore.cc-open .cc-mnav-explore-menu { display: flex; }
.cc-mobile-nav .cc-mnav-sublink { font-size: 16px; font-weight: 500; color: var(--cc-muted, #a0a0a0); }
.cc-mobile-nav .cc-mnav-sublink:hover { color: var(--cc-accent); }

.cc-actions { display: flex; align-items: center; gap: 12px; }
html[dir='rtl'] .cc-actions { flex-direction: row-reverse; }

.cc-call {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; border: 1px solid var(--cc-accent);
  color: var(--cc-text, #fff); padding: 8px 16px; border-radius: 8px;
  font-size: 14px; cursor: pointer; transition: border-color .3s ease, background .3s ease;
}
.cc-call:hover { border-color: var(--cc-text, #fff); }

.cc-icon-btn {
  width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  background: transparent; border: 0; color: var(--cc-text, #fff); cursor: pointer;
  border-radius: 8px; font-size: 20px; transition: color .3s ease;
  position: relative;
}
.cc-icon-btn:hover { color: var(--cc-accent); }
.cc-icon-btn .cc-moon { display: none; }
html[data-theme='light'] .cc-icon-btn .cc-sun { display: none; }
html[data-theme='light'] .cc-icon-btn .cc-moon { display: inline; }
.cc-lang-btn { font-size: 18px; font-weight: 500; }

.cc-hamburger { display: none; width: 40px; height: 32px; background: none; border: 0; cursor: pointer; position: relative; }
.cc-hamburger span {
  position: absolute; left: 9px; width: 22px; height: 2px; border-radius: 2px;
  background: var(--cc-text, #fff); transition: all .3s ease;
}
.cc-hamburger span:nth-child(1) { top: 10px; }
.cc-hamburger span:nth-child(2) { top: 16px; }
.cc-hamburger span:nth-child(3) { top: 22px; }

/* mobile */
@media (max-width: 1100px) {
  .cc-nav { display: none; }
  .cc-call span { display: none; }
  .cc-call { padding: 8px 12px; }
  .cc-hamburger { display: block; }
}

/* =========================== MOBILE NAV =========================== */
.cc-mobile-nav {
  position: fixed; inset: 0; z-index: 1100; display: none;
  flex-direction: column; align-items: center; justify-content: safe center; gap: 24px;
  overflow-y: auto; padding: 88px 24px 40px;
  background: rgba(0,0,0,.85); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
html[data-theme='light'] .cc-mobile-nav { background: rgba(255,255,255,.9); }
.cc-mobile-nav.cc-open { display: flex; }
.cc-mobile-nav a, .cc-mobile-nav button {
  color: var(--cc-text, #fff); font-size: 22px; font-weight: 600;
  background: none; border: 0; cursor: pointer; transition: color .3s ease, transform .3s ease;
}
.cc-mobile-nav a:hover, .cc-mobile-nav button:hover { color: var(--cc-accent); transform: scale(1.05); }

/* =========================== CAREERS MODAL =========================== */
.cc-modal {
  position: fixed; inset: 0; z-index: 1200; display: none;
  align-items: center; justify-content: center; background: rgba(0,0,0,.8); padding: 20px;
}
.cc-modal.cc-open { display: flex; }
.cc-modal-box {
  background: #171717; color: #fff; border-radius: 12px; box-shadow: 0 30px 80px rgba(0,0,0,.5);
  width: 100%; max-width: 560px; padding: 32px; position: relative; line-height: 1.6;
}
.cc-modal-box h2 { font-size: 24px; font-weight: 700; margin: 0 0 16px; text-align: center; }
.cc-modal-box p { margin: 0 0 12px; }
.cc-modal-box .cc-modal-quote { color: #ec4899; font-style: italic; }
.cc-modal-box a { color: #ec4899; text-decoration: underline; }
.cc-modal-close {
  position: absolute; top: 14px; right: 16px; background: none; border: 0; cursor: pointer;
  color: #9ca3af; font-size: 24px; line-height: 1;
}
.cc-modal-close:hover { color: var(--cc-accent); }

/* =========================== FOOTER =========================== */
.cc-footer { width: 100%; padding: 64px clamp(16px, 5vw, 40px); display: flex; justify-content: center; }
.cc-footer-card {
  width: 100%; max-width: 90vw; background: var(--cc-card-bg, #fff); color: var(--cc-card-text, #000);
  border: 1px solid var(--cc-card-border, #e5e5e5); border-radius: 12px; padding: 40px clamp(20px, 4vw, 48px);
  backdrop-filter: blur(6px);
}
.cc-footer-card a { color: var(--cc-muted); text-decoration: none; transition: color .2s ease; }
.cc-footer-card a:hover { color: var(--cc-accent); }
.cc-footer-card h3 { color: var(--cc-card-text, #000); font-size: 18px; font-weight: 700; margin: 0 0 16px; }

.cc-footer-grid { display: grid; grid-template-columns: 1fr 1fr 1.3fr 1.3fr; gap: 32px; }
.cc-foot-col { display: flex; flex-direction: column; }
.cc-foot-links { display: flex; flex-direction: column; gap: 12px; }
.cc-foot-call {
  align-self: flex-start; margin-top: 28px; background: transparent; border: 1px solid var(--cc-accent);
  color: var(--cc-card-text, #000) !important; padding: 8px 16px; border-radius: 8px; font-size: 12px; cursor: pointer;
}
.cc-contact-row { display: flex; gap: 14px; margin-bottom: 16px; }
html[dir='rtl'] .cc-contact-row { flex-direction: row-reverse; }
.cc-contact-row i { color: var(--cc-accent); font-size: 18px; margin-top: 4px; }
.cc-contact-row strong { color: var(--cc-card-text, #000); display: block; margin-bottom: 4px; }
.cc-contact-row span, .cc-contact-row a { color: var(--cc-muted); display: block; }
.cc-foot-map iframe { width: 100%; height: 190px; border: 0; border-radius: 12px; margin-bottom: 14px; }
.cc-foot-map img.cc-foot-logo { width: 180px; height: auto; margin-bottom: 8px; }
/* footer card is white on dark theme (show black logo) and dark on light theme (show white logo) */
.cc-foot-logo-l { display: none; }
html[data-theme='light'] .cc-foot-logo-d { display: none; }
html[data-theme='light'] .cc-foot-logo-l { display: block; }
.cc-foot-tagline { color: var(--cc-muted); font-size: 13px; line-height: 1.5; margin: 0; }

.cc-foot-bottom {
  border-top: 1px solid rgba(150,150,150,.35); margin-top: 32px; padding-top: 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.cc-foot-national { display: flex; align-items: center; gap: 24px; }
.cc-foot-national img { height: auto; }
.cc-foot-national img:first-child { width: 80px; }
.cc-foot-national img:last-child { width: 48px; }
/* black national logos sit on a white card in dark theme (visible); invert on light theme's dark card */
html[data-theme='light'] .cc-foot-national img { filter: invert(1); }
.cc-foot-copy { color: var(--cc-muted); font-size: 13px; text-align: center; }
.cc-foot-copy p { margin: 2px 0; }
.cc-social { display: flex; gap: 22px; }
.cc-social a { color: var(--cc-muted); font-size: 20px; }
.cc-social a:hover { color: var(--cc-accent); }

@media (max-width: 900px) {
  .cc-footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .cc-footer-grid { grid-template-columns: 1fr; }
  .cc-foot-bottom { flex-direction: column; }
}
