/*
 * Components: reusable UI widgets (buttons, cards, menu, form controls).
 * Layout/structure lives in layout.css.
 */

/* ============================ BUTTONS ============================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.7rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  transition: background var(--transition), color var(--transition), transform var(--transition);
}

.btn:hover {
  text-decoration: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn--pill {
  border-radius: var(--radius-pill);
  padding-inline: 1.4rem;
}

.btn--muted {
  background: var(--color-muted);
  color: var(--color-invert);
}

.btn--muted:hover {
  background: color-mix(in srgb, var(--color-muted) 82%, #000);
}

.btn--dark {
  background: var(--color-btn-dark);
  color: var(--color-invert);
  padding-block: 0.85rem;
  transition: transform 250ms ease-out, box-shadow 250ms ease-out, background-color 250ms ease-out;
}

.btn--dark:hover {
  background: color-mix(in srgb, var(--color-btn-dark) 80%, #fff);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.btn--dark:hover .btn__chevron,
.btn--light:hover .btn__chevron {
  transform: translateX(4px);
}

.btn--light {
  background: var(--color-surface);
  color: var(--color-muted);
  border: 1px solid var(--color-surface);
  transition: transform 250ms ease-out, box-shadow 250ms ease-out, background-color 250ms ease-out;
}

.btn--light:hover {
  background: color-mix(in srgb, var(--color-surface) 85%, var(--color-muted));
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.btn--block {
  width: 100%;
}

.btn__chevron {
  margin-left: auto;
  transition: transform 250ms ease-out;
}

/* ============================ PROMO CARD (hero) ============================ */
.promo-card {
  background: rgba(255, 255, 255, 0.71);
  backdrop-filter: blur(3.85px);
  -webkit-backdrop-filter: blur(3.85px);
  border: 1px solid var(--color-invert);
  border-radius: var(--radius-card);
  padding: var(--space-3);
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: var(--space-3);
}

.promo-card__media {
  position: relative;
  display: block;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 7 / 4;
}

.promo-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.promo-card__iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
  object-fit: cover;
}

.promo-card__overlay {
  text-decoration: none;
  cursor: pointer;
}

/* Subtle wash over the image, matching the Figma card. */
.promo-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.09);
  pointer-events: none;
  z-index: 1;
}

.promo-card__play {
  position: absolute;
  inset: 0;
  margin: auto;
  z-index: 2;
  width: var(--space-8);
  height: var(--space-8);
  display: grid;
  place-items: center;
  border-radius: var(--radius-pill);
  background: rgba(0, 0, 0, 0.42);
  color: var(--color-invert);
}

@media (prefers-reduced-motion: reduce) {
  .promo-card__iframe {
    display: none !important;
  }
  .promo-card__play {
    display: grid !important;
  }
}

.promo-card__title {
  margin: 0;
  padding-inline: var(--space-2);
  font-size: var(--fs-lead);
  color: var(--color-text);
}

.promo-card__title p,
.promo-card__title div {
  margin: 0;
}

/* ============================ OFFER CARD (descubre) ============================ */
.offer {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-5);
  border-radius: var(--radius-card);
  background: var(--gradient-card);
  color: var(--color-text);
  transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;
}

.offer:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.offer--blue { background: var(--gradient-card-blue); }
.offer--green { background: var(--gradient-card-green); }

.offer__media {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: var(--space-2);
  background: var(--color-surface-alt);
}

.offer__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.offer__title {
  font-size: var(--fs-h3);
  font-weight: var(--fw-regular);
  line-height: var(--lh-card);
  color: var(--color-text);
}

.offer__kicker,
.offer__kicker p,
.offer__kicker div {
  text-transform: uppercase;
  font-weight: var(--fw-medium);
  font-size: var(--fs-lead);
  color: var(--color-text);
  margin: 0;
}

.offer__text,
.offer__text p,
.offer__text div {
  font-size: var(--fs-sm);
  color: var(--color-text-soft);
  margin: 0;
}

