:root {
  /* Common variables */
  --color-gold: #fee502;
  --color-gold-rgb: 254, 229, 2;
  --transition-silk: all 1.8s cubic-bezier(0.33, 1, 0.68, 1);
  --transition-master: all 1.8s cubic-bezier(0.33, 1, 0.68, 1);
  --transition-smooth: all 1.4s cubic-bezier(0.33, 1, 0.68, 1);
  --transition-fluid: all 1.8s cubic-bezier(0.33, 1, 0.68, 1);
  --transition-snappy: all 0.7s cubic-bezier(0.33, 1, 0.68, 1);
  --reveal-duration: 1.8s;
  --reveal-delay: 0.1s;

  /* Default Dark Theme variables */
  --bg-color: #000000;
  --text-color: #ffffff;
  --text-gray: #b0b0b0;
  --color-black: #000000;
  --glass-bg: rgba(255, 255, 255, 0.07);
  --glass-border: rgba(255, 255, 255, 0.12);
  --navbar-bg: rgba(0, 0, 0, 0.85);
  --card-bg: #1a1a1a;
}

@font-face {
  font-family: "Cairo";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("assets/fonts/cairo-300.ttf") format("truetype");
}
@font-face {
  font-family: "Cairo";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/cairo-400.ttf") format("truetype");
}
@font-face {
  font-family: "Cairo";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("assets/fonts/cairo-600.ttf") format("truetype");
}
@font-face {
  font-family: "Cairo";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/fonts/cairo-700.ttf") format("truetype");
}
@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("assets/fonts/outfit-300.ttf") format("truetype");
}
@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/outfit-400.ttf") format("truetype");
}
@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("assets/fonts/outfit-600.ttf") format("truetype");
}
@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/fonts/outfit-700.ttf") format("truetype");
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Cairo", sans-serif;
}

html,
body {
  overflow-x: hidden;
  position: relative;
  width: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  direction: rtl;
  transition: background-color 0.3s ease, color 0.3s ease;
}

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

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

::-webkit-scrollbar-thumb {
  background: var(--color-gold);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: #e6ce02; /* Slightly darker gold on hover */
}

html {
  scrollbar-width: thin;
  scrollbar-color: var(--color-gold) var(--bg-color);
}

body.loading {
  overflow: hidden;
}

/* Preloader */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--bg-color);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 20px;
  transition: opacity 0.8s ease, visibility 0.8s;
}

#preloader.fade-out {
  opacity: 0;
  visibility: hidden;
}

.preloader-logo {
  height: 100px;
  border: 2px solid var(--color-gold);
  border-radius: 14px;
  padding: 5px 20px;
  background-color: #1a1919;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse 2s infinite ease-in-out;
}

.preloader-logo img {
  height: 100%;
  width: auto;
  object-fit: contain;
}

.loader-bar-container {
  width: 200px;
  height: 4px;
  background: var(--glass-bg);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.loader-progress {
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: var(--color-gold);
  border-radius: 10px;
  animation: loading-bar 1.5s infinite ease-in-out;
}

@keyframes loading-bar {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.7;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Reveal Animations - Silk Fade System */
.reveal {
  opacity: 0;
  filter: blur(20px);
  transform: translateY(35px) scale(0.99);
  transition: opacity 2s cubic-bezier(0.33, 1, 0.68, 1),
    filter 1.8s cubic-bezier(0.33, 1, 0.68, 1),
    transform 1.8s cubic-bezier(0.33, 1, 0.68, 1);
  will-change: transform, opacity, filter;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.reveal.active {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0) scale(1);
}

/* Staggered Reveals */
.stagger-container .reveal-item {
  opacity: 0;
  filter: blur(15px);
  transform: translateY(25px) scale(0.99);
  transition: opacity 1.6s cubic-bezier(0.33, 1, 0.68, 1),
    filter 1.5s cubic-bezier(0.33, 1, 0.68, 1),
    transform 1.5s cubic-bezier(0.33, 1, 0.68, 1);
  will-change: transform, opacity, filter;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.stagger-container.active .reveal-item {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0) scale(1);
}

.reveal-item:nth-child(1) {
  transition-delay: 0.1s;
}
.reveal-item:nth-child(2) {
  transition-delay: 0.25s;
}
.reveal-item:nth-child(3) {
  transition-delay: 0.4s;
}
.reveal-item:nth-child(4) {
  transition-delay: 0.55s;
}
.reveal-item:nth-child(5) {
  transition-delay: 0.7s;
}
.reveal-item:nth-child(6) {
  transition-delay: 0.85s;
}

/* Hero Specific - Initial Clean Entrance */
.hero-content-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%); /* Centered initially */
  width: 90%;
  max-width: 800px;
  padding: 40px;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.4); /* Dark glass background */
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  animation: moveDown 8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  animation-delay: 2.5s; /* Wait 2.5s before moving */
  z-index: 10;
  text-align: center;
}

