/* ==========================================================================
   GARDENIA CO. FOR CONTRACTING & GENERAL TRADING LTD.
   Core Design System & Global Styles
   Strict 3-Color Hierarchy: Blue, White, Black
   Bi-directional LTR/RTL Formatting & Refined Light Mode
   ========================================================================== */

:root {
  /* ------------------------------------------------------------------------
     1. COLOR PALETTE (Strict: Blue, White, Black)
     ------------------------------------------------------------------------ */
  /* Blue Palette (Primary & Accents) */
  --blue-primary: #2563eb;
  /* Royal Blue */
  --blue-hover: #1d4ed8;
  /* Deep Blue */
  --blue-electric: #3b82f6;
  /* Electric Blue Accent */
  --blue-light: #60a5fa;
  /* Light Ice Blue */
  --blue-subtle: rgba(37, 99, 235, 0.12);
  --blue-glow: rgba(37, 99, 235, 0.35);
  --border-blue: rgba(59, 130, 246, 0.4);

  /* Dark Mode Defaults: Black & Dark Slate Surfaces */
  --bg-primary: #06080d;
  /* True Midnight Black */
  --bg-secondary: #0c1017;
  /* Deep Slate Black */
  --bg-tertiary: #141b24;
  /* Charcoal Black */
  --bg-card: rgba(14, 19, 28, 0.75);
  --bg-card-hover: rgba(22, 30, 44, 0.9);
  --bg-glass: rgba(8, 12, 18, 0.88);
  --bg-input: rgba(12, 17, 26, 0.95);

  /* Neutrals & Text (Dark Mode) */
  --text-white: #ffffff;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-dark: #000000;

  /* Borders & Dividers */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-card: rgba(255, 255, 255, 0.12);
  --border-focus: rgba(37, 99, 235, 0.6);

  /* Shadows (Dark Mode - Smooth Ambient Glows) */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
  --shadow-blue: 0 8px 25px rgba(37, 99, 235, 0.35);

  /* Typography */
  --font-heading: 'Righteous', 'Cairo', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-arabic: 'Cairo', 'Tajawal', 'Plus Jakarta Sans', sans-serif;

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 9999px;

  /* Layout */
  --max-width: 1360px;
  --header-height: 80px;
}

/* --------------------------------------------------------------------------
   2. LIGHT MODE (Crisp Contrast, Accessible, Modern Corporate)
   -------------------------------------------------------------------------- */
[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f5f9;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-glass: rgba(255, 255, 255, 0.95);
  --bg-input: #ffffff;

  /* High-Contrast Accessible Text */
  --text-white: #0a0f1d;
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #475569;
  --text-dark: #000000;

  /* Vibrant & Legible Blue Accents */
  --blue-primary: #1d4ed8;
  --blue-hover: #1e40af;
  --blue-electric: #2563eb;
  --blue-light: #1d4ed8;
  --blue-subtle: rgba(29, 78, 216, 0.08);
  --blue-glow: rgba(29, 78, 216, 0.25);
  --border-blue: rgba(29, 78, 216, 0.35);

  /* Defined, Accessible Borders & Cards */
  --border-subtle: #cbd5e1;
  --border-card: #cbd5e1;
  --border-focus: var(--blue-primary);

  /* Refined, Clean Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px -2px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 28px -4px rgba(0, 0, 0, 0.1), 0 4px 8px -2px rgba(0, 0, 0, 0.04);
  --shadow-blue: 0 6px 20px rgba(29, 78, 216, 0.22);
}

/* --------------------------------------------------------------------------
   3. RESET & BASE
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 110px;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  overflow-x: hidden;
  position: relative;
  transition: background-color var(--transition-smooth), color var(--transition-smooth);
}

/* --------------------------------------------------------------------------
   4. DIRECTIONAL (LTR / RTL) ISOLATION
   -------------------------------------------------------------------------- */
.ltr-text,
[dir="ltr"] {
  direction: ltr !important;
  unicode-bidi: isolate !important;
  display: inline-block;
  text-align: left;
}

html[dir="rtl"] body,
body.rtl-layout {
  font-family: var(--font-arabic);
  direction: rtl;
  text-align: right;
  word-break: normal;
  overflow-wrap: break-word;
}

html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] h4,
html[dir="rtl"] h5,
html[dir="rtl"] h6,
body.rtl-layout h1,
body.rtl-layout h2,
body.rtl-layout h3,
body.rtl-layout h4,
body.rtl-layout h5,
body.rtl-layout h6 {
  font-family: var(--font-arabic);
  letter-spacing: 0 !important;
  line-height: 1.35;
  word-break: normal;
  overflow-wrap: break-word;
  text-wrap: balance;
}

