html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
    margin: 0;
    padding: 0;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    background-color: #F3EEE5;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

footer {

}

:root {
    --nav-bg: #2F4156;
    --nav-brand: #F3EEE5;
    --page-bg: #F3EEE5;
    --bs-primary: #263546;
    --bs-primary-rgb: 38, 53, 70;
    --bs-primary-hover: #1D2936;
    --bs-blue: #2F4156;
    --bs-info: #556F8C;
    --bs-info-rgb: 85, 111, 140;
    --bs-cl-setor: #556F8C;
    --bs-cyan: #6B849F;
    --bs-cyan-rgb: 107, 132, 159;
    --nav-accent-light: #E4EDF5;
    --nav-accent-muted: #CAD8E6;
    --btn-highlight: #243347;
    --page-max-width: 1320px;
    --coastal-surface: #fff;
    --coastal-radius-sm: 8px;
    --coastal-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    --coastal-shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
    --coastal-border: rgba(13, 148, 136, 0.2);
    --coastal-ink: #0f172a;
    --coastal-ink-muted: #64748b;
}



/* Page shell – centered content, max-width, padding for fixed navbar; min-height so footer stays at bottom without body flex */
.page-shell {
    --footer-height: 5rem; /* py-4 + one line; adjust if footer content changes */
    min-height: calc(100vh - var(--footer-height));
    max-width: var(--page-max-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
    padding-top: 80px;
}

/* Layout harmonization wrapper (safe: behavior-neutral) */
.ds-main {
    padding-bottom: 1rem; /* same as Bootstrap pb-3 */
}

.ds-page-body {
    width: 100%;
}

@media (min-width: 768px) {
    .page-shell {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 992px) {
    .page-shell {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* Standard content wrapper – same vertical rhythm as Clubs (navbar gap + bottom margin) */
.page-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1rem;
    margin-bottom: 3rem;
}

/* Success message container – single place for all pages */
#successMessageContainer {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: none;
}

#successMessageContainer .alert {
    min-width: 300px;
}

/* ========== Shared responsive list (list-primary pages: Clubs, Events, Championships, Athletes, News) ========== */
.responsive-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.25rem 0 0;
    margin: 0;
    list-style: none;
}

.responsive-list-item {
    background: var(--coastal-surface);
    border-radius: var(--coastal-radius-sm);
    padding: 0.6rem 0.85rem;
    box-shadow: var(--coastal-shadow);
    transition: border-color 120ms ease-in-out, box-shadow 120ms ease-in-out;
    border: 1px solid var(--coastal-border);
}

@media (min-width: 992px) {
    .responsive-list {
        gap: 0.95rem;
        padding: 0.25rem 0 0;
    }
    .responsive-list-item {
        padding: 0.7rem 1rem;
    }
    .list-item-header {
        margin-bottom: 0.35rem;
    }
    .list-item-field {
        padding: 0.18rem 0;
        font-size: 0.85rem;
    }
    .list-item-actions {
        margin-top: 0.55rem;
        gap: 0.45rem;
    }
}

.responsive-list-item:hover {
    border-color: rgba(13, 148, 136, 0.35);
    box-shadow: var(--coastal-shadow-md);
}

.list-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.25rem;
}

.list-item-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--coastal-ink);
    margin: 0;
    text-transform: uppercase;
}

.list-item-field {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.12rem 0;
    font-size: 0.82rem;
}

.list-item-field:last-of-type {
    padding-bottom: 0;
}

.list-item-label {
    font-weight: 600;
    color: var(--coastal-ink-muted);
    text-transform: uppercase;
    font-size: 0.65rem;
    letter-spacing: 0.02em;
    margin-right: 0.9rem;
    flex-shrink: 0;
}

.list-item-value {
    text-align: right;
    flex-grow: 1;
    color: var(--coastal-ink);
    font-weight: 500;
}

.list-item-actions {
    display: flex;
    margin-top: 0.4rem;
    gap: 0.4rem;
    flex-wrap: nowrap;
    justify-content: flex-end;
}

