/* ==========================================================================
   Subasta Futbolera — ajustes WordPress sobre el design system del mockup
   ========================================================================== */

/* WP: menú principal */
.nav .menu {
  display: flex;
  align-items: center;
  gap: 26px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav .menu li {
  margin: 0;
  padding: 0;
}
.nav .current-menu-item > a,
.nav .current_page_item > a,
.nav .current-menu-ancestor > a,
.nav .current_page_ancestor > a {
  border-color: var(--yellow);
  color: var(--green);
}

/* WP: logo */
.custom-logo-link {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}
.custom-logo {
  height: 44px;
  width: auto;
  display: block;
}

/* WP: menú del footer */
.site-footer .footer-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-footer .footer-menu li {
  margin: 0;
}
.site-footer .copy a {
  color: inherit;
}
.footer-brand-text {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #fff;
}

/* WP: accesibilidad */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

/* Header: bloque con .wrap a ancho completo (el flex va dentro de .wrap) */
body .site-header {
  display: block;
}

/* Barra de admin */
body.admin-bar .site-header {
  top: 32px;
}

/* Acciones del header: Jugar siempre visible + hamburguesa en móvil */
.header-actions {
  display: none;
}
.nav-cta,
.header-cta {
  white-space: nowrap;
}

/* Botón hamburguesa (móvil) */
.nav-toggle {
  display: none;
  margin-left: 0;
  background: none;
  border: 0;
  padding: 10px;
  cursor: pointer;
  color: var(--ink);
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 24px;
  height: 2px;
  background: currentColor;
  position: relative;
  transition: transform .2s var(--ease), background-color .2s var(--ease);
}
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}
.nav-toggle-bars::before { top: -7px; }
.nav-toggle-bars::after { top: 7px; }

@media (max-width: 980px) {
  .site-header .wrap {
    position: static;
    height: 64px;
    gap: 10px;
  }
  .header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
  }
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 0;
  }
  .nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    margin-left: 0;
    padding: 14px 24px 22px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .site-header.nav-open .nav {
    display: flex;
  }
  .nav .menu {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }
  .nav .menu a {
    display: block;
    padding: 11px 0;
    font-size: 16px;
  }
  .nav .btn {
    display: none;
  }
  .site-header.nav-open .nav-toggle-bars {
    background: transparent;
  }
  .site-header.nav-open .nav-toggle-bars::before {
    top: 0;
    transform: rotate(45deg);
  }
  .site-header.nav-open .nav-toggle-bars::after {
    top: 0;
    transform: rotate(-45deg);
  }
}

@media screen and (max-width: 782px) {
  body.admin-bar .site-header {
    top: 46px;
  }
}

/* Contenido de artículos (Gutenberg) */
.article img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
}
.article .wp-block-image {
  margin: 32px 0;
}
.article .wp-block-image figcaption {
  font-size: 13.5px;
  color: var(--muted-2);
  margin-top: 10px;
}
.article .wp-block-quote {
  border-left: 4px solid var(--yellow);
  margin: 34px 0;
  padding: 6px 0 6px 22px;
}
.article .wp-block-quote p {
  font-family: var(--font-display);
  font-size: 26px;
  line-height: 1.3;
  color: var(--green-800);
  font-weight: 500;
}
.article ul,
.article ol {
  margin: 0 0 1.2em 1.3em;
  color: var(--ink-soft);
  font-size: 19px;
  line-height: 1.75;
}
.article a {
  color: var(--green);
  text-decoration: underline;
  text-underline-position: under;
}
.article iframe,
.article video {
  max-width: 100%;
  border-radius: var(--radius);
}

/* Portada de historia/dato */
.article-cover {
  background-size: cover !important;
  background-position: center 30% !important;
}
.article-cover .crumb a {
  color: inherit;
  text-decoration: none;
}
.article-cover .crumb a:hover {
  color: #fff;
}

/* Instrucciones del partido */
.captain .cap-role {
  color: var(--yellow);
}

/* Página genérica */
.page-head + .section .article {
  padding-top: 24px;
}

/* El bloque de contenido de Elementor no debe romper el ancho del artículo */
.article .elementor {
  max-width: 100%;
}

/* Archivo: la destacada ocupa 2 columnas y 2 filas para que la columna
   derecha se complete con dos tarjetas (como el mockup). */