@keyframes moveDown {
  0% {
    top: 50%;
    transform: translate(-50%, -50%);
  }
  100% {
    top: 85%; /* Move to bottom */
    transform: translate(-50%, -50%) scale(0.9); /* Slightly smaller at bottom */
  }
}

/* Mobile hero styles for the split layout are located at the end of this file 
   to ensure they strictly override any conflicting base styles. */

.hero-content {
  opacity: 0;
  transform: translateY(40px);
  transition: var(--transition-master);
}

body:not(.loading) .hero-content.active {
  opacity: 1;
  transform: translateY(0);
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header h2 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  position: relative;
  display: inline-block;
}

.section-header .subtitle {
  color: var(--color-gold);
  font-size: 1.1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0;
  display: block;
  max-width: 800px;
  margin: 15px auto 0;
  line-height: 1.6;
}

/* Glassmorphism Utility */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  transition: var(--transition-master);
  position: relative;
  overflow: hidden;
  will-change: transform, background, border-color, box-shadow;
}

/* Luxury Glass Shine Effect */
.glass::after {
  content: "";
  position: absolute;
  top: -100%;
  left: -100%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 0%,
    rgba(255, 255, 255, 0.05) 45%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0.05) 55%,
    transparent 100%
  );
  transform: rotate(-45deg);
  transition: 0.8s;
  pointer-events: none;
}

.glass:hover::after {
  top: 100%;
  left: 100%;
}

.glass:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(254, 229, 2, 0.7);
  transform: translateY(-12px) scale(1.01);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6), 0 0 40px rgba(254, 229, 2, 0.25);
}

/* Typography */
h1,
h2,
h3,
h4 {
  font-weight: 700;
  letter-spacing: -0.02em;
}

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

ul {
  list-style: none;
}

/* Layout Utilities */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 50px;
}

@media (max-width: 1024px) {
  .container {
    padding: 0 30px; /* Increased from 8% for more predictable spacing */
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 20px; /* Increased from 10% to prevent edge-to-edge stretching */
  }
}

.section-padding {
  padding: 120px 0;
}

@media (max-width: 768px) {
  .section-padding {
    padding: 80px 0;
  }
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 20px 0;
  transition: var(--transition-smooth);
}

.navbar.scrolled {
  padding: 12px 0;
  background: var(--navbar-bg);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Sub-page Navbar Force White Content */
body:not(.home-page) .navbar {
  color: #fff !important;
}

body:not(.home-page) .navbar .nav-links a {
  color: #fff !important;
}

body:not(.home-page) .navbar .nav-links a:hover {
  color: var(--color-gold) !important;
}

body:not(.home-page) .navbar .theme-toggle {
  color: #fff !important;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Logo Styles */
.logo-link {
  text-decoration: none;
  display: block;
  transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.logo-link:hover {
  transform: scale(1.02);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo-placeholder {
  height: 85px;
  border: 2px solid var(--color-gold);
  border-radius: 12px;
  padding: 5px 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: #1a1919;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  box-shadow: 0 0 0 rgba(254, 229, 2, 0);
}

.logo-link:hover .logo-placeholder {
  border-color: #fff;
  box-shadow: 0 0 20px rgba(254, 229, 2, 0.2);
  transform: translateY(-2px);
}

.logo-placeholder img {
  height: 100%;
  width: auto;
  object-fit: contain;
}

.branding-text {
  display: flex;
  flex-direction: column;
}

.app-name {
  font-size: 1.4rem;
  color: var(--text-color);
  font-weight: 700;
  line-height: 1.1;
}

.marketing-slogan {
  font-size: 0.8rem;
  color: var(--color-gold);
  font-weight: 600;
  margin-top: 2px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Theme Toggle */
.theme-toggle {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-color);
  padding: 8px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.theme-toggle:hover {
  background: var(--color-gold);
  color: #000;
}

.nav-links {
  display: flex;
  gap: 30px;
}

.hamburger {
  display: none;
  cursor: pointer;
  background: none;
  border: none;
  z-index: 2000;
}

.nav-links a {
  font-size: 1.1rem;
  font-weight: 600;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8), 0 0 15px rgba(255, 255, 255, 0.15);
  letter-spacing: 0.02em;
}

.nav-links a:hover {
  color: var(--color-gold);
  text-shadow: 0 0 15px rgba(254, 229, 2, 0.4);
}

/* Hero Section */
.hero-section {
  position: relative;
  height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: #000;
}

.hero-slider {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.5s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}

.slide.active {
  opacity: 1;
  z-index: 2;
  animation: zoomEffect 6s infinite alternate;
}

@keyframes zoomEffect {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(1.05);
  }
}

.hero-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.5) 0%,
    rgba(0, 0, 0, 0.3) 50%,
    rgba(0, 0, 0, 0.8) 100%
  );
  z-index: 3;
}

