/* wwwroot/css/base.css */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  background: var(--bg-page);
  color: var(--text-body);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body { background: var(--bg-page); min-height: 100vh; overflow-x: hidden; }

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: inherit; }

/* CONTAINERS */
.container    { max-width: var(--container);    margin: 0 auto; padding: 0 var(--sp-8); }
.container-sm { max-width: var(--container-sm); margin: 0 auto; padding: 0 var(--sp-8); }
.container-xs { max-width: var(--container-xs); margin: 0 auto; padding: 0 var(--sp-8); }

/* SECTIONS */
.section      { padding: var(--sp-24) 0; }
.section--hero { min-height: 100vh; display: flex; align-items: center; }
.section--dark  { background: var(--bg-card); border-top: 0.5px solid var(--border-color); border-bottom: 0.5px solid var(--border-color); }

/* GRID */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: var(--sp-4); }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: var(--sp-4); }

/* TYPOGRAPHY */
.label    { font-size: var(--text-xs); font-weight: 500; letter-spacing: 3px; text-transform: uppercase; color: var(--text-muted); }
.display  { font-size: clamp(2.5rem, 6vw, 5rem); font-weight: 500; color: var(--text-primary); line-height: 1.1; letter-spacing: -0.5px; }
.heading  { font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 500; color: var(--text-secondary); line-height: 1.2; }
.subhead  { font-size: var(--text-xl); font-weight: 500; color: var(--c-ice); }
.body-lg  { font-size: var(--text-md); color: var(--text-body); font-weight: 400; line-height: 1.8; }

/* CARDS */
.card { background: var(--bg-card); border: 0.5px solid var(--border-color); border-radius: var(--radius-lg); padding: var(--sp-8); transition: border-color var(--dur-base) var(--ease), transform var(--dur-base) var(--ease); }
.card:hover { border-color: var(--c-storm-1); }
.card--raised:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

/* BUTTONS */
.btn { display: inline-flex; align-items: center; gap: var(--sp-2); padding: 10px 24px; border-radius: var(--radius-md); font-size: var(--text-base); font-weight: 500; letter-spacing: 0.3px; transition: all var(--dur-base) var(--ease); cursor: pointer; }
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: transparent;
  border: 0.5px solid #4A7299;
  color: #8BAFD4;
  padding: 11px 28px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.5px;
}
.btn-primary:hover {
  border-color: #8BAFD4;
  color: #C8D8E8;
  background: rgba(91,127,166,0.08);
  transform: translateY(-1px);
}
.btn-ghost { background: transparent; border: none; color: var(--text-muted); padding: 10px 16px; }
.btn-ghost:hover { color: var(--c-ice); }

/* TAGS */
.tag { display: inline-block; padding: 3px 12px; background: var(--bg-raised); border: 0.5px solid var(--c-storm-1); color: var(--c-core); border-radius: var(--radius-pill); font-size: var(--text-xs); font-weight: 500; letter-spacing: 2px; text-transform: uppercase; }