.archive-grid .archive-featured {
  grid-column: span 2;
  grid-row: span 2;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.archive-grid .archive-featured .media {
  flex: 1 1 auto;
  aspect-ratio: auto !important;
  min-height: 320px;
}
.archive-grid .archive-featured .media img {
  height: 100%;
  object-fit: cover;
}
@media (max-width: 640px) {
  .archive-grid .archive-featured {
    grid-column: auto;
    grid-row: auto;
  }
  .archive-grid .archive-featured .media {
    min-height: 240px;
  }
}

/* Formulario de contacto (Contact Form 7) */
.wpcf7-form p {
  margin: 0 0 18px;
}
.wpcf7-form label {
  display: block;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: 13px;
  color: var(--green-800);
  margin-bottom: 6px;
}
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form textarea {
  width: 100%;
  max-width: 560px;
  padding: 12px 14px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: #fff;
}
.wpcf7-form input:focus,
.wpcf7-form textarea:focus {
  outline: 2px solid var(--green);
  outline-offset: 1px;
  border-color: var(--green);
}
.wpcf7-form textarea {
  min-height: 150px;
  resize: vertical;
}
.wpcf7-form input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--green);
  color: #fff;
  border: 0;
  border-radius: var(--radius-pill);
  padding: 13px 26px;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color .2s var(--ease), transform .2s var(--ease);
}
.wpcf7-form input[type="submit"]:hover {
  background: var(--green-800);
  transform: translateY(-1px);
}
.wpcf7-response-output {
  max-width: 560px;
  border-radius: 10px;
  padding: 12px 16px;
}
.wpcf7 form.sent .wpcf7-response-output {
  border-color: var(--green);
  background: var(--green-050);
  color: var(--green-800);
}

/* Grid de partidos: evita que una competición larga ensanche la columna */
.fixture {
  min-width: 0;
}
.fixture .comp {
  gap: 8px;
}
.fixture .comp span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* AA: textos pequeños de tarjetas y migas */
.fixture .comp {
  color: var(--green);
}
.fixture .vs {
  color: var(--muted);
}
.crumb a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* -------------------------------------------------------------------------
 * Header/Footer H&F (Elementor): widgets nativos, misma línea visual
 * ---------------------------------------------------------------------- */
#masthead {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
body.admin-bar #masthead {
  top: 32px;
}
#masthead .sf-hf-header {
  background: transparent !important;
  border: 0 !important;
  min-height: 72px;
  margin: 0 auto;
}
#masthead .elementor-widget-site-logo img {
  height: 44px;
  width: auto;
}
#masthead .sf-hf-header-right {
  flex-wrap: nowrap;
}
#masthead .sf-hf-nav .hfe-menu-item {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ink);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: border-color .2s var(--ease), color .2s var(--ease);
}
#masthead .sf-hf-nav .hfe-menu-item:hover,
#masthead .sf-hf-nav .current-menu-item > .hfe-menu-item,
#masthead .sf-hf-nav .hfe-menu-item.active {
  border-color: var(--yellow);
  color: var(--green);
}
#masthead .sf-hf-nav .hfe-nav-menu__toggle {
  color: var(--ink);
  margin-left: 0;
}
#masthead .sf-hf-cta .elementor-button {
  background: var(--green);
  color: #fff;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
}
#masthead .sf-hf-cta .elementor-button:hover {
  background: var(--green-800);
}
#colophon {
  background: #1a1a1a;
  color: #fff;
}
#colophon .sf-hf-footer {
  background: transparent !important;
}
#colophon .sf-hf-footer-logo img {
  max-height: 48px;
  width: auto;
}
#colophon .sf-hf-footer-text p {
  margin: 0;
  color: #d9d9d9;
  font-size: 14.5px;
  line-height: 1.6;
}
#colophon .sf-hf-footer-heading h4 {
  margin: 0;
  color: #fff;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}
#colophon .sf-hf-footer-nav .hfe-menu-item {
  color: #d9d9d9;
  font-size: 15px;
  padding: 3px 0;
}
#colophon .sf-hf-footer-nav .hfe-menu-item:hover,
#colophon .sf-hf-footer-nav .current-menu-item > .hfe-menu-item {
  color: #fff;
}
#colophon .sf-hf-footer-bottom-text p {
  margin: 0;
  color: #bdbdbd;
  font-size: 13px;
}
#colophon .sf-hf-footer-bottom-text a {
  color: #d9d9d9;
}
@media (max-width: 980px) {
  body.admin-bar #masthead {
    top: 46px;
  }
  #masthead .sf-hf-header {
    min-height: 64px;
    padding-left: 24px !important;
    padding-right: 24px !important;
  }
  #masthead .sf-hf-header-right {
    gap: 8px !important;
  }
  #masthead .sf-hf-header-right > .elementor-widget-button {
    order: 1;
  }
  #masthead .sf-hf-header-right > .elementor-widget-navigation-menu {
    order: 2;
  }
  #masthead .sf-hf-nav .hfe-nav-menu__toggle {
    display: inline-flex;
  }
}

/* H&F móvil: Jugar + hamburguesa sin solaparse y alineados a la derecha */
@media (max-width: 1024px) {
  #masthead .sf-hf-header {
    justify-content: space-between !important;
    align-items: center !important;
  }
  #masthead .sf-hf-header-right {
    justify-content: flex-end !important;
    align-items: center !important;
  }
  #masthead .sf-hf-header-right > .elementor-widget-navigation-menu {
    width: 44px;
    flex: 0 0 44px;
    position: relative;
  }
  #masthead .sf-hf-header-right > .elementor-widget-navigation-menu .hfe-nav-menu__toggle {
    position: relative;
    right: auto;
    top: auto;
    margin: 0;
  }
  #masthead .sf-hf-cta .elementor-button {
    padding: 12px 20px;
  }
}

