/* Custom styles for LaMAR-like design */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

.page-header {
    margin: 40px 0 20px;
    border-bottom: none;
}

.page-header h1 {
    font-size: 2.5em;
    font-weight: 700;
    margin-bottom: 10px;
}

.page-header h3 {
    font-size: 1.5em;
    color: #666;
    font-weight: 400;
}

.navbar {
    margin-bottom: 30px;
    border-radius: 0;
    border: none;
    background-color: #f8f9fa;
}

.navbar-nav>li>a {
    font-size: 1.1em;
    padding: 15px 20px;
    color: #333;
}

.navbar-nav>li>a:hover {
    background-color: #e9ecef;
}

.authors-section {
    margin: 30px 0;
    text-align: center;
}

.authors-section h4 {
    font-size: 1.2em;
    margin-bottom: 15px;
}

.authors-section p {
    margin-bottom: 10px;
}

.resources-section {
    margin: 40px 0;
}

.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
    padding: 12px 20px;
    font-size: 1.4em;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

.abstract-section {
    max-width: 800px;
    margin: 0 auto 20px;
}

.abstract-section h3 {
    text-align: center;
}

.abstract-section p {
    margin: 0 0 0.5em;
}

.abstract-section p,
.abstract-section ul,
.abstract-section ol,
.abstract-section li {
    font-size: 1.75rem;
    line-height: 1.8;
    text-align: justify;
    text-justify: inter-word;
}

.abstract-section ul,
.abstract-section ol {
    padding-left: 1.5em;
    margin: 0;
}

.abstract-section li {
    padding-left: 0.5em;
    margin: 0;
}

.abstract-section ol ol,
.abstract-section ul ul {
    padding-left: 1em;
}

/* Acknowledgements section */
.ack-section {
    margin: 40px auto;
    max-width: 800px;
}

.ack-section h3 {
    text-align: center;
}

.ack-section p {
    text-align: justify;
    font-size: 1.1em;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Citations section */
.citation-section {
    margin: 40px auto;
    max-width: 800px;
}

.citation-section h3 {
    text-align: center;
}

.citation-section pre {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    padding: 20px;
    border-radius: 4px;
    font-size: 0.9em;
    line-height: 1.5;
    text-align: left;
    margin: 0 auto;
    max-width: 700px;
}

body {
    overflow-y: scroll;
}

.container.theme-showcase {
    max-width: 900px;
    margin: 0 auto;
}

/* Ensure consistent container alignment across all pages */
.container.theme-showcase {
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
}

#docs-content p {
    text-align: justify;
    text-justify: inter-word;
}

#docs-content h3,
#docs-content h4 {
    margin-top: 1.5em;
    /* kill the browser’s default top gap */
    margin-bottom: 0.75em;
    /* a comfortable ¾-line below each heading */
}

/* Force consistent navbar container behavior */
.navbar .container {
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .page-header h1 {
        font-size: 2em;
    }

    .page-header h3 {
        font-size: 1.2em;
    }

    .resources-section .btn {
        margin-bottom: 10px;
    }
}

.row {
    justify-content: center;
}

.col-md-12 {
    text-align: initial;
}

.authors-section,
.resources-section,
.abstract-section,
.citation-section {
    text-align: center;
}

.main-section-title {
    text-align: center;
    font-size: 2.3em;
    font-weight: 500;
    margin: 40px 0 20px 0;
}

.resources-row-center {
    display: flex;
    justify-content: center;
    gap: 32px;
}

.resources-row-center .col-md-3 {
    float: none;
}

/* Light gray navbar + black text */
.navbar-default {
    background-color: #f2f2f2;
    /* very light gray */
    border: none;
}

.navbar-default .navbar-brand,
.navbar-default .navbar-nav>li>a {
    color: #000;
    /* black text */
}

.navbar-default .navbar-nav>li>a:hover {
    background-color: #e1e1e1;
    /* slightly darker on hover */
}

.organizers-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    /* center the row */
    gap: 2rem 2.25rem;
    /* row gap, column gap */
    max-width: 980px;
    margin: 0 auto 2.5rem;
    /* center on page */
    padding: 0 1rem;
    /* small side padding on mobile */
}

/* Grid wrapper */
.organizers-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem 2rem;
    /* tighter rows/cols on desktop */
    max-width: 1080px;
    /* contain the whole section */
    margin: 0 auto 2.5rem;
    padding: 0 1rem;
}

