/* -------------------------
   SECCIÓN OFERTA ACADÉMICA
   ------------------------- */
.offer {
  background: var(--usb-yellow);
  padding: clamp(64px,8vw,100px) 0 clamp(70px,8vw,100px);
}

.offer-header { margin-bottom: 50px; }
.offer-subtitle { font-size: 12px; text-transform: uppercase; letter-spacing: 2px; color: var(--usb-black); display: block; margin-bottom: 15px; font-weight: 700; }
.offer-header h2 { font-family: var(--font-serif); font-size: 48px; color: var(--usb-black); margin: 0; font-style: italic; font-weight: 400; }

/* Encabezado de la sección Oferta */
.usb-oh { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px 60px; margin-bottom: clamp(36px, 5vw, 64px); }
.usb-oh__main { max-width: 640px; }
/* Título y antetítulo: exactamente el estilo de los demás títulos del home (serif cursiva 48 px; antetítulo 12 px en mayúsculas) */
.usb-oh__label { display: block; margin-bottom: 15px; font-size: 12px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--usb-black); }
.usb-oh h2 { margin: 0; font-family: var(--font-serif); font-size: 48px; font-style: italic; font-weight: 400; line-height: 1.1; color: var(--usb-black); }
.usb-oh h2 em { font-style: inherit; font-weight: inherit; }
.usb-sec--dark .usb-oh h2 { color: #fff; }
.usb-sec--dark .usb-oh__label { color: var(--usb-yellow); }
.usb-sec--dark .usb-oh__lead { color: #d8d8d8; }
.usb-oh__lead { max-width: 52ch; margin: 18px 0 0; font-size: 16px; line-height: 1.6; color: #333; }
.usb-oh__tag {
  position: relative; flex: 0 0 auto; margin: 0 0 6px; padding-left: 30px;
  font-family: var(--font-serif); font-style: italic; font-weight: 500; font-size: clamp(1.5rem, 2.6vw, 2.2rem); line-height: 1.15; color: #000;
}
.usb-oh__tag::before { content: ""; position: absolute; left: 0; top: 2px; bottom: 2px; width: 4px; background: #000; transform: skewX(-14deg); }
.usb-oh__tag span { display: block; }
.usb-oh__tag mark { display: inline-block; margin-top: 8px; padding: 2px 14px 4px; background: #000; color: var(--usb-yellow); font-weight: 700; }
@keyframes usb-oh-line { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (max-width: 860px) {
  .usb-oh { flex-direction: column; align-items: flex-start; }
  .usb-oh__tag { margin-top: 4px; }
}
@media (max-width: 600px) { .usb-oh h2 { font-size: 36px; } }

.offer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 56px 30px;
  align-items: stretch;
  padding-top: 40px; /* sitio para el objeto que sobresale */
}

/* ---------- Tarjeta: recuadro de imagen + tarjeta blanca superpuesta ---------- */
.usb-oc {
  --r: 22px;
  --oc-h: 224px;
  --oc-ov: 40px;
  --ease: cubic-bezier(.23, 1, .32, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  position: relative;
  display: flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
  transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--ty, 0)) scale(var(--sc, 1));
  transition: transform .3s var(--ease), opacity .3s, filter .3s;
  will-change: transform;
  -webkit-tap-highlight-color: transparent;
}
.usb-oc:focus-visible { outline: 3px solid #000; outline-offset: 6px; border-radius: var(--r); }

/* Recuadro de imagen */
.usb-oc__media { position: relative; z-index: 1; display: block; height: var(--oc-h); margin-bottom: calc(var(--oc-ov) * -1); }
.usb-oc__bg {
  position: absolute; inset: 0; overflow: hidden; border-radius: var(--r);
  background: linear-gradient(170deg, #fff 0%, #f6f7fb 70%, #eceff6 100%);
  box-shadow: 0 10px 26px -10px rgba(0, 0, 0, .28);
}
/* Detalles lineales (órbitas finas) + mancha suave amarilla y gris */
.usb-oc__bg::before {
  content: ""; position: absolute; inset: 0; opacity: .9;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 330 224' fill='none' stroke='%2314305f' stroke-width='1.1' stroke-linecap='round'%3E%3Cpath d='M-20 168C40 40 200 -10 350 70' opacity='.35'/%3E%3Cpath d='M-10 200C80 90 230 60 350 150' opacity='.22'/%3E%3Cellipse cx='250' cy='96' rx='120' ry='42' transform='rotate(-24 250 96)' opacity='.28'/%3E%3Cpath d='M20 224C60 150 120 120 200 130' opacity='.2'/%3E%3C/svg%3E") center / cover no-repeat;
  transition: transform .8s var(--ease);
}
.usb-oc__bg::after {
  content: ""; position: absolute; width: 46%; aspect-ratio: 1; left: -10%; bottom: -8%; border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #fff1a0 0%, #ffe04d 70%, #ffd21f 100%); opacity: .9;
  transition: transform .8s var(--ease);
}
.usb-oc:nth-child(even) .usb-oc__bg::before { transform: scaleX(-1); }
.usb-oc:nth-child(even) .usb-oc__bg::after { left: auto; right: -10%; }
.usb-oc:nth-child(3n) .usb-oc__bg::after { bottom: auto; top: -12%; }
.usb-oc__img {
  position: absolute; z-index: 1; display: block; max-width: none;
  left: 2%; width: 96%; top: -15%; height: 96%;
  object-fit: contain; object-position: center bottom;
  filter: drop-shadow(0 14px 14px rgba(10, 31, 69, .16));
  transform-origin: 50% 90%;
  transition: transform .55s var(--spring);
}
.usb-oc--cover .usb-oc__img { inset: 0; width: 100%; height: 100%; top: 0; left: 0; object-fit: cover; border-radius: var(--r); filter: none; }
.usb-oc--cover .usb-oc__bg::before, .usb-oc--cover .usb-oc__bg::after { display: none; }
.usb-oc--noimg { --oc-h: 110px; }

/* Tarjeta blanca */
.usb-oc__body {
  position: relative; z-index: 2; flex: 1; display: flex; flex-direction: column; align-items: flex-start;
  overflow: hidden; border-radius: var(--r); background: #fff;
  padding: 26px 26px 78px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .08), 0 22px 40px -18px rgba(0, 0, 0, .35);
  transition: box-shadow .35s var(--ease);
}
/* Foco de luz amarilla que sigue al cursor */
.usb-oc__body::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 40%), rgba(255, 204, 0, .26), transparent 70%);
}

.usb-oc__icon {
  position: relative; z-index: 1; display: flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; margin-bottom: 18px; border-radius: 50%; font-size: 21px;
  transition: transform .5s var(--spring);
}
.usb-oc__icon--yellow { background: var(--usb-yellow); color: #000; }
.usb-oc__icon--navy { background: #14305f; color: #fff; }
.usb-oc__icon--black { background: #000; color: var(--usb-yellow); }
.usb-oc__icon svg { width: 1em; height: 1em; fill: currentColor; }

.usb-oc h3 { position: relative; z-index: 1; margin: 0 0 14px; font-size: 23px; line-height: 1.15; font-weight: 800; color: #000; }
.usb-oc h3::after {
  content: ""; display: block; width: 40px; height: 4px; margin-top: 14px; background: var(--usb-yellow);
  transition: width .5s var(--ease);
}
.usb-oc p { position: relative; z-index: 1; margin: 0; font-size: 15px; line-height: 1.65; color: #4a4a4a; }

/* Flecha: mismo diseño de siempre (cuadro de 45 px pegado a la esquina, sombra suave, chevron grueso) con los colores nuevos */
.usb-oc__go {
  position: absolute; right: 0; bottom: 0; z-index: 2; display: flex; align-items: center; justify-content: center;
  width: 45px; height: 45px; overflow: hidden; border-radius: 0;
  background: #000; color: #fff;
  box-shadow: 0 5px 15px rgba(0, 0, 0, .12);
  transition: background-color .25s, color .25s;
}
.usb-oc__go svg { width: 20px; height: 20px; stroke-width: 3; }

/* Trazado negro que se dibuja alrededor de la tarjeta */
.usb-oc__stroke { position: absolute; top: -3px; left: -3px; z-index: 0; width: calc(100% + 6px); height: calc(100% + 6px); overflow: visible; pointer-events: none; }
.usb-oc__stroke rect {
  fill: none; stroke: #000; stroke-width: 3; stroke-linecap: round;
  stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .75s var(--ease);
}

/* ---------- Interacción ---------- */
.usb-oc:hover, .usb-oc:focus-visible { --ty: -10px; --sc: 1.035; }
.usb-oc:hover .usb-oc__bg, .usb-oc:focus-visible .usb-oc__bg { box-shadow: 0 16px 34px -10px rgba(0, 0, 0, .4); }
.usb-oc:hover .usb-oc__body, .usb-oc:focus-visible .usb-oc__body { box-shadow: 0 2px 6px rgba(0, 0, 0, .1), 0 30px 50px -18px rgba(0, 0, 0, .5); }
.usb-oc:hover .usb-oc__body::before { opacity: 1; }
.usb-oc:hover .usb-oc__stroke rect, .usb-oc:focus-visible .usb-oc__stroke rect { stroke-dashoffset: 0; }
.usb-oc:hover .usb-oc__img, .usb-oc:focus-visible .usb-oc__img { transform: translateY(-8px) scale(1.08) rotate(-2.5deg); }
.usb-oc--cover:hover .usb-oc__img { transform: scale(1.06); }
.usb-oc:hover .usb-oc__bg::before { transform: scale(1.08) rotate(-1.5deg); }
.usb-oc:nth-child(even):hover .usb-oc__bg::before { transform: scaleX(-1) scale(1.08) rotate(-1.5deg); }
.usb-oc:hover .usb-oc__bg::after { transform: scale(1.25) translate(6%, -6%); }
.usb-oc:hover .usb-oc__icon { transform: rotate(-12deg) scale(1.14); }
.usb-oc:hover h3::after { width: 84px; }
.usb-oc:hover .usb-oc__go, .usb-oc:focus-visible .usb-oc__go { background: var(--usb-yellow); color: #000; }
/* Las demás tarjetas bajan un poco de intensidad para que destaque la activa */
@supports selector(:has(*)) {
  .offer-grid:has(.usb-oc:hover) .usb-oc:not(:hover) { --sc: .975; }
}

@media (max-width: 1024px) {
  .offer-grid { grid-template-columns: 1fr 1fr; gap: 56px 30px; }
}
@media (max-width: 600px) {
  .offer-grid { grid-template-columns: 1fr 1fr; gap: 34px 12px; }
  .offer-header h2 { font-size: 36px; }
  .usb-oc { --oc-h: 118px; --oc-ov: 22px; --r: 14px; }
  .usb-oc__body { padding: 14px 12px 50px; }
  .usb-oc__icon { width: 36px; height: 36px; margin-bottom: 10px; font-size: 15px; }
  .usb-oc h3 { font-size: 16px; margin-bottom: 8px; }
  .usb-oc h3::after { width: 28px; height: 3px; margin-top: 8px; }
  .usb-oc:hover h3::after { width: 50px; }
  .usb-oc p { font-size: 12.5px; line-height: 1.5; }
  .usb-oc__go { width: 36px; height: 36px; }
  .usb-oc__go svg { width: 16px; height: 16px; }
}
/* Táctil: el efecto de pulsación equivale al hover */
@media (hover: none) {
  .usb-oc:active { --ty: -6px; --sc: 1.02; }
  .usb-oc:active .usb-oc__stroke rect { stroke-dashoffset: 0; }
  .usb-oc:active .usb-oc__go svg { animation: arrow-through .38s both; }
  .usb-oc__stroke rect { stroke-dashoffset: 0; stroke-width: 0; } /* sin hover, sin trazado permanente */
  .usb-oc:active .usb-oc__stroke rect { stroke-width: 3; }
}
@media (prefers-reduced-motion: reduce) {
  .usb-oc, .usb-oc * , .usb-oc *::before, .usb-oc *::after { transition-duration: .01s !important; animation: none !important; }
  .usb-oc:hover { --ty: 0; --sc: 1; }
}