.hero-content-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 800px;
  padding: 40px;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  animation: moveDown 2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  animation-delay: 3.5s; /* Start after initial view */
  z-index: 10;
  text-align: center;
}

.hero-section h1 {
  font-size: 4.5rem;
  margin-bottom: 25px;
  background: linear-gradient(135deg, #fff 0%, var(--color-gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.8));
}

.hero-section p {
  font-size: 1.5rem;
  color: #fff;
  max-width: 850px;
  margin: 0 auto;
  text-shadow: 0 2px 15px rgba(0, 0, 0, 0.9);
  font-weight: 500;
  line-height: 1.4;
}

/* Stats Section (Counters) */
.stats-section {
  padding: 100px 0;
  background: linear-gradient(to bottom, #000 0%, #0a0a0a 100%);
  border-bottom: 1px solid var(--glass-border);
}

.counters {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 50px;
}

@media (max-width: 768px) {
  .counters {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

.counter-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 20px;
  text-align: center;
  min-width: 200px;
  transition: var(--transition-master);
}

.counter-icon {
  color: var(--color-gold);
  margin-bottom: 20px;
  filter: drop-shadow(0 0 8px rgba(254, 229, 2, 0.3));
  transition: var(--transition-snappy);
}

.counter-item:hover .counter-icon {
  transform: scale(1.1) translateY(-5px);
  filter: drop-shadow(0 0 15px rgba(254, 229, 2, 0.5));
}

.counter-icon svg {
  width: 32px;
  height: 32px;
}

.counter-number {
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--color-gold);
  display: block;
  margin-bottom: 5px;
  text-shadow: 0 0 20px rgba(254, 229, 2, 0.2);
}

.counter-label {
  font-size: 1.1rem;
  color: var(--text-gray);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 600;
}

/* Sectors Section */
.sectors-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  width: 100%;
  max-width: 100%;
}

@media (max-width: 1024px) {
  .sectors-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .sectors-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0; /* Remove any inherited padding */
    margin: 0; /* Remove any margins */
  }

  .sector-card {
    width: 100%;
    max-width: 100%;
  }
}

.sector-card {
  position: relative;
  height: 400px;
  overflow: hidden;
  cursor: pointer;
}

.sector-image {
  width: 100%;
  height: 100%;
  background: var(--card-bg);
  transition: var(--transition-smooth);
  background-size: cover;
  background-position: center;
}

.sector-card:hover .sector-image {
  transform: scale(1.05);
}

.sector-card:hover .sector-overlay {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, transparent 80%);
}

.sector-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 30px;
}

.sector-overlay h3 {
  font-size: 1.8rem;
  margin-bottom: 10px;
  color: #fff;
}

.sector-overlay p {
  color: rgba(255, 255, 255, 0.9);
}

/* Success Partners Section */
#success-partners {
  background: linear-gradient(to bottom, #000000 0%, #0a0a0a 100%);
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
}

