/* PUBLIC-UX-1.0E · Pulido mobile comercial
   Capa CSS pública transversal. No modifica datos, no altera rankings y no requiere JS. */

:root {
    --rh-public-mobile-safe-x: clamp(12px, 4vw, 18px);
    --rh-public-mobile-safe-y: clamp(14px, 4.5vw, 22px);
    --rh-public-mobile-card-radius: 24px;
    --rh-public-mobile-touch: 44px;
    --rh-public-mobile-panel-gap: 14px;
}

html {
    overflow-x: clip;
    text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    overflow-x: clip;
}

a,
button,
[role="button"],
input,
select,
textarea,
.rh-public-share-btn,
.rh-public-breadcrumbs a,
.rh-public-footer a,
.rh-rankings-tab,
.rh-rankings-filter-chip,
.rh-rankings-integration-chip,
.rhpe-btn,
.rhpe-filter-pill,
.rhpe-ecosystem-chip,
.rh-event-detail-ecosystem-link,
.rh-public-profile-ecosystem-link {
    touch-action: manipulation;
}

.rh-public-breadcrumbs,
.rh-public-share-card,
.rh-public-footer,
.rhpe-ecosystem-strip,
.rhpe-card-ecosystem,
.rh-event-detail-ecosystem-panel,
.rh-public-profile-ecosystem-panel,
.rh-ranking-integration-panel,
.rh-rankings-snapshot-strip {
    scroll-margin-top: 88px;
}

