/* ==========================================================================
   1. Design System & CSS Variables
   ========================================================================== */
:root {
  --primary-red: #DA291C;
  --primary-red-hover: #B81E13;
  --primary-red-subtle: rgba(218, 41, 28, 0.08);

  --bg-cream-light: #FFFFFF;
  --bg-cream-card: #F8F9FA;
  --bg-cream-card-hover: #F1F3F5;
  --bg-white: #FFFFFF;

  --text-dark: #1F1916;
  --text-muted: #6B625B;
  --text-subtle: #8E847C;

  --border-warm: #E5E8EB;
  --border-warm-subtle: rgba(218, 41, 28, 0.15);
  --shadow-sm: 0 2px 8px rgba(31, 25, 22, 0.04);
  --shadow-md: 0 12px 32px rgba(31, 25, 22, 0.07);
  --shadow-lg: 0 24px 48px rgba(31, 25, 22, 0.11);

  --transition-base: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
}

/* ==========================================================================
   2. Reset & Global Engine
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Alexandria', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-cream-light);
  color: var(--text-dark);
  line-height: 1.65;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-base);
}

button {
  border: none;
  background: none;
  font-family: inherit;
  cursor: pointer;
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Language Direction Support */
[dir="ltr"] {
  direction: ltr;
  text-align: left;
}

[dir="rtl"] {
  direction: rtl;
  text-align: right;
}

/* Language Switcher Button Style */
.lang-switcher-btn {
  background-color: var(--bg-cream-card);
  color: var(--text-dark);
  border: 1px solid var(--border-warm);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: var(--transition-base);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.lang-switcher-btn:hover {
  background-color: var(--primary-red);
  color: #fff;
  border-color: var(--primary-red);
}

/* ==========================================================================
   3. Three.js Background Stage (Fixed & Isolated)
   ========================================================================== */
#vortex-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  pointer-events: auto;
}

.fixed-lighting-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0.85) 100%);
  z-index: -1;
  pointer-events: none;
}

/* ==========================================================================
   4. Header & Navigation Structure
   ========================================================================== */
.top-bar {
  background-color: #1F1916;
  color: #E5E8EB;
  font-size: 0.82rem;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  z-index: 10;
}

.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-contact-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  direction: ltr;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 500;
  color: #FFFFFF;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-warm);
  transition: var(--transition-base);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}

.barco-logo-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.barco-badge-logo {
  background-color: var(--primary-red);
  color: #ffffff;
  padding: 6px 14px;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(218, 41, 28, 0.25);
  flex-shrink: 0;
}

.barco-badge-title {
  font-family: 'Plus Jakarta Sans', serif;
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: 0.08em;
  line-height: 1.1;
  text-transform: uppercase;
}

.barco-company-names {
  display: flex;
  flex-direction: column;
}

.company-ar-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: -0.01em;
}

.company-en-name {
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--text-subtle);
  font-family: 'Plus Jakarta Sans', sans-serif;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-link {
  font-weight: 500;
  font-size: 0.92rem;
  color: var(--text-muted);
  position: relative;
  padding: 6px 0;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-red);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0%;
  height: 2px;
  background-color: var(--primary-red);
  transition: var(--transition-base);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.mobile-nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 8px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-cream-card);
  border: 1px solid var(--border-warm);
  cursor: pointer;
  z-index: 1002;
}

.mobile-nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background-color: var(--text-dark);
  border-radius: 2px;
  transition: var(--transition-base);
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: min(85vw, 360px);
  height: 100vh;
  background-color: var(--bg-cream-light);
  border-left: 1px solid var(--border-warm);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
  padding: 100px 32px 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1001;
}

.mobile-drawer.open {
  right: 0;
}

.mobile-drawer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.mobile-drawer-links a {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-dark);
}

