/* =====================================================
   AL-HAYAT AUTOSPA - PREMIUM RED THEME (REDESIGN)
   ===================================================== */

:root{
  --brand: #DC2626;
  --brand-hover: #B91C1C;
  --dark: #0B1220;
  --dark-2: #111827;
  --light: #FFFFFF;
  --muted: #6B7280;
  --bg: #F8FAFC;
  --card: #FFFFFF;
  --ring: rgba(220,38,38,.25);
}

*{ box-sizing:border-box; }

body{
  position: relative; /* REQUIRED for ScrollSpy */
  font-family: 'Montserrat', system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--dark-2);
}

/* Base */
.text-primary{ color: var(--brand) !important; }
.bg-light{ background: var(--bg) !important; }
.rounded-4{ border-radius: 1.25rem !important; }
.shadow-soft{ box-shadow: 0 18px 45px rgba(2,6,23,.10); }

/* =========================
   NAVBAR (clean + premium)
========================= */
#mainNavbar{
  background: rgba(255,255,255,.85) !important;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(17,24,39,.08);
}

.navbar-nav .nav-link{
  position: relative;
  color: rgba(17,24,39,.75) !important;
  padding: .6rem .9rem;
  border-radius: 999px;
  transition: all .2s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active{
  color: var(--brand) !important;
  background: rgba(220,38,38,.08);
}

.navbar-nav .nav-link::after{
  content:"";
  position:absolute;
  left:14px;
  right:14px;
  bottom:6px;
  width:0;
  height:2px;
  background: var(--brand);
  transition: width .22s ease;
}
.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after{
  width: calc(100% - 28px);
}

/* Logo */
.brand-logo{
  width: 44px;
  height: 44px;
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid rgba(220,38,38,.20);
  box-shadow: 0 10px 25px rgba(0,0,0,.10);
}

/* =========================
   HAMBURGER (white navbar)
========================= */
.custom-toggler{
  border: 1px solid rgba(17,24,39,.15);
  border-radius: 12px;
  padding: .25rem .6rem;
  background: transparent;
}

.custom-toggler:focus{
  box-shadow: 0 0 0 .25rem rgba(220,38,38,.18);
}

.toggler-icon{
  display:block;
  width:24px;
  height:3px;
  background:#111827; /* visible on white navbar */
  margin:5px 0;
  transition: all .3s ease-in-out;
}

.custom-toggler[aria-expanded="true"] .top-bar{
  transform: rotate(45deg) translate(5px, 5px);
}
.custom-toggler[aria-expanded="true"] .middle-bar{
  opacity: 0;
}
.custom-toggler[aria-expanded="true"] .bottom-bar{
  transform: rotate(-45deg) translate(5px, -5px);
}

/* =========================
   DROPDOWN (profile menu)
========================= */
.navbar .dropdown-menu{
  background: #fff;
  border: 1px solid rgba(17,24,39,.12);
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(0,0,0,.12);
  padding: .35rem;
  z-index: 2000;
}

.navbar .dropdown-item{
  border-radius: 10px;
  font-weight: 600;
  padding: .65rem .9rem;
}

.navbar .dropdown-item:hover{
  background: rgba(220,38,38,.08);
  color: var(--brand);
}

/* ✅ FIX: dropdown not showing on mobile (inside collapsed navbar) */
@media (max-width: 991.98px){
  .navbar .dropdown-menu{
    position: static !important; /* IMPORTANT */
    float: none !important;
    width: 100%;
    margin-top: .5rem;
    box-shadow: none;
  }
}

/* =========================
   BUTTONS
========================= */
.btn-primary{
  background: var(--brand) !important;
  border-color: var(--brand) !important;
}
.btn-primary:hover{
  background: var(--brand-hover) !important;
  border-color: var(--brand-hover) !important;
}
.btn-primary:focus{
  box-shadow: 0 0 0 .25rem var(--ring) !important;
}
.btn-outline-light:hover{
  color: var(--dark-2) !important;
}

/* =========================
   HERO (blurred background)
========================= */
.hero-section{
  position: relative;
  overflow: hidden;
  min-height: 560px;
  display: flex;
  align-items: center;
  background: var(--dark);
}

/* Background image layer */
.hero-bg{
  position:absolute;
  inset:0;
  background-size: cover;
  background-position: center;
  transform: scale(1.08);
  filter: blur(10px);
  opacity: .55;
}

/* Dark overlay for contrast */
.hero-section::before{
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(
    90deg,
    rgba(11,18,32,.92) 0%,
    rgba(11,18,32,.78) 55%,
    rgba(11,18,32,.65) 100%
  );
}

/* Content on top */
.hero-content{
  position: relative;
  z-index: 2;
  color: #fff;
}

.hero-title{
  font-size: clamp(2.1rem, 4vw, 3.4rem);
  line-height: 1.06;
}

.hero-subtitle{
  color: rgba(255,255,255,.78);
  font-size: 1.1rem;
  max-width: 56ch;
}

/* Stats */
.hero-stats{
  display:flex;
  gap: 18px;
  flex-wrap: wrap;
}
.stat{
  padding: .75rem 1rem;
  border-radius: 16px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  min-width: 140px;
}
.stat-num{ font-weight: 800; font-size: 1.25rem; }
.stat-label{ color: rgba(255,255,255,.70); font-size: .85rem; }

/* =========================
   HERO 3D CAR IMAGE
========================= */
.hero-car-wrap{
  position: relative;
  perspective: 1200px;
}

.hero-car-img{
  width: 100%;
  max-width: 520px;
  transform: rotateY(-18deg) rotateX(6deg) translateZ(40px);
  filter: drop-shadow(0 40px 60px rgba(0,0,0,.45));
  animation: floatCar 6s ease-in-out infinite;
  transition: transform .4s ease;
}

.hero-car-wrap:hover .hero-car-img{
  transform: rotateY(-10deg) rotateX(3deg) translateZ(60px) scale(1.03);
}

@keyframes floatCar{
  0%   { transform: translateY(0) rotateY(-18deg) rotateX(6deg); }
  50%  { transform: translateY(-14px) rotateY(-18deg) rotateX(6deg); }
  100% { transform: translateY(0) rotateY(-18deg) rotateX(6deg); }
}

@media (max-width: 991px){
  .hero-car-wrap{ display:none; }
}

/* =========================
   SERVICES - REFINED SCALE
========================= */
.service-tile{
  background: #fff;
  border: 1px solid rgba(17,24,39,.08);
  border-radius: 18px;
  padding: 24px 24px 22px;
  display: flex;
  flex-direction: column;
  min-height: 300px;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
  box-shadow: 0 10px 30px rgba(2,6,23,.06);
}

.service-tile:hover{
  transform: translateY(-5px);
  border-color: rgba(220,38,38,.18);
  box-shadow: 0 18px 45px rgba(2,6,23,.12);
}

/* Icon */
.service-tile-icon{
  width: 64px;
  height: 64px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(220,38,38,.08);
  border: 1px solid rgba(220,38,38,.12);
  margin-bottom: 18px;
}

.service-tile-icon i{
  font-size: 22px;
  color: var(--brand);
}

/* Title */
.service-tile-title{
  font-weight: 800;
  letter-spacing: .4px;
  text-transform: uppercase;
  color: var(--dark-2);
  font-size: 1.45rem;
  margin-bottom: 10px;
}

/* Description */
.service-tile-desc{
  color: rgba(17,24,39,.70);
  font-size: .95rem;
  line-height: 1.6;
  margin-bottom: 18px;
}

/* Footer */
.service-tile-price{
  font-weight: 800;
  color: var(--brand);
  font-size: 1.55rem;
  margin-bottom: 6px;
}

.service-tile-meta{
  color: rgba(17,24,39,.55);
  font-size: .85rem;
}

/* Remove blue underline from service cards */
.service-tile-link,
.service-tile-link *{
  text-decoration: none !important;
  color: inherit;
}

/* Mobile */
@media (max-width: 576px){
  .service-tile{
    padding: 20px;
    min-height: auto;
  }
  .hero-section{ min-height: 620px; }
}

/* Testimonials */
#testimonials{
  background: linear-gradient(180deg, #fff 0%, var(--bg) 100%);
}

/* Footer */
footer{
  background: var(--dark);
  color: #fff;
}
footer a{
  color: rgba(255,255,255,.75);
  text-decoration: none;
}
footer a:hover{
  color: var(--brand);
}

/* Focus */
.nav-link:focus,
.dropdown-item:focus{
  outline: 2px solid rgba(220,38,38,.55);
  outline-offset: 2px;
}
/* =========================
   MOBILE TAB BAR (FINAL FIX)
========================= */

#mobile-tab-bar{
  display: none; /* hidden on desktop */
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1055;
  background: #fff;
  border-top: 1px solid rgba(17,24,39,.10);
  box-shadow: 0 -10px 30px rgba(2,6,23,.10);
  padding: .45rem .25rem;
}

