/* ============================================================
   TAMDEEN STEEL - Premium CSS
   Steel Manufacturing Company
   Brand Colors: Charcoal #2D3436, Orange #E67E22
   ============================================================ */

/* ----------------------------------------------------------
   0. CSS VARIABLES & RESET
   ---------------------------------------------------------- */

:root {
  --charcoal: #2D3436;
  --dark: #1a1f20;
  --orange: #E67E22;
  --dark-orange: #D35400;
  --gray: #636E72;
  --light: #DFE6E9;
  --white: #ffffff;
  --black: #000000;
  --orange-glow: rgba(230, 126, 34, 0.3);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.18);
  --shadow-xl: 0 16px 60px rgba(0, 0, 0, 0.25);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 50px;
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
  --font-primary: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-arabic: 'Cairo', 'Tajawal', 'Inter', sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  color: var(--charcoal);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

[dir="rtl"] body {
  font-family: var(--font-arabic);
}

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

ul, ol {
  list-style: none;
}

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

/* ----------------------------------------------------------
   1. KEYFRAME ANIMATIONS
   ---------------------------------------------------------- */

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

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

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-12px);
  }
  60% {
    transform: translateY(-6px);
  }
}

@keyframes scrollWheel {
  0% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(8px);
  }
}

@keyframes floatP {
  0%, 100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.4;
  }
  25% {
    transform: translate(20px, -30px) scale(1.1);
    opacity: 0.7;
  }
  50% {
    transform: translate(-10px, -60px) scale(0.9);
    opacity: 0.5;
  }
  75% {
    transform: translate(15px, -40px) scale(1.05);
    opacity: 0.6;
  }
}

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

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

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 20px var(--orange-glow);
  }
  50% {
    box-shadow: 0 0 40px var(--orange-glow), 0 0 60px rgba(230, 126, 34, 0.15);
  }
}

/* Scroll-triggered animation classes */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.fade-in-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.fade-in-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.fade-in.visible,
.fade-in-left.visible,
.fade-in-right.visible {
  opacity: 1;
  transform: translate(0, 0);
}

/* RTL animation direction swap */
[dir="rtl"] .fade-in-left {
  transform: translateX(40px);
}

[dir="rtl"] .fade-in-right {
  transform: translateX(-40px);
}

[dir="rtl"] .fade-in-left.visible,
[dir="rtl"] .fade-in-right.visible {
  transform: translate(0, 0);
}

/* ----------------------------------------------------------
   2. SHARED BUTTONS
   ---------------------------------------------------------- */

.btn-primary-tamdeen {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  background: linear-gradient(135deg, var(--orange), var(--dark-orange));
  color: var(--white);
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: 0 4px 15px rgba(230, 126, 34, 0.35);
  position: relative;
  overflow: hidden;
  letter-spacing: 0.3px;
}

.btn-primary-tamdeen::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.btn-primary-tamdeen:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(230, 126, 34, 0.5);
}

.btn-primary-tamdeen:hover::before {
  left: 100%;
}

.btn-primary-tamdeen:active {
  transform: translateY(0);
}

.btn-outline-tamdeen {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  background: transparent;
  color: var(--white);
  font-size: 1rem;
  font-weight: 600;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-base);
  letter-spacing: 0.3px;
}

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

.btn-outline-tamdeen:active {
  transform: translateY(0);
}

/* ----------------------------------------------------------
   3. NAVIGATION
   ---------------------------------------------------------- */

.tamdeen-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: all var(--transition-base);
  background: transparent;
}

.tamdeen-nav.scrolled {
  background: rgba(26, 31, 32, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 10px 0;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo: JPEG with white bg on dark nav */
.nav-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.nav-logo img {
  height: 44px;
  width: auto;
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
  padding: 4px 0;
  transition: color var(--transition-fast);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--orange);
  border-radius: 2px;
  transition: width var(--transition-base);
}

.nav-links a:hover {
  color: var(--white);
}

.nav-links a:hover::after {
  width: 100%;
}

/* Language switch pill */
.nav-lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-full);
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  background: transparent;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.nav-lang-switch:hover {
  border-color: var(--orange);
  background: rgba(230, 126, 34, 0.1);
}

.nav-lang-switch .flag-icon {
  font-size: 1.15rem;
  line-height: 1;
}

/* System CTA */
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: linear-gradient(135deg, var(--orange), var(--dark-orange));
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: 0 3px 12px rgba(230, 126, 34, 0.3);
  white-space: nowrap;
}

