@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700;900&display=swap");

/* =========================================
   1. Variables & Reset & Fonts
   ========================================= */
:root {
  /* Modern Medical Palette */
  --primary: #0ea5e9; /* Sky Blue */
  --primary-dark: #0284c7; /* Deep Sky */
  --primary-light: #e0f2fe; /* Light Wash */
  --secondary: #0f172a; /* Navy Black */
  --accent: #38bdf8; /* Bright Accent */

  --text-main: #334155; /* Slate 700 */
  --text-muted: #64748b; /* Slate 500 */

  --bg-body: #f8fafc; /* Very Light Blue/Grey */
  --bg-card: #ffffff;

  /* Soft UI Shadows */
  --shadow-sm: 0 2px 4px rgba(148, 163, 184, 0.05);
  --shadow-md: 0 6px 12px -2px rgba(148, 163, 184, 0.1);
  --shadow-lg: 0 20px 25px -5px rgba(148, 163, 184, 0.1),
    0 8px 10px -6px rgba(148, 163, 184, 0.1);
  --shadow-primary: 0 10px 20px -5px rgba(14, 165, 233, 0.3);

  /* Radius */
  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-sm: 8px;

  /* Dimensions */
  --container-width: 1080px; /* Reduced for compact look */

  /* Fonts Variables */
  --font-ar: "Cairo", sans-serif;
  --font-en: "Roboto", sans-serif;

  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  font-size: 15px; /* Slightly smaller base font */
}

