:root {
  --bg: #0b0f14;
  --panel: rgba(255,255,255,.06);
  --panel2: rgba(255,255,255,.09);
  --text: rgba(255, 247, 227, 0.92);
  --muted: rgba(255,255,255,.7);
  --muted2: rgba(255,255,255,.55);
  --border: rgba(255,255,255,.14);
  --titles: rgb(228, 195, 77);
  --shadow: 0 18px 50px rgba(0,0,0,.45);
  --radius: 18px;
  --max: 1120px;

  --colaboradores-card-color: rgba(255, 160, 0, 1);

  --accent: #ff3b3b;      /* primary accent */
  --accent2: #ffb000;     /* secondary accent */
  --ok: #47d18c;

  --font: "Oxanium", "Space Grotesk", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji", "Space Grotesk";
}

* { 
  box-sizing:border-box; 
}

html,
body {
  min-height: 100vh;
}

html { 
  scroll-behavior:smooth; 
}

body {
  margin:0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

h1 {
  font-family: "Space Grotesk", "Oxanium", ui-sans-serif, system-ui, sans-serif;
  text-transform: uppercase;
  font-weight: 400;
  color: var(--titles);
}

h2 {
  font-family: "Space Grotesk", "Oxanium", ui-sans-serif, system-ui, sans-serif;
  font-weight: 400;
  color: var(--titles);
}

h3, h4, h5, h6 {
  font-family: "Oxanium", "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  color: var(--titles);
}

h2 {
  font-size: 28px;
}

h3 {
  font-size: 22px;
}

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

.wrap { 
  max-width: var(--max); 
  margin: 0 auto; 
  padding: 0 18px; 
}

/* Top bar */
.topbar {
  position: sticky; 
  top: 0; 
  z-index: 50;
  height: 80px;

  backdrop-filter: blur(10px);
  background: rgba(11,15,20,.72);
  border-bottom: 1px solid var(--border);
}

.topbar-inner{
  display: flex; 
  align-items: center;
  height: 100%;

  justify-content: flex-end;
  gap:14px;
  padding: 12px 0;
}

.nav {
  display: flex;
  margin-left: auto;
  gap: 10px;
  text-align: right;
  align-items: center;
  
  color: #d0a81c;
  font-size: 20px;
  font-family: "Space Grotesk", "Oxanium", system-ui, sans-serif;
}

.nav-social {
  margin-left: 10px;   /* ← bigger gap before Instagram */
  display: flex;
  align-items: center;
}

.menu-btn{
  display: none;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.06);
  color: var(--text);
  border-radius: 14px;
  padding: 10px 12px;
  font-weight: 800;
  cursor: pointer;
}

/* Mobile */
@media (max-width: 875px){
  .topbar{
    height: 64px;
  }

  .topbar-inner {
    justify-content: space-between;
    padding: 10px 4px;
  }

  .topbar-inner img {
    height: 44px;          /* shrink logo */
    width: auto;
  }

  .nav {
    display: none;         /* hide horizontal menu */
    margin-left: 0;
    gap: 8px;
    text-align: left;
  }

  .menu-btn {
    display: inline-flex;  /* show burger */
    align-items: center;
    justify-content: center;
  }

  /* When opened */
  .nav.open{
    display: flex;
    position: absolute;
    right: 18px;
    top: 64px; /* match topbar height */
    flex-direction: column;
    width: min(320px, calc(100vw - 36px));
    padding: 10px;
    background: rgba(11,15,20,.95);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow);
  }

  .nav.open a{
    padding: 12px 12px;
    border-radius: 12px;
  }

  .nav.open a:hover{
    background: rgba(255,255,255,.06);
  }

  /* Make instagram look like an icon row item */
  .nav-social{
    margin-left: 0;
  }
}


/* HERO */

.hero {
  padding: 20px 0 40px 0;
}

.hero-img {
  text-align: center;
  margin-bottom: 24px;
}

.hero-photo {
  position: relative;
  isolation: isolate;
  min-height: min(860px, calc(100vh - 80px));
  display: grid;
  place-items: center;
  padding: 110px 0 150px;
  background:
    url("assets/fotos/fondo_inicio.jpg") center 42% / cover no-repeat;
  clip-path: polygon(0 0, 100% 0, 100% 92%, 0 100%);
}

