/**
 * Points Fit Web — alineación visual con Points Fit Mobile
 * Solo estilos: tokens, componentes públicos, responsive 320px → ultra-wide.
 * No modificar selectores usados por JS salvo clases visuales aditivas.
 */

:root {
    /* Tokens mobile (modo claro — contenido web) */
    --pf-bg-base: #f4f6f8;
    --pf-bg-elevated: #ffffff;
    --pf-bg-surface: #eef1f4;
    --pf-bg-muted: #e2e7ec;
    --pf-text-primary: #121417;
    --pf-text-secondary: #4a5560;
    --pf-text-muted: #7a8490;
    --pf-border: rgba(15, 20, 25, 0.08);
    --pf-border-strong: rgba(15, 20, 25, 0.14);
    --pf-primary: #0b5ed7;
    --pf-primary-rgb: 11, 94, 215;
    --pf-primary-muted: rgba(11, 94, 215, 0.1);
    --pf-success: #198754;
    --pf-success-rgb: 25, 135, 84;
    --pf-success-muted: rgba(25, 135, 84, 0.12);
    --pf-danger: #dc3545;
    --pf-danger-muted: rgba(220, 53, 69, 0.1);
    --pf-warning: #e6a800;
    --pf-warning-muted: rgba(230, 168, 0, 0.14);
    --pf-info-muted: rgba(13, 202, 240, 0.12);
    --pf-radius-sm: 8px;
    --pf-radius-md: 12px;
    --pf-radius-lg: 16px;
    --pf-radius-xl: 20px;
    --pf-radius-pill: 999px;
    --pf-shadow-card: 0 4px 12px rgba(15, 20, 25, 0.08);
    --pf-shadow-card-hover: 0 8px 20px rgba(15, 20, 25, 0.12);
    --pf-heat-start: #ffaa00;
    --pf-heat-end: #ff4500;
    --pf-hero-tint-start: rgba(26, 47, 77, 0.82);
    --pf-hero-tint-end: rgba(15, 15, 15, 0.9);
    --pf-medal-gold-a: #f0c030;
    --pf-medal-gold-b: #e09008;
    --pf-medal-gold-c: #b86a00;
    --pf-medal-silver-a: #b8c4d0;
    --pf-medal-silver-b: #8a9aa8;
    --pf-medal-silver-c: #5c6e7e;
    --pf-medal-bronze-a: #d4925a;
    --pf-medal-bronze-b: #b86b32;
    --pf-medal-bronze-c: #8b4a18;
    --pf-content-max: 1140px;
    --pf-content-max-wide: 1320px;
    --pf-content-max-ultra: 1440px;

    /* Bootstrap — alineado mobile light */
    --bs-primary: #0b5ed7;
    --bs-primary-rgb: 11, 94, 215;
    --bs-success: #198754;
    --bs-success-rgb: 25, 135, 84;
    --bs-body-bg: var(--pf-bg-base);
    --bs-border-color: var(--pf-border-strong);
}

/* —— Base layout público —— */
body {
    background-color: var(--pf-bg-base);
    color: var(--pf-text-primary);
}

/* Alerts públicos: sutiles y alineados al radio del sistema */
body .alert {
    border-radius: var(--pf-radius-lg) !important;
    border-width: 1px;
    box-shadow: 0 4px 12px rgba(15, 20, 25, 0.06);
    padding: 0.95rem 1rem;
}

body .alert-dismissible {
    padding: 0.95rem 2.75rem 0.95rem 1rem !important;
}

body .alert .alert-heading {
    font-weight: 700;
}

body .alert .btn-close {
    top: 0.7rem;
    right: 0.7rem;
    padding: 0.75rem;
}

body .alert-success {
    border-color: rgba(var(--pf-success-rgb), 0.18);
}

body .alert-info {
    border-color: rgba(13, 202, 240, 0.2);
}

body .alert-warning {
    border-color: rgba(230, 168, 0, 0.2);
}

body .alert-danger {
    border-color: rgba(220, 53, 69, 0.18);
}

main > section:not(.hero-section) {
    background-color: var(--pf-bg-base);
}

main > section.hero-section + section,
main > section.py-3,
main > section.py-5,
main > .container {
    background-color: var(--pf-bg-base);
}

