
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root{
    --primary-color: #e9e9e9;
    --secondary-color: #333333;
    --red-color: #E30713;
    --item-background: #202125b3;

    --item-borderradius: 12px;
} 

/* HEADER*/ 

.first-section-wrapper{
    background-image: url(../img/bg1.jpg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;    
}

/* HEADER GENERAL */

header {
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 1rem 2rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: linear-gradient(135deg, rgba(30,30,30,0.7), rgba(60,60,60,0.6), rgba(20,20,20,0.7));
  background-size: 200% 200%;
  animation: metalFlow 5s ease infinite;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(135deg, rgba(30,30,30,0.7), rgba(60,60,60,0.6), rgba(20,20,20,0.7));
  background-size: 200% 200%;
  animation: metalFlow 5s ease infinite;
}

/* ✨ ANIMACIÓN METÁLICA */
@keyframes metalFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* LOGO */
.logo-wrapper {
    max-width: 250px;
    flex: 0 0 auto;
    display: flex;
}

.logo-wrapper img {
    width: 100%;
    height: auto;
    display: block;
}

/* MENÚ */
.menu-wrapper-list {
    display: flex;
    justify-content: space-around;
    list-style: none;
    gap: 2rem;
    padding: 0;
    margin: 0;
}

.menu-wrapper li {
    font-family: 'Formula1Bold', sans-serif;
}

.menu-wrapper a {
    font-size: 1rem;
    color: transparent;
    background-image: linear-gradient(to left, #e9e9e9 50%, var(--red-color) 50%);
    background-size: 200% 100%;
    background-position: right;
    -webkit-background-clip: text;
    background-clip: text;
    transition: background-position 0.4s ease;
}

.menu-wrapper a:hover {
    background-position: left;
}

/* 📱 RESPONSIVE */
@media (max-width: 768px) {
    header {
        align-items: flex-start;
        padding: 1rem;
    }

    .menu-wrapper ul {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 0;
        text-align: right;
    }

    .menu-wrapper a {
        font-size: 0.5rem;
    }
}

/* BOTÓN HAMBURGUESA */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 2000;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    display: block;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* ANIMACIÓN del ícono cuando se abre */
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
}
.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* MOBILE MENU */
@media (max-width: 768px) {
    header {
    flex-wrap: wrap;
    align-items: center;
    padding: 1rem;
    }

    .hamburger {
    display: flex;
    margin-left: auto;
    margin-top: 0.5rem;
    }

    .menu-wrapper {
    display: none;
    width: 100%;
    }

    .menu-wrapper.active {
    display: block;
    }

    .menu-wrapper ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 0;
    }

    .menu-wrapper li {
    width: 100%;
    }

    .menu-wrapper a {
    font-size: 1.1rem;
    }
    .menu-wrapper {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.4s ease-in-out;
    }

    .menu-wrapper.active {
    max-height: 500px; /* suficiente para mostrar todo el menú */
    opacity: 1;
    transform: translateY(0);
    }

    @keyframes slidePitStop {
    0% {
    transform: translateY(-30px) scale(0.98);
    opacity: 0;
    }
    60% {
    transform: translateY(5px) scale(1.02);
    opacity: 0.9;
    }
    100% {
    transform: translateY(0) scale(1);
    opacity: 1;
    }
}
}

/* 🎯 SUBMENÚ DESPLEGABLE */
.has-submenu {
  position: relative;
}

.submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--item-background);
  padding: 0.5rem 0;
  list-style: none;
  min-width: 160px;
  box-shadow: var(--item-shadow);
  border-radius: var(--item-borderradius);
  z-index: 2000;
}

.submenu li a {
  display: block;
  padding: 10px 15px;
  font-size: 0.9rem;
  background-image: none;
  color: var(--primary-color);
  text-decoration: none;
  transition: background 0.3s ease;
}

.submenu li a:hover {
  background: var(--red-color);
}

.has-submenu:hover .submenu {
  display: block;
}

