/* Ajustes acotados a las plantillas existentes. No ocultan el overflow del documento. */

/* Home: la lista de datos no debe ampliar su contenedor con margenes negativos. */
@media (max-width: 1024px) {
    .elementor-90 .elementor-element.elementor-element-f075a08 .elementor-icon-list-items {
        margin-inline: 0;
    }
}

/* Home: mantener CRONOMETRAJE completo en su tarjeta de tres columnas a 320 px. */
@media (max-width: 360px) {
    .elementor-90 .elementor-element.elementor-element-3178492 .elementor-icon-box-title {
        font-size: clamp(12px, 3.75vw, 13.5px);
    }
}

/* Patrocinadores: conservar los 750 px de escritorio y encajar en su contenedor. */
.elementor-885 .elementor-element.elementor-element-4018cf8,
.elementor-885 .elementor-element.elementor-element-7c34d37 {
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.elementor-885 .elementor-element.elementor-element-4018cf8 > .elementor-widget-image,
.elementor-885 .elementor-element.elementor-element-7c34d37 > .elementor-widget-image {
    min-width: 0;
}

/* Resultados: el panel de 1200 px respeta el ancho disponible. La tabla conserva
   sus columnas y desplaza horizontalmente solo dentro de su propio panel. */
.elementor-341 .elementor-element.elementor-element-b03c03b,
.elementor-341 .elementor-element.elementor-element-e7f4a56 {
    max-width: 100%;
    min-width: 0;
}

#cobra-resultados,
#cobra-resultados #divRRPublish {
    max-width: 100%;
    min-width: 0;
}

#cobra-resultados #divRRPublish .MainDiv {
    max-width: 100%;
    overflow-x: auto !important;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
}

/* El embed actual llama RRSelectorParent al contenedor. Los select nativos
   funcionan tambien en movil; se elimina solo su representacion duplicada. */
#cobra-resultados #divRRPublish .RRSelectorMobile {
    display: none !important;
}

#cobra-resultados #divRRPublish .RRSelectorDesktop {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    width: 100%;
    margin: 24px 0;
}

#cobra-resultados #divRRPublish .RRSelectorDesktop > div {
    min-width: 0;
    width: 100%;
    margin: 0;
}

#cobra-resultados #divRRPublish .RRSelectorDesktop > div > span {
    display: block;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 8px;
}

#cobra-resultados #divRRPublish .RRSelectorDesktop select {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

/* La regla antigua ocultaba la cuarta columna; en el feed actual es Tiempo. */
#cobra-resultados #divRRPublish .MainTable > thead > tr > th:nth-child(4),
#cobra-resultados #divRRPublish .MainTable > tbody > tr > td:nth-child(4) {
    display: table-cell !important;
}