.scoring-page-section {
    background-color: var(--pf-bg-base);
}

/* Contenedores: legible en móvil y centrado en pantallas enormes */
@media (min-width: 1400px) {
    main .container:not(.hero-section--public-banner__inner) {
        max-width: var(--pf-content-max-wide);
    }
}

@media (min-width: 1920px) {
    main .container:not(.hero-section--public-banner__inner) {
        max-width: var(--pf-content-max-ultra);
    }
}

@media (min-width: 2560px) {
    main .container:not(.hero-section--public-banner__inner) {
        max-width: min(90rem, 92vw);
    }
}

/* —— Hero: tinte mobile sobre barbell —— */
.hero-section::before {
    background: linear-gradient(
        165deg,
        var(--pf-hero-tint-start) 0%,
        var(--pf-hero-tint-end) 52%,
        rgba(0, 0, 0, 0.88) 100%
    ) !important;
}

/* —— Cards competencia / categoría (mobile CompetitionCard) —— */
.competition-card {
    border: 1px solid var(--pf-border) !important;
    border-radius: var(--pf-radius-xl) !important;
    background-color: var(--pf-bg-elevated) !important;
    box-shadow: var(--pf-shadow-card) !important;
    overflow: hidden;
}

.competition-card:hover {
    box-shadow: var(--pf-shadow-card-hover) !important;
}

@media (max-width: 767.98px) {
    #competitionTabsContent .competition-card,
    .category-card,
    .category-card .competition-card {
        transition: none !important;
        animation: none !important;
        transform: none !important;
        opacity: 1 !important;
    }

    .category-card.fade-in {
        animation: none !important;
    }
}

.competition-item[data-status="activa"] > .competition-card {
    border-left: 3px solid var(--pf-success) !important;
}

.category-card .competition-card.border-success {
    border-left-width: 3px !important;
    box-shadow: 0 0 0 1px rgba(var(--pf-success-rgb), 0.12), var(--pf-shadow-card) !important;
}

/* —— Status badges pill (mobile StatusBadge) —— */
.competition-card .badge.bg-success,
.hero-show-stat .badge.bg-success {
    background-color: var(--pf-success-muted) !important;
    color: var(--pf-success) !important;
    border: 1px solid transparent;
}

.competition-card .badge.bg-secondary,
.competition-card .badge.bg-warning,
.hero-show-stat .badge.bg-secondary {
    background-color: var(--pf-primary-muted) !important;
    color: var(--pf-primary) !important;
    border: 1px solid transparent;
}

.competition-card .badge.bg-info,
.hero-show-stat .badge.bg-info {
    background-color: var(--pf-bg-muted) !important;
    color: var(--pf-text-muted) !important;
    border: 1px solid var(--pf-border);
}

.competition-card .badge.bg-danger {
    background-color: var(--pf-danger-muted) !important;
    color: var(--pf-danger) !important;
    border: 1px solid transparent;
}

.competition-card .card-title + .badge,
.competition-card .d-flex .badge,
.competition-card-badge,
.hero-show-stat .badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.55rem !important;
    border-radius: 999px !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.03em;
    line-height: 1.2;
    white-space: nowrap;
}

/* Countdown en cards del listado (fondo claro) */
.competition-card .badge[style*="fff3cd"] {
    background-color: var(--pf-warning-muted) !important;
    color: #7a5a00 !important;
    border: 1px solid rgba(230, 168, 0, 0.35) !important;
    border-radius: 999px !important;
    font-weight: 700 !important;
}

/* Countdown en hero detalle — pill suave sobre fondo oscuro */
.hero-section--competencia-show .hero-show-countdown__badge {
    background-color: rgba(255, 243, 205, 0.28) !important;
    color: rgba(255, 224, 138, 0.92) !important;
    border: 1px solid rgba(255, 234, 167, 0.45) !important;
    border-radius: 999px !important;
    font-weight: 600 !important;
    font-size: inherit;
    box-shadow: none;
}

/* —— Tabs listado competencias —— */
#competitionTabs.nav-tabs {
    border: none;
    background: var(--pf-bg-surface);
    border-radius: var(--pf-radius-lg);
    padding: 0.25rem;
    gap: 0.2rem;
    box-shadow: none;
}

