/* ==========================================================================
   LEMARS HOTEL - Modern Luxury Design System & Stylesheet
   Supports: Bootstrap 5, Dark/Light Themes, English/Arabic (RTL), Animations
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design System Tokens & Custom Properties
   -------------------------------------------------------------------------- */
:root {
  /* Brand Color Palette */
  --gold-primary: #c5a059;
  --gold-light: #e6c265;
  --gold-dark: #9e7b32;
  --gold-glow: rgba(197, 160, 89, 0.25);
  
  /* Typography */
  --font-heading: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Theme Defaults (Light Theme) */
  --bg-primary: #fcfcfd;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f5f9;
  --bg-glass: rgba(255, 255, 255, 0.88);
  --bg-card: #ffffff;
  
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-inverse: #ffffff;

  --border-color: rgba(226, 232, 240, 0.8);
  --border-gold: rgba(197, 160, 89, 0.4);

  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.12), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-gold: 0 10px 30px -5px rgba(197, 160, 89, 0.3);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;

  --transition-fast: all 0.25s ease;
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark Theme Overrides */
[data-bs-theme="dark"] {
  --bg-primary: #0b1320;
  --bg-secondary: #121c2d;
  --bg-tertiary: #1a273e;
  --bg-glass: rgba(11, 19, 32, 0.90);
  --bg-card: #152238;

  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-inverse: #0b1320;

  --border-color: rgba(255, 255, 255, 0.08);
  --border-gold: rgba(197, 160, 89, 0.5);

  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 20px -3px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 25px 35px -5px rgba(0, 0, 0, 0.6);
}

/* --------------------------------------------------------------------------
   2. Global Typography & Base Styles
   -------------------------------------------------------------------------- */
body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-main);
  transition: background-color 0.4s ease, color 0.4s ease;
  overflow-x: hidden;
  line-height: 1.7;
}

h1, h2, h3, h4, h5, h6, .font-serif {
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.text-gold {
  color: var(--gold-primary) !important;
}

.bg-gold {
  background-color: var(--gold-primary) !important;
  color: #ffffff !important;
}

.bg-luxury-dark {
  background-color: #0b1320 !important;
  color: #ffffff !important;
}

/* Section Subtitle Badge */
.sub-title-badge {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--gold-primary);
  background-color: var(--gold-glow);
  padding: 0.4rem 1.1rem;
  border-radius: 50px;
  border: 1px solid var(--border-gold);
  margin-bottom: 1rem;
}

/* --------------------------------------------------------------------------
   3. Header & Navigation Bar
   -------------------------------------------------------------------------- */
.navbar-custom {
  background-color: var(--bg-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-color);
  padding: 0.9rem 0;
  transition: var(--transition-smooth);
  z-index: 1040;
}

.navbar-custom.scrolled {
  box-shadow: var(--shadow-md);
  padding: 0.6rem 0;
}

.brand-logo-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: var(--shadow-gold);
}

.brand-logo-img {
  height: 44px;
  width: auto;
  max-width: 48px;
  object-fit: contain;
  transition: transform var(--transition-fast), filter var(--transition-fast);
  display: block;
}

.navbar-brand:hover .brand-logo-img {
  transform: scale(1.08);
}

.footer-logo-img {
  height: 46px;
  max-width: 50px;
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-main);
  line-height: 1.1;
  margin: 0;
}

.brand-subtitle {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  color: var(--gold-primary);
  text-transform: uppercase;
  font-weight: 600;
  display: block;
}

.nav-link {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-main) !important;
  padding: 0.5rem 1rem !important;
  position: relative;
  transition: var(--transition-fast);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: var(--gold-primary);
  transition: var(--transition-fast);
  transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 70%;
}

.nav-link.active {
  color: var(--gold-primary) !important;
  font-weight: 600;
}

/* Dark Mode & Lang Switchers */
.theme-toggle-btn, .lang-select-btn {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.45rem 0.85rem;
  border-radius: 50px;
  font-size: 0.88rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition-fast);
  cursor: pointer;
}

.theme-toggle-btn:hover, .lang-select-btn:hover {
  border-color: var(--gold-primary);
  color: var(--gold-primary);
}