.nav-cta svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 20px rgba(230, 126, 34, 0.45);
}

/* Mobile nav controls */
.nav-mobile-actions {
  display: none;
  align-items: center;
  gap: 12px;
}

.nav-lang-mobile {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-full);
  color: var(--white);
  font-size: 0.85rem;
  cursor: pointer;
  background: transparent;
  transition: all var(--transition-fast);
}

.nav-lang-mobile:hover {
  border-color: var(--orange);
}

/* Hamburger icon */
.nav-hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  gap: 6px;
}

.nav-hamburger span {
  display: block;
  width: 26px;
  height: 2.5px;
  background: var(--white);
  border-radius: 2px;
  transition: all var(--transition-base);
  transform-origin: center;
}

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

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

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

/* RTL nav */
[dir="rtl"] .nav-links a::after {
  left: auto;
  right: 0;
}

[dir="rtl"] .nav-container {
  direction: rtl;
}

/* ----------------------------------------------------------
   4. HERO SECTION
   ---------------------------------------------------------- */

.tamdeen-hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-video-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    180deg,
    rgba(26, 31, 32, 0.7) 0%,
    rgba(26, 31, 32, 0.5) 40%,
    rgba(26, 31, 32, 0.6) 70%,
    rgba(26, 31, 32, 0.85) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 820px;
  padding: 0 24px;
  animation: fadeInUp 1s ease-out 0.3s both;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  background: rgba(230, 126, 34, 0.15);
  border: 1px solid rgba(230, 126, 34, 0.35);
  border-radius: var(--radius-full);
  color: var(--orange);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 24px;
  backdrop-filter: blur(4px);
}

.hero-content h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 20px;
  letter-spacing: -0.5px;
}

.hero-content h1 span {
  color: var(--orange);
}

.hero-content p {
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Scroll indicator */
.hero-scroll-indicator {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  animation: bounce 2s infinite;
}

.hero-scroll-indicator .mouse {
  width: 26px;
  height: 42px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 14px;
  position: relative;
}

.hero-scroll-indicator .mouse::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  background: var(--orange);
  border-radius: 4px;
  animation: scrollWheel 1.5s infinite;
}

/* ----------------------------------------------------------
   5. STATS BAR
   ---------------------------------------------------------- */

.tamdeen-stats {
  position: relative;
  background: var(--dark);
  padding: 48px 0;
  border-top: 3px solid var(--orange);
}

.stats-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.stat-item {
  text-align: center;
  padding: 16px;
  position: relative;
}

.stat-item:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 10%;
  height: 80%;
  width: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.stat-number {
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 800;
  color: var(--orange);
  line-height: 1.2;
  margin-bottom: 6px;
}

.stat-item p {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.65);
  font-weight: 400;
}

[dir="rtl"] .stat-item:not(:last-child)::after {
  right: auto;
  left: 0;
}

/* ----------------------------------------------------------
   6. ABOUT SECTION
   ---------------------------------------------------------- */

.tamdeen-about {
  padding: 100px 0;
  background: var(--white);
}

.section-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

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

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px;
  background: rgba(230, 126, 34, 0.08);
  border: 1px solid rgba(230, 126, 34, 0.2);
  border-radius: var(--radius-full);
  color: var(--orange);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.section-header h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 800;
  color: var(--charcoal);
  margin-bottom: 12px;
  letter-spacing: -0.3px;
}

.section-header h2 span {
  color: var(--orange);
}

.section-header p {
  font-size: 1.05rem;
  color: var(--gray);
  max-width: 580px;
  margin: 0 auto;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-image {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-md);
}

.image-accent {
  position: absolute;
  bottom: -12px;
  left: -12px;
  width: 120px;
  height: 120px;
  border: 4px solid var(--orange);
  border-radius: var(--radius-md);
  z-index: -1;
}

[dir="rtl"] .image-accent {
  left: auto;
  right: -12px;
}

.about-text h3 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--charcoal);
  margin-bottom: 16px;
}

.about-text p {
  font-size: 1rem;
  color: var(--gray);
  line-height: 1.8;
  margin-bottom: 28px;
}

.about-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.about-feature {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  background: rgba(223, 230, 233, 0.3);
  border-radius: var(--radius-sm);
  transition: all var(--transition-base);
}

.about-feature:hover {
  background: rgba(230, 126, 34, 0.06);
  transform: translateY(-2px);
}

