/* ═══════════════════════════════════════════════════════════════
   RMH Hospital – Styles
   Migrated from ASP.NET to Django. Design unchanged.
═══════════════════════════════════════════════════════════════ */

/* ── Variables ────────────────────────────────────────────────── */
:root {
  --brand:        #f97316;
  --brand-dark:   #c2410c;
  --brand-light:  #fff7ed;
  --text:         #1e293b;
  --muted:        #64748b;
  --bg:           #f8fafc;
  --glass:        rgba(255,255,255,0.82);
  --blur:         blur(14px);
  --radius:       1rem;
  --shadow:       0 4px 24px rgba(0,0,0,.08);
}

/* ── Base ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
body { font-family: 'Montserrat', sans-serif; background: var(--bg); color: var(--text); }
a { color: var(--brand); }

/* ── Brand colours ────────────────────────────────────────────── */
.text-brand   { color: var(--brand) !important; }
.bg-brand     { background-color: var(--brand) !important; }
.bg-brand-soft{ background-color: var(--brand-light) !important; }
.border-brand { border-color: var(--brand) !important; }

/* ── Buttons ──────────────────────────────────────────────────── */
.btn-brand {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  font-weight: 600;
  border-radius: 8px;
  transition: background .2s, transform .15s;
}
.btn-brand:hover  { background: var(--brand-dark); border-color: var(--brand-dark); color:#fff; transform: translateY(-1px); }
.btn-outline-brand {
  color: var(--brand);
  border: 1.5px solid var(--brand);
  background: transparent;
  font-weight: 600;
  border-radius: 8px;
  transition: all .2s;
}
.btn-outline-brand:hover { background: var(--brand); color: #fff; }

/* ── Header / Logo ────────────────────────────────────────────── */
.bg-blur { background: rgba(255,255,255,0.95); }
.logo { width: 48px; height: 48px; border-radius: 50%; object-fit: contain; background: #fff; padding: 2px; box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.brand-title { 
  font-size: clamp(1.3rem, 4vw, 2rem); 
  font-weight: 800; 
  color: var(--brand); 
  letter-spacing: .5px; 
  line-height: 1.2; 
  border: 2px solid #1e3a8a;
  border-radius: 14px;
  padding: 6px 18px;
  display: inline-block;
  background: rgba(255, 243, 224, 0.5);
}
.header-side {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}
.navbar-nav .nav-link { font-weight: 600; color: var(--text); padding: .45rem .75rem; border-radius: 6px; transition: color .15s, background .15s; }
.navbar-nav .nav-link:hover { color: var(--brand); background: var(--brand-light); }

/* ── Hero ─────────────────────────────────────────────────────── */
.hero {
  min-height: 420px;
  background: linear-gradient(135deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.25) 100%),
              url('/static/assets/hospital_bg.png') center/cover no-repeat;
  position: relative;
  will-change: auto;
  transform: translateZ(0);
  background-attachment: scroll;
}
.text-shadow-strong { text-shadow: 0 2px 8px rgba(0,0,0,.65); }
.text-shadow        { text-shadow: 0 1px 4px rgba(0,0,0,.45); }

/* ── Glass panels ─────────────────────────────────────────────── */
.glass-80  { background: rgba(255,255,255,0.90); }
.glass-75  { background: rgba(255,255,255,0.88); }
.bg-white\/80 { background: rgba(255,255,255,0.80) !important; }
.bg-white\/60 { background: rgba(255,255,255,0.60) !important; }

/* ── Section titles ───────────────────────────────────────────── */
.section-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--brand);
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}
.section-title::after {
  content: '';
  position: absolute;
  left: 0; bottom: -4px;
  width: 48px; height: 3px;
  background: var(--brand);
  border-radius: 2px;
}

/* ── Department highlight ─────────────────────────────────────── */
.dept-highlight { max-width: 480px; }

/* ── Doctor cards ─────────────────────────────────────────────── */
.doc-img { height: 220px; object-fit: cover; object-position: top center; }
.doctor { transition: transform .2s, box-shadow .2s; cursor: pointer; }
.doctor:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,.12) !important; }