.offer__arrow {
  align-self: flex-end;
  margin-top: auto;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  color: var(--color-ink);
  box-shadow: var(--shadow-soft);
  transition: transform 250ms ease-out, background-color 250ms ease-out, color 250ms ease-out;
}

.offer__arrow:hover {
  background: var(--color-ink);
  color: var(--color-invert);
  transform: translate(2px, -2px);
}

/* ============================ TABS ============================ */
.tab {
  padding: 0.6rem 1.4rem;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--color-text-soft);
  font-size: var(--fs-sm);
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.tab:hover {
  border-color: var(--color-muted);
  color: var(--color-text);
}

.tab.is-active {
  background: #dcebe2;
  border-color: transparent;
  color: var(--color-ink);
}

/* ============================ CÁTEDRA CARD ============================ */
.catedra-card {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--gradient-card-green);
}

.catedra-card__media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 5 / 7;
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}

/* Absolutely fill the cell so the image never dictates the card height. */
.catedra-card__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--color-surface-alt);
}

.catedra-card__label {
  position: absolute;
  top: var(--space-6);
  left: var(--space-6);
  max-width: 12ch;
  color: var(--color-invert);
  font-size: clamp(1.25rem, 1.9vw, 1.75rem);
  line-height: 1.1;
  text-transform: uppercase;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.catedra-card__body {
  padding: clamp(1.5rem, 3vw, 2.75rem);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.catedra-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-5);
}

.catedra-card__name {
  max-width: 13ch;
  min-width: 0;
  font-size: clamp(2rem, 3.4vw, 3.4rem);
  font-weight: var(--fw-regular);
  line-height: var(--lh-card);
  color: var(--color-ink);
}

.catedra-card__uni-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-2);
  flex: 0 0 auto;
  max-width: 100%;
  text-align: right;
}

.catedra-card__since {
  font-size: var(--fs-sm);
  color: var(--color-text-soft);
  overflow-wrap: break-word;
}

.catedra-card__uni {
  height: 46px;
  width: auto;
}

.catedra-card__desc {
  font-size: 14px;
  color: var(--color-text-soft);
  max-width: 62ch;
}

.team {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  margin-top: var(--space-2);
  -webkit-mask-image: linear-gradient(90deg, #000 76%, transparent 100%);
  mask-image: linear-gradient(90deg, #000 76%, transparent 100%);
}

.team__member img {
  width: 100%;
  height: auto;
  aspect-ratio: 10 / 11;
  object-fit: cover;
  object-position: 50% 25%;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-2);
  background: var(--color-surface-alt);
}

.team__name {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--color-ink);
  line-height: 1.2;
}

.team__role {
  font-size: var(--fs-sm);
  color: var(--color-text-soft);
}

.catedra-card__cta {
  margin-top: auto;
  display: flex;
  justify-content: flex-end;
}

/* ============================ FEATURE CARD (desarrollo) ============================ */
.feature {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.feature__media {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  column-gap: var(--space-4);
  padding: var(--space-4) var(--space-4) var(--space-4) var(--space-5);
  aspect-ratio: 5 / 7;
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--color-surface-alt);
}

.feature__media img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: cover;
  -webkit-user-drag: none;
  user-select: none;
}

.feature__media::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0) 38%);
}

.feature__label {
  position: relative;
  z-index: 2;
  min-width: 0;
  max-width: 100%;
  padding-top: var(--space-2);
  color: var(--color-invert);
  font-size: var(--fs-lead);
  line-height: var(--lh-label);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: break-word;
  word-break: normal;
}

.feature__label p,
.feature__label div {
  margin: 0;
  min-width: 0;
  white-space: normal;
  overflow-wrap: break-word;
}

@media (max-width: 1180px) {
  .feature__label {
    font-size: clamp(0.9375rem, 1.25vw, 1.125rem);
  }
}

@media (max-width: 640px) {
  .feature__label {
    font-size: clamp(1rem, 4.2vw, 1.125rem);
  }
}

