/* ============================================
   iSecure - Digital Alarm Modern Redesign
   Modern Dark Security Theme
   ============================================ */

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

:root {
  /* Brand colors (same in both themes) */
  --primary: #dc2626;
  --primary-dark: #b91c1c;
  --primary-light: #ef4444;
  --accent: #f59e0b;
  --gradient-accent: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  --shadow-glow: 0 0 20px rgba(220, 38, 38, 0.3);

  /* Dark theme (default) */
  --bg-dark: #0f172a;
  --bg-darker: #020617;
  --bg-card: #1e293b;
  --bg-card-hover: #334155;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --border: #334155;
  --gradient-hero: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%);
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --nav-bg: rgba(15, 23, 42, 0.85);
  --nav-bg-scrolled: rgba(15, 23, 42, 0.95);
  --mobile-menu-bg: #0f172a;
  --banner-gradient: linear-gradient(to top, #020617, transparent 60%);
  --page-banner-gradient: linear-gradient(to top, var(--bg-darker), rgba(15, 23, 42, 0.7));
  --card-img-overlay: linear-gradient(to top, rgba(15, 23, 42, 0.4), transparent);

  /* Sizing & misc (unchanged) */
  --radius: 12px;
  --radius-lg: 20px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --color-scheme: dark;
}

/* ============================================
   LIGHT THEME OVERRIDES
   Activated by [data-theme="light"] on <html>
   ============================================ */
[data-theme="light"] {
  --bg-dark: #f1f5f9;
  --bg-darker: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --gradient-hero: linear-gradient(135deg, #f8fafc 0%, #fee2e2 50%, #fecaca 100%);
  --shadow-sm: 0 1px 2px 0 rgb(15 23 42 / 0.04);
  --shadow: 0 4px 6px -1px rgb(15 23 42 / 0.06), 0 2px 4px -2px rgb(15 23 42 / 0.05);
  --shadow-lg: 0 10px 15px -3px rgb(15 23 42 / 0.08), 0 4px 6px -4px rgb(15 23 42 / 0.05);
  --nav-bg: rgba(255, 255, 255, 0.85);
  --nav-bg-scrolled: rgba(255, 255, 255, 0.95);
  --mobile-menu-bg: #ffffff;
  --banner-gradient: linear-gradient(to top, #ffffff, transparent 60%);
  --page-banner-gradient: linear-gradient(to top, rgba(255, 255, 255, 0.05), rgba(15, 23, 42, 0.5));
  --card-img-overlay: linear-gradient(to top, rgba(15, 23, 42, 0.1), transparent);
  --color-scheme: light;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Cairo', 'Poppins', sans-serif;
  background: var(--bg-darker);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  color-scheme: var(--color-scheme);
  transition: background-color 0.35s ease, color 0.35s ease;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-darker);
}
::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 4px;
}

