/* Single university page */

.cs-uni-hero {
  position: relative;
  background: linear-gradient(145deg, var(--cs-red) 0%, var(--cs-red-deep) 60%, var(--cs-red-ink) 100%);
  color: #fff;
  padding: 2.75rem 0 2.25rem;
  overflow: hidden;
}

.cs-uni-hero--media {
  min-height: min(68vh, 560px);
  display: grid;
  align-items: end;
  padding: 0;
}

.cs-uni-hero__media {
  position: absolute;
  inset: 0;
}

.cs-uni-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
}

.cs-uni-hero__wash {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(110,18,6,.25) 0%, rgba(168,28,10,.55) 45%, rgba(222,41,16,.92) 100%),
    linear-gradient(270deg, rgba(222,41,16,.28), transparent 55%);
}

.cs-uni-hero__content {
  position: relative;
  z-index: 1;
  padding: 3.5rem 0 1.75rem;
}

@media (min-width: 768px) {
  .cs-uni-hero__content {
    padding: 5rem 0 2.5rem;
  }
}

.cs-uni-hero .cs-chip {
  background: rgba(255,255,255,.18);
  color: #fff;
}

.cs-uni-hero__title {
  margin: .75rem 0 .85rem;
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  line-height: 1.35;
  font-weight: 900;
}

.cs-uni-hero__lead {
  margin: 0 0 1rem;
  max-width: 46rem;
  color: rgba(255,255,255,.92);
  line-height: 1.85;
}

.cs-uni-hero__site { margin: 0; font-size: .95rem; }

.cs-uni-hero__site a {
  color: var(--cs-gold);
  font-weight: 700;
  border-bottom: 1px solid rgba(255,222,0,.4);
}

.cs-prose img,
.cs-uni-figure img {
  width: 100%;
  border-radius: 1rem;
  margin: 1rem 0 1.25rem;
}

.cs-uni-figure {
  margin: 1.25rem 0 1.5rem;
}

.cs-uni-figure figcaption {
  margin-top: .55rem;
  font-size: .88rem;
  color: var(--cs-soft);
}

.cs-uni-gallery {
  display: grid;
  gap: 1rem;
  margin: 0 0 1.5rem;
}

.cs-uni-gallery__item {
  margin: 0;
  background: #fff;
  border: 1px solid var(--cs-line);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(110,18,6,.05);
}

.cs-uni-gallery__item img,
.cs-uni-gallery__img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
  margin: 0;
  border-radius: 0;
}

.cs-uni-gallery__item figcaption {
  padding: .85rem 1rem;
  font-size: .92rem;
  font-weight: 700;
  color: var(--cs-red-ink);
  border-top: 1px solid var(--cs-line);
}

@media (min-width: 768px) {
  .cs-uni-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

.cs-uni-facts {
  display: grid;
  grid-template-columns: 1fr;
  gap: .75rem;
  margin-top: -1.25rem;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 2;
}

@media (min-width: 560px) {
  .cs-uni-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.cs-uni-facts__item {
  background: #fff;
  border: 1px solid var(--cs-line);
  border-radius: .9rem;
  padding: .85rem 1rem;
  box-shadow: 0 8px 20px rgba(110,18,6,.06);
  min-width: 0;
}

.cs-uni-facts__label {
  display: block;
  font-size: .78rem;
  color: var(--cs-soft);
  margin-bottom: .25rem;
}

.cs-uni-facts__value {
  font-size: .95rem;
  color: var(--cs-red-ink);
  line-height: 1.45;
  word-break: break-word;
}

.cs-uni-toc {
  position: sticky;
  top: 4rem;
  z-index: 40;
  background: rgba(255,248,245,.96);
  backdrop-filter: blur(10px);
  border-block: 1px solid var(--cs-line);
  margin-bottom: 1.5rem;
}

.admin-bar .cs-uni-toc {
  top: calc(4rem + 46px);
}

@media (min-width: 783px) {
  .admin-bar .cs-uni-toc {
    top: calc(4.5rem + 32px);
  }
}

.cs-uni-toc__inner {
  display: flex;
  gap: .35rem;
  overflow-x: auto;
  padding: .65rem 0;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  max-width: 100%;
}

.cs-uni-toc a {
  flex: 0 0 auto;
  padding: .45rem .85rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--cs-line);
  font-size: .86rem;
  font-weight: 600;
  color: var(--cs-soft);
  white-space: nowrap;
}

.cs-uni-toc a:hover,
.cs-uni-toc a.is-active {
  background: var(--cs-red);
  border-color: var(--cs-red);
  color: #fff;
}

.cs-uni-body { padding-bottom: 3.5rem; }

.cs-uni-section {
  margin-bottom: 2.75rem;
  scroll-margin-top: 7.5rem;
}

.cs-uni-section h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  color: var(--cs-red-ink);
}

