﻿/* ═══════════════════════════════════════════
   KORSHOM MERGE — korshom + korshom3
   Corporate Elegance + Premium Animations
   ═══════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=El+Messiri:wght@400;500;600;700&family=Tajawal:wght@300;400;500;700;800&display=swap');

:root {
  /* Brand colors → injected via korshom_get_color_css() in inc/colors.php */
  --radius: 20px;
  --radius-lg: 28px;
  --radius-pill: 50px;
  --font: 'Tajawal', sans-serif;
  --font-display: 'El Messiri', serif;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --nav-h: 90px;
}

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

html { scroll-behavior: smooth; overflow-x: clip; }

html[dir="rtl"] { direction: rtl; }
html[dir="ltr"] { direction: ltr; }

body {
  font-family: var(--font);
  background: var(--cream);
  color: var(--text);
  line-height: 1.85;
  direction: inherit;
  -webkit-font-smoothing: antialiased;
}

/* Preloader — global (shell.php on all pages) */
.preloader {
  position: fixed;
  inset: 0;
  background: var(--maroon-dark);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 28px;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.preloader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-logo {
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--gold-light);
  animation: preloader-pulse 1.6s ease-in-out infinite;
}

.preloader-logo-img {
  width: auto;
  height: 72px;
  max-width: min(320px, 80vw);
  object-fit: contain;
  animation: preloader-pulse 1.6s ease-in-out infinite;
}

.preloader.hidden .preloader-logo,
.preloader.hidden .preloader-logo-img {
  animation: none;
}

.preloader-bar {
  width: 220px;
  height: 3px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
  overflow: hidden;
}

.preloader-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  width: 0;
  animation: load-bar 1.8s ease forwards;
}

@keyframes load-bar {
  to { width: 100%; }
}

@keyframes preloader-pulse {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.04); }
}

a { text-decoration: none; color: inherit; transition: 0.3s var(--ease); }
ul { list-style: none; }
img { max-width: 100%; display: block; }

::selection { background: var(--maroon); color: white; }

/* ── Grid Background Pattern ── */
.bg-grid {
  background-color: var(--cream);
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* ── Layout ── */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
section { padding: 100px 0; position: relative; }

/* ── Navigation ── */
header.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 20px 0;
  transition: 0.4s var(--ease);
}

header.site-header.scrolled { padding: 12px 0; }

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* Hero nav — transparent */
header.site-header.hero-nav .nav-bar {
  background: transparent;
  box-shadow: none;
  border: none;
  padding: 0;
}

header.site-header.hero-nav .nav-links a { color: rgba(255,255,255,0.85); }
header.site-header.hero-nav .nav-links a.on,
header.site-header.hero-nav .nav-links a:hover { color: white; }
header.site-header.hero-nav .brand-text { color: white; }
header.site-header.hero-nav .brand-sub { color: rgba(255,255,255,0.7); }

/* Hero nav scrolled → white pill */
header.site-header.hero-nav.inner-nav .nav-bar {
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  padding-block: 10px;
  padding-inline: 24px 10px;
}

header.site-header.hero-nav.inner-nav .nav-links a { color: var(--muted); }
header.site-header.hero-nav.inner-nav .nav-links a.on,
header.site-header.hero-nav.inner-nav .nav-links a:hover { color: var(--maroon); }
header.site-header.hero-nav.inner-nav .brand-text { color: var(--maroon); }
header.site-header.hero-nav.inner-nav .brand-sub { color: var(--muted); }

/* Inner nav — floating pill */
.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: var(--surface);
  border-radius: var(--radius-pill);
  padding-block: 10px;
  padding-inline: 24px 10px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-logo {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--maroon);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  border: 2px solid var(--gold-light);
}

.brand-img {
  width: auto;
  height: 52px;
  max-width: 220px;
  object-fit: contain;
  flex-shrink: 0;
}

.brand--has-img .brand-img {
  height: 48px;
}

.brand-img--color {
  display: block;
}

.brand-img--white {
  display: none;
}

html:not([data-theme="dark"]) header.site-header.hero-nav:not(.inner-nav):not(.scrolled) .brand-img--color {
  display: block;
}

html:not([data-theme="dark"]) header.site-header.hero-nav:not(.inner-nav):not(.scrolled) .brand-img--white {
  display: none;
}

