/* ================= VARIABLES (REGLA 70/20/10) ================= */
:root {
  /* 70% - Colores Dominantes (Fondos oscuros y agresivos) */
  --bg-dark: #121212;
  --bg-darker: #0a0a0a;

  /* 20% - Colores Secundarios (Textos, fondos de respiro) */
  --text-light: #f5f5f5;
  --bg-light: #e0e0e0;
  --text-dark: #1a1a1a;

  /* 10% - Color de Acento (Rojo logo para CTAs y Hover) */
  --rojo-boxeo: #d32f2f;
  --rojo-hover: #b71c1c;

  /* Tipografías */
  --font-titulos: "Oswald", sans-serif;
  --font-textos: "Roboto", sans-serif;
}

/* ================= RESET Y AJUSTES GLOBALES ================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-textos);
  background-color: var(--bg-dark);
  color: var(--text-light);
  line-height: 1.6;
}

h1,
h2,
h3 {
  font-family: var(--font-titulos);
  text-transform: uppercase;
  letter-spacing: 1px;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

/* ================= CONTENEDORES GLOBALES ================= */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.seccion-oscura {
  background-color: var(--bg-dark);
  padding: 80px 0;
}

.seccion-clara {
  background-color: var(--bg-light);
  color: var(--text-dark);
  padding: 80px 0;
}

/* ================= BOTONES (ACENTO 10%) ================= */
.redes-sociales {
  display: flex;
  gap: 20px;
}

.link-redes {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 50px;
  height: 50px;
  background-color: #1a1a1a;
  border-radius: 50%;
  color: var(--text-light);
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.link-redes svg {
  width: 24px;
  height: 24px;
  transition: transform 0.3s ease;
}

.link-redes:hover {
  background-color: var(--rojo-boxeo);
  color: #ffffff;
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(211, 47, 47, 0.4);
}

.link-redes:hover svg {
  transform: scale(1.15);
}

/* ================= CABECERA Y NAVEGACIÓN ================= */
header {
  background-color: var(--bg-darker);
  position: fixed;
  top: 0;
  width: 100%;
  height: 80px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 40px;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.logo {
  height: 60px;
  border-radius: 50%;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 30px;
}

.nav-links li a {
  font-family: var(--font-titulos);
  font-size: 1.1rem;
}

.nav-links li a:hover {
  color: var(--rojo-boxeo);
}

.menu-toggle {
  display: block;
  width: 30px;
  height: 20px;
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
}

/* ================= BOTONES (ACENTO 10%) ================= */
.btn-cta {
  display: inline-block;
  background-color: var(--rojo-boxeo);
  color: #ffffff;
  padding: 15px 40px;
  font-family: var(--font-titulos);
  font-size: 1.3rem;
  border-radius: 5px;
  transition:
    background-color 0.3s ease,
    transform 0.2s ease;
  border: none;
  cursor: pointer;
  font-weight: bold;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  text-decoration: none;
}

.btn-cta:hover {
  background-color: var(--rojo-hover);
  transform: translateY(-3px);
}

.btn-secundario {
  background-color: transparent;
  color: var(--rojo-boxeo);
  border: 2px solid var(--rojo-boxeo);
  box-shadow: none;
}

.btn-secundario:hover {
  background-color: var(--rojo-boxeo);
  color: #ffffff;
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(211, 47, 47, 0.4);
}

.btn-sobre-mi {
  margin-top: 15px;
  display: inline-block;
}

/* ================= SECCIÓN HERO (INICIO) ================= */
.hero {
  height: 100vh;
  margin-top: 80px;
  position: relative;
  background-image:
    linear-gradient(rgba(18, 18, 18, 0.7), rgba(18, 18, 18, 0.9)),
    url("assets/img/hero.webp");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 150px;
  background: linear-gradient(to bottom, transparent, var(--bg-dark));
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-content h1 {
  font-size: 4rem;
  margin-bottom: 10px;
  color: #fff;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
}

.hero-content p {
  font-size: 1.5rem;
  margin-bottom: 40px;
  color: var(--text-light);
}

/* ================= LOGO GIGANTE EN INICIO ================= */
.logo-gigante {
  width: 250px;
  border-radius: 50%;
  display: block;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  animation: flotar 4s ease-in-out infinite;
}

.logo-wrap {
  display: inline-block;
  position: relative;
  margin-bottom: 20px;
}

.logo-wrap::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background-color: rgba(211, 47, 47, 0.7);
  filter: blur(40px);
  z-index: 1;
  pointer-events: none;
}

@keyframes flotar {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0px);
  }
}

/* ================= SECCIÓN SOBRE MÍ ================= */
.flex-container {
  display: flex;
  align-items: center;
  gap: 50px;
}