@media (max-width: 768px) {
  .has-submenu {
    width: 100%;
  }

  .submenu {
    position: static;
    background: none;
    box-shadow: none;
    padding-left: 1rem;
  }

  .submenu li a {
    font-size: 0.95rem;
    padding: 0.5rem 0;
    color: var(--primary-color);
  }

  .has-submenu:hover .submenu {
    display: block;
  }
}

.has-submenu {
  position: relative;
}

.submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: linear-gradient(135deg, rgba(30,30,30,0.95), rgba(60,60,60,0.8));
  animation: metalFlow 5s ease infinite;
  padding: 0.5rem 0;
  list-style: none;
  min-width: 160px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.4);
  border-radius: 4px;
  z-index: 2000;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.has-submenu:hover .submenu {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.submenu li a {
  display: block;
  padding: 10px 15px;
  font-size: 0.9rem;
  color: var(--primary-color);
  text-decoration: none;
  transition: background 0.3s ease;
}

.submenu li a:hover {
  background: var(--red-color);
}

/* Mobile: submenu al hacer click */
@media (max-width: 768px) {
  .has-submenu {
    width: 100%;
  }

  .submenu {
    position: static;
    background: none;
    animation: none;
    box-shadow: none;
    opacity: 1;
    transform: translateY(0);
    padding-left: 1rem;
    display: none; /* Importante: por defecto oculto */
  }

  .submenu li a {
    font-size: 0.95rem;
    padding: 0.5rem 0;
    color: var(--primary-color);
  }

  .has-submenu.active .submenu {
    display: block;
  }
}


/* MAIN */

.video-section-wrapper {
  width: 100%;
  height: 100vh; /* Ocupa toda la altura de la pantalla */
  position: relative;
  overflow: hidden;
}

.video-wrapper video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  transform: translate(-50%, -50%);
  object-fit: cover;
  z-index: -1; /* Para que puedas superponer contenido encima si querés */
}

.video-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
}

.video-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.719); /* Ajustá el 0.4 para más o menos oscuridad */
  z-index: 0; /* Debajo del contenido, pero encima del video */
}

.video-content {
  position: absolute;
  top: 46%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  text-align: center;
  color: white;
}

.video-logo {
  width: 900px;
  margin-bottom: 1rem;
}

.video-texto {
  font-size: 1.3rem;
  font-weight: 500;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.375);
  font-family: "formula1Bold", sans-serif;
}

.video-section-wrapper::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100px; /* Ajustá según lo que necesites */
  background: linear-gradient(to bottom, transparent, #1A1A24); /* o tu color de fondo */
  z-index: 1;
  pointer-events: none;
}

.main-wrapper{
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 0;
}