html:not([data-theme="dark"]) header.site-header.hero-nav:not(.inner-nav):not(.scrolled) .nav-links a {
  color: var(--muted);
}

html:not([data-theme="dark"]) header.site-header.hero-nav:not(.inner-nav):not(.scrolled) .nav-links a.on,
html:not([data-theme="dark"]) header.site-header.hero-nav:not(.inner-nav):not(.scrolled) .nav-links a:hover {
  color: var(--maroon);
}

html:not([data-theme="dark"]) header.site-header.hero-nav:not(.inner-nav):not(.scrolled) .brand-text {
  color: var(--maroon);
}

html:not([data-theme="dark"]) header.site-header.hero-nav:not(.inner-nav):not(.scrolled) .brand-sub {
  color: var(--muted);
}

html[data-theme="dark"] .brand-img--color {
  display: none !important;
}

html[data-theme="dark"] .brand-img--white {
  display: block !important;
}

.brand-text {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--maroon);
  line-height: 1.2;
}

.brand-sub {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 0.5px;
}

.nav-links {
  display: flex;
  align-items: center;
}

.nav-links .korshom-menu,
.mobile-menu .korshom-menu {
  display: flex;
  flex-direction: column;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links .korshom-menu {
  flex-direction: row;
  align-items: center;
  gap: 4px;
}

.nav-links a,
.mobile-menu .korshom-menu a {
  padding: 10px 18px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--muted);
  border-radius: var(--radius-pill);
  position: relative;
}

.nav-links a.on { color: var(--maroon); font-weight: 700; }

.nav-links a.on::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--maroon);
}

.nav-links a:hover { color: var(--maroon); }

.mobile-menu .korshom-menu {
  align-items: center;
  gap: 8px;
}

.nav-cta {
  padding: 12px 28px !important;
  background: var(--maroon) !important;
  color: white !important;
  border-radius: var(--radius-pill) !important;
  font-weight: 700 !important;
  font-size: 0.9rem !important;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(var(--primary-rgb), 0.25);
}

.nav-cta:hover {
  background: var(--maroon-dark) !important;
  transform: translateY(-1px);
}

.nav-cta::after { display: none !important; }

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
}

.burger span {
  width: 24px; height: 2px;
  background: var(--maroon);
  border-radius: 2px;
  transition: 0.3s;
}

.mobile-menu {
  position: fixed;
  inset: 0;
  background: rgba(var(--dark-rgb), 0.97);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  opacity: 0;
  visibility: hidden;
  transition: 0.35s;
}

.mobile-menu.open { opacity: 1; visibility: visible; }

.mobile-menu a {
  font-family: var(--font-display);
  font-size: 1.75rem;
  color: rgba(255,255,255,0.7);
  padding: 12px;
}

.mobile-menu a.on { color: var(--gold); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 32px;
  border-radius: var(--radius-pill);
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: 0.3s var(--ease);
}

.btn-gold {
  background: var(--gold-light);
  color: var(--maroon-dark);
  box-shadow: 0 4px 20px rgba(var(--gold-rgb), 0.3);
}

.btn-gold:hover {
  background: var(--gold);
  color: white;
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: white;
  border: 1.5px solid rgba(255,255,255,0.6);
}

.btn-outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: white;
}

.btn-maroon {
  background: var(--maroon);
  color: white;
  box-shadow: 0 4px 20px rgba(var(--primary-rgb), 0.25);
}

.btn-maroon:hover {
  background: var(--maroon-dark);
  transform: translateY(-2px);
}

.btn-outline-dark {
  background: transparent;
  color: var(--maroon);
  border: 1.5px solid var(--border);
}

.btn-outline-dark:hover {
  background: var(--maroon);
  color: white;
  border-color: var(--maroon);
}

.btn-icon {
  width: 20px; height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Section Labels ── */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--maroon);
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

.section-label .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--gold);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  color: var(--maroon);
  line-height: 1.35;
  margin-bottom: 20px;
}

.section-desc {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.9;
  max-width: 600px;
  text-align: start;
}

.text-center { text-align: center; }
.text-center .section-desc { text-align: center; margin-inline: auto; }


/* ── Page Header (inner pages) ── */
.page-hero {
  background: linear-gradient(135deg, var(--maroon-dark), var(--maroon));
  padding: calc(var(--nav-h) + 60px) 0 80px;
  text-align: center;
  position: relative;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  color: white;
  position: relative;
}

