/* ==========================================================================
   idiibi Design System & Stylesheet — Modern Premium glassmorphic Architecture
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800;900&family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  /* HSL Tailored Brand Colors - Premium Light Theme */
  --primary-h: 182;
  --primary-s: 96%;
  --primary-l: 27%; /* #038387 */
  --primary: hsl(var(--primary-h), var(--primary-s), var(--primary-l));
  --primary-hover: hsl(var(--primary-h), var(--primary-s), calc(var(--primary-l) - 6%));
  --primary-dark: hsl(182, 96%, 19%); /* #025f62 */
  --accent: hsl(178, 81%, 43%); /* #15c6bd */
  
  --dark: hsl(191, 53%, 9%); /* #0b1f24 */
  --text: hsl(191, 53%, 9%);
  --muted: hsl(215, 15%, 47%); /* #64748b */
  --page: hsl(0, 0%, 100%);
  --soft: hsl(180, 43%, 97%); /* #f4fbfb */
  
  /* Glassmorphism Variables - Light Theme */
  --card: rgba(255, 255, 255, 0.72);
  --input: rgba(251, 255, 255, 0.85);
  --border: rgba(3, 131, 135, 0.12);
  --shadow: 0 20px 60px rgba(2, 95, 98, 0.08);
  --radius: 24px;
  --logo-filter: drop-shadow(0 8px 20px rgba(3, 131, 135, 0.16));
  
  --glass-bg: rgba(255, 255, 255, 0.55);
  --glass-border: rgba(255, 255, 255, 0.4);
}

body.dark-mode {
  /* HSL Tailored Brand Colors - Premium Sleek Dark Theme */
  --text: hsl(180, 43%, 94%); /* #eafafa */
  --muted: hsl(189, 20%, 68%); /* #9fb8bd */
  --page: hsl(191, 67%, 7%); /* #05161b */
  --soft: hsl(191, 60%, 11%); /* #0b272d */
  
  /* Glassmorphism Variables - Dark Theme */
  --card: rgba(13, 37, 43, 0.65);
  --input: rgba(16, 47, 54, 0.75);
  --border: rgba(21, 198, 189, 0.18);
  --shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
  --logo-filter: drop-shadow(0 12px 30px rgba(21, 198, 189, 0.25));
  
  --glass-bg: rgba(7, 27, 32, 0.65);
  --glass-border: rgba(255, 255, 255, 0.06);
}

/* Reset and Global Settings */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  font-family: 'Inter', 'Cairo', sans-serif;
  background: radial-gradient(circle at 80% 20%, var(--soft) 0%, var(--page) 100%);
  color: var(--text);
  line-height: 1.8;
  overflow-x: hidden;
  transition: background 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), color 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* RTL (Arabic Layout) Adjustments */
html[dir="rtl"] body {
  font-family: 'Cairo', 'Inter', sans-serif;
}

a {
  text-decoration: none;
  color: inherit;
}

:focus-visible {
  outline: 3px solid rgba(3, 131, 135, 0.4);
  outline-offset: 3px;
}

/* Skip to Content accessibility link */
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 4000;
  background: var(--primary);
  color: #fff;
  padding: 10px 18px;
  border-radius: 12px;
  font-weight: 800;
  transform: translateY(-150%);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.skip-link:focus {
  transform: translateY(0);
}

/* Top Progress Bar indicator */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 3px;
  z-index: 2200;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  box-shadow: 0 0 12px rgba(21, 198, 189, 0.5);
  transition: width 0.1s ease-out;
}

.container {
  width: min(1200px, 92%);
  margin: auto;
}

/* Page Loader */
.page-loader {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 50%, var(--soft), var(--page));
  transition: opacity 0.6s cubic-bezier(0.25, 1, 0.5, 1), visibility 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

body.loaded .page-loader {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-core {
  display: grid;
  gap: 20px;
  place-items: center;
  text-align: center;
}

.motion-logo {
  width: 90px;
  height: 90px;
  position: relative;
  display: grid;
  place-items: center;
  filter: var(--logo-filter);
}

.motion-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 2;
}