/* ============================================
   NAVIGATION
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.navbar.scrolled {
  background: var(--nav-bg-scrolled);
  box-shadow: var(--shadow-lg);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.nav-logo img {
  height: 50px;
  width: auto;
  filter: drop-shadow(0 0 10px rgba(220, 38, 38, 0.4));
}

.nav-logo span {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 0.5rem;
  align-items: center;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
  background: rgba(220, 38, 38, 0.15);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 20%;
  right: 20%;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
}

.lang-switch {
  background: var(--gradient-accent);
  color: white !important;
  padding: 0.5rem 1rem !important;
  border-radius: 8px;
  font-size: 0.85rem !important;
}

.lang-switch:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.nav-login {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gradient-accent);
  color: white !important;
  padding: 0.6rem 1.2rem !important;
  border-radius: 8px;
  font-size: 0.9rem !important;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
  transition: var(--transition);
}

.nav-login:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
  color: white !important;
}

.nav-login i {
  font-size: 0.95rem;
}

[dir="rtl"] .nav-login {
  flex-direction: row-reverse;
}

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 12px;
  margin: -12px;
  z-index: 1100;
  background: transparent;
  border: none;
}

.mobile-toggle span {
  width: 25px;
  height: 2px;
  background: var(--text-primary);
  transition: var(--transition);
  transform-origin: center;
}

.mobile-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

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

.mobile-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: var(--gradient-hero);
}

.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../public/222.jpg') center/cover;
  opacity: 0.15;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 0%, var(--bg-darker) 80%);
}

.hero-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-particles span {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--primary);
  border-radius: 50%;
  animation: float 8s infinite ease-in-out;
  opacity: 0.6;
}

@keyframes float {
  0%, 100% { transform: translateY(0) translateX(0); opacity: 0; }
  10% { opacity: 0.6; }
  90% { opacity: 0.6; }
  100% { transform: translateY(-100vh) translateX(50px); opacity: 0; }
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 900px;
  padding: 2rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(220, 38, 38, 0.15);
  border: 1px solid rgba(220, 38, 38, 0.3);
  padding: 0.5rem 1.2rem;
  border-radius: 50px;
  font-size: 0.9rem;
  color: var(--primary-light);
  margin-bottom: 2rem;
  animation: fadeInDown 0.8s ease;
}

.hero-badge::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.8s ease 0.2s both;
}

.hero h1 span {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  animation: fadeInUp 0.8s ease 0.4s both;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease 0.6s both;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 1rem 2rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.btn-primary {
  background: var(--gradient-accent);
  color: white;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 30px rgba(220, 38, 38, 0.5);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--primary);
  background: rgba(220, 38, 38, 0.1);
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
  padding: 6rem 2rem;
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 4rem;
}

.section-label {
  display: inline-block;
  color: var(--primary);
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 1rem;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 1rem;
}

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

.container {
  max-width: 1400px;
  margin: 0 auto;
}

/* ============================================
   FEATURE CARDS
   ============================================ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-accent);
  transform: scaleX(0);
  transition: var(--transition);
}

.feature-card:hover::before {
  transform: scaleX(1);
}

.feature-card:hover {
  transform: translateY(-8px);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-lg);
  border-color: rgba(220, 38, 38, 0.3);
}

.feature-icon {
  width: 60px;
  height: 60px;
  background: rgba(220, 38, 38, 0.1);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 1.8rem;
}

.feature-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
}

.feature-card p {
  color: var(--text-secondary);
  line-height: 1.8;
}

/* ============================================
   IMAGE CONTENT SECTIONS
   ============================================ */
.content-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.content-split.reverse {
  direction: ltr;
}

.content-split.reverse > * {
  direction: rtl;
}

.content-image {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.content-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: var(--transition);
}

.content-image:hover img {
  transform: scale(1.05);
}

.content-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--card-img-overlay);
  pointer-events: none;
}

.content-text h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
}

.content-text p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
  line-height: 1.9;
}

/* ============================================
   VIDEO SECTION
   ============================================ */
.video-section {
  background: var(--bg-dark);
}

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

.video-container {
  max-width: 1000px;
  margin: 0 auto;
}

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 0 40px rgba(220, 38, 38, 0.2), var(--shadow-lg);
  border: 2px solid rgba(220, 38, 38, 0.3);
  background: #000;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Inline HTML5 video player */
.video-player {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 0 40px rgba(220, 38, 38, 0.2), var(--shadow-lg);
  border: 2px solid rgba(220, 38, 38, 0.3);
  background: #000;
}

