/* ============================================
   ATHEER KEYS - DESIGN SYSTEM & STYLES
   Professional Key Copying & Locksmith Services
   ============================================ */

/* ============================================
   CSS RESET & BASE STYLES
   ============================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

/* ============================================
   CSS VARIABLES - DESIGN TOKENS
   ============================================ */

:root {
  /* Brand Colors */
  --primary-yellow: #FFD700;
  --primary-orange: #FF8C00;
  --accent-gold: #FFA500;
  --dark-bg: #1a1a1a;
  --light-bg: #ffffff;
  --gray-bg: #f8f9fa;
  --text-dark: #2c2c2c;
  --text-light: #f5f5f5;
  --text-gray: #6c757d;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #FFD700 0%, #FF8C00 100%);
  --gradient-overlay: linear-gradient(135deg, rgba(255, 215, 0, 0.9) 0%, rgba(255, 140, 0, 0.9) 100%);
  --gradient-dark: linear-gradient(180deg, rgba(26, 26, 26, 0.95) 0%, rgba(26, 26, 26, 0.85) 100%);

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-2xl: 4rem;
  --spacing-3xl: 6rem;

  /* Border Radius */
  --radius-sm: 0.5rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.2);
  --shadow-glow: 0 0 30px rgba(255, 215, 0, 0.3);

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* Z-index */
  --z-header: 1000;
  --z-modal: 2000;
  --z-overlay: 1500;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Montserrat', 'Tajawal', sans-serif;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-dark);
  margin-bottom: var(--spacing-md);
}

body {
  font-family: 'Montserrat', 'Tajawal', sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--light-bg);
  overflow-x: hidden;
}

/* Arabic Text Support */
.arabic-text,
[lang="ar"] body,
[dir="rtl"] body {
  font-family: 'Tajawal', sans-serif;
}

/* RTL Support Utilities */
[dir="rtl"] .nav-links {
  margin-right: auto;
  margin-left: 0;
}

[dir="rtl"] .contact-icon {
  margin-left: 0.5rem;
  margin-right: 0;
}

[dir="rtl"] .footer-section h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Fix for icons in RTL */
[dir="rtl"] .fa,
[dir="rtl"] .fas,
[dir="rtl"] .fab {
  transform: scaleX(-1);
  /* Optional: flips directional icons if needed */
  display: inline-block;
}

/* Fix for service card icons in RTL (gradient text conflict) */
[dir="rtl"] .card-icon i {
  transform: none;
}

/* Specific icon fixes that shouldn't flip */
[dir="rtl"] .fa-whatsapp,
[dir="rtl"] .fa-instagram,
[dir="rtl"] .fa-facebook,
[dir="rtl"] .fa-twitter,
[dir="rtl"] .fa-youtube,
[dir="rtl"] .fa-clock,
[dir="rtl"] .fa-map-marker-alt,
[dir="rtl"] .fa-phone-alt,
[dir="rtl"] .fa-bars,
[dir="rtl"] .fa-times,
[dir="rtl"] .fa-search-plus,
[dir="rtl"] .fa-check,
[dir="rtl"] .fa-star {
  transform: none;
}

/* Language Switcher */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text-light);
  text-decoration: none;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  transition: all 0.3s ease;
  font-family: 'Tajawal', 'Montserrat', sans-serif;
}

.lang-switch:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--primary-yellow);
  color: var(--primary-yellow);
}

[dir="rtl"] .lang-switch {
  font-family: 'Montserrat', sans-serif;
}

/* ============================================
   LAYOUT UTILITIES
   ============================================ */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.container-wide {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.section {
  padding: var(--spacing-3xl) 0;
}

.section-dark {
  background-color: var(--dark-bg);
  color: var(--text-light);
}

.section-gray {
  background-color: var(--gray-bg);
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  display: inline-block;
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-base);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--dark-bg);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.btn-outline {
  background: transparent;
  color: var(--text-light);
  border: 2px solid var(--primary-yellow);
}

.btn-outline:hover {
  background: var(--gradient-primary);
  color: var(--dark-bg);
  transform: translateY(-3px);
}

.btn-large {
  padding: 1.25rem 2.5rem;
  font-size: 1.125rem;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-header);
  background: rgba(26, 26, 26, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}

