/* ==========================================================
   Rediseño 14ª edición (se carga el último; todo cuelga de body.r14)
   Para volver al aspecto anterior basta quitar class="r14" del <body>.
   ========================================================== */
@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url(../fonts/barlow-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600 700; font-display: swap; src: url(../fonts/barlow-latin-600-normal.woff2) format("woff2"); }

body.r14 {
  --r-navy: #06245c; --r-deep: #041a44; --r-blue: #1f6fd0; --r-sky: #eaf2fb; --r-paper: #f5f8fc;
  --r-yellow: #ffd21f; --r-red: #c8102e; --r-ink: #16233a; --r-muted: #55647a; --r-line: #d6e0ec;
  --r-display: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;
  --r-body: "Barlow", "Segoe UI", Arial, sans-serif;
  --r-radius: 14px;
  --r-pad: clamp(20px, 6vw, 110px);
  background: var(--r-paper); color: var(--r-ink);
}
html { scroll-behavior: smooth; }
body.r14 *:not(.fa):not(.fas):not(.far):not(.fab):not([class^="fa-"]) { font-family: var(--r-body); }
body.r14 main { margin-bottom: 0; overflow-x: clip; }
body.r14 main > .container-fluid { padding-left: 0; padding-right: 0; }
body.r14 main > .container-fluid > .row,
body.r14 main > .container-fluid > #ganadores_div { margin-left: 0; margin-right: 0; }

/* anclas: el menú fijo mide 100px */
body.r14 #bienvenida, body.r14 #bases, body.r14 #inscripcion, body.r14 #material,
body.r14 #misiones, body.r14 #contacta, body.r14 #ganadores_div, body.r14 #info {
  top: 0; padding-top: 0; scroll-margin-top: 100px;
}
body.r14 #historico, body.r14 #mapa { scroll-margin-top: 120px; }

/* ---------- títulos y textos de sección ---------- */
body.r14 main h1 { font-family: var(--r-display); font-weight: 700; text-transform: uppercase; color: var(--r-navy); font-size: clamp(34px, 3.6vw, 54px); line-height: 1; letter-spacing: 0; margin: 0 0 18px; text-wrap: balance; }
body.r14 main .blue-line { width: 64px; height: 6px; border: 0; border-radius: 3px; margin: 0 auto 20px; background: linear-gradient(90deg, var(--r-red) 0 25%, var(--r-yellow) 25% 75%, var(--r-red) 75% 100%); }
body.r14 #bases p, body.r14 #material p, body.r14 #contacta p { font-size: 17px; line-height: 1.6; color: var(--r-ink); padding-top: 0; text-align: left; }
body.r14 a:focus-visible, body.r14 button:focus-visible, body.r14 select:focus-visible { outline: 3px solid var(--r-yellow); outline-offset: 3px; }

.r14-btn { display: inline-block; padding: 14px 28px; border-radius: 4px; background: var(--r-yellow); color: var(--r-navy); font-weight: 700; font-size: 17px; text-decoration: none; box-shadow: 0 6px 18px rgba(0,0,0,.22); transition: transform .15s ease, box-shadow .15s ease; overflow-wrap: anywhere; }
.r14-btn:hover { color: var(--r-navy); text-decoration: none; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,.28); }