.list-item-actions .btn-sm {
    padding: 0.2rem 0.45rem;
    font-size: 0.75rem;
    line-height: 1.4;
}

/* List only on small screens (table-primary pages: Species, Users) */
@media (min-width: 992px) {
    .responsive-list--mobile-only {
        display: none !important;
    }
}

@media (max-width: 991.98px) {
    .responsive-list--mobile-only {
        display: flex;
    }
}

/* Optional accent stripe for Events/Championships (teal/orange or blue/green) */
.responsive-list-item--events::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border-top: 3px solid rgba(13, 148, 136, 0.5);
    border-left: 3px solid rgba(234, 88, 12, 0.4);
    opacity: 0.6;
    pointer-events: none;
}

.responsive-list-item--events {
    position: relative;
    overflow: hidden;
}

.responsive-list-item--championships::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border-top: 3px solid rgba(56, 189, 248, 0.9);
    border-left: 3px solid rgba(34, 197, 94, 0.85);
    opacity: 0.35;
    pointer-events: none;
}

.responsive-list-item--championships {
    position: relative;
    overflow: hidden;
}

/* Shared action buttons */
.btn-action-edit {
    color: #6b7280;
    border-color: #9ca3af;
    background-color: transparent;
}

.btn-action-edit:hover {
    color: #fff;
    background-color: #6b7280;
    border-color: #6b7280;
}

.btn-action-details {
    color: #2c7a7b;
    border-color: #38b2ac;
    background-color: transparent;
}

.btn-action-details:hover {
    color: #fff;
    background-color: #2c7a7b;
    border-color: #2c7a7b;
}

.btn-action-delete {
    color: #c53030;
    border-color: #fc8181;
    background-color: transparent;
}

.btn-action-delete:hover {
    color: #fff;
    background-color: #c53030;
    border-color: #c53030;
}

.btn-action-add {
    color: #2d5016;
    border-color: #68d391;
    background-color: transparent;
}

.btn-action-add:hover {
    color: #fff;
    background-color: #2d5016;
    border-color: #2d5016;
}

.btn-action-secondary {
    color: #2c5282;
    border-color: #63b3ed;
    background-color: transparent;
}

.btn-action-secondary:hover {
    color: #fff;
    background-color: #2c5282;
    border-color: #2c5282;
}

/* Club/association badge */
.club-badge {
    display: inline-block;
    background: rgba(47, 65, 86, 0.12);
    color: #2F4156;
    border: 1px solid rgba(47, 65, 86, 0.25);
    font-size: 0.7rem;
    padding: 0.12rem 0.45rem;
    border-radius: 0.2rem;
    text-transform: uppercase;
    line-height: 1.1;
}

/* Clubs index: transparent card surface, compact filters */
.clubs-index-surface {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.clubs-index-surface .card-body {
    background: transparent !important;
}

/* Users index: dropdown menus above rows are not clipped by table horizontal scroll on lg+ */
@media (min-width: 992px) {
    .users-index-table-wrap.table-responsive {
        overflow: visible;
    }
}

@media (max-width: 575.98px) {
    .events-index-card-body {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}

.clubs-index-surface #associationFilter,
.clubs-index-surface #searchInput {
    height: 32px;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
    font-size: 0.85rem;
}

/* Shared compact filter sizing (index pages + modals) */
#associationFilter,
#clubFilter,
#championshipFilter,
#searchInput,
#clubSearchInput,
#eventParticipantsClubFilter,
#eventParticipantsSectorFilter,
#eventParticipantsSearchInput {
    height: 32px;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
    font-size: 0.85rem;
}

/* Championships: browser tabs and tab content (coastal design tokens) */
.browser-tabs {
    display: flex;
    border-bottom: 2px solid var(--coastal-border);
    margin-bottom: 0;
    padding-left: 0;
    background-color: rgba(15, 23, 42, 0.04);
    border-radius: var(--coastal-radius-sm) var(--coastal-radius-sm) 0 0;
    flex-wrap: wrap;
}

