/*
 * UNM-Valencia Upward Bound
 * Concept C: Task Portal
 * Body-content styles only. Cascade provides the global site header,
 * typography/font family and site footer.
 *
 * UNM brand colors:
 * Cherry #BA0C2F
 * Turquoise #007A86
 * Silver #A7A8AA
 * Lobo Gray #63666A
 * High Noon #FFC600
 */

.ub-page,
.ub-page * {
  box-sizing: border-box;
}

.ub-page {
  --ub-cherry: #ba0c2f;
  --ub-turquoise: #007a86;
  --ub-silver: #a7a8aa;
  --ub-lobo-gray: #63666a;
  --ub-high-noon: #ffc600;
  --ub-ink: #252525;
  --ub-white: #ffffff;
  --ub-soft-gray: #f5f5f5;
  --ub-border: #d9d9d9;
  --ub-content: 1180px;

  width: 100%;
  color: var(--ub-ink);
  background: var(--ub-white);
  font-family: inherit;
  line-height: 1.6;
}

.ub-page img {
  display: block;
  max-width: 100%;
  height: auto;
}

.ub-page a {
  color: var(--ub-turquoise);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.ub-page a:hover {
  text-decoration-thickness: 3px;
}

.ub-page a:focus-visible,
.ub-page button:focus-visible {
  outline: 3px solid var(--ub-turquoise);
  outline-offset: 4px;
}

.ub-inner {
  width: min(calc(100% - 2rem), var(--ub-content));
  margin-inline: auto;
}

/* Text sizing
   Paragraph/body copy begins at 1.5rem, 50% above a 1rem baseline.
   Cascade still supplies the actual font family/typeface. */
.ub-page p,
.ub-page li {
  font-size: 1.5rem;
}

.ub-page h1,
.ub-page h2,
.ub-page h3 {
  margin-top: 0;
  line-height: 1.15;
}

.ub-page h1 {
  font-size: clamp(3rem, 6vw, 5rem);
}

.ub-page h2 {
  font-size: clamp(2rem, 3.5vw, 2.75rem);
}

.ub-page h3 {
  font-size: clamp(1.35rem, 2vw, 1.65rem);
}

.ub-kicker {
  margin: 0 0 0.65rem;
  color: inherit;
  font-size: 1.5rem !important;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.ub-section-intro {
  max-width: 760px;
  margin-bottom: 2rem;
}

.ub-section-intro p:last-child {
  margin-bottom: 0;
}

.ub-section-title {
  margin-bottom: 0.8rem;
}

.ub-section-lead {
  margin-top: 0;
  max-width: 760px;
  font-size: 1.3rem !important;
}

/* Hero */
.ub-hero {
  position: relative;
  min-height: 520px;
  display: grid;
  align-items: center;
  overflow: hidden;
  background: var(--ub-ink);
}

.ub-hero-media,
.ub-hero-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.ub-hero-media img {
  object-fit: cover;
  object-position: center 44%;
}

.ub-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.83) 0%, rgba(0, 0, 0, 0.67) 42%, rgba(0, 0, 0, 0.20) 72%, rgba(0, 0, 0, 0.04) 100%);
}

.ub-hero-content {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 2rem), var(--ub-content));
  margin-inline: auto;
  padding: 5rem 0;
  color: var(--ub-white);
}

.ub-hero-copy {
  max-width: 680px;
}

.ub-hero-title {
  margin-bottom: 0.5rem;
  color: var(--ub-white);
}

.ub-hero-tagline {
  margin: 0 0 1rem;
  color: var(--ub-white);
  font-size: clamp(1.45rem, 2.8vw, 2rem) !important;
  font-weight: 700;
  line-height: 1.3;
}

.ub-hero-summary {
  max-width: 62ch;
  margin: 0;
  color: var(--ub-white);
  font-size: 1.5rem !important;
}

.ub-accent-line {
  display: block;
  width: 62px;
  height: 5px;
  margin-bottom: 1rem;
  background: var(--ub-high-noon);
}