.loader-line {
  width: 200px;
  height: 4px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(3, 131, 135, 0.1);
  position: relative;
}

.loader-line span {
  display: block;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: inherit;
  animation: loaderSweep 1.5s ease-in-out infinite;
}

.logo-meaning {
  min-height: 24px;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

body.dark-mode .logo-meaning {
  color: var(--accent);
}

/* Watermark Decorative Background */
.watermark-logo {
  position: fixed;
  right: -80px;
  top: 15vh;
  width: min(40vw, 420px);
  opacity: 0.035;
  z-index: -1;
  pointer-events: none;
  filter: grayscale(1);
  animation: watermarkDrift 25s ease-in-out infinite;
}

html[dir="rtl"] .watermark-logo {
  right: auto;
  left: -80px;
}

body.dark-mode .watermark-logo {
  opacity: 0.055;
  filter: invert(1) brightness(0.7);
}

/* Premium Top Navigation Bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--glass-border);
  transition: box-shadow 0.3s ease, background-color 0.3s ease;
}

.topbar.scrolled {
  box-shadow: 0 10px 30px rgba(0, 20, 24, 0.05);
}

body.dark-mode .topbar.scrolled {
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 900;
  font-size: 26px;
  color: var(--primary);
  transition: opacity 0.2s ease;
}

.brand:hover {
  opacity: 0.9;
}

.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  filter: var(--logo-filter);
  position: relative;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Navigation Links */
.nav-links {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-weight: 700;
  font-size: 15px;
}

.nav-links a {
  padding: 8px 16px;
  border-radius: 12px;
  transition: color 0.25s ease, background-color 0.25s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
  background: rgba(3, 131, 135, 0.06);
}

body.dark-mode .nav-links a:hover,
body.dark-mode .nav-links a.active {
  color: var(--accent);
  background: rgba(21, 198, 189, 0.08);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Responsive Mobile Toggle Button */
.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--primary);
  cursor: pointer;
  place-items: center;
  position: relative;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.menu-toggle:hover {
  background: var(--soft);
}

.menu-toggle span,
.menu-toggle:before,
.menu-toggle:after {
  content: "";
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
  position: absolute;
}

.menu-toggle:before {
  transform: translateY(-6px);
}

.menu-toggle:after {
  transform: translateY(6px);
}

body.menu-open .menu-toggle span {
  opacity: 0;
}

body.menu-open .menu-toggle:before {
  transform: rotate(45deg);
}

body.menu-open .menu-toggle:after {
  transform: rotate(-45deg);
}

/* Premium Buttons */
.btn,
.toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), 
              box-shadow 0.25s ease, 
              background-color 0.25s ease, 
              color 0.25s ease, 
              border-color 0.25s ease;
}

.toggle-btn {
  background: var(--card);
  color: var(--primary);
  border-color: var(--border);
  padding: 12px 18px;
}

body.dark-mode .toggle-btn {
  color: var(--accent);
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  box-shadow: 0 10px 30px rgba(3, 131, 135, 0.15);
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.015);
  box-shadow: 0 16px 40px rgba(3, 131, 135, 0.25);
}

.btn-outline {
  background: var(--card);
  color: var(--primary);
  border: 1px solid var(--border);
}

body.dark-mode .btn-outline {
  color: var(--accent);
}

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

.btn-white-outline {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.25);
  color: #fff;
}

.btn-white-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
  transform: translateY(-2px);
}

/* ==========================================================================
   Hero Section with Flowing Mesh Background
   ========================================================================== */
.hero {
  position: relative;
  padding: 100px 0 80px;
  overflow: hidden;
}

.hero-mesh {
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  overflow: hidden;
}

.hero-mesh::before {
  content: "";
  position: absolute;
  inset: -150px -100px auto auto;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(21, 198, 189, 0.16), transparent 70%);
  animation: meshDrift1 20s ease-in-out infinite alternate;
}

