/* School Detail Page */
html {
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
}

/* Keep header and search dropdown above main content */
.schl-header {
  z-index: 999;
}

.schl-header .container-fluid {
  /* overflow-x: hidden; */
  overflow-y: visible;
}

.schl-header .header-menu,
.schl-header .row {
  overflow: visible;
}

.schl-header .row {
  margin-left: 0;
  margin-right: 0;
}

/* Prevent any column from clipping the autocomplete dropdown */
.schl-header .school-autocomplete-wrap {
  overflow: visible;
}

.schl-header [class*="col-"] .school-autocomplete-wrap {
  overflow: visible;
}

/* On detail page: collapsed sidebar = icon-only (80px), not hidden */
.school-detail-page .sidenav.collapsed {
  width: 80px !important;
}

/* Main content margin: 80px when icon-only, 250px when full menu */
.school-detail-page .school-detail-section {
  transition: margin-left 0.3s;
}
.school-detail-page.sidenav-collapsed .school-detail-section {
  margin-left: 80px;
}
.school-detail-page:not(.sidenav-collapsed) .school-detail-section {
  margin-left: 250px;
}

/* Main content below header so autocomplete dropdown is never covered */
.school-detail-section {
  position: relative;
  z-index: 0;
  margin-left: 250px;
  margin-top: 70px;
  padding: 24px 24px 100px;
  transition: margin-left 0.3s;
  background: #f9f9f9;
  min-height: 100vh;
}

.school-detail-section.sidebar-collapsed {
  margin-left: 80px;
}

.school-detail-container {
  max-width: 1400px;
  margin: 0 auto;
}

.school-detail-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
  align-items: start;
}

/* ===================== */
/* Main Content - Left   */
/* ===================== */
.school-detail-main {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  margin: 0;
  padding: 0;
}

/* Banner with Overlay */
.school-banner {
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  overflow: hidden;
  position: relative;
  border-radius: 12px 12px 0 0;
}

.school-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 24px 24px;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 60%, transparent 100%);
  color: #fff;
}