.browser-tab {
    padding: 10px 20px;
    background-color: rgba(15, 23, 42, 0.06);
    border: 1px solid var(--coastal-border);
    border-bottom: none;
    border-radius: var(--coastal-radius-sm) var(--coastal-radius-sm) 0 0;
    cursor: pointer;
    margin-right: 2px;
    position: relative;
    top: 2px;
    user-select: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    list-style: none;
    color: var(--coastal-ink-muted);
}

.browser-tab::before {
    display: none;
    content: none;
}

.browser-tab:hover {
    background-color: rgba(15, 23, 42, 0.08);
    color: var(--coastal-ink);
}

.browser-tab.active {
    background-color: var(--coastal-surface);
    border-bottom: 2px solid var(--coastal-surface);
    z-index: 1;
    font-weight: 500;
    color: var(--coastal-ink);
}

.browser-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--coastal-surface);
}

.tab-content-wrapper {
    border: 1px solid var(--coastal-border);
    border-top: none;
    border-radius: 0 0 var(--coastal-radius-sm) var(--coastal-radius-sm);
    background-color: var(--coastal-surface);
}

.tab-content-wrapper .card-body {
    padding: 1rem 1.25rem;
}

@media (min-width: 992px) {
    .tab-content-wrapper .card-body {
        padding: 1.25rem 1.5rem;
    }
}

@media (max-width: 991.98px) {
    .browser-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .browser-tab {
        padding: 8px 16px;
        font-size: 0.875rem;
    }
}

/* Championships table inside tab content (scoped so it doesn’t override global table everywhere) */
.tab-content-wrapper .table {
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
    background-color: #fff;
}

.tab-content-wrapper .table thead th {
    background-color: rgba(15, 23, 42, 0.04);
    border-bottom: 2px solid var(--coastal-border);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
    padding: 1rem 0.75rem;
    vertical-align: middle;
    color: #495057;
}

.tab-content-wrapper .table tbody td {
    padding: 1rem 0.75rem;
    vertical-align: middle;
    border-bottom: 1px solid #e9ecef;
}

.tab-content-wrapper .table tbody tr {
    transition: all 0.15s ease-in-out;
}

.tab-content-wrapper .table tbody tr:hover {
    background-color: #f8f9fa;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.tab-content-wrapper .table tbody tr:last-child td {
    border-bottom: none;
}

@media (max-width: 991.98px) {
    .tab-content-wrapper .table-responsive {
        overflow-x: visible;
    }
}

/* Stack utilities – vertical/horizontal spacing (layout-and-spacing.md) */
.stack-v-xs { display: flex; flex-direction: column; gap: 0.25rem; }
.stack-v-sm { display: flex; flex-direction: column; gap: 0.5rem; }
.stack-v-md { display: flex; flex-direction: column; gap: 0.75rem; }
.stack-v-lg { display: flex; flex-direction: column; gap: 1.5rem; }
.stack-v-xl { display: flex; flex-direction: column; gap: 2rem; }
.stack-h-xs { display: flex; flex-direction: row; gap: 0.25rem; }
.stack-h-sm { display: flex; flex-direction: row; gap: 0.5rem; }
.stack-h-md { display: flex; flex-direction: row; gap: 0.75rem; }
.stack-h-lg { display: flex; flex-direction: row; gap: 1rem; }

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem rgba(85, 111, 140, 0.5);
}

/* Prefer focus-visible so keyboard navigation gets clear rings */
.btn:focus-visible,
.btn-link.nav-link:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible,
.form-check-input:focus-visible,
.nav-link:focus-visible,
.pagination .page-link:focus-visible,
.navbar-toggler:focus-visible,
.dropdown-item:focus-visible,
.btn-close:focus-visible {
    outline: none;
    box-shadow: 0 0 0 0.1rem #fff, 0 0 0 0.25rem rgba(85, 111, 140, 0.5);
}