body {
  font-family: var(--font-en);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* =========================================
   DARK MODE — Complete Modern Premium Theme
   ========================================= */
.dark-layout {
  /* Core Palette */
  --bg-body:          #0d1117;
  --bg-card:          #161b27;
  --bg-card-alt:      #1c2333;
  --bg-input:         #0d1117;
  --text-main:        #e2e8f0;
  --text-muted:       #8892a4;
  --text-secondary:   #94a3b8;
  --secondary:        #e2e8f0;

  /* Borders */
  --border-subtle:    rgba(255, 255, 255, 0.06);
  --border-medium:    rgba(255, 255, 255, 0.10);
  --border-strong:    rgba(255, 255, 255, 0.16);

  /* Glows */
  --glow-primary:     rgba(14, 165, 233, 0.15);
  --glow-primary-sm:  rgba(14, 165, 233, 0.08);

  /* Shadows */
  --shadow-sm:   0 2px 8px  rgba(0, 0, 0, 0.4);
  --shadow-md:   0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-lg:   0 20px 48px rgba(0, 0, 0, 0.6);
}

/* ---- Body & Base ---- */
.dark-layout body {
  background-color: var(--bg-body);
  color: var(--text-main);
}

/* ---- Navbar ---- */
.dark-layout .navbar {
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: 0 1px 0 var(--border-subtle),
              0 4px 32px rgba(0, 0, 0, 0.3);
}
.dark-layout .brand {
  color: #f1f5f9;
}
.dark-layout .brand i {
  color: var(--primary);
  filter: drop-shadow(0 0 8px rgba(14, 165, 233, 0.5));
}

/* ---- Hero Section ---- */
.dark-layout .hero {
  background-color: var(--bg-body);
}
.dark-layout .hero-bg-pattern {
  background-image: radial-gradient(rgba(14, 165, 233, 0.12) 1px, transparent 1px);
  opacity: 0.6;
}
.dark-layout .hero-bg-pattern::before {
  background: radial-gradient(circle, rgba(14, 165, 233, 0.12) 0%, transparent 65%);
  opacity: 1;
}
.dark-layout .hero h1 {
  color: #f1f5f9;
}
.dark-layout .specialty-badge {
  background: rgba(14, 165, 233, 0.12);
  border-color: rgba(14, 165, 233, 0.3);
  color: var(--accent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.dark-layout .location-text {
  color: var(--text-muted);
}
.dark-layout .hero-img-wrapper {
  background: rgba(22, 27, 39, 0.7);
  border-color: var(--border-medium);
  box-shadow: 0 0 60px rgba(14, 165, 233, 0.08),
              var(--shadow-lg);
}
.dark-layout .status-badge {
  background: var(--bg-card);
  border-color: var(--border-medium);
  box-shadow: var(--shadow-md),
              0 0 20px var(--glow-primary-sm);
  color: var(--text-main);
}

/* ---- Stats Section ---- */
.dark-layout .stats-grid {
  background: var(--bg-card);
  border-color: var(--border-subtle);
  box-shadow: var(--shadow-lg);
}
.dark-layout .stat-item {
  border-color: var(--border-medium);
}
.dark-layout .stat-item h3 {
  background: linear-gradient(135deg, #f1f5f9 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.dark-layout .stat-item p {
  color: var(--text-muted);
}

/* ---- Cards ---- */
.dark-layout .card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-md);
}
.dark-layout .card:hover {
  border-color: var(--border-medium);
  box-shadow: var(--shadow-lg),
              0 0 30px var(--glow-primary-sm);
}
.dark-layout .card-title {
  color: #f1f5f9;
  border-bottom-color: var(--border-subtle);
}

/* ---- Tech Cards ---- */
.dark-layout .tech-card {
  background: var(--bg-card-alt);
  border-color: var(--border-subtle);
}
.dark-layout .tech-card:hover {
  background: rgba(14, 165, 233, 0.08);
  border-color: rgba(14, 165, 233, 0.3);
  box-shadow: 0 4px 20px var(--glow-primary);
}
.dark-layout .tech-icon {
  background: rgba(14, 165, 233, 0.12);
  color: var(--primary);
}
.dark-layout .tech-name {
  color: var(--text-main);
}

/* ---- Contact Items ---- */
.dark-layout .contact-item {
  background: var(--bg-card-alt);
  border-color: var(--border-subtle);
}
.dark-layout .contact-item:hover {
  background: rgba(14, 165, 233, 0.06);
  border-color: rgba(14, 165, 233, 0.25);
  box-shadow: 0 4px 16px var(--glow-primary-sm);
}
.dark-layout .contact-icon {
  background: rgba(14, 165, 233, 0.10);
  box-shadow: none;
  color: var(--primary);
}

/* ---- Schedule Table ---- */
.dark-layout .schedule-table tr {
  border-bottom-color: var(--border-subtle);
}
.dark-layout .schedule-table td {
  color: var(--text-secondary);
}
.dark-layout .today-row td {
  color: var(--primary) !important;
}

/* ---- Booking Widget ---- */
.dark-layout .booking-widget {
  background: linear-gradient(145deg, #131c2e 0%, #0d1117 100%);
  border: 1px solid rgba(14, 165, 233, 0.2);
  box-shadow: var(--shadow-lg),
              0 0 40px rgba(14, 165, 233, 0.08),
              inset 0 1px 0 rgba(14, 165, 233, 0.15);
}
.dark-layout .btn-book-white {
  background: rgba(14, 165, 233, 0.15);
  color: #e2e8f0;
  border: 1px solid rgba(14, 165, 233, 0.3);
  backdrop-filter: blur(8px);
}
.dark-layout .btn-book-white:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 8px 24px rgba(14, 165, 233, 0.35);
}

/* ---- Social Buttons ---- */
.dark-layout .social-btn {
  background: var(--bg-card-alt);
  border-color: var(--border-medium);
  color: var(--text-muted);
}
.dark-layout .social-btn:hover {
  border-color: transparent;
  color: white;
}

/* ---- Buttons ---- */
.dark-layout .btn-outline-custom {
  color: var(--text-secondary);
  border-color: var(--border-medium);
  background: transparent;
}
.dark-layout .btn-outline-custom:hover {
  background: rgba(14, 165, 233, 0.1);
  border-color: var(--primary);
  color: var(--primary);
}

/* ---- Gallery ---- */
.dark-layout .gallery-img {
  border-color: var(--border-subtle);
  filter: brightness(0.9);
}
.dark-layout .gallery-img:hover {
  filter: brightness(1.05);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6),
              0 0 20px var(--glow-primary-sm);
}

/* ---- Footer ---- */
.dark-layout .footer {
  background: #080d14;
  border-top-color: rgba(14, 165, 233, 0.4);
}

/* ---- Mobile Sticky Bar ---- */
.dark-layout .mobile-sticky-bar {
  background: rgba(13, 17, 23, 0.95);
  border-top-color: var(--border-subtle);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.5);
}