.partners-category {
  margin-top: 60px;
}

.partners-category:first-of-type {
  margin-top: 50px;
}

.category-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-bottom: 40px;
}

.category-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(
    135deg,
    var(--glass-bg) 0%,
    rgba(254, 229, 2, 0.1) 100%
  );
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-gold);
  filter: drop-shadow(0 0 15px rgba(254, 229, 2, 0.3));
  transition: var(--transition-smooth);
}

.category-icon svg {
  width: 28px;
  height: 28px;
}

.category-header h3 {
  font-size: 1.8rem;
  color: #fff;
  font-weight: 700;
  margin: 0;
}

.partners-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 30px;
  margin-top: 30px;
}

.partners-grid-centered {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.partners-grid-centered .partner-card {
  flex: 0 1 250px;
  max-width: 300px;
}

.partner-card {
  padding: 30px 20px;
  text-align: center;
  transition: var(--transition-smooth);
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 15px;
}

.partner-card:hover {
  transform: translateY(-10px);
  border-color: var(--color-gold);
  box-shadow: 0 10px 30px rgba(254, 229, 2, 0.2);
}

.partner-avatar {
  width: 120px;
  height: 120px;
  margin: 0 auto 20px;
  position: relative;
}

.partner-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--color-gold);
  transition: var(--transition-smooth);
  background: #fff;
  padding: 8px;
}

.partner-avatar:hover .partner-img {
  transform: scale(1.08);
  box-shadow: 0 0 25px rgba(254, 229, 2, 0.4);
}

.partner-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    var(--glass-bg) 0%,
    rgba(254, 229, 2, 0.1) 100%
  );
  border: 3px solid var(--glass-border);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 15px;
  transition: var(--transition-smooth);
}

.partner-placeholder svg {
  width: 35px;
  height: 35px;
  color: var(--color-gold);
  opacity: 0.5;
  margin-bottom: 8px;
  flex-shrink: 0;
}

.partner-placeholder .partner-name {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--color-gold);
  text-align: center;
  line-height: 1.2;
  display: block;
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
}

.partner-card:hover .partner-placeholder {
  border-color: var(--color-gold);
  box-shadow: 0 0 25px rgba(254, 229, 2, 0.3);
  transform: scale(1.08);
}

.partner-card h4 {
  font-size: 1rem;
  color: #fff;
  margin: 0;
  font-weight: 600;
}

/* Responsive Partners Section */
@media (max-width: 1024px) {
  .partners-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
  }


  .category-header h3 {
    font-size: 1.5rem;
  }
}

@media (max-width: 768px) {
  .partners-category {
    margin-top: 50px;
  }

  .category-header {
    flex-direction: column;
    gap: 12px;
    margin-bottom: 30px;
  }

  .category-header h3 {
    font-size: 1.3rem;
    text-align: center;
  }

  .partners-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .partners-grid-centered {
    max-width: 100%;
  }

  .partner-card {
    padding: 25px 15px;
  }

  .partner-avatar {
    width: 100px;
    height: 100px;
  }

  .partner-placeholder .partner-name {
    font-size: 0.65rem;
  }

  .partner-card h4 {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .partners-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .partner-avatar {
    width: 90px;
    height: 90px;
  }

  .category-icon {
    width: 45px;
    height: 45px;
  }

  .category-icon svg {
    width: 24px;
    height: 24px;
  }
}

/* Submarkets Section */

.branches-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
  margin-top: 40px;
  width: 100%;
  max-width: 100%;
}

@media (min-width: 1025px) {
  .branches-grid .branch-card:nth-child(5) {
    grid-column: 2 / 3;
  }
  .branches-grid .branch-card:nth-child(6) {
    grid-column: 3 / 4;
  }
}

@media (max-width: 1024px) {
  .branches-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .branches-grid {
    grid-template-columns: 1fr;
    gap: 15px;
    padding: 0;
    margin-left: 0;
    margin-right: 0;
  }

  .branch-card {
    width: 100%;
    max-width: 100%;
  }
}

.branch-card {
  padding: 0;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.branch-card:hover {
  transform: translateY(-10px);
  border-color: var(--color-gold);
}

.branch-img {
  width: 100%;
  height: 200px;
  background: var(--card-bg);
  position: relative;
  overflow: hidden;
}

.branch-img-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(10px) brightness(0.7);
  transform: scale(1.1);
  z-index: 1;
}