/* Card size: smaller, capped, but fluid */
.organizer-card {
    flex: 1 1 220px;
    /* target ~220px column */
    max-width: 260px;
    /* never get huge on wide screens */
    text-align: center;
}

/* Fluid, capped image size */
.organizer-card img {
    width: 100%;
    max-width: clamp(160px, 18vw, 240px);
    /* scales with viewport, capped */
    aspect-ratio: 1 / 1;
    height: auto;
    object-fit: cover;
    border-radius: 12px;
    display: block;
    margin: 0.25rem auto 0;
}

/* Typography: scale down a touch on desktop, still readable on mobile */
.organizer-card h4 {
    margin: 0 0 0.2rem;
    font-size: clamp(1.25rem, 1.6vw, 1.6rem);
}

.organizer-card h4 a {
    color: #337ab7;
    text-decoration: none;
}

.organizer-card h4 a:hover {
    text-decoration: underline;
}

.organizer-card h5 {
    margin: 0 0 0.6rem;
    font-weight: normal;
    font-size: clamp(1.05rem, 1.3vw, 1.25rem);
    color: #666;
}


/* Phone tweaks: one centered card per row */
@media (max-width: 480px) {
    .organizers-grid {
        gap: 1.25rem;
    }

    .organizer-card {
        max-width: 320px;
    }
}


@media (max-width: 768px) {

    .metric-form {
        margin: 10px 0 20px 0;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
}

/* Metric dropdown form styling */
.metric-form {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
}

.metric-form label {
    font-weight: 600;
    margin-right: 10px;
    color: #333;
}

.metric-form select {
    padding: 6px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
    font-size: 14px;
    min-width: 200px;
}

/* ===== LaMAria Benchmark Table — Clean Drop-in CSS ===== */

:root {
    --method-col-w: 200px;
    /* width of frozen Method column */
    --info-col-w: 84px;
    /* width of frozen Info column  */
}

/* Scroll container (do NOT wrap with .table-responsive) */
.benchmark-table-wrap {
    position: relative;
    overflow-x: auto;
    /* horizontal scroll when wide */
    overflow-y: hidden;
    /* header sticks to top of this box */
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .06);
    margin: 20px 0;
}

/* Table base */
.benchmark-table {
    width: max-content;
    /* can grow beyond viewport */
    min-width: 100%;
    /* but not smaller than wrapper */
    border-collapse: separate;
    /* required for sticky cells */
    border-spacing: 0;
    table-layout: auto;
    margin: 0;
    font-size: 13px;
}

/* Header (sticky to top of wrapper) */
.benchmark-table thead th {
    position: sticky;
    position: -webkit-sticky;
    /* Safari */
    top: 0;
    z-index: 100;
    /* above body cells */
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    padding: 10px 8px;
    white-space: nowrap;
    font-weight: 600;
    text-align: center;
    vertical-align: middle;
}

/* Cells */
.benchmark-table th,
.benchmark-table td {
    border-right: 1px solid #e6e6e6;
    border-bottom: 1px solid #e6e6e6;
    padding: 6px 8px;
    vertical-align: middle;
    background: #fff;
    /* prevents see-through under sticky overlaps */
}

.benchmark-table th:last-child,
.benchmark-table td:last-child {
    border-right: 0;
}

.benchmark-table tbody tr:hover {
    background: #f7f9fb;
}

/* Make metric columns reasonably narrow */
.benchmark-table thead th:not(.col-method):not(.col-info),
.benchmark-table tbody td:not(.col-method):not(.col-info) {
    min-width: 56px;
    /* fits "100.0" */
    text-align: center;
    overflow: hidden;
}

/* Numbers + rank styling */
.benchmark-table td .num {
    display: block;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1, "lnum" 1;
    white-space: nowrap;
    text-align: center;
}

.benchmark-table td .rank {
    display: block;
    margin-top: 2px;
    font-size: 10px;
    line-height: 1;
    color: #6b7280;
    /* gray-500 */
}