.video-player video {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* Custom centered play overlay */
.video-play-overlay-custom {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  cursor: pointer;
  transition: var(--transition);
  z-index: 2;
}

.video-play-overlay-custom:hover {
  background: rgba(0, 0, 0, 0.2);
}

.video-play-overlay-custom.hidden {
  opacity: 0;
  pointer-events: none;
}

.video-play-btn-custom {
  width: 90px;
  height: 90px;
  background: rgba(220, 38, 38, 0.95);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  box-shadow: 0 0 40px rgba(220, 38, 38, 0.6);
  border: 3px solid rgba(255, 255, 255, 0.2);
}

.video-play-overlay-custom:hover .video-play-btn-custom {
  transform: scale(1.12);
  background: var(--primary);
  box-shadow: 0 0 60px rgba(220, 38, 38, 0.85);
}

.video-play-btn-custom i {
  color: white;
  font-size: 2.2rem;
  margin-left: 5px;
}

/* YouTube thumbnail fallback (kept for reference) */
.video-thumb-link {
  display: block;
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 0 40px rgba(220, 38, 38, 0.2), var(--shadow-lg);
  border: 2px solid rgba(220, 38, 38, 0.3);
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
}

.video-thumb-link:hover {
  transform: scale(1.01);
  box-shadow: 0 0 60px rgba(220, 38, 38, 0.35), var(--shadow-lg);
}

.video-thumb-link img {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.video-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  transition: var(--transition);
}

.video-thumb-link:hover .video-play-overlay {
  background: rgba(0, 0, 0, 0.15);
}

.video-play-btn {
  width: 90px;
  height: 90px;
  background: rgba(220, 38, 38, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  box-shadow: 0 0 30px rgba(220, 38, 38, 0.5);
}

.video-thumb-link:hover .video-play-btn {
  transform: scale(1.1);
  background: var(--primary);
  box-shadow: 0 0 50px rgba(220, 38, 38, 0.7);
}

.video-play-btn i {
  color: white;
  font-size: 2rem;
  margin-left: 4px;
}

/* ============================================
   STATS
   ============================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.stat-item {
  text-align: center;
  padding: 2rem;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.stat-item:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--primary);
  display: block;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-top: 0.5rem;
}

/* ============================================
   CONTACT
   ============================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

a.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: var(--transition);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

a.contact-item:hover {
  border-color: var(--primary);
  transform: translateX(-5px);
  color: inherit;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.contact-item:hover {
  border-color: var(--primary);
  transform: translateX(-5px);
}

.contact-item i {
  font-size: 1.5rem;
  color: var(--primary);
  margin-top: 4px;
}

.contact-item h4 {
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
}

.contact-item a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
}

.contact-item a:hover {
  color: var(--primary-light);
}

.contact-map {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  height: 100%;
  min-height: 400px;
}

.contact-map iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--bg-dark);
  border-top: 1px solid var(--border);
  padding: 4rem 2rem 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 4rem;
  max-width: 1400px;
  margin: 0 auto 3rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}

.footer-brand-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-brand-top img {
  height: 60px;
  width: auto;
}

.footer-brand-top span {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.footer-brand img {
  height: 60px;
  margin-bottom: 1rem;
}

.footer-brand p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.footer-social {
  display: flex;
  gap: 1rem;
}

.footer-social a {
  width: 44px;
  height: 44px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.footer-social a:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: translateY(-3px);
}

.footer-social img {
  width: 20px;
  height: 20px;
  filter: brightness(0) invert(1);
}

.footer-links h4 {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.8rem;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
}

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

.footer-bottom {
  max-width: 1400px;
  margin: 0 auto;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .content-split,
  .contact-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .content-split.reverse {
    direction: rtl;
  }

  .contact-map {
    min-height: 350px;
  }

  .footer-grid {
    gap: 2.5rem;
  }

  .section-header {
    margin-bottom: 3rem;
  }
}

@media (max-width: 900px) {
  /* Lock body scroll when mobile menu is open */
  body:has(.nav-links.active) {
    overflow: hidden;
  }

  .nav-links {
    position: fixed;
    top: 0;
    inset-inline-start: -100%;
    width: 100%;
    height: 100vh;
    background: var(--mobile-menu-bg);
    flex-direction: column;
    align-items: stretch;
    padding: 5rem 1.25rem 2rem;
    gap: 1rem;
    overflow-y: auto;
    transition: inset-inline-start 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1050;
  }

  .nav-links.active {
    inset-inline-start: 0;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    width: 100%;
    text-align: center;
    padding: 1.1rem 1.25rem;
    font-size: 1.05rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    transition: var(--transition);
  }

  .nav-links a:hover,
  .nav-links a.active {
    background: rgba(220, 38, 38, 0.18);
    border-color: rgba(220, 38, 38, 0.6);
    color: var(--text-primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
  }

  .nav-links a.active {
    background: rgba(220, 38, 38, 0.22);
    border-color: var(--primary);
  }

  .nav-links a.active::after {
    content: '';
    position: static;
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(220, 38, 38, 0.7);
    flex-shrink: 0;
  }

  .nav-login {
    margin-top: 0.75rem;
    justify-content: center;
    padding: 1rem 1.25rem !important;
    font-size: 1.05rem !important;
  }

  .mobile-toggle {
    display: flex;
  }

  .nav-container {
    padding: 0 1rem;
    height: 70px;
  }

  .navbar {
    height: 70px;
  }

  .nav-logo img {
    height: 40px;
  }

  .nav-logo span {
    font-size: 1.25rem;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 3.5rem 1.25rem;
  }

  .hero {
    min-height: calc(100vh - 10px);
    padding-top: 70px;
  }

  .hero-content {
    padding: 1rem;
  }

  .hero-badge {
    font-size: 0.8rem;
    padding: 0.4rem 1rem;
    margin-bottom: 1.5rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
    gap: 0.75rem;
  }

  .btn {
    width: 100%;
    justify-content: center;
    padding: 0.9rem 1.5rem;
    font-size: 0.95rem;
  }

  .section-title {
    font-size: clamp(1.5rem, 7vw, 2rem);
  }

  .section-desc {
    font-size: 1rem;
  }

  .feature-card {
    padding: 1.75rem;
  }

  .feature-card h3 {
    font-size: 1.15rem;
  }

  .feature-icon {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }

  .stat-number {
    font-size: 2rem;
  }

  .stat-item {
    padding: 1.25rem;
  }

  .video-play-btn-custom,
  .video-play-btn {
    width: 70px;
    height: 70px;
  }

  .video-play-btn-custom i,
  .video-play-btn i {
    font-size: 1.7rem;
  }

  .footer {
    padding: 3rem 1.25rem 1.5rem;
  }

  .footer-grid {
    gap: 2rem;
    text-align: center;
  }

  .footer-brand,
  .footer-links {
    align-items: center;
  }

  .footer-brand-top {
    justify-content: center;
  }

  .footer-social {
    justify-content: center;
  }

  .footer-links a:hover {
    padding-right: 0;
  }

  [dir="ltr"] .footer-links a:hover {
    padding-left: 5px;
    padding-right: 0;
  }

  [dir="rtl"] .footer-links a:hover {
    padding-right: 5px;
    padding-left: 0;
  }

  .contact-item {
    padding: 1.15rem;
  }

  .contact-item h4 {
    font-size: 1rem;
  }

  .contact-map {
    min-height: 280px;
  }

  .page-banner {
    height: 260px;
    margin-top: 70px;
  }

  .page-banner-content h1 {
    font-size: clamp(1.5rem, 6vw, 2rem);
  }

  .team-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .team-card img {
    height: 220px;
  }

  .feature-large {
    gap: 1.5rem;
    margin-bottom: 3rem;
  }

  .feature-large-content h3 {
    font-size: 1.4rem;
  }

  [dir="rtl"] .contact-item:hover,
  [dir="rtl"] a.contact-item:hover {
    transform: translateX(5px);
  }
}

@media (max-width: 480px) {
  .nav-logo span {
    display: inline;
    font-size: 1.15rem;
  }

  .hero h1 {
    font-size: clamp(1.6rem, 8vw, 2.2rem);
  }

  .hero p {
    font-size: 0.95rem;
  }

  .footer-brand-top span {
    font-size: 1.25rem;
  }
}

html {
  scroll-padding-top: 80px;
}

@media (max-width: 900px) {
  html {
    scroll-padding-top: 70px;
  }
}

/* ============================================
   IMAGE BANNER (for pages with top image)
   ============================================ */
.banner-image {
  position: relative;
  height: 500px;
  overflow: hidden;
}

.banner-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.banner-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--banner-gradient);
  pointer-events: none;
}