#competitionTabs .nav-link {
    border: none !important;
    border-radius: var(--pf-radius-md) !important;
    color: var(--pf-text-secondary) !important;
    font-weight: 700 !important;
    font-size: 0.78rem !important;
    padding: 0.55rem 0.65rem !important;
    transition: background-color 0.2s ease, color 0.2s ease;
}

#competitionTabs .nav-link:hover {
    color: var(--pf-primary) !important;
    background: var(--pf-primary-muted);
}

#competitionTabs .nav-link.active {
    background: var(--pf-bg-elevated) !important;
    color: var(--pf-primary) !important;
    box-shadow: var(--pf-shadow-card);
}

@media (max-width: 575.98px) {
    #competitionTabs .nav-link {
        font-size: 0.68rem !important;
        padding: 0.48rem 0.35rem !important;
    }

    #competitionTabs .nav-link i {
        display: block;
        margin: 0 auto 0.15rem !important;
        font-size: 0.85rem;
    }
}

/* —— Buscador competencias / categorías —— */
.search-container .card,
.competencias-show-search-card {
    border-radius: var(--pf-radius-lg) !important;
    border: 1px solid var(--pf-border-strong) !important;
    background: var(--pf-bg-elevated) !important;
    box-shadow: var(--pf-shadow-card) !important;
}

.search-container .input-group,
#searchCategories.input-group,
.category-search-group {
    border-radius: var(--pf-radius-pill);
    overflow: hidden;
    border: 1px solid var(--pf-border-strong);
    background: var(--pf-bg-surface);
}

.search-container .input-group-text {
    background: var(--pf-bg-surface);
    border: none;
    color: var(--pf-text-muted);
}

.search-container .form-control,
#searchCategories.form-control {
    border: none !important;
    background: var(--pf-bg-surface);
    box-shadow: none !important;
}

.search-container .input-group .btn {
    border-color: transparent;
    background: var(--pf-bg-surface);
    color: var(--pf-text-secondary);
}

/* —— Todos los botones curvos (mobile PrimaryButton: lg 16px / sm 12px) —— */
body .btn:not(.btn-link):not(.btn-close):not(.navbar-toggler) {
    border-radius: var(--pf-radius-lg) !important;
}

body .btn-sm:not(.btn-link):not(.btn-close) {
    border-radius: var(--pf-radius-md) !important;
}

body .btn-lg:not(.btn-link) {
    border-radius: var(--pf-radius-lg) !important;
}

body .btn-primary:not(.btn-hero-outline) {
    font-weight: 700;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 10px rgba(var(--pf-primary-rgb), 0.22);
    border: none;
}

body .btn-success:not(.btn-hero-outline) {
    font-weight: 700;
}

body .btn-outline-primary,
body .btn-outline-secondary,
body .btn-outline-success,
body .btn-outline-info,
body .btn-outline-warning,
body .btn-outline-danger,
body .btn-outline-light,
body .btn-outline-dark {
    font-weight: 600;
}

body .btn-outline-primary {
    border-color: var(--pf-border-strong);
}

body .btn-secondary,
body .btn-info,
body .btn-warning,
body .btn-danger {
    font-weight: 600;
}

/* Input-group: ojito de contraseña y append/prepend integrados (no botón suelto) */
body .input-group > .form-control,
body .input-group > .form-select,
body .input-group > .input-group-text,
body .input-group > .btn:not(.btn-link):not(.btn-close) {
    border-radius: 0 !important;
}

body .input-group > .form-control:first-child,
body .input-group > .form-select:first-child,
body .input-group > .input-group-text:first-child,
body .input-group > .btn:first-child:not(.btn-link):not(.btn-close) {
    border-top-left-radius: var(--pf-radius-pill) !important;
    border-bottom-left-radius: var(--pf-radius-pill) !important;
}

body .input-group > .form-control:last-child,
body .input-group > .form-select:last-child,
body .input-group > .input-group-text:last-child,
body .input-group > .btn:last-child:not(.btn-link):not(.btn-close) {
    border-top-right-radius: var(--pf-radius-pill) !important;
    border-bottom-right-radius: var(--pf-radius-pill) !important;
}

body .input-group > .btn-sm:first-child:not(.btn-link):not(.btn-close) {
    border-top-left-radius: var(--pf-radius-pill) !important;
    border-bottom-left-radius: var(--pf-radius-pill) !important;
}

