/* =============================================================================
   COLLEGE PAGES STYLES
   ============================================================================= */

/* =============================================================================
   SCHOOL PAGE HEADER
   ============================================================================= */

.school-page .school-header {
  background-size: cover;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 250px;
  width: 100vw;
  z-index: -1;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  background: var(--header-color, #1a202c);
}

/* Photo mode header */
.school-page .school-header.photo-mode {
  background: transparent;
}

.school-page .school-header.photo-mode .header-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.school-page .school-header.photo-mode::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(0,0,0,0.7) 0%,
    rgba(0,0,0,0.3) 50%,
    rgba(0,0,0,0.5) 100%
  );
  z-index: 1;
}

/* Logo mode header */
.school-page .school-header .header-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
}

.school-page .school-header .school-logo {
  max-height: 160px;
  max-width: 300px;
  object-fit: contain;
  opacity: 1;
}

/* School overview text */
.school-page .school-overview {
  position: absolute;
  left: 4em;
  top: 100px;
  z-index: 2;
  color: white;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

.school-page .school-overview h1,
.school-page .school-overview p {
  color: white;
  line-height: 1.4;
  margin: 0;
}

.school-page .school-overview h1 {
  font-size: 2.5rem;
  font-weight: 700;
}

/* Header stats box */
.school-page .school-match {
  list-style-type: none;
  border: none;
  box-shadow: 0 1px 20px rgba(0,0,0,0.5);
  height: 100px;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  margin: 0;
  padding: 0 !important;
  position: absolute;
  top: 100px;
  right: 0;
  width: 400px;
  z-index: 2;
}

.school-page .school-match li {
  flex: 1 1 auto;
  display: grid;
  place-items: center center;
  text-align: center;
  padding: 0;
  margin: 0;
}

.school-page .school-match li.stats-match {
  background: var(--green);
  color: white;
  width: 115px;
}

.school-page .school-match li.stats-play-early {
  background-color: #373535;
  color: white;
  width: 115px;
}

.school-page .school-match li.gated {
  opacity: 0.7;
}

.school-page .school-match li p {
  margin: 0;
}

.school-page .school-match li span {
  display: block;
  font-size: 2.5rem;
  font-weight: 800;
  font-style: italic;
  line-height: 1;
}

.school-page .school-match li span i {
  font-size: 1.25rem;
  vertical-align: super;
}

.school-page .school-match .projected-openings {
  background: white;
  width: 180px;
}

.school-page .school-match .projected-openings > div {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 1em;
}

.school-page .school-match .po-position {
  text-align: center;
}

.school-page .school-match .po-position b {
  background-color: var(--color-primary);
  border-radius: 8px;
  color: white;
  display: block;
  font-size: 2.25rem;
  line-height: 1.6;
  height: 54px;
  margin-bottom: 5px;
  width: 54px;
}

/* =============================================================================
   SCHOOL CONTENT LAYOUT
   ============================================================================= */

.school-page .school-bottom {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: auto;
  gap: 2rem;
  margin-top: 250px;
}

.school-page .school-left {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* =============================================================================
   SCHOOL INFO / OVERVIEW
   ============================================================================= */

.school-page .school-info {
  margin-left: calc(4em - 20px);
}

.school-page .school-info h2.small {
  margin-bottom: 1rem;
}

.school-page .school-info p {
  line-height: 1.7;
  color: var(--gray-400);
}

.school-page .school-info .no-description {
  font-style: italic;
  color: var(--gray-500);
}

/* =============================================================================
   SCORECARDS
   ============================================================================= */

.school-page .scorecards {
  list-style-type: none;
  margin: 0;
  padding: 0;
  margin-left: calc(4em - 20px);
  margin-top: 2em;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto;
  gap: 2em;
}

.school-page .scorecards > li {
  height: 150px;
}

.school-page .scorecard {
  position: relative;
  padding: 1.25rem;
  min-height: 180px;
}

.school-page .scorecard.gated .gated-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: rgba(255,255,255,0.9);
  border-radius: 12px;
  z-index: 5;
}

.school-page .scorecard .gated-overlay p {
  margin: 0;
  color: var(--gray-500);
  font-size: 0.875rem;
  text-align: center;
}

.school-page .scorecard .gated-overlay .gated-label {
  font-weight: 600;
  margin-top: 0.5rem;
}

.school-page .scorecard .scorecard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.school-page .scorecard .scorecard-header h2 {
  margin: 0;
}

.school-page .scorecard .info-btn {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  border: 1px solid var(--gray-600);
  background: white;
  font-size: 0.75rem;
  cursor: pointer;
  color: var(--gray-500);
}

.school-page .scorecard .info-btn:hover {
  background: var(--gray-ghost);
}

.school-page .scorecard .grade-badge {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  width: 3rem;
  height: 3rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  font-style: italic;
  color: white;
}

.school-page .scorecard .grade-badge.grade-a { background: var(--green); }
.school-page .scorecard .grade-badge.grade-b { background: #3182ce; }
.school-page .scorecard .grade-badge.grade-c { background: var(--yellow); color: var(--gray-200); }
.school-page .scorecard .grade-badge.grade-d { background: #ed8936; }
.school-page .scorecard .grade-badge.grade-f { background: var(--color-primary); }
.school-page .scorecard .grade-badge.grade-unknown,
.school-page .scorecard .grade-badge.gated { background: var(--gray-600); }

/* Bar chart styles */
.school-page .bar-chart {
  display: flex;
  height: 100px;
  gap: 0.5rem;
}

.school-page .bar-chart .chart-y-axis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 0.625rem;
  color: var(--gray-500);
  padding-right: 0.5rem;
}

.school-page .bar-chart .chart-bars {
  display: flex;
  flex: 1;
  align-items: flex-end;
  gap: 0.5rem;
}

.school-page .bar-chart .bar-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.school-page .bar-chart .bar-group .bar {
  width: 100%;
  background: var(--gray-600);
  border-radius: 4px 4px 0 0;
  min-height: 4px;
}

.school-page .bar-chart .bar-group.current .bar {
  background: var(--color-primary);
}

.school-page .bar-chart .bar-group .year-label {
  font-size: 0.625rem;
  color: var(--gray-500);
  margin-top: 0.25rem;
}

.school-page .chart-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100px;
  color: var(--gray-500);
  font-style: italic;
}

/* =============================================================================
   SCHOOL STATS SIDEBAR
   ============================================================================= */

.school-page .school-stats {
  padding: 1.5rem;
}

.school-page .school-stats h2.small {
  margin-bottom: 1rem;
}

.school-page .stats-list {
  margin: 0 0 2rem 0;
}

.school-page .stats-list .stat-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--gray-800);
}

