/* Public site chrome mapped to shadcn/ui (new-york, neutral). */

:root {
    --background: 0 0% 100%;
    --foreground: 240 10% 3.9%;
    --card: 0 0% 100%;
    --card-foreground: 240 10% 3.9%;
    --popover: 0 0% 100%;
    --popover-foreground: 240 10% 3.9%;
    --primary: 240 5.9% 10%;
    --primary-foreground: 0 0% 98%;
    --secondary: 240 4.8% 95.9%;
    --secondary-foreground: 240 5.9% 10%;
    --muted: 240 4.8% 95.9%;
    --muted-foreground: 240 3.8% 46.1%;
    --accent: 240 4.8% 95.9%;
    --accent-foreground: 240 5.9% 10%;
    --destructive: 0 72% 51%;
    --border: 240 5.9% 90%;
    --input: 240 5.9% 90%;
    --ring: 240 5.9% 10%;
    --radius: 0.5rem;
    --sh-font: "Geist", "Inter", ui-sans-serif, system-ui, sans-serif;
    --sh-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    --vr-input-border-color: hsl(var(--input));
    --vr-text-main: hsl(var(--foreground));
    --vr-text-muted: hsl(var(--muted-foreground));
    --vr-footer-bg: hsl(var(--background));
    --vr-card-border-color: hsl(var(--border));
    --vr-card-shadow: var(--sh-shadow);
    --vr-border-radius: var(--radius);
    --vr-border-radius-md: calc(var(--radius) - 2px);
    --vr-border-radius-lg: var(--radius);
}

body {
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    font-family: var(--sh-font);
    -webkit-font-smoothing: antialiased;
}

a:hover,
a:active,
a:focus {
    color: hsl(var(--foreground)) !important;
}

/* ── Header ── */
.mbff-header {
    background: hsl(var(--background));
    border-bottom: 1px solid hsl(var(--border));
}

.mbff-header-inner {
    align-items: center;
    max-width: 1200px;
    min-height: 64px;
    margin: 0 auto;
    padding: 0 15px;
}

.mbff-header-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    min-height: 64px;
}

.mbff-bottom-row {
    display: contents;
    min-height: 0;
    padding: 0;
}

.mbff-nav { grid-column: 1; grid-row: 1; }
.mbff-top-row { grid-column: 2; grid-row: 1; }
.mbff-header-actions { grid-column: 3; grid-row: 1; }

.mbff-logo-block {
    width: auto;
    flex: 0 0 auto;
    background: transparent;
    border: 0;
    padding: 0 16px 0 0;
}

.mbff-logo-block .mbff-logo {
    height: 40px;
    max-width: 140px;
    filter: none;
}

.mbff-logo-block .js-logo-light { display: block; }
.mbff-logo-block .js-logo-dark { display: none; }

.mbff-top-row {
    height: auto;
    flex-basis: auto;
    gap: 8px;
    padding: 0 8px 0 0;
    border-bottom: 0;
    justify-content: flex-end;
}

.mbff-util-link {
    color: hsl(var(--muted-foreground));
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
}

.mbff-util-link:hover { color: hsl(var(--foreground)); }

.mbff-nav { gap: 4px; }

.mbff-nav-link {
    height: 36px;
    padding: 0 12px;
    border-radius: calc(var(--radius) - 2px);
    color: hsl(var(--muted-foreground));
    font-family: var(--sh-font);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
}

.mbff-nav-link:hover,
.mbff-nav-link.active,
.mbff-nav-link[aria-expanded="true"] {
    color: hsl(var(--foreground)) !important;
    background: hsl(var(--accent));
    opacity: 1;
}

.mbff-header-actions { gap: 8px; }

.mbff-search-btn,
.mbff-login-btn,
.mbff-athlete-btn,
.btn,
.btn-custom {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 36px;
    padding: 0 16px;
    border-radius: calc(var(--radius) - 2px);
    font-family: var(--sh-font);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    line-height: 1;
    box-shadow: none !important;
    white-space: nowrap;
}

.mbff-search-btn {
    width: 36px;
    padding: 0;
    border: 0;
    background: transparent;
    color: hsl(var(--foreground));
}

.mbff-search-btn:hover { background: hsl(var(--accent)); }

.mbff-athlete-btn,
.btn-custom,
.btn-primary {
    background: hsl(var(--primary)) !important;
    border: 1px solid hsl(var(--primary)) !important;
    color: hsl(var(--primary-foreground)) !important;
}

.mbff-athlete-btn:hover,
.btn-custom:hover,
.btn-custom:focus,
.btn-custom:active,
.btn-primary:hover {
    background: hsl(240 6% 18%) !important;
    color: hsl(var(--primary-foreground)) !important;
}

.mbff-login-btn,
.btn-outline-secondary,
.btn-outline-dark {
    background: hsl(var(--background)) !important;
    border: 1px solid hsl(var(--input)) !important;
    color: hsl(var(--foreground)) !important;
}