.hero-mesh::after {
  content: "";
  position: absolute;
  left: -150px;
  bottom: -150px;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(3, 131, 135, 0.12), transparent 70%);
  animation: meshDrift2 24s ease-in-out infinite alternate;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(3, 131, 135, 0.08);
  color: var(--primary-dark);
  font-weight: 800;
  font-size: 13px;
  border: 1px solid var(--border);
  margin-bottom: 24px;
}

body.dark-mode .badge {
  background: rgba(21, 198, 189, 0.1);
  color: var(--accent);
}

h1 {
  font-size: clamp(34px, 4.8vw, 60px);
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: -1px;
  margin-bottom: 24px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  font-size: 18px;
  color: var(--muted);
  margin-bottom: 36px;
  max-width: 620px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

/* Statistics Grid */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 30px;
}

.stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.stat:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(3, 131, 135, 0.08);
}

.stat strong {
  display: block;
  font-size: 30px;
  color: var(--primary);
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 4px;
}

body.dark-mode .stat strong {
  color: var(--accent);
}

.stat span {
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Visual Dashboard Representation (Right Side of Hero) */
.dashboard-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 32px;
  box-shadow: var(--shadow);
  padding: 24px;
  backdrop-filter: blur(16px);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease;
}

.dashboard-card:hover {
  transform: translateY(-8px) rotate(0.5deg);
  box-shadow: 0 35px 80px rgba(2, 95, 98, 0.15);
}

body.dark-mode .dashboard-card:hover {
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.5);
}

.dash-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.dots {
  display: flex;
  gap: 8px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ff5f56;
}

.dot:nth-child(2) {
  background: #ffbd2e;
}

.dot:nth-child(3) {
  background: #27c93f;
}

.dash-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

body.dark-mode .dash-title {
  color: var(--accent);
}

.panel {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.panel::after {
  content: "";
  position: absolute;
  left: -50px;
  top: -50px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.panel h3 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 8px;
}

.panel p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 14.5px;
  margin: 0;
  line-height: 1.6;
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.mini {
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.mini:hover {
  border-color: rgba(3, 131, 135, 0.35);
  transform: translateY(-2px);
}

body.dark-mode .mini:hover {
  border-color: rgba(21, 198, 189, 0.45);
}

.mini b {
  display: block;
  color: var(--primary);
  font-size: 20px;
  margin-bottom: 4px;
}

body.dark-mode .mini b {
  color: var(--accent);
}

.mini span {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
}

/* ==========================================================================
   Section Core Headings & Common UI Elements
   ========================================================================== */
section {
  padding: 80px 0;
}

.section-head {
  text-align: center;
  margin-bottom: 50px;
}

.section-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 900;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 12px;
  padding: 6px 14px;
  background: rgba(3, 131, 135, 0.06);
  border-radius: 999px;
  border: 1px solid rgba(3, 131, 135, 0.15);
}

body.dark-mode .section-label {
  color: var(--accent);
  background: rgba(21, 198, 189, 0.08);
  border-color: rgba(21, 198, 189, 0.18);
}

.section-head h2 {
  font-size: clamp(28px, 3.8vw, 44px);
  font-weight: 900;
  margin-bottom: 14px;
  letter-spacing: -0.5px;
}

.section-head p {
  color: var(--muted);
  font-size: 17.5px;
  max-width: 720px;
  margin: auto;
  line-height: 1.7;
}

/* ==========================================================================
   Services Grid
   ========================================================================== */
.services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1), 
              border-color 0.3s ease, 
              box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(3, 131, 135, 0.04), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.card:hover {
  transform: translateY(-8px);
  border-color: rgba(3, 131, 135, 0.25);
  box-shadow: 0 25px 50px rgba(2, 95, 98, 0.1);
}

body.dark-mode .card:hover {
  border-color: rgba(21, 198, 189, 0.35);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
}

.card:hover::after {
  opacity: 1;
}

.icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(3, 131, 135, 0.1), rgba(21, 198, 189, 0.05));
  display: grid;
  place-items: center;
  font-size: 26px;
  margin-bottom: 20px;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.card:hover .icon {
  transform: scale(1.1) rotate(-5deg);
}

.card h3 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--text);
}

.card p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

/* ==========================================================================
   About Section & PMS layouts (Translucent Wrappers)
   ========================================================================== */
.about-wrap {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 40px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 36px;
  padding: 40px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.about-box {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 28px;
  padding: 40px;
  color: #fff;
  box-shadow: 0 15px 40px rgba(2, 95, 98, 0.15);
}

.about-box h3 {
  font-size: 32px;
  font-weight: 900;
  margin-bottom: 12px;
}

.about-box p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 16px;
  line-height: 1.75;
}

.checks {
  display: grid;
  gap: 16px;
}

.check {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--input);
  border: 1px solid var(--border);
  padding: 16px 20px;
  border-radius: 18px;
  font-weight: 700;
  color: var(--text);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.check:hover {
  transform: translateX(6px);
  border-color: rgba(3, 131, 135, 0.25);
}

html[dir="rtl"] .check:hover {
  transform: translateX(-6px);
}

.check span:first-child {
  width: 24px;
  min-width: 24px;
  height: 24px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: inline-grid;
  place-items: center;
  font-size: 11px;
  color: #fff;
  font-weight: 900;
  flex-shrink: 0;
}

.check span:last-child {
  line-height: 1.5;
  font-size: 14.5px;
}

/* ==========================================================================
   Works / Portfolio Section with Dynamic Filters
   ========================================================================== */
.works-filters {
  display: flex;
  gap: 10px;
  margin: 0 auto 36px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

.filter-btn {
  padding: 10px 22px;
  border: 1.5px solid var(--border);
  background: var(--card);
  color: var(--text);
  border-radius: 24px;
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  outline: none;
}

.filter-btn:hover {
  border-color: var(--primary);
  background: rgba(3, 131, 135, 0.05);
  transform: translateY(-2px);
}

.filter-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 6px 20px rgba(3, 131, 135, 0.2);
}

body.dark-mode .filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--dark);
  box-shadow: 0 6px 20px rgba(21, 198, 189, 0.3);
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 28px;
}

.work-card {
  display: flex;
  flex-direction: column;
  padding: 30px 26px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), 
              border-color 0.3s ease, 
              box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.work-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(3, 131, 135, 0.04), rgba(21, 198, 189, 0.04));
  opacity: 0;
  transition: opacity 0.35s ease;
}

.work-card:hover {
  transform: translateY(-10px);
  border-color: var(--primary);
  box-shadow: 0 25px 55px rgba(3, 131, 135, 0.12);
}

body.dark-mode .work-card:hover {
  border-color: var(--accent);
  box-shadow: 0 30px 65px rgba(0, 0, 0, 0.4);
}

.work-card:hover::before {
  opacity: 1;
}

.work-card > * {
  position: relative;
  z-index: 1;
}

.work-icon {
  font-size: 38px;
  margin-bottom: 16px;
  line-height: 1;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.work-card:hover .work-icon {
  transform: scale(1.15) rotate(8deg);
}

.work-card h3 {
  margin-bottom: 6px;
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
  transition: color 0.25s ease;
}

body.dark-mode .work-card h3 {
  color: var(--accent);
}

.work-card:hover h3 {
  color: var(--accent);
}

body.dark-mode .work-card:hover h3 {
  color: #fff;
}

.work-domain {
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--muted);
  font-family: monospace;
  opacity: 0.8;
}

.work-tag {
  align-self: flex-start;
  display: inline-block;
  padding: 4px 12px;
  background: rgba(3, 131, 135, 0.08);
  color: var(--primary-dark);
  border-radius: 99px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  transition: all 0.25s ease;
}

body.dark-mode .work-tag {
  background: rgba(21, 198, 189, 0.1);
  color: var(--accent);
}