.school-page .stats-list .stat-row:last-child {
  border-bottom: none;
}

.school-page .stats-list dt {
  color: var(--gray-500);
  font-size: 0.875rem;
}

.school-page .stats-list dd {
  margin: 0;
  font-weight: 600;
  color: var(--gray-300);
}

.school-page .map-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
  background: var(--gray-ghost);
  border-radius: 8px;
  color: var(--gray-500);
  font-style: italic;
}

/* =============================================================================
   COLLEGES INDEX
   ============================================================================= */

.schools-index .page-header {
  text-align: center;
  margin-bottom: 2rem;
}

.schools-index .page-header h1 {
  margin: 0 0 0.5rem;
}

.schools-index .page-header .subtitle {
  color: var(--gray-500);
  margin: 0;
}

.schools-index .colleges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.schools-index .college-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.schools-index .college-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.schools-index .college-card-logo {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
}

.schools-index .college-card-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.schools-index .college-card-logo .logo-placeholder {
  width: 100%;
  height: 100%;
  background: var(--gray-ghost);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--gray-500);
}

.schools-index .college-card-info h2 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  font-weight: 600;
}

.schools-index .college-card-info .location,
.schools-index .college-card-info .conference {
  margin: 0;
  font-size: 0.875rem;
  color: var(--gray-500);
}

.schools-index .pagination-nav {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
}

/* =============================================================================
   RESPONSIVE
   ============================================================================= */

@media (max-width: 1024px) {
  .school-page .school-bottom {
    grid-template-columns: 1fr;
  }

  .school-page .scorecards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .school-page .school-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    min-height: auto;
    padding-bottom: 1rem;
  }

  .school-page .school-match {
    width: 100%;
    border-radius: 12px;
    flex-wrap: wrap;
  }

  .school-page .school-overview h1 {
    font-size: 1.75rem;
  }

  .school-page .school-bottom {
    margin-top: 1rem;
  }

  .school-page .school-info,
  .school-page .scorecards {
    margin-left: 0;
  }
}
