﻿/*
Theme Name: Deportiva Piloñesa
Theme URI: https://example.com/deportiva-pilonesa
Author: Deportiva Piloñesa
Description: Tema institucional para la Deportiva Piloñesa, club de fútbol de Infiesto fundado en 1917.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
Text Domain: deportiva-pilonesa
*/
:root {
  --red: #f11118;
  --red-dark: #b40712;
  --blue: #2448e7;
  --blue-deep: #07164f;
  --crest-mint: #cfecdc;
  --leather: #d38432;
  --paper: #f4fbf6;
  --white: #ffffff;
  --ink: #151923;
  --muted: #657084;
  --line: rgba(21, 25, 35, 0.14);
  --shadow: 0 22px 60px rgba(7, 22, 79, 0.16);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(244, 251, 246, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
}

.brand-mark {
  width: 48px;
  height: 58px;
  object-fit: contain;
  filter: drop-shadow(0 5px 10px rgba(7, 22, 79, 0.22));
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  line-height: 1;
}

.brand small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-nav a {
  padding: 10px 12px;
  border-radius: 6px;
  color: #2d3444;
  font-size: 0.94rem;
  font-weight: 700;
}

.site-nav a:hover {
  background: rgba(199, 18, 43, 0.09);
  color: var(--red-dark);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 9px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 6px 0;
  background: var(--blue-deep);
}

.hero {
  position: relative;
  min-height: calc(100svh - 76px);
  display: grid;
  align-items: end;
  padding: clamp(28px, 5vw, 72px);
  overflow: hidden;
  background: var(--blue-deep);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 22, 79, 0.9), rgba(7, 22, 79, 0.56) 48%, rgba(7, 22, 79, 0.14)),
    linear-gradient(0deg, rgba(7, 22, 79, 0.86), rgba(7, 22, 79, 0.05) 46%);
}

.hero-media {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 22, 79, 0.28), rgba(7, 22, 79, 0.08)),
    url("assets/hero-futbol-rojiblanco.png") center / cover no-repeat;
  transform: scale(1.01);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 760px;
  color: var(--white);
}

.hero-crest {
  width: clamp(86px, 12vw, 138px);
  margin-bottom: 22px;
  filter: drop-shadow(0 20px 28px rgba(0, 0, 0, 0.34));
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #ffd8dd;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.6rem, 11vw, 8.8rem);
  line-height: 0.9;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 3.7rem);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
}

.hero p:not(.eyebrow) {
  max-width: 650px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.65;
}

.hero-actions,
.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 6px;
  font-weight: 900;
}

.button.primary {
  color: var(--white);
  background: var(--red);
}

.button.secondary {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.44);
}

.club-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.club-strip article {
  padding: 24px clamp(18px, 4vw, 56px);
  border-right: 1px solid var(--line);
}

.club-strip strong,
.club-strip span {
  display: block;
}

.club-strip strong {
  color: var(--blue-deep);
  font-size: clamp(1.5rem, 3vw, 2.3rem);
}

.club-strip span {
  margin-top: 6px;
  color: var(--muted);
  font-weight: 700;
}

.section {
  padding: clamp(54px, 8vw, 104px) clamp(18px, 4vw, 56px);
}

.muted {
  background: #eef2f6;
}

.section-heading {
  max-width: 1040px;
  margin: 0 auto 32px;
}

.section-heading.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 440px);
  gap: 32px;
  align-items: end;
}

.section-heading p:not(.eyebrow) {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.7;
}

.history-grid,
.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: 28px;
  max-width: 1040px;
  margin: 0 auto;
}

.history-video {
  display: grid;
  grid-template-columns: minmax(220px, 0.42fr) minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  max-width: 1040px;
  margin: 34px auto 0;
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 16px 44px rgba(7, 22, 79, 0.1);
}

.history-video h3 {
  margin-bottom: 0;
  font-size: clamp(1.45rem, 3vw, 2.15rem);
  line-height: 1.05;
}