/* ---------- cabecera ---------- */
body.r14 header.fixed-top { transition: box-shadow .25s ease; }
body.r14 header.fixed-top.r14-scrolled { box-shadow: 0 6px 24px rgba(4,26,68,.22); }
body.r14 header .right-menu { background-image: url(../../img/bg-header-14.svg); }
body.r14 header ul li a.nav-link { font-family: var(--r-body) !important; font-weight: 600; font-size: 15px; border-bottom: 0; position: relative; padding-bottom: 6px; }
body.r14 header nav#desktop ul li a.nav-link::after { content: ""; position: absolute; left: .5rem; right: .5rem; bottom: 0; height: 3px; border-radius: 2px; background: var(--r-yellow); transform: scaleX(0); transform-origin: left; transition: transform .2s ease; }
body.r14 header nav#desktop ul li a.nav-link:hover::after, body.r14 header nav#desktop ul li a.nav-link:focus-visible::after { transform: scaleX(1); }
body.r14 header ul li a.nav-link:hover { border-bottom: 0; }
body.r14 header button.navbar-toggler { background: var(--r-yellow); color: var(--r-navy); border-radius: 6px; padding: 8px 12px; }
body.r14 header button .linea-hamburguesa { background-color: var(--r-navy) !important; }
body.r14 header button.navbar-toggler p { color: var(--r-navy); font-weight: 600; }
body.r14 #navbarSupportedContent { background: var(--r-navy); padding: 8px 20px 18px; box-shadow: 0 14px 28px rgba(4,26,68,.3); }
body.r14 #navbarSupportedContent ul li { height: auto; }
body.r14 #navbarSupportedContent ul li a.nav-link { display: block; padding: 12px 0; font-size: 17px; border-bottom: 1px solid rgba(255,255,255,.16); }
@media (max-width: 1410px) { body.r14 header ul li a.nav-link { font-size: 14px; } }
@media (max-width: 1100px) { body.r14 header nav#desktop ul li a.nav-link { font-size: 13px; } }

/* ---------- portada: ola y entrada ---------- */
body.r14 .hero14-a .hero14-in::after {
  content: ""; position: absolute; z-index: 1; left: 0; bottom: -1px; width: 200%; height: clamp(22px, 3.2vw, 46px);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 46' preserveAspectRatio='none'%3E%3Cpath fill='%23f5f8fc' d='M0 24c100-22 200-22 300 0s200 22 300 0 200-22 300 0 200 22 300 0v22H0z'/%3E%3C/svg%3E") repeat-x left bottom / 50% 100%;
  animation: r14-ola 14s linear infinite;
}
body.r14 #bienvenida.hero14-a .hero14-credit { bottom: clamp(26px, 3.6vw, 52px); }
body.r14 .hero14-a .hero14-txt { padding-bottom: clamp(70px, 7vw, 96px); }
@keyframes r14-ola { to { transform: translateX(-50%); } }
@keyframes r14-sube { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
body.r14 .hero14 .hero14-txt > * { animation: r14-sube .7s cubic-bezier(.2,.7,.2,1) both; }
body.r14 .hero14 .hero14-txt > *:nth-child(2) { animation-delay: .12s; }
body.r14 .hero14 .hero14-txt > *:nth-child(3) { animation-delay: .26s; }
body.r14 .hero14 .hero14-txt > *:nth-child(4) { animation-delay: .4s; }
body.r14 .hero14 .hero14-cta { align-items: center; }
body.r14 .hero14 .hero14-btn, body.r14 .hero14 .hero14-link { font-family: var(--r-body); }

/* ---------- aparición al hacer scroll (la activa rebrand-14.js) ---------- */
.r14-reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); transition-delay: var(--r14-d, 0s); }
.r14-reveal.r14-in { opacity: 1; transform: none; }