.feature__arrow {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  color: var(--color-ink);
  text-decoration: none;
  transition: transform 250ms ease-out, background-color 250ms ease-out, color 250ms ease-out;
}

a.feature__arrow {
  cursor: pointer;
}

a.feature__arrow:hover {
  background: var(--color-ink);
  color: var(--color-invert);
  transform: translate(2px, -2px) scale(1.05);
}

a.feature__arrow:focus-visible {
  outline: 2px solid var(--color-invert);
  outline-offset: 3px;
}

.feature__arrow--inert,
span.feature__arrow {
  cursor: default;
  pointer-events: none;
  opacity: 0.7;
}

.feature__text {
  font-size: var(--fs-sm);
  color: var(--color-text-soft);
}

/* ============================ TESTIMONIAL CARD ============================ */
.testi-card__figure {
  position: relative;
  margin: 0;
  aspect-ratio: 300 / 470;
  border-radius: var(--radius-card);
  overflow: hidden;
  background: #0c0f10;
}

.testi-card--neutral,
.testi-card__figure--neutral {
  background: #0c0f10;
}

.testi-card__poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.testi-card__play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.55);
  color: var(--color-invert);
  backdrop-filter: blur(2px);
  transition: transform 250ms ease-out, background 250ms ease-out;
  z-index: 2;
  cursor: pointer;
}

.testi-card__play:hover {
  background: rgba(255, 255, 255, 0.36);
  transform: scale(1.08);
}

.testi-card__figure figcaption {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--space-4);
  color: var(--color-invert);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 32%, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.7) 100%);
  pointer-events: none;
}

.testi-card__quote {
  margin: 0;
  margin-top: auto;
  font-size: var(--fs-sm);
  font-style: italic;
  font-weight: var(--fw-normal, 400);
  line-height: 1.4;
  color: var(--color-invert);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
  z-index: 1;
  pointer-events: auto;
}

.testi-card__quote p,
.testi-card__quote div {
  margin: 0;
  display: inline;
}

.testi-card__person {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: 0;
  position: relative;
  z-index: 1;
  pointer-events: auto;
}

.testi-card__avatar {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-pill);
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.85);
}

.testi-card__name {
  display: block;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
}

.testi-card__org {
  display: block;
  font-size: 0.75rem;
  opacity: 0.8;
}

/* ============================ VIDEO MODAL ============================ */
.video-modal {
  padding: 0;
  border: none;
  border-radius: var(--radius-lg);
  background: transparent;
  max-width: min(90vw, 960px);
  width: 100%;
  margin: auto;
  overflow: visible;
}

.video-modal::backdrop {
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(6px);
}

.video-modal[open] {
  display: block;
}

.video-modal:not([open]) {
  display: none;
}

.video-modal__content {
  position: relative;
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

.video-modal__close {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-pill);
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  cursor: pointer;
  transition: background 200ms ease-out, transform 200ms ease-out;
  z-index: 20;
}

.video-modal__close:hover {
  background: rgba(0, 0, 0, 0.9);
  transform: scale(1.08);
}

.video-modal__player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.video-modal__player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ============================ NEWSLETTER FORM ============================ */
.newsletter__kicker {
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--color-text-soft);
  font-size: var(--fs-sm);
}

.field__label {
  display: block;
  margin-bottom: var(--space-2);
  font-size: var(--fs-sm);
  color: var(--color-text);
}

.field__row {
  display: flex;
  gap: var(--space-3);
}

.field__input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-ink);
  transition: border-color 200ms ease-out, box-shadow 200ms ease-out;
}

.field__input:focus {
  outline: none;
  border-color: var(--color-ink);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}

.field__input::placeholder {
  color: var(--color-text-soft);
  opacity: 0.7;
}

.consent-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.consent-group .checkbox,
.consent-group .about-contact__privacy,
.consent-group .training-enroll-modal__checkbox-row {
  margin-top: 0;
  margin-bottom: 0;
}

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  font-size: 0.75rem;
  color: var(--color-text-soft);
}

.checkbox input {
  margin-top: 0.15rem;
}