.feature-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--orange), var(--dark-orange));
  color: var(--white);
  border-radius: var(--radius-sm);
  font-size: 1.1rem;
}

.about-feature span {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--charcoal);
  line-height: 1.4;
}

[dir="rtl"] .about-grid {
  direction: rtl;
}

[dir="rtl"] .about-feature {
  flex-direction: row-reverse;
  text-align: right;
}

/* ----------------------------------------------------------
   7. PRODUCTS SECTION
   ---------------------------------------------------------- */

.tamdeen-products {
  padding: 100px 0;
  background: #f8f9fa;
}

.products-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.product-card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  position: relative;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.card-image {
  position: relative;
  height: 220px;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.product-card:hover .card-image img {
  transform: scale(1.1);
}

.card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    180deg,
    transparent 40%,
    rgba(26, 31, 32, 0.7) 100%
  );
  opacity: 0;
  transition: opacity var(--transition-base);
}

.product-card:hover .card-overlay {
  opacity: 1;
}

.card-body {
  padding: 24px;
}

.card-body h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--charcoal);
  margin-bottom: 8px;
}

.card-body p {
  font-size: 0.92rem;
  color: var(--gray);
  line-height: 1.6;
  margin-bottom: 16px;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--orange);
  transition: gap var(--transition-fast), color var(--transition-fast);
}

.card-link:hover {
  color: var(--dark-orange);
  gap: 10px;
}

.card-link::after {
  content: '\2192';
  transition: transform var(--transition-fast);
}

[dir="rtl"] .card-link::after {
  content: '\2190';
}

[dir="rtl"] .products-grid {
  direction: rtl;
}

[dir="rtl"] .card-body {
  text-align: right;
}

/* ----------------------------------------------------------
   8. GALLERY SECTION
   ---------------------------------------------------------- */

.tamdeen-gallery {
  padding: 100px 0;
  background: var(--white);
}

.gallery-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: auto auto;
  gap: 16px;
}

/* Masonry: items 1 and 4 span 2 columns */
.gallery-item:nth-child(1) {
  grid-column: span 2;
}

.gallery-item:nth-child(4) {
  grid-column: span 2;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  min-height: 260px;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.gallery-item:hover img {
  transform: scale(1.08);
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    180deg,
    transparent 50%,
    rgba(26, 31, 32, 0.8) 100%
  );
  opacity: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 24px;
  transition: opacity var(--transition-base);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-overlay h4 {
  color: var(--white);
  font-size: 1.05rem;
  font-weight: 600;
}

.gallery-overlay p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.85rem;
  margin-top: 4px;
}

/* ----------------------------------------------------------
   9. VIDEO SECTION
   ---------------------------------------------------------- */

.tamdeen-video-section {
  padding: 100px 0;
  background: #f8f9fa;
}

.video-wrapper {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  max-height: 70vh;
}

.video-wrapper video,
.video-wrapper iframe {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: var(--radius-lg);
  max-height: 70vh;
  object-fit: cover;
}

/* Hide default video controls */
.video-wrapper video::-webkit-media-controls {
  display: none !important;
}

.video-wrapper video::-webkit-media-controls-enclosure {
  display: none !important;
}

.video-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--orange), var(--dark-orange));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  z-index: 2;
  transition: all var(--transition-base);
  box-shadow: 0 8px 30px rgba(230, 126, 34, 0.4);
  animation: pulseGlow 2s infinite;
}

.video-play-btn::before {
  content: '';
  display: block;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 14px 0 14px 24px;
  border-color: transparent transparent transparent var(--white);
  margin-left: 4px;
}

.video-play-btn:hover {
  transform: translate(-50%, -50%) scale(1.1);
}

.video-play-btn.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.8);
}

/* ----------------------------------------------------------
   10. CTA SECTION
   ---------------------------------------------------------- */

.tamdeen-cta {
  position: relative;
  padding: 100px 0;
  background: var(--dark);
  overflow: hidden;
}

.tamdeen-cta::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(230, 126, 34, 0.12) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.tamdeen-cta::after {
  content: '';
  position: absolute;
  bottom: -40%;
  right: -15%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(230, 126, 34, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.cta-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
  text-align: center;
}

.cta-content h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 800;
  color: var(--white);
  margin-bottom: 16px;
  letter-spacing: -0.3px;
}

.cta-content h2 span {
  color: var(--orange);
}

.cta-content p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 36px;
  line-height: 1.7;
}

/* ----------------------------------------------------------
   11. FOOTER
   ---------------------------------------------------------- */