/* ---- Modal ---- */
.dark-layout .modal-content-box {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.7),
              0 0 60px rgba(14, 165, 233, 0.06);
}
.dark-layout .modal-close-btn {
  color: var(--text-muted);
}
.dark-layout .modal-close-btn:hover {
  color: #f1f5f9;
}

/* Modal Step 2 — Date display box */
.dark-layout .modal-content-box [style*="background: #f0f9ff"] {
  background: rgba(14, 165, 233, 0.08) !important;
  border-color: rgba(14, 165, 233, 0.25) !important;
}

/* Booking Date Input */
.dark-layout #booking-date {
  background-color: var(--bg-input);
  border-color: var(--border-medium);
  color: var(--text-main);
}
.dark-layout #booking-date:hover {
  background-color: var(--bg-card-alt);
  border-color: var(--border-strong);
}
.dark-layout #booking-date:focus {
  background-color: var(--bg-card-alt);
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
}

/* Form Inputs & Selects inside Modal */
.dark-layout .input-icon-wrapper input,
.dark-layout .input-icon-wrapper select {
  background: var(--bg-input) !important;
  border-color: var(--border-medium) !important;
  color: var(--text-main) !important;
}
.dark-layout .input-icon-wrapper input:focus,
.dark-layout .input-icon-wrapper select:focus {
  background: var(--bg-card-alt) !important;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.12);
  outline: none;
}
.dark-layout .input-icon-wrapper input::placeholder {
  color: var(--text-muted);
}
.dark-layout .input-icon-wrapper i {
  color: var(--text-muted);
}
.dark-layout .input-icon-wrapper select option {
  background: var(--bg-card);
  color: var(--text-main);
}

/* Textarea inside modal */
.dark-layout [id="p_description"] {
  background: var(--bg-input) !important;
  border-color: var(--border-medium) !important;
  color: var(--text-main) !important;
}
.dark-layout [id="p_description"]:focus {
  border-color: var(--primary) !important;
  outline: none;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.12);
}

/* Modal labels */
.dark-layout .modal-content-box label,
.dark-layout .modal-content-box small {
  color: var(--text-secondary) !important;
}

/* Selected date display */
.dark-layout [id="selected-date-display"] {
  color: var(--primary) !important;
}

/* Booking error box */
.dark-layout [id="booking-error"] {
  background: rgba(239, 68, 68, 0.1) !important;
  border-color: rgba(239, 68, 68, 0.25) !important;
  color: #fca5a5 !important;
}

/* Back button inside modal */
.dark-layout #back-step-1 {
  background: var(--bg-card-alt) !important;
  color: var(--text-muted) !important;
  border: 1px solid var(--border-medium) !important;
}
.dark-layout #back-step-1:hover {
  background: var(--border-medium) !important;
  color: var(--text-main) !important;
}

/* Success step ticket box */
.dark-layout [id="step-3"] > div:nth-child(2) {
  background: var(--bg-card-alt) !important;
  border-color: var(--border-medium) !important;
}

/* ---- My Appointments Modal ---- */
.dark-layout [id="appointments-list"] > div {
  background: var(--bg-card-alt) !important;
  border-color: var(--border-subtle) !important;
  border-left-color: var(--primary) !important;
}
.dark-layout [id="appointments-list"] h4 {
  color: var(--text-main) !important;
}
.dark-layout [id="appointments-list"] p {
  color: var(--text-muted) !important;
}

/* ---- Availability Message Box ---- */
.dark-layout [id="availability-msg"] > div {
  background-color: rgba(14, 165, 233, 0.08) !important;
  border-color: rgba(14, 165, 233, 0.2) !important;
  color: var(--accent) !important;
}

/* ---- Loading Slots Spinner ---- */
.dark-layout [id="loading-slots"] > div {
  background: var(--bg-card-alt) !important;
  border-color: var(--border-medium) !important;
}
.dark-layout [id="loading-slots"] span {
  color: var(--text-muted) !important;
}

/* ---- Theme Toggle Button ---- */
.dark-layout #themeToggle {
  background: rgba(14, 165, 233, 0.12);
  border-color: rgba(14, 165, 233, 0.25);
  color: var(--primary);
}
.dark-layout #themeToggle:hover {
  background: rgba(14, 165, 233, 0.2);
  box-shadow: 0 0 16px rgba(14, 165, 233, 0.3);
}