.checkbox a {
  text-decoration: underline;
  text-underline-offset: 2px;
  color: inherit;
  transition: color 200ms ease-out, text-underline-offset 200ms ease-out;
}

.checkbox a:hover {
  color: var(--color-ink);
  text-underline-offset: 4px;
}

/* ============================ MENU ============================ */
.header-user-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 150px;
  height: 40px;
  padding: 3.74px 10px 3.74px 3.74px;
  border: 1px solid #8a9091;
  border-radius: 22px;
  background: var(--color-surface);
  text-decoration: none;
  box-sizing: border-box;
  transition: border-color var(--transition), background-color var(--transition);
}

.header-user-btn:hover {
  text-decoration: none;
  border-color: var(--color-ink);
  background-color: var(--color-surface-alt);
}

.header-user-btn:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

.header-user-btn__avatar {
  width: 32.5px;
  height: 32.5px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}

.header-user-btn__info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
  text-align: left;
}

.header-user-btn__name {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: var(--fw-regular);
  line-height: 1.15;
  color: #000000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.header-user-btn__sub {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: var(--fw-regular);
  line-height: 1.15;
  color: #949494;
  white-space: nowrap;
  display: block;
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 133px;
  height: 40px;
  padding: 0 16px;
  border: 1px solid #8a9091;
  border-radius: 22px;
  background: var(--color-surface);
  color: #484c4d;
  cursor: pointer;
  box-sizing: border-box;
  transition: border-color var(--transition), background-color var(--transition);
}

.menu-toggle:hover {
  border-color: var(--color-ink);
  background-color: var(--color-surface-alt);
}

.menu-toggle:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

.menu-toggle__label {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 13px;
  line-height: 1;
  letter-spacing: 0;
  color: #484c4d;
}

.menu-toggle__icon {
  display: inline-grid;
  gap: 4px;
  width: 20px;
  color: #484c4d;
}

.menu-toggle__icon span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform var(--transition), opacity var(--transition);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__icon span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__icon span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__icon span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Full-height slide-in drawer with a dimmed backdrop. */
.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  justify-content: flex-end;
  background: rgba(38, 48, 47, 0.4);
  animation: overlay-in var(--transition);
}

.menu-overlay[hidden] {
  display: none;
}

@keyframes overlay-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.menu-drawer {
  width: min(527px, 100%);
  height: 100%;
  overflow-y: auto;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  background: linear-gradient(180deg, #d4dde3 0%, #d9e7e5 55%, #e6f2ec 100%);
  animation: drawer-in var(--transition);
}

@keyframes drawer-in {
  from { transform: translateX(24px); }
  to { transform: none; }
}

.menu-drawer__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.55);
}

.lang-toggle button,
.lang-toggle a {
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--color-muted);
  text-decoration: none;
}

.lang-toggle button.is-active,
.lang-toggle a.is-active {
  background: var(--color-muted);
  color: var(--color-invert);
}

.menu-close {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--color-muted);
  border-radius: var(--radius-sm);
  color: #484c4d;
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
}

.menu-drawer__nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.menu-drawer__nav a,
.menu-drawer__nav .menu-drawer__nav-item--pending {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  width: fit-content;
  font-size: clamp(1.75rem, 5.2vw, 2.5rem);
  line-height: 1.12;
  color: #484c4d;
}

.menu-drawer__nav .menu-drawer__nav-item--pending {
  cursor: default;
  opacity: 0.7;
}

.menu-drawer__nav a:hover {
  color: var(--color-ink);
  text-decoration: none;
}

.menu-drawer__foot {
  margin-top: auto;
  display: grid;
  gap: var(--space-5);
}

.menu-drawer__heading {
  margin-bottom: var(--space-2);
  text-transform: uppercase;
  font-size: var(--fs-lead);
  font-weight: var(--fw-medium);
  color: #484c4d;
}

.menu-drawer__contact {
  display: grid;
  gap: 2px;
  font-style: normal;
  font-size: var(--fs-sm);
  color: var(--color-text);
}