.main-first{
    max-width: 725px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.title-container{
    color: var(--primary-color);
    width:90%;
}

.title-container h1 {
    font-family: "Formula1Bold", sans-serif;
    font-weight: 800;
    font-size: 3rem;
}

.title-container p {
    font-family: "Rajdhani", sans-serif;
    font-weight: 400;
    font-size: 1.5rem;
}

.title-container button{
    background-color: var(--red-color);
    color: var(--primary-color);
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-family: "Orbitron", sans-serif;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: var(--item-shadow);
}

.title-container button:hover {
    background-color: #c10500;
    box-shadow: 0px 0px 8px #efefef;
}



/* VIDEO MAIN */

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* relación 16:9 */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    border-radius: 20px;
    box-shadow: var(--item-shadow);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* CAROUSEL CARRERAS */

.proximas-carreras-carousel {
  width: 100%;
  overflow: hidden;
  background-color: #1A1A24; 
  padding: 6rem 0 1rem 0;
}

.carousel {
  display: flex;
  width: max-content;
  animation: scrollCarousel 400s linear infinite;
}

.carrera-card {
  flex: 0 0 auto;
  width: 300px;
  margin: 0 1rem;
  background-color: var(--item-background);
  color: var(--primary-color);
  border-radius: 16px;
  padding: 1rem;
  text-align: center;
  box-shadow: var(--item-shadow);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  border: 1px solid var(--primary-color);
  height: 120px;
  cursor: pointer;
}

.carrera-card:hover {
  transform: scale(1.05);
  box-shadow: 0 0 10px rgba(201, 201, 201, 0.807);
}

.carrera-info{
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.carrera-details{
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    height: 85px;
    justify-content: space-between;
    width: 59%;
}

.carrera-card h3 {
  font-size: 1rem;
  color: var(--red-color);
  font-family: "formula1Bold", sans-serif;
  text-align: left;
}

.carrera-card h4 {
  font-size: 0.8rem;
  font-weight: normal;
  color: var(--primary-color);
  font-family: "formula1Bold", sans-serif;
    text-align: left;
}

.carrera-card p {
  font-size: 0.6rem;
  color: var(--primary-color);
  font-family: "formula1Bold", sans-serif;
    text-align: left;
}

.carrera-image{
  width: 150px;
  height: auto;
}

/* Animación de scroll horizontal hacia la izquierda */
@keyframes scrollCarousel {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}





/* SECOND SECTION */

.second-section-wrapper{
    background-color: #1A1A24;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 4.5rem 0rem 3rem 0rem;
    
}

.second-section-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}

/* PROXIMA CARRERA Y ESTADISTICAS */

.estadisticas-actuales-container{
  width: 100%;
  background: #313233b3;
  border-radius: var(--item-borderradius);
  box-shadow: var(--item-shadow);
  display: flex;
  flex-direction: column;
  padding: 2rem;
}

.countdown-wrapper {
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  text-align: center;
  font-family: "formula1Bold", sans-serif;
  width: 100%;
  padding-bottom: 1rem;
  border-bottom: 1px solid #525259;
}

.countdown-label {
  display: block;
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 5px;
}

.countdown-display{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.countdown-number{
  font-size: 2rem;
  color: var(--primary-color);
}

.countdown-segment{
  display: flex;
  flex-direction: column;
}

.countdown-text{
  font-size: 0.6rem;
  color: var(--red-color);
}

.next-race-text{
  display: flex;
  flex-direction: column;
}

.next-race-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  margin-bottom: 1rem;
}

.next-race-data{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  color: var(--primary-color);
  border-left: 5px solid var(--red-color);
  padding-left: 1rem;
}

.next-race-flag {
  width: 50px;
  height: auto;
  border-radius: 2px;
}

.next-race-title{
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  align-items: center;
  margin-top: 0.4rem;
}

.next-race-title h3{
  font-size: 2rem;
  color: var(--primary-color);
  text-transform: uppercase;
}

.next-race-name {
  font-size: 1rem;
  color: var(--primary-color);
  font-weight: bold;
}

.next-race-image{
  max-width: 100px;
  width: 100%;
}

.next-race-image img{
  width: 100%;
}

/* POSICIONES ACTUALES */

.posiciones-container{
  width: 100%;
  display: flex;
  justify-content: space-around;
  margin: 2rem 0;
  border-bottom: 1px solid #525259;
  padding-bottom: 2rem;
}

.posiciones{
  display: flex;
  flex-direction: column;
  width: 50%;
}

.pilotos, .equipos{
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  flex-wrap: wrap;
}

.posiciones h3{
  font-family: 'formula1Bold', sans-serif;
  text-align: center;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  font-size: 1.4rem;
  text-decoration: underline;
  text-decoration-color: var(--red-color);
}

.top-piloto, .top-equipo{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.pos{
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--red-color);
  color: var(--primary-color);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-family: 'formula1Bold', sans-serif;
}

.piloto-imagen, .equipo-imagen{
  height: 80px;
  overflow: hidden;
}

.piloto-img{
  max-width: 120px;
  width: 100%;
  filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.5));
}

.equipo-img{
  max-width: 80px;
  width: 100%;
}

.equipo-info, .piloto-info{
  display: flex;
  flex-direction: column;
  text-align: center;
  color: var(--primary-color);
  font-family: 'formula1Regular', sans-serif;
}