.mbff-login-btn:hover,
.btn-outline-secondary:hover,
.btn-outline-dark:hover {
    background: hsl(var(--accent)) !important;
    color: hsl(var(--foreground)) !important;
}

.mbff-dropdown-menu,
.dropdown-menu {
    background: hsl(var(--popover));
    color: hsl(var(--popover-foreground));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: 4px;
    margin-top: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.mbff-dropdown-menu .dropdown-item,
.dropdown-menu .dropdown-item {
    border-radius: calc(var(--radius) - 4px);
    color: hsl(var(--foreground));
    font-size: 14px;
    padding: 8px 10px;
}

.mbff-dropdown-menu .dropdown-item:hover,
.mbff-dropdown-menu .dropdown-item:focus,
.dropdown-menu .dropdown-item:hover,
.dropdown-menu .dropdown-item:focus {
    background: hsl(var(--accent));
    color: hsl(var(--accent-foreground));
}

.mbff-search-box {
    background: hsl(var(--background));
    border-top: 1px solid hsl(var(--border));
    padding: 12px 24px 16px;
}

.mbff-search-box input,
.form-control,
.form-input,
.form-select {
    height: 36px;
    border: 1px solid hsl(var(--input));
    border-radius: calc(var(--radius) - 2px);
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    box-shadow: none;
    font-family: var(--sh-font);
}

.mbff-search-box input {
    max-width: 420px;
}

.mbff-search-box input::placeholder,
.form-control::placeholder {
    color: hsl(var(--muted-foreground));
}

.mbff-search-box input:focus,
.form-control:focus,
.form-input:focus,
.form-select:focus {
    border-color: hsl(var(--ring));
    box-shadow: 0 0 0 3px hsl(var(--ring) / 0.16) !important;
    outline: none;
}

textarea.form-control,
textarea.form-input {
    height: auto;
    min-height: 96px;
}

/* ── Mobile nav ── */
@media (max-width: 991.98px) {
    .mobile-nav-wrapper .mobile-header {
        background: hsl(var(--background)) !important;
        border-bottom: 1px solid hsl(var(--border)) !important;
        box-shadow: none !important;
    }

    .mobile-nav-wrapper .header-btn,
    .mobile-nav-wrapper .header-btn svg {
        color: hsl(var(--foreground)) !important;
        stroke: hsl(var(--foreground)) !important;
    }

    .mobile-nav-wrapper .mobile-header .js-logo-light { display: block !important; }
    .mobile-nav-wrapper .mobile-header .js-logo-dark { display: none !important; }
}

.custom-offcanvas {
    border-right: 1px solid hsl(var(--border));
}

.auth-btn {
    height: 36px;
    border-radius: calc(var(--radius) - 2px);
    font-weight: 500;
}

.auth-btn-primary {
    background: hsl(var(--primary)) !important;
    border-color: hsl(var(--primary)) !important;
    color: hsl(var(--primary-foreground)) !important;
}

.auth-btn-outline {
    background: transparent !important;
    border: 1px solid hsl(var(--input)) !important;
    color: hsl(var(--foreground)) !important;
}

/* ── Content ── */
.section .section-title {
    text-align: left;
    margin-bottom: 1.25rem;
}

.section .section-title > .d-flex {
    flex-direction: row;
    align-items: center;
    justify-content: space-between !important;
}

.section .section-title .title,
.section .section-title .title a,
.section .section-title .title a .title-text {
    font-family: var(--sh-font) !important;
    font-size: 1.5rem !important;
    font-weight: 600 !important;
    letter-spacing: -0.025em;
    line-height: 1.2 !important;
    text-transform: none !important;
    color: hsl(var(--foreground)) !important;
}

.post-item .image,
.images-only-item,
.images-only-thumb {
    border-radius: var(--radius);
}

.post-item .title,
.post-item .title a,
.images-only-title {
    font-family: var(--sh-font) !important;
    font-weight: 600;
    letter-spacing: -0.02em;
    text-transform: none;
}

.badge {
    border-radius: 999px;
    font-weight: 500;
    letter-spacing: 0;
}

.modal-content {
    border: 1px solid hsl(var(--border));
    border-radius: calc(var(--radius) + 4px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
}

.modal-header,
.modal-footer {
    border-color: hsl(var(--border));
}

.section.sponsors-strip {
    background: hsl(var(--background));
    border-top: 1px solid hsl(var(--border));
    border-bottom: 1px solid hsl(var(--border));
}

.sponsors-strip-head {
    color: hsl(var(--muted-foreground));
    font-family: var(--sh-font);
    letter-spacing: 0;
    text-transform: none;
    font-weight: 500;
}

.sponsor-item img { filter: none; }

.featured-section a:hover,
.mbff-board a:hover,
.mbff-board a:focus {
    color: #fff !important;
}

/* ── Footer ── */
#footer {
    margin-top: 64px;
    border-top: 1px solid hsl(var(--border));
    background: hsl(var(--background));
    color: hsl(var(--muted-foreground));
}

#footer .footer-inner { padding: 48px 0 32px; }

.footer-widget .widget-title {
    font-family: var(--sh-font);
    font-size: 14px;
    font-weight: 500;
    color: hsl(var(--foreground));
    margin-bottom: 16px;
}

.footer-social-links a {
    width: 36px;
    height: 36px;
    border: 1px solid hsl(var(--border));
    border-radius: calc(var(--radius) - 2px);
    color: hsl(var(--foreground));
}

.footer-social-links a:hover {
    background: hsl(var(--accent));
}

.footer-copyright {
    border-top: 1px solid hsl(var(--border));
}

.btn-scroll-up {
    width: 36px;
    height: 36px;
    border: 1px solid hsl(var(--border));
    border-radius: calc(var(--radius) - 2px);
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    box-shadow: var(--sh-shadow);
}

/* ── shadcn/ui primitives (new-york): card, button, badge, typography ── */
.sh-card {
    display: flex;
    flex-direction: column;
    background: hsl(var(--card));
    color: hsl(var(--card-foreground));
    border: 1px solid hsl(var(--border));
    border-radius: calc(var(--radius) + 4px);
    box-shadow: var(--sh-shadow);
    overflow: hidden;
}

.sh-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 16px 16px 12px;
}

