@import url('https://fonts.googleapis.com/css2?family=Economica:wght@700&display=swap');

@font-face {
  font-family: 'Abolition';
  src: url('../fonts/AbolitionTest-Regular.otf') format('opentype');
  font-weight: normal;
}

@font-face {
  font-family: 'BebasNeueRounded';
  src: url('../fonts/BebasNeueRounded-Regular.ttf') format('truetype');
  font-weight: normal;
}

:root {
  --red:    #A00707;
  --black:  #211B1B;
  --beige:  #F3DFC1;
  --blue:   #4F759B;
  --white:  #FFFFFA;
  --radius: 10px;
  --gap:    8px;
  --ease:   0.18s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img { display: block; max-width: 100%; }

body {
  background: #e8e0d4;
  color: var(--black);
  font-family: 'Economica', sans-serif;
  font-weight: 700;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body > *:not(footer) { flex-shrink: 0; }
footer { margin-top: auto; }

/* ── Nav ─────────────────────────────────────── */
.nav {
  background: var(--red);
  padding: 0 1.25rem;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 200;
  gap: 1rem;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

.nav-logo-box {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.15);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.55rem;
  color: var(--white);
  text-align: center;
  line-height: 1.2;
  flex-shrink: 0;
}

.nav-site-name {
  font-family: 'BebasNeueRounded', sans-serif;
  color: var(--white);
  font-size: 1.25rem;
  letter-spacing: 0.05em;
  text-decoration: none;
  white-space: nowrap;
}

.nav-search {
  flex: 1;
  max-width: 340px;
  padding: 0.35rem 1rem;
  border-radius: 999px;
  border: none;
  font-family: 'Economica', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  background: rgba(255,255,255,0.2);
  color: var(--white);
  outline: none;
  transition: background var(--ease);
}

.nav-search::placeholder { color: rgba(255,255,255,0.7); }
.nav-search:focus { background: rgba(255,255,255,0.3); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
  position: relative;
}

.nav-home-link {
  font-family: 'BebasNeueRounded', sans-serif;
  color: var(--white);
  text-decoration: none;
  font-size: 1rem;
  letter-spacing: 0.08em;
}

.nav-hamburger {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--white);
  font-size: 1.4rem;
  line-height: 1;
  padding: 0.2rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
}

.nav-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--black);
  border-radius: var(--radius);
  overflow: hidden;
  min-width: 200px;
  z-index: 300;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.nav-dropdown.open { display: block; }

.nav-dropdown a {
  display: block;
  padding: 0.85rem 1.25rem;
  font-family: 'BebasNeueRounded', sans-serif;
  color: var(--white);
  text-decoration: none;
  font-size: 1rem;
  letter-spacing: 0.06em;
  transition: background var(--ease), color var(--ease);
}

.nav-dropdown a:hover {
  background: var(--red);
}

/* ── Campus Banner ───────────────────────────── */
.campus-banner {
  width: 100%;
  height: 350px;
  overflow: hidden;
}

.campus-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 80%;
  display: block;
}

/* ── Page content wrapper ────────────────────── */
.page-wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--gap);
}

/* ── Tile Grid ───────────────────────────────── */
.tile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  padding: var(--gap);
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.tile {
  border-radius: var(--radius);
  padding: 2rem;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.tile-span2 { grid-column: span 2; }

.tile-beige { background: var(--beige); color: var(--black); }
.tile-black { background: var(--black); color: var(--white); }
.tile-red   { background: var(--red);   color: var(--white); }
.tile-blue  { background: var(--blue);  color: var(--white); }
.tile-white { background: var(--white); color: var(--black); }

/* ── Typography ──────────────────────────────── */
.t-hero {
  font-family: 'Abolition', sans-serif;
  font-size: clamp(2.8rem, 6vw, 5.5rem);
  line-height: 0.95;
  letter-spacing: 0.02em;
  color: var(--red);
}

.t-heading {
  font-family: 'Abolition', sans-serif;
  font-size: clamp(1.6rem, 3.5vw, 3rem);
  letter-spacing: 0.03em;
  line-height: 1;
}

.t-label {
  font-family: 'BebasNeueRounded', sans-serif;
  font-size: 1rem;
  letter-spacing: 0.08em;
  opacity: 0.8;
  margin-bottom: 0.3rem;
}

.t-body {
  font-size: 1rem;
  line-height: 1.7;
}

/* ── Buttons (tile CTAs) ─────────────────────── */
.tile-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  min-height: 100px;
  cursor: pointer;
  border: none;
  transition: filter var(--ease), transform var(--ease);
}

.tile-btn:hover {
  filter: brightness(1.1);
  transform: scale(1.01);
}

.tile-btn .t-heading { text-align: center; }

/* ── Featured Teacher / Staff Spotlight ──────── */
.featured-teacher {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.featured-photo-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.featured-photo {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
  background: rgba(255,255,255,0.15);
  flex-shrink: 0;
}

.featured-rating {
  font-family: 'Abolition', sans-serif;
  font-size: 2.5rem;
  line-height: 1;
}

.featured-rating-label {
  font-size: 0.85rem;
  opacity: 0.75;
  margin-top: 0.1rem;
}

/* ── Department tiles (Find a Teacher) ───────── */
.dept-tile {
  border-radius: var(--radius);
  background: var(--blue);
  color: var(--white);
  padding: 1.25rem 1.5rem;
}

.dept-tile-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 1rem;
  border-bottom: 2px solid rgba(255,255,255,0.2);
  padding-bottom: 0.75rem;
}