body .input-group > .btn-sm:last-child:not(.btn-link):not(.btn-close) {
    border-top-right-radius: var(--pf-radius-pill) !important;
    border-bottom-right-radius: var(--pf-radius-pill) !important;
}

body .input-group > .btn-outline-secondary:last-child:not(.btn-link):not(.btn-close),
body .input-group > .btn-secondary:last-child:not(.btn-link):not(.btn-close) {
    border-color: var(--pf-border-strong);
    background-color: var(--pf-bg-surface);
    color: var(--pf-text-muted);
}

body .input-group > .btn-outline-secondary:last-child:not(.btn-link):not(.btn-close):hover,
body .input-group > .btn-secondary:last-child:not(.btn-link):not(.btn-close):hover {
    background-color: var(--pf-bg-muted);
    border-color: var(--pf-border-strong);
    color: var(--pf-text-secondary);
}

body .hero-section .btn:not(.btn-link):not(.btn-close) {
    border-radius: var(--pf-radius-lg) !important;
}

body .hero-section .btn-sm:not(.btn-link):not(.btn-close) {
    border-radius: var(--pf-radius-md) !important;
}

body .modal .btn:not(.btn-link):not(.btn-close) {
    border-radius: var(--pf-radius-md) !important;
}

body .footer .btn {
    border-radius: var(--pf-radius-lg) !important;
}

body .legal-doc-nav .btn {
    border-radius: 999px !important;
}

body .btn-desempate-modal,
body .ranking-refresh-btn,
body .ranking-summary-actions .btn {
    border-radius: var(--pf-radius-md) !important;
}

#btnVerHeats {
    border-radius: var(--pf-radius-md) !important;
    font-weight: 700 !important;
    background: linear-gradient(135deg, var(--pf-heat-start) 0%, var(--pf-heat-end) 100%) !important;
}

body .open-score-launch,
body .hero-show-inscripcion-btn {
    border-radius: var(--pf-radius-lg) !important;
}

body .w-100.btn:not(.btn-link) {
    border-radius: var(--pf-radius-lg) !important;
}

/* —— Formularios públicos —— */
.public-form-card {
    border: 1px solid var(--pf-border) !important;
    border-radius: var(--pf-radius-xl) !important;
    background: var(--pf-bg-elevated) !important;
    box-shadow: var(--pf-shadow-card) !important;
}

/* Campos pill — login, registro, perfil, inscripción, etc. */
body .form-control:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="range"]):not([type="file"]),
body .form-select {
    border-radius: var(--pf-radius-pill);
    border-color: var(--pf-border-strong);
    background-color: var(--pf-bg-surface);
    font-size: 16px !important;
    min-height: 46px;
    padding-left: 1.125rem;
    padding-right: 1.125rem;
}