.tamdeen-footer {
  background: var(--charcoal);
  padding: 80px 0 0;
  color: rgba(255, 255, 255, 0.75);
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 48px;
}

/* Footer brand logo with white bg */
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-brand img {
  height: 48px;
  width: auto;
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.footer-brand p {
  font-size: 0.92rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.6);
}

.footer-col h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 12px;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 32px;
  height: 2.5px;
  background: var(--orange);
  border-radius: 2px;
}

[dir="rtl"] .footer-col h4::after {
  left: auto;
  right: 0;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-col ul li a {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.6);
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.footer-col ul li a:hover {
  color: var(--orange);
  padding-left: 4px;
}

[dir="rtl"] .footer-col ul li a:hover {
  padding-left: 0;
  padding-right: 4px;
}

.footer-col address {
  font-style: normal;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-col address a,
.footer-col address p {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-col address a:hover {
  color: var(--orange);
}

.footer-bottom {
  max-width: 1280px;
  margin: 48px auto 0;
  padding: 24px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.45);
}

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

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

[dir="rtl"] .footer-grid {
  direction: rtl;
  text-align: right;
}

[dir="rtl"] .footer-bottom {
  direction: rtl;
}

/* ----------------------------------------------------------
   12. LOGIN PAGE
   ---------------------------------------------------------- */

.tamdeen-login-wrapper {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* --- Left Panel (dark visual) --- */
.tamdeen-login-left {
  flex: 1;
  position: relative;
  background: var(--dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px;
  overflow: hidden;
  min-height: 100vh;
}

/* Rotating background image layer */
.tamdeen-login-left::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0.15;
  transition: background-image 1s ease-in-out;
  z-index: 0;
}

.tamdeen-login-left::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    180deg,
    rgba(26, 31, 32, 0.3) 0%,
    rgba(26, 31, 32, 0.8) 100%
  );
  z-index: 1;
}

/* Floating particles */
.login-particle {
  position: absolute;
  width: 6px;
  height: 6px;
  background: var(--orange);
  border-radius: 50%;
  opacity: 0.4;
  animation: floatP 8s infinite ease-in-out;
  z-index: 2;
}

.login-particle:nth-child(1) {
  top: 20%;
  left: 15%;
  animation-delay: 0s;
  animation-duration: 7s;
}

.login-particle:nth-child(2) {
  top: 60%;
  left: 75%;
  animation-delay: 1.5s;
  animation-duration: 9s;
  width: 4px;
  height: 4px;
}

.login-particle:nth-child(3) {
  top: 35%;
  left: 55%;
  animation-delay: 3s;
  animation-duration: 6s;
  width: 8px;
  height: 8px;
}

.login-particle:nth-child(4) {
  top: 80%;
  left: 30%;
  animation-delay: 2s;
  animation-duration: 10s;
}

.login-particle:nth-child(5) {
  top: 10%;
  left: 80%;
  animation-delay: 4s;
  animation-duration: 8s;
  width: 5px;
  height: 5px;
}

.login-brand-logo {
  position: relative;
  z-index: 3;
  margin-bottom: 36px;
  animation: loginFadeDown 0.8s ease-out;
}

.login-brand-logo img {
  height: 56px;
  width: auto;
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.login-hero-title {
  position: relative;
  z-index: 3;
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  font-weight: 800;
  color: var(--white);
  text-align: center;
  margin-bottom: 12px;
  animation: loginFadeUp 0.8s ease-out 0.15s both;
}

.login-hero-title span {
  color: var(--orange);
}

.login-hero-desc {
  position: relative;
  z-index: 3;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.65);
  text-align: center;
  max-width: 360px;
  line-height: 1.7;
  margin-bottom: 40px;
  animation: loginFadeUp 0.8s ease-out 0.3s both;
}

.login-hero-stats {
  position: relative;
  z-index: 3;
  display: flex;
  gap: 40px;
  animation: loginFadeUp 0.8s ease-out 0.45s both;
}

.login-hero-stats .stat-num {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--orange);
  display: block;
  text-align: center;
}

.login-hero-stats .stat-label {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.55);
  text-align: center;
  display: block;
  margin-top: 4px;
}

/* --- Right Panel (form) --- */
.tamdeen-login-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--white);
  min-height: 100vh;
  overflow-y: auto;
}

.login-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  animation: loginFadeDown 0.6s ease-out;
}

.login-lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1.5px solid var(--light);
  border-radius: var(--radius-full);
  color: var(--gray);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  background: transparent;
  transition: all var(--transition-fast);
}