/* Optional skinny Avg column */
/* ===== Avg column highlight ===== */
:root {
    /* Light Blue (default) */
    --avg-head-bg: #e7f2ff;
    /* header */
    --avg-cell-bg: #f3f8ff;
    /* body */
    --avg-hover-bg: #e9f2ff;
    /* on row hover */
    --avg-border: #cfe3ff;

    /* --- Alternative: Light Green ---
  --avg-head-bg: #e7f7ee;
  --avg-cell-bg: #f2fbf6;
  --avg-hover-bg:#e9f8f1;
  --avg-border:  #cceedd;
  */

    /* --- Alternative: Light Yellow ---
  --avg-head-bg: #fff7da;
  --avg-cell-bg: #fffbeb;
  --avg-hover-bg:#fff5d1;
  --avg-border:  #ffecb3;
  */
}


.benchmark-table th.avg-col,
.benchmark-table td.avg-col {
    width: 64px;
    min-width: 64px;
    max-width: 64px;
    padding-left: 6px;
    padding-right: 6px;
}

/* Header cell */
.benchmark-table thead th.avg-col {
    background: var(--avg-head-bg) !important;
    /* beat .table-striped */
    border-right-color: var(--avg-border);
    border-bottom-color: var(--avg-border);
}

/* Body cells */
.benchmark-table tbody td.avg-col {
    background: var(--avg-cell-bg) !important;
    border-right-color: var(--avg-border);
}

/* Keep the tint when the row is hovered */
.benchmark-table tbody tr:hover td.avg-col {
    background: var(--avg-hover-bg) !important;
}

/* Frozen first two columns (header + body) */
.benchmark-table thead th.col-method,
.benchmark-table tbody td.col-method {
    position: sticky;
    position: -webkit-sticky;
    left: 0;
    width: var(--method-col-w);
    min-width: var(--method-col-w);
    max-width: var(--method-col-w);
    z-index: 95;
    /* below header (100), above others */
    background: #fff;
    box-shadow: 1px 0 0 rgba(0, 0, 0, .06);
}

.benchmark-table thead th.col-info,
.benchmark-table tbody td.col-info {
    position: sticky;
    position: -webkit-sticky;
    left: var(--method-col-w);
    width: var(--info-col-w);
    min-width: var(--info-col-w);
    max-width: var(--info-col-w);
    z-index: 94;
    text-align: center;
    background: #fff;
    box-shadow: 1px 0 0 rgba(0, 0, 0, .06);
}

/* Truncate long method names nicely */
.benchmark-table td.col-method a {
    display: inline-block;
    max-width: calc(var(--method-col-w) - 16px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Responsive tweaks */
@media (max-width: 768px) {
    :root {
        --method-col-w: 172px;
        --info-col-w: 72px;
    }

    .benchmark-table thead th,
    .benchmark-table td {
        padding: 4px 6px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    :root {
        --method-col-w: 160px;
        --info-col-w: 64px;
    }

    .benchmark-table thead th,
    .benchmark-table td {
        padding: 3px 4px;
        font-size: 11px;
    }
}

/* Make *this* the only scroll container */
.table-responsive {
    /* if Bootstrap wraps your table anywhere */
    overflow: visible !important;
}

.benchmark-table-wrap {
    position: relative;
    overflow-x: auto;
    /* the only scroller */
    overflow-y: hidden;
}

/* Sticky header cells for the frozen columns need their own left + z-index */
.benchmark-table thead th.col-method {
    position: sticky;
    left: 0;
    z-index: 120;
    /* higher than body sticky cells and other headers */
    background: #f8f9fa;
    /* avoid see-through when overlapping */
}

.benchmark-table thead th.col-info {
    position: sticky;
    left: var(--method-col-w);
    z-index: 119;
    background: #f8f9fa;
}

/* Body frozen columns (you already have these, keep them) */
.benchmark-table tbody td.col-method {
    position: sticky;
    left: 0;
    z-index: 95;
    background: #fff;
    box-shadow: 1px 0 0 rgba(0, 0, 0, .06);
}

.benchmark-table tbody td.col-info {
    position: sticky;
    left: var(--method-col-w);
    z-index: 94;
    background: #fff;
    box-shadow: 1px 0 0 rgba(0, 0, 0, .06);
}

/* Closed-source row highlight (sub 11 for Aria SLAM) */
.benchmark-table tr.closed-source>td {
    background-color: #ffe2e0;
}

.benchmark-table tr.closed-source:hover>td {
    background-color: #ffc7c4;
}