body textarea.form-control {
    border-radius: var(--pf-radius-xl);
    font-size: 16px !important;
    min-height: 6rem;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

body .form-control:focus,
body .form-select:focus {
    border-color: var(--pf-primary);
    background-color: var(--pf-bg-elevated);
    box-shadow: 0 0 0 0.2rem rgba(var(--pf-primary-rgb), 0.15);
}

body .input-group > .form-control,
body .input-group > .form-select {
    min-height: 46px;
}

body .input-group > .form-control:first-child,
body .input-group > .form-select:first-child {
    padding-left: 1.125rem;
}

body .select2-container {
    width: 100% !important;
}

body .select2-container .select2-selection--single,
body .select2-container .select2-selection--multiple {
    border-radius: var(--pf-radius-pill) !important;
    border-color: var(--pf-border-strong) !important;
    background-color: var(--pf-bg-surface) !important;
    min-height: 46px !important;
}

body .select2-container .select2-selection--single {
    display: flex;
    align-items: center;
}

body .select2-container .select2-selection--single .select2-selection__rendered {
    padding-left: 1.125rem;
    padding-right: 2.25rem;
    line-height: 44px;
    color: var(--pf-text-primary);
}

body .select2-container .select2-selection--single .select2-selection__arrow {
    height: 44px;
    right: 0.65rem;
}

body .select2-container--default.select2-container--focus .select2-selection--single,
body .select2-container--default.select2-container--open .select2-selection--single {
    border-color: var(--pf-primary) !important;
    box-shadow: 0 0 0 0.2rem rgba(var(--pf-primary-rgb), 0.15);
}

/* File inputs: pill unificado (botón + nombre en un solo bloque) */
body input[type="file"].form-control {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 0 1rem 0 0 !important;
    overflow: hidden;
    min-height: 46px;
    height: 46px;
    color: var(--pf-text-muted);
    background-color: var(--pf-bg-elevated);
    border: 1px solid var(--pf-border-strong);
    border-radius: var(--pf-radius-pill);
    font-size: 16px;
    line-height: normal;
    white-space: nowrap;
    text-overflow: ellipsis;
    cursor: pointer;
}

body input[type="file"].form-control::file-selector-button,
body input[type="file"].form-control::-webkit-file-upload-button {
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
    border: 0;
    border-right: 1px solid var(--pf-border-strong);
    border-radius: 0 !important;
    margin: 0 !important;
    margin-inline-end: 0.75rem !important;
    padding: 0 0.875rem;
    height: 100%;
    min-height: 100%;
    max-height: 100%;
    background-color: transparent;
    color: var(--pf-text-secondary);
    font-weight: 600;
    font-size: 0.8125rem;
    line-height: 44px;
    cursor: pointer;
    vertical-align: middle;
    transition: background-color 0.15s ease, color 0.15s ease;
}

body input[type="file"].form-control:hover {
    background-color: var(--pf-bg-elevated);
}

body input[type="file"].form-control:hover::file-selector-button,
body input[type="file"].form-control:hover::-webkit-file-upload-button {
    background-color: var(--pf-bg-muted);
    color: var(--pf-text-primary);
}

body input[type="file"].form-control:focus {
    border-color: var(--pf-primary);
    background-color: var(--pf-bg-elevated);
    box-shadow: 0 0 0 0.2rem rgba(var(--pf-primary-rgb), 0.15);
    outline: 0;
}

body input[type="file"].form-control:focus::file-selector-button,
body input[type="file"].form-control:focus::-webkit-file-upload-button {
    border-right-color: var(--pf-border-strong);
}

body input[type="file"].form-control.is-invalid {
    border-color: var(--bs-form-invalid-border-color, #dc3545);
}

.public-form-page .btn-primary,
.public-form-page .btn-success,
.public-form-page .btn-secondary {
    min-height: 46px;
}

.equipo-pasos-card {
    border-color: var(--pf-border) !important;
    border-radius: var(--pf-radius-lg) !important;
    background: var(--pf-bg-surface) !important;
}

/* —— Docs / guías / legales —— */
.scoring-page-section .scoring-doc > .card,
.legal-doc-card {
    border: 1px solid var(--pf-border) !important;
    border-radius: var(--pf-radius-xl) !important;
    background: var(--pf-bg-elevated) !important;
    box-shadow: var(--pf-shadow-card) !important;
    overflow: hidden;
}

.scoring-page-section .scoring-doc > .card > .card-header.bg-primary,
.scoring-page-section .guia-cta-card > .card-header.bg-primary {
    background-color: var(--pf-primary) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.guia-doc .guia-summary-card {
    border-left-color: var(--pf-primary) !important;
    background: var(--pf-bg-elevated);
}

.guia-doc .guia-mini-card {
    border-radius: var(--pf-radius-md);
    background: var(--pf-bg-surface);
}

.legal-doc-h2 {
    border-bottom-color: rgba(var(--pf-primary-rgb), 0.15) !important;
}

/* —— Leaderboard card header —— */
.container .card:has(#puntuacionesTable),
.container .card:has(#rankingSummaryView) {
    border: 1px solid var(--pf-border);
    border-radius: var(--pf-radius-xl);
    box-shadow: var(--pf-shadow-card);
    overflow: hidden;
}

/* —— Podio badges (mobile LeaderboardPodiumPositionBadge) —— */
.pf-podium-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    min-width: 2rem;
    padding: 0.2rem 0.35rem !important;
    border-radius: var(--pf-radius-md) !important;
    font-weight: 800 !important;
    line-height: 1.1;
    border: 0 !important;
}

.pf-podium-badge--gold {
    background: linear-gradient(135deg, var(--pf-medal-gold-a) 0%, var(--pf-medal-gold-b) 42%, var(--pf-medal-gold-c) 100%) !important;
    color: #1a1200 !important;
}

.pf-podium-badge--silver {
    background: linear-gradient(135deg, var(--pf-medal-silver-a) 0%, var(--pf-medal-silver-b) 42%, var(--pf-medal-silver-c) 100%) !important;
    color: #0f1419 !important;
}

.pf-podium-badge--bronze {
    background: linear-gradient(135deg, var(--pf-medal-bronze-a) 0%, var(--pf-medal-bronze-b) 42%, var(--pf-medal-bronze-c) 100%) !important;
    color: #1a0e04 !important;
}

.pf-podium-badge--default {
    background: var(--pf-bg-muted) !important;
    color: var(--pf-text-secondary) !important;
}

/* Ranking resumen — sin caja interna curva; solo redondeo en la card exterior */
#rankingSummaryView {
    margin: -1rem;
}

#rankingSummaryView .ranking-summary-shell {
    background: var(--pf-bg-surface) !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    min-height: 100%;
    padding: 1rem;
    color: var(--pf-text-primary);
}

.ranking-summary-item-gold {
    background: linear-gradient(135deg, var(--pf-medal-gold-a) 0%, var(--pf-medal-gold-b) 50%, var(--pf-medal-gold-c) 100%) !important;
    border: 1px solid rgba(160, 95, 0, 0.35) !important;
    color: #1a1200 !important;
}

.ranking-summary-item-silver {
    background: linear-gradient(135deg, var(--pf-medal-silver-a) 0%, var(--pf-medal-silver-b) 50%, var(--pf-medal-silver-c) 100%) !important;
    border: 1px solid rgba(70, 88, 108, 0.35) !important;
    color: #0f1419 !important;
}

.ranking-summary-item-bronze {
    background: linear-gradient(135deg, var(--pf-medal-bronze-a) 0%, var(--pf-medal-bronze-b) 50%, var(--pf-medal-bronze-c) 100%) !important;
    border: 1px solid rgba(120, 62, 18, 0.35) !important;
    color: #1a0e04 !important;
}

.ranking-summary-item-dark {
    background: var(--pf-bg-elevated) !important;
    border: 1px solid var(--pf-border) !important;
    color: var(--pf-text-primary) !important;
}

#rankingSummaryView .ranking-summary-item {
    border: 0 !important;
}