/* Compact responsive section navigation, positioned directly below hero */
.ub-subnav {
  border-bottom: 1px solid var(--ub-border);
  background: var(--ub-white);
}

.ub-subnav ul {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  width: min(100%, var(--ub-content));
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.ub-subnav li {
  margin: 0;
  font-size: inherit;
}

.ub-subnav a {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 0.75rem;
  border-right: 1px solid var(--ub-border);
  color: var(--ub-ink);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}

.ub-subnav li:first-child a {
  border-left: 1px solid var(--ub-border);
}

.ub-subnav a:hover,
.ub-subnav a:focus-visible {
  background: var(--ub-soft-gray);
  color: var(--ub-cherry);
}

.ub-subnav a[aria-current="page"] {
  background: var(--ub-cherry);
  color: var(--ub-white);
}

/* Shared sections */
.ub-section {
  padding: 4rem 0;
}

.ub-section-soft {
  background: var(--ub-soft-gray);
}

.ub-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.7rem 1rem;
  border: 2px solid var(--ub-cherry);
  background: var(--ub-cherry);
  color: var(--ub-white) !important;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none !important;
}

.ub-button:hover {
  background: var(--ub-white);
  color: var(--ub-cherry) !important;
}

.ub-button-secondary {
  background: var(--ub-white);
  color: var(--ub-cherry) !important;
}

/* Task portal */
.ub-task-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1rem;
}

.ub-task-card {
  min-height: 190px;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 1rem;
  align-content: start;
  padding: 1.5rem;
  border: 1px solid var(--ub-border);
  background: var(--ub-white);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
  color: var(--ub-ink);
}

.ub-task-card:hover {
  border-color: var(--ub-turquoise);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.11);
}

.ub-task-card:nth-child(1),
.ub-task-card:nth-child(2) {
  grid-column: span 3;
}

.ub-task-card:nth-child(n+3) {
  grid-column: span 2;
}

.ub-task-card-primary {
  border-color: var(--ub-cherry);
  background: var(--ub-cherry);
  color: var(--ub-white);
}

.ub-task-icon-wrap {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ub-white);
}

.ub-task-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.ub-task-content {
  min-width: 0;
}

.ub-task-title {
  margin: 0 0 0.35rem;
  color: inherit;
}

.ub-task-copy {
  margin: 0 0 0.8rem;
  color: inherit;
  font-size: 1.5rem !important;
}

.ub-task-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 0.45rem;
  color: var(--ub-turquoise) !important;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
}

.ub-task-card-primary .ub-task-link {
  color: var(--ub-white) !important;
}

.ub-task-card-primary .ub-task-link:focus-visible {
  outline-color: var(--ub-white);
}

/* About */
.ub-about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 3rem;
  align-items: center;
}