.branch-img-fg {
  position: relative;
  width: 100%;
  height: 100%;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 2;
}

.branch-info {
  padding: 20px;
}

.maps-btn {
  display: inline-block;
  margin-top: 15px;
  padding: 8px 20px;
  background: var(--color-gold);
  color: var(--color-black) !important;
  border-radius: 8px;
  font-weight: 600;
  transition: var(--transition-smooth);
}

.maps-btn:hover {
  background: #fff;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 5px 15px rgba(254, 229, 2, 0.4);
}

/* Footer */
footer {
  padding: 60px 0 30px;
  border-top: 1px solid var(--glass-border);
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 60px;
  margin-bottom: 60px;
}

.footer-links h4,
.footer-contact h4 {
  color: #fff;
  margin-bottom: 25px;
  font-size: 1.2rem;
}

.footer-links ul li {
  margin-bottom: 12px;
}

.footer-links a:hover {
  color: var(--color-gold);
  padding-right: 5px;
}

.footer-contact .contact-item {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
  color: var(--text-gray);
  transition: var(--transition-smooth);
  direction: ltr; /* Fix mirrored numbers */
  justify-content: flex-end; /* Align to right since parent is RTL */
}

@media (max-width: 768px) {
  .footer-contact .contact-item {
    justify-content: center;
  }
}

.footer-contact svg {
  width: 20px;
  height: 20px;
  color: var(--color-gold);
}

.copyright {
  padding-top: 30px;
  border-top: 1px solid var(--glass-border);
  text-align: center;
  color: var(--text-gray);
  font-size: 0.9rem;
}

/* WhatsApp FAB */
.whatsapp-fab {
  position: fixed;
  bottom: 40px;
  right: 40px;
  width: 65px;
  height: 65px;
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
  z-index: 2000;
  transition: var(--transition-smooth);
  cursor: pointer;
}

.whatsapp-fab:hover {
  transform: scale(1.1) translateY(-5px);
  box-shadow: 0 15px 30px rgba(37, 211, 102, 0.5);
}

.whatsapp-fab svg {
  width: 35px;
  height: 35px;
  fill: currentColor;
}

/* Service Page Styles */
.service-hero {
  height: 60vh;
  min-height: 400px;
  display: flex;
  align-items: center;
  background: var(--card-bg);
}

.details-section {
  display: flex;
  gap: 80px;
  margin-top: 100px;
  margin-bottom: 80px;
}

.details-text {
  flex: 1;
}

.details-image {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Image Album / Slider */
.album-container {
  position: relative;
  width: 100%;
  height: 550px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 20px 0;
}

.album-stack {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.album-item {
  position: absolute;
  width: 90%;
  height: 400px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
  cursor: pointer;
  background: #111;
}

.album-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Album Positioning Logic */
.album-item[data-pos="0"] {
  z-index: 5;
  transform: translateX(0) scale(1);
  opacity: 1;
}

.album-item[data-pos="1"] {
  z-index: 4;
  transform: translateX(40px) scale(0.9);
  opacity: 0.6;
}

.album-item[data-pos="-1"] {
  z-index: 4;
  transform: translateX(-40px) scale(0.9);
  opacity: 0.6;
}

.album-item[data-pos="2"],
.album-item[data-pos="-2"] {
  z-index: 3;
  transform: translateX(0) scale(0.7);
  opacity: 0;
  pointer-events: none;
}

.album-controls {
  position: absolute;
  bottom: -20px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 20px;
  z-index: 10;
}

.album-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--color-gold);
  color: #000;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Team Section Styles */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 50px;
  width: 100%;
  max-width: 100%;
}

.team-card {
  padding: 40px 20px;
  text-align: center;
  transition: var(--transition-smooth);
}

.team-card:hover {
  transform: translateY(-10px);
  border-color: var(--color-gold);
}

.member-avatar {
  width: 150px;
  height: 150px;
  margin: 0 auto 25px;
  position: relative;
}

.member-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--color-gold);
  transition: var(--transition-smooth);
}

.member-avatar:hover .member-img {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(254, 229, 2, 0.3);
}