.sh-card-header--compact {
    padding: 12px 16px;
    border-bottom: 1px solid hsl(var(--border));
}

.sh-card-title {
    margin: 0;
    font-family: var(--sh-font);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: hsl(var(--foreground));
}

.sh-card-title--sm {
    font-size: 14px;
}

.sh-card-footer {
    padding: 12px 16px 16px;
    margin-top: auto;
}

.sh-h1 {
    margin: 0;
    font-family: var(--sh-font);
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.1;
}

.sh-h2 {
    margin: 0;
    font-family: var(--sh-font);
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1.2;
    color: hsl(var(--foreground));
}

.sh-muted {
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
    color: hsl(var(--muted-foreground));
}

.sh-empty {
    margin: 0;
    padding: 24px 16px;
    text-align: center;
    font-size: 14px;
    color: hsl(var(--muted-foreground));
}

.sh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 36px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: calc(var(--radius) - 2px);
    font-family: var(--sh-font);
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.sh-btn:focus-visible {
    outline: 2px solid hsl(var(--ring));
    outline-offset: 2px;
}

.sh-btn--sm {
    height: 32px;
    padding: 0 12px;
    font-size: 13px;
}

.sh-btn--lg {
    height: 40px;
    padding: 0 24px;
}

.sh-btn--block {
    width: 100%;
}

.sh-btn--primary,
.sh-btn--primary:hover,
.sh-btn--primary:focus {
    background: hsl(var(--primary));
    border-color: hsl(var(--primary));
    color: hsl(var(--primary-foreground)) !important;
}

.sh-btn--primary:hover {
    background: hsl(240 5.9% 10% / 0.9);
}

.sh-btn--secondary {
    background: hsl(var(--secondary));
    color: hsl(var(--secondary-foreground)) !important;
}

.sh-btn--secondary:hover {
    background: hsl(240 4.8% 95.9% / 0.8);
    background: hsl(240 4.8% 91%);
}

.sh-btn--outline {
    background: hsl(var(--background));
    border-color: hsl(var(--input));
    color: hsl(var(--foreground)) !important;
    box-shadow: var(--sh-shadow);
}

.sh-btn--outline:hover {
    background: hsl(var(--accent));
}

.sh-btn--ghost {
    background: transparent;
    color: hsl(var(--foreground)) !important;
}

.sh-btn--ghost:hover {
    background: hsl(var(--accent));
}

/* On dark surfaces (hero) */
.sh-btn--light,
.sh-btn--light:focus {
    background: #fff;
    border-color: #fff;
    color: hsl(var(--primary)) !important;
}

.sh-btn--light:hover {
    background: hsl(0 0% 100% / 0.9);
}

.sh-btn--glass {
    background: hsl(0 0% 100% / 0.08);
    border-color: hsl(0 0% 100% / 0.2);
    color: #fff !important;
}

.sh-btn--glass:hover {
    background: hsl(0 0% 100% / 0.16);
    color: #fff !important;
}

.sh-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    width: fit-content;
    padding: 2px 10px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
}

.sh-badge--secondary { background: hsl(var(--secondary)); color: hsl(var(--secondary-foreground)); }
.sh-badge--outline { border-color: hsl(var(--border)); color: hsl(var(--foreground)); }
.sh-badge--gold { background: #fef3c7; color: #92400e; }
.sh-badge--upcoming { background: hsl(var(--secondary)); color: hsl(var(--secondary-foreground)); }
.sh-badge--live { background: #dcfce7; color: #166534; }
.sh-badge--finished { border-color: hsl(var(--border)); color: hsl(var(--muted-foreground)); }

.sh-badge--live::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #16a34a;
}

/* Narrow desktop: keep nav and utility link from touching */
.mbff-top-row { padding-left: 16px; }

@media (max-width: 1199.98px) {
    .mbff-top-row { display: none; }
    .mbff-nav-link { padding: 0 10px; }
}