.header.scrolled {
  background: rgba(26, 26, 26, 0.98);
  box-shadow: var(--shadow-md);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem var(--spacing-md);
  max-width: 1400px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-light);
  font-size: 1.5rem;
  font-weight: 700;
}

.logo-icon {
  font-size: 2rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Language filtered logo text - Desktop */
[lang="ar"] .logo-text-en {
  display: none;
}

[lang="en"] .logo-text-ar {
  display: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: var(--spacing-lg);
}

.nav-link {
  color: var(--text-light);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-fast);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: width var(--transition-base);
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-yellow);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--dark-bg);
  overflow: hidden;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-dark);
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  color: var(--text-light);
  max-width: 900px;
  padding: var(--spacing-lg);
  animation: fadeInUp 1s ease;
}

.hero-title {
  color: var(--text-light);
  margin-bottom: var(--spacing-md);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  margin-bottom: var(--spacing-xl);
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
}

.hero-cta {
  display: flex;
  gap: var(--spacing-md);
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================
   CARDS
   ============================================ */

.card {
  background: var(--light-bg);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transition: transform var(--transition-base);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.card:hover::before {
  transform: scaleX(1);
}

.card-icon {
  font-size: 3rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--spacing-md);
}

.card-title {
  font-size: 1.5rem;
  margin-bottom: var(--spacing-sm);
  color: var(--text-dark);
}

.card-text {
  color: var(--text-gray);
  line-height: 1.7;
}

/* Glass Card Variant */
.card-glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ============================================
   GRID LAYOUTS
   ============================================ */

.grid {
  display: grid;
  gap: var(--spacing-lg);
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* ============================================
   SECTION HEADERS
   ============================================ */

.section-header {
  text-align: center;
  margin-bottom: var(--spacing-2xl);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.section-title {
  position: relative;
  display: inline-block;
  margin-bottom: var(--spacing-md);
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
}

.section-subtitle {
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  color: var(--text-gray);
  line-height: 1.7;
}

/* ============================================
   GALLERY
   ============================================ */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-md);
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  aspect-ratio: 4/3;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-overlay);
  opacity: 0;
  transition: opacity var(--transition-base);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 2rem;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

/* ============================================
   CONTACT SECTION
   ============================================ */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-xl);
  margin-top: var(--spacing-xl);
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-md);
  padding: var(--spacing-md);
  background: var(--gray-bg);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
}

.contact-item:hover {
  background: var(--light-bg);
  box-shadow: var(--shadow-md);
  transform: translateX(5px);
}

.contact-icon {
  font-size: 1.5rem;
  color: var(--primary-orange);
  min-width: 40px;
}

.contact-details h4 {
  margin-bottom: 0.25rem;
  color: var(--text-dark);
}

.contact-details p,
.contact-details a {
  color: var(--text-gray);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.contact-details a:hover {
  color: var(--primary-orange);
}

.map-container {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  height: 400px;
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
  background: var(--dark-bg);
  color: var(--text-light);
  padding: var(--spacing-2xl) 0 var(--spacing-md);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
}

.footer-section h3 {
  color: var(--text-light);
  margin-bottom: var(--spacing-md);
  font-size: 1.25rem;
}

.footer-section p,
.footer-section a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color var(--transition-fast);
  line-height: 1.8;
}

.footer-section a:hover {
  color: var(--primary-yellow);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.social-links {
  display: flex;
  gap: var(--spacing-md);
  margin-top: var(--spacing-md);
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-light);
  font-size: 1.25rem;
  transition: all var(--transition-base);
}

.social-link:hover {
  background: var(--gradient-primary);
  color: var(--dark-bg);
  transform: translateY(-3px);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--spacing-md);
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-fade-in {
  animation: fadeIn 0.8s ease;
}

.animate-fade-in-up {
  animation: fadeInUp 0.8s ease;
}

.animate-slide-in-left {
  animation: slideInLeft 0.8s ease;
}

.animate-slide-in-right {
  animation: slideInRight 0.8s ease;
}

