:root{
  /* Colores institucionales */
  --primary: #d0132a;
  --primary-700: #a90f21;

  --bg: #ffffff;
  --card: #ffffff;

  --text: #111827;
  --muted: #6b7280;

  --border: rgba(17,24,39,.12);

  /* Sombras con volumen */
  --shadow-soft: 0 8px 18px rgba(0,0,0,.08);
  --shadow: 0 18px 40px rgba(0,0,0,.14);
  --shadow-press: 0 10px 22px rgba(0,0,0,.12);

  --radius: 18px;
  --radius-sm: 14px;
}

/* ===== Reset ===== */
*{
  box-sizing: border-box;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

html{ scroll-behavior: smooth; }

body{
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

.container{
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ===== Barra institucional superior ===== */
.institutional-bar{
  background: var(--primary);
  color: #ffffff;
  font-size: 13px;
}
.institutional-bar__inner{
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.institutional-bar__left{
  font-weight: 700;
  letter-spacing: .2px;
}
.institutional-bar__right{
  display: flex;
  gap: 14px;
  white-space: nowrap;
}
.institutional-bar__right a{
  color: #ffffff;
  text-decoration: none;
  opacity: .95;
}
.institutional-bar__right a:hover{
  text-decoration: underline;
}

@media (max-width: 680px){
  .institutional-bar__right{ display: none; }
}

/* ===== Header principal ===== */
.topbar{
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.topbar__inner{
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand{
  display: flex;
  align-items: center;
  text-decoration: none;
}
.brand__logo{
  height: 44px;
  width: auto;
}

.nav{
  display: flex;
  gap: 10px;
  align-items: center;
}
.nav__link{
  text-decoration: none;
  color: var(--text);
  font-weight: 800;
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 12px;
  transition: background .15s ease, transform .15s ease;
}
.nav__link:hover{
  background: rgba(0,0,0,.05);
  transform: translateY(-1px);
}
.nav__cta{
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 10px 18px rgba(208,19,42,.22);
}
.nav__cta:hover{
  background: var(--primary-700);
}

/* ===== Hero (título elegante con identidad visual) ===== */
.hero{
  margin-top: 18px;
  padding: 24px;
  border-radius: var(--radius);
  background:
    radial-gradient(900px 260px at 10% 10%, rgba(208,19,42,.18), transparent 60%),
    radial-gradient(900px 260px at 90% 40%, rgba(208,19,42,.08), transparent 60%),
    linear-gradient(180deg, rgba(208,19,42,.05), transparent 70%);
  border: 1px solid rgba(208,19,42,.18);
  box-shadow: 0 18px 40px rgba(0,0,0,.10);
  position: relative;
  overflow: hidden;

  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* línea roja sutil inferior */
.hero::after{
  content: "";
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 14px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    rgba(208,19,42,.85),
    rgba(208,19,42,.25)
  );
  opacity: .9;
  pointer-events: none;
}

/* ===== TÍTULO ELEGANTE (SIN SUBRAYADO) ===== */
.hero__title{
  margin: 0 0 10px 0;
  font-size: clamp(26px, 3vw, 42px);
  letter-spacing: -0.035em;
  line-height: 1.05;
  font-weight: 900;
}

.hero__highlight{
  color: var(--primary);
  font-weight: 900;
  position: static; /* asegura que no haya pseudo-elementos asociados */
}

/* IMPORTANTE: Se eliminó hero__highlight::after (subrayado) */

.hero__subtitle{
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
  max-width: 72ch;
}

.hero__actions{
  display: flex;
  align-items: center;
}

/* buscador */
.search{
  width: min(520px, 92vw);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(208,19,42,.25);
  outline: none;
  background: #ffffff;
  font-size: 14px;
  transition: box-shadow .15s ease, border-color .15s ease;
}
.search:focus{
  border-color: rgba(208,19,42,.6);
  box-shadow: 0 0 0 4px rgba(208,19,42,.14);
}

@media (max-width: 520px){
  .hero{ padding: 18px; }
  .hero__title{ font-size: 28px; }
}

/* ===== Sección y grilla ===== */
.section{
  padding: 16px 0 36px;
}

.grid{
  margin-top: 12px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 480px){
  .grid{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 900px){
  .grid{
    gap: 16px;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }
}

/* ===== Card (Volumen + jerarquía en desktop) ===== */
.card{
  position: relative;
  background: var(--card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  border-bottom: 4px solid var(--primary);
  box-shadow: 0 14px 30px rgba(0,0,0,.18);
  cursor: pointer;
  overflow: hidden;

  transform: translateZ(0);
  transition:
    transform .22s cubic-bezier(.2,.9,.2,1),
    box-shadow .22s cubic-bezier(.2,.9,.2,1),
    border-color .22s ease,
    filter .22s ease;
  will-change: transform, box-shadow;
}

/* “borde” sutil interno para volumen */
.card::before{
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.85);
  pointer-events: none;
}

/* brillo que cruza en hover (solo desktop con mouse) */
.card::after{
  content: "";
  position: absolute;
  top: -60%;
  left: -80%;
  width: 240%;
  height: 220%;
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(255,255,255,.0) 35%,
    rgba(255,255,255,.55) 50%,
    rgba(255,255,255,.0) 65%,
    transparent 100%
  );
  transform: translateX(-30%) rotate(10deg);
  opacity: 0;
  transition: opacity .22s ease, transform .35s cubic-bezier(.2,.9,.2,1);
  pointer-events: none;
}

/* Hover solo en dispositivos con hover real */
@media (hover: hover) and (pointer: fine){
  .card:hover{
    transform: translateY(-6px) scale(1.01);
    box-shadow: var(--shadow);
    border-color: rgba(208,19,42,.35);
    filter: saturate(1.02);
  }

  .card:hover::after{
    opacity: .9;
    transform: translateX(20%) rotate(10deg);
  }

  .card:active{
    transform: translateY(-2px) scale(.995);
    box-shadow: var(--shadow-press);
  }
}

/* ===== Logo grande y uniforme ===== */
.card__media{
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  padding: 10px;
  height: 150px;
  display: grid;
  place-items: center;
}

.card img{
  max-width: 100%;
  max-height: 125px;
  object-fit: contain;
  transition: transform .22s cubic-bezier(.2,.9,.2,1);
}

/* pequeño “pop” del logo en hover */
@media (hover: hover) and (pointer: fine){
  .card:hover img{
    transform: scale(1.04);
  }
}

/* cuerpo */
.card__body{
  padding: 10px 12px 12px;
}
.card__title{
  font-weight: 850;
  font-size: 13px;
  line-height: 1.2;
}
.card__meta{
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
}

/* ===== MODO "solo logo" en móvil (limpio) ===== */
@media (max-width: 480px){
  .grid{ gap: 8px; }

  .card__media{
    height: 140px;
    padding: 10px;
    border-bottom: none;
  }

  .card img{ max-height: 120px; }

  .card__body{ display: none; }
}

/* ===== Accesibilidad: reducir movimiento si el usuario lo pide ===== */
@media (prefers-reduced-motion: reduce){
  .card, .card::after, .nav__link, .card img{
    transition: none !important;
  }
}

/* ===== Footer ===== */
.footer{
  margin-top: 24px;
  border-top: 1px solid var(--border);
  background: #ffffff;
}
.footer__inner{
  padding: 18px 16px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