.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(2500px 2500px at 50% 50%, rgba(5,8,11,.90), rgba(5,8,11,.10) 100%),
    linear-gradient(0deg, rgba(5,8,11,.72), transparent 50%);
}

/* FOOTER */

.footer-grid {
  display:flex; 
  flex-wrap:wrap; 
  justify-content:space-between; 
  gap: 10px;
  border-top: 1px solid rgba(255,255,255,.10);
  padding-top: 16px;
}

/* =========================================================
   VISUAL REDESIGN: PHOTO SECTIONS + DIAGONAL MASKS
   ========================================================= */

body {
  overflow-x: hidden;
  background: var(--bg);
}

section {
  position: relative;
}

.content-section {
  padding: clamp(76px, 9vw, 130px) 0;
}

.content-section--dark {
  background:
    /*radial-gradient(900px 600px at 15% 10%, rgba(255,59,59,.10), transparent 60%),
    radial-gradient(800px 500px at 90% 90%, rgba(255,176,0,.08), transparent 58%),*/
    var(--bg);
}

.content-section--race {
  padding-top: 80px;
  background:
    linear-gradient(45deg, rgba(255,255,255,.035), transparent 45%),
    var(--bg);
}

.section-title {
  margin-bottom: 34px;
}

.section-title h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 60px);
  line-height: .95;
  letter-spacing: -.04em;
  padding-top: 40px;
}

.section-title h2 {
  margin: 0;
  font-size: clamp(24px, 5vw, 60px);
  line-height: .95;
  letter-spacing: -.02em;
  padding-top: 40px;
}

.section-title::after {
  content: "";
  display: block;
  width: 92px;
  height: 5px;
  margin-top: 18px;
  transform: skewX(-28deg);
  background: var(--accent2);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.card {
  padding: clamp(22px, 3vw, 38px);
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: 0 24px 60px rgba(0,0,0,.22);
}

.card--feature {
  grid-column: 1 / -1 !important;
  max-width: 900px;
}

.card p:first-child {
  margin-top: 0;
}

.card iframe {
  display: block;
  width: 100%;
  max-width: 100%;
}

.info-layout .card:first-child > div {
  width: 100% !important;
  max-width: 720px;
}

.hero-content {
  width: 100%;
  text-align: left;
}

.hero-logo {
  display: block;
  width: min(720px, 88vw);
  max-height: 430px;
  object-fit: contain;
  object-position: left center;
  filter: drop-shadow(0 18px 35px rgba(0,0,0,.55));
}

.hero-kicker,
.eyebrow {
  margin: 16px 0 0;
  color: var(--accent2);
  font-weight: 700;
  font-size: 32px;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.hero-cta {
  display: inline-block;
  margin-top: 28px;
  padding: 15px 24px;
  border: 2px solid var(--accent2);
  background: rgba(11,15,20,.72);
  font-weight: 700;
  letter-spacing: .08em;
  transform: skewX(-8deg);
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.hero-cta:hover {
  color: #0b0f14;
  background: var(--accent2);
  transform: skewX(-8deg) translateY(-3px);
}

.photo-divider {
  position: relative;
  isolation: isolate;
  min-height: clamp(150px, 25vw, 200px);
  display: flex;
  align-items: center;
  margin: 52px 0;
  padding: 110px 0;
  clip-path: polygon(0 8%, 100% 0, 100% 92%, 0 100%);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  z-index: -1;
}

.photo-divider--gallery {
  background-image: url("assets/fotos/2026-cuarte-web/divider_gallery.jpg");
}

.photo-divider--clasificaciones {
  background-image: url("assets/fotos/2026-cuarte-web/divider_clasificaciones.jpg");
}

.photo-divider--patrocinadores {
  background-image: url("assets/fotos/2026-cuarte-web/divider_patrocinadores.jpg");
}

.photo-divider__shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(6,9,12,.68) 0%, rgba(6,9,12,.4) 20%, rgba(6,9,12,.88) 80%);
}

.photo-divider__content {
  width: 100%;
}

.photo-divider__content--right {
  text-align: right;
}

.photo-divider h2 {
  max-width: 780px;
  margin: 10px 0 0;
  color: white;
  font-size: clamp(28px, 5vw, 60px);
  line-height: .98;
  text-transform: uppercase;
  text-shadow: 0 8px 30px rgba(0,0,0,.55);
}

.photo-divider__content--right h2 {
  margin-left: auto;
}

#race .exercise-grid {
  margin-top: 24px;
}