.video-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--blue-deep);
  border-radius: 8px;
}

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

.history-copy {
  font-size: 1.08rem;
  line-height: 1.8;
}

.timeline {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.timeline-item,
.heritage-card,
.team-card,
.result-card,
.sponsor-card,
.merch-card,
.contact-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 36px rgba(13, 32, 63, 0.08);
}

.timeline-item {
  padding: 20px;
  border-left: 6px solid var(--red);
}

.timeline-item span,
.team-card span,
.result-card span,
.result-card time,
.merch-card span,
.sponsor-card span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.timeline-item p,
.team-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

.heritage-card {
  position: relative;
  overflow: hidden;
  min-height: 360px;
  padding: 28px;
  color: var(--white);
  background: var(--blue-deep);
}

.heritage-crest {
  width: min(100%, 240px);
  margin: 0 auto 28px;
  filter: drop-shadow(0 20px 28px rgba(0, 0, 0, 0.24));
}

.heritage-card p {
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.7;
}

.team-grid,
.sponsor-grid,
.merch-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  max-width: 1040px;
  margin: 0 auto;
}

.team-card,
.sponsor-card {
  padding: 22px;
}

.team-card h3,
.sponsor-card strong {
  display: block;
  margin-top: 14px;
  font-size: 1.2rem;
}

.results-list {
  display: grid;
  gap: 14px;
  max-width: 1040px;
  margin: 0 auto;
}

.result-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(150px, 0.34fr);
  gap: 20px;
  align-items: center;
  padding: 18px 20px;
}

.result-card strong,
.result-card time {
  display: block;
}

.result-card strong {
  margin-top: 5px;
}

.score {
  min-width: 116px;
  padding: 12px 16px;
  color: var(--white);
  text-align: center;
  font-size: 1.55rem;
  font-weight: 950;
  background: var(--blue);
  border-radius: 6px;
}

.text-link {
  color: var(--red-dark);
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 5px;
}

.gallery {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
  max-width: 1040px;
  margin: 0 auto;
}

.photo-card {
  position: relative;
  min-height: 260px;
  margin: 0;
  overflow: hidden;
  background: var(--blue-deep);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.photo-card:first-child {
  grid-row: span 2;
  min-height: 540px;
}

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

.photo-card figcaption {
  position: absolute;
  inset: auto 16px 16px 16px;
  padding: 14px;
  color: var(--white);
  background: rgba(13, 32, 63, 0.76);
  border-radius: 8px;
}

.photo-card strong,
.photo-card span {
  display: block;
}

.photo-card span {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.72);
}

.sponsor-card {
  min-height: 124px;
  background:
    linear-gradient(135deg, rgba(241, 17, 24, 0.1), transparent 42%),
    var(--white);
}

.merch-card {
  overflow: hidden;
}

.merch-card img {
  width: 100%;
  aspect-ratio: 1.16;
  object-fit: cover;
  background: #f3f6fb;
}

.merch-card div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
}

.merch-card h3 {
  margin-bottom: 0;
}

.contact-section {
  align-items: center;
  background: var(--blue-deep);
  color: var(--white);
}

.contact-section p:not(.eyebrow) {
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.75;
}

.contact-section code {
  color: #ffe1e6;
}

.contact-card {
  padding: 24px;
  color: var(--ink);
}

.social-links a {
  padding: 10px 14px;
  color: var(--white);
  font-weight: 900;
  background: var(--red);
  border-radius: 6px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 24px clamp(18px, 4vw, 56px);
  color: rgba(255, 255, 255, 0.8);
  background: #08162c;
}

@media (max-width: 860px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    right: 18px;
    left: 18px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: flex;
  }

  .club-strip,
  .section-heading.split,
  .history-grid,
  .history-video,
  .contact-section,
  .gallery {
    grid-template-columns: 1fr;
  }

  .team-grid,
  .sponsor-grid,
  .merch-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .photo-card:first-child {
    min-height: 340px;
  }

  .result-card {
    grid-template-columns: 1fr;
  }

  .score {
    width: fit-content;
  }
}