@media (max-width: 860px) {
    .rh-public-breadcrumbs,
    .rh-public-share-card,
    .rh-public-footer {
        width: calc(100% - (var(--rh-public-mobile-safe-x) * 2));
        margin-left: auto;
        margin-right: auto;
    }

    .rh-public-breadcrumbs {
        gap: 8px;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }

    .rh-public-breadcrumbs::-webkit-scrollbar {
        display: none;
    }

    .rh-public-share-card {
        border-radius: var(--rh-public-mobile-card-radius);
        padding: var(--rh-public-mobile-safe-y) var(--rh-public-mobile-safe-x);
    }

    .rh-public-share-actions,
    .rh-public-footer-links,
    .rh-public-footer-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .rh-public-share-btn,
    .rh-public-footer a,
    .rh-public-breadcrumbs a,
    .rh-public-breadcrumbs span {
        min-height: var(--rh-public-mobile-touch);
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .rh-public-footer {
        border-radius: var(--rh-public-mobile-card-radius);
        padding: 22px var(--rh-public-mobile-safe-x);
    }
}

@media (max-width: 720px) {
    body.rh-home-body,
    body.rh-public-events-body,
    body.ped-body,
    body.rh-rankings-public-page,
    body.athlete-public-body,
    body.rh-org-public-page,
    body.rh-team-public-page {
        min-width: 0;
    }

    .rh-container,
    .rh-public-events-main,
    .ped-shell,
    .ped-container,
    .rh-rankings-shell,
    .athlete-shell,
    .public-shell,
    .rh-org-public-shell,
    .rh-team-public-shell {
        width: 100% !important;
        max-width: none !important;
        padding-left: var(--rh-public-mobile-safe-x) !important;
        padding-right: var(--rh-public-mobile-safe-x) !important;
        box-sizing: border-box;
    }

    .rh-hero,
    .rhpe-hero,
    .ped-hero,
    .rh-rankings-lovable-hero,
    .public-hero,
    .rh-org-public-hero,
    .rh-team-public-hero {
        border-radius: 28px;
        padding: clamp(22px, 7vw, 34px) var(--rh-public-mobile-safe-x);
    }

    .rh-hero h1,
    .rhpe-hero h1,
    .ped-hero h1,
    .rh-rankings-lovable-hero h1,
    .public-hero h1,
    .rh-org-public-hero h1,
    .rh-team-public-hero h1 {
        font-size: clamp(2rem, 11vw, 3.4rem) !important;
        line-height: .94 !important;
        letter-spacing: -0.055em !important;
        overflow-wrap: anywhere;
    }

    .rh-hero p,
    .rhpe-hero p,
    .ped-hero p,
    .rh-rankings-lovable-hero p,
    .public-hero p,
    .rh-org-public-hero p,
    .rh-team-public-hero p {
        font-size: .96rem !important;
        line-height: 1.58 !important;
    }

    .rh-actions,
    .rhpe-hero-actions,
    .ped-hero__actions,
    .rh-rankings-hero-actions,
    .public-hero-actions,
    .rh-org-public-actions,
    .rh-team-public-actions {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 10px !important;
        width: 100%;
    }

    .rh-actions a,
    .rhpe-hero-actions a,
    .ped-hero__actions a,
    .rh-rankings-hero-actions a,
    .public-hero-actions a,
    .rh-org-public-actions a,
    .rh-team-public-actions a,
    .rhpe-btn,
    .rh-rankings-primary-cta,
    .rh-rankings-secondary-cta,
    .rh-public-profile-ecosystem-link,
    .rh-event-detail-ecosystem-link {
        min-height: var(--rh-public-mobile-touch) !important;
        width: 100%;
        justify-content: center;
        text-align: center;
        border-radius: 999px;
    }

    .rhpe-ecosystem-strip,
    .rh-event-detail-ecosystem-panel,
    .rh-public-profile-ecosystem-panel,
    .rh-ranking-integration-panel,
    .rh-rankings-snapshot-strip,
    .rh-public-share-card {
        margin-top: var(--rh-public-mobile-panel-gap);
        border-radius: var(--rh-public-mobile-card-radius);
    }

    .rhpe-ecosystem-grid,
    .rh-event-detail-ecosystem-grid,
    .rh-public-profile-ecosystem-grid,
    .rh-ranking-integration-grid,
    .rh-rankings-snapshot-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    .rhpe-card,
    .ped-card,
    .rh-event-detail-card,
    .rh-public-profile-ecosystem-card,
    .rh-ranking-integration-card,
    .rh-rankings-table-card,
    .rh-rankings-podium-card {
        border-radius: var(--rh-public-mobile-card-radius) !important;
    }

    .rhpe-card-title,
    .ped-card h2,
    .rh-event-detail-card-title,
    .rh-ranking-integration-title,
    .rh-public-profile-ecosystem-title {
        overflow-wrap: anywhere;
    }

    .rhpe-card-meta,
    .rhpe-card-ecosystem,
    .ped-meta,
    .rh-event-detail-meta,
    .rh-rankings-table-row,
    .rh-public-profile-ecosystem-links {
        gap: 8px !important;
    }

    .rh-rankings-table-wrap,
    .rhpe-results,
    .ped-results,
    .rh-event-detail-results,
    .rh-public-profile-ecosystem-results {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
    }

    .rh-rankings-table,
    .rhpe-table,
    .ped-table,
    .rh-event-detail-table {
        min-width: 0;
    }
}

@media (max-width: 480px) {
    :root {
        --rh-public-mobile-safe-x: 10px;
        --rh-public-mobile-safe-y: 12px;
        --rh-public-mobile-card-radius: 20px;
    }

    .rh-public-share-actions,
    .rh-public-footer-links,
    .rh-public-footer-actions {
        grid-template-columns: 1fr;
    }

    .rh-public-breadcrumbs {
        width: calc(100% - 16px);
    }

    .rh-hero h1,
    .rhpe-hero h1,
    .ped-hero h1,
    .rh-rankings-lovable-hero h1,
    .public-hero h1,
    .rh-org-public-hero h1,
    .rh-team-public-hero h1 {
        font-size: clamp(1.86rem, 12vw, 2.75rem) !important;
    }

    .rh-rankings-entity-tabs,
    .rh-rankings-mode-tabs,
    .rhpe-filters-row,
    .rh-public-profile-ecosystem-tabs {
        grid-template-columns: 1fr !important;
    }

    .rh-rankings-tab,
    .rh-rankings-mode-tab,
    .rhpe-filter-pill,
    .rh-public-profile-ecosystem-link {
        min-height: var(--rh-public-mobile-touch) !important;
    }
}

@media (orientation: landscape) and (max-width: 920px) and (max-height: 520px) {
    .rh-hero,
    .rhpe-hero,
    .ped-hero,
    .rh-rankings-lovable-hero,
    .public-hero,
    .rh-org-public-hero,
    .rh-team-public-hero {
        min-height: auto !important;
        padding-top: 18px !important;
        padding-bottom: 18px !important;
    }

    .rh-hero h1,
    .rhpe-hero h1,
    .ped-hero h1,
    .rh-rankings-lovable-hero h1,
    .public-hero h1,
    .rh-org-public-hero h1,
    .rh-team-public-hero h1 {
        font-size: clamp(1.8rem, 6vw, 2.7rem) !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