/* ---- Override Address Box with inline styles ---- */
.dark-layout .contact-item[style*="background: white"] {
    background: var(--bg-card-alt) !important;
    border-color: var(--border-medium) !important;
    border-style: solid !important; /* Make it solid in dark mode for cleaner look */
}

/* ---- Override Working Hours badges with inline styles ---- */
/* Normal hours */
.dark-layout .schedule-table .hours span[style*="background: #f1f5f9"] {
    background: rgba(14, 165, 233, 0.1) !important;
    color: var(--text-main) !important;
}
/* Closed day */
.dark-layout .schedule-table .hours span[style*="background: #fef2f2"] {
    background: rgba(239, 68, 68, 0.1) !important;
    color: #fca5a5 !important;
}

/* ---- Social Buttons (inline styles) ---- */
.dark-layout .social-btn[style*="background: #fff"] {
    background: var(--bg-card-alt) !important;
    border-color: var(--border-medium) !important;
}
.dark-layout .social-btn[style*="background: #fff"]:hover {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: white !important;
}

/* ---- Scrollbar (Webkit) ---- */
.dark-layout ::-webkit-scrollbar {
  width: 6px;
}
.dark-layout ::-webkit-scrollbar-track {
  background: var(--bg-body);
}
.dark-layout ::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 3px;
}
.dark-layout ::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ---- Glass Panel (dark override) ---- */
.dark-layout .glass-panel {
  background: rgba(22, 27, 39, 0.85) !important;
  border-color: var(--border-medium) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* ---- Responsive Mobile Fixes ---- */
@media (max-width: 992px) {
  .dark-layout .stat-item {
    border-color: var(--border-subtle);
  }
}

/* ---- Navbar Extra Overrides ---- */
/* Doctor avatar circle in navbar */
.dark-layout .brand > div:first-child {
  border-color: rgba(14, 165, 233, 0.3) !important;
  background: var(--bg-card-alt) !important;
}
/* Doctor name in navbar */
.dark-layout .brand span {
  color: #f1f5f9 !important;
}
/* All nav action buttons */
.dark-layout .nav-content .btn-outline-custom {
  color: var(--text-secondary) !important;
  border-color: transparent !important;
}
.dark-layout .nav-content .btn-outline-custom:hover {
  background: rgba(14, 165, 233, 0.1) !important;
  color: var(--primary) !important;
}
/* My appointments button */
.dark-layout #myAppointmentsBtn {
  color: var(--text-secondary) !important;
}
.dark-layout #myAppointmentsBtn:hover {
  color: var(--primary) !important;
  background: rgba(14, 165, 233, 0.08) !important;
}
/* Theme toggle in navbar */
.dark-layout #themeToggle {
  color: var(--primary) !important;
  border-radius: 10px;
  padding: 10px !important;
  transition: var(--transition);
}

/* ---- Stat gradient fix for dark mode ---- */
.dark-layout .stat-item h3 {
  -webkit-text-fill-color: transparent;
}

/* ---- Confirm booking button in modal ---- */
.dark-layout #confirm-booking {
  box-shadow: 0 4px 20px rgba(14, 165, 233, 0.3);
}
.dark-layout #confirm-booking:hover {
  box-shadow: 0 8px 30px rgba(14, 165, 233, 0.45);
}

/* ---- Slot (confirm booking) button ---- */
.dark-layout #slots-container .btn-primary-custom {
  box-shadow: 0 4px 20px rgba(14, 165, 233, 0.25) !important;
}

/* ---- Overflow: modal scrollbar in dark mode ---- */
.dark-layout .modal-content-box::-webkit-scrollbar {
  width: 5px;
}
.dark-layout .modal-content-box::-webkit-scrollbar-track {
  background: var(--bg-card);
}
.dark-layout .modal-content-box::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 3px;
}

/* ---- Services & Categories Section in Dark Mode ---- */
.dark-layout .service-category-block {
  background: var(--bg-card-alt) !important;
  border-color: var(--border-subtle) !important;
}

.dark-layout .category-title {
  color: #f1f5f9 !important;
  border-bottom-color: var(--border-subtle) !important;
}

