:root {
  --primary-color: #ff6f00;
  --body-bg: url(/img/detalles-de-la-pelota-en-el-deporte.jpg) center/cover no-repeat;
  --text-color: #fdfbfb;
  --link-hover-bg: #ff6f00;
  --nav-bg: #161616;
}

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: 'PT Sans', sans-serif;
  background: #d9402b;
  background: linear-gradient(86deg, rgb(194, 59, 41) 0%, rgba(69, 69, 115, 1) 38%, rgba(157, 191, 199, 1) 100%);
  color: var(--text-color);
  line-height: 1.6;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  margin-bottom: 1rem;
  color: var(--text-color);
}

a {
  text-decoration: none;
  color: var(--text-color)
}

p {
  margin-bottom: 1rem;
  color: var(--text-color);
}

/* Buttons */
.button,
.button-whatsapp,
.button-youtube,
.button-web {
  display: inline-block;
  padding: 0.5rem 1rem;
  text-decoration: none;
  font-weight: 600;
  border: none;
  border-radius: 5px;
  transition: background-color 0.3s;
}

.button {
  background-color: var(--primary-color);
  color: var(--nav-bg);
}

.button:hover {
  background-color: #e65c0094;
  color: var(--text-color);
}

.button-whatsapp {
  background-color: #25D366;
  color: var(--nav-bg);
}

.button-whatsapp:hover {
  background-color: #1ebe5c;
  color: var(--text-color);
}

.button-youtube {
  background-color: #ca0000;
  color: var(--text-color);
}

.button-youtube:hover {
  background-color: #ff0000;
  color: var(--text-color);
}

.button-web {
  background-color: #007bff;
  color: var(--text-color);
}

.button-web:hover {
  background-color: #0056b3;
  color: var(--text-color);
}

/* Header */
header {
  background: var(--body-bg);
  padding: 10px 0;
  border-bottom: 3px solid var(--primary-color);
  text-align: center;
}

.webp header {
  background-image: url(/img/detalles-de-la-pelota-en-el-deporte.webp);
}

.no-webp header {
  background-image: url(/img/detalles-de-la-pelota-en-el-deporte.jpg);
}

.logo-container img.logo {
  max-width: 180px;
  height: auto;
  transition: transform 0.3s ease;
  border-radius: 50%;
}

/* Search & Social */
.search-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 10px 0;
}

.search-container input[type="text"] {
  padding: 10px;
  width: 200px;
  border: 1px solid var(--primary-color);
  border-radius: 5px;
  background: #fff;
}

.search-container button {
  padding: 10px 15px;
  margin-left: 10px;
  background-color: var(--primary-color);
  color: #121212;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.search-container button:hover {
  background-color: #e65c00;
}

.highlight {
  background-color: none;
}

.active-match {
  background-color: orange;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.social-icons a {
  color: var(--text-color);
  font-size: 1.5em;
}

.social-icons a:hover {
  color: var(--primary-color);
}

/* Navigation */
nav {
  background: var(--nav-bg);
  border-bottom: 3px solid var(--primary-color);
  padding: 10px 0;
  position: sticky;
  top: 0;
}

nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

nav select.liga-select {
  padding: 10px;
  border: 1px solid var(--primary-color);
  border-radius: 5px;
  background: var(--header-bg);
  color: var(--text-color);
  cursor: pointer;
}

nav select.liga-select option {
  background: var(--nav-bg);
  color: var(--text-color);
}

nav select.liga-select option:hover {
  background: var(--link-hover-bg);
  color: #121212;
}

nav a {
  color: var(--text-color);
  padding: 5px 10px;
  text-decoration: none;
  border-radius: 5px;
}

nav a:hover,
nav a.active {
  background-color: var(--link-hover-bg);
  color: #121212;
}

nav a.live-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.live-dot {
  width: 5px;
  height: 5px;
  background-color: red;
  border-radius: 50%;
  animation: pulse 1.2s infinite;
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.5);
    opacity: 0.6;
  }
}