/* ========== Navbar – coastal/navy theme ========== */
.navbar-coastal {
    background-color: var(--nav-bg) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.navbar-coastal .navbar-brand,
.navbar-coastal .navbar-brand:hover,
.navbar-coastal .navbar-brand:focus {
    color: var(--nav-brand) !important;
}

.navbar-coastal .navbar-brand-text {
    color: var(--nav-brand) !important;
}

.navbar-coastal .nav-link {
    color: var(--nav-accent-light) !important;
}

.navbar-coastal .nav-link:hover,
.navbar-coastal .nav-link:focus {
    color: #fff !important;
}

.navbar-coastal .nav-link.dropdown-toggle {
    color: var(--nav-accent-light) !important;
}

.navbar-coastal .dropdown-menu {
    background-color: #fff;
    border: 1px solid var(--nav-accent-muted);
}

.navbar-coastal .dropdown-item:hover {
    background-color: var(--nav-accent-muted);
}

/* Navbar toggler (hamburger) – light icon on dark navbar */
.navbar-toggler-coastal {
    border-color: var(--nav-accent-muted);
    color: var(--nav-brand);
}

.navbar-toggler-coastal .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23F3EEE5' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-toggler-coastal:hover,
.navbar-toggler-coastal:focus {
    border-color: var(--nav-brand);
    color: var(--nav-brand);
}

/* Footer – match navbar */
.site-footer-coastal {
    background-color: var(--nav-bg);
    color: var(--nav-accent-light);
}

.site-footer-coastal a {
    color: var(--nav-accent-muted);
}

.site-footer-coastal a:hover {
    color: var(--nav-brand);
}

/* Modern card styling */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.15s ease-in-out;
    border-radius: var(--coastal-radius-sm);
}

    .card:hover {
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    }

.card-header {
    background-color: #fff;
    border-bottom: 2px solid #CAD8E6;
    font-weight: 600;
}

/* CRUD pages use Bootstrap `bg-primary` on the card header; keep it coherent with coastal palette */
.card-header.bg-primary {
    background-color: var(--bs-primary) !important;
    border-bottom-color: var(--nav-accent-muted) !important;
}

/* Validation summaries and server-side error messages use Bootstrap alerts */
.alert.alert-danger {
    border-radius: 0.375rem;
    background-color: #f8d7da;
    border: 1px solid #f5c2c7;
    color: #842029;
}

.alert.alert-warning {
    border-radius: 0.375rem;
}

.alert.alert-success {
    border-radius: 0.375rem;
}

/* ========================
   Design System - Base
   ======================== */
.ds-card {
    border: none;
    border-radius: var(--coastal-radius-sm);
    background: var(--coastal-surface);
    box-shadow: var(--coastal-shadow);
}

.ds-card:hover {
    box-shadow: var(--coastal-shadow-md);
}

.ds-card-header {
    border-bottom: 2px solid var(--nav-accent-muted);
    font-weight: 600;
    background-color: #fff;
    padding: 1rem 1rem;
    border-top-left-radius: var(--coastal-radius-sm);
    border-top-right-radius: var(--coastal-radius-sm);
}

.ds-table {
    background-color: #fff;
}

.ds-form .form-label {
    font-weight: 600;
    color: #495057;
}

.ds-btn-primary {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

.ds-btn-primary:hover {
    background-color: var(--bs-primary-hover);
    border-color: var(--bs-primary-hover);
}

/* Modal (shared AJAX partials) */
.ds-modal-content {
    border: none;
    border-radius: var(--coastal-radius-sm);
    box-shadow: var(--coastal-shadow-md);
    overflow: hidden;
}

.ds-modal-header {
    border-bottom: 1px solid var(--coastal-border);
}

.ds-modal-body {
    padding: 1rem 1.25rem;
}

#athletesModal .table thead th,
#clubsModal .table thead th {
    /*background-color: rgba(47, 65, 86, 0.04);*/
    border-bottom: 2px solid var(--coastal-border);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    font-size: 0.875rem;
}

/* Table styling */
.table {
    background-color: #fff;
}

    .table thead th {
        background-color: #E4EDF5;
        border-bottom: 2px solid #CAD8E6;
        font-weight: 600;
        text-transform: uppercase;
        font-size: 0.875rem;
        letter-spacing: 0.5px;
    }

    .table tbody tr {
        transition: background-color 0.15s ease-in-out;
    }

        .table tbody tr:hover {
            background-color: #E4EDF5;
        }