.imagen-entrenador {
  flex: 1;
  max-width: 450px;
  background-color: var(--bg-darker);
  border-radius: 8px;
  border-bottom: 5px solid var(--rojo-boxeo);
  margin: 0 auto;
}

.imagen-entrenador img {
  width: 100%;
  height: auto;
  display: block;
  object-position: center;
  border-radius: 8px;
}

.texto-entrenador {
  flex: 1;
}

.texto-entrenador h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  color: var(--rojo-boxeo);
}

.texto-entrenador p {
  margin-bottom: 15px;
  font-size: 1.1rem;
}

/* ================= SECCIÓN HORARIOS ================= */
#horarios h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 40px;
}

.tabla-horarios {
  width: 100%;
  border-collapse: collapse;
  background-color: #fff;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.tabla-horarios th,
.tabla-horarios td {
  padding: 15px;
  text-align: center;
  border: 1px solid #ccc;
}

.tabla-horarios th {
  background-color: var(--bg-darker);
  color: var(--text-light);
  font-family: var(--font-titulos);
  font-size: 1.2rem;
}

.tabla-horarios tbody tr:nth-child(even) {
  background-color: #f9f9f9;
}

.tabla-horarios tbody tr:hover {
  background-color: #ffebee;
}

.categoria-label {
  font-family: var(--font-titulos);
  font-weight: bold;
  text-transform: uppercase;
  background-color: #f0f0f0;
  color: var(--text-dark);
}

.hora-destacada {
  line-height: 1.4;
  font-weight: 500;
}

/* ================= SECCIÓN EQUIPACIÓN ================= */
#equipacion {
  text-align: center;
  position: relative;
  overflow: hidden;
}

#equipacion h2 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.nota-equipacion {
  color: #aaa;
  margin-bottom: 40px;
  font-style: italic;
}

.grid-equipacion {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.item-equipacion {
  background-color: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.video-fondo {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translateX(-50%) translateY(-50%);
  object-fit: cover;
  z-index: 0;
  opacity: 0.05;
  pointer-events: none;
}

.contenido-equipacion {
  position: relative;
  z-index: 1;
}

/* ================= HOVER DE TARJETAS (SOLO ORDENADORES) ================= */
@media (min-width: 769px) {
  .item-equipacion:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  }
}

.img-container {
  width: 100%;
  background-color: #000;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
  border-radius: 12px 12px 0 0;
}

.img-container img {
  width: 100%;
  height: auto;
  display: block;
  transition: opacity 0.5s ease;
  color: transparent;

  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0) scale(1.01);
  -webkit-transform: translateZ(0) scale(1.01);
}

.hover-effect .img-front {
  z-index: 1;
}

.hover-effect .img-back {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  z-index: 2;
  transition: opacity 0.4s ease;
}

.item-equipacion.flipped .hover-effect .img-back {
  opacity: 1;
  transform: translateZ(0) scale(1.01);
}

.item-equipacion.flipped .hover-effect .img-front {
  opacity: 0;
  transform: translateZ(0) scale(1.01);
}

.info-equipacion {
  padding: 25px 20px;
  text-align: center;
  background-color: #ffffff;
}

.info-equipacion h3 {
  color: var(--text-dark);
  font-size: 1.2rem;
  margin-bottom: 0;
  font-family: var(--font-titulos);
}

.mobile-hint {
  display: none;
}

.item-equipacion.flipped .mobile-hint {
  opacity: 0;
}

@media (max-width: 768px) {
  .item-equipacion.flipped .hover-effect .img-back {
    opacity: 1;
    transform: translateZ(0) scale(1.01);
  }
  .item-equipacion.flipped .hover-effect .img-front {
    opacity: 0;
    transform: translateZ(0) scale(1.01);
  }

  .item-equipacion.flipped .mobile-hint {
    opacity: 0;
  }
}

@media (min-width: 769px) {
  .item-equipacion:hover .hover-effect .img-back {
    opacity: 1;
    transform: translateZ(0) scale(1.01);
  }
  .item-equipacion:hover .hover-effect .img-front {
    opacity: 0;
    transform: translateZ(0) scale(1.01);
  }
}