@media (max-width: 560px) {
  .brand {
    min-width: 0;
  }

  .brand small {
    display: none;
  }

  .hero {
    min-height: 680px;
  }

  .club-strip,
  .team-grid,
  .sponsor-grid,
  .merch-grid {
    grid-template-columns: 1fr;
  }

  .site-footer {
    flex-direction: column;
  }
}

.photo-aside {
  padding: 0;
}

.photo-aside img {
  width: 100%;
  height: 230px;
  object-fit: cover;
}

.photo-aside h3,
.photo-aside p {
  padding-right: 24px;
  padding-left: 24px;
}

.photo-aside h3 {
  margin-top: 22px;
}

.photo-aside p {
  padding-bottom: 24px;
}

.contact-section a {
  color: #ffe1e6;
  font-weight: 900;
}


.merchandising-section {
  background:
    linear-gradient(135deg, rgba(201, 24, 43, 0.08), transparent 35%),
    #eef2f6;
}

.merchandising-section .merch-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.merchandising-section .merch-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.merchandising-section .merch-card img {
  aspect-ratio: 1.08;
  object-fit: cover;
}

.merchandising-section .merch-card div {
  display: grid;
  align-items: start;
  justify-content: stretch;
  gap: 8px;
  padding: 18px;
}

.merchandising-section .merch-card h3 {
  margin: 0;
  color: var(--blue-deep);
}

.merchandising-section .merch-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.merch-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 40px;
  margin-top: 6px;
  padding: 0 13px;
  color: var(--white);
  background: var(--red);
  border-radius: 6px;
  font-weight: 900;
  text-decoration: none;
}

@media (max-width: 980px) {
  .merchandising-section .merch-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .merchandising-section .merch-grid {
    grid-template-columns: 1fr;
  }
}

.identity-section {
  background:
    radial-gradient(circle at 78% 20%, rgba(201, 24, 43, 0.12), transparent 28%),
    var(--paper);
}

.identity-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 28px;
  align-items: stretch;
  max-width: 1040px;
  margin: 0 auto;
}

.identity-content {
  display: grid;
  gap: 18px;
}

.identity-name,
.kit-card,
.identity-facts article {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 36px rgba(13, 32, 63, 0.08);
}

.identity-name {
  padding: 24px;
  border-left: 8px solid var(--red);
}

.identity-name span,
.identity-facts span,
.kit-card span:not(.kit-swatch) {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.identity-name h3 {
  margin: 10px 0 8px;
  color: var(--blue-deep);
  font-size: clamp(1.5rem, 3vw, 2.15rem);
}

.identity-name p {
  margin-bottom: 0;
  color: var(--muted);
  font-weight: 800;
}

.identity-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.identity-facts article {
  min-height: 116px;
  padding: 18px;
}

.identity-facts strong {
  display: block;
  margin-top: 10px;
  color: var(--blue-deep);
  font-size: 1.16rem;
  line-height: 1.15;
}

.kit-card {
  padding: 22px;
}

.kit-card h3 {
  margin-top: 0;
  color: var(--blue-deep);
}

.kit-grid {
  display: grid;
  gap: 12px;
}

.kit-grid article {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.kit-grid p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.kit-swatch {
  display: block;
  width: 72px;
  height: 72px;
  border: 5px solid var(--blue);
  border-radius: 8px;
}

.home-kit {
  background: repeating-linear-gradient(90deg, var(--red) 0 16px, var(--white) 16px 32px);
}

.away-kit {
  background: #08090d;
}

.identity-crest-card {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 520px;
  padding: 28px;
  overflow: hidden;
  color: var(--white);
  background:
    linear-gradient(145deg, rgba(7, 22, 79, 0.98), rgba(18, 58, 111, 0.9)),
    url("assets/hero-futbol-rojiblanco.png") center / cover no-repeat;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.identity-crest-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(7, 22, 79, 0.82), rgba(7, 22, 79, 0.35));
}

.identity-crest-card img,
.identity-crest-card h3,
.motion-stripe {
  position: relative;
  z-index: 1;
}

.identity-crest-card img {
  width: min(76%, 300px);
  filter: drop-shadow(0 24px 30px rgba(0, 0, 0, 0.42));
}

.identity-crest-card h3 {
  margin: 18px 0 0;
  color: var(--white);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.2rem, 5vw, 4rem);
}