.cs-uni-subhead {
  margin: 1.5rem 0 .85rem;
  font-size: 1.15rem;
  color: var(--cs-red);
}

.cs-uni-callout {
  border-radius: 1rem;
  padding: 1.2rem 1.25rem;
  margin-bottom: 1rem;
  border: 1px solid var(--cs-line);
  background: #fff;
}

.cs-uni-callout--pros { border-inline-start: 4px solid var(--cs-red); }
.cs-uni-callout--cons {
  border-inline-start: 4px solid var(--cs-gold-soft);
  background: #fffdf5;
}

.cs-uni-callout h3 {
  margin: 0 0 .65rem;
  font-size: 1.05rem;
}

.cs-uni-faculties {
  display: grid;
  gap: .85rem;
}

.cs-uni-faculty {
  background: #fff;
  border: 1px solid var(--cs-line);
  border-radius: .9rem;
  padding: 1.1rem 1.2rem;
}

.cs-uni-faculty h3 {
  margin: 0 0 .4rem;
  color: var(--cs-red);
  font-size: 1.05rem;
}

.cs-uni-faculty p {
  margin: 0;
  color: var(--cs-soft);
  font-size: .95rem;
}

.cs-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  border: 1px solid var(--cs-line);
  border-radius: .9rem;
  background: #fff;
  margin: 0;
  max-width: 100%;
  width: 100%;
}

.cs-table {
  width: 100%;
  min-width: 52rem;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: .9rem;
  line-height: 1.45;
}

.cs-table th,
.cs-table td {
  padding: .8rem .7rem;
  border: 1px solid var(--cs-line);
  text-align: right;
  vertical-align: middle;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

.cs-table th {
  background: #fdf2f2;
  color: var(--cs-red-ink);
  font-weight: 800;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: keep-all;
}

.cs-table tbody tr:nth-child(even) td {
  background: #fcfaf9;
}

.cs-table tbody tr:hover td {
  background: #fff5f3;
}

.cs-table--tuition th:nth-child(1),
.cs-table--tuition td:nth-child(1) { width: 14%; }
.cs-table--tuition th:nth-child(2),
.cs-table--tuition td:nth-child(2) { width: 18%; }
.cs-table--tuition th:nth-child(3),
.cs-table--tuition td:nth-child(3) { width: 13%; }
.cs-table--tuition th:nth-child(4),
.cs-table--tuition td:nth-child(4) { width: 11%; }
.cs-table--tuition th:nth-child(5),
.cs-table--tuition td:nth-child(5) { width: 14%; }
.cs-table--tuition th:nth-child(6),
.cs-table--tuition td:nth-child(6) { width: 15%; }
.cs-table--tuition th:nth-child(7),
.cs-table--tuition td:nth-child(7) { width: 15%; }

.cs-table--tuition td:nth-child(6),
.cs-table--tuition td:nth-child(7) {
  font-variant-numeric: tabular-nums;
  direction: ltr;
  unicode-bidi: isolate;
  text-align: left;
}

.cs-table tr:last-child td { border-bottom: 1px solid var(--cs-line); }

.cs-uni-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .9rem;
}

.cs-uni-steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .9rem;
  background: #fff;
  border: 1px solid var(--cs-line);
  border-radius: .9rem;
  padding: 1rem 1.1rem;
}

.cs-uni-steps__num {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: var(--cs-red);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 900;
}

.cs-uni-steps h3 {
  margin: 0 0 .3rem;
  font-size: 1.05rem;
}

.cs-uni-steps p {
  margin: 0;
  color: var(--cs-soft);
  font-size: .95rem;
}

.cs-uni-cta__box {
  background: linear-gradient(145deg, var(--cs-red), var(--cs-red-deep));
  color: #fff;
  border-radius: 1.25rem;
  padding: 1.75rem 1.35rem;
}

.cs-uni-cta__box h2 {
  color: #fff;
  margin-bottom: .65rem;
}

.cs-uni-cta__box > p {
  margin: 0 0 1.25rem;
  color: rgba(255,255,255,.9);
}

.cs-uni-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  margin: 0 0 1.1rem;
}