/* Pagination (index pages) */
.pagination .page-link {
    color: var(--coastal-ink-muted);
    background-color: transparent;
    border-color: var(--coastal-border);
}

.pagination .page-link:hover,
.pagination .page-link:focus-visible {
    color: var(--coastal-ink);
    background-color: rgba(47, 65, 86, 0.06);
    border-color: var(--coastal-border);
}

.pagination .page-item.active .page-link {
    color: #fff;
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

.pagination .page-item.disabled .page-link {
    color: rgba(100, 116, 139, 0.6);
    background-color: transparent;
    border-color: var(--coastal-border);
}

/* Form styling */
.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

.form-control {
    border: 1px solid #ced4da;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

    .form-control:focus {
        border-color: #556F8C;
        box-shadow: 0 0 0 0.2rem rgba(85, 111, 140, 0.25);
    }

/* Button groups */
.btn-group-actions .btn {
    margin-right: 0.25rem;
}

    .btn-group-actions .btn:last-child {
        margin-right: 0;
    }

/* Page headers */
.page-header {
    background: linear-gradient(135deg, #556F8C 0%, #2F4156 50%, #263546 100%);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
    border-radius: 0.5rem;
}

    .page-header h1 {
        margin: 0;
        font-weight: 700;
    }

/* Badge styling */
.badge {
    padding: 0.5em 0.75em;
    font-weight: 500;
}

/* Action links styling */
.action-link {
    text-decoration: none;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    transition: all 0.15s ease-in-out;
}

    .action-link:hover {
        text-decoration: none;
    }

/* UI-01: Dropdown arrow indicators */
.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    padding-right: 2.5rem;
}

/* UI-01: Standardized button styles */
.btn {
    font-weight: 500;
    border-radius: 0.375rem;
    transition: all 0.15s ease-in-out;
}

.btn-primary {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

    .btn-primary:hover {
        background-color: var(--bs-primary-hover);
        border-color: var(--bs-primary-hover);
    }

.btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
}

    .btn-secondary:hover {
        background-color: #5c636a;
        border-color: #565e64;
    }

/* UI-01: Standardized error messages */
.text-danger {
    color: #dc3545 !important;
    font-size: 0.875rem;
}

.validation-summary-errors {
    background-color: #f8d7da;
    border: 1px solid #f5c2c7;
    border-radius: 0.375rem;
    padding: 0.75rem;
    margin-bottom: 1rem;
}

    .validation-summary-errors ul {
        margin-bottom: 0;
        padding-left: 1.5rem;
    }

/* ========== Index page – design tokens & layout ========== */
.index-page {
    --index-surface: #ffffff;
    --index-surface-hover: #E4EDF5;
    --index-border: rgba(47, 65, 86, 0.12);
    --index-accent: #2F4156;
    --index-accent-soft: rgba(47, 65, 86, 0.12);
    --index-text: #1e293b;
    --index-text-muted: #556F8C;
    --index-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    --index-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.08);
    --index-radius: 12px;
    --index-radius-sm: 8px;
    --index-transition: 0.2s ease;
}

    .index-page .index-hero {
        padding: 2rem 0 3rem;
    }

    .index-page .index-grid {
        display: grid;
        gap: 1.5rem;
        grid-template-columns: 1fr;
        grid-template-areas:
            "full"
            "main"
            "sidebar"
            "last";
    }

    .index-page .index-col-full {
        grid-area: full;
    }

    .index-page .index-col-main {
        grid-area: main;
    }

    .index-page .index-col-sidebar {
        grid-area: sidebar;
    }

    .index-page .index-col-last {
        grid-area: last;
    }

@media (min-width: 992px) {
    .index-page .index-grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            "full"
            "main"
            "sidebar"
            "last";
    }
}