/* ---------- inscripción ---------- */
body.r14 #inscripcion { background: var(--r-paper); }
body.r14 #inscripcion .bg-image { background: none; height: auto; padding: clamp(48px, 6vw, 88px) var(--r-pad) clamp(56px, 6vw, 96px); }
body.r14 #inscripcion .icono-inscripcion { display: none; }
body.r14 #inscripcion .bg-image > div.info-container { background: none; max-width: 1180px; margin: 0 auto; }
body.r14 #inscripcion .info-container .subtitle { background: none; padding: 0; box-shadow: none; font-size: 19px; line-height: 1.55; letter-spacing: 0; color: var(--r-muted); max-width: 46em; margin: 0 auto; }
body.r14 #inscripcion .subtitle span { color: var(--r-red); }
body.r14 #inscripcion button { background: var(--r-yellow); color: var(--r-navy); border-radius: 4px; font-weight: 700; font-size: 17px; margin: 28px 0 0; }
body.r14 #inscripcion button a, body.r14 #inscripcion a button { color: var(--r-navy); }
.r14-pasos { list-style: none; counter-reset: paso; margin: clamp(32px, 4vw, 56px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; text-align: left; }
.r14-pasos li { counter-increment: paso; position: relative; background: #fff; border-radius: var(--r-radius); padding: 26px 22px 24px; box-shadow: 0 1px 0 var(--r-line), 0 12px 30px rgba(6,36,92,.07); border-top: 5px solid var(--r-blue); transition: transform .2s ease, box-shadow .2s ease; }
.r14-pasos li:hover { transform: translateY(-4px); box-shadow: 0 1px 0 var(--r-line), 0 18px 36px rgba(6,36,92,.13); }
.r14-pasos li::before { content: counter(paso); display: block; font-family: "Barlow Condensed", "Arial Narrow", Arial, sans-serif; font-weight: 700; font-size: 58px; line-height: .9; color: var(--r-blue); margin-bottom: 12px; }
.r14-pasos li:nth-child(2) { border-top-color: var(--r-yellow); } .r14-pasos li:nth-child(2)::before { color: #c79a00; }
.r14-pasos li:nth-child(3) { border-top-color: var(--r-red); } .r14-pasos li:nth-child(3)::before { color: var(--r-red); }
.r14-pasos li:nth-child(4) { border-top-color: var(--r-navy); } .r14-pasos li:nth-child(4)::before { color: var(--r-navy); }
.r14-pasos strong { display: block; font-family: "Barlow Condensed", "Arial Narrow", Arial, sans-serif !important; font-weight: 700; font-size: 25px; line-height: 1.1; color: var(--r-navy); margin-bottom: 8px; }
.r14-pasos span { display: block; font-size: 16px; line-height: 1.5; color: var(--r-ink); }
@media (max-width: 991px) { .r14-pasos { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .r14-pasos { grid-template-columns: 1fr; } .r14-pasos li { display: grid; grid-template-columns: 52px 1fr; column-gap: 12px; padding: 20px 18px; } .r14-pasos li::before { grid-row: span 2; font-size: 52px; margin: 0; } }

/* ---------- bases ---------- */
body.r14 #bases { background: #fff; padding: clamp(48px, 6vw, 96px) var(--r-pad); align-items: center; row-gap: 36px; }
body.r14 #bases .title { padding-left: 15px; }
body.r14 #bases .blue-line { margin-left: 0; }
body.r14 #bases .title h1, body.r14 #contacta h1 { text-align: left; }
body.r14 #bases .image-container { display: flex; align-items: center; gap: 18px; text-align: left; margin-top: 26px; padding: 14px 18px 14px 14px; border: 2px solid var(--r-line); border-radius: var(--r-radius); text-decoration: none; transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease; }
body.r14 #bases .image-container:hover { border-color: var(--r-blue); transform: translateY(-3px); box-shadow: 0 14px 30px rgba(6,36,92,.12); }
body.r14 #bases .image-container img { width: 84px; max-width: 84px; margin: 0; border-radius: 4px; box-shadow: 0 4px 12px rgba(6,36,92,.25); }
body.r14 #bases .image-container p { font-size: 19px; font-weight: 700; color: var(--r-navy); text-align: left; margin: 0; }
body.r14 #bases .image-container p::after { content: "PDF"; display: block; font-size: 14px; font-weight: 600; color: var(--r-muted); margin-top: 2px; }
body.r14 .r14-premios h2 { font-family: var(--r-display); font-weight: 700; font-size: 26px; color: var(--r-navy); margin: 0 0 12px; }
body.r14 .r14-premios img { border-radius: var(--r-radius); box-shadow: 0 18px 44px rgba(6,36,92,.14); width: 100%; }
@media (min-width: 768px) { body.r14 .r14-premios { padding-left: clamp(15px, 4vw, 64px); } }

/* ---------- material ---------- */
body.r14 #material { background: var(--r-sky); padding: clamp(48px, 6vw, 96px) var(--r-pad); }
body.r14 #material .title > p { text-align: center; max-width: 44em; margin: 0 auto 8px; color: var(--r-muted); }
body.r14 #material .title > .row { max-width: 1080px; margin: 28px auto 0; row-gap: 22px; }
body.r14 #material .image-container, body.r14 #info .image-container { display: flex; flex-direction: column; height: 100%; background: #fff; border-radius: var(--r-radius); overflow: hidden; text-decoration: none; box-shadow: 0 10px 28px rgba(6,36,92,.1); transition: transform .25s ease, box-shadow .25s ease; }
body.r14 #material .image-container:hover, body.r14 #info .image-container:hover { transform: translateY(-6px); box-shadow: 0 22px 44px rgba(6,36,92,.2); }
body.r14 #material .image-container img, body.r14 #info .image-container img { display: block; width: 100%; max-width: none; max-height: none; aspect-ratio: 4 / 3; object-fit: cover; object-position: center top; margin: 0; box-shadow: none; transition: transform .5s ease; }
body.r14 #material .image-container:hover img, body.r14 #info .image-container:hover img { transform: scale(1.04); }
body.r14 #material .image-container p, body.r14 #info .image-container p { position: relative; background: #fff; margin: 0; padding: 16px 18px 18px; font-size: 19px; font-weight: 700; color: var(--r-navy); text-align: left; }
body.r14 #material .image-container p::after, body.r14 #info .image-container p::after { content: "Abrir web"; display: block; font-size: 14px; font-weight: 600; color: var(--r-blue); margin-top: 2px; }
body.r14 #material .image-container[download] p::after, body.r14 #info .image-container[download] p::after { content: "Descargar PDF"; }

/* ---------- vídeo e información ---------- */
body.r14 #info { background: linear-gradient(160deg, var(--r-navy) 0%, var(--r-deep) 100%); padding: clamp(48px, 6vw, 96px) var(--r-pad); }
body.r14 #info h1 { color: #fff !important; max-width: 22em; margin-left: auto; margin-right: auto; margin-bottom: 36px; }
body.r14 #info .title > .row { max-width: 1240px; margin: 0 auto; row-gap: 22px; }
body.r14 #info .col-sm-3 { margin-top: 0; }
body.r14 #info .video-responsive { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-radius); overflow: hidden; box-shadow: 0 24px 60px rgba(0,0,0,.45); background: #000; padding: 0; height: auto; }
body.r14 #info .video-responsive iframe { position: absolute; inset: 0; width: 100% !important; height: 100% !important; border: 0; }
body.r14 #info .image-container img { aspect-ratio: 4 / 3; object-fit: contain; background: #fff; padding: 14px 14px 0; }
body.r14 #info .blue-line { background: var(--r-yellow); border: 0; }
body.r14 #info .image-container { height: auto; }
body.r14 #info .title > .row { align-items: flex-start; }
@media (max-width: 991px) and (min-width: 576px) { body.r14 #info .title > .row > .col-sm-6 { flex: 0 0 100%; max-width: 100%; } body.r14 #info .title > .row > .col-sm-3 { flex: 0 0 50%; max-width: 50%; } }

/* ---------- contacto ---------- */
body.r14 #contacta { background: var(--r-blue); background: linear-gradient(120deg, #1a5fb8 0%, var(--r-blue) 60%, #3b8be6 100%); padding: clamp(40px, 5vw, 72px) var(--r-pad); align-items: center; overflow: hidden; }
body.r14 #contacta .col-sm-8 { padding-bottom: 0; text-align: left !important; }
body.r14 #contacta .blue-line { margin-left: 0; background: #fff; border: 0; }
body.r14 #contacta h1, body.r14 #contacta p { color: #fff; }
body.r14 #contacta p { max-width: 34em; margin-bottom: 22px; }
body.r14 #contacta img.r14-barco { position: static; display: block; max-width: 100%; max-height: 300px; margin: 0 auto -110px; filter: drop-shadow(0 18px 24px rgba(4,26,68,.35)); animation: r14-mece 7s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes r14-mece { 0%, 100% { transform: rotate(-1.6deg) translateY(0); } 50% { transform: rotate(1.6deg) translateY(-6px); } }
@media (max-width: 575px) { body.r14 #contacta img.r14-barco { max-height: 200px; margin: 28px auto -80px; } }

/* ---------- ganadores ---------- */
body.r14 #ganadores_div { background: var(--r-paper); }
body.r14 #ganadores_div .banner-privada { padding: clamp(56px, 6vw, 96px) 0 24px; }
body.r14 .edicion-lema { font-size: 19px; color: var(--r-muted); }
body.r14 .selector-ediciones .btn-edicion { border: 2px solid var(--r-line); background: #fff; color: var(--r-navy); border-radius: 8px; transition: border-color .2s ease, transform .2s ease, background-color .2s ease; }
body.r14 .selector-ediciones .btn-edicion:hover { border-color: var(--r-blue); transform: translateY(-2px); }
body.r14 .selector-ediciones .btn-edicion.active { background: var(--r-navy); border-color: var(--r-navy); color: #fff; }
body.r14 .selector-ediciones .btn-edicion.active small { color: #cfe0f7; }
body.r14 .selector-ediciones .btn-edicion strong { font-family: var(--r-display); font-size: 21px; }
body.r14 .selector-ediciones .btn-edicion-pdf { border-style: dashed; }
body.r14 #ganadores_div .scoreboard__podium-base { border-radius: var(--r-radius) var(--r-radius) 0 0; background: linear-gradient(180deg, #3b7fd6, var(--r-blue)); box-shadow: 0 14px 32px rgba(6,36,92,.16); }
body.r14 #ganadores_div .scoreboard__podium-base--first { background: linear-gradient(180deg, #0c3a8c, var(--r-navy)); }
body.r14 #ganadores_div .scoreboard__podium-base--third { background: linear-gradient(180deg, #7fb0ea, #5c97de); }
body.r14 #ganadores_div .scoreboard__podium-rank { background: var(--r-yellow); color: var(--r-navy); }
body.r14 #ganadores_div .scoreboard__podium-number .premiado, body.r14 #ganadores_div .scoreboard__podium-number a { color: var(--r-navy); }
body.r14 #ganadores_div .scoreboard__podium-number .premiado { font-family: var(--r-display); font-weight: 700; font-size: 26px; line-height: 1.1; }
body.r14 #ganadores_div .ver-carta-link { color: var(--r-blue); }
body.r14 #ganadores_div .podio-provincia { color: var(--r-blue); }
body.r14 #mapa h1 { text-align: center; padding: 0 20px; }
body.r14 #mapa .bg-gray-light, body.r14 #main2 { background: transparent !important; }
body.r14 #mapa .selector-provincia select { border: 2px solid var(--r-line); border-radius: 8px; height: 52px; font-size: 17px; color: var(--r-navy); }
body.r14 .internacional li.extra { border-color: var(--r-navy); color: var(--r-navy); border-radius: 8px; }
body.r14 .internacional li.extra.active, body.r14 .internacional li.extra:hover { background: var(--r-navy); color: #fff; }
body.r14 #mapa .destacado { font-family: var(--r-display); font-size: 30px; color: var(--r-navy); }
body.r14 #result .ganador { border-radius: var(--r-radius); box-shadow: 0 18px 44px rgba(6,36,92,.14); }
body.r14 #result .gp-provincia { font-family: var(--r-display); color: var(--r-blue); font-size: 34px; }
body.r14 #result .btn-carta { background: var(--r-navy); border-radius: 4px; }

/* ---------- pie ---------- */
body.r14 footer { background: var(--r-deep); }
body.r14 footer .pie-amarillo .image-container { flex-wrap: wrap; justify-content: center; }
body.r14 footer a, body.r14 footer a:hover { font-size: 15px !important; }
body.r14 footer #rrss img { transition: transform .2s ease; }
body.r14 footer #rrss a:hover img { transform: translateY(-3px) scale(1.08); }
body.r14 footer .row.p-3 { row-gap: 14px; align-items: center; }
body.r14 footer .col-lg-9 .row { row-gap: 10px; }

/* ---------- ventanas de cookies / aviso legal ---------- */
body.r14 #cookies > .col-12, body.r14 #aviso-legal > .col-12 { font-size: 15px; line-height: 1.55; border-radius: var(--r-radius); }
body.r14 #cookies h1, body.r14 #aviso-legal h1 { font-family: var(--r-display); color: var(--r-navy); }
@media (max-width: 575px) { body.r14 #cookies > .col-12, body.r14 #aviso-legal > .col-12 { width: 94%; left: 3%; padding: 22px 18px; } }

/* ---------- menos movimiento ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body.r14 *, body.r14 *::before, body.r14 *::after { animation: none !important; transition: none !important; }
  .r14-reveal { opacity: 1; transform: none; }
}

/* tableta: las bases y los premios, uno debajo del otro */
@media (max-width: 991px) {
  body.r14 #bases > [class*="col-md-"] { flex: 0 0 100%; max-width: 100%; }
  body.r14 .r14-premios { padding-left: 15px; }
}

/* sección de información sin vídeo: las dos tarjetas centradas */
body.r14 #info .title > .row.r14-sin-video { justify-content: center; max-width: 760px; }
body.r14 #info .title > .row.r14-sin-video > .col-sm-3 { flex: 0 0 50%; max-width: 50%; }
@media (max-width: 575px) { body.r14 #info .title > .row.r14-sin-video > .col-sm-3 { flex: 0 0 100%; max-width: 100%; } }