.cs-btn--ghost-dark {
  background: transparent;
  color: var(--cs-ink);
  border: 1px solid rgba(0,0,0,.18);
}

.cs-btn--ghost-dark:hover {
  border-color: var(--cs-red);
  background: rgba(222,41,16,.06);
}

.cs-uni-cta__box .cs-btn--ghost-dark {
  color: #fff;
  border-color: rgba(255,255,255,.55);
}

.cs-uni-cta__box .cs-btn--ghost-dark:hover {
  border-color: #fff;
  background: rgba(255,255,255,.12);
}

/* Dark CTA box overrides for embedded lead form */
.cs-uni-cta .cs-uni-lead-form {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 1rem;
  padding: 1.1rem;
}

.cs-uni-cta .cs-uni-lead-form > label > span {
  color: var(--cs-gold);
}

.cs-uni-cta .cs-uni-lead-form input[type="text"],
.cs-uni-cta .cs-uni-lead-form input[type="tel"],
.cs-uni-cta .cs-uni-lead-form select,
.cs-uni-cta .cs-uni-lead-form textarea {
  border-color: rgba(255,255,255,.35);
  background: #fff;
  color: var(--cs-ink);
}

.cs-uni-cta .cs-uni-lead-form input:focus,
.cs-uni-cta .cs-uni-lead-form select:focus,
.cs-uni-cta .cs-uni-lead-form textarea:focus {
  outline: 2px solid var(--cs-gold);
  border-color: transparent;
}

@media (min-width: 768px) {
  .cs-uni-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cs-uni-faculties { grid-template-columns: repeat(2, 1fr); }
  .cs-uni-cta__box { padding: 2.25rem; }
}

/* —— Mobile polish —— */
@media (max-width: 767px) {
  .cs-uni-hero--media {
    min-height: min(48vh, 380px);
  }

  .cs-uni-hero__content {
    padding: 2.1rem 0 1.25rem;
  }

  .cs-uni-hero__title {
    font-size: clamp(1.35rem, 6.2vw, 1.75rem);
    margin: 0.55rem 0 0.65rem;
  }

  .cs-uni-hero__lead {
    font-size: 0.92rem;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .cs-uni-facts {
    margin-top: -1rem;
    gap: 0.55rem;
  }

  .cs-uni-facts__item {
    padding: 0.75rem 0.85rem;
  }

  .cs-uni-toc {
    top: 3.85rem;
  }

  .admin-bar .cs-uni-toc {
    top: calc(3.85rem + 46px);
  }

  .cs-uni-toc__inner {
    gap: 0.3rem;
    padding: 0.55rem 0;
    scrollbar-width: none;
  }

  .cs-uni-toc__inner::-webkit-scrollbar {
    display: none;
  }

  .cs-uni-toc a {
    padding: 0.4rem 0.75rem;
    font-size: 0.82rem;
  }

  .cs-uni-section {
    margin-bottom: 2.1rem;
    scroll-margin-top: 6.25rem;
  }

  .cs-uni-section h2 {
    font-size: 1.25rem;
  }

  .cs-table-wrap {
    margin-inline: -0.25rem;
    padding-bottom: 0.25rem;
  }

  .cs-uni-cta__box {
    padding: 1.25rem 1rem;
    border-radius: 1rem;
  }

  .cs-uni-cta__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .cs-uni-cta__actions .cs-btn {
    width: 100%;
    justify-content: center;
  }

  .cs-uni-cta .cs-uni-lead-form {
    padding: 0.85rem;
    gap: 0.75rem;
  }

  .cs-uni-body {
    padding-bottom: 5.5rem;
  }
}

/* Sticky consult bar (mobile) */
.cs-sticky-consult {
  display: none;
}

@media (max-width: 767px) {
  .cs-sticky-consult {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    position: fixed;
    inset-inline: 0.85rem;
    bottom: calc(0.85rem + env(safe-area-inset-bottom, 0px));
    z-index: 60;
    min-height: 3.1rem;
    padding: 0 1.1rem;
    border-radius: 999px;
    background: var(--cs-red);
    color: #fff;
    font-weight: 800;
    font-size: 0.95rem;
    box-shadow: 0 10px 28px rgba(110, 18, 6, 0.28);
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

  .cs-sticky-consult.is-hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(120%);
  }

  .admin-bar .cs-sticky-consult {
    bottom: calc(0.85rem + 46px + env(safe-area-inset-bottom, 0px));
  }
}