.banner-badges {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.badge-top-rated {
  background: #e67e22;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.badge-verified {
  background: #27ae60;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-verified i {
  font-size: 11px;
}

.banner-school-name {
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 6px 0;
  line-height: 1.2;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.banner-school-location {
  font-size: 14px;
  margin: 0;
  opacity: 0.9;
  display: flex;
  align-items: center;
  gap: 6px;
}

.banner-school-location i {
  font-size: 13px;
}

/* Action Bar Below Banner */
.school-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid #eee;
  flex-wrap: wrap;
  gap: 12px;
}

.action-bar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.school-logo-small {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #eee;
  flex-shrink: 0;
}

.school-logo-small img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.school-rating-info {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.rating-score {
  font-size: 14px;
  font-weight: 700;
  color: #0f0f0f;
}

.rating-score i {
  color: #f5c518;
  font-size: 13px;
}

.rating-count {
  font-size: 13px;
  color: #606060;
}

.established {
  font-size: 13px;
  color: #606060;
}

.established::before {
  content: '·';
  margin-right: 6px;
}

.action-bar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-view-contact {
  background: #1F4AA0 !important;
  color: #fff !important;
  border: none !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  border-radius: 20px !important;
  padding: 10px 20px !important;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: none !important;
}

.btn-view-contact:hover {
  background: #173a80 !important;
  color: #fff !important;
}

.btn-icon-action {
  background: none !important;
  border: none !important;
  color: #606060 !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  padding: 8px 12px !important;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  border-radius: 8px !important;
  box-shadow: none !important;
}

.btn-icon-action:hover {
  background: #f2f2f2 !important;
  color: #0f0f0f !important;
}

.btn-more {
  padding: 8px !important;
}

/* School Info Block */
.school-info-block {
  padding: 24px;
}

/* Flowing Sections */
.detail-section {
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid #eee;
}

.detail-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.section-title {
  font-size: 18px;
  font-weight: 600;
  color: #0f0f0f;
  margin: 0 0 12px 0;
}

.section-text {
  font-size: 14px;
  color: #606060;
  line-height: 1.6;
  margin: 0;
}

.btn-show-more {
  background: none !important;
  border: none !important;
  color: #1F4AA0 !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  padding: 0 !important;
  margin-top: 10px;
  cursor: pointer;
  box-shadow: none !important;
}

.btn-show-more:hover {
  text-decoration: underline;
}

/* Map Placeholder */
.map-placeholder {
  background: #f2f2f2;
  border-radius: 8px;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.map-placeholder-inner {
  text-align: center;
  color: #909090;
}

.map-placeholder-inner i {
  font-size: 48px;
  margin-bottom: 12px;
  display: block;
}

.map-placeholder-inner p {
  margin: 0;
  font-size: 14px;
}

/* Faculty Section - Horizontal Scroll */
.faculty-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.faculty-header .section-title {
  margin-bottom: 0;
}

.view-all-link {
  font-size: 14px;
  font-weight: 600;
  color: #1F4AA0;
  text-decoration: none !important;
}

.view-all-link:hover {
  text-decoration: underline !important;
  color: #173a80;
}

.faculty-scroll {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #ccc transparent;
}

.faculty-scroll::-webkit-scrollbar {
  height: 4px;
}

.faculty-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.faculty-scroll::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}

.faculty-card {
  flex: 0 0 auto;
  text-align: center;
  width: 90px;
}

.faculty-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e8f0fe 0%, #c7d8f5 100%);
  color: #1F4AA0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin: 0 auto 8px;
}

.faculty-name {
  font-size: 12px;
  font-weight: 600;
  color: #0f0f0f;
  margin: 0 0 2px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.faculty-role {
  font-size: 11px;
  color: #909090;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Activities & Clubs - Tag Style */
.activities-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.activity-tag {
  display: inline-block;
  padding: 8px 18px;
  background: #f2f2f2;
  color: #0f0f0f;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid #e5e5e5;
}

/* Program Information - Card Design */
.program-info-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.program-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid #e8e8e8;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.program-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #e8f0fe;
  color: #1F4AA0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.program-card-label {
  font-size: 11px;
  font-weight: 600;
  color: #909090;
  letter-spacing: 0.5px;
}

.program-card-value {
  font-size: 15px;
  font-weight: 600;
  color: #0f0f0f;
  line-height: 1.3;
}

.program-card-wide {
  grid-column: 1 / -1;
}

.program-card-wide .program-card-value {
  font-size: 14px;
  font-weight: 500;
}

/* ===================== */
/* Sidebar - Right       */
/* ===================== */
.school-detail-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-self: start;
  margin: 0;
  padding: 0;
}

.enquiry-form-card-wrapper {
  position: sticky;
  top: 70px;
}

/* Enquiry Form */
.enquiry-form-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  margin: 0;
}

.enquiry-title {
  font-size: 17px;
  font-weight: 700;
  color: #0f0f0f;
  margin: 0 0 4px 0;
  padding: 0;
}

.enquiry-subtitle {
  font-size: 13px;
  color: #606060;
  margin: 0 0 18px 0;
}

.enquiry-label {
  font-size: 11px;
  font-weight: 600;
  color: #606060;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  display: block;
}

.enquiry-disclaimer {
  font-size: 11px;
  color: #909090;
  text-align: center;
  margin: 10px 0 0 0;
}

.enquiry-form .form-group {
  margin-bottom: 12px;
}

.enquiry-form .form-control {
  border-radius: 8px;
  padding: 10px 14px;
  border: 1px solid #e5e5e5;
  font-size: 14px;
}

.enquiry-form textarea.form-control {
  resize: vertical;
  min-height: 60px;
}

.enquiry-form .form-control:focus {
  border-color: #1F4AA0;
  box-shadow: 0 0 0 3px rgba(31, 74, 160, 0.15);
}

.btn-submit-enquiry {
  width: 100%;
  background: #1F4AA0 !important;
  color: #fff !important;
  font-weight: 600 !important;
  padding: 12px !important;
  border-radius: 8px !important;
  border: none !important;
  font-size: 14px !important;
  cursor: pointer;
  margin-top: 4px;
}

.btn-submit-enquiry:hover {
  background: #173a80 !important;
  color: #fff !important;
}

