/* ===== GENERAL ===== */
html, body {
  height: 100%;
  margin: 0;
  font-family: Inter, sans-serif;
  background: #000;
  color: #fff;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.white {
  color: #ffffff important!;
}

/* ===== HERO ===== */
.hero {
  position: relative;
  height: 100vh;
  background-image: url('../img/fondo.jpg');
  background-size: cover;
  background-position: center;
  flex: 1;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: rgba(0,0,0,0.6);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
}

h1 {
  font-family: 'League Gothic', serif;
  font-size: clamp(2.5rem, 5vw, 4rem);
  letter-spacing: 1px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.subtitle {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 300;
  letter-spacing: .5px;
  color: #fff;
  margin-bottom: 1.5rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* ===== BUTTON ===== */
.btn-primary {
  color: #fff;
  background-color: transparent;
  border: 2px solid #FF3131;
  border-radius: 999px;
  padding: .5rem 1.5rem;
  font-size: 1.1rem;
  opacity: 0;
  transition: all .3s ease, opacity .3s ease;
}

.btn-primary:hover {
  color: #fff;
  background-color: #FF3131;
  border-color: #FF3131;
}

/* ===== LANGUAGE DROPDOWN ===== */
.language-dropdown {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1050;
}

.language-dropdown .dropdown-toggle {
  background-color: #111;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 6px;
  width: 80px;
  text-align: left;
  padding: 4px 10px;
  appearance: none;
}

.language-dropdown .dropdown-toggle::after { display: none; }

.language-dropdown .dropdown-menu {
  background-color: #111;
  min-width: 0;
  width: 100%;
  box-shadow: none;
}

.language-dropdown .dropdown-item {
  color: #fff;
  text-align: left;
  transition: all .2s;
}

.language-dropdown .dropdown-item:hover {
  background-color: #FF3131;
  color: #fff;
}

/* ===== CONTACT ===== */
.contact p { 
  font-size: 1.2rem; 
  margin-bottom: .5rem; 
}

.contact a:not(.btn) {
  position: relative;
  color: #fff;
  text-decoration: none;
  letter-spacing: .5px;
  font-size: 1.2rem;
  transition: color .3s;
}

.contact a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: #FF3131;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s ease;
}

.contact a:not(.btn):hover { 
  color: #FF3131; 
}

.contact a:not(.btn):hover::after { 
  transform: scaleX(1); 
}

/* ===== FOOTER ===== */
.sfwc-footer {
  background: #000;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: .95rem;
  padding: 1rem 0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  gap: 1rem;
}

.footer-left {
  color: #fff;
  letter-spacing: 1px;
}

.footer-left span {
  display: inline-block;
  vertical-align: middle;
}

.footer-year {
  font-weight: 300;
  color: #fff;
  margin-left: .25rem;
  vertical-align: middle;
}

.footer-link {
  position: relative;
  color: #fff;
  text-decoration: none;
  letter-spacing: .5px;
  transition: .3s;
}

.footer-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1px;
  background: #FF3131;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s ease;
}

.footer-link:hover {
  color: #FF3131;
}

.footer-link:hover::after {
  transform: scaleX(1);
}

.social-icon {
  color: rgba(255,255,255,.7);
  font-size: 1.2rem;
  transition: .3s;
}

.social-icon:hover {
  color: #FF3131;
  transform: translateY(-3px) scale(1.1);
}

.sfwc-footer .footer-inner {
  /* Padding normal para escritorio */
  padding: 1rem 0;
}

/* ===== FOOTER RESPONSIVE ===== */
@media (max-width: 768px) {
  .sfwc-footer .footer-inner {
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important;
    text-align: center !important;
    justify-content: space-between !important;

    /* Padding inferior seguro para móviles y safe area iOS */
    padding-bottom: calc(1rem + env(safe-area-inset-bottom)) !important;
  }

  /* Cambiar el orden de los elementos */
  .sfwc-footer .footer-left {
    order: 3 !important;  /* SFWC + año al final */
  }

  .sfwc-footer .footer-links {
    order: 2 !important;  /* links al principio */
  }

  .sfwc-footer .footer-social {
    order: 1 !important;  /* iconos sociales en medio */
  }
}

/* MODALES ANCHOS EN ESCRITORIO */
@media (min-width: 992px) {
  .modal-wide {
    max-width: 900px;
  }
}

@media (min-width: 1200px) {
  .modal-wide {
    max-width: 1100px;
  }
}

@media (min-width: 1400px) {
  .modal-wide {
    max-width: 1200px;
  }
}

/* Mejorar lectura contenido legal */
.modal-wide .modal-body {
  font-size: 1.05rem;
  line-height: 1.7;
  letter-spacing: 0.2px;
  padding: 2rem;
}

.modal-wide h1,
.modal-wide h2,
.modal-wide h3 {
  font-weight: 400;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

.modal-wide p {
  margin-bottom: 1rem;
}

.modal-wide ul {
  padding-left: 1.2rem;
  margin-bottom: 1rem;
}

@media (min-width: 992px) {
  .modal-wide .modal-content {
    height: 85vh;
    display: flex;
    flex-direction: column;
  }

  .modal-wide .modal-body {
    flex: 1;
    overflow-y: auto;
  }
}

/* ===== MODAL PDF PRO ===== */
@media (min-width: 992px) {
  .modal-reglamento {
    max-width: 75vw;  /* casi pantalla completa */
    margin: 1.5rem auto;
  }

  .modal-reglamento .modal-content {
    height: 87.5vh; /* casi toda la altura */
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .modal-reglamento .modal-header {
    padding: 1rem 1.5rem;
  }

  .modal-reglamento .modal-body {
    flex: 1;
    padding: 0;
    background: #111;
  }

  .modal-reglamento iframe {
    width: 100%;
    height: 100%;
    border: none;
  }
}

/* ===== MODAL CONTENT ===== */
.modal-content {
  box-shadow: 0 25px 60px rgba(0,0,0,0.6);
}

@media (max-width: 991px) {
  #rulesIframe {
    height: 70vh;      /* ocupa buena parte de la pantalla sin romper scroll */
    width: 100%;
  }

  .modal-reglamento .modal-body {
    padding: 0;
  }
}

/* ===== MODAL FONTS ===== */
.custom-header {
  background-color: ; /* Fondo oscuro */
  color: #f8f9fa; /* Texto claro */
}

.custom-h1 {
  color: #f8f9fa important!; /* Color claro para el texto */
}

/* ===== MODAL LINKS ===== */
.modal-body a {
  color: #ffffff !important; /* Color blanco por defecto */
  text-decoration: none; /* Evitar subrayado */
  letter-spacing: .5px;
  font-size: 1.2rem;
  position: relative; /* Necesario para el pseudo-elemento ::after */
  transition: color 0.3s, transform 0.3s; /* Animación suave para color y transform */
}

.modal-body a:hover {
  color: #FF3131 !important; /* Color rojo al pasar el ratón */
  transform: scale(1.05); /* Leve aumento de tamaño al pasar el ratón */
}

/* Añadir la línea roja bajo el enlace, solo cuando se hace hover */
.modal-body a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: #FF3131;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s ease;
}

/* Al hacer hover, la línea debajo del enlace se hace visible */
.modal-body a:hover::after {
  transform: scaleX(1);
}