.carreras-pendientes{
  text-align: center;
}

.carreras-pendientes h3{
  font-size: 1.5rem;
  color: var(--primary-color);
  font-family: "formula1Bold", sans-serif;
}

.carreras-pendientes span{
  color: var(--red-color);
}

/* VIDEOS PRINCIPALES */

.videos-container{
  display: flex;  
  width: 100%;
  gap: 1rem;
  margin-top: 60px;
}

.video-principal{
  width: 100%;
  display: flex;
  justify-content: space-between;
}

.video-principal-yt{
  max-width: 715px;
  width: 100%;
  border-radius: var(--item-borderradius);
  box-shadow: var(--item-shadow);
}

.latest-video, .video-item, .video-item-destacado{
    position: relative;
    cursor: pointer;
}

.latest-video:hover .video-info, .video-item:hover .video-info, .video-item-destacado:hover .video-info{
    background-color: var(--red-color);
    box-shadow: 0 0 10px var(--red-color);
}

.latest-video img{
    width: 100%;
    border-radius: var(--item-borderradius);
}

.video-item img{
    width: 100%;
    border-radius: var(--item-borderradius);
    height: 160px;
    object-fit: cover;
}
.video-info{
    margin-top: 0.5rem;
    font-family: 'Rajdhani', sans-serif;
    color: var(--primary-color);
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--item-background);
    border-radius: 0 0 var(--item-borderradius) var(--item-borderradius);
    padding: 1rem;
    width: 100%;
}


.video-title{
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
}

.video-author{
    font-weight: 500;
    font-size: 1rem;
    margin-bottom: 0.3rem;
}


.red-line{
  background-color: var(--red-color);
  width: 5px;
  height: 537px;
  border-radius: 100px;
}

.video-recomendaciones{
  width: 30%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  height: 537px;
  justify-content: space-between;
}

#ytTrack-Featured{
    display: flex;
  flex-direction: column;
  height: 537px;
  justify-content: space-between;
}

.videos-subtitle{
    font-family: 'Rajdhani', sans-serif !important;
    font-weight: 500 !important;
    font-size: 1.5rem !important;
    line-height: 38px !important;
    color: var(--primary-color) !important;
    text-align: center !important;
    margin-bottom: 1rem !important;
 } 

.videos-subtitle2{
  font-family: 'Rajdhani', sans-serif !important;
  font-weight: 700 !important;
  font-size: 2rem !important;
  color: var(--primary-color) !important;
  text-decoration: underline !important;
  text-decoration-color: var(--red-color) !important;
  margin-bottom: 2rem !important;
}


.videos-text{
  text-align: center;
  max-width: 1200px;
  padding: 4rem 0 1rem 0;
  margin: 0 auto;
}


/* THIRD SECTION */

.third-section-wrapper {
    background-image: url(../img/bg6.webp);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 0 3.5rem 0rem;
}

.third-section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}

.third-section-card{
  width: 100%;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.third-section-card-image{
  width: 50%;
}

.third-section-card-image img {
  width: 100%;
  height: auto;
  border-radius: var(--item-borderradius);
  box-shadow: var(--item-shadow);
}

.third-section-card-text{
  text-align: center;
  width: 50%;
  font-family: "formula1Bold", sans-serif;
  color: var(--primary-color);
  font-size: 2rem;
}

@keyframes backgroundSpeedEffect {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 100% 50%;
  }
}

.third-section-wrapper {
  animation: backgroundSpeedEffect;
  animation-duration: 8s;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  animation-direction: alternate;
}


/* Estilos básicos */
.section {
  opacity: 0;
  transform: translateY(50px); /* Ajusta la posición inicial */
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Clase que se añadirá cuando se haya desplazado hasta el elemento */
  .section.visible {
    opacity: 1;
    transform: translateY(0); /* Vuelve a la posición original */
  }


/* SOCIAL MEDIA */

.social-media-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-direction: column;
    padding: 3rem;
}