@media (max-width: 768px) {
  .banner-image {
    height: 260px;
  }
}

@media (max-width: 480px) {
  .banner-image {
    height: 200px;
  }
}

.page-banner {
  position: relative;
  height: 400px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 80px;
}

.page-banner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--page-banner-gradient);
}

.page-banner-content {
  position: relative;
  z-index: 2;
  text-align: center;
}

.page-banner-content h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
}

.page-banner-content p {
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

/* ============================================
   ABOUT PAGE SPECIFIC
   ============================================ */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.team-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: var(--transition);
}

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

.team-card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
}

.team-card-body {
  padding: 1.5rem;
  text-align: center;
}

.team-card-body h3 {
  font-size: 1.2rem;
  margin-bottom: 0.3rem;
}

.team-card-body p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ============================================
   FEATURES PAGE SPECIFIC
   ============================================ */
.feature-large {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  margin-bottom: 4rem;
}

.feature-large:nth-child(even) {
  direction: ltr;
}

.feature-large:nth-child(even) > * {
  direction: rtl;
}

.feature-large-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.feature-large-image img {
  width: 100%;
  display: block;
  transition: var(--transition);
}

.feature-large-image:hover img {
  transform: scale(1.05);
}

.feature-large-content h3 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.feature-large-content p {
  color: var(--text-secondary);
  line-height: 1.9;
  margin-bottom: 1rem;
}