.avatar-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    var(--glass-bg) 0%,
    rgba(254, 229, 2, 0.1) 100%
  );
  border: 2px solid var(--glass-border);
  position: relative;
  overflow: hidden;
}

.avatar-placeholder::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23fee502" opacity="0.2"><path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/></svg>')
    center/60% no-repeat;
}

.team-card:hover .avatar-placeholder {
  border-color: var(--color-gold);
  box-shadow: 0 0 20px rgba(254, 229, 2, 0.2);
}

.member-info h4 {
  font-size: 1.2rem;
  color: #fff;
  margin-bottom: 8px;
}

.member-info p {
  color: var(--color-gold);
  font-size: 0.95rem;
  font-weight: 600;
}

@media (max-width: 768px) {
  .team-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    padding: 0;
    margin-left: 0;
    margin-right: 0;
  }

  .team-card {
    padding: 30px 15px;
    width: 100%;
    max-width: 100%;
  }
}

.album-btn:hover {
  transform: scale(1.15);
  background: #fff;
  box-shadow: 0 8px 25px rgba(254, 229, 2, 0.4);
}

.album-btn svg {
  width: 24px;
  height: 24px;
}

.prev-btn svg {
  transform: rotate(180deg); /* Points Right in RTL (Base is <) */
}

.next-btn svg {
  transform: rotate(180deg); /* Points Left in RTL (Base is >) */
}

/* Responsive */
@media (max-width: 1024px) {
  .video-hero h1 {
    font-size: 3.5rem;
  }

  .footer-content {
    grid-template-columns: 1fr 1fr;
  }

  /* Subpage Stacking for Tablets */
  .details-section {
    flex-direction: column;
    gap: 80px;
    margin-top: 80px;
    padding-top: 60px;
    border-top: 1px solid var(--glass-border);
  }

  .details-text {
    width: 100%;
    margin-bottom: 40px;
  }

  .album-container {
    width: 100%;
    height: 550px;
    margin-top: 40px;
    margin-bottom: 40px;
  }

  .album-item {
    width: 85%;
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    inset: 0;
    top: 0;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(25px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px 40px;
    gap: 30px;
    transform: translateX(100%);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1500;
    visibility: hidden;
  }

  .nav-links.active {
    transform: translateX(0);
    visibility: visible;
  }

  .nav-links a {
    font-size: 1.8rem;
    font-weight: 600;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
  }

  .nav-links.active a {
    opacity: 1;
    transform: translateY(0);
  }

  /* Stagger links */
  .nav-links.active a:nth-child(1) {
    transition-delay: 0.1s;
  }
  .nav-links.active a:nth-child(2) {
    transition-delay: 0.15s;
  }
  .nav-links.active a:nth-child(3) {
    transition-delay: 0.2s;
  }
  .nav-links.active a:nth-child(4) {
    transition-delay: 0.25s;
  }
  .nav-links.active a:nth-child(5) {
    transition-delay: 0.3s;
  }
  .nav-links.active a:nth-child(6) {
    transition-delay: 0.35s;
  }

  .hamburger {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 10px;
    position: relative;
    z-index: 2001; /* Above drawer links */
  }

  .hamburger span {
    width: 30px;
    height: 2px;
    background: var(--text-color);
    transition: var(--transition-smooth);
    border-radius: 2px;
  }

  .hamburger.active span {
    background: var(--color-gold);
  }

  .hamburger.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
  }

  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
  }

  .video-hero {
    height: 100vh; /* Stay full screen on mobile too */
  }

  .video-hero h1 {
    font-size: 2.2rem;
    line-height: 1.2;
  }

  .video-hero p {
    font-size: 1rem;
    padding: 0 10px;
  }

  /* Counters Mobile Fix */
  .stats-section {
    padding: 60px 0;
  }

  /* Footer Refinement */
  .footer-content {
    gap: 40px;
  }

  /* Subpage De-jamming */
  .service-hero {
    height: 40vh;
    padding-top: 100px;
  }

  .details-section {
    flex-direction: column;
    gap: 60px;
    margin-top: 60px;
    padding-top: 60px;
  }

  .album-container {
    height: 380px;
    margin-top: 80px;
    margin-bottom: 60px;
  }

  .album-item {
    width: 95%;
    height: 250px;
  }

  .album-controls {
    bottom: -40px;
  }
}