/* ========== Index cards ========== */
.index-card {
    background: var(--coastal-surface);
    border-radius: var(--index-radius);
    box-shadow: var(--coastal-shadow);
    border: 1px solid var(--coastal-border);
    overflow: hidden;
    transition: box-shadow var(--index-transition), border-color var(--index-transition);
    position: relative;
}

    .index-card:hover {
        box-shadow: var(--coastal-shadow-md);
    }

.index-card-accent {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--index-accent);
    border-radius: var(--index-radius) 0 0 var(--index-radius);
}

.index-card-inner {
    margin-left: 4px;
}

.index-card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--coastal-border);
    background: var(--coastal-surface);
}

.index-card-title {
    margin: 0;
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--index-text);
    letter-spacing: -0.01em;
}

.index-card-body {
    padding: 1.25rem;
}

.index-card-footer {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--coastal-border);
    background: var(--index-surface-hover);
}

/* ========== Event in progress (featured) ========== */
.index-card-featured .index-card-body {
    padding: 1.25rem;
}

/* Carrossel eventos em andamento (vários eventos) */
.events-in-progress-card .index-card-body.p-0 {
    padding: 0 !important;
}

.events-in-progress-track {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

    .events-in-progress-track::-webkit-scrollbar {
        display: none;
    }

.events-in-progress-slide {
    flex: 0 0 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    min-width: 0;
}

    .events-in-progress-slide > .event-in-progress {
        padding: 1.25rem;
    }

.events-in-progress-nav {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.index-carousel-btn {
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--index-border);
    background: var(--index-surface);
    color: var(--index-text);
    border-radius: var(--index-radius-sm);
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    transition: background-color var(--index-transition), border-color var(--index-transition);
}

    .index-carousel-btn:hover {
        background: var(--index-surface-hover);
        border-color: var(--index-accent);
        color: var(--index-accent);
    }

.events-in-progress-counter {
    font-size: 0.875rem;
    color: var(--index-text-muted);
    min-width: 3rem;
    text-align: center;
}

.index-card-empty {
    font-size: 0.9375rem;
}

.event-in-progress {
    display: grid;
    gap: 1.25rem;
    align-items: center;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .event-in-progress {
        grid-template-columns: 180px 1fr auto;
    }
}

.event-in-progress-media {
    border-radius: var(--index-radius-sm);
    overflow: hidden;
    background: var(--index-surface-hover);
}

.event-in-progress-img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

@media (min-width: 768px) {
    .event-in-progress-img {
        height: 100%;
        min-height: 100px;
    }
}

.event-in-progress-content {
    min-width: 0;
}

.event-in-progress-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--index-text);
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

.index-badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.index-badge-live {
    background: var(--index-accent-soft);
    color: var(--index-accent);
}

.event-in-progress-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 0.75rem 0 0;
    font-size: 0.875rem;
}

.event-meta-item {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
}

    .event-meta-item dt {
        margin: 0;
        font-weight: 500;
        color: var(--index-text-muted);
    }

    .event-meta-item dd {
        margin: 0;
        color: var(--index-text);
    }

.event-in-progress-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem 0.75rem;
}

@media (max-width: 767px) {
    .event-in-progress-actions {
        justify-content: stretch;
        flex-direction: column;
        align-items: stretch;
    }
}

/* ========== Index buttons ========== */
.index-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--index-radius-sm);
    text-decoration: none;
    transition: background-color var(--index-transition), color var(--index-transition), box-shadow var(--index-transition);
    border: none;
    cursor: pointer;
}

.index-btn-primary {
    background: var(--bs-primary);
    color: #fff;
    min-width: 160px;
}

    .index-btn-primary:hover {
        background: var(--bs-primary-hover);
        color: #fff;
        box-shadow: 0 2px 8px rgba(47, 65, 86, 0.35);
    }

/* Ensure classification button text stays visible (overrides global a color on mobile/desktop) */
.event-in-progress-actions a.index-btn-primary,
.event-in-progress-actions a.index-btn-primary:link,
.event-in-progress-actions a.index-btn-primary:visited {
    color: #fff;
}