.ranking-summary-item-dark .ranking-summary-name,
.ranking-summary-item-dark .ranking-summary-points {
    color: var(--pf-text-primary) !important;
}

.ranking-summary-item-dark .ranking-summary-box,
.ranking-summary-hint,
.ranking-summary-kicker {
    color: var(--pf-text-muted) !important;
}

.ranking-summary-header h6,
.ranking-summary-hint {
    color: var(--pf-text-secondary) !important;
}

.ranking-view-switch {
    background: var(--pf-bg-surface) !important;
    border-color: var(--pf-border-strong) !important;
}

.ranking-view-switch-btn {
    color: var(--pf-text-secondary) !important;
}

.ranking-view-switch-btn.is-active {
    background: linear-gradient(135deg, #212529 0%, #343a40 100%) !important;
    color: #fff !important;
}

.ranking-refresh-btn {
    background: linear-gradient(135deg, #0b5ed7 0%, #094bac 100%) !important;
    border-radius: var(--pf-radius-md) !important;
}

/* WOD especial badge — mobile warning pill */
.badge.animate-pulse[style*="FFD700"],
.badge[style*="FFD700"] {
    background: var(--pf-warning) !important;
    color: #121417 !important;
    border-radius: 999px !important;
}

/* —— Modales públicos —— */
.modal-content {
    border-radius: var(--pf-radius-xl);
    border: 1px solid var(--pf-border);
}

/* Heats (competencia show): pantalla completa, sin animaciones */
#heatsPublicModal.modal,
#heatsPublicModal .modal-dialog {
    transition: none !important;
}

#heatsPublicModal.modal.show {
    padding: 0 !important;
}

#heatsPublicModal .modal-dialog {
    margin: 0 !important;
    max-width: none !important;
    width: 100% !important;
    max-height: none !important;
    height: 100% !important;
}