@media (max-width: 480px) {
  .video-hero h1 {
    font-size: 2rem;
  }

  .section-header h2 {
    font-size: 2rem;
  }

  .counter-number {
    font-size: 2.5rem;
  }
}

/* Vision Section - Premium Brand Dark Theme */
.vision-section {
  background: linear-gradient(to bottom, #0a0a0a 0%, #000000 100%);
  padding: 120px 0;
  border-bottom: 1px solid var(--glass-border);
}

.vision-section h2 {
  color: #fff;
  font-size: 2.8rem;
  margin-bottom: 15px;
}

.vision-section .subtitle {
  color: var(--color-gold);
  font-size: 1.1rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 50px;
  display: block;
}

.vision-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 50px;
}

.vision-card {
  padding: 40px 30px;
  text-align: center;
  height: 100%;
}

.vision-icon {
  color: var(--color-gold);
  margin-bottom: 25px;
  display: flex;
  justify-content: center;
  filter: drop-shadow(0 0 10px rgba(254, 229, 2, 0.3));
}

.vision-icon svg {
  width: 45px;
  height: 45px;
  stroke-width: 1.5;
}

.vision-card h3 {
  color: #fff;
  font-size: 1.5rem;
  margin-bottom: 15px;
  font-weight: 700;
}

.vision-card p {
  color: var(--text-gray);
  font-size: 1rem;
  line-height: 1.6;
}

@media (max-width: 1024px) {
  .vision-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .vision-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .vision-section h2 {
    font-size: 2.2rem;
  }
}

.back-to-top {
  position: fixed;
  bottom: 40px;
  left: 40px;
  width: 50px;
  height: 50px;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  color: var(--color-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1000;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--color-gold);
  color: #000;
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(254, 229, 2, 0.3);
}

.back-to-top svg {
  width: 24px;
  height: 24px;
}

@media (max-width: 768px) {
  .back-to-top {
    bottom: 20px;
    left: 20px;
    width: 45px;
    height: 45px;
  }
}

/* === MOBILE HERO LAYOUT === */
@media (max-width: 768px) {
  /* Main container: flex column layout */
  .hero-section {
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
    min-height: 100vh !important;
    padding-top: 0 !important;
    background: var(--bg-color) !important;
    position: relative !important;
  }

  /* Image slider: fills top portion */
  .hero-slider {
    position: relative !important;
    width: 100% !important;
    height: calc(50vh + 80px) !important; /* Account for navbar height */
    min-height: 380px !important;
    flex-shrink: 0 !important;
    inset: auto !important;
  }

  .hero-slider .slide {
    animation: none !important;
    background-position: center !important;
  }

  /* Light overlay: covers entire slider including navbar area */
  .hero-mask {
    display: block !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: 100% !important; /* Covers full slider */
    background: linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.35) 0%,
      rgba(0, 0, 0, 0.15) 50%,
      rgba(0, 0, 0, 0.45) 100%
    ) !important;
    z-index: 2 !important;
    pointer-events: none !important;
  }

  /* Text content: positioned below slider */
  .hero-content-container {
    position: relative !important;
    transform: none !important;
    top: auto !important;
    left: auto !important;
    bottom: auto !important;
    right: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 40px 25px 60px !important;
    background: var(--bg-color) !important;
    border: none !important;
    border-radius: 0 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    animation: none !important;
    text-align: center !important;
    box-shadow: none !important;
  }

  .hero-section h1 {
    font-size: 2.2rem !important;
    margin-bottom: 20px !important;
    text-shadow: none !important;
  }

  .hero-section p {
    font-size: 1.1rem !important;
    line-height: 1.6 !important;
    text-shadow: none !important;
  }
}

/* === FORCE SECTION PADDING FOR GRIDS === */
@media (max-width: 1024px) {
  /* Target sections that contain grids */
  section.container {
    padding-left: 30px !important;
    padding-right: 30px !important;
  }
}

@media (max-width: 768px) {
  section.container {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  /* Ensure grids inside don't add extra spacing */
  section.container .sectors-grid,
  section.container .branches-grid,
  section.container .team-grid {
    padding: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
  }
}