#contact {
  padding-top: 130px;
}

footer {
  padding: 26px 0 32px;
  background: #080b0f;
}

@media (max-width: 875px) {
  .hero-photo {
    min-height: 690px;
    padding: 90px 0 130px;
    clip-path: polygon(0 0, 100% 0, 100% 96%, 0 100%);
  }

  .hero-content {
    text-align: center;
  }

  .hero-logo {
    margin-inline: auto;
    object-position: center;
  }

  .grid-3 {
    grid-template-columns: 1fr;
  }

  .card,
  .card--feature {
    grid-column: auto !important;
  }

  .photo-divider {
    min-height: 500px;
    margin: -24px 0;
    clip-path: polygon(0 4%, 100% 0, 100% 96%, 0 100%);
  }

  .photo-divider__content,
  .photo-divider__content--right {
    text-align: left;
  }

  .photo-divider__content--right h2 {
    margin-left: 0;
  }
}

@media (max-width: 560px) {
  .content-section {
    padding: 72px 0;
  }

  .hero-photo {
    min-height: 590px;
  }

  .hero-kicker {
    font-size: 13px;
    letter-spacing: .11em;
  }

  .photo-divider {
    min-height: 430px;
    padding: 90px 0;
  }
}

.results-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
  gap:28px;
  margin-top:28px;
}

.result-card {

  display:flex;
  flex-direction:column;

  padding:34px;

  background:
    linear-gradient(
      160deg,
      rgba(255,176,0,.12),
      rgba(255,176,0,.04)
    );

  border:1px solid rgba(255,176,0,.35);
  border-radius:22px;

  color:white;
  text-decoration:none;

  transition:
    transform .25s,
    box-shadow .25s,
    border-color .25s;

  box-shadow:0 18px 45px rgba(0,0,0,.28);

  position:relative;
  overflow:hidden;
  min-height:240px;
  min-width:360px;
}

.result-card::before {
  content:"";
  position:absolute;
  inset:0;
  background:
    linear-gradient(
      180deg,
      rgba(0,0,0,.15) 15%,
      rgba(0,0,0,.85) 100%
    );
}

.result-card {
  position:relative;
  overflow:hidden;
}

.result-card::after {
  content:"";
  position:absolute;
  inset:0;

  background:
    linear-gradient(
      180deg,
      rgba(0,0,0,.20),
      rgba(0,0,0,.88) 75%
    );
}

.result-card:hover {

  /*transform:translateY(-8px);*/

  border-color:var(--titles);
  border-width:2px;

  box-shadow:0 30px 60px rgba(0,0,0,.45);
}

.result-card__image {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;

  object-fit: cover;
  display: block;

  transition: 
    transform 500ms ease,
    filter 500ms ease;
}

.result-card:hover .result-card__image {
  transform: scale(1.05);
  filter: brightness(0.6);
}

.result-card__content {
  position:relative;
  z-index:2;

  height:100%;
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
}

.result-card__icon {

  font-size:42px;
  margin-bottom:18px;
}

.result-card__type {

  color:var(--accent2);

  font-size:13px;
  font-weight:700;

  letter-spacing:.15em;
  text-transform:uppercase;
}

.result-card__title {

  font-family:"Space Grotesk";
  font-size:28px;
  line-height:1.05;

  color:white;
}

.result-card__link {

  padding-top:20px;

  font-weight:700;
  color:var(--titles);

  transition:transform .2s;
}

.result-card--secondary {

  background:
    linear-gradient(
      160deg,
      rgba(255,255,255,.05),
      rgba(255,255,255,.02)
    );

  border-color:rgba(255,255,255,.14);
}

.result-card--secondary .result-card__type {

  color:#9ecbff;
}

.result-card--secondary:hover {
  
  border-color:#9ecbff;
}

.result-card--photos{
  width:100%;
}

.photo-gallery{

  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));

  gap:20px;
}