/* ICON BOX */
.icon-box { width: 44px; height: 44px; background: var(--bg-raised); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* DIVIDER */
.divider { border: none; border-top: 0.5px solid var(--border-color); margin: var(--sp-6) 0; }

/* SCROLL ANIMATIONS */
[data-animate] { transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease); }
[data-animate="fade-up"]    { opacity: 0; transform: translateY(24px); }
[data-animate="fade-in"]    { opacity: 0; }
[data-animate="slide-left"] { opacity: 0; transform: translateX(-24px); }
[data-animate="slide-right"]{ opacity: 0; transform: translateX(24px); }
[data-animate].is-visible   { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { [data-animate] { opacity:1; transform:none; } }

/* SHIMMER */
@keyframes shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }
.shimmer { background: linear-gradient(90deg, var(--c-navy) 25%, var(--c-navy-mid) 50%, var(--c-navy) 75%); background-size: 200%; animation: shimmer 2s infinite; }
[data-theme="light"] .shimmer { background: linear-gradient(90deg, #D0DCE8 25%, #E2EAF4 50%, #D0DCE8 75%); background-size: 200%; }

/* RESPONSIVE */
@media (max-width: 1024px) { .grid-4 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 768px)  { .grid-2 { grid-template-columns: 1fr; } .section { padding: var(--sp-16) 0; } }
@media (max-width: 640px)  { .grid-4, .grid-3 { grid-template-columns: 1fr; } .container { padding: 0 var(--sp-4); } }

/* ─── SPLASH SCREEN ─────────────────────────────────────────────────────── */
.splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #060A10;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: transform 800ms cubic-bezier(0.76, 0, 0.24, 1),
              opacity 600ms ease;
}
.splash.is-leaving {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}
.splash.is-gone {
  display: none;
}
.splash__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  animation: splashFadeIn 1s ease 0.2s both;
}
@keyframes splashFadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.splash__mark { margin-bottom: 8px; }
.splash__mark .mastership-mark { width: 160px; height: 160px; }
.splash__name {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 500;
  color: #C8D8E8;
  letter-spacing: 10px;
  text-transform: uppercase;
  font-family: var(--font);
}
.splash__sub {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 5px;
  text-transform: uppercase;
  font-family: var(--font);
}
.splash__divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0;
}
.splash__line {
  display: block;
  width: 48px;
  height: 0.5px;
  background: var(--border-mid);
}
.splash__dot {
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-muted);
}
.splash__tagline {
  font-size: 10px;
  color: var(--text-subtle);
  letter-spacing: 4px;
  text-transform: uppercase;
  font-family: var(--font);
}
.splash__scroll {
  margin-top: 32px;
  animation: scrollBounce 2s ease-in-out infinite;
  cursor: pointer;
  opacity: 0.6;
}
@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); opacity: 0.4; }
  50%       { transform: translateY(6px); opacity: 1; }
}

/* ─── WHATSAPP FLOATING BUTTON ───────────────────────────────────────────── */
.whatsapp-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 900;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,0.35);
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.whatsapp-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(37,211,102,0.5);
}
.whatsapp-fab:hover .whatsapp-fab__tooltip { opacity: 1; pointer-events: auto; }
.whatsapp-fab__tooltip {
  position: absolute;
  bottom: 60px;
  right: 0;
  white-space: nowrap;
  background: #0D1520;
  color: #C8D8E8;
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 4px;
  border: 0.5px solid #1A2D45;
  opacity: 0;
  pointer-events: none;
  transition: opacity 150ms ease;
}

/* ─── LANGUAGE TOGGLE BUTTON ─────────────────────────────────────────────── */
.lang-toggle {
  background: none;
  border: 0.5px solid var(--c-storm-1);
  border-radius: var(--radius-md);
  color: var(--c-storm-1);
  font-size: 13px;
  font-weight: 500;
  padding: 4px 10px;
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
  flex-shrink: 0;
  font-family: var(--font);
  line-height: 1;
}
.lang-toggle:hover {
  border-color: var(--c-core);
  color: var(--c-ice);
}
[data-theme="light"] .lang-toggle {
  border-color: #8BAFD4;
  color: #3D6080;
}
[data-theme="light"] .lang-toggle:hover {
  border-color: #1A2D45;
  color: #1A2D45;
}
@media (max-width: 768px) { .lang-toggle { display: none; } }

/* ─── RTL / ARABIC SUPPORT ───────────────────────────────────────────────── */
html[dir="rtl"] body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }
html[dir="rtl"] .nav__inner { flex-direction: row-reverse; }
html[dir="rtl"] .nav__links { flex-direction: row-reverse; }
html[dir="rtl"] .nav__logo  { flex-direction: row-reverse; }
html[dir="rtl"] .hero__inner { text-align: right; }
html[dir="rtl"] .hero__ctas { flex-direction: row-reverse; }
html[dir="rtl"] .hero__stats { flex-direction: row-reverse; }
html[dir="rtl"] .network { flex-direction: row-reverse; }
html[dir="rtl"] .story-layout { flex-direction: row-reverse; }
html[dir="rtl"] .service-layout { flex-direction: row-reverse; }
html[dir="rtl"] .service-layout--reverse { flex-direction: row; }
html[dir="rtl"] .footer__inner { flex-direction: row-reverse; }
html[dir="rtl"] .footer__bottom { flex-direction: row-reverse; }
html[dir="rtl"] .contact-layout { flex-direction: row-reverse; }
html[dir="rtl"] .timeline-item { flex-direction: row-reverse; text-align: right; }
html[dir="rtl"] .node-dot { margin-right: 0; margin-left: 10px; }
html[dir="rtl"] .whatsapp-fab { right: auto; left: 28px; }
html[dir="rtl"] .whatsapp-fab__tooltip { right: auto; left: 0; }