.social-media-wrapper h2 {
    font-family: "formula1Bold", sans-serif;
    text-transform: uppercase;
    font-weight: 800;
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-decoration: underline;
    text-decoration-color: var(--red-color);
}

.social-media-icons{
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.social-icon {
    width: 4rem;
    height: auto;
}

.social-icon img {
    width: 100%;
    height: auto;
    border-radius: 50%;
    transition: transform 0.5s ease-in-out, box-shadow 0.3s ease;
    cursor: pointer;
}

.social-icon img:hover {
    transform: scale(1.1);
    box-shadow: 0px 0px 8px #9e9e9e;
}

/* NOTICIAS - FOURTH SECTION */

.fourth-section-wrapper{
    background-color: #1A1A24;
    padding: 3.5rem 0rem;
}

.fourth-section-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

.fourth-section-container h2 {
    font-family: "formula1Bold", sans-serif;
    font-weight: 800;
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    border-left: 5px solid var(--red-color);
    padding-left: 1rem;
    margin-top: 2rem;
}

.fourth-section-container p {
    font-family: "Rajdhani", sans-serif;
    font-weight: 400;
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.instagram-container{
  width: 100%;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 6rem;
}

#eapps-instagram-feed-1 .eapps-instagram-feed-posts-item-overlay .eapps-instagram-feed-posts-item-content, #eapps-instagram-feed-1 .eapps-instagram-feed-posts-item-overlay .eapps-instagram-feed-posts-item-text{
  font-family: 'Rajdhani', sans-serif !important;
  font-weight: 600 !important;
  color: var(--primary-color) !important;
}
/*FOOTER*/

footer {
    color: var(--primary-color);
    padding: 1rem 2rem;
    text-align: center;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: linear-gradient(135deg, rgba(30,30,30,0.7), rgba(60,60,60,0.6), rgba(20,20,20,0.7));
    background-size: 200% 200%;
    animation: metalFlow 5s ease infinite;
    box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.footer-container{
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo-media-container{
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
}

.footer-logo{
    max-width: 200px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer-logo img {
    width: 100%;
    height: auto;
}
.footer-container p {
    font-family: "Rajdhani", sans-serif;
    font-weight: 400;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

footer a {
    color: var(--red-color);
    text-decoration: none;
    font-weight: 600;
}
footer a:hover {
    text-decoration: underline;
}
footer .social-icons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
    cursor: pointer;
}

footer .social-icons a {
    color: var(--primary-color);
    font-size: 1.5rem;
    transition: color 0.3s ease;
}
footer .social-icons a:hover {
    color: var(--red-color);
}
footer .social-icons img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    transition: transform 0.3s ease;
}
footer .social-icons img:hover {
    transform: scale(1.1);
    box-shadow: 0px 0px 8px #9e9e9e;
}

.footer-links{
  width: 100%;
  margin: auto;
  display: flex;
  
}

.footer-links ul{
  display: flex;
  margin: auto;
  width: 100%;
  justify-content: flex-start;
  gap: 1.5rem;
}

.footer-links ul li{
  list-style: none;
  font-family: "Rajdhani", sans-serif;
  font-weight: 500;
  color: var(--primary-color);
  text-align: left;
}

.footer-links ul li a{
  color: var(--primary-color);
  text-decoration: none;
  font-size: 1rem;
}

#disclaimer{
    font-family: "Rajdhani", sans-serif;
    font-weight: 400;
    font-size: 0.8rem;
    color: var(--primary-color);
    margin-top: 1rem;
    width: 510px;
    text-align: right;
    margin-left: auto;
}


#credits {
  font-family: "Rajdhani", sans-serif;
  font-weight: 400;
  font-size: 0.9rem;
  color: var(--primary-color);
  margin-top: 1rem;
  text-align: right;
}

#credits a {
  color: var(--primary-color);
}

#copy{
  font-family: "Rajdhani", sans-serif;
  font-weight: 600;
  font-size: 1rem !important;
  color: var(--primary-color);
  margin-top: 1rem;
}

/* SPOFITY */