.photo-gallery img{

  width:100%;
  aspect-ratio:4/3;

  object-fit:cover;

  border-radius:18px;

  cursor:pointer;

  transition:
    transform .3s,
    box-shadow .3s,
    filter .3s;
}

.photo-gallery img:hover{

  transform:translateY(0px) scale(1.05);

  box-shadow:0 20px 45px rgba(0,0,0,.35);
}

.gallery-lightbox{

  position:fixed;
  inset:0;

  display:flex;
  justify-content:center;
  align-items:center;

  background:rgba(0,0,0,.92);

  opacity:0;
  pointer-events:none;

  transition:.25s;

  z-index:500;
}

.gallery-lightbox.open{

  opacity:1;
  pointer-events:auto;
}

.gallery-lightbox img{

  max-width:92vw;
  max-height:92vh;

  border-radius:10px;
}

.hero-video{
  position:relative;
  height:min(80vh,800px);
  overflow:hidden;
}

.hero-video video{

  position:absolute;
  inset:0;

  width:100%;
  height:100%;

  object-fit:cover;
}

.hero-video__overlay{

  position:absolute;
  inset:0;

  background:
    linear-gradient(
      180deg,
      rgba(0,0,0,.25),
      rgba(0,0,0,.65)
    );
}

.hero-video__content{

  position:relative;
  z-index:2;

  height:100%;

  display:flex;
  flex-direction:column;
  justify-content:flex-end;

  padding:80px;
}

.hero-video .eyebrow {
  font-size: 48px;
  margin-bottom: 0px;
}

.hero-video__content h1 {
  font-size: 64px;
  font-weight: 200;
  margin-top: 0px;
  color: rgba(255,255,255,.99);
}


.colaboradores-grid {
  display: grid;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
}

.colaboradores-grid--patrocinadores {
  grid-template-columns: repeat(2, 1fr);
}

.colaboradores-grid--colaboradores {
  grid-template-columns: repeat(3, 1fr);
}

.colaboradores-card {
  position: relative;
  display: block;

  width: 100%;
  height: auto;
  padding: 0;
  overflow: hidden;

  border: 1px solid var(--colaboradores-card-color);
  border-radius: 22px;

  color: white;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.04);

  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);

  transition:
    transform 250ms ease,
    box-shadow 250ms ease,
    border-color 250ms ease;
}

.colaboradores-grid--patrocinadores .colaboradores-card {
  aspect-ratio: 2 / 1;
}

.colaboradores-grid--colaboradores .colaboradores-card {
  aspect-ratio: 3 / 2;
}

.colaboradores-card:hover {

  /*transform:translateY(-8px);*/

  border-color:var(--colaboradores-card-color);
  border-width:2px;

  box-shadow:0 30px 60px rgba(0,0,0,.45);
}

.colaboradores-card__image {
  position: relative;
  width: 100%;

  object-fit: cover;

  cursor: pointer;

  transition: 
    transform 500ms ease,
    filter 500ms ease;
}

.colaboradores-card:hover .colaboradores-card__image {
  transform: scale(1.05);
}

.colaboradores-card__content {
  position:relative;
  z-index:2;

  height:100%;
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
}

.patrocinadores-card__title {

  font-family:"Space Grotesk";
  font-size:24px;
  line-height:1.05;
  margin-top: 10px;

  color:white;
}

.colaboradores-card__title {

  font-family:"Space Grotesk";
  font-size:20px;
  line-height:1.05;
  margin-top: 10px;

  color:white;
}

.colaboradores-card > div {
  min-width: 0;
  width: 100%;
}

@media (max-width: 720px) {
  .colaboradores-grid {
    gap: 12px;
    margin-top: 20px;
  }

  .colaboradores-card {
    border-radius: 12px;
    width: 100%;
    height: auto;
  }

  .colaboradores-grid--patrocinadores {
    grid-template-columns: 1fr;
  }

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

  .colaboradores-grid--patrocinadores .colaboradores-card {
    aspect-ratio: 2 / 1;
  }

  .colaboradores-grid--colaboradores .colaboradores-card {
    aspect-ratio: 3 / 2;
  }

  .patrocinadores-card__title,
  .colaboradores-card__title {
    margin-top: 6px;
    font-size: 13px;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }
}