.motion-stripe {
  position: absolute;
  right: -18%;
  width: 84%;
  height: 18px;
  border-radius: 999px;
  transform: rotate(-18deg);
  opacity: 0.88;
}

.stripe-red {
  top: 26%;
  background: var(--red);
}

.stripe-white {
  top: 34%;
  background: var(--white);
}

.stripe-blue {
  top: 42%;
  background: var(--blue);
}

@media (max-width: 860px) {
  .identity-panel,
  .identity-facts {
    grid-template-columns: 1fr;
  }

  .identity-crest-card {
    min-height: 360px;
  }
}

.history-gallery-card {
  overflow: hidden;
  color: var(--white);
  background: var(--blue-deep);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.history-carousel {
  position: relative;
  min-height: 360px;
  background: #07164f;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transition: opacity 240ms ease;
}

.carousel-slide.is-active {
  opacity: 1;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
}

.carousel-slide::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 44%;
  background: linear-gradient(0deg, rgba(7, 22, 79, 0.9), transparent);
}

.carousel-slide figcaption {
  position: absolute;
  right: 18px;
  bottom: 72px;
  left: 18px;
  z-index: 1;
  font-size: 1.05rem;
  font-weight: 900;
}

.carousel-controls {
  position: absolute;
  right: 14px;
  bottom: 14px;
  left: 14px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.carousel-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--white);
  font-size: 1.8rem;
  line-height: 1;
  background: rgba(201, 24, 43, 0.92);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.carousel-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(7, 22, 79, 0.62);
  border-radius: 999px;
}

.carousel-dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  background: rgba(255, 255, 255, 0.48);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.carousel-dots button.is-active {
  width: 24px;
  background: var(--white);
  border-radius: 999px;
}

.history-gallery-caption {
  padding: 22px 24px 24px;
}

.history-gallery-caption h3 {
  margin-top: 0;
  color: var(--white);
}

.history-gallery-caption p {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.65;
}

.facilities-section {
  background: var(--white);
}

.facilities-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(320px, 1.08fr);
  gap: 24px;
  align-items: stretch;
  max-width: 1040px;
  margin: 0 auto;
}

.facilities-list {
  display: grid;
  gap: 16px;
}

.facility-card,
.maps-panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 36px rgba(13, 32, 63, 0.08);
}

.facility-card {
  padding: 22px;
}

.facility-card span {
  color: var(--red);
  font-size: 0.82rem;
  font-weight: 950;
  text-transform: uppercase;
}

.facility-card h3 {
  margin: 12px 0 10px;
  color: var(--blue-deep);
  font-size: 1.45rem;
}

.facility-card p {
  color: var(--muted);
  line-height: 1.65;
}

.facility-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.facility-actions a,
.maps-caption a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 13px;
  color: var(--white);
  background: var(--blue);
  border-radius: 6px;
  font-weight: 900;
  text-decoration: none;
}

.facility-actions a:first-child,
.maps-caption a {
  background: var(--red);
}

.maps-panel {
  overflow: hidden;
}

.maps-frame {
  position: relative;
  min-height: 360px;
  background: #e8edf3;
}

.maps-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.maps-caption {
  padding: 20px 22px 22px;
}

.maps-caption h3 {
  margin-top: 0;
  color: var(--blue-deep);
}

.maps-caption p {
  color: var(--muted);
  line-height: 1.6;
}