#spotify-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #1DB954;
  border: none;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  padding: 10px;
  cursor: pointer;
  z-index: 999;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
  transition: transform 0.3s ease;
}

#spotify-btn:hover {
  transform: scale(1.1);
}

#spotify-btn img {
  width: 100%;
  height: 100%;
}

#spotify-player {
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 300px;
  z-index: 998;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#spotify-player.hidden {
  display: none;
}

.hidden {
  display: none;
}

#spotify-btn {
  transition: opacity 0.4s ease, visibility 0.4s ease;
  opacity: 1;
  visibility: visible;
}

#spotify-btn.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#spotify-btn.fade-in {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* HORARIO PROXIMA CARRERA */

.proxima-carrera-horario{
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding-top: 5rem;
}

.proxima-carrera-horario img{
  width: 100%;
  height: auto;
}

.hidden-on-desktop{
  display: none;
}


/* BANNER CON ULTIMO POSTEO */

#entrada-principal-blog{
  max-width: 1200px;
  width: 100%;
  background-color: #313233b3;
  border-radius: var(--item-borderradius);
  margin: 2rem auto 0;
  padding: 2rem;
}

.post-index-container{
  display: flex;
  gap: 2rem;
  align-items: center;
  justify-content: space-between;
}

#entrada-principal-blog h2 {
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--primary-color);
  font-family: "Formula1Bold", sans-serif;
  display:inline;                 /* para que el ancho sea el del texto */
  font-size:1.5rem;
  margin-bottom:.5rem;
  text-decoration: underline;     /* multi-línea real */
  text-decoration-color: transparent; 
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  transition: text-decoration-color .25s ease;
}

#entrada-principal-blog:hover h2 {
  text-decoration-color: var(--red-color);
}

#entrada-principal-blog:hover button{
  text-decoration-color: var(--red-color);
}

.info-post{
  display: flex;
  align-items: center;
  gap: 10px;
}

#entrada-principal-blog p{
  font-family: "Rajdhani", sans-serif;
  color: var(--primary-color);
  font-size: 1.2rem;
}

.adrian-perfil{
  width: 45px;
  height: 45px;
  border-radius: 50%;
}

#entrada-principal-blog a {
  text-decoration: none;
}

.post-link{
  display: flex;
  flex-direction: column;
}

.post-info-blog{
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex-direction: column;
}

.post-action{
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 24px;
}
.post-action button{
  background-color: var(--red-color);
  color: var(--primary-color);
  border: none;
  border-radius: var(--item-borderradius);
  padding: 0.5rem 1rem;
  font-size: 1.2rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-family: "Formula1Bold", sans-serif;
  margin: auto;
}

.post-imagen-index{
  max-width: 350px;
  width: 100%;
}

.post-image-index{
  width: 100%;
  height: auto ;
  border-radius: var(--item-borderradius);
}

/* YT EN VIVO */

#live-section{
  width: 1200px;
  width: 100%;
}
.video-wrap{
  position:relative;
  width:100%;
  margin:auto;
  border-radius:12px;
  overflow:hidden;
}
.video-wrap::before{
  content:"";
  display:block;
  padding-top:56.25%;
} /* 16:9 */
.video-inner{
  position:absolute;
  inset:0;
}
.video-inner iframe{
  width:100%;
  height:100%;
  border:0;
}
.badge-live{
  position:absolute;
  top:12px;
  left:12px;
  background:var(--red-color);
  color:var(--primary-color);
  padding:.35rem .6rem;
  border-radius:999px;
  font-size:.9rem;
  font-family: "Formula1-Regular",sans-serif;
}


/* FOOTER LINKS MODALS */