#heatsPublicModal .modal-content {
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
}

#heatsPublicModal .modal-header,
#heatsPublicModal .modal-footer {
    border-radius: 0 !important;
}

#heatsPublicModal .competition-card,
#heatsPublicModal .heat-detail-card,
#heatsPublicModal .alert {
    border-radius: var(--pf-radius-lg) !important;
    overflow: hidden;
}

#heatsPublicModal .heat-detail-card > .card-header {
    border-radius: 0 !important;
}

.cronograma-public-item--destacado {
    border-color: var(--pf-warning) !important;
}

.footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* —— Estabilidad listado: sin hover lift (ya en competencias-index) —— */
#competitionTabsContent .competition-card:hover {
    transform: none !important;
}

/* —— Responsive fino —— */
@media (max-width: 374.98px) {
    .competition-card .card-body {
        padding: 0.85rem;
    }

    .hero-index-headline {
        font-size: clamp(1.45rem, 8vw, 1.75rem) !important;
    }
}

@media (min-width: 576px) and (max-width: 767.98px) {
    #competitionTabsContent .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

@media (min-width: 768px) {
    .hero-index-panel {
        border-radius: var(--pf-radius-xl);
    }
}

@media (min-width: 992px) {
    #competitionTabsContent .row {
        --bs-gutter-x: 1.25rem;
    }
}

@media (min-width: 1200px) {
    .competition-card .card-title {
        font-size: 1.05rem;
        letter-spacing: -0.02em;
    }
}

@media (min-width: 1600px) {
    #competitionTabsContent .col-lg-4 {
        flex: 0 0 auto;
        width: 33.33333333%;
    }
}

@media (min-width: 2200px) {
    #competitionTabsContent .col-lg-4 {
        width: 25%;
    }
}

/* —— Categorías en detalle competencia —— */
.category-card .competition-card {
    border-radius: var(--pf-radius-xl) !important;
}

.category-card .competition-card-badge.bg-primary {
    background-color: var(--pf-primary-muted) !important;
    color: var(--pf-primary) !important;
    border-radius: 999px !important;
}

.category-card .competition-card-badge.bg-pink {
    background-color: rgba(233, 30, 99, 0.12) !important;
    color: #c2185b !important;
    border-radius: 999px !important;
}

.category-card .competition-card-badge.bg-secondary {
    background-color: var(--pf-bg-muted) !important;
    color: var(--pf-text-muted) !important;
    border-radius: 999px !important;
}

.competencia-show-categories .input-group {
    border-radius: var(--pf-radius-pill);
    overflow: hidden;
    border: 1px solid var(--pf-border-strong);
    background: var(--pf-bg-elevated);
    box-shadow: var(--pf-shadow-card);
}

.competencia-show-categories .input-group .form-control {
    border: none;
    background: var(--pf-bg-elevated);
    border-radius: 0;
}

.competencia-show-categories .input-group .btn {
    border: none;
    background: var(--pf-bg-surface);
}

.public-flash-wrap {
    background-color: var(--pf-bg-base) !important;
}

body .hero-section .public-flash-wrap--in-hero {
    background-color: transparent !important;
}

body .hero-section .public-flash-wrap--in-hero .alert {
    border-radius: var(--pf-radius-lg) !important;
}

/* Leaderboard resumen: shell a ras del card-body (sin esquina curva interna) */
@media (min-width: 992px) {
    #rankingSummaryView .ranking-summary-shell {
        padding: 1.15rem !important;
    }
}

@media (min-width: 1400px) {
    .container[style*="max-width: 100%"] {
        max-width: min(96vw, 90rem) !important;
        margin-left: auto;
        margin-right: auto;
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

@media (min-width: 2560px) {
    .container[style*="max-width: 100%"] {
        max-width: min(88vw, 100rem) !important;
    }
}

.ranking-summary-item-dark .ranking-summary-avatar-placeholder {
    background: var(--pf-bg-muted) !important;
    color: var(--pf-text-secondary) !important;
}

@media (prefers-reduced-motion: reduce) {
    .competition-card,
    .competition-card:hover,
    #competitionTabs .nav-link,
    .hero-show-inscripcion-btn:hover {
        transition: none !important;
        transform: none !important;
    }
}