.dark-layout .category-title i {
  background: rgba(14, 165, 233, 0.15) !important;
  color: var(--primary) !important;
}

.dark-layout .category-title img {
  background: rgba(14, 165, 233, 0.15) !important;
  border: 1px solid rgba(14, 165, 233, 0.2) !important;
  padding: 5px !important;
}

.dark-layout .service-card {
  background: var(--bg-card) !important;
  border-color: var(--border-subtle) !important;
  box-shadow: var(--shadow-sm) !important;
}

.dark-layout .service-card:hover {
  border-color: var(--primary) !important;
  box-shadow: 0 4px 20px var(--glow-primary) !important;
}

.dark-layout .service-card i.service-icon {
  background: rgba(14, 165, 233, 0.15) !important;
  color: var(--primary) !important;
}

.dark-layout .service-card img.service-icon {
  background: rgba(14, 165, 233, 0.15) !important;
  border: 1px solid rgba(14, 165, 233, 0.2) !important;
  padding: 6px !important;
}

.dark-layout .service-card strong {
  color: var(--text-main) !important;
}

.dark-layout .service-card p {
  color: var(--text-muted) !important;
}

/* RTL Support */
body[dir="rtl"] {
  font-family: var(--font-ar) !important;
  text-align: right;
}

a {
  text-decoration: none;
  transition: var(--transition);
}
ul {
  list-style: none;
}
button {
  font-family: inherit;
}

/* =========================================
   2. Utility Classes & Buttons
   ========================================= */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Primary Button */
.btn-primary-custom {
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--primary-dark) 100%
  );
  color: white;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: var(--shadow-primary);
  position: relative;
  overflow: hidden;
}
.btn-primary-custom:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 20px -5px rgba(14, 165, 233, 0.4);
}
.btn-primary-custom:active {
  transform: translateY(0);
}

/* Outline Button */
.btn-outline-custom {
  background: transparent;
  color: var(--text-main);
  border: 1px solid #e2e8f0;
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-outline-custom:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

/* Social Buttons */
.social-btn {
  width: 38px;
  height: 38px; /* Smaller */
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: var(--transition);
  background: white;
  border: 1px solid #e2e8f0;
  color: var(--text-muted);
  box-shadow: var(--shadow-sm);
}
.social-btn:hover {
  transform: translateY(-2px);
  border-color: transparent;
  color: white;
}
.btn-fb:hover {
  background: #1877f2;
}
.btn-insta:hover {
  background: linear-gradient(
    45deg,
    #f09433 0%,
    #e6683c 25%,
    #dc2743 50%,
    #cc2366 75%,
    #bc1888 100%
  );
}

/* =========================================
   3. Navbar
   ========================================= */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
  padding: 12px 0; /* Reduced padding */
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.02);
}
.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* RTL Navbar Fixes */
body[dir="rtl"] .brand {
  margin-left: 20px;
  margin-right: 0;
}

.brand {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--secondary);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* =========================================
   4. Hero Section (Compact)
   ========================================= */
.hero {
  padding-top: 100px;
  padding-bottom: 60px;
  background-color: var(--bg-body);
  position: relative;
  overflow: hidden;
}

/* Premium SaaS Abstract Background Pattern */
.hero-bg-pattern {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background-image: radial-gradient(var(--primary-light) 1px, transparent 1px);
  background-size: 30px 30px;
  opacity: 0.5;
  z-index: 0;
}
.hero-bg-pattern::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 50%;
  height: 80%;
  background: radial-gradient(circle, var(--primary-light) 0%, transparent 60%);
  opacity: 0.8;
  filter: blur(80px);
}

body[dir="rtl"] .hero-content {
  direction: rtl;
}

.hero-content {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px; /* Reduced gap */
  align-items: center;
  position: relative;
  z-index: 1;
}

.specialty-badge {
  display: inline-flex;
  align-items: center;
  background: white;
  color: var(--primary-dark);
  padding: 6px 16px; /* Smaller */
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.8rem;
  margin-bottom: 15px;
  box-shadow: var(--shadow-sm);
  border: 1px solid #e2e8f0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hero h1 {
  font-size: 2.5rem; /* Reduced from 3.5rem */
  line-height: 1.2;
  font-weight: 800;
  color: var(--secondary);
  margin-bottom: 15px;
  letter-spacing: -0.5px;
}