.legal-modal{
  position:fixed;
  inset:0;
  display:none;
  z-index:9999
}
.legal-modal[aria-hidden="false"]{
  display:block
}
.legal-backdrop{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.6);
  backdrop-filter:saturate(120%) blur(2px)
}
.legal-dialog{
  position:relative;
  margin:6vh auto;
  max-width:900px;
  width:92%;
  background-color: var(--item-background);
  color:#e9e9e9;
  border-radius:12px;
  padding:24px;
  max-height:88vh;
  overflow:auto;
  border:1px solid rgba(255,255,255,.08);
  font-family: "rajdhani",sans-serif;
  font-weight: 500;
  font-size: 1rem;
}
.legal-close{
  position:absolute;
  top:10px;
  right:10px;
  font-size:28px;
  background:transparent;
  border:0;
  color:#fff;
  cursor:pointer;
}
.legal-content h3,.legal-content h4{
  margin:14px 0 6px;
}
.legal-content p,.legal-content li{
  line-height:1.6;
}
.legal-content ul{
  padding-left:18px;
}
.legal-links a{
  cursor:pointer;
  color: var(--red-color);
}

.legal-content a{
  color: var(--red-color);
}



/* --- RESPONSIVE DESIGN --- */
@media (max-width: 1024px) {
  .menu-wrapper-list {
    gap: 1rem;
  }
}

@media (max-width: 768px) {
  #entrada-principal-blog{
    width: 90%;
  }
  .post-action{
    margin-top: 1rem;
  }
  #entrada-principal-blog h2{
    font-size: 1.8rem;
  }
  #entrada-principal-blog p{
    font-size: 1rem;
  }
  .adrian-perfil {
    width: 40px;
    height: 40px;
    border-radius: 50%;
  } 
  .video-content{
    width: 80%;
  }
  .video-logo{
    width: 100%;
  }
  .video-texto{
    font-size: 1.2rem;
  }
  .estadisticas-actuales-container{
    width: 90%;
  }
  .countdown-wrapper{
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }
  .menu-wrapper-list {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .next-race-data{
    border: none;
    padding: 0;
    align-items: center;
  }
  .posiciones-container{
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 1rem;
  }
  .posiciones{
    width: 100%;
  }
  .videos-container{
    flex-direction: column;
    align-items: center;
    width: 90%;
    gap: 2rem;
    height: auto;
  }
  .video-principal{
    width: 100%;
  }
  .video-recomendaciones{
    flex-direction: row;
    width: 100%;
    border-top: 8px solid var(--red-color);
    padding-top: 2rem;
    height: auto;
  }
  .red-line{
    display: none;
  }
  .videos-text{
    width: 90%;
    margin: auto;
  }
  .video-principal-yt{
    height: auto;
    padding-bottom: 2rem;
  }
  .third-section-wrapper{
    padding: 0;
  }
  .third-section-container{
    width: 90%;
    padding: 0;
  }
  .third-section-card-image{
    width: 55%;
  }
  .third-section-card-text{
    font-size: 1.5rem;
  }
  .fourth-section-container{
    width: 90%;
  }
  .fourth-section-container h2{
    font-size: 1.8rem;
  }
  .fourth-section-container p{
    font-size: 1.2rem;
  }
  .footer-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
  }
  .footer-links ul{
    justify-content: center;
    flex-direction: column;
    align-items: center;
  }
  .footer-links ul li{
    text-align: center;
  }
  .footer-container p{
    margin-bottom: 0;
  }
  .social-media-wrapper{
    width: 100%;
    margin: auto;
  }
  .social-media-wrapper h2{
    font-size: 1.5rem;
    text-align: center;
  }
  .social-icon{
    width: 3rem;
  }
  .footer-logo img {
    width: 150px;
  }
  #yottie_2 .yottie-widget-feed{
    background-color: transparent !important;
  }
  .footer-links{
    flex-direction: column;
  }
  #disclaimer{
    text-align: center;
    width: 100%;
  }
  #credits{
    text-align: center;
  }
  #live-section{
    width: 90%;
  }
  .video-principal{
    flex-direction: column;
  }
  #ytTrack-Featured{
    flex-direction: row;
    width: 100%;
    height: auto;
  }
  .video-title{
    font-size: 1rem;
  }
  .video-info{
    padding: 0.5rem;
  }
}