.work-card:hover .work-tag {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

body.dark-mode .work-card:hover .work-tag {
  background: var(--accent);
  color: var(--dark);
  border-color: var(--accent);
}

.work-desc {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--muted);
  transition: color 0.25s ease;
}

.work-card:hover .work-desc {
  color: var(--text);
}

/* ==========================================================================
   Pricing Section UI
   ========================================================================== */
.packages {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.price-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 36px 30px;
  position: relative;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.price-card:hover {
  transform: translateY(-8px);
}

.price-card.featured {
  border: 2px solid var(--primary);
  transform: scale(1.03);
}

body.dark-mode .price-card.featured {
  border-color: var(--accent);
}

.price-card.featured:hover {
  transform: scale(1.03) translateY(-8px);
}

.tag {
  position: absolute;
  top: 20px;
  right: 20px;
  background: var(--primary);
  color: #fff;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

html[dir="rtl"] .tag {
  right: auto;
  left: 20px;
}

body.dark-mode .tag {
  background: var(--accent);
  color: var(--dark);
}

.price-card h3 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 8px;
}

.price {
  font-size: 32px;
  font-weight: 900;
  color: var(--primary);
  margin: 20px 0;
}

body.dark-mode .price {
  color: var(--accent);
}

.price-card ul {
  list-style: none;
  display: grid;
  gap: 12px;
  color: var(--muted);
  margin-bottom: 30px;
}

.price-card li {
  font-size: 14.5px;
  display: flex;
  gap: 10px;
  align-items: center;
}

.price-card li::before {
  content: "✓";
  color: var(--primary);
  font-weight: 900;
}

body.dark-mode .price-card li::before {
  color: var(--accent);
}

/* ==========================================================================
   Call To Action (CTA) Section
   ========================================================================== */
.cta {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  border-radius: 36px;
  padding: 60px 40px;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(2, 95, 98, 0.15);
}

.cta::before {
  content: "";
  position: absolute;
  inset: auto -80px -120px auto;
  width: 350px;
  height: 350px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.cta h2 {
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 900;
  margin-bottom: 14px;
}

.cta p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
  margin-bottom: 30px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.cta-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.cta .btn {
  background: #fff;
  color: var(--primary-dark);
}

.cta .btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* ==========================================================================
   Contact Layout & Secure Form
   ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.contact-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 30px;
  padding: 40px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.contact-card h2 {
  font-size: 26px;
  font-weight: 900;
  margin-bottom: 24px;
}

.contact-item {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-weight: 700;
  font-size: 15px;
}

.contact-item:last-child {
  border-bottom: 0;
}

/* Form Styling */
form {
  display: grid;
  gap: 16px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

input,
textarea,
select {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 14px 18px;
  font-family: inherit;
  font-size: 14.5px;
  background: var(--input);
  color: var(--text);
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.15s ease;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(3, 131, 135, 0.1);
  background: var(--card);
}

body.dark-mode input:focus,
body.dark-mode textarea:focus,
body.dark-mode select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(21, 198, 189, 0.12);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

::placeholder {
  color: rgba(138, 160, 165, 0.8);
}

/* Message styling on submit */
.form-message {
  padding: 14px 18px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 14px;
  margin-top: 10px;
  display: none;
  animation: slideUp 0.3s ease;
}

.form-message.success {
  background: rgba(3, 131, 135, 0.12);
  color: var(--primary-dark);
  border: 1px solid rgba(3, 131, 135, 0.25);
  display: block;
}

body.dark-mode .form-message.success {
  color: #a7ffd2;
  border-color: rgba(21, 198, 189, 0.3);
}

.form-message.error {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
  border: 1px solid rgba(239, 68, 68, 0.25);
  display: block;
}

body.dark-mode .form-message.error {
  color: #fca5a5;
}

/* Invisible honeypot styling */
.hp-field {
  display: none !important;
  visibility: hidden !important;
  position: absolute !important;
  left: -9999px !important;
}

/* ==========================================================================
   FAQ Accordion System
   ========================================================================== */
.faq-list {
  display: grid;
  gap: 16px;
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  backdrop-filter: blur(10px);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.faq-item.open {
  border-color: rgba(3, 131, 135, 0.35);
  box-shadow: 0 10px 30px rgba(3, 131, 135, 0.06);
}

body.dark-mode .faq-item.open {
  border-color: rgba(21, 198, 189, 0.4);
}

.faq-btn {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 22px 26px;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  text-align: left;
  transition: color 0.2s ease;
}

html[dir="rtl"] .faq-btn {
  text-align: right;
}

.faq-btn:hover,
.faq-item.open .faq-btn {
  color: var(--primary);
}

body.dark-mode .faq-btn:hover,
body.dark-mode .faq-item.open .faq-btn {
  color: var(--accent);
}

.faq-arrow {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  display: grid;
  place-items: center;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), 
              background-color 0.25s ease, 
              border-color 0.25s ease, 
              color 0.25s ease;
  flex-shrink: 0;
  font-size: 12px;
  color: var(--muted);
}

.faq-item.open .faq-arrow {
  transform: rotate(180deg);
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

body.dark-mode .faq-item.open .faq-arrow {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--dark);
}

.faq-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-body p {
  padding: 0 26px 24px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
}

/* ==========================================================================
   Back To Top & Floating Contacts
   ========================================================================== */
.whatsapp {
  position: fixed;
  left: 24px;
  bottom: 24px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 30px;
  z-index: 999;
  box-shadow: 0 16px 35px rgba(37, 211, 102, 0.3);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

html[dir="rtl"] .whatsapp {
  left: auto;
  right: 24px;
}

.whatsapp:hover {
  transform: translateY(-5px) scale(1.05);
}

.back-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--card);
  border: 1.5px solid var(--border);
  color: var(--primary);
  display: grid;
  place-items: center;
  z-index: 998;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), 
              opacity 0.3s ease, 
              visibility 0.3s ease, 
              border-color 0.2s ease;
}

html[dir="rtl"] .back-top {
  right: auto;
  left: 24px;
}

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

.back-top:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: 0 14px 36px rgba(3, 131, 135, 0.2);
}