/* Scroll Reveal Animation */
.reveal {
  opacity: 1;
  /* Changed from 0 to 1 for debugging/fallback */
  transform: translateY(0);
  /* Changed from 30px to 0 */
  transition: all 0.8s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1024px) {
  :root {
    --spacing-3xl: 4rem;
    --spacing-2xl: 3rem;
  }

  .section {
    padding: var(--spacing-2xl) 0;
  }
}

@media (max-width: 768px) {
  .header-container {
    padding: 0.75rem var(--spacing-md);
  }

  .logo {
    font-size: 1.1rem;
    gap: 0.5rem;
  }

  .logo img {
    width: 35px !important;
    height: 35px !important;
  }

  /* Show Logo Text on Mobile but smaller */
  .logo>div {
    display: flex;
    /* Changed from none to flex */
    flex-direction: column;
    line-height: 1.1;
  }

  /* Language Specific Visibility - Mobile & Desktop */
  [lang="ar"] .logo-text-en {
    display: none;
  }

  [lang="en"] .logo-text-ar {
    display: none;
  }

  /* Mobile specific text styling */
  .logo-text-ar,
  .logo-text-en {
    font-size: 0.9rem !important;
    /* Force small size on mobile */
  }

  /* Hide secondary text in logo completely on mobile to clean up */
  .logo>div>div:nth-child(2) {
    display: none;
  }

  /* BUT we need to be careful. The user said "in arabic show only arabic one".
     The HTML structure has both.
     If we use the [lang] selectors above, we already hide the other language.
     So we just need to ensure the remaining one is visible and small. */

  [lang="ar"] .logo-text-ar {
    display: block !important;
    font-size: 0.9rem !important;
  }

  [lang="en"] .logo-text-en {
    display: block !important;
    font-size: 0.9rem !important;
  }

  .nav {
    gap: 0.5rem;
  }

  .nav-links {
    position: fixed;
    top: 60px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 60px);
    background: rgba(26, 26, 26, 0.98);
    backdrop-filter: blur(10px);
    flex-direction: column;
    justify-content: flex-start;
    padding: var(--spacing-xl);
    gap: var(--spacing-md);
    transition: all var(--transition-base);
  }

  /* RTL Support for Mobile Menu */
  [dir="rtl"] .nav-links {
    left: auto;
    right: -100%;
  }

  .nav-links.active {
    left: 0;
  }

  [dir="rtl"] .nav-links.active {
    right: 0;
    left: auto;
  }

  .mobile-menu-toggle {
    display: block;
  }

  /* Hide Desktop Buttons in Header on Mobile */
  .nav>.btn-primary,
  .nav>.lang-switch {
    display: none;
  }

  /* Show them inside the menu instead (need JS to clone or CSS hacks) 
     For now, we'll keep the lang switch visible but small, and hide Call button text */

  .nav>.lang-switch {
    display: flex;
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
  }

  .nav>.btn-primary {
    display: flex !important;
    padding: 0 !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    font-size: 0 !important;
    /* Hide text */
    overflow: hidden;
  }

  .nav>.btn-primary i {
    font-size: 1rem;
    margin: 0;
  }

  .hero-cta {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 300px;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .map-container {
    height: 300px;
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .social-links {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  :root {
    --spacing-3xl: 3rem;
    --spacing-2xl: 2rem;
    --spacing-xl: 2rem;
  }

  .container,
  .container-wide {
    padding: 0 var(--spacing-sm);
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.hidden {
  display: none !important;
}

.visible {
  display: block !important;
}

.text-uppercase {
  text-transform: uppercase;
}

.font-bold {
  font-weight: 700;
}

.mb-0 {
  margin-bottom: 0;
}

.mb-1 {
  margin-bottom: var(--spacing-xs);
}

.mb-2 {
  margin-bottom: var(--spacing-sm);
}

.mb-3 {
  margin-bottom: var(--spacing-md);
}

.mb-4 {
  margin-bottom: var(--spacing-lg);
}

.mt-0 {
  margin-top: 0;
}

.mt-1 {
  margin-top: var(--spacing-xs);
}

.mt-2 {
  margin-top: var(--spacing-sm);
}

.mt-3 {
  margin-top: var(--spacing-md);
}

.mt-4 {
  margin-top: var(--spacing-lg);
}