/* ── OPD badges ───────────────────────────────────────────────── */
.opd-badge {
  display: inline-block;
  padding: .2em .6em;
  border-radius: 6px;
  font-size: .75rem;
  font-weight: 600;
  background: #f1f5f9;
  color: var(--muted);
}
.opd-ortho   { background: #dbeafe; color: #1d4ed8; }
.opd-surgery { background: #dcfce7; color: #15803d; }
.opd-medicine{ background: #fef9c3; color: #92400e; }
.opd-urology { background: #ede9fe; color: #6d28d9; }
.opd-default { background: #f1f5f9; color: #475569; }

/* ── Facility tiles ───────────────────────────────────────────── */
.facility {
  background: var(--glass);
  border: 1px solid rgba(0,0,0,.07);
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  font-weight: 600;
  font-size: .9rem;
  box-shadow: var(--shadow);
  transition: background .2s, transform .2s;
}
.facility i { color: var(--brand); font-size: 1.25rem; flex-shrink: 0; }
.facility:hover { background: var(--brand-light); transform: translateY(-2px); }

/* ── Gallery Thumbnails ───────────────────────────────────────── */
.gallery-thumb {
  cursor: pointer;
  border-radius: 10px;
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
  margin-bottom: 8px;
}
.gallery-thumb:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
}
.gallery-caption {
  font-size: .8rem;
  color: var(--muted);
  text-align: center;
  margin-top: 4px;
  margin-bottom: 0;
}
.play-overlay {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.7);
  border-radius: 50%;
  width: 48px; height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
}

/* ── Lightbox ─────────────────────────────────────────────────── */
#rmhLightbox {
  display: none !important;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.92);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
#rmhLightbox.active {
  display: flex !important;
}
#lightboxImg {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0,0,0,.5);
}
#lightboxCaption {
  color: #fff;
  margin-top: 12px;
  font-size: .95rem;
  text-align: center;
}
#lightboxCounter {
  color: rgba(255,255,255,0.6);
  font-size: .8rem;
  margin-top: 4px;
}
.lightbox-close {
  position: absolute;
  top: 16px; right: 20px;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  background: none;
  border: none;
  line-height: 1;
  opacity: 0.8;
  z-index: 10000;
}
.lightbox-close:hover { opacity: 1; }
.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  font-size: 1.5rem;
  width: 48px; height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s;
  z-index: 10000;
}
.lightbox-arrow:hover { background: rgba(255,255,255,0.3); }
#lightboxPrev { left: 16px; }
#lightboxNext { right: 16px; }

/* ── Cards ────────────────────────────────────────────────────── */
.card { border-radius: var(--radius) !important; }

/* ── Footer ───────────────────────────────────────────────────── */
footer a { transition: color .15s; }
footer a:hover { color: var(--brand); }

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 576px) {
  .hero { min-height: 320px; }
  .brand-title { font-size: .9rem; }
  .section-title { font-size: 1.25rem; }
}

/* ── Utilities ────────────────────────────────────────────────── */
.backdrop-blur { }
.rounded-4 { border-radius: 1rem !important; }

/* ── Slideshow ────────────────────────────────────────────────── */
.rmh-slideshow {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #000;
}
.slideshow-main {
  position: relative;
  width: 100%;
  height: 420px;
  overflow: hidden;
  cursor: pointer;
}
.slideshow-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity .6s ease;
}
.slideshow-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  padding: 20px 16px 12px;
}
.slideshow-caption {
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  margin: 0;
  text-shadow: 0 1px 4px rgba(0,0,0,.5);
}
.slideshow-counter {
  color: rgba(255,255,255,0.7);
  font-size: .8rem;
  margin: 2px 0 0;
}
.slideshow-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.45);
  border: none;
  color: #fff;
  font-size: 1.2rem;
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s;
  z-index: 10;
}
.slideshow-arrow:hover { background: rgba(0,0,0,0.75); }
.slideshow-prev { left: 12px; }
.slideshow-next { right: 12px; }
.slideshow-play-icon {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.65);
  border-radius: 50%;
  width: 64px; height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.6rem;
  pointer-events: none;
}

/* Thumbnail strip - hidden */
.slideshow-thumbs {
  display: none;
}
  display: flex;
  gap: 6px;
  padding: 8px;
  background: #111;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--brand) #333;
}
.slideshow-thumb {
  flex-shrink: 0;
  width: 80px; height: 60px;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color .2s, opacity .2s;
  opacity: 0.6;
  position: relative;
}
.slideshow-thumb.active {
  border-color: var(--brand);
  opacity: 1;
}
.slideshow-thumb:hover { opacity: 1; }
.slideshow-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.thumb-play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: .8rem;
  background: rgba(0,0,0,0.6);
  border-radius: 50%;
  width: 24px; height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 576px) {
  .slideshow-main { height: 240px; }
  .slideshow-thumb { width: 60px; height: 45px; }
}
