/* Premium Furniture Theme - Warm & Cozy Luxury */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700&family=Tajawal:wght@300;400;500;700&display=swap');

:root {
  /* Warm Earth Tones from Logo/Brief */
  --primary: #B8860B;
  /* Dark Goldenrod */
  --primary-light: #DAA520;
  --primary-dark: #8B6508;

  --bg-body: #FDFBF7;
  /* Off-white/Cream */
  --bg-panel: #FFFFFF;
  --bg-dark: #2C241B;
  /* Dark Coffee Brown */

  --text-main: #3E3B36;
  /* Dark Brown/Gray */
  --text-muted: #6B6356;

  --shadow: 0 10px 30px rgba(139, 69, 19, 0.1);
  /* Warm shadow */
  --font-heading: 'Cairo', sans-serif;
  --font-body: 'Tajawal', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-body);
  color: var(--text-main);
  font-family: var(--font-body);
  direction: rtl;
  overflow-x: hidden;
  line-height: 1.6;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  color: var(--bg-dark);
  line-height: 1.2;
}

a {
  text-decoration: none;
  color: inherit;
  transition: 0.3s;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Glass/Card Utilities */
.glass-panel {
  background: var(--bg-panel);
  border: 1px solid rgba(184, 134, 11, 0.2);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

/* Animations */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Top Bar */
.top-bar {
  background-color: var(--primary-dark);
  color: #fff;
  padding: 0.5rem 0;
  font-size: 0.9rem;
  z-index: 1001;
  position: relative;
}

.top-bar .container {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 20px;
}

.top-bar a {
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  transition: opacity 0.3s;
}

.top-bar a:hover {
  opacity: 0.8;
  color: #fff;
}

.top-bar i {
  color: var(--primary-light);
}

/* Navbar */
.navbar {
  position: sticky;
  /* Upgrade to sticky for better flow with top bar */
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(184, 134, 11, 0.2);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-wrapper {
  display: flex;
  flex-direction: column;
}

.logo-img {
  height: 55px;
  width: auto;
}

.logo-text {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary-dark);
  line-height: 1.1;
}

.logo-slogan {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 400;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-main);
  font-weight: 600;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
}

.mobile-toggle {
  display: none;
  font-size: 1.5rem;
  color: var(--bg-dark);
  cursor: pointer;
}

/* Hero Section */
.hero {
  height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: url('assets/images/hero.png') no-repeat center center/cover;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: linear-gradient(to bottom, rgba(44, 36, 27, 0.3), rgba(44, 36, 27, 0.7));
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  padding: 0 20px;
  color: #fff;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero p {
  font-size: 1.3rem;
  margin-bottom: 2rem;
  color: #f0f0f0;
  font-weight: 300;
}

.btn-gold {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  border-radius: 6px;
  box-shadow: 0 4px 15px rgba(184, 134, 11, 0.4);
  transition: transform 0.3s, background 0.3s;
}

.btn-gold:hover {
  transform: translateY(-2px);
  background: var(--primary-dark);
  color: #fff;
}

/* Sections */
section {
  padding: 5rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
  font-size: 2.5rem;
  color: var(--primary-dark);
}

/* Services Grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.service-card {
  padding: 2rem;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(139, 69, 19, 0.15);
}

.service-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--primary);
}

/* About Split */
.about-split {
  display: flex;
  align-items: center;
  gap: 4rem;
}

.about-img {
  flex: 1;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.about-img img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  display: block;
}

.about-text {
  flex: 1;
}

/* Stats */
.stat-item {
  color: var(--primary-light);
}

/* Contact Form */
input,
textarea {
  width: 100%;
  padding: 1rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
  color: #333;
  font-family: inherit;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
}

/* Form Alerts */
.alert {
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  text-align: center;
  font-weight: 600;
  display: none;
  /* Hidden by default */
}

.alert-success {
  background-color: rgba(76, 175, 80, 0.1);
  color: #2e7d32;
  border: 1px solid #4CAF50;
}

.alert-error {
  background-color: rgba(244, 67, 54, 0.1);
  color: #c62828;
  border: 1px solid #F44336;
}

/* Footer */
footer {
  background: var(--bg-dark);
  color: #ccc;
  padding: 3rem 0;
  text-align: center;
  border-top: 4px solid var(--primary);
}

/* Responsive */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }

  .about-split {
    flex-direction: column;
    gap: 2rem;
    /* Reduce gap on mobile */
  }

  .about-split>div {
    width: 100%;
    /* Ensure full width when stacked */
  }

  /* Specific fix for contact form container padding on mobile */
  .about-img.glass-panel {
    padding: 1.5rem !important;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 80px;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    padding: 2rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
  }

  .nav-links.active {
    display: flex;
  }

  .mobile-toggle {
    display: block;
  }
}

/* Map Styles */
#map {
  height: 450px;
  width: 100%;
  border-radius: 12px;
  z-index: 1;
  box-shadow: var(--shadow);
  margin-top: 1rem;
}

.leaflet-popup-content-wrapper {
  border-radius: 8px;
  font-family: var(--font-body);
}

.leaflet-popup-content h3 {
  font-family: var(--font-heading);
  color: var(--primary-dark);
  margin-bottom: 5px;
  font-size: 1.1rem;
  text-align: right;
}

.leaflet-popup-content p {
  margin: 0;
  font-size: 0.9rem;
  text-align: right;
}

.leaflet-container a {
  color: var(--primary);
}

/* Branch List Styles */
.branch-list {
  list-style: none;
  padding: 0;
}

.branch-list li {
  margin-bottom: 1.2rem;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-main);
  transition: transform 0.2s;
}

.branch-list li:hover {
  transform: translateX(-5px);
  color: var(--primary-dark);
}


/* Gallery Styles */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.gallery-item {
  overflow: hidden;
  padding: 0;
  /* Override default panel padding for clean look */
  transition: transform 0.3s;
}

.gallery-item:hover {
  transform: scale(1.02);
}

.media-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 75%;
  /* 4:3 Aspect Ratio */
  overflow: hidden;
  border-radius: 12px;
}

.media-wrapper img,
.media-wrapper video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}

/* Lightbox Styles */
.lightbox {
  display: none;
  position: fixed;
  z-index: 2000;
  padding-top: 50px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: rgba(0, 0, 0, 0.9);
}

.lightbox-content {
  position: relative;
  margin: auto;
  padding: 0;
  width: 90%;
  max-width: 1000px;
  height: 80%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-content img,
.lightbox-content video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.close-btn {
  color: white;
  position: absolute;
  top: 10px;
  right: 25px;
  font-size: 35px;
  font-weight: bold;
  cursor: pointer;
  z-index: 2001;
}

.close-btn:hover,
.close-btn:focus {
  color: #bbb;
  text-decoration: none;
  cursor: pointer;
}

.prev,
.next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  width: auto;
  padding: 16px;
  margin-top: -50px;
  color: white;
  font-weight: bold;
  font-size: 20px;
  transition: 0.6s ease;
  border-radius: 0 3px 3px 0;
  user-select: none;
  z-index: 2001;
  background-color: rgba(0, 0, 0, 0.3);
}

.next {
  left: 0;
  border-radius: 3px 0 0 3px;
}

.prev {
  right: 0;
  border-radius: 0 3px 3px 0;
}

.prev:hover,
.next:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

.caption-container {
  text-align: center;
  padding: 2px 16px;
  color: white;
}