/* Sections */
section {
  padding: 20px;
  margin: 20px auto;
  max-width: 70rem;
  background: rgba(30, 30, 30, 0.8);
  border-radius: 10px;
}

.home-section h2 {
  text-align: center;
  font-size: 2rem;
  color: var(--text-color);
  margin-bottom: 1.5rem;
}

.home-section h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--primary-color);
  margin: 0.5rem auto 0;
  border-radius: 2px;
}

/* Logos in service-section */
.logos-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.logo-img {
  width: 100px;
  object-fit: contain;
  border-radius: 50%;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.logo-img:hover {
  transform: scale(1.1);
}

/* Flexible content container */
.service-container {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}

.service-content {
  flex: 1;
  min-width: 250px;
}

.features {
  font-size: 1.2em;
  margin: 10px 0;
}

/* Gallery */
/* Portafolio */
.portfolio {
  max-width: 70rem;
  padding: 20px;
  margin: 20px auto;
  text-align: center;
}

.portfolio h2 {
  font-size: 2.5rem;
  margin-bottom: 3rem;
  color: var(--text-color);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.portfolio-item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
}

.portfolio-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(191, 191, 194, 0.9);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.5s;
  padding: 1rem;
  text-align: center;
  color: var(--dark);
}

.portfolio-item:hover .portfolio-overlay {
  opacity: 1;
}

.portfolio-item:hover img {
  transform: scale(1.1);
}

.portfolio-overlay h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: #161616;
}

.portfolio-overlay p {
  margin-bottom: 1rem;
  color: #121212;
}

/* Estilos mínimos de Swiper */
.swiper-container {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.swiper-slide {
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 0.5s ease;
}

.swiper-button-next,
.swiper-button-prev {
  color: var(--nav-bg);
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  cursor: pointer;
  font-size: 24px;
}

.swiper-button-next:hover {
  color: var(--text-color);
}

.swiper-button-prev:hover {
  color: var(--text-color);
}


.swiper-button-next {
  right: 10px;
}

.swiper-button-prev {
  left: 10px;
}

.swiper-pagination {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.swiper-pagination-bullet {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--link-hover-bg);
  cursor: pointer;
}

.swiper-pagination-bullet.active {
  background: var(--text-color);
}

/* Carrusel Swiper */

.portfolio-item {
  position: relative;
  width: 100%;
  max-width: 1500px;
  height: 400px;
  /* Altura fija para uniformidad */
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  margin: 0 auto;

}


/* Ajustes para las imágenes del portafolio */
.portfolio-item img {
  width: 100%;
  height: 400px;
  /* Altura fija para uniformidad */
  object-fit: contain;
  /* Mantiene relación de aspecto sin recortar */
  background: rgba(255, 255, 255, 0.05);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border-radius: 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border-left: 4px solid var(--primary-color);
  /* Fondo neutro para logos transparentes */
  padding: 1rem;
  /* Espacio alrededor del logo */


}

/* Efecto hover más suave */
.portfolio-item:hover img {
  transform: scale(1.03);
  opacity: 0.9;
}

/* Estilos para múltiples botones en el overlay */
.portfolio-overlay {
  display: flex;
  flex-direction: column;
  /* Apila los botones verticalmente */
  gap: 10px;
  /* Espacio entre botones */
  align-items: center;
  justify-content: center;
}


/* YouTube links */
.youtube-link {
  margin-left: 10px;
  color: #FF0000;
  font-size: 1.2em;
}

.youtube-link:hover {
  color: #cc0000;
}

/* Contact Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-form label {
  font-weight: bold;
}

.contact-form input,
.contact-form textarea {
  padding: 10px;
  border: 1px solid var(--primary-color);
  border-radius: 5px;
  background: #121212;
  color: var(--text-color);
}

.boton-enviar {
  padding: 10px;
  background-color: var(--primary-color);
  color: #121212;
  border: none;
  cursor: pointer;
  font-weight: bold;
  border-radius: 5px;
}

.boton-enviar:hover {
  background-color: #e65c0094;
  color: var(--text-color);
}

/*Slider*/
.slider {
  width: 100%;
  height: auto;
  margin: auto;
  overflow: hidden;
}

.slider .slide-track {
  display: flex;
  animation: scroll 30s linear infinite;
  -webkit-animation: scroll 30s linear infinite;
  width: calc(250px * 8);
  /* Ajusta según el número de imágenes */
}

.slider .slide {
  width: 200px;
}

.slider .slide img {
  width: 100%;
}

@keyframes scroll {
  0% {
    -webkit-transform: translateX(0);
    transform: translateX(0);
  }

  100% {
    -webkit-transform: translateX(calc(-200px * 4));
    transform: translateX(-200px * 4);
  }
}

/* Footer */
footer {
  background: var(--nav-bg);
  color: var(--text-color);
  text-align: center;
  padding: 10px 0;
  margin-top: 20px;
  border-top: 3px solid var(--primary-color);
}

footer p {
  margin: 5px 0;
}

footer a img {
  width: 100px;
  height: auto;
  vertical-align: middle;
}

/* Responsiveness */
@media (max-width: 768px) {
  .logo-img {
    width: 80px;
  }

  .service-container {
    flex-direction: column;
    text-align: center;
  }
}

.live-section {
  padding: 20px;
  margin: 20px auto;
  max-width: 70rem;
  background: rgba(30, 30, 30, 0.8);
  border-radius: 10px;
  text-align: center;
}

.live-section h2 {
  text-align: center;
  font-size: 2rem;
  color: var(--text-color);
  margin-bottom: 2rem;
}

.live-section h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--primary-color);
  margin: 0.5rem auto 0;
  border-radius: 2px;
}