/* Botões em par (Ver evento + Ver classificações): mesma largura mínima e partilha igual do espaço */
.event-in-progress-actions .index-btn,
.last-events-actions .index-btn {
    flex: 1 1 0;
    min-width: 160px;
    width: auto;
    box-sizing: border-box;
}

.index-btn-ghost {
    background: transparent;
    color: var(--index-text-muted);
    width: 100%;
}

    .index-btn-ghost:hover {
        background: var(--index-surface-hover);
        color: var(--index-accent);
    }

/* ========== Index list (competitions & news) ========== */
.index-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.index-list-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.75rem 0;
    text-decoration: none;
    color: inherit;
    border-radius: var(--index-radius-sm);
    transition: background-color var(--index-transition);
}

    .index-list-item:hover {
        background: var(--index-surface-hover);
    }

    .index-list-item:not(:last-child) {
        border-bottom: 1px solid var(--index-border);
    }

.index-list-date,
.index-list-meta {
    flex-shrink: 0;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--index-accent);
    min-width: 3rem;
    text-align: left;
}

.index-list-meta {
    font-weight: 500;
    color: var(--index-text-muted);
}

.index-list-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.index-list-title {
    font-weight: 500;
    color: var(--index-text);
    font-size: 0.9375rem;
}

.index-list-subtitle {
    font-size: 0.8125rem;
    color: var(--index-text-muted);
}

/* ========== Próximas competições – champ-indi (céu/ praia) ========== */
.upcoming-events-list {
    list-style: none;
    margin: 0;
    padding: 0;
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

    .upcoming-events-list li {
        margin: 0;
    }

.upcoming-events-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    min-height: 96px;
    text-decoration: none;
    color: #fff;
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center 65%;
    background-repeat: no-repeat;
    background-color: #c45c26;
    transition: transform var(--index-transition), box-shadow var(--index-transition);
}

    .upcoming-events-row:hover {
        transform: scale(1.01);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
        color: #fff;
    }

/* Overlay para legibilidade sobre céu dourado/laranja */
.upcoming-events-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, rgba(20, 15, 10, 0.82) 0%, rgba(40, 25, 10, 0.55) 45%, rgba(80, 50, 20, 0.25) 100%);
    pointer-events: none;
}

.upcoming-events-date {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    font-size: 1.0625rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6), 0 0 1px rgba(0, 0, 0, 0.8);
    min-width: 2.75rem;
}

.upcoming-events-content {
    position: relative;
    z-index: 1;
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.upcoming-events-title {
    font-weight: 600;
    font-size: 0.9375rem;
    line-height: 1.3;
    letter-spacing: 0.01em;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55), 0 0 1px rgba(0, 0, 0, 0.7);
}

.upcoming-events-subtitle {
    font-size: 0.8125rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.92);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.upcoming-events-list li + li .upcoming-events-row {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* ========== Últimos eventos – lista com botão classificações ========== */
.last-events-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.last-events-item {
    border-bottom: 1px solid var(--index-border);
}

    .last-events-item:last-child {
        border-bottom: none;
    }

.last-events-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
    padding: 1rem 1.25rem;
    min-height: 60px;
}

.last-events-thumb {
    flex-shrink: 0;
    width: 80px;
    border-radius: var(--index-radius-sm, 8px);
    overflow: hidden;
    background: var(--index-surface-hover, #f8fafc);
}

.last-events-img {
    width: 100%;
    height: 60px;
    object-fit: cover;
    display: block;
}

.last-events-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.last-events-date {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--index-accent);
}

.last-events-title {
    font-weight: 500;
    font-size: 0.9375rem;
    color: var(--index-text);
    line-height: 1.3;
}

.last-events-subtitle {
    font-size: 0.8125rem;
    color: var(--index-text-muted);
}

.last-events-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem 0.75rem;
    flex-shrink: 0;
}

.last-events-btn {
    flex-shrink: 0;
}

    .last-events-btn.index-btn-primary,
    .last-events-btn.index-btn-primary:link,
    .last-events-btn.index-btn-primary:visited {
        color: #fff;
    }

