/*
 * Hoja propia de la web, encima de la plantilla Tonni (plugins.css y style.css, sin tocar).
 * Lleva lo que en la web anterior estaba repartido por los componentes de Angular, cada bloque
 * acotado a su sección (allí cada componente solo se aplicaba a lo suyo), y los style="…" que
 * había en el HTML, pasados a clases: la política de seguridad no admite estilos en línea.
 * El orden es el de la página.
 */

/* ---------- Tipografías (antes, de Google Fonts; ahora, de la propia web) ---------- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fuentes/inter-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url('../fuentes/open-sans-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Open Sans';
  font-style: italic;
  font-weight: 300 800;
  font-display: swap;
  src: url('../fuentes/open-sans-latin-italic.woff2') format('woff2');
}

/* ---------- Comunes ---------- */
[hidden] { display: none !important; }

/* ---------- Cabecera ---------- */
.tonni_tm_header .logo-cabecera { width: 70px; }
.tonni_tm_header .language-selector { display: inline-block; margin-left: 20px; }

/* ---------- Portada (#home) ---------- */
#home .welcome .nameTeam:nth-child(odd) { color: var(--nameTeamColor1); text-shadow: var(--text-shadow-name-style); }
#home .welcome .nameTeam:nth-child(even) { color: var(--nameTeamColor2); text-shadow: var(--text-shadow-name-style); }
#home .welcome .nameCompeticion:nth-child(odd) { color: var(--nameTeamColor2); text-shadow: var(--text-shadow-name-style); font-size: 25px; }
#home .subname { color: var(--subNameColor1); }
@media (max-width: 600px) {
  #home .background {
    background: linear-gradient(to bottom, rgba(28,28,28,0.95) 0%, rgba(28,28,28,0.5) 65%, rgba(255,255,255,0.0) 100%);
  }
  #home .tonni_tm_hero .background .image {
    background-image: url('../img/portada/fondo.webp') !important;
    position: absolute;
    top: 100px !important;
    bottom: 17px !important;
    left: 0px;
    right: 0px;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
  }
}

/* ---------- La asociación y el mapa (#asociacion) ---------- */
#asociacion { background-color: var(--backgroundColorType2); }
#asociacion .asoc-inner { display: flex; flex-wrap: wrap; gap: 40px; align-items: center; justify-content: space-between; }
#asociacion .asoc-texto { flex: 1 1 55%; max-width: 540px; }
#asociacion .asoc-titulo { margin-bottom: 20px; }
#asociacion .asoc-objetivos { margin-top: 20px; background-color: #f2f2f2; padding: 20px; border-radius: 10px; color: #0b0b0b; }
#asociacion .asoc-objetivos ul { padding-left: 20px; list-style: disc; font-size: 16px; line-height: 1.8; }
#asociacion .asoc-direccion { margin-top: 20px; font-size: 14px; color: #666; }
#asociacion .asoc-mapa { flex: 1 1 40%; max-width: 100%; display: flex; justify-content: center; }
#asociacion .asoc-mapa-marco { border-radius: 12px; overflow: hidden; box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15); width: 100%; }
#asociacion .asoc-mapa-marco a { display: block; }
#asociacion .asoc-mapa-marco img { display: block; width: 100%; height: auto; }