/* --------------------------------------------------------------------------
   4. Buttons & Interactive Elements
   -------------------------------------------------------------------------- */
.btn-gold {
  background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
  color: #ffffff !important;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 0.75rem 1.8rem;
  border-radius: 50px;
  border: none;
  box-shadow: var(--shadow-gold);
  transition: var(--transition-smooth);
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px -3px rgba(197, 160, 89, 0.45);
  background: linear-gradient(135deg, var(--gold-light), var(--gold-primary));
}

.btn-outline-gold {
  background: transparent;
  color: var(--gold-primary) !important;
  border: 2px solid var(--gold-primary);
  font-weight: 600;
  padding: 0.7rem 1.7rem;
  border-radius: 50px;
  transition: var(--transition-smooth);
}

.btn-outline-gold:hover {
  background-color: var(--gold-primary);
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: var(--shadow-gold);
}

/* --------------------------------------------------------------------------
   5. Hero Carousel (Homepage)
   -------------------------------------------------------------------------- */
.hero-carousel {
  position: relative;
  margin-top: 0;
}

.hero-carousel .carousel-item {
  height: 85vh;
  min-height: 520px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(11, 19, 32, 0.4) 0%, rgba(11, 19, 32, 0.75) 100%);
  display: flex;
  align-items: center;
}

.hero-content {
  color: #ffffff;
  max-width: 780px;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 1.2rem;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  line-height: 1.15;
}

.hero-subtitle {
  font-size: 1.25rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.carousel-indicators [data-bs-target] {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  margin: 0 6px;
  border: 2px solid transparent;
  transition: var(--transition-fast);
}

.carousel-indicators .active {
  background-color: var(--gold-primary);
  width: 32px;
  border-radius: 20px;
}

/* --------------------------------------------------------------------------
   6. Custom Cards & Sections
   -------------------------------------------------------------------------- */
.card-luxury {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
  height: 100%;
  overflow: hidden;
}

.card-luxury:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-gold);
}

.icon-box-gold {
  width: 65px;
  height: 65px;
  background-color: var(--gold-glow);
  color: var(--gold-primary);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin-bottom: 1.4rem;
  transition: var(--transition-fast);
}

.card-luxury:hover .icon-box-gold {
  background-color: var(--gold-primary);
  color: #ffffff;
  transform: scale(1.08);
}

.img-hover-zoom {
  overflow: hidden;
  border-radius: var(--radius-md);
  position: relative;
}

.img-hover-zoom img {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  width: 100%;
  object-fit: cover;
}

.img-hover-zoom:hover img {
  transform: scale(1.06);
}

/* Section Header styling */
.section-header {
  margin-bottom: 3.5rem;
}

.section-title {
  font-size: 2.6rem;
  color: var(--text-main);
  position: relative;
}

/* --------------------------------------------------------------------------
   7. Page Banner Header (Inner Pages)
   -------------------------------------------------------------------------- */
.page-header-banner {
  background: linear-gradient(180deg, rgba(11, 19, 32, 0.65) 0%, rgba(11, 19, 32, 0.85) 100%),
              url('../images/hotel-exterior.jpg') center/cover no-repeat;
  padding: 6.5rem 0 4.5rem 0;
  color: #ffffff;
  text-align: center;
  position: relative;
}

.page-header-title {
  font-size: 3.2rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.8rem;
}

.page-header-lead {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 650px;
  margin: 0 auto;
}

/* --------------------------------------------------------------------------
   8. Facility Interactive Cards (Services Page)
   -------------------------------------------------------------------------- */
.facility-nav-card {
  cursor: pointer;
  padding: 1.8rem 1.2rem;
  text-align: center;
  background-color: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: var(--transition-smooth);
}

.facility-nav-card.active,
.facility-nav-card:hover {
  border-color: var(--gold-primary);
  background-color: var(--gold-glow);
  transform: translateY(-4px);
}

.facility-nav-card.active .icon-box-gold {
  background-color: var(--gold-primary);
  color: #ffffff;
}

.facility-detail-pane {
  display: none;
  animation: fadeIn 0.4s ease forwards;
}

.facility-detail-pane.active {
  display: block;
}

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

/* --------------------------------------------------------------------------
   9. Gallery & Lightbox (About Page)
   -------------------------------------------------------------------------- */