.login-lang-btn:hover {
  border-color: var(--orange);
  color: var(--orange);
}

.login-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray);
  transition: color var(--transition-fast);
}

.login-back-link:hover {
  color: var(--orange);
}

.login-form-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 60px;
  max-width: 520px;
  width: 100%;
  margin: 0 auto;
  animation: loginFadeUp 0.7s ease-out 0.2s both;
}

.login-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--charcoal);
  margin-bottom: 8px;
}

.login-subtitle {
  font-size: 0.95rem;
  color: var(--gray);
  margin-bottom: 36px;
}

.login-field {
  margin-bottom: 20px;
  position: relative;
}

.login-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 8px;
}

.login-input {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--light);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  color: var(--charcoal);
  background: #fafbfc;
  transition: all var(--transition-fast);
  outline: none;
  font-family: inherit;
}

.login-input::placeholder {
  color: #b2bec3;
}

.login-input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.1);
  background: var(--white);
}

.login-input.rtl-input {
  direction: rtl;
  text-align: right;
  font-family: var(--font-arabic);
}

.login-toggle-pwd {
  position: absolute;
  right: 14px;
  top: 42px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray);
  font-size: 1.1rem;
  padding: 4px;
  transition: color var(--transition-fast);
}

.login-toggle-pwd:hover {
  color: var(--orange);
}

[dir="rtl"] .login-toggle-pwd {
  right: auto;
  left: 14px;
}

.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.login-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--gray);
  cursor: pointer;
}

.login-remember input[type="checkbox"] {
  accent-color: var(--orange);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.login-forgot {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--orange);
  transition: color var(--transition-fast);
}

.login-forgot:hover {
  color: var(--dark-orange);
}

.login-error {
  background: rgba(214, 48, 49, 0.08);
  border: 1px solid rgba(214, 48, 49, 0.2);
  color: #d63031;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  margin-bottom: 20px;
  display: none;
}

.login-error.show {
  display: block;
}

.login-submit-btn {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, var(--orange), var(--dark-orange));
  color: var(--white);
  font-size: 1rem;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: 0 4px 15px rgba(230, 126, 34, 0.3);
  position: relative;
  overflow: hidden;
  letter-spacing: 0.3px;
}

.login-submit-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.login-submit-btn:hover {
  box-shadow: 0 6px 25px rgba(230, 126, 34, 0.5);
  transform: translateY(-1px);
}

.login-submit-btn:hover::before {
  left: 100%;
}

.login-submit-btn:active {
  transform: translateY(0);
}

.login-submit-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.login-divider-line {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 28px 0;
  color: var(--gray);
  font-size: 0.82rem;
}

.login-divider-line::before,
.login-divider-line::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--light);
}

.login-social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 13px;
  border: 1.5px solid var(--light);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--charcoal);
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-bottom: 12px;
}

.login-social-btn:hover {
  border-color: var(--gray);
  background: #fafbfc;
}

.login-social-btn img,
.login-social-btn svg {
  width: 20px;
  height: 20px;
}

.login-signup-link {
  text-align: center;
  margin-top: 24px;
  font-size: 0.9rem;
  color: var(--gray);
}

.login-signup-link a {
  color: var(--orange);
  font-weight: 600;
}

.login-signup-link a:hover {
  color: var(--dark-orange);
}

.login-footer-copy {
  padding: 20px 40px;
  text-align: center;
  font-size: 0.78rem;
  color: #b2bec3;
}

/* ----------------------------------------------------------
   13. RESPONSIVE - 1024px (tablets, small laptops)
   ---------------------------------------------------------- */

@media (max-width: 1024px) {
  .about-grid {
    gap: 40px;
  }

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

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

  .gallery-item:nth-child(1),
  .gallery-item:nth-child(4) {
    grid-column: span 1;
  }

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

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

  .stat-item:nth-child(2)::after {
    display: none;
  }
}

/* ----------------------------------------------------------
   14. RESPONSIVE - 768px (mobile landscape, small tablets)
   ---------------------------------------------------------- */