/* show only on mobile/tablet */
@media (max-width: 991.98px){
  #mobile-tab-bar{ display: flex; }
  main{ padding-bottom: 92px !important; }
}

/* override default <a> blue + underline */
#mobile-tab-bar a,
#mobile-tab-bar a:link,
#mobile-tab-bar a:visited,
#mobile-tab-bar a:hover,
#mobile-tab-bar a:active{
  text-decoration: none !important;
  color: rgba(17,24,39,.55) !important;
}

/* each item */
#mobile-tab-bar .tab-bar-item{
  flex: 1;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px;
  padding: .35rem 0;
  font-weight: 800;
  font-size: .72rem;
  line-height: 1;
  border-radius: 14px;
  user-select: none;
}

/* icon */
#mobile-tab-bar .tab-bar-item i{
  font-size: 1.35rem;
  line-height: 1;
}

/* active state */
#mobile-tab-bar .tab-bar-item.active{
  color: var(--brand) !important;
  background: rgba(220,38,38,.08);
}
#mobile-tab-bar .tab-bar-item.active i{
  color: var(--brand) !important;
}
/* =========================
   BOOKING TABLE MOBILE FIX
========================= */

.actions-wrap{
  display: inline-flex;
  gap: .35rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

@media (max-width: 576px){
  /* turn table into stacked cards */
  .booking-table thead{
    display: none;
  }

  .booking-table,
  .booking-table tbody,
  .booking-table tr,
  .booking-table td{
    display: block;
    width: 100%;
  }

  .booking-table tr{
    background: #fff;
    border: 1px solid rgba(17,24,39,.10);
    border-radius: 16px;
    padding: .75rem;
    margin-bottom: .75rem;
    box-shadow: 0 10px 30px rgba(2,6,23,.06);
  }

  .booking-table td{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .45rem 0;
    border: 0 !important;
  }

  .booking-table td::before{
    content: attr(data-label);
    font-weight: 800;
    color: rgba(17,24,39,.65);
    flex: 0 0 40%;
    max-width: 40%;
  }

  .booking-table td.text-end{
    justify-content: flex-end;
  }

  /* actions full width, nicer */
  .actions-wrap{
    width: 100%;
    justify-content: flex-end;
  }

  .actions-wrap .btn{
    padding: .35rem .7rem;
    border-radius: 999px;
    white-space: nowrap;
  }
}