/* Piezas de texto que se repiten en la asociación y en la competición */
:is(#asociacion, #las-pruebas) .gris { color: #888; }
:is(#asociacion, #las-pruebas) .titulo-32 { font-size: 32px; font-weight: 700; }
:is(#asociacion, #historia-copa, #espana-competicion) .parrafo { line-height: 1.8; font-size: 16px; color: #000; }

/* ---------- La competición: #about, #las-pruebas, #historia-copa, #espana-competicion y el dossier ---------- */
:is(#about, #las-pruebas, #historia-copa, #espana-competicion, #modal-dossier) .aboutCopa { color: #e74c3c !important; text-decoration: none !important; }
:is(#about, #las-pruebas, #historia-copa, #espana-competicion, #modal-dossier) a { color: #e74c3c !important; text-decoration: none !important; }
#las-pruebas { background-color: var(--backgroundColorType2); }
#espana-competicion { background-color: var(--backgroundColorType2); }

#about .alto-auto { height: auto; }
#about .cmp_logo { margin-top: 20px; margin-bottom: 30px; }
#about .cmp_logo img { max-width: 200px; height: auto; }
#about .competicion-destacado { background-color: #f2f2f2; padding: 20px; border-radius: 10px; font-weight: bold; margin-bottom: 20px; }
#about .negro { color: #000; }

#las-pruebas .pruebas-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 40px; }
#las-pruebas .pruebas-texto { flex: 1 1 50%; max-width: 540px; }
#las-pruebas .pruebas-titulo { margin-bottom: 30px; }
#las-pruebas .pruebas-lista { padding-left: 20px; list-style: decimal; font-size: 18px; font-weight: bold; line-height: 1.8; }
#las-pruebas .pruebas-lista li { color: #d1232a; }
#las-pruebas .pruebas-imagen { flex: 1 1 40%; display: flex; justify-content: center; align-items: center; }
#las-pruebas .pruebas-imagen img { max-width: 100%; height: auto; }

#historia-copa .historia-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 40px; }
#historia-copa .historia-imagen { flex: 1 1 40%; display: flex; justify-content: center; align-items: center; }
#historia-copa .historia-imagen img { max-width: 100%; height: auto; border-radius: 0; }
#historia-copa .historia-texto { flex: 1 1 50%; max-width: 540px; }
#historia-copa .historia-segundo { margin-top: 20px; }

#espana-competicion .aboutStyle { display: flex; flex-wrap: nowrap !important; align-items: center; justify-content: space-between; gap: 40px; }
#espana-competicion .espana-texto { flex: 1 1 50%; max-width: 540px; display: flex; align-items: flex-start; }
#espana-competicion .sin-margen { margin: 0; }
#espana-competicion .espana-destacado { flex: 1 1 50%; background-color: #FFF; padding: 40px; max-width: 540px; display: flex; flex-direction: column; justify-content: flex-start; }
#espana-competicion .espana-titulo { color: #e74c3c; margin: 0 0 20px 0; }
@media (max-width: 1615px) and (min-width: 1123px) {
  #espana-competicion .aboutStyle { display: flex; flex-wrap: nowrap !important; align-items: center; justify-content: space-between; gap: 4px !important; }
  #espana-competicion .aboutStyleContainer { max-width: 1201px !important; }
}
@media (max-width: 1123px) and (min-width: 1058px) {
  #espana-competicion .aboutStyleContainer { flex-direction: column !important; }
  :is(#about, #las-pruebas, #historia-copa, #espana-competicion) .container { padding: 0 20px !important; }
  #espana-competicion .aboutStyleContainer { display: flex; flex-wrap: nowrap !important; align-items: center !important; justify-content: space-between; gap: 40px; }
}

/* La ventana del dossier */
.modal-dossier { display: none; position: fixed; z-index: 10; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0, 0, 0, 0.5); }
.modal-dossier.active { display: block; }
.modal-dossier .modal-content { background-color: #fefefe; margin: 2% auto; padding: 1rem; border: 1px solid #888; width: 80%; max-width: 1200px; border-radius: 10px; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3); position: relative; }
.modal-dossier .close { color: #aaa; position: absolute; top: 10px; right: 20px; font-size: 28px; font-weight: bold; cursor: pointer; }
.modal-dossier iframe { display: block; width: 100%; height: 750px; border: 0; }

/* ---------- Trayectoria (#trayectoria) ---------- */
#trayectoria .tonni_tm_timeline .timeline_inner { background-color: #FFFFFF !important; }
#trayectoria .tonni_tm_timeline .timeline_list .items .image img { opacity: 1 !important; }
.separador-elegante { border: none; border-top: 2px solid rgba(204, 204, 204, 0.3); margin: 2rem auto; width: 80%; position: relative; }
.separador-elegante::after { content: "★"; position: absolute; top: -0.8em; left: 50%; transform: translateX(-50%); background: white; padding: 0 0.5em; font-size: 1.2em; color: rgba(153, 153, 153, 0.27); }

/* ---------- Patrocinios: los tres niveles (#patrocinios) ---------- */
#patrocinios .tonni_tm_service .service_in { background-color: #FFFFFF !important; }
#patrocinios .patrocinios-intro { margin-top: 20px; margin-bottom: 50px; }
#patrocinios .patrocinios-niveles { display: flex; justify-content: center; flex-wrap: wrap; gap: 40px; padding: 0; }
#patrocinios .patrocinios-niveles > li { list-style: none; }
#patrocinios .patrocinios-niveles .list_inner { text-align: center; }
#patrocinios .nivel-bronce { color: #cd7f32; }
#patrocinios .nivel-plata { color: #c0c0c0; }
#patrocinios .nivel-oro { color: #FFD700; }

/* ---------- Patrocinadores (#partners) ---------- */
#partners { background-color: var(--backgroundColorType2); }
#partners .subtitlepartners { color: #000; text-align: justify; }
#partners .tonni_tm_button a { color: #000 !important; text-align: justify !important; font-size: 20px !important; }
#partners .tonni_tm_pricing ul li .list_inner:hover .tonni_tm_button a { color: var(--extra-color) !important; }
#partners .list_inner { transition: transform 0.3s ease; }
#partners .tonni_tm_pricing ul li .list_inner:hover { transform: scale(1.05); }
#partners .titulo-oro { color: #cc9900; }
#partners .titulo-plata { color: #999999; }
#partners .titulo-bronce { color: #cd7f32; }
#partners .grid-partners { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 30px; margin: 30px 0; }
#partners .partner-card {
  position: relative;
  background: #fdf9f6;
  border-radius: 20px;
  padding: 30px 20px 40px 20px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  text-align: center;
  transition: transform 0.3s ease;
}
#partners .partner-card.tarjeta-oro { background: #ffdc88c9; }
#partners .partner-card.tarjeta-plata { background: #c0c0c0c9; }
#partners .partner-card.tarjeta-bronce { background: #cd7f32c9; }
#partners .partner-card:hover { transform: translateY(-5px); }
#partners .partner-card h4 { font-size: 20px; font-weight: bold; margin-bottom: 15px; }
#partners .partner-card img { max-height: 60px; margin-bottom: 15px; }
/* En Angular esta regla solo tocaba el párrafo de fuera, no los que traía el texto: por eso va en el contenedor */
#partners .partner-card .partner-texto { font-size: 14px; color: #555; min-height: 80px; }
#partners .partner-card::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 180px;
  background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 1440 320" xmlns="http://www.w3.org/2000/svg"><path fill="%23ffffff" fill-opacity="1" d="M0,256L48,234.7C96,213,192,171,288,165.3C384,160,480,192,576,218.7C672,245,768,267,864,250.7C960,235,1056,181,1152,170.7C1248,160,1344,192,1392,208L1440,224L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"/></svg>') no-repeat bottom center;
  background-size: cover;
  z-index: 1;
}
#partners .partner-card::after { content: ''; position: absolute; top: 20px; right: 20px; width: 40px; height: 40px; background: rgba(0, 0, 0, 0.03); border-radius: 50%; z-index: 1; }
#partners .partner-card > * { position: relative; z-index: 1; }
:is(#partners, .pagina-404) .btn-more { display: inline-block; margin-top: 15px; padding: 8px 16px; background: #cc0000; color: #fff; border-radius: 8px; text-decoration: none; font-weight: bold; }
:is(#partners, .pagina-404) .btn-more:hover { background: #a00000; }

/* ---------- El equipo (#portfolio) y los asesores (#advisors) ---------- */
/* .list-item también sale en la ventana de detalle, que init.js copia dentro de .tonni_tm_modalbox */
:is(#portfolio, #advisors, .tonni_tm_modalbox) .list-item { display: list-item; list-style-type: disc; margin-left: 20px; }
:is(#portfolio, #advisors) .dinamicImage { height: 369.98px; }
:is(#portfolio, #advisors) .nameMember { font-size: 19px; }
:is(#portfolio, #advisors) .titleMember { font-size: 15px !important; }
#portfolio { background-color: #FFFFFF !important; }
#portfolio .subtitle { color: #000; text-align: left; }
#advisors .subtitle { color: #000; text-align: left; }
#advisors { background-color: var(--backgroundColorType2); }
:is(#portfolio, #advisors) .team-two-columns { display: flex; align-items: center; justify-content: center; gap: 60px; padding: 80px 0; margin-bottom: 100px; flex-wrap: wrap; }
:is(#portfolio, #advisors) .team-two-columns .team-text { flex: 1 !important; max-width: 550px; min-width: 280px; }
:is(#portfolio, #advisors) .team-two-columns .team-text h3 { font-size: 36px; font-weight: bold; margin-bottom: 20px; }
:is(#portfolio, #advisors) .team-two-columns .team-text p { font-size: 18px; line-height: 1.6; color: #333; }
#portfolio .textTeam { text-align: justify !important; }
#advisors .textTeam { text-align: justify !important; color: #0b0b0b; font-size: 15.5px; }
@media (min-width: 1024px) {
  #advisors .tonni_tm_portfolio .portfolio_list ul li { width: 33.3333% !important; }
}

/* Con dos o tres personas: una fila centrada en lugar de la rejilla de masonry */
#portfolio .portfolio_list ul.equipo-pocos { display: flex; flex-wrap: wrap; justify-content: center; }
#portfolio .portfolio_list ul.equipo-pocos > li { float: none; }

/* Con una sola persona en el equipo: ficha grande, foto a un lado y sus datos al otro */
#portfolio .team-solo { padding-bottom: 40px; margin-bottom: 40px; }
#portfolio .equipo-destacado {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); max-width: 1000px; margin: 0 auto 40px;
  background: #F8F5EF; border-radius: 12px; overflow: hidden; box-shadow: 0 14px 30px rgba(187, 182, 173, 0.35);
}
#portfolio .equipo-foto { position: relative; min-height: 100%; }
#portfolio .equipo-foto img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
#portfolio .equipo-foto .main { display: none; }   /* solo guarda las fotos para la ventana de detalle */
#portfolio .equipo-datos { padding: 48px 52px; display: flex; flex-direction: column; justify-content: center; }
#portfolio .equipo-nombre {
  font-family: var(--font-family-extra); font-weight: 700; font-size: 34px; line-height: 1.1;
  color: var(--extra-color); text-transform: uppercase; letter-spacing: .01em;
}
#portfolio .equipo-cargo { font-family: var(--font-family-extra); font-size: 18px; font-weight: 600; line-height: 1.4; color: #000; margin: 10px 0 0; }
#portfolio .equipo-cita {
  margin: 26px 0; padding: 2px 0 2px 20px; border-left: 3px solid var(--extra-color);
  font-size: 17px; line-height: 1.6; font-style: italic; color: #333;
}
#portfolio .equipo-ficha { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0; font-size: 15px; line-height: 1.5; color: #333; }
#portfolio .equipo-ficha dt { font-weight: 700; color: #000; }
#portfolio .equipo-ficha dd { margin: 0; }
#portfolio .equipo-ficha ul { margin: 0; padding-left: 18px; list-style: disc; }
#portfolio .equipo-boton {
  align-self: flex-start; margin-top: 30px; padding: 12px 26px; border-radius: 999px;
  background: var(--extra-color); color: #fff; font-family: var(--font-family-extra); font-weight: 600; font-size: 15px; text-decoration: none;
  transition: background .2s ease;
}
#portfolio .equipo-boton:hover, #portfolio .equipo-boton:focus-visible { background: #a00000; color: #fff; }
@media (max-width: 860px) {
  #portfolio .equipo-destacado { grid-template-columns: 1fr; max-width: 520px; }
  #portfolio .equipo-foto img { aspect-ratio: 4 / 4; }
  #portfolio .equipo-datos { padding: 32px 26px; }
  #portfolio .equipo-nombre { font-size: 28px; }
  #portfolio .equipo-ficha { grid-template-columns: 1fr; gap: 2px; }
  #portfolio .equipo-ficha dd { margin-bottom: 10px; }
}

/* ---------- Noticias (#news) ---------- */
#news { background-color: var(--backgroundColorType2) !important; }
#news .tonni_tm_news .news_inner { padding: 100px 0; border-radius: 20px; }
:is(#news, .tonni_tm_modalbox) .grid-gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 50px; margin-top: 20px; }
:is(#news, .tonni_tm_modalbox) .gallery-image { width: 100%; height: auto; object-fit: cover; border-radius: 8px; }

/* ---------- Contacto (#contact) ---------- */
#contact .emoji { font-size: 40px; }
#contact .contacto-marca { opacity: 10%; }
#contact .copyright a { color: inherit; }
#contact .copyright a:hover { color: var(--extra-color); }

/* La ventana del formulario */
.modal-contacto {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  justify-content: center;
  align-items: center;
}
.modal-contacto.active { display: flex; }
.modal-contacto .modal-content {
  background: #fff;
  border-radius: 8px;
  max-width: 600px;
  width: 90%;
  max-height: 100vh;
  overflow-y: auto;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
  padding: 40px;
  position: relative;
  margin: 0 auto;
}
.modal-contacto .close { position: absolute; right: 20px; top: 18px; font-size: 2rem; color: #222; cursor: pointer; }
.modal-contacto .contact_title { margin-bottom: 1.2rem; text-align: left; }
.modal-contacto .contact_title span { font-size: 1.1rem; color: #E74C3C; font-weight: bold; display: block; margin-bottom: 2px; }
.modal-contacto .contact_title h3 { font-size: 1.4rem; font-weight: 700; margin: 0 0 16px 0; color: #222; }
.modal-contacto .contact_form ul { list-style: none; padding: 0; margin: 0; }
.modal-contacto .contact_form ul li { margin-bottom: 14px; }
.modal-contacto .contact_form input,
.modal-contacto .contact_form select,
.modal-contacto .contact_form textarea { width: 100%; padding: 10px 12px; font-size: 1rem; border: 1px solid #ddd; border-radius: 6px; margin-bottom: 0; transition: border 0.2s; }
.modal-contacto .contact_form input:focus,
.modal-contacto .contact_form textarea:focus,
.modal-contacto .contact_form select:focus { border: 1.5px solid #E74C3C; outline: none; }
.modal-contacto .contact_form textarea { min-height: 70px; resize: vertical; }
.modal-contacto .contact_form input[type="checkbox"] { width: auto; margin-right: 7px; }
.modal-contacto .tonni_tm_button { text-align: right; margin-top: 10px; }
.modal-contacto .tonni_tm_button button {
  background: #E74C3C;
  color: #fff;
  border: none;
  padding: 9px 22px;
  border-radius: 7px;
  font-size: 1.1rem;
  cursor: pointer;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(231,76,60,0.13);
  transition: background 0.18s;
  display: flex;
  align-items: center;
  gap: 8px;
}
.modal-contacto .tonni_tm_button button:hover { background: #c0392b; }
.modal-contacto .empty_notice_custom { padding: 15px 15px 15px 0px; font-size: 16px; color: #d1232a; }
.modal-contacto .error { font-size: 12px; color: #d1232a; }
.modal-contacto .loading-container { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.5); display: flex; justify-content: center; align-items: center; z-index: 10; }
.modal-contacto .spinner { border: 4px solid rgba(255, 255, 255, 0.3); border-top: 4px solid #ffffff; border-radius: 50%; width: 50px; height: 50px; animation: giro 1s linear infinite; }
@keyframes giro { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
/* Lo que no tenía la web anterior: la casilla de privacidad y el campo trampa contra robots */
.modal-contacto .contacto-pausado { margin: 24px 0 8px; font-size: 17px; line-height: 1.7; color: #333; }
.modal-contacto .contacto-pausado a { color: #E74C3C; font-weight: 600; text-decoration: underline; }
.modal-contacto .contacto-privacidad { margin-top: 14px; font-size: 14px; line-height: 1.5; color: #333; }
.modal-contacto .contacto-privacidad label { display: flex; align-items: flex-start; gap: 4px; cursor: pointer; }
.modal-contacto .contacto-privacidad input[type="checkbox"] { margin-top: 3px; }
.modal-contacto .contacto-privacidad a { color: #E74C3C; text-decoration: underline; }
.modal-contacto .contacto-info { margin-top: 6px; font-size: 12px; color: #666; }
.modal-contacto .campo-trampa { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Páginas legales y 404 ---------- */
.pagina-legal, .pagina-404 { padding: 170px 0 100px; }
.legal-cuerpo { max-width: 820px; margin: 0 auto; color: #222; font-size: 16px; line-height: 1.7; }
.legal-cuerpo h1 { font-size: 36px; margin-bottom: 30px; }
.legal-cuerpo h1 small { font-size: 16px; font-weight: 400; color: #666; }
.legal-cuerpo h2 { font-size: 22px; margin: 30px 0 10px; }
.legal-cuerpo p, .legal-cuerpo ul { margin-bottom: 14px; }
.legal-cuerpo ul { padding-left: 20px; list-style: disc; }
.legal-cuerpo a { color: #e74c3c; }
.legal-cuerpo mark.pendiente { background: #ffe066; padding: 0 4px; }
.legal-volver { margin-top: 40px; }
.error-404 { text-align: center; max-width: 640px; margin: 0 auto; }
.pagina-404 .error-404 .error-404-numero { font-size: 120px; font-weight: 700; line-height: 1; color: #d1232a; }
.error-404 h1 { font-size: 32px; margin: 20px 0; }
.pagina-404 .error-404 p { font-size: 18px; color: #555; }

/* ---------- Reducir movimiento ---------- */
/* Quien lo pide en su sistema no ve nada moverse: transiciones y animaciones, instantáneas (el
   precargador, el zoom de las fotos, las ventanas, el pin del mapa). Las de aparición al bajar
   (WOW) ni se ponen en marcha: init.js. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important;
    transition-duration: .01ms !important; transition-delay: 0s !important; scroll-behavior: auto !important;
  }
}