.live-section p {
  font-size: 1.1em;
}

.live-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--primary-color);
  color: var(--nav-bg);
  padding: 0.5rem 1rem;
  font-weight: bold;
  text-decoration: none;
  border-radius: 5px;
  transition: background-color 0.3s;
}

.live-button:hover {
  background-color: #e65c0094;
  color: var(--text-color);
}

.live-dot {
  width: 10px;
  height: 10px;
  background-color: red;
  border-radius: 50%;
  animation: pulse 1.2s infinite;
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.5);
    opacity: 0.6;
  }
}

/* Responsive video container */
.video-container {
  position: relative;
  padding-bottom: 56.25%;
  /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  max-width: 100%;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  margin-top: 20px;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* =========================
   Schedule Section Mejorada
========================= */
.schedule-section {
  background: rgba(30, 30, 30, 0.9);
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.schedule-section h2 {
  text-align: center;
  font-size: 2rem;
  color: var(--text-color);
  margin-bottom: 2rem;
}

.schedule-section h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--primary-color);
  margin: 0.5rem auto 0;
  border-radius: 2px;
}

/* Cards para cada article */
.schedule-section article {
  background: rgba(255, 255, 255, 0.05);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border-radius: 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border-left: 4px solid var(--primary-color);
}

.schedule-section article:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.5);
}

.schedule-section article h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: var(--text-color);
}

.schedule-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.schedule-section li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 1rem;
  color: var(--text-color);
}

.schedule-section li:last-child {
  border-bottom: none;
}

/* Botón YouTube */
.youtube-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ff0000;
  color: white;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  font-size: 1rem;
  transition: background 0.2s ease, transform 0.2s ease;
  text-decoration: none;
}

.youtube-link:hover {
  background: #cc0000;
  transform: scale(1.15);
}

.service-section .service-content h2 {
  text-align: center;
  font-size: 2rem;
  color: var(--text-color);
  margin-bottom: 1.5rem;
}

.service-section .service-content h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--primary-color);
  margin: 0.5rem auto 0;
  border-radius: 2px;
}

.news-section h2 {
  text-align: center;
  font-size: 2rem;
  color: var(--text-color);
  margin-bottom: 1.5rem;
}

.news-section h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--primary-color);
  margin: 0.5rem auto 0;
  border-radius: 2px;
}