body.dark-mode .back-top {
  color: var(--accent);
}

body.dark-mode .back-top:hover {
  border-color: var(--accent);
  box-shadow: 0 14px 36px rgba(21, 198, 189, 0.22);
}

/* ==========================================================================
   Multi-Column Footer Layout
   ========================================================================== */
footer {
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 60px 0 30px;
  color: var(--muted);
  text-align: left;
}

html[dir="rtl"] footer {
  text-align: right;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 50px;
  margin-bottom: 40px;
}

.footer-brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  font-size: 24px;
  color: var(--primary);
  margin-bottom: 16px;
}

.footer-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.footer-desc {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
  max-width: 320px;
}

.footer-col h4 {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text);
  margin-bottom: 18px;
}

.footer-links {
  display: grid;
  gap: 10px;
}

.footer-links a {
  font-size: 14px;
  color: var(--muted);
  font-weight: 600;
  transition: color 0.2s ease, transform 0.2s ease;
}

.footer-links a:hover {
  color: var(--primary);
  transform: translateX(4px);
}

html[dir="rtl"] .footer-links a:hover {
  transform: translateX(-4px);
}

body.dark-mode .footer-links a:hover {
  color: var(--accent);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding-top: 30px;
  border-top: 1px solid var(--border);
  font-size: 13.5px;
  color: var(--muted);
  font-weight: 700;
  flex-wrap: wrap;
}

.footer-bottom address {
  font-style: normal;
}

.footer-bottom a {
  color: var(--muted);
  transition: color 0.2s ease;
}

.footer-bottom a:hover {
  color: var(--primary);
}

/* ==========================================================================
   Animations & Reveals
   ========================================================================== */