.location-text {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 25px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-img-box {
  position: relative;
  transition: var(--transition);
}

/* Soft mask wrapper for the premium image look */
.hero-img-wrapper {
  position: relative;
  padding: 10px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  border-radius: calc(var(--radius-lg) + 10px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow-lg);
}

.hero-img-box:hover {
  /* --- REMOVED: transform: rotate(0deg) scale(1.01); --- */
  transform: scale(1.01); /* Keep only scale effect */
}

.hero-img {
  width: 100%;
  height: 380px; /* Reduced height */
  object-fit: cover;
  border-radius: 14px;
}

.hero-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-body);
  color: var(--primary);
  font-size: 8rem;
  border: 4px solid var(--primary-light);
  box-shadow: inset 0 0 40px rgba(0,0,0,0.02);
}

.dark-layout .hero-avatar-fallback {
  background: var(--bg-card-alt);
  color: var(--primary);
  border-color: rgba(14, 165, 233, 0.15);
}

.status-badge {
  position: absolute;
  bottom: 30px;
  right: -20px;
  background: white;
  padding: 10px 20px;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: float 4s ease-in-out infinite;
  border: 1px solid #f1f5f9;
}
@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

/* =========================================
   5. Glassmorphism & Premium Panels (NEW)
   ========================================= */
.glass-panel {
  background: rgba(255, 255, 255, 0.8) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.5) !important;
  box-shadow: var(--shadow-md) !important;
}

.floating-widget {
  animation: smoothFloat 6s ease-in-out infinite;
}

@keyframes smoothFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); box-shadow: 0 30px 40px -20px rgba(0, 0, 0, 0.3); }
}

/* =========================================
   6. Stats Section (Compact)
   ========================================= */
.stats-section {
  margin-bottom: 60px;
  margin-top: -40px;
  position: relative;
  z-index: 2;
}

.stats-grid {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  background: white;
  padding: 25px 15px; /* Reduced */
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border: 1px solid #f1f5f9;
  gap: 0;
}

.stat-item {
  flex: 1;
  min-width: 120px;
  text-align: center;
  padding: 5px;
  border-right: 1px solid #f1f5f9;
  transition: var(--transition);
}
.stat-item:last-child {
  border-right: none;
}
body[dir="rtl"] .stat-item {
  border-right: none;
  border-left: 1px solid #f1f5f9;
}
body[dir="rtl"] .stat-item:last-child {
  border-left: none;
}
.stat-item:hover {
  transform: translateY(-3px);
}

.stat-item h3 {
  font-size: 1.8rem; /* Reduced */
  font-weight: 800;
  color: var(--secondary);
  margin-bottom: 2px;
  background: linear-gradient(to right, var(--secondary), var(--primary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-item p {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
}
.stat-icon {
  color: var(--primary);
  font-size: 1rem;
}

/* Like Button Animation */
.recommend-btn {
  cursor: pointer;
}
.recommend-btn.liked .fa-heart {
  color: #ef4444;
  animation: heartBeat 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes heartBeat {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.4);
  }
  100% {
    transform: scale(1);
  }
}

/* =========================================
   6. Main Content Grid
   ========================================= */
.content-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 25px; /* Reduced padding */
  margin-bottom: 25px; /* Reduced margin */
  box-shadow: var(--shadow-sm);
  border: 1px solid #f1f5f9;
  transition: var(--transition);
}
.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-title {
  font-size: 1.25rem; /* Reduced */
  font-weight: 800;
  color: var(--secondary);
  margin-bottom: 15px;
  padding-bottom: 12px;
  border-bottom: 2px solid #f1f5f9;
  position: relative;
}
.card-title::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--primary);
}
body[dir="rtl"] .card-title::after {
  right: 0;
  left: auto;
}

/* --- NEW: Technologies Grid Styles --- */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 15px;
  margin-top: 10px;
}

.tech-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 15px;
  text-align: center;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.tech-card:hover {
  background: white;
  border-color: var(--primary-light);
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.15);
  transform: translateY(-3px);
}

