/* SPAV Hostels — institutional residential theme */

body#main-body.hostel-page-body,
body.hostel-page-body:not(.dept-theme),
body:has(#main-content #hostel-page) {
  background:
    radial-gradient(ellipse 70% 45% at 50% 0%, rgba(192, 138, 42, 0.12), transparent 55%),
    linear-gradient(165deg, #0b1628 0%, #111f35 45%, #0a1220 100%) !important;
  color: rgba(255, 255, 255, 0.9);
}

body.hostel-page-body main#main-content.main-content {
  max-width: none !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
}

#hostel-page .hostel-sidebar {
  position: sticky;
  top: 96px;
  display: flex !important;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
  max-height: none !important;
  overflow: visible !important;
  width: auto !important;
  max-width: none !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}

body#main-body.hostel-page-body::before,
body.hostel-page-body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.25;
  background-image:
    linear-gradient(rgba(192, 138, 42, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(192, 138, 42, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
}

#hostel-page,
.hostel-page-root {
  --h-navy: #0b1e3d;
  --h-navy-mid: #142d5a;
  --h-gold: #c08a2a;
  --h-gold-light: #e0a830;
  --h-teal: #0d9488;
  --h-text: #1e293b;
  --h-muted: #64748b;
  --h-border: rgba(192, 138, 42, 0.22);
  --h-shadow: 0 20px 56px rgba(0, 0, 0, 0.28);
  --h-font: 'Plus Jakarta Sans', 'Segoe UI', sans-serif;
  --h-serif: 'Playfair Display', Georgia, serif;
  max-width: 1380px;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 3rem;
  position: relative;
  z-index: 1;
  font-family: var(--h-font);
}

/* Hero */
.hostel-hero {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--h-navy) 0%, var(--h-navy-mid) 55%, #1a3a5c 100%);
  border: 1px solid rgba(224, 168, 48, 0.25);
  box-shadow: var(--h-shadow);
}

.hostel-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 85% 20%, rgba(224, 168, 48, 0.18), transparent 40%),
    radial-gradient(circle at 10% 80%, rgba(13, 148, 136, 0.12), transparent 35%);
  pointer-events: none;
}

.hostel-hero-inner {
  position: relative;
  z-index: 1;
  padding: 2.5rem 2rem 2rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: end;
}

.hostel-hero-text { max-width: 640px; }

.hostel-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--h-gold-light);
  margin-bottom: 0.75rem;
}

.hostel-hero h1 {
  font-family: var(--h-serif);
  font-size: clamp(2rem, 4.5vw, 2.85rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.12;
  margin: 0 0 0.65rem;
}

.hostel-hero-sub {
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.05rem;
  line-height: 1.55;
  margin: 0 0 1.15rem;
}

.hostel-award {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: rgba(224, 168, 48, 0.15);
  border: 1px solid rgba(224, 168, 48, 0.35);
  color: #fde68a;
  font-size: 0.82rem;
  font-weight: 600;
}

.hostel-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 0.65rem;
  min-width: 280px;
}

.hostel-stat {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 0.85rem 0.75rem;
  text-align: center;
}

.hostel-stat-num {
  display: block;
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--h-gold-light);
  line-height: 1;
  margin-bottom: 0.2rem;
}

.hostel-stat-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.3;
}

/* Layout */
.hostel-layout {
  display: grid;
  grid-template-columns: minmax(280px, 320px) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
  margin-bottom: 1.75rem;
}

/* Sidebar — see shell overrides at top of file */

.hostel-panel {
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--h-border);
  box-shadow: 0 8px 28px rgba(11, 30, 61, 0.1);
  overflow: hidden;
}

.hostel-panel-head {
  padding: 1rem 1.15rem;
  background: linear-gradient(135deg, var(--h-navy), var(--h-navy-mid));
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hostel-quick-links {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.hostel-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.78rem 1rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  border: none;
  cursor: pointer;
  text-align: center;
}

.hostel-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.hostel-btn-fee {
  background: linear-gradient(135deg, #b45309, #92400e);
  color: #fff;
}

.hostel-btn-register {
  background: linear-gradient(135deg, #059669, #047857);
  color: #fff;
}

.hostel-btn-outline {
  background: #f8fafc;
  color: var(--h-navy);
  border: 1px solid #e2e8f0;
}

.hostel-btn-outline:hover {
  border-color: var(--h-gold);
  color: var(--h-gold);
}

.hostel-nav-links {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
}

.hostel-nav-links a {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 1.15rem;
  color: var(--h-text);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.hostel-nav-links a:hover {
  background: #faf0d8;
  border-left-color: var(--h-gold);
  color: var(--h-navy);
}

.hostel-nav-links a i {
  width: 1.1rem;
  color: var(--h-gold);
  text-align: center;
}

/* Info tabs */
.hostel-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.75rem 0.75rem 0;
  border-bottom: 1px solid #e2e8f0;
}

.hostel-tab {
  flex: 1 1 auto;
  min-width: fit-content;
  padding: 0.45rem 0.65rem;
  border: none;
  border-radius: 8px 8px 0 0;
  background: #f1f5f9;
  color: var(--h-muted);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.hostel-tab.active {
  background: var(--h-navy);
  color: #fff;
}

.hostel-tab-panel {
  display: none;
  padding: 1.15rem;
  font-size: 0.9rem;
  color: var(--h-text);
  line-height: 1.6;
}

.hostel-tab-panel.active { display: block; }

.hostel-tab-panel h3 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--h-navy);
  margin: 0 0 0.75rem;
}

.hostel-mess-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.86rem;
}

.hostel-mess-row:last-child { border-bottom: none; }

.hostel-contact-card {
  background: #f0f9ff;
  border-left: 3px solid var(--h-teal);
  border-radius: 0 8px 8px 0;
  padding: 0.75rem 0.85rem;
  margin-bottom: 0.65rem;
}

.hostel-contact-card h4 {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--h-navy);
  margin: 0 0 0.35rem;
  letter-spacing: 0.03em;
}

