/* ==========================================================
   Badr Clinic - Service Detail Full View
   Pure Medical Luxury, Crisp White & Royal Navy, 60fps GPU Transitions
   Strictly Zero Emojis, Responsive, Ultra-Clean Architecture
========================================================== */

:root {
  --sd-navy-deep: #122A6B;
  --sd-navy-dark: #091A38;
  --sd-text-body: #334155;
  --sd-text-muted: #64748B;
  --sd-cyan: #122A6B;
  --sd-cyan-glow: #122A6B;
  --sd-bg-page: #FFFFFF;
  --sd-bg-subtle: #F8FAFC;
  --sd-border-soft: #E8ECEF;
  --sd-border-subtle: rgba(9, 26, 56, 0.08);
  --sd-shadow-sm: 0 4px 16px rgba(9, 26, 56, 0.04);
  --sd-shadow-md: 0 10px 28px rgba(9, 26, 56, 0.08);
  --sd-shadow-lg: 0 20px 45px rgba(9, 26, 56, 0.12);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

/* 1. Main Full-Screen Overlay View (Pristine White Background) */
.service-detail-view {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: var(--sd-bg-page);
  color: var(--sd-text-body);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.99);
  transition:
    opacity 0.35s var(--ease-out-expo),
    transform 0.35s var(--ease-out-expo),
    visibility 0.35s;
  will-change: transform, opacity;
  font-family: inherit;
  direction: ltr; /* Keeps single scrollbar on the right side */
}

/* Service Detail Dedicated Scrollbar (Brand Navy & Rounded Pill) */
.service-detail-view::-webkit-scrollbar {
  width: 10px;
}

.service-detail-view::-webkit-scrollbar-track {
  background: #E8ECEF;
  border-radius: 9999px;
}

.service-detail-view::-webkit-scrollbar-thumb {
  background: #122A6B;
  border-radius: 9999px;
  border: 2px solid #E8ECEF;
  transition: background 0.2s ease;
}

.service-detail-view::-webkit-scrollbar-thumb:hover {
  background: #1A3E96;
}

.service-detail-view {
  scrollbar-width: thin;
  scrollbar-color: #122A6B #E8ECEF;
}

.service-detail-view.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* Ambient Radial Accents (Pure, Sterile, Soft) */
.service-detail-backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 10%, rgba(18, 42, 107, 0.06), transparent 45%),
    radial-gradient(circle at 88% 85%, rgba(14, 32, 69, 0.04), transparent 50%);
  z-index: 0;
}

.service-detail-container {
  position: relative;
  z-index: 1;
  max-width: 1040px;
  margin: 0 auto;
  padding: 24px 24px 110px;
  direction: rtl;
  text-align: right;
}

/* 2. Top Bar Navigation (Clean, Elevated, Reassuring) */
.service-detail-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 20px;
  margin-bottom: 32px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--sd-border-soft);
  box-shadow: 0 4px 20px rgba(9, 26, 56, 0.05);
}

.service-detail-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  border-radius: 9999px;
  background: var(--sd-navy-deep);
  border: 1px solid var(--sd-navy-dark);
  color: #FFFFFF;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s var(--ease-out-expo);
  outline: none;
  box-shadow: 0 4px 14px rgba(9, 26, 56, 0.2);
}

.service-detail-back-btn:hover,
.service-detail-back-btn:focus-visible {
  background: #091A38;
  transform: translateX(4px);
  box-shadow: 0 6px 18px rgba(9, 26, 56, 0.3);
}

.service-detail-brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--sd-navy-deep);
  font-weight: 700;
}

.service-detail-brand-badge img {
  width: 22px;
  height: 22px;
  border-radius: 6px;
}

/* 3. Hero Section: Enclosed Royal Navy Cockpit Island */
.service-detail-hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 44px;
  align-items: center;
  margin-bottom: 54px;
  padding: 38px 40px;
  border-radius: 28px;
  background: var(--sd-navy-deep);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 60px rgba(9, 26, 56, 0.28);
  position: relative;
  overflow: hidden;
}