.menu-social {
  display: flex;
  gap: var(--space-3);
}

.menu-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-muted);
  color: #484c4d;
  transition: background var(--transition), color var(--transition);
}

.menu-social a:hover {
  background: var(--color-muted);
  color: var(--color-invert);
}

.menu-social .social__icon {
  width: 18px;
  height: 18px;
}

.menu-drawer__legal {
  font-size: var(--fs-sm);
  color: var(--color-text-soft);
}

.menu-drawer__legal a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition);
}

.menu-drawer__legal a:hover {
  color: var(--color-text);
  text-decoration: underline;
}

/* ============================ FLASH MESSAGES & TOASTS ============================ */
.flash-container {
  width: 100%;
  max-width: var(--container-width, 1200px);
  margin-inline: auto;
  padding-inline: var(--gutter, 1.25rem);
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.flash-message {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md, 10px);
  font-size: var(--fs-sm, 0.875rem);
  font-weight: var(--fw-medium, 500);
  line-height: 1.45;
  margin-bottom: 1rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
  box-sizing: border-box;
  overflow: hidden;
  max-height: 140px;
  opacity: 1;
  transform: translateY(0) scale(1);
  transition:
    opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    margin 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    padding 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.flash-message[hidden] {
  display: none !important;
}

/* Entry Animation */
.flash-enter {
  opacity: 0 !important;
  transform: translateY(-10px) scale(0.97) !important;
  max-height: 0 !important;
  margin-bottom: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.flash-enter-active {
  opacity: 1;
  transform: translateY(0) scale(1);
  max-height: 140px;
  margin-bottom: 1rem;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

/* Exit / Dispose Animation */
.flash-exit-active {
  opacity: 0 !important;
  transform: translateY(-8px) scale(0.96) !important;
  max-height: 0 !important;
  margin-bottom: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  pointer-events: none;
}

/* Content wrapper with icon & text */
.flash-message__content {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex: 1;
  min-width: 0;
}

.flash-message__icon {
  flex-shrink: 0;
}

.flash-message__text {
  flex: 1;
  word-break: break-word;
}

/* Dismiss Close Button */
.flash-close-btn {
  background: transparent;
  border: none;
  color: currentColor;
  opacity: 0.55;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  flex-shrink: 0;
  transition: opacity 0.2s ease, background-color 0.2s ease, transform 0.15s ease;
}

.flash-close-btn:hover {
  opacity: 1;
  background-color: rgba(0, 0, 0, 0.07);
}

.flash-close-btn:active {
  transform: scale(0.92);
}

/* Color Variants */
.flash-message--success,
.alert--success {
  background: #e6f7f4;
  border: 1px solid #a3e6d8;
  color: #0d6855;
}

.flash-message--danger,
.flash-message--error,
.alert--danger {
  background: #fdf2f2;
  border: 1px solid #f8b4b4;
  color: #9b1c1c;
}

.flash-message--warning,
.alert--warning {
  background: #fdf6b2;
  border: 1px solid #faca15;
  color: #723b13;
}

.flash-message--info,
.alert--info {
  background: #e1effe;
  border: 1px solid #a4cafe;
  color: #1e429f;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  .flash-message {
    transition: opacity 0.15s linear !important;
    transform: none !important;
  }
  .flash-enter {
    transform: none !important;
  }
  .flash-exit-active {
    transform: none !important;
  }
}

/* ==========================================================================
   Instructor Profile Modals (Committee Panel & External Dialog)

   Z-Index Hierarchy:
   - Header: .header (z-index: 50, sticky)
   - Footer: .site-footer (z-index: 50, relative)
   - Profile Overlays: .instructor-panel-overlay, .instructor-dialog-overlay (z-index: 100, fixed)

   While open, the full-viewport committee panel (width: 100vw, height: 100dvh)
   and external modal sit above the sticky header and footer (z-index: 100 > 50).
   When closed and removed from the DOM, the header and footer remain intact and
   functional without any style leaks.
   ========================================================================== */

:root {
  --panel-photo-zoom: 1.14;
}

/* Focus indicator for keyboard navigation on instructor cards */
[data-controller="instructor-card"] {
  cursor: pointer;
}

[data-controller="instructor-card"]:focus-visible {
  outline: 2px solid var(--color-muted, #939b9c);
  outline-offset: 4px;
}

/* Photo settle animation for committee panel right photo */
@keyframes instructorPhotoSettle {
  from {
    transform: scale(var(--panel-photo-zoom, 1.14));
  }
  to {
    transform: scale(1);
  }
}

/* --------------------------------------------------------------------------
   Committee Mode: Full-Viewport Split Panel with Mouse-Following Close Cursor
   -------------------------------------------------------------------------- */
.instructor-panel-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  z-index: 100;
  background: var(--color-surface, #ffffff);
  cursor: none;
  overflow: hidden;
  opacity: 1;
  transform: translateX(100%);
  transition: transform 1.1s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  outline: none;
}

.instructor-panel-overlay.is-open {
  transform: translateX(0);
}

.instructor-panel-overlay.is-closing {
  transform: translateX(100%);
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.instructor-panel {
  outline: none;
}

.instructor-panel__close-cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(17, 19, 20, 0.85);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  will-change: transform;
}

.instructor-panel__content {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
}

.instructor-panel__left {
  padding: clamp(2.5rem, 6vw, 6rem);
  overflow-y: auto;
  height: 100%;
  box-sizing: border-box;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.instructor-panel__left::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.instructor-panel__right {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  aspect-ratio: 7 / 9;
  position: relative;
  overflow: hidden;
  background: #111416;
}

.instructor-panel__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 25%;
  display: block;
}

.instructor-panel__photo--settle {
  transform: scale(var(--panel-photo-zoom, 1.14));
}

.instructor-panel-overlay.is-open .instructor-panel__photo--settle {
  animation: instructorPhotoSettle 3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  will-change: transform;
}

/* --------------------------------------------------------------------------
   External Mode: Centered Modal Dialog with Blurred Backdrop
   -------------------------------------------------------------------------- */
.instructor-dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 1.5rem;
  box-sizing: border-box;
  opacity: 0;
  transition: opacity 0.25s ease-out;
}

.instructor-dialog-overlay.is-open {
  opacity: 1;
}

.instructor-dialog-overlay.is-closing {
  opacity: 0;
}

.instructor-dialog {
  position: relative;
  width: 100%;
  max-width: 860px;
  height: min(80vh, 620px);
  max-height: 80vh;
  background: var(--color-surface, #ffffff);
  border-radius: var(--radius-card, 16px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  box-sizing: border-box;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: scale(0.96);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
}

.instructor-dialog--fixed {
  height: min(80vh, 620px);
  max-height: 80vh;
}

.instructor-dialog-overlay.is-open .instructor-dialog {
  transform: scale(1);
}

.instructor-dialog-overlay.is-closing .instructor-dialog {
  transform: scale(0.96);
}

.instructor-dialog__close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 20;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.9);
  color: #4b4b4b;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.instructor-dialog__close:hover {
  transform: scale(1.06);
  background: #ffffff;
  color: #000000;
}

.instructor-dialog__content {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  grid-template-rows: 100%;
  height: 100%;
  flex: 1 1 auto;
  overflow: hidden;
}

.instructor-dialog__left {
  padding: clamp(1.75rem, 3.5vw, 3rem);
  overflow-y: auto;
  height: 100%;
  box-sizing: border-box;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.instructor-dialog__left::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.instructor-dialog__right {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  aspect-ratio: 1080 / 1316;
  position: relative;
  overflow: hidden;
  background: transparent;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
}

.instructor-dialog__image-col--fixed {
  width: 100%;
  height: 100%;
}

.instructor-dialog__right--inset {
  padding: 14px;
}

.instructor-dialog__right--inset .instructor-dialog__photo {
  border-radius: 12px;
}

.instructor-dialog__photo {
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: cover;
  object-position: 50% 25%;
  background: var(--color-surface-alt);
  display: block;
}

/* --------------------------------------------------------------------------
   Hidden Scrollbar Utilities & Consistent Scroll Regions
   -------------------------------------------------------------------------- */
.instructor-profile__scroll-region--hidden-scrollbar,
.instructor-dialog__scroll--hidden-scrollbar {
  scrollbar-width: none;
  -ms-overflow-style: none;
  overscroll-behavior: contain;
}

.instructor-profile__scroll-region--hidden-scrollbar::-webkit-scrollbar,
.instructor-dialog__scroll--hidden-scrollbar::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

/* --------------------------------------------------------------------------
   Shared Profile Typography
   -------------------------------------------------------------------------- */
.instructor-profile__overline {
  font-family: var(--font-sans);
  font-size: var(--fs-label, 0.875rem);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide, 0.04em);
  color: var(--color-muted, #939b9c);
  font-weight: var(--fw-semibold, 600);
  margin: 0 0 var(--space-2, 0.5rem) 0;
}

.instructor-profile__title {
  font-family: var(--font-sans);
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: var(--fw-semibold, 600);
  color: var(--color-ink, #2b2d2e);
  margin: 0 0 var(--space-5, 1.5rem) 0;
  line-height: var(--lh-snug, 1.15);
}

.instructor-profile__body {
  font-family: var(--font-sans);
  font-size: var(--fs-body, 1rem);
  line-height: var(--lh-normal, 1.5);
  color: var(--color-text, #565656);
}

.instructor-profile__body p {
  margin: 0 0 var(--space-4, 1rem) 0;
}

.instructor-profile__body p:last-child {
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Responsive Layout (Mobile/Tablet)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .instructor-panel__content,
  .instructor-dialog__content {
    grid-template-columns: 1fr;
    display: flex;
    flex-direction: column-reverse;
    height: 100%;
  }

  .instructor-panel__right {
    width: 100%;
    height: clamp(240px, 56.25vw, 440px);
    aspect-ratio: 16 / 9;
    flex-shrink: 0;
  }

  .instructor-panel__photo {
    object-position: center 25%;
  }

  .instructor-panel__left {
    padding: 1.5rem;
    height: calc(100dvh - clamp(240px, 56.25vw, 440px));
    flex: 1 1 auto;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
  }

  .instructor-dialog,
  .instructor-dialog--fixed {
    max-width: 440px;
    height: min(90vh, 720px);
    max-height: 90vh;
  }

  .instructor-dialog__right,
  .instructor-dialog__image-col--fixed {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 5;
    max-height: 50vh;
    min-width: 0;
    min-height: 0;
    flex-shrink: 0;
  }

  .instructor-dialog__right--inset {
    padding: 10px;
  }

  .instructor-dialog__photo {
    width: 100%;
    max-width: 100%;
    height: 100%;
    margin: 0;
    min-width: 0;
    min-height: 0;
    object-fit: cover;
    object-position: 50% 25%;
  }

  .instructor-dialog__left {
    height: auto;
    max-height: none;
    flex: 1 1 0%;
    min-width: 0;
    min-height: 0;
    padding: 1.5rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
  }
}

/* --------------------------------------------------------------------------
   Touch Device & Reduced Motion Overrides
   -------------------------------------------------------------------------- */
@media (pointer: coarse) {
  .instructor-panel__close-cursor {
    display: none !important;
  }

  .instructor-panel-overlay,
  .instructor-panel {
    cursor: auto !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .instructor-panel-overlay,
  .instructor-panel,
  .instructor-dialog-overlay,
  .instructor-dialog {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }

  .instructor-panel-overlay.is-open .instructor-panel__photo--settle,
  .instructor-panel__photo--settle {
    animation: none !important;
    transform: none !important;
  }

  .instructor-panel__close-cursor {
    display: none !important;
  }

  .instructor-panel-overlay,
  .instructor-panel {
    cursor: auto !important;
  }
}