.news-section article {
  background: rgba(255, 255, 255, 0.05);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border-radius: 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border-left: 4px solid var(--primary-color);
}

.news-section article img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  margin: 10px 0;
}

.about-section h2 {
  text-align: center;
  font-size: 2rem;
  color: var(--text-color);
  margin-bottom: 1.5rem;
}

.about-section h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--primary-color);
  margin: 0.5rem auto 0;
  border-radius: 2px;
}

.contact-section h2 {
  text-align: center;
  font-size: 2rem;
  color: var(--text-color);
  margin-bottom: 1.5rem;
}

.contact-section h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--primary-color);
  margin: 0.5rem auto 0;
  border-radius: 2px;
}

/* Botón de WhatsApp */
.whatsapp-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background-image: url('/img/pelota-basquet.ico');
  background-size: cover;
  background-position: center;
  background-color: #d38d25;
  color: rgb(32, 223, 42);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.5rem;
  box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3);
  z-index: 999;
  transition: transform 0.3s;
  text-decoration: none;
}

.whatsapp-btn:hover {
  transform: scale(1.1);
  color: white;
}

/* Responsive: grid para tablets y PC */
@media (min-width: 768px) {
  .schedule-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
  }

  .schedule-section h2 {
    grid-column: 1 / -1;
  }
}

/* ✅ Media query for smaller screens */
@media (max-width: 768px) {
  .live-section {
    padding: 15px;
  }

  .live-button {
    font-size: 0.95em;
    padding: 0.4rem 0.8rem;
  }

  .live-section p {
    font-size: 1em;
  }
}

@media (max-width: 768px) {
  html {
    font-size: 90%;
  }

  header {
    padding: 10px;
  }

  .logo-container img.logo {
    max-width: 120px;
  }

  nav ul {
    flex-direction: column;
    gap: 10px;
  }

  nav .liga-select {
    flex-direction: column;
    margin: 0 auto;
    gap: 10px;
    padding: 8px;
    border-radius: 5px;
    background: var(--header-bg);
    color: var(--text-color);
    cursor: pointer;
    width: 200px;
  }

  .search-container {
    flex-direction: column;
    gap: 10px;
  }

  .search-container input[type="text"] {
    width: 90%;
  }

  .service-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .service-content {
    width: 100%;
  }

  .logos-container {
    gap: 20px;
  }

  .logo-img {
    width: 70px;
  }

  section {
    padding: 15px;
    margin: 15px 10px;
  }

  .button,
  .button-whatsapp,
  .button-youtube,
  .button-web {
    width: 100%;
    text-align: center;
    padding: 0.5rem;
    font-size: 0.9em;
    margin: 5px 0;
  }

  .contact-form input,
  .contact-form textarea {
    width: 100%;
  }

  footer {
    padding: 15px 10px;
  }

  .social-icons {
    flex-wrap: wrap;
    gap: 10px;
  }

  .youtube-link {
    font-size: 1em;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  html {
    font-size: 95%;
  }

  .logo-container img.logo {
    max-width: 150px;
  }

  .search-container input[type="text"] {
    width: 250px;
  }

  .service-container {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }

  .mySlides img {
    height: auto;
    max-height: 400px;
  }

  .social-icons {
    gap: 10px;
  }

  .button,
  .button-whatsapp,
  .button-youtube,
  .button-web {
    padding: 0.6rem 1.2rem;
    font-size: 1rem;
  }

  .text {
    font-size: 1em;
  }
}

.hamburger {
  display: none;
  font-size: 2rem;
  color: var(--text-color);
  cursor: pointer;
  padding: 10px 20px;
}

@media (max-width: 768px) {
  .hamburger {
    display: block;
    text-align: right;
  }

  nav ul {
    display: none;
    flex-direction: column;
    gap: 10px;
    padding: 10px 0;
    background-color: var(--nav-bg);
  }

  nav ul.show {
    display: flex;
  }

  nav ul li {
    text-align: center;
    padding: 10px 0;
  }
}