/* H&F móvil: panel de menú a ancho completo, blanco y sobre el hero */
@media (max-width: 1024px) {
  #masthead .sf-hf-header-right > .elementor-widget-navigation-menu {
    position: static;
  }
  #masthead .sf-hf-nav .hfe-nav-menu__layout-horizontal {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    padding: 14px 24px 22px;
    z-index: 60;
  }
  #masthead .sf-hf-nav .hfe-nav-menu__layout-horizontal .hfe-nav-menu {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
  }
  #masthead .sf-hf-nav .hfe-nav-menu__layout-horizontal .hfe-nav-menu li {
    width: 100%;
  }
  #masthead .sf-hf-nav .hfe-nav-menu__layout-horizontal .hfe-menu-item {
    display: block;
    width: 100%;
    padding: 9px 0;
    font-size: 16px;
    border-bottom: 0;
  }
  #masthead .sf-hf-nav .hfe-nav-menu__layout-horizontal .hfe-menu-item:hover {
    border-bottom: 0;
    color: var(--green);
  }
}

/* H&F: el menú horizontal oculto no debe ocupar ancho en móvil */
@media (max-width: 1024px) {
  #masthead .sf-hf-nav .hfe-nav-menu__layout-horizontal {
    display: none;
  }
  #masthead .sf-hf-nav .hfe-active-menu + .hfe-nav-menu__layout-horizontal {
    display: block;
  }
  #masthead .sf-hf-nav .hfe-nav-menu__layout-horizontal ul.hfe-nav-menu {
    display: flex;
    flex-direction: column;
    width: 100%;
  }
  #masthead .sf-hf-nav .hfe-nav-menu__layout-horizontal ul.hfe-nav-menu > li {
    width: 100%;
  }
}

/* AA: enlace del email en el pie */
#colophon .sf-hf-footer-bottom-text a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Páginas legales */
.article table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  font-size: 15px;
}
.article th,
.article td {
  border: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}
.article th {
  background: var(--green-050);
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--green-800);
}
.legal-note {
  margin-top: 28px;
  padding: 12px 14px;
  border-left: 3px solid var(--yellow);
  background: var(--green-050);
  color: var(--muted);
  font-size: 14px;
}
@media (max-width: 640px) {
  .article table {
    font-size: 13px;
  }
  .article th,
  .article td {
    padding: 8px;
  }
}

/* Banner de cookies (Complianz) con la identidad del sitio */
.cmplz-cookiebanner {
  font-family: var(--font-body);
}
.cmplz-cookiebanner .cmplz-title {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.cmplz-cookiebanner .cmplz-btn {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: .04em;
  border-radius: 999px;
}
.cmplz-cookiebanner .cmplz-btn.cmplz-accept {
  background-color: var(--green) !important;
  border-color: var(--green) !important;
  color: #fff !important;
}
.cmplz-cookiebanner .cmplz-btn.cmplz-accept:hover {
  background-color: var(--green-800) !important;
  border-color: var(--green-800) !important;
}
.cmplz-cookiebanner .cmplz-btn.cmplz-deny {
  background-color: transparent !important;
  border-color: var(--line-2) !important;
  color: var(--ink) !important;
}
.cmplz-cookiebanner .cmplz-btn.cmplz-view-preferences {
  background-color: transparent !important;
  border-color: transparent !important;
  color: var(--green) !important;
}
.cmplz-cookiebanner a {
  color: var(--green);
}
@media (max-width: 640px) {
  .cmplz-cookiebanner .cmplz-buttons {
    flex-direction: column;
  }
  .cmplz-cookiebanner .cmplz-btn {
    width: 100%;
  }
}

/* Tablas legales en móvil: scroll interno sin romper el ancho */
@media (max-width: 640px) {
  .article table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .article th,
  .article td {
    white-space: normal;
    word-break: break-word;
  }
}

/* Redes sociales en el footer */
.site-footer .social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
}
.site-footer .social-links li {
  margin: 0;
}
.site-footer .social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  color: #fff;
}
.site-footer .social-links a:hover,
.site-footer .social-links a:focus-visible {
  background: var(--yellow);
  color: var(--green-800);
}
.site-footer .social-links svg {
  display: block;
  width: 19px;
  height: 19px;
}

/* Redes sociales en la plantilla H&F */
#colophon .sf-hf-footer-social {
  margin-top: 4px;
}
#colophon .sf-hf-footer-social .elementor-social-icon {
  background-color: rgba(255, 255, 255, .12) !important;
  color: #fff !important;
}
#colophon .sf-hf-footer-social .elementor-social-icon:hover,
#colophon .sf-hf-footer-social .elementor-social-icon:focus-visible {
  background-color: var(--yellow) !important;
  color: var(--green-800) !important;
}