.tech-icon {
  width: 40px;
  height: 40px;
  background: var(--primary-light);
  color: var(--primary-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 5px;
}

.tech-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-main);
  line-height: 1.3;
}
/* --- END: Technologies Grid Styles --- */

/* Booking Widget */
.booking-widget {
  background: linear-gradient(145deg, var(--secondary) 0%, #1e293b 100%);
  color: white;
  position: -webkit-sticky; /* Safari support */
  position: sticky;
  top: 100px; /* مسافة من الأعلى لعدم الالتصاق تماماً بالنافبار */
  border: none;
  box-shadow: var(--shadow-lg);
  padding: 30px 25px;
  text-align: center;

  /* --- التعديلات الجديدة --- */
  z-index: 100; /* يضمن ظهورها فوق ساعات العمل */
  margin-bottom: 25px; /* مسافة فاصلة بينها وبين ساعات العمل */
  border-radius: var(--radius-md); /* لضمان تناسق الحواف */
}
.btn-book-white {
  width: 100%;
  background: white;
  color: var(--secondary);
  border: none;
  padding: 14px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}
.btn-book-white:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-3px);
}

/* Contact Items */
.contact-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px; /* Reduced */
  background: #f8fafc;
  border-radius: var(--radius-sm);
  border: 1px solid #e2e8f0;
  transition: var(--transition);
}
.contact-item:hover {
  background: white;
  border-color: var(--primary-light);
  box-shadow: var(--shadow-sm);
}

.contact-icon {
  width: 45px;
  height: 45px; /* Smaller */
  background: white;
  color: var(--primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: var(--shadow-sm);
}
body[dir="rtl"] .contact-icon {
  margin-left: 12px;
  margin-right: 0;
}

/* Schedule Table */
.schedule-table tr {
  border-bottom: 1px dashed #e2e8f0;
}
.schedule-table tr:last-child {
  border-bottom: none;
}
.schedule-table td {
  padding: 10px 0;
  font-size: 0.9rem;
}
.today-row td {
  color: var(--primary);
  font-weight: 700 !important;
}
body[dir="rtl"] .schedule-table td.hours {
  text-align: left !important;
}
body[dir="rtl"] .schedule-table td.day {
  text-align: right;
}

/* =========================================
   8. Gallery Grid & Lightbox
   ========================================= */
.gallery-grid-container {
  display: grid;
  grid-template-columns: repeat(
    auto-fill,
    minmax(140px, 1fr)
  ); /* Responsive small thumbnails */
  gap: 15px;
}

.gallery-img {
  width: 100%;
  height: 160px; /* Natural height for thumbnails */
  object-fit: cover;
  border-radius: 12px;
  cursor: zoom-in;
  transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.gallery-img:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  filter: brightness(1.05);
}

/* Lightbox Overlay */
.lightbox-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.95);
  z-index: 10000;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(5px);
}
.lightbox-overlay.active {
  opacity: 1;
}

.lightbox-content {
  max-width: 90%;
  max-height: 90vh;
  border-radius: 8px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.lightbox-overlay.active .lightbox-content {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 2.5rem;
  cursor: pointer;
  transition: color 0.2s;
  z-index: 10001;
}
.lightbox-close:hover {
  color: var(--primary);
}
body[dir="rtl"] .lightbox-close {
  right: auto;
  left: 30px;
}

/* =========================================
   9. Footer & Mobile
   ========================================= */
.footer {
  background: var(--secondary);
  color: white;
  padding: 60px 0 30px; /* Reduced */
  margin-top: auto;
  border-top: 4px solid var(--primary);
}
.footer a {
  color: #94a3b8;
  transition: var(--transition);
}
.footer a:hover {
  color: white;
  text-decoration: underline;
}

.mobile-sticky-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 12px 20px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
  z-index: 999;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #f1f5f9;
}
body[dir="rtl"] .mobile-sticky-bar {
  flex-direction: row;
}

/* =========================================
   10. Modals & Date Picker
   ========================================= */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(8px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  animation: fadeIn 0.3s forwards;
}
@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

.modal-content-box {
  background: white;
  width: 100%;
  max-width: 500px;
  border-radius: 24px;
  padding: 30px; /* Reduced */
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  transform: scale(0.95);
  animation: modalPop 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  max-height: 90vh;
  overflow-y: auto;
}
@keyframes modalPop {
  to {
    transform: scale(1);
  }
}