.ub-about-image {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

/* Program experience */
.ub-program-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.ub-program-card {
  overflow: hidden;
  border: 1px solid var(--ub-border);
  background: var(--ub-white);
}

.ub-program-card-body {
  padding: 1.5rem;
}

.ub-program-heading {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 1rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.ub-program-icon {
  width: 54px;
  height: 54px;
  object-fit: contain;
}

.ub-program-title {
  margin: 0;
}

.ub-program-copy {
  margin-top: 0;
  font-size: 1.5rem !important;
}

.ub-program-link {
  font-size: 1.5rem;
  font-weight: 700;
}

.ub-program-card > img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

/* Contact band */
.ub-contact-band {
  padding: 3.5rem 0;
  background: var(--ub-turquoise);
  color: var(--ub-white);
}

.ub-contact-band h2,
.ub-contact-band p,
.ub-contact-band a {
  color: var(--ub-white);
}

.ub-contact-header {
  margin-bottom: 2rem;
}

.ub-contact-header p {
  margin-bottom: 0;
}

.ub-contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.ub-contact-item {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 0.9rem;
  align-items: center;
}

.ub-contact-icon-wrap {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ub-white);
}

.ub-contact-icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.ub-contact-label {
  margin: 0 0 0.15rem;
  font-size: 1.5rem !important;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ub-contact-value {
  margin: 0;
  font-size: 1.5rem !important;
}

.ub-contact-value a {
  font-weight: 700;
}

/* Responsive */
@media (max-width: 900px) {
  .ub-subnav ul {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ub-subnav li:nth-child(4) a {
    border-left: 1px solid var(--ub-border);
  }

  .ub-task-card:nth-child(1),
  .ub-task-card:nth-child(2),
  .ub-task-card:nth-child(n+3) {
    grid-column: span 3;
  }

  .ub-about-grid,
  .ub-program-grid {
    grid-template-columns: 1fr;
  }

  .ub-about-grid {
    gap: 2rem;
  }

  .ub-contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .ub-staff-grid {
    grid-template-columns: 1fr;
  }

  .ub-inner,
  .ub-hero-content {
    width: min(calc(100% - 1.25rem), var(--ub-content));
  }

  .ub-hero {
    min-height: 470px;
  }

  .ub-hero::after {
    background: rgba(0, 0, 0, 0.68);
  }

  .ub-hero-content {
    padding: 3.5rem 0;
  }

  .ub-subnav ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ub-subnav li:nth-child(odd) a {
    border-left: 1px solid var(--ub-border);
  }

  .ub-task-grid {
    grid-template-columns: 1fr;
  }

  .ub-task-card:nth-child(1),
  .ub-task-card:nth-child(2),
  .ub-task-card:nth-child(n+3) {
    grid-column: auto;
  }

  .ub-section {
    padding: 3rem 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ub-page *,
  .ub-page *::before,
  .ub-page *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

/* ================================================================
   Interior pages
   Shared by About, Apply, Students & Families, Resources and Contact
   ================================================================ */

.ub-page-header {
  padding: 4.5rem 0;
  background: var(--ub-cherry);
  color: var(--ub-white);
}

.ub-page-header h1,
.ub-page-header p {
  color: var(--ub-white);
}

.ub-page-header h1 {
  margin-bottom: 0.75rem;
}

.ub-page-header .ub-section-lead {
  max-width: 820px;
  margin-bottom: 0;
  font-size: 1.5rem !important;
}

.ub-content-narrow {
  max-width: 850px;
}

.ub-two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 3rem;
  align-items: start;
}

.ub-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.ub-card-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.ub-info-card {
  padding: 1.5rem;
  border: 1px solid var(--ub-border);
  background: var(--ub-white);
}

.ub-info-card h3 {
  margin-bottom: 0.5rem;
}

.ub-info-card p:last-child,
.ub-info-card ul:last-child {
  margin-bottom: 0;
}

.ub-photo-placeholder {
  min-height: 300px;
  display: grid;
  place-items: center;
  padding: 2rem;
  border: 2px dashed var(--ub-silver);
  background: var(--ub-soft-gray);
  color: var(--ub-lobo-gray);
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
}

.ub-photo-placeholder-square {
  min-height: 260px;
  aspect-ratio: 1 / 1;
}

.ub-anchor-section {
  scroll-margin-top: 1rem;
}

.ub-link-list {
  margin: 0;
  padding-left: 1.4rem;
}

.ub-link-list li + li {
  margin-top: 0.65rem;
}

.ub-callout {
  padding: 1.5rem;
  border-left: 6px solid var(--ub-high-noon);
  background: #fff7d6;
  color: var(--ub-ink);
}

.ub-callout h2,
.ub-callout h3 {
  color: var(--ub-ink);
}

.ub-callout p:last-child {
  margin-bottom: 0;
}

.ub-status-box {
  padding: 1.25rem 1.5rem;
  border-left: 6px solid var(--ub-turquoise);
  background: #eef7f8;
}

.ub-status-box p:last-child {
  margin-bottom: 0;
}

.ub-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.ub-button-outline {
  background: var(--ub-white);
  color: var(--ub-cherry) !important;
}

.ub-button-outline:hover {
  background: var(--ub-soft-gray);
}

.ub-steps {
  counter-reset: ub-step;
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ub-steps li {
  counter-increment: ub-step;
  position: relative;
  min-height: 74px;
  padding: 1.2rem 1.25rem 1.2rem 5.25rem;
  border: 1px solid var(--ub-border);
  background: var(--ub-white);
}

.ub-steps li::before {
  content: counter(ub-step);
  position: absolute;
  top: 1.15rem;
  left: 1.25rem;
  width: 2.9rem;
  height: 2.9rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ub-cherry);
  color: var(--ub-white);
  font-size: 1.5rem;
  font-weight: 700;
}

.ub-steps strong {
  display: block;
  margin-bottom: 0.2rem;
}

.ub-form-group {
  padding: 1.5rem;
  border: 1px solid var(--ub-border);
  background: var(--ub-white);
}

.ub-form-group + .ub-form-group {
  margin-top: 1rem;
}

.ub-form-group h3 {
  margin-bottom: 0.5rem;
}

.ub-quick-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.ub-quick-link {
  min-height: 132px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.25rem;
  border: 1px solid var(--ub-border);
  background: var(--ub-white);
  color: var(--ub-ink) !important;
  font-size: 1.5rem;
  font-weight: 700;
  text-decoration: none !important;
}

.ub-quick-link:hover {
  border-color: var(--ub-turquoise);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
}

.ub-quick-link span:last-child {
  color: var(--ub-turquoise);
}

.ub-faq {
  display: grid;
  gap: 0.75rem;
}

.ub-faq details {
  border: 1px solid var(--ub-border);
  background: var(--ub-white);
}

.ub-faq summary {
  cursor: pointer;
  padding: 1.1rem 1.25rem;
  color: var(--ub-ink);
  font-size: 1.5rem;
  font-weight: 700;
}

.ub-faq details[open] summary {
  border-bottom: 1px solid var(--ub-border);
}

.ub-faq-answer {
  padding: 0 1.25rem 1.25rem;
}

.ub-faq-answer p:last-child {
  margin-bottom: 0;
}

.ub-resource-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.ub-resource-card {
  padding: 1.5rem;
  border-top: 5px solid var(--ub-turquoise);
  background: var(--ub-soft-gray);
}

.ub-resource-card h2,
.ub-resource-card h3 {
  margin-bottom: 0.75rem;
}

.ub-resource-card ul {
  margin-bottom: 0;
}

.ub-staff-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.ub-staff-card {
  overflow: hidden;
  border: 1px solid var(--ub-border);
  background: var(--ub-white);
}

.ub-staff-card .ub-photo-placeholder {
  min-height: 280px;
  border: 0;
  border-bottom: 1px solid var(--ub-border);
}

.ub-staff-body {
  padding: 1.5rem;
}

.ub-staff-body h3 {
  margin-bottom: 0.25rem;
}

.ub-staff-title {
  margin-top: 0;
  font-weight: 700;
}

.ub-contact-panel {
  padding: 1.5rem;
  border: 1px solid var(--ub-border);
  background: var(--ub-white);
}

.ub-contact-panel h3 {
  margin-bottom: 0.5rem;
}

.ub-contact-panel p:last-child {
  margin-bottom: 0;
}

@media (max-width: 900px) {
  .ub-two-column,
  .ub-card-grid-3,
  .ub-quick-grid {
    grid-template-columns: 1fr;
  }

  .ub-card-grid,
  .ub-resource-grid {
    grid-template-columns: 1fr;
  }

  .ub-staff-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .ub-page-header {
    padding: 3.25rem 0;
  }

  .ub-actions {
    display: grid;
  }

  .ub-actions .ub-button {
    width: 100%;
  }

  .ub-steps li {
    padding-left: 4.75rem;
  }
}

/* Content photography */
.ub-content-photo {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  align-self: start;
}

.ub-staff-photo {
  display: block;
  width: 67%;
  max-width: 400px;
  height: auto;
  aspect-ratio: 1 / 1;
  margin: 1.25rem auto 0;
  object-fit: cover;
  border: 1px solid var(--ub-border);
}