@media (max-width: 860px) {
  .facilities-layout {
    grid-template-columns: 1fr;
  }
}

.maps-panel-stack {
  display: grid;
  gap: 16px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.map-card {
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 36px rgba(13, 32, 63, 0.08);
}

.compact-map {
  min-height: 230px;
}

.map-card .maps-caption {
  padding: 16px 18px 18px;
}

.map-card .maps-caption p {
  margin-bottom: 0;
}

.history-section-redesign .section-heading {
  margin-bottom: 28px;
}

.history-gallery-wide {
  max-width: 1040px;
  margin: 0 auto 28px;
}

.history-carousel-large {
  min-height: clamp(360px, 56vw, 620px);
}

.history-carousel-large .carousel-slide img {
  min-height: clamp(360px, 56vw, 620px);
}

.history-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(320px, 1.22fr);
  gap: 22px;
  max-width: 1040px;
  margin: 0 auto;
}

.history-story-card {
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 36px rgba(13, 32, 63, 0.08);
}

.history-story-card p {
  margin-bottom: 0;
}

.history-milestones {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 0;
}

.history-milestones .timeline-item:first-child {
  grid-row: span 2;
  display: grid;
  align-content: center;
  background:
    linear-gradient(135deg, rgba(201, 24, 43, 0.12), transparent 48%),
    var(--white);
}

.history-video-redesign {
  margin-top: 28px;
}

.history-video-redesign p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.6;
}

.video-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  color: var(--white);
  background: var(--red);
  border-radius: 6px;
  font-weight: 900;
  text-decoration: none;
}

@media (max-width: 860px) {
  .history-content-grid,
  .history-milestones {
    grid-template-columns: 1fr;
  }
}

.history-video-link-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  max-width: 1040px;
  margin: 28px auto 0;
  padding: 22px 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 36px rgba(13, 32, 63, 0.08);
}

.history-video-link-card h3 {
  margin-bottom: 6px;
  color: var(--blue-deep);
}

.history-video-link-card p:not(.eyebrow) {
  margin-bottom: 0;
  color: var(--muted);
}

@media (max-width: 620px) {
  .history-video-link-card {
    align-items: flex-start;
    flex-direction: column;
  }
}

.social-card .heritage-crest {
  width: min(160px, 48%);
  margin: 0 auto 18px;
}

.results-grid,
.sponsors-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.result-card,
.sponsor-card {
  background: #fff;
  border: 1px solid rgba(18, 58, 111, 0.12);
  border-radius: 8px;
  box-shadow: 0 18px 50px rgba(18, 58, 111, 0.08);
  padding: 1.2rem;
}

.result-card span {
  color: var(--red);
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
}

.result-card h3,
.sponsor-card h3 {
  color: var(--blue);
  font-size: 1.05rem;
  margin: 0 0 0.55rem;
}

.result-card p,
.sponsor-card p {
  margin: 0;
}

.sponsor-card img {
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  height: auto;
  margin-bottom: 0.9rem;
  object-fit: contain;
  width: 100%;
}

.sponsor-card a {
  color: var(--red);
  display: inline-flex;
  font-weight: 800;
  margin-top: 0.85rem;
  text-decoration: none;
}

@media (max-width: 960px) {
  .results-grid,
  .sponsors-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .results-grid,
  .sponsors-grid {
    grid-template-columns: 1fr;
  }
}

.social-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.social-buttons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 13px;
  color: var(--white);
  background: var(--red);
  border-radius: 6px;
  font-weight: 900;
  text-decoration: none;
}

.social-buttons a:nth-child(2) {
  background: var(--blue);
}

.social-buttons a:nth-child(3) {
  background: #111827;
}

.history-single-photo {
  background: var(--blue-deep);
}

.history-main-photo {
  position: relative;
  min-height: clamp(360px, 56vw, 620px);
  margin: 0;
  overflow: hidden;
}