/* Related Schools */
.related-schools {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.related-title {
  font-size: 16px;
  font-weight: 600;
  color: #0f0f0f;
  margin: 0 0 16px 0;
}

.related-school-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  text-decoration: none !important;
  color: inherit !important;
  border-bottom: 1px solid #eee;
  transition: background 0.2s;
}

.related-school-item:last-child {
  border-bottom: none;
}

.related-school-item:hover {
  background: #f9f9f9;
  border-radius: 8px;
}

.related-school-item img {
  width: 120px;
  height: 68px;
  object-fit: cover;
  border-radius: 8px;
}

.related-school-info {
  flex: 1;
  min-width: 0;
}

.related-school-name {
  font-size: 14px;
  font-weight: 600;
  color: #0f0f0f;
  margin: 0 0 2px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.related-school-location {
  font-size: 12px;
  color: #606060;
  margin: 0;
}

/* Copyright for detail page */
.copyright-section-detail {
  padding-left: 80px;
  transition: padding-left 0.3s;
}

.copyright-section-detail.sidebar-open {
  padding-left: 250px;
}

.copyright-section-detail.expanded {
  padding-left: 0;
}

/* ===================== */
/* Responsive            */
/* ===================== */
@media (max-width: 1200px) {
  .school-detail-layout {
    grid-template-columns: 1fr 340px;
  }

  .program-info-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 992px) {
  .school-detail-layout {
    grid-template-columns: 1fr;
  }

  .school-detail-sidebar {
    position: static;
    max-height: none;
    overflow-y: visible;
  }

  .enquiry-form-card {
    margin-bottom: 0;
  }
}

@media (max-width: 798px) {
  .school-detail-section,
  .school-detail-section.sidebar-collapsed {
    margin-left: 0;
    margin-top: 60px;
    padding: 0 0 80px;
    overflow-x: hidden;
  }

  .copyright-section-detail,
  .copyright-section-detail.sidebar-open {
    padding-left: 0;
  }

  .school-detail-container {
    padding: 0;
  }

  .school-detail-layout {
    gap: 0;
  }

  .school-detail-main {
    border-radius: 0;
    box-shadow: none;
  }

  .school-banner {
    aspect-ratio: 4/3;
    border-radius: 0;
  }

  .banner-overlay {
    padding: 30px 16px 16px;
  }

  .banner-school-name {
    font-size: 18px;
  }

  .banner-school-location {
    font-size: 12px;
  }

  .badge-top-rated,
  .badge-verified {
    font-size: 10px;
    padding: 3px 8px;
  }

  .school-action-bar {
    padding: 12px 16px;
    gap: 10px;
  }

  .action-bar-left {
    width: 100%;
  }

  .action-bar-right {
    width: 100%;
    justify-content: space-between;
  }

  .btn-view-contact {
    font-size: 13px !important;
    padding: 8px 16px !important;
  }

  .btn-icon-action {
    font-size: 12px !important;
    padding: 6px 8px !important;
  }

  .school-logo-small {
    width: 34px;
    height: 34px;
  }

  .rating-score {
    font-size: 13px;
  }

  .rating-count,
  .established {
    font-size: 12px;
  }

  .school-info-block {
    padding: 16px;
  }

  .detail-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
  }

  .section-title {
    font-size: 16px;
  }

  .section-text {
    font-size: 13px;
  }

  .program-info-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .program-card {
    padding: 14px;
  }

  .program-card-icon {
    width: 38px;
    height: 38px;
    font-size: 16px;
  }

  .program-card-label {
    font-size: 10px;
  }

  .program-card-value {
    font-size: 13px;
  }

  .faculty-card {
    width: 80px;
  }

  .faculty-avatar {
    width: 56px;
    height: 56px;
    font-size: 20px;
  }

  .faculty-name {
    font-size: 11px;
  }

  .activity-tag {
    font-size: 12px;
    padding: 6px 14px;
  }

  .map-placeholder {
    min-height: 160px;
  }

  /* Sidebar stacks below on mobile */
  .school-detail-sidebar {
    padding: 16px;
    position: static;
    max-height: none;
    overflow-y: visible;
  }

  .enquiry-form-card-wrapper {
    position: static;
  }

  .enquiry-form-card {
    border-radius: 12px;
  }

  .related-school-item img {
    width: 100px;
    height: 56px;
  }
}