.gallery-item {
  position: relative;
  cursor: pointer;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(11, 19, 32, 0.65);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition-smooth);
  color: #ffffff;
  padding: 1rem;
  text-align: center;
}

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

.gallery-overlay-icon {
  font-size: 2.2rem;
  color: var(--gold-primary);
  margin-bottom: 0.5rem;
}

/* Lightbox Modal */
.lightbox-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(11, 19, 32, 0.94);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
}

.lightbox-modal.show {
  display: flex;
  animation: fadeIn 0.3s ease;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 85vh;
  text-align: center;
}

.lightbox-img {
  max-width: 100%;
  max-height: 75vh;
  border-radius: var(--radius-md);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  border: 1px solid var(--border-gold);
}

.lightbox-caption {
  color: #ffffff;
  margin-top: 1rem;
  font-size: 1.1rem;
  font-family: var(--font-heading);
}

.lightbox-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.lightbox-btn:hover {
  background: var(--gold-primary);
  color: #ffffff;
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }
.lightbox-close {
  top: 25px;
  right: 25px;
  transform: none;
}

/* --------------------------------------------------------------------------
   10. Contact Form & Info Cards
   -------------------------------------------------------------------------- */
.contact-info-card {
  padding: 2.2rem;
  border-radius: var(--radius-md);
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  height: 100%;
}

.form-control-custom {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.8rem 1.1rem;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.form-control-custom:focus {
  background-color: var(--bg-secondary);
  border-color: var(--gold-primary);
  box-shadow: 0 0 0 4px var(--gold-glow);
  color: var(--text-main);
  outline: none;
}

/* --------------------------------------------------------------------------
   11. Footer Styles
   -------------------------------------------------------------------------- */
.footer-luxury {
  background-color: #080e18;
  color: #94a3b8;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 4.5rem 0 2rem 0;
  font-size: 0.92rem;
}

.footer-title {
  font-family: var(--font-heading);
  color: #ffffff;
  font-size: 1.4rem;
  margin-bottom: 1.4rem;
  position: relative;
}

.footer-title::after {
  content: '';
  display: block;
  width: 40px;
  height: 2px;
  background-color: var(--gold-primary);
  margin-top: 0.5rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

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

.footer-links a {
  color: #94a3b8;
  text-decoration: none;
  transition: var(--transition-fast);
}

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

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

.social-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.5rem;
  transition: var(--transition-fast);
  text-decoration: none;
}

[dir="rtl"] .social-icon-btn {
  margin-right: 0;
  margin-left: 0.5rem;
}

.social-icon-btn:hover {
  background-color: var(--gold-primary);
  color: #ffffff;
  transform: translateY(-3px);
}

/* --------------------------------------------------------------------------
   12. Arabic RTL Styles & Overrides
   -------------------------------------------------------------------------- */
[dir="rtl"] {
  text-align: right;
}

[dir="rtl"] .me-auto {
  margin-right: 0 !important;
  margin-left: auto !important;
}

[dir="rtl"] .ms-auto {
  margin-left: 0 !important;
  margin-right: auto !important;
}

[dir="rtl"] .me-2 {
  margin-right: 0 !important;
  margin-left: 0.5rem !important;
}

[dir="rtl"] .ms-2 {
  margin-left: 0 !important;
  margin-right: 0.5rem !important;
}

[dir="rtl"] .hero-title,
[dir="rtl"] .section-title,
[dir="rtl"] .page-header-title {
  letter-spacing: 0;
}

/* --------------------------------------------------------------------------
   13. Responsive Adjustments
   -------------------------------------------------------------------------- */
@media (max-width: 991.98px) {
  .hero-carousel .carousel-item {
    height: 70vh;
    min-height: 450px;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }

  .section-title {
    font-size: 2.1rem;
  }
  
  .page-header-title {
    font-size: 2.4rem;
  }

  .navbar-collapse {
    background-color: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    margin-top: 0.8rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
  }
}

@media (max-width: 575.98px) {
  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-carousel .carousel-item {
    height: 60vh;
  }

  .btn-gold, .btn-outline-gold {
    padding: 0.6rem 1.3rem;
    font-size: 0.9rem;
  }
}