.page-hero p {
  color: rgba(255,255,255,0.75);
  margin-top: 12px;
  position: relative;
}

.breadcrumb {
  display: flex;
  justify-content: center;
  gap: 8px;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 16px;
  position: relative;
}

.breadcrumb a:hover { color: var(--gold-light); }

/* ── Footer ── */
footer {
  background: var(--maroon-dark);
  color: rgba(255,255,255,0.75);
  padding: 64px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand p {
  margin-top: 16px;
  font-size: 0.9rem;
  line-height: 1.85;
  max-width: 280px;
}

.footer-brand .brand-text { color: white; }
.footer-brand .brand-sub { color: rgba(255,255,255,0.5); }

.footer-brand .brand-img--footer {
  display: block;
  height: 48px;
  max-width: 200px;
  width: auto;
  object-fit: contain;
}

.footer-col h4 {
  font-family: var(--font-display);
  color: white;
  font-size: 1rem;
  margin-bottom: 20px;
}

.footer-col li { margin-bottom: 10px; }

.footer-col a {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.65);
}

.footer-col a:hover { color: var(--gold-light); }

.footer-bottom {
  padding: 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.footer-social {
  display: flex;
  gap: 10px;
}

.footer-social a {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: 0.3s;
}

.footer-social a:hover {
  background: var(--gold);
  color: var(--maroon-dark);
}

/* ── Floating Buttons ── */
.whatsapp-float {
  position: fixed;
  bottom: 28px;
  inset-inline-start: 28px;
  width: 56px; height: 56px;
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  z-index: 900;
  transition: 0.3s;
}

.whatsapp-float:hover { transform: scale(1.08); }

.back-top {
  position: fixed;
  bottom: 28px;
  inset-inline-end: 28px;
  width: 44px; height: 44px;
  background: var(--maroon);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: var(--shadow);
  z-index: 900;
  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
}

.back-top.show { opacity: 1; visibility: visible; }

/* ── Reveal Animations ── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.in { opacity: 1; transform: translateY(0); }

/* ── Nav Controls (theme + lang) ── */
.nav-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-inline-start: 8px;
}

.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: 0.3s var(--ease);
  color: var(--maroon);
}

.theme-toggle:hover {
  border-color: var(--maroon);
  transform: scale(1.05);
}

.theme-icon-moon { display: none; }
[data-theme="dark"] .theme-icon-sun { display: none; }
[data-theme="dark"] .theme-icon-moon { display: inline; }

.lang-switch {
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--maroon);
  letter-spacing: 0.5px;
}

.lang-switch:hover {
  background: var(--maroon);
  color: white;
  border-color: var(--maroon);
}

.mobile-controls {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.project-link { text-align: start; }
.faq-card p { text-align: start; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .about-grid, .contact-grid, .footer-grid { grid-template-columns: 1fr; }
  .sectors-grid { flex-direction: column; gap: 0; }
  .sectors-text-col, .sectors-sticky-col { width: 100%; flex: none; }
  .sectors-text-col { padding-bottom: 0; }
  .sectors-sticky-col { display: none; }
  .sector-mobile-img { display: block; }
  .sector-item { min-height: auto; padding-block: 48px; border-inline-start: none; }
  .sector-item::before { display: none; }
  .services-showcase, .services-grid, .features-grid, .portfolio-grid,
  .stats-grid, .pricing-grid, .process-grid { grid-template-columns: repeat(2, 1fr); }
  .about-images { height: 360px; }
  .hero-badge { display: none; }
}

@media (max-width: 768px) {
  section { padding: 72px 0; }
  .nav-links, .nav-bar .nav-cta { display: none; }
  .burger { display: flex; }
  .nav-bar { padding: 10px 16px; border-radius: var(--radius); }
  .services-showcase, .services-grid, .features-grid, .portfolio-grid,
  .stats-grid, .pricing-grid, .process-grid { grid-template-columns: 1fr; }
  .svc-card { min-height: 300px; }
  .about-stats { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .hero-content { max-width: 100%; }
  .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }
  .about-watermark { display: none; }
  .skills-bars-grid { grid-template-columns: 1fr; }
  .extra-services-grid { grid-template-columns: repeat(2, 1fr); }
  .faq-grid { grid-template-columns: 1fr; }
  .nav-controls { display: none; }
}

.project-link { text-align: start; }
.faq-card p { text-align: start; }