/* ========== Index – mobile (≤767px) ========== */
@media (max-width: 767px) {
    .index-page {
        --index-radius: 10px;
        --index-radius-sm: 6px;
        overflow-x: hidden;
    }

        .index-page .index-hero {
            padding: 1rem 0 1.5rem;
            padding-left: env(safe-area-inset-left, 0);
            padding-right: env(safe-area-inset-right, 0);
        }

        .index-page .index-grid {
            gap: 1rem;
            padding: 0;
        }

    .index-card {
        border-radius: var(--index-radius);
    }

    .index-card-header {
        padding: 0.875rem 1rem;
    }

    .index-card-title {
        font-size: 1rem;
    }

    .index-card-body {
        padding: 1rem;
    }

    .index-card-footer {
        padding: 0.625rem 1rem;
    }

    /* Event in progress – carousel & slide */
    .events-in-progress-card .index-card-header {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .events-in-progress-slide > .event-in-progress {
        padding: 1rem;
    }

    .index-carousel-btn {
        width: 2.75rem;
        height: 2.75rem;
        min-width: 2.75rem;
        min-height: 2.75rem;
        font-size: 1.35rem;
    }

    .events-in-progress-nav {
        gap: 0.375rem;
    }

    .events-in-progress-counter {
        font-size: 0.8125rem;
        min-width: 2.5rem;
    }

    .event-in-progress-media {
        max-height: 140px;
    }

    .event-in-progress-img {
        height: 120px;
        max-height: 140px;
    }

    .event-in-progress-title {
        font-size: 1rem;
    }

    .event-in-progress-meta {
        font-size: 0.8125rem;
        gap: 0.75rem;
        margin-top: 0.5rem;
    }

    .index-btn,
    .index-btn-primary,
    .index-btn-ghost {
        min-height: 44px;
        padding: 0.625rem 1rem;
        font-size: 0.9375rem;
    }

    .index-btn-primary {
        min-width: 100%;
    }

    /* Próximas competições – touch-friendly rows */
    .upcoming-events-row {
        min-height: 80px;
        padding: 0.875rem 1rem;
        gap: 0.75rem;
    }

        .upcoming-events-row:active {
            opacity: 0.95;
        }

    /* Últimos eventos – touch-friendly em mobile */
    .last-events-row {
        flex-direction: column;
        align-items: stretch;
        padding: 0.875rem 1rem;
        gap: 0.75rem;
    }

    .last-events-actions {
        width: 100%;
        justify-content: stretch;
        flex-direction: column;
        align-items: stretch;
    }

    .event-in-progress-actions .index-btn,
    .last-events-actions .index-btn {
        flex: none;
        width: 100%;
        min-width: 100%;
    }

    .last-events-btn {
        width: 100%;
        min-width: 100%;
    }

    .upcoming-events-date {
        font-size: 1rem;
        min-width: 2.5rem;
    }

    .upcoming-events-title {
        font-size: 0.875rem;
        line-height: 1.3;
    }

    .upcoming-events-subtitle {
        font-size: 0.75rem;
    }

    /* Últimas notícias – list */
    .index-list-item {
        padding: 0.875rem 0;
        min-height: 44px;
        gap: 0.75rem;
    }

    .index-list-title {
        font-size: 0.875rem;
    }

    .index-list-meta,
    .index-list-date {
        font-size: 0.75rem;
    }
}

/* Index – very small screens (≤375px) */
@media (max-width: 375px) {
    .index-page .index-hero {
        padding: 0.75rem 0 1.25rem;
    }

    .index-page .index-grid {
        gap: 0.75rem;
    }

    .index-card-header {
        padding: 0.75rem 0.875rem;
    }

    .index-card-body {
        padding: 0.875rem;
    }

    .events-in-progress-slide > .event-in-progress {
        padding: 0.875rem;
    }

    .upcoming-events-row {
        min-height: 72px;
        padding: 0.75rem 0.875rem;
    }

    .last-events-row {
        padding: 0.75rem 0.875rem;
    }

    .upcoming-events-title {
        font-size: 0.8125rem;
    }
}