.mobile-drawer-links a:hover,
.mobile-drawer-links a.active {
  color: var(--primary-red);
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(31, 25, 22, 0.45);
  backdrop-filter: blur(4px);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

/* ==========================================================================
   5. Button Toolkit & UI Modules
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.92rem;
  transition: var(--transition-base);
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--primary-red);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(218, 41, 28, 0.25);
}

.btn-primary:hover {
  background-color: var(--primary-red-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(218, 41, 28, 0.35);
}

.btn-secondary {
  background-color: rgba(248, 249, 250, 0.9);
  color: var(--text-dark);
  border: 1px solid var(--border-warm);
  backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  background-color: var(--bg-cream-card-hover);
  border-color: #CED4DA;
  transform: translateY(-2px);
}

.hero-fullscreen-entry {
  min-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  z-index: 2;
  padding: 40px 24px;
}

.hero-central-emblem {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background-color: var(--primary-red);
  color: #ffffff;
  padding: 18px 36px;
  border-radius: var(--radius-md);
  box-shadow: 0 12px 36px rgba(218, 41, 28, 0.35);
  margin-bottom: 24px;
  transition: transform 0.4s ease;
}

.hero-central-emblem:hover {
  transform: scale(1.04);
}

.hero-emblem-title {
  font-family: 'Plus Jakarta Sans', serif;
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 2.75rem);
  letter-spacing: 0.1em;
  line-height: 1;
}

.hero-emblem-sub {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  font-weight: 700;
  text-transform: uppercase;
  opacity: 0.95;
  margin-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.4);
  padding-top: 6px;
  width: 100%;
  text-align: center;
}

.scroll-indicator-wrap {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-dark);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  opacity: 0.85;
  animation: gentleBounce 2s infinite ease-in-out;
}

@keyframes gentleBounce {
  0%, 20%, 50%, 80%, 100% { transform: translate(-50%, 0); }
  40% { transform: translate(-50%, -10px); }
  60% { transform: translate(-50%, -5px); }
}

.scrolled-content-zone {
  position: relative;
  z-index: 2;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--border-warm);
  box-shadow: 0 -20px 40px rgba(0, 0, 0, 0.04);
}

.page-header-banner {
  background-color: var(--bg-cream-card);
  border-bottom: 1px solid var(--border-warm);
  padding: 64px 0 54px;
}

.page-breadcrumb {
  font-size: 0.85rem;
  color: var(--primary-red);
  font-weight: 600;
  margin-bottom: 12px;
}

.page-title {
  font-size: clamp(1.85rem, 4vw, 2.6rem);
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 12px;
}

.page-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 650px;
  line-height: 1.8;
}

.section-spacing {
  padding: clamp(56px, 8vw, 88px) 0;
}

.meter-track {
  width: 100%;
  height: 6px;
  background-color: rgba(248, 249, 250, 0.8);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 6px;
}

.meter-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-red-hover), var(--primary-red));
  border-radius: 999px;
  width: var(--target-width, 85%);
  transition: width 1s ease-out;
}

.radar-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #22c55e;
  animation: pingRadar 2s infinite ease-out;
}

@keyframes pingRadar {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6); }
  70% { box-shadow: 0 0 0 9px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* ==========================================================================
   6. Global Footer System
   ========================================================================== */
.site-footer {
  background-color: var(--bg-cream-card);
  border-top: 1px solid var(--border-warm);
  padding: 68px 0 32px;
  position: relative;
  z-index: 2;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.6fr;
  gap: 40px;
  margin-bottom: 50px;
}

.footer-col h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 18px;
  color: var(--text-dark);
}

.footer-links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links-list a {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.footer-links-list a:hover {
  color: var(--primary-red);
}

.footer-bottom {
  border-top: 1px solid var(--border-warm);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ==========================================================================
   7. Responsive Media Queries
   ========================================================================== */
@media (max-width: 1080px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 860px) {
  .top-bar-inner {
    flex-direction: column;
    gap: 6px;
    text-align: center;
  }

  .nav-links, 
  .header-cta-group {
    display: none;
  }

  .mobile-nav-toggle {
    display: flex;
  }

  .header-inner {
    height: 74px;
  }

  .barco-company-names .company-en-name {
    display: none;
  }
}

@media (max-width: 600px) {
  .container {
    padding: 0 18px;
  }

  .hero-fullscreen-entry {
    padding: 30px 14px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}