@media (max-width: 480px) {
    html, body {
    overflow-x: hidden !important;
  }
  .video-recomendaciones{
    height: auto;
  }
  .videos-container{
    height: auto;
  }
  .logo-wrapper{
    max-width: 275px;
  }
  #spotify-btn{
    bottom: 20px;
    right: 20px;
  }
  .countdown-label{
    font-size: 1.7rem;
  }
  .next-race-title{
    flex-direction: column;
  }
  .next-race-title h3, .posiciones h3{
    font-size: 1.5rem;
  }
  .pilotos, .equipos{
    gap: 2rem;
  }
  .social-media-icons{
    gap: 1rem;
  }
  .video-texto{
    font-size: 1rem;
  }
  .third-section-card{
    flex-direction: column;
  }
  .column-reverse{
    flex-direction: column-reverse;
  }
  .third-section-card-image{
    width: 90%;
  }
  .third-section-card-text{
    width: 84%;
  }
  .menu-wrapper-list {
    font-size: 0.95rem;
  }
  .social-icon{
    width: 2.5rem;
  }
  .videos-subtitle{
    font-size: 1.2rem !important;
  }
  .videos-subtitle2{
    font-size: 1.5rem !important;
  }
  .logo-media-container{
    flex-direction: column;
  }
  #disclaimer{
    width: auto;
  }
  .footer-links ul li{
    text-align: center;
  }
  .footer-links ul{
    flex-direction: column;
    gap: 0.5rem;
  }
  .yottie-widget-video-preview-play{
    width: 34px !important;
  }
  .hidden-on-mobile{
  display: none;
  }
  .hidden-on-desktop{
    display: block;
  }
  .proxima-carrera-horario{
    width: 90%;
    padding-top: 3rem;
  }
  .post-index-container{
    flex-direction: column;
    gap: 1rem;
  }
  .second-section-wrapper{
    padding-top: 0rem;
  }
}


/* DESTACADOS CAROUSEL*/

/* Featured: carrusel mobile aislado */
@media (max-width: 450px) {
  .video-recomendaciones { position: relative; }

  .video-recomendaciones #ytTrack-Featured {
    display: flex !important;
    flex-wrap: nowrap;
    gap: 1rem;
    width: 100% !important;       /* evita width: 80% heredado */
    justify-content: initial !important;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;        /* espacio para flechas */
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .video-recomendaciones #ytTrack-Featured::-webkit-scrollbar { display: none; }

  .video-recomendaciones #ytTrack-Featured .video-item,
  .video-recomendaciones #ytTrack-Featured .video-item-destacado {
    flex: 0 0 90%;
    min-width: 90%;
    max-width: 90%;
    width: auto !important;        /* pisa calc(100%/3 - 1rem) si existiera */
    scroll-snap-align: center;
    scroll-snap-stop: always;
    border-radius: var(--item-borderradius);
    overflow: hidden;
  }

  .video-recomendaciones #ytTrack-Featured .video-thumbnail {
    display: block;
    width: 100%;
    height: auto;
  }

  /* Flechas únicas de Featured */
  .ytf-btn {
    position: absolute !important;
    top: 60% !important;
    transform: translateY(-50%) !important;
    width: 30px !important;
    height: 30px !important;
    font-weight: 700 !important;
    font-family: "rajdhani", sans-serif !important;
    border: none !important;
    border-radius: 50% !important;
    background-color: #202125 !important;
    color: var(--red-color) !important;
    font-size: 1.5rem !important;
    display: flex !important;                /* visibles en mobile */
    place-items: center !important;
    cursor: pointer !important;
    z-index: 5 !important;
    -webkit-tap-highlight-color: transparent !important;
    box-shadow: 0 0 5px var(--red-color) !important;
    justify-content: center !important;
  }
  .ytf-btn.ytf-prev { left: 0.25rem; }
  .ytf-btn.ytf-next { right: 0.25rem; }
}

/* Desktop: ocultar flechas Featured */
@media (min-width: 769px) {
  .ytf-btn { display: none; }
}



.mapps-instagram-feed-RMay9{
  padding: 0 !important;
}