/* ================= FOOTER ================= */
footer.seccion-oscura {
  border-top: 2px solid var(--rojo-boxeo);
  padding-top: 60px;
  padding-bottom: 20px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.info-contacto h2 {
  color: var(--rojo-boxeo);
  margin-bottom: 15px;
}

.redes-sociales {
  display: flex;
  gap: 15px;
}

.copyright {
  text-align: center;
  color: #777;
  font-size: 0.9rem;
  border-top: 1px solid #333;
  padding-top: 20px;
  margin-top: 10px;
}

.creditos-creador {
  margin-top: 5px;
  font-size: 0.85rem;
  color: #555;
}

.creditos-creador a {
  color: var(--rojo-boxeo);
  font-weight: bold;
  transition: color 0.3s ease;
}

.creditos-creador a:hover {
  color: var(--text-light);
  text-decoration: underline;
}

.link-contacto {
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.3s ease;
}

.link-contacto:hover {
  color: var(--rojo-boxeo);
  text-decoration: underline;
}

/* ================= RESPONSIVE PRO (MÓVILES Y TABLETS) ================= */
@media (max-width: 768px) {
  /* --- 1. AJUSTES GLOBALES Y LAYOUT --- */
  .seccion-oscura,
  .seccion-clara {
    padding: 50px 0;
  }

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

  /* --- 2. CABECERA Y NAVEGACIÓN (HAMBURGUESA) --- */
  .menu-toggle {
    display: block;
    width: 30px;
    height: 20px;
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
  }

  .menu-toggle .linea {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--rojo-boxeo);
    border-radius: 3px;
    position: absolute;
    left: 0;
    transition: all 0.3s ease;
  }

  .menu-toggle .top {
    top: 0px;
  }

  .menu-toggle .middle {
    top: 8px;
  }

  .menu-toggle .bottom {
    top: 16px;
  }

  /* Animación a X al abrir el menú */
  .menu-toggle.open .middle {
    opacity: 0;
    transform: translateX(-15px);
  }

  .menu-toggle.open .top {
    transform: translateY(8px) rotate(45deg);
  }

  .menu-toggle.open .bottom {
    transform: translateY(-8px) rotate(-45deg);
  }

  /* Estilos del menú desplegado */
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    background-color: var(--bg-darker);
    padding: 10px 0;
    text-align: center;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.5);
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links li {
    margin: 15px 0;
  }

  /* --- 3. SECCIÓN INICIO (HERO) --- */
  .logo-gigante {
    width: 180px;
  }

  .logo-wrap::after {
    width: 100px;
    height: 100px;
    filter: blur(30px);
  }

  .hero-content h1 {
    font-size: 2.5rem;
    line-height: 1.2;
  }

  .hero-content p {
    font-size: 1.1rem;
    padding: 0 15px;
  }

  /* --- 4. SECCIÓN SOBRE MÍ --- */
  .imagen-entrenador {
    width: 100%;
    max-width: 350px;
    margin: 0 auto;
  }

  .texto-entrenador {
    text-align: center;
  }

  .btn-sobre-mi {
    display: block;
    width: fit-content;
    margin: 15px auto 0 auto;
    max-width: 100%;
  }

  /* --- 5. SECCIÓN HORARIOS (TABLA A TARJETAS) --- */
  .contenedor-tabla {
    overflow-x: hidden;
    padding: 0;
    margin: 0;
  }

  .tabla-horarios,
  .tabla-horarios tbody,
  .tabla-horarios tr,
  .tabla-horarios td {
    display: block;
    width: 100%;
  }

  .tabla-horarios {
    background-color: transparent;
    box-shadow: none;
  }

  .tabla-horarios thead {
    display: none;
  }

  .tabla-horarios tr {
    margin-bottom: 25px;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  }

  .tabla-horarios td {
    background-color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: right;
    border: none;
    border-bottom: 1px solid #eee;
    padding: 12px 20px;
  }

  .tabla-horarios td:last-child {
    border-bottom: none;
  }

  .tabla-horarios td.categoria-label {
    background-color: var(--bg-darker);
    color: var(--text-light);
    justify-content: center;
    font-size: 1.3rem;
  }

  .tabla-horarios td[data-dia]::before {
    content: attr(data-dia);
    font-family: var(--font-titulos);
    font-weight: bold;
    color: var(--rojo-boxeo);
    text-transform: uppercase;
  }

  .categoria-label {
    min-width: 100px;
  }

  /* --- 6. SECCIÓN EQUIPACIÓN --- */
  .mobile-hint {
    display: block;
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--rojo-boxeo);
    color: #ffffff;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: var(--font-titulos);
    font-size: 0.7rem;
    text-transform: uppercase;
    z-index: 10;
    pointer-events: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    opacity: 0.9;
    transition: opacity 0.3s ease;
  }

  .video-fondo {
    display: none;
  }

  /* --- 7. FOOTER Y REDES SOCIALES --- */
  .footer-content {
    flex-direction: column;
    text-align: center;
    gap: 30px;
  }

  .redes-sociales {
    justify-content: center;
  }
}