html[dir="rtl"] p,
body.rtl-layout p {
  word-break: normal;
  overflow-wrap: break-word;
  text-wrap: pretty;
}

/* Global text balance & word wrap protection for headings */
.section-title,
.section-subtitle,
.hero-slogan,
.hero-company-name,
.activity-card-title,
.project-card-title,
.lightbox-title,
.vm-card-title,
.partners-tier-title {
  word-break: normal;
  overflow-wrap: break-word;
  text-wrap: balance;
}

/* Ambient Blue Backdrops */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
}

.ambient-glow-1 {
  width: 550px;
  height: 550px;
  top: -100px;
  right: -50px;
  background: radial-gradient(circle, var(--blue-glow) 0%, transparent 70%);
}

.ambient-glow-2 {
  width: 650px;
  height: 650px;
  bottom: 20%;
  left: -150px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.25) 0%, transparent 70%);
}

.ambient-glow-3 {
  width: 450px;
  height: 450px;
  top: 50%;
  right: 10%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.2) 0%, transparent 70%);
}

/* Typography Defaults */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-body);
  color: var(--text-white);
  line-height: 1.25;
  letter-spacing: -0.015em;
}

h1 {
  font-size: clamp(2rem, 4.5vw + 0.5rem, 4.2rem);
  font-weight: 800;
  text-transform: uppercase;
}

h2 {
  font-size: clamp(1.65rem, 3vw + 0.3rem, 2.8rem);
  font-weight: 700;
}

h3 {
  font-size: clamp(1.2rem, 2vw + 0.2rem, 1.75rem);
  font-weight: 700;
}

h4 {
  font-size: 1.2rem;
  font-weight: 600;
}

p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

img,
picture,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}

button {
  cursor: pointer;
}

/* Container & Sections */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

.section {
  padding: 6.5rem 0;
  position: relative;
}

.section-dark {
  background-color: var(--bg-secondary);
}

/* Section Headers */
.section-header {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 4rem auto;
}

.section-header.text-left {
  text-align: left;
  margin-left: 0;
}

html[dir="rtl"] .section-header.text-left {
  text-align: right;
  margin-right: 0;
  margin-left: auto;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--blue-electric);
  background: var(--blue-subtle);
  border: 1px solid var(--border-blue);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-pill);
  margin-bottom: 1.25rem;
}

.section-title {
  margin-bottom: 1.2rem;
  position: relative;
}

.section-title .text-gradient {
  background: linear-gradient(135deg, #ffffff 40%, var(--blue-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="light"] .section-title .text-gradient {
  background: linear-gradient(135deg, #0a0f1d 40%, var(--blue-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
}

/* Global Buttons (Blue, White, Black Only) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.85rem 1.8rem;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: var(--radius-pill);
  transition: all var(--transition-smooth);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn:focus-visible {
  outline: 3px solid var(--blue-light);
  outline-offset: 4px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--blue-electric) 0%, var(--blue-primary) 100%);
  color: #ffffff;
  box-shadow: var(--shadow-blue);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.45);
  background: linear-gradient(135deg, var(--blue-light) 0%, var(--blue-electric) 100%);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-white);
  border: 1px solid var(--border-card);
  backdrop-filter: blur(10px);
}

[data-theme="light"] .btn-outline {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: var(--text-primary);
}

.btn-outline:hover {
  background: var(--blue-subtle);
  border-color: var(--blue-electric);
  color: var(--blue-primary);
  transform: translateY(-2px);
}

/* Scroll Animations */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(25px);
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1), transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-on-scroll.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

.delay-100 {
  transition-delay: 0.1s;
}

.delay-200 {
  transition-delay: 0.2s;
}

.delay-300 {
  transition-delay: 0.3s;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: var(--radius-pill);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--blue-primary);
}

/* Responsive Grids */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

@media (max-width: 1024px) {

  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 4.5rem 0;
  }
}