@media (max-width: 768px) {
  /* Mobile fullscreen overlay nav */
  .nav-links {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(26, 31, 32, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 28px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    transition: all 0.4s ease;
    z-index: 999;
  }

  .nav-links.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-links a {
    font-size: 1.3rem;
    color: var(--white);
  }

  .nav-links .nav-lang-switch,
  .nav-links .nav-cta {
    display: inline-flex;
  }

  .nav-mobile-actions {
    display: flex;
  }

  /* About */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .about-image {
    max-height: 360px;
  }

  .about-features {
    grid-template-columns: 1fr;
  }

  /* Products single column */
  .products-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
  }

  /* Gallery single column */
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-item {
    min-height: 220px;
  }

  /* Stats */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-item::after {
    display: none;
  }

  /* Footer single column */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  /* Hero adjustments */
  .hero-content h1 {
    font-size: 2rem;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .hero-buttons .btn-primary-tamdeen,
  .hero-buttons .btn-outline-tamdeen {
    width: 100%;
    justify-content: center;
  }

  /* Smaller play button */
  .video-play-btn {
    width: 64px;
    height: 64px;
  }

  .video-play-btn::before {
    border-width: 10px 0 10px 18px;
    margin-left: 3px;
  }

  /* Login stacked layout */
  .tamdeen-login-wrapper {
    flex-direction: column;
  }

  .tamdeen-login-left {
    min-height: 40vh;
    padding: 32px 24px;
  }

  .login-hero-stats {
    gap: 24px;
  }

  .login-hero-stats .stat-num {
    font-size: 1.4rem;
  }

  .login-form-container {
    padding: 32px 24px;
  }

  .login-top-bar {
    padding: 16px 24px;
  }

  /* Reduced section padding */
  .tamdeen-about,
  .tamdeen-products,
  .tamdeen-gallery,
  .tamdeen-video-section,
  .tamdeen-cta {
    padding: 64px 0;
  }

  .tamdeen-footer {
    padding: 48px 0 0;
  }

  .section-header {
    margin-bottom: 40px;
  }
}

/* ----------------------------------------------------------
   15. RESPONSIVE - 480px (mobile portrait)
   ---------------------------------------------------------- */

@media (max-width: 480px) {
  .nav-logo img {
    height: 36px;
  }

  .hero-content h1 {
    font-size: 1.7rem;
  }

  .hero-badge {
    font-size: 0.75rem;
    padding: 6px 14px;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

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

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

  .cta-content h2 {
    font-size: 1.5rem;
  }

  .btn-primary-tamdeen,
  .btn-outline-tamdeen {
    padding: 12px 24px;
    font-size: 0.9rem;
  }

  .tamdeen-login-left {
    min-height: 35vh;
    padding: 24px 16px;
  }

  .login-hero-title {
    font-size: 1.4rem;
  }

  .login-hero-desc {
    font-size: 0.88rem;
  }

  .login-form-container {
    padding: 24px 16px;
  }

  .login-title {
    font-size: 1.5rem;
  }

  .login-hero-stats {
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .tamdeen-about,
  .tamdeen-products,
  .tamdeen-gallery,
  .tamdeen-video-section,
  .tamdeen-cta {
    padding: 48px 0;
  }

  .gallery-item {
    min-height: 180px;
  }
}

/* ----------------------------------------------------------
   16. RTL GLOBAL OVERRIDES
   ---------------------------------------------------------- */

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

[dir="rtl"] .section-header {
  text-align: center;
}

[dir="rtl"] .hero-content {
  text-align: center;
}

[dir="rtl"] .nav-links {
  direction: rtl;
}

[dir="rtl"] .login-field {
  text-align: right;
}

[dir="rtl"] .login-options {
  direction: rtl;
}

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

[dir="rtl"] .login-top-bar {
  direction: rtl;
}

[dir="rtl"] .login-signup-link {
  direction: rtl;
}

[dir="rtl"] .cta-content {
  text-align: center;
}

/* ----------------------------------------------------------
   17. UTILITIES & POLISH
   ---------------------------------------------------------- */

/* Text selection */
::selection {
  background: rgba(230, 126, 34, 0.2);
  color: var(--charcoal);
}

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

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

::-webkit-scrollbar-thumb {
  background: var(--gray);
  border-radius: 4px;
}

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

/* Keyboard focus ring */
*:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

/* Hide scrollbar on login right panel */
.tamdeen-login-right::-webkit-scrollbar {
  width: 0;
}

/* Image loading placeholder */
img {
  background: var(--light);
}

/* Print */
@media print {
  .tamdeen-nav,
  .hero-scroll-indicator,
  .video-play-btn {
    display: none;
  }

  .tamdeen-hero {
    height: auto;
    min-height: auto;
    page-break-after: always;
  }

  body {
    color: #000;
  }
}