.modal-close-btn {
  position: absolute;
  top: 20px;
  font-size: 1.8rem;
  border: none;
  background: none;
  cursor: pointer;
  color: #cbd5e1;
  transition: 0.3s;
}
body[dir="ltr"] .modal-close-btn {
  right: 20px;
}
body[dir="rtl"] .modal-close-btn {
  left: 20px;
}

.date-input-wrapper {
  position: relative;
  margin-bottom: 20px;
}
#booking-date {
  appearance: none;
  -webkit-appearance: none;
  background-color: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 20px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: var(--secondary);
  width: 100%;
  transition: var(--transition);
  cursor: pointer;
}
#booking-date:hover {
  background-color: white;
  border-color: #cbd5e1;
}
#booking-date:focus {
  background-color: white;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.15);
  outline: none;
}

#slots-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

/* Input Icons */
.input-icon-wrapper {
  position: relative;
  width: 100%;
}
.input-icon-wrapper i {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
  z-index: 10;
  font-size: 1rem;
  width: 20px;
  text-align: center;
}
.input-icon-wrapper input,
.input-icon-wrapper select {
  width: 100%;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: white;
  appearance: none;
  -webkit-appearance: none;
  font-family: inherit;
}
body[dir="ltr"] .input-icon-wrapper i {
  right: 15px;
  left: auto;
}
body[dir="ltr"] .input-icon-wrapper input,
body[dir="ltr"] .input-icon-wrapper select {
  padding: 12px 40px 12px 15px !important;
}
body[dir="rtl"] .input-icon-wrapper i {
  left: 15px;
  right: auto;
}
body[dir="rtl"] .input-icon-wrapper input,
body[dir="rtl"] .input-icon-wrapper select {
  padding: 12px 15px 12px 40px !important;
}

/* Responsive */
@media (max-width: 992px) {
  .container {
    width: 100%;
    padding: 0 20px;
  }
  .hero {
    padding-top: 80px;
    text-align: center;
  }
  .hero-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .hero-img-box {
    display: none;
  }
  .content-grid {
    grid-template-columns: 1fr;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
  }
  .stat-item {
    border: none;
    border-bottom: 1px solid #f1f5f9;
    padding: 15px 0;
  }
  .stat-item:nth-last-child(-n + 2) {
    border-bottom: none;
  }
  .booking-widget {
    display: none;
  }
  .mobile-sticky-bar {
    display: flex;
  }
  .hero h1 {
    font-size: 2rem;
  }
  .location-text {
    justify-content: center;
  }
  body {
    padding-bottom: 80px;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .stat-item {
    border-bottom: 1px solid #f1f5f9;
  }
  .stat-item:last-child {
    border-bottom: none;
  }
  .hero h1 {
    font-size: 1.8rem;
  }
  .navbar {
    padding: 10px 0;
  }
  .brand span {
    font-size: 1rem;
  }
  .modal-content-box {
    padding: 20px;
  }
}

/* =========================================
   Map Styling
   ========================================= */
.map-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-subtle);
    transition: var(--transition);
    background: var(--bg-card);
}

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

#landing-map {
    width: 100%;
    z-index: 1;
}

.map-overlay-btn {
    position: absolute;
    bottom: 15px;
    right: 15px;
    z-index: 1000;
    background: white;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--secondary);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.map-overlay-btn:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.05);
}

.dark-layout .map-overlay-btn {
    background: var(--bg-card-alt);
    color: var(--text-main);
    border: 1px solid var(--border-medium);
}

.leaflet-container {
    background: var(--bg-body) !important;
}

/* Custom Marker Glow */
.custom-marker-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
}

.marker-pin {
    width: 30px;
    height: 30px;
    border-radius: 50% 50% 50% 0;
    background: var(--primary);
    position: absolute;
    transform: rotate(-45deg);
    left: 50%;
    top: 50%;
    margin: -15px 0 0 -15px;
}

.marker-pin::after {
    content: "";
    width: 14px;
    height: 14px;
    margin: 8px 0 0 8px;
    background: #fff;
    position: absolute;
    border-radius: 50%;
}