.service-detail-hero::before {
  content: "";
  position: absolute;
  top: -80px;
  right: -80px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(18, 42, 107, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.service-detail-copy {
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 2;
}

.service-detail-badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  font-size: 12.5px;
  font-weight: 800;
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  padding: 6px 18px;
  border-radius: 9999px;
  margin-bottom: 16px;
  letter-spacing: 0.3px;
}

.service-detail-title {
  font-size: clamp(26px, 3.4vw, 38px);
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.3;
  margin: 0 0 16px;
  letter-spacing: -0.5px;
}

.service-detail-intro {
  font-size: 16px;
  line-height: 1.9;
  color: #CBD5E1;
  margin: 0 0 28px;
}

/* Quick Facts Badges (Capsules on Dark Canvas) */
.service-detail-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.service-spec-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  transition: all 0.25s ease;
}

.service-spec-pill:hover {
  border-color: rgba(18, 42, 107, 0.4);
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.1);
}

.service-spec-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #FFFFFF;
  flex-shrink: 0;
}

.service-spec-icon svg {
  width: 18px;
  height: 18px;
  stroke: #FFFFFF !important;
}

.service-spec-texts {
  display: flex;
  flex-direction: column;
}

.service-spec-label {
  font-size: 11.5px;
  color: #94A3B8;
  font-weight: 600;
  line-height: 1.2;
}

.service-spec-val {
  font-size: 13.5px;
  color: #FFFFFF;
  font-weight: 800;
  line-height: 1.3;
  margin-top: 2px;
}

/* Hero Image Wrap (Pedestal & Breathing Float) */
.service-detail-image-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-detail-image-glow {
  position: absolute;
  width: 75%;
  height: 75%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(18, 42, 107, 0.14) 0%, transparent 68%);
  filter: blur(32px);
  z-index: 0;
  pointer-events: none;
}

.service-detail-image-frame {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: serviceImageGentleFloat 5s ease-in-out infinite;
  will-change: transform;
}

.service-detail-image-frame img {
  width: 100%;
  height: auto;
  max-height: 380px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 16px 28px rgba(9, 26, 56, 0.18));
}

@keyframes serviceImageGentleFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

/* 4. Section Headers */
.service-section-title {
  font-size: clamp(20px, 2.4vw, 24px);
  font-weight: 800;
  color: var(--sd-navy-deep);
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.service-section-title-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(18, 42, 107, 0.08);
  border: 1px solid rgba(18, 42, 107, 0.18);
  color: #122A6B;
  flex-shrink: 0;
}

.service-section-title-icon svg {
  width: 20px;
  height: 20px;
  stroke: #122A6B !important;
}

.service-section-desc {
  font-size: 15px;
  color: var(--sd-text-muted);
  margin: 0 0 28px;
  line-height: 1.7;
}

/* 5. Treatment Steps: Sequential Contoured Ribbon Roadmap (Not Boxy Grid) */
.service-detail-roadmap {
  margin-bottom: 54px;
}

.treatment-steps-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.treatment-step-card {
  position: relative;
  background: #FFFFFF;
  border: 1px solid var(--sd-border-soft);
  border-radius: 20px;
  padding: 22px 26px;
  box-shadow: var(--sd-shadow-sm);
  display: flex;
  align-items: flex-start;
  gap: 20px;
  transition: all 0.3s var(--ease-out-expo);
}

.treatment-step-card:hover {
  transform: translateX(-4px);
  border-color: rgba(18, 42, 107, 0.35);
  box-shadow: var(--sd-shadow-md);
  background: #FFFFFF;
}

.treatment-step-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.treatment-step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: #122A6B;
  color: #FFFFFF;
  font-weight: 800;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(18, 42, 107, 0.25);
  flex-shrink: 0;
}

.treatment-step-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(18, 42, 107, 0.08);
  color: #122A6B;
  border: 1px solid rgba(18, 42, 107, 0.18);
  flex-shrink: 0;
}

.treatment-step-icon svg {
  width: 19px;
  height: 19px;
  stroke: #122A6B !important;
}