.hostel-contact-card p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--h-muted);
}

.hostel-rule-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hostel-rule-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
  font-size: 0.86rem;
}

.hostel-rule-list .ok { color: #059669; margin-top: 0.15rem; }
.hostel-rule-list .no { color: #dc2626; margin-top: 0.15rem; }

/* Main column */
.hostel-main {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.hostel-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--h-border);
  box-shadow: 0 8px 28px rgba(11, 30, 61, 0.08);
  overflow: hidden;
}

.hostel-card-body {
  padding: 1.5rem 1.65rem;
  color: var(--h-text);
}

.hostel-card-body h2 {
  font-family: var(--h-serif);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--h-navy);
  margin: 0 0 1rem;
}

.hostel-card-body p {
  margin: 0 0 1rem;
  line-height: 1.75;
  color: var(--h-muted);
  font-size: 0.97rem;
}

.hostel-highlight {
  background: linear-gradient(135deg, #faf0d8 0%, #fff8eb 100%);
  border-left: 4px solid var(--h-gold);
  border-radius: 0 10px 10px 0;
  padding: 1rem 1.15rem;
  margin: 1rem 0;
  color: var(--h-navy);
  font-size: 0.95rem;
  line-height: 1.65;
}

/* Accordions */
.hostel-accordion {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.hostel-accordion summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.95rem 1.15rem;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.92rem;
  color: #fff;
  list-style: none;
  user-select: none;
}

.hostel-accordion summary::-webkit-details-marker { display: none; }

.hostel-accordion summary::after {
  content: '\25BE';
  font-size: 1rem;
  transition: transform 0.2s;
}

.hostel-accordion[open] summary::after { transform: rotate(180deg); }

.hostel-accordion.notices summary { background: linear-gradient(135deg, #b91c1c, #991b1b); }
.hostel-accordion.fees summary { background: linear-gradient(135deg, #059669, #047857); }
.hostel-accordion.archive summary { background: linear-gradient(135deg, #475569, #334155); }

.hostel-accordion-body {
  padding: 1.15rem 1.25rem;
  background: #fff;
}

.hostel-accordion-body h4 {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--h-navy);
  margin: 1rem 0 0.5rem;
}

.hostel-accordion-body h4:first-child { margin-top: 0; }

.hostel-link-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hostel-link-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.4rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.9rem;
}

.hostel-link-list li:last-child { border-bottom: none; }

.hostel-link-list a {
  color: #0369a1;
  text-decoration: none;
  font-weight: 500;
  flex: 1;
  min-width: 0;
}

.hostel-link-list a:hover { text-decoration: underline; }

.hostel-badge-new {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  white-space: nowrap;
}

/* Facilities */
.hostel-section {
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--h-border);
  box-shadow: 0 8px 28px rgba(11, 30, 61, 0.08);
  padding: 2rem 1.75rem;
  margin-bottom: 1.5rem;
}

.hostel-section-head {
  text-align: center;
  margin-bottom: 1.75rem;
}

.hostel-section-head h2 {
  font-family: var(--h-serif);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--h-navy);
  margin: 0 0 0.45rem;
}

.hostel-section-head p {
  margin: 0 auto;
  max-width: 560px;
  color: var(--h-muted);
  font-size: 0.98rem;
  line-height: 1.55;
}

.hostel-facilities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.hostel-facility {
  padding: 1.25rem;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: linear-gradient(145deg, #fafafa, #fff);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.hostel-facility:hover {
  border-color: var(--h-border);
  box-shadow: 0 8px 24px rgba(11, 30, 61, 0.08);
  transform: translateY(-2px);
}

.hostel-facility-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--h-navy), var(--h-navy-mid));
  color: var(--h-gold-light);
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.hostel-facility h3 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--h-navy);
  margin: 0 0 0.45rem;
}

.hostel-facility p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--h-muted);
  line-height: 1.55;
}

/* Gallery */
.hostel-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
}

.hostel-gallery-item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4 / 3;
  border: 1px solid #e2e8f0;
  background: #f1f5f9;
  padding: 0;
  display: block;
  width: 100%;
  font: inherit;
}

.hostel-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.hostel-gallery-item:hover img { transform: scale(1.06); }

.hostel-gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(11, 30, 61, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s;
  color: #fff;
  font-size: 1.35rem;
}

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

/* Lightbox */
.hostel-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.92);
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.hostel-lightbox.active,
.hostel-lightbox:not([hidden]) {
  display: flex;
}

.hostel-lightbox-inner {
  position: relative;
  max-width: min(960px, 96vw);
  max-height: 90vh;
}

.hostel-lightbox-inner img {
  max-width: 100%;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 8px;
  display: block;
}

.hostel-lightbox-close {
  position: absolute;
  top: -2.5rem;
  right: 0;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 8px;
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.hostel-lightbox-close:hover { background: rgba(255, 255, 255, 0.25); }

@media (max-width: 960px) {
  .hostel-hero-inner {
    grid-template-columns: 1fr;
    padding: 2rem 1.35rem 1.5rem;
  }
  .hostel-stats {
    grid-template-columns: repeat(4, 1fr);
    min-width: 0;
  }
  .hostel-layout {
    grid-template-columns: 1fr;
  }
  .hostel-sidebar { position: static; }
}

@media (max-width: 600px) {
  .hostel-stats { grid-template-columns: repeat(2, 1fr); }
  .hostel-tabs { gap: 0.25rem; }
  .hostel-tab { font-size: 0.68rem; padding: 0.4rem 0.45rem; }
  .hostel-gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