@media (min-width: 768px) and (max-width: 1024px) {
    #cobra-resultados #divRRPublish .RRSelectorDesktop {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    #cobra-resultados #divRRPublish .RRSelectorDesktop {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }

    /* RaceResult ya pasa los datos secundarios a una fila de detalle en movil.
       No mantener el antiguo minimo de 650 px sobre esa vista adaptada. */
    #cobra-resultados #divRRPublish .MainTable.hasBrokeCols {
        min-width: 0 !important;
    }

    #cobra-resultados #divRRPublish .MainTable.hasBrokeCols th,
    #cobra-resultados #divRRPublish .MainTable.hasBrokeCols td {
        width: auto !important;
        white-space: normal !important;
        overflow-wrap: anywhere;
    }

    #cobra-resultados #divRRPublish .MainTable.hasBrokeCols th:nth-child(2),
    #cobra-resultados #divRRPublish .MainTable.hasBrokeCols td:nth-child(2) {
        white-space: nowrap !important;
        overflow-wrap: normal;
    }
}
/* Las tarjetas de voluntariado distinguen interés futuro de una inscripción confirmada. */
body .elementor-383 .elementor-element-2c59ddd .elementor-heading-title{font-size:clamp(1.1rem,3vw,1.6rem);line-height:1.2;overflow-wrap:anywhere}
/* Los avisos de formularios heredan el fondo oscuro de sus secciones Elementor. */
body .elementor-element-f1e111a .elementor-field-type-html,
body .elementor-element-bcd0da7 .elementor-field-type-html{color:#fbfdff;line-height:1.6;font-size:1rem;overflow-wrap:anywhere}
body .elementor-element-f1e111a .elementor-field-type-html a,
body .elementor-element-bcd0da7 .elementor-field-type-html a{color:#82e6a7;text-decoration:underline}
body .elementor-element-f1e111a .elementor-field:not(textarea),
body .elementor-element-bcd0da7 .elementor-field:not(textarea){min-height:44px;font-size:16px}
body .elementor-element-f1e111a .elementor-message,
body .elementor-element-bcd0da7 .elementor-message{color:#fbfdff;line-height:1.6}
body .cmplz-cookiebanner .cmplz-btn{min-height:44px;font-size:16px}
body .cmplz-cookiebanner .cmplz-btn.cmplz-accept,
body .cmplz-cookiebanner .cmplz-btn.cmplz-deny{background:#02ae42;border-color:#02ae42;color:#08170e}


/* Cabecera original: tipografÃ­as, tamaÃ±os, logo y composiciÃ³n de Elementor intactos. */
body .elementor-208 .elementor-element.elementor-element-3dbe2173 {
    background: #000 !important;
    overflow: visible;
}
body .elementor-208 .elementor-element.elementor-element-c188f30 {
    align-items: center;
    gap: 20px;
}
body .elementor-208 .elementor-element.elementor-element-6a3579ec {
    max-width: none;
    min-width: 0;
    width: auto;
    flex: 1 1 auto;
}
body .elementor-208 .elementor-element.elementor-element-3097356d {
    display: block !important;
    width: auto;
    max-width: none;
    flex: 0 0 auto;
    margin-left: auto;
}
body .elementor-208 .elementor-element-3097356d a.elementor-button {
    min-width: 110px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #000 !important;
}
body .elementor-208 .elementor-element-3097356d a.elementor-button:is(:hover, :focus) {
    color: #02ae42 !important;
    outline: 2px solid #02ae42;
    outline-offset: 2px;
}
body .elementor-208 .elementor-element-3097356d svg { fill: currentColor; }
body .elementor-208 .cr-atleta-cerrada { cursor: default; }
body .elementor-208 .elementor-nav-menu a.elementor-item:is(:hover, :focus, .elementor-item-active) {
    background-color: #000 !important;
    text-decoration: underline;
    text-underline-offset: 5px;
}
body .elementor-208 :is(a, .elementor-menu-toggle):focus-visible {
    outline: 3px solid #fff !important;
    outline-offset: 3px;
    box-shadow: 0 0 0 6px #000;
}
body .skip-link:focus { position: fixed; top: calc(var(--wp-admin--admin-bar--height, 0px) + 8px); left: 8px; z-index: 100001; padding: 14px 20px; background: #fff; color: #000; outline: 3px solid #02ae42; }
html { scroll-padding-top: 145px; }

/* Desplegar antes de que la fila original necesite partirse. */
@media (max-width: 1279px) {
    body .elementor-208 .elementor-element.elementor-element-c188f30 { position: static; }
    body .elementor-208 .elementor-element.elementor-element-6a3579ec { position: static; width: 44px; flex: 0 0 44px; }
    body .elementor-208 .elementor-nav-menu--main { display: none !important; }
    body .elementor-208 .elementor-menu-toggle { display: flex !important; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; margin: 0; }
    body .elementor-208 nav.elementor-nav-menu--dropdown {
        position: absolute;
        top: 100% !important;
        left: 0 !important;
        width: 100% !important;
        margin: 0;
        padding: 6px 10px;
        background: #000;
        overflow-y: auto;
        max-height: calc(100dvh - 170px) !important;
        overscroll-behavior: contain;
    }
    body .elementor-208 nav.elementor-nav-menu--dropdown[aria-hidden="true"] { display: none !important; }
    body .elementor-208 nav.elementor-nav-menu--dropdown[aria-hidden="false"] { display: block !important; }
    body .elementor-208 .elementor-nav-menu--dropdown a.elementor-item { min-height: 44px; white-space: normal; }
}
/* Las páginas funcionales no tienen un hero bajo la cabecera: reservar su altura. */
body:has(.cr-legal) .elementor-208 .elementor-element-3dbe2173,
body:has(.cr-reserva) .elementor-208 .elementor-element-3dbe2173,
body.single-centros .elementor-208 .elementor-element-3dbe2173,
body.post-type-archive-centros .elementor-208 .elementor-element-3dbe2173 {
    margin-top: 0 !important;
}

/* El archivo de centros usa la plantilla del tema: contraste legible sobre su fondo negro. */
body.post-type-archive-centros main { max-width:1140px; margin:2rem auto; padding:0 20px; color:#f7f7f7; }
body.post-type-archive-centros main h1 { color:#fff; }
body.post-type-archive-centros main a { display:inline-block; min-height:44px; padding:6px 0; color:#82e6a7; text-decoration:underline; text-underline-offset:4px; }
body.post-type-archive-centros main a:focus-visible { outline:3px solid #fff; outline-offset:4px; }

/* Mensaje que sustituye las tarjetas de ejemplo: el fondo de esta sección es negro. */
body .elementor-453 .elementor-element-0098100 p { color:#f7f7f7; }
body .elementor-453 .elementor-element-0098100 .elementor-widget-container { padding:0 20px; }
/* Contraste de las llamadas a la acción: se conservan tipografía, tamaño y verde originales. */
body .elementor[data-elementor-type="wp-page"] .elementor-widget-button .elementor-button { color:#08170e; background-color:#02ae42; }
body .elementor[data-elementor-type="wp-page"] .elementor-widget-button .elementor-button:is(:hover,:focus) { color:#08170e; background-color:#02ae42; }
body .elementor[data-elementor-type="wp-page"] .elementor-widget-button .elementor-button:focus-visible { outline:3px solid #fff; outline-offset:4px; }

@media (prefers-reduced-motion: reduce) {
    body .elementor-208 *, body .elementor-208 *::before, body .elementor-208 *::after { transition: none !important; animation: none !important; }
}