.treatment-step-content {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.treatment-step-title {
  font-size: 16.5px;
  font-weight: 800;
  color: var(--sd-navy-deep);
  margin: 0 0 6px;
  line-height: 1.4;
}

.treatment-step-desc {
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--sd-text-body);
  margin: 0;
}

/* 6. FAQs Accordion (Inverted Royal Navy Section - لون الهوية الملكي الفاخر) */
.service-faq-wrap {
  margin: 54px 0;
  padding: 44px 36px 48px;
  background: var(--sd-navy-deep);
  border-radius: 28px;
  box-shadow: 0 24px 60px rgba(9, 26, 56, 0.25);
  border: 1px solid rgba(18, 42, 107, 0.15);
  position: relative;
  overflow: hidden;
}

.service-faq-wrap::before {
  content: "";
  position: absolute;
  top: -80px;
  right: -80px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(18, 42, 107, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.service-faq-wrap .service-section-title {
  color: #FFFFFF;
}

.service-faq-wrap .service-section-title-icon {
  background: rgba(255, 255, 255, 0.16);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.service-faq-wrap .service-section-title-icon svg {
  stroke: #FFFFFF !important;
}

.service-faq-wrap .service-section-desc {
  color: #CBD5E1;
}

.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.faq-item {
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  transition: all 0.25s ease;
}

.faq-item:hover {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
}

.faq-item[open] {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  font-size: 15.5px;
  font-weight: 800;
  color: #FFFFFF;
  cursor: pointer;
  list-style: none;
  user-select: none;
  outline: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-toggle-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.25);
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.faq-item[open] .faq-toggle-icon {
  transform: rotate(45deg);
  background: #FFFFFF;
  color: #122A6B;
}

.faq-answer {
  padding: 0 24px 20px;
  font-size: 14.5px;
  line-height: 1.85;
  color: #CBD5E1;
  margin: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 14px;
}

/* ==========================================================
   7. Clinical Aftercare & Recovery Protocol Board
   Authoritative, Structured, Reassuring, Solid Flat Colors
========================================================== */
.service-aftercare-section {
  margin-bottom: 56px;
  padding: 40px 36px 36px;
  border-radius: 26px;
  background: #FFFFFF;
  border: 1.5px solid #E8ECEF;
  box-shadow: 0 12px 36px rgba(9, 26, 56, 0.06);
}

.aftercare-section-head {
  text-align: center;
  max-width: 740px;
  margin: 0 auto 36px;
}

.aftercare-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 18px;
  border-radius: 9999px;
  background: rgba(18, 42, 107, 0.08);
  color: #122A6B;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 14px;
}

.aftercare-main-title {
  font-size: clamp(22px, 2.5vw, 28px);
  font-weight: 800;
  color: var(--sd-navy-deep);
  margin: 0 0 10px;
  line-height: 1.35;
}

.aftercare-main-desc {
  font-size: 15px;
  color: var(--sd-text-muted);
  line-height: 1.75;
  margin: 0;
}

/* 3-Card Grid */
.aftercare-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-bottom: 28px;
}

.aftercare-card {
  display: flex;
  flex-direction: column;
  padding: 24px 22px;
  border-radius: 20px;
  background: #F8FAFC;
  border: 1.5px solid #E8ECEF;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.aftercare-card:hover {
  transform: translateY(-3px);
  border-color: #CBD5E1;
  box-shadow: 0 10px 24px rgba(9, 26, 56, 0.06);
}

.aftercare-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #E8ECEF;
}

.aftercare-card-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #FFFFFF;
}

/* Card Type Icon Themes */
.aftercare-card-icon.type-immediate {
  background: #DC2626;
}

.aftercare-card-icon.type-diet {
  background: #122A6B;
}

.aftercare-card-icon.type-hygiene {
  background: #16A34A;
}

.aftercare-card-titles {
  display: flex;
  flex-direction: column;
}

.aftercare-card-tag {
  font-size: 11.5px;
  font-weight: 700;
  color: #64748B;
  text-transform: uppercase;
}

.aftercare-card-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--sd-navy-deep);
  margin: 2px 0 0;
}