.history-main-photo img {
  width: 100%;
  height: 100%;
  min-height: clamp(360px, 56vw, 620px);
  object-fit: cover;
}

.history-main-photo::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(0deg, rgba(7, 22, 79, 0.9), transparent);
}

.history-main-photo figcaption {
  position: absolute;
  right: 20px;
  bottom: 20px;
  left: 20px;
  z-index: 1;
  color: var(--white);
  font-size: 1.1rem;
  font-weight: 900;
}

.academy-animation {
  max-width: 1040px;
  margin: 0 auto 28px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(7, 22, 79, 0.94), rgba(18, 58, 111, 0.86)),
    url("assets/hero-futbol-rojiblanco.png") center / cover no-repeat;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.academy-track {
  position: relative;
  min-height: 280px;
  overflow: hidden;
}

.academy-track::before {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 46%;
  background:
    linear-gradient(180deg, transparent, rgba(34, 104, 58, 0.86)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.18) 0 2px, transparent 2px 90px);
}

.academy-line {
  position: absolute;
  right: 7%;
  bottom: 70px;
  left: 7%;
  height: 4px;
  background: linear-gradient(90deg, var(--red), var(--white), var(--blue), var(--red));
  border-radius: 999px;
  opacity: 0.8;
}

.academy-stage {
  position: absolute;
  bottom: 82px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.stage-1 { left: 6%; }
.stage-2 { left: 27%; }
.stage-3 { left: 47%; }
.stage-4 { left: 67%; }
.stage-5 { right: 5%; color: var(--white); }

.academy-player {
  position: absolute;
  left: 5%;
  bottom: 84px;
  width: 54px;
  height: 118px;
  transform-origin: bottom center;
  animation: academy-grow 10s linear infinite;
}

.player-head {
  position: absolute;
  top: 0;
  left: 50%;
  width: 28px;
  height: 28px;
  background: #f2c49b;
  border-radius: 50%;
  transform: translateX(-50%);
}

.player-body {
  position: absolute;
  top: 31px;
  left: 50%;
  width: 42px;
  height: 48px;
  background: repeating-linear-gradient(90deg, var(--red) 0 9px, var(--white) 9px 18px);
  border: 4px solid var(--blue);
  border-radius: 8px 8px 12px 12px;
  transform: translateX(-50%);
}

.player-arm,
.player-leg {
  position: absolute;
  background: var(--red);
  border-radius: 999px;
}

.player-arm {
  top: 40px;
  width: 12px;
  height: 48px;
}

.arm-left {
  left: 2px;
  transform: rotate(22deg);
}

.arm-right {
  right: 2px;
  transform: rotate(-28deg);
}

.player-leg {
  top: 74px;
  width: 13px;
  height: 50px;
  background: var(--blue);
}

.leg-left {
  left: 17px;
  transform: rotate(16deg);
}

.leg-right {
  right: 13px;
  transform: rotate(-26deg);
}

.academy-ball {
  position: absolute;
  left: 14%;
  bottom: 72px;
  width: 26px;
  height: 26px;
  background:
    radial-gradient(circle at 35% 30%, #ffffff, #d8d8d8 58%, #101010 60% 64%, #ffffff 66%);
  border: 2px solid #111;
  border-radius: 50%;
  animation: academy-ball 10s linear infinite;
}

.academy-message {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
  color: var(--white);
  background: rgba(7, 22, 79, 0.78);
}

.academy-message strong {
  font-size: 1.2rem;
}

.academy-message span {
  color: rgba(255, 255, 255, 0.78);
  font-weight: 700;
}

@keyframes academy-grow {
  0% { transform: translateX(0) scale(0.68); }
  18% { transform: translateX(16vw) scale(0.78); }
  38% { transform: translateX(34vw) scale(0.9); }
  58% { transform: translateX(52vw) scale(1.02); }
  82% { transform: translateX(70vw) scale(1.18); }
  100% { transform: translateX(80vw) scale(1.26); }
}

@keyframes academy-ball {
  0% { transform: translateX(0) rotate(0deg); }
  22% { transform: translateX(17vw) rotate(180deg); }
  44% { transform: translateX(35vw) rotate(360deg); }
  66% { transform: translateX(53vw) rotate(540deg); }
  100% { transform: translateX(74vw) rotate(760deg); }
}

@media (prefers-reduced-motion: reduce) {
  .academy-player,
  .academy-ball {
    animation: none;
  }
}

@media (max-width: 700px) {
  .academy-message {
    align-items: flex-start;
    flex-direction: column;
  }

  .academy-stage {
    font-size: 0.68rem;
  }
}

.academy-story {
  max-width: 1040px;
  margin: 0 auto 28px;
  overflow: hidden;
  background: var(--blue-deep);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.season-scene {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  background: #9fd6ff;
}

.season-panel {
  position: absolute;
  inset: 0;
  opacity: 0;
  animation: season-cycle 10s linear infinite;
}

.spring { background: linear-gradient(180deg, #bfe7ff 0 55%, #6fbf73 55% 100%); }
.summer { background: linear-gradient(180deg, #6ec6ff 0 55%, #2f9e44 55% 100%); animation-delay: 2.5s; }
.autumn { background: linear-gradient(180deg, #f3c27b 0 55%, #8fb04c 55% 100%); animation-delay: 5s; }
.winter { background: linear-gradient(180deg, #d8ecff 0 55%, #dfefff 55% 100%); animation-delay: 7.5s; }

.season-ground {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 3;
  height: 45%;
  background: linear-gradient(90deg, transparent 0 49%, rgba(255,255,255,.7) 49% 51%, transparent 51% 100%), repeating-linear-gradient(90deg, rgba(255,255,255,.18) 0 2px, transparent 2px 74px);
}

.season-sun {
  position: absolute;
  top: 34px;
  left: 38px;
  z-index: 4;
  width: 62px;
  height: 62px;
  background: #ffd166;
  border-radius: 50%;
  box-shadow: 0 0 38px rgba(255, 209, 102, .7);
  animation: sun-move 10s linear infinite;
}

.season-rain,
.season-leaf,
.season-snow {
  position: absolute;
  z-index: 5;
  opacity: 0;
}

.season-rain {
  top: 70px;
  width: 4px;
  height: 44px;
  background: rgba(255,255,255,.75);
  border-radius: 999px;
  animation: weather-cycle 10s linear infinite;
}

.rain-1 { left: 22%; }
.rain-2 { left: 38%; animation-delay: .25s; }

.season-leaf {
  top: 96px;
  width: 22px;
  height: 12px;
  background: #c76724;
  border-radius: 80% 0 80% 0;
  animation: leaf-cycle 10s linear infinite;
}

.leaf-1 { left: 55%; }
.leaf-2 { left: 72%; animation-delay: .4s; }

.season-snow {
  top: 72px;
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  animation: snow-cycle 10s linear infinite;
}

.snow-1 { left: 62%; }
.snow-2 { left: 82%; animation-delay: .4s; }

.growth-marker {
  position: absolute;
  bottom: 24px;
  z-index: 7;
  color: rgba(255,255,255,.86);
  font-size: .78rem;
  font-weight: 950;
  text-transform: uppercase;
  text-shadow: 0 2px 8px rgba(7,22,79,.45);
}

.marker-1 { left: 5%; }
.marker-2 { left: 25%; }
.marker-3 { left: 45%; }
.marker-4 { left: 65%; }
.marker-5 { right: 4%; color: #fff; }

.story-player {
  position: absolute;
  left: 6%;
  bottom: 78px;
  z-index: 8;
  width: 60px;
  height: 122px;
  transform-origin: bottom center;
  animation: story-grow 10s linear infinite;
}

.story-head { position: absolute; top: 0; left: 50%; width: 30px; height: 30px; background: #f2c49b; border-radius: 50%; transform: translateX(-50%); }
.story-hair { position: absolute; top: -1px; left: 50%; width: 34px; height: 16px; background: #1f2937; border-radius: 18px 18px 6px 6px; transform: translateX(-50%); }
.story-shirt { position: absolute; top: 34px; left: 50%; width: 44px; height: 48px; background: repeating-linear-gradient(90deg, var(--red) 0 9px, var(--white) 9px 18px); border: 4px solid var(--blue); border-radius: 9px 9px 12px 12px; transform: translateX(-50%); }
.story-shorts { position: absolute; top: 78px; left: 50%; width: 40px; height: 20px; background: var(--blue); border-radius: 0 0 8px 8px; transform: translateX(-50%); }
.story-arm, .story-leg { position: absolute; border-radius: 999px; }
.story-arm { top: 42px; width: 12px; height: 44px; background: #f2c49b; }
.story-arm.story-left { left: 2px; transform: rotate(20deg); }
.story-arm.story-right { right: 2px; transform: rotate(-26deg); }
.story-leg { top: 94px; width: 13px; height: 42px; background: var(--red); }
.story-leg.story-left { left: 18px; transform: rotate(12deg); }
.story-leg.story-right { right: 15px; transform: rotate(-24deg); }

.story-ball {
  position: absolute;
  left: 14%;
  bottom: 66px;
  z-index: 8;
  width: 28px;
  height: 28px;
  background: radial-gradient(circle at 35% 30%, #fff, #d8d8d8 58%, #111 60% 64%, #fff 66%);
  border: 2px solid #111;
  border-radius: 50%;
  animation: story-ball 10s linear infinite;
}

.academy-story-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
  color: var(--white);
  background: rgba(7,22,79,.95);
}

.academy-story-caption strong { font-size: 1.18rem; }
.academy-story-caption span { color: rgba(255,255,255,.78); font-weight: 750; }

@keyframes season-cycle { 0%, 24% { opacity: 1; } 25%, 100% { opacity: 0; } }
@keyframes sun-move { 0% { transform: translate(0, 0); } 50% { transform: translate(46vw, 24px); } 100% { transform: translate(76vw, -2px); } }
@keyframes weather-cycle { 0%, 20% { opacity: 0; transform: translateY(0); } 24%, 45% { opacity: .9; transform: translateY(120px); } 46%, 100% { opacity: 0; transform: translateY(140px); } }
@keyframes leaf-cycle { 0%, 48% { opacity: 0; transform: translate(0, 0) rotate(0deg); } 52%, 72% { opacity: .9; transform: translate(-90px, 120px) rotate(220deg); } 73%, 100% { opacity: 0; transform: translate(-120px, 150px) rotate(260deg); } }
@keyframes snow-cycle { 0%, 74% { opacity: 0; transform: translateY(0); } 78%, 97% { opacity: .9; transform: translateY(138px); } 98%, 100% { opacity: 0; transform: translateY(150px); } }
@keyframes story-grow { 0% { transform: translateX(0) scale(.58); } 24% { transform: translateX(18vw) scale(.72); } 48% { transform: translateX(38vw) scale(.88); } 72% { transform: translateX(58vw) scale(1.06); } 100% { transform: translateX(78vw) scale(1.24); } }
@keyframes story-ball { 0% { transform: translateX(0) rotate(0deg); } 24% { transform: translateX(18vw) rotate(170deg); } 48% { transform: translateX(38vw) rotate(350deg); } 72% { transform: translateX(58vw) rotate(540deg); } 100% { transform: translateX(76vw) rotate(760deg); } }

@media (prefers-reduced-motion: reduce) {
  .season-panel, .season-sun, .season-rain, .season-leaf, .season-snow, .story-player, .story-ball { animation: none; }
  .spring { opacity: 1; }
}

@media (max-width: 700px) {
  .academy-story-caption { align-items: flex-start; flex-direction: column; }
  .growth-marker { font-size: .66rem; }
}