.dept-tile-name {
  font-family: 'BebasNeueRounded', sans-serif;
  font-size: 1.25rem;
  letter-spacing: 0.06em;
}

.dept-tile-rating {
  font-family: 'Abolition', sans-serif;
  font-size: 1.4rem;
  line-height: 1;
  white-space: nowrap;
}

.dept-tile-rating span {
  font-family: 'Abolition', sans-serif;
  font-size: 1.4rem;
  opacity: 0.75;
}

.dept-teachers {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.dept-teacher-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--white);
  transition: opacity var(--ease);
}

.dept-teacher-link:hover { opacity: 0.75; }

.dept-teacher-link:hover span { text-decoration: underline; }

.dept-teacher-photo {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255,255,255,0.2);
  flex-shrink: 0;
}

.dept-teacher-link span {
  font-size: 0.875rem;
}

.teacher-rating {
  font-family: 'Abolition', sans-serif;
  font-size: 0.8rem;
  opacity: 0.65;
  flex-shrink: 0;
  letter-spacing: 0.03em;
}

/* ── Teacher Profile ─────────────────────────── */
.policy-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.policy-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
}

.policy-score {
  background: var(--blue);
  color: var(--white);
  font-family: 'BebasNeueRounded', sans-serif;
  font-size: 0.9rem;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  min-width: 40px;
  text-align: center;
  flex-shrink: 0;
}

.big-stat {
  font-family: 'Abolition', sans-serif;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1;
}

/* ── Feedback Distribution ───────────────────── */
.dist-chart { display: flex; flex-direction: column; gap: 0.5rem; }

.dist-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
}

.dist-label { width: 80px; flex-shrink: 0; }

.dist-bar-wrap {
  flex: 1;
  height: 14px;
  background: rgba(33,27,27,0.12);
  border-radius: 999px;
  overflow: hidden;
}

.dist-bar {
  height: 100%;
  background: var(--blue);
  border-radius: 999px;
  transition: width 0.6s ease;
}

.dist-count { min-width: 20px; text-align: right; }

/* ── Tags ────────────────────────────────────── */
.tag-list { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.5rem; }

.tag {
  background: var(--white);
  color: var(--black);
  border-radius: 999px;
  padding: 0.25rem 0.8rem;
  font-size: 0.8rem;
  white-space: nowrap;
}

.tile-blue .tag { background: var(--white); color: var(--black); }
.tile-black .tag { background: rgba(255,255,255,0.15); color: var(--white); }
.tile-beige .tag { background: var(--black); color: var(--white); }

/* ── Review Tiles ────────────────────────────── */
.reviews-section {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--gap);
}

/* alias so reviews-section and page-wrap share the same width */

.reviews-section-title {
  font-family: 'BebasNeueRounded', sans-serif;
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  color: var(--black);
  margin-bottom: var(--gap);
  padding: 0 0.25rem;
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--gap);
  align-items: start;
}

.review-tile {
  background: var(--beige);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.review-tile-top {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.875rem;
}

.review-rating-num {
  font-family: 'Abolition', sans-serif;
  font-size: 3rem;
  line-height: 1;
  color: var(--red);
  flex-shrink: 0;
  width: 48px;
}

.review-tags-col { flex: 1; }

.review-meta {
  text-align: right;
  flex-shrink: 0;
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--blue);
}

.review-meta strong { color: var(--black); }

.review-tile-body { font-size: 0.92rem; line-height: 1.65; }

.review-tile-body + .review-tile-body {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(33,27,27,0.1);
  opacity: 0.8;
}

/* ── States ──────────────────────────────────── */
.loading, .empty-state {
  text-align: center;
  padding: 3rem;
  color: var(--blue);
  font-family: 'BebasNeueRounded', sans-serif;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  grid-column: 1 / -1;
  background: var(--beige);
  border-radius: var(--radius);
}

/* ── Search bar on page (find-a-teacher) ─────── */
.page-search-wrap {
  padding: var(--gap) var(--gap) 0;
  max-width: 1400px;
  margin: 0 auto;
}

.page-search {
  width: 100%;
  padding: 0.7rem 1.25rem;
  border-radius: 999px;
  border: none;
  font-family: 'Economica', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  background: var(--white);
  color: var(--black);
  outline: none;
}

/* ── Footer ──────────────────────────────────── */
footer {
  background: var(--black);
  color: var(--beige);
  padding: 2rem;
  text-align: center;
  font-size: 0.9rem;
}

footer p + p { margin-top: 0.3rem; font-size: 0.8rem; opacity: 0.5; }

/* ── Responsive ──────────────────────────────── */
@media (max-width: 700px) {
  .tile-grid { grid-template-columns: 1fr; }
  .tile-span2 { grid-column: span 1; }
  .nav-search { display: none; }
}