@keyframes logoFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-6px) scale(1.02); }
}

@keyframes loaderOrbit {
  to { transform: rotate(360deg); }
}

@keyframes loaderSweep {
  0% { transform: translateX(-110%); }
  50% { transform: translateX(60%); }
  100% { transform: translateX(210%); }
}

@keyframes watermarkDrift {
  0%, 100% { transform: translate3d(0,0,0) rotate(-6deg) scale(1); }
  50% { transform: translate3d(30px, 20px, 0) rotate(-3deg) scale(1.05); }
}

@keyframes meshDrift1 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-40px, 30px) scale(1.1); }
}

@keyframes meshDrift2 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(30px, -40px) scale(1.08); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Scroll reveal class configurations */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1), 
              transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.reveal.from-left {
  transform: translateX(-40px);
}

.reveal.from-right {
  transform: translateX(40px);
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

.sd-1 { transition-delay: 0.1s; }
.sd-2 { transition-delay: 0.2s; }
.sd-3 { transition-delay: 0.3s; }
.sd-4 { transition-delay: 0.4s; }
.sd-5 { transition-delay: 0.5s; }
.sd-6 { transition-delay: 0.6s; }

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media(max-width: 1020px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
}

@media(max-width: 980px) {
  .nav {
    padding: 16px 0;
    position: relative;
  }
  
  .menu-toggle {
    display: grid;
  }
  
  .nav-links {
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    display: grid;
    gap: 4px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 0 0 24px 24px;
    box-shadow: var(--shadow);
    padding: 12px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
  }
  
  .nav-links a {
    padding: 14px 18px;
    border-radius: 14px;
  }
  
  .nav-links a:hover,
  .nav-links a.active {
    background: var(--soft);
  }
  
  body.menu-open .nav-links {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  
  .nav-actions {
    gap: 8px;
  }
  
  .nav-actions .btn-primary {
    display: none; /* Hide primary consultation button in nav on mobile to reduce clutter */
  }
  
  .hero-grid,
  .about-wrap,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .services,
  .packages {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .stats {
    grid-template-columns: 1fr;
  }
  
  .price-card.featured {
    transform: none !important;
  }
  
  .hero {
    padding-top: 60px;
  }
  
  .cta {
    padding: 44px 24px;
  }
  
  .mini-grid,
  .form-row {
    grid-template-columns: 1fr;
  }
}

@media(max-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .footer-bottom {
    text-align: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
  }
  
  .footer-desc {
    max-width: none;
  }
  
  .back-top {
    right: 16px;
    bottom: 84px;
  }
  
  html[dir="rtl"] .back-top {
    left: 16px;
    bottom: 84px;
  }
  
  .cta-actions {
    flex-direction: column;
  }
  
  .cta-actions .btn,
  .cta-actions .btn-white-outline {
    width: 100%;
    justify-content: center;
  }
}

@media(max-width: 560px) {
  .container {
    width: min(100% - 24px, 1200px);
  }
  
  .brand {
    font-size: 22px;
  }
  
  .brand-mark {
    width: 42px;
    height: 42px;
  }
  
  .hero {
    padding: 40px 0 50px;
  }
  
  h1 {
    font-size: clamp(30px, 9vw, 40px);
  }
  
  .hero p,
  .section-head p {
    font-size: 15.5px;
  }
  
  .hero-actions .btn {
    width: 100%;
  }
  
  .dashboard-card,
  .about-wrap,
  .contact-card,
  .card {
    border-radius: 20px;
    padding: 24px 20px;
  }
  
  .whatsapp {
    width: 54px;
    height: 54px;
    bottom: 16px;
    left: 16px;
  }
  
  html[dir="rtl"] .whatsapp {
    right: 16px;
    left: auto;
  }
}

/* Reduced Motion Settings for Accessibility */
@media(prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .page-loader {
    display: none;
  }
  
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  
  .hero-mesh::before,
  .hero-mesh::after {
    animation: none !important;
  }
}