@media (max-width: 1024px) {
  .feature-large {
    grid-template-columns: 1fr;
  }
  .feature-large:nth-child(even) {
    direction: rtl;
  }
}

/* Utility */
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.mt-4 { margin-top: 4rem; }
.mb-2 { margin-bottom: 2rem; }

/* ============================================
   THEME TOGGLE BUTTON
   Sun / Moon icon swap, sits in the navbar
   ============================================ */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition);
  font-size: 1.05rem;
  padding: 0;
  margin: 0 0.25rem;
  position: relative;
  overflow: hidden;
}

.theme-toggle:hover {
  background: rgba(220, 38, 38, 0.15);
  border-color: var(--primary);
  color: var(--primary-light);
  transform: translateY(-1px);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Icon swap animation */
.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Default state: dark mode is active, show sun (click to go light) */
.theme-toggle .icon-sun {
  transform: rotate(0deg) scale(1);
  opacity: 1;
}
.theme-toggle .icon-moon {
  transform: rotate(-90deg) scale(0.5);
  opacity: 0;
}

/* Light mode is active, show moon (click to go dark) */
[data-theme="light"] .theme-toggle .icon-sun {
  transform: rotate(90deg) scale(0.5);
  opacity: 0;
}
[data-theme="light"] .theme-toggle .icon-moon {
  transform: rotate(0deg) scale(1);
  opacity: 1;
}

/* Mobile: theme toggle sits above the mobile menu links, like lang switch */
@media (max-width: 900px) {
  .theme-toggle {
    width: 100%;
    height: auto;
    border-radius: 12px;
    padding: 1.1rem 1.25rem !important;
    font-size: 1.05rem !important;
    margin: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-primary);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    gap: 10px;
    position: static;
    overflow: visible;
  }

  .theme-toggle .icon-sun,
  .theme-toggle .icon-moon {
    position: static;
    transform: none !important;
    opacity: 1 !important;
    width: auto;
    height: auto;
  }

  /* In mobile menu: show one icon at a time using a different mechanism */
  [data-theme="light"] .theme-toggle .icon-sun { display: none; }
  [data-theme="light"] .theme-toggle .icon-moon { display: flex; }
  :not([data-theme="light"]) .theme-toggle .icon-sun { display: flex; }
  :not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}