/* Card Checklist Items */
.aftercare-items-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.aftercare-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--sd-text-body);
}

.aftercare-item-bullet {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
  background: rgba(18, 42, 107, 0.12);
  color: #122A6B;
  font-size: 11px;
}

/* Bottom Emergency Touchpoint Bar (Solid Navy) */
.aftercare-emergency-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 24px;
  border-radius: 18px;
  background: var(--sd-navy-deep);
  color: #FFFFFF;
}

.aftercare-emergency-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(239, 68, 68, 0.2);
  color: #F87171;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.aftercare-emergency-text {
  flex: 1;
}

.aftercare-emergency-text strong {
  display: block;
  font-size: 15px;
  font-weight: 800;
  color: #FFFFFF;
  margin-bottom: 3px;
}

.aftercare-emergency-text p {
  margin: 0;
  font-size: 13.5px;
  color: #CBD5E1;
  line-height: 1.6;
}

.aftercare-emergency-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 9999px;
  background: #FFFFFF;
  color: var(--sd-navy-deep);
  font-size: 13.5px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.aftercare-emergency-btn:hover {
  background: #E8ECEF;
  color: #091A38;
  transform: translateY(-2px);
}

/* 8. Bottom CTA Bar (Royal Navy Sticky Floating Bar) */
.service-detail-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 32px;
  border-radius: 26px;
  background: var(--sd-navy-deep);
  color: #FFFFFF;
  box-shadow: 0 16px 40px rgba(9, 26, 56, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.service-bottom-cta-text {
  display: flex;
  flex-direction: column;
}

.service-bottom-cta-text strong {
  font-size: 18px;
  font-weight: 800;
  color: #FFFFFF;
  margin-bottom: 4px;
}

.service-bottom-cta-text span {
  font-size: 14px;
  color: #CBD5E1;
}

.btn-service-book {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 28px;
  border-radius: 9999px;
  background: #FFFFFF;
  color: var(--sd-navy-deep);
  font-size: 14.5px;
  font-weight: 800;
  text-decoration: none;
  border: none;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  transition: all 0.25s var(--ease-out-expo);
  flex-shrink: 0;
}

.btn-service-book:hover {
  transform: translateY(-2px);
  background: #E8ECEF;
  color: #091A38;
  box-shadow: 0 10px 26px rgba(18, 42, 107, 0.35);
}

.btn-service-book svg {
  color: var(--sd-navy-deep);
  transition: color 0.2s ease;
}

.btn-service-book:hover svg {
  color: #091A38;
}
}

/* 9. Mobile Responsive Layout */
@media (max-width: 860px) {
  .service-detail-hero {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .service-detail-image-wrap {
    order: -1;
  }

  .service-detail-image-frame {
    max-width: 280px;
  }

  .service-detail-bottom-bar {
    flex-direction: column;
    text-align: center;
    padding: 24px 20px;
    gap: 16px;
  }

  .btn-service-book {
    width: 100%;
    justify-content: center;
  }

  .aftercare-cards-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

@media (max-width: 640px) {
  .service-detail-container {
    padding: 18px 16px 90px;
  }

  .service-detail-hero {
    padding: 28px 20px;
    border-radius: 22px;
    margin-bottom: 36px;
  }

  .service-detail-topbar {
    padding: 10px 16px;
    margin-bottom: 24px;
  }

  .service-detail-brand-badge span {
    display: none;
  }

  .treatment-step-card {
    padding: 18px 16px;
    gap: 14px;
  }

  .service-faq-wrap {
    padding: 30px 18px 32px;
    border-radius: 22px;
    margin: 40px 0;
  }

  .faq-question {
    padding: 16px 18px;
    font-size: 14.5px;
  }

  .faq-answer {
    padding: 0 18px 16px;
    font-size: 13.5px;
  }

  .service-aftercare-section {
    padding: 26px 18px 22px;
    border-radius: 20px;
  }

  .aftercare-emergency-bar {
    flex-direction: column;
    align-items: flex-start;
    text-align: right;
    gap: 16px;
  }

  .aftercare-emergency-btn {
    width: 100%;
    justify-content: center;
  }
}
