/* ===== STICKY HEADER ===== */
#masthead,
.site-header,
.ast-primary-header-bar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 9999 !important;
    background: #FFFFFF !important;
}

/* Push content down so it isn't hidden behind the fixed header */
.ast-above-header-section,
#content,
.site-content {
    margin-top: 80px !important;
}

/* ===== LANGUAGE SWITCHER (EN / ES) ===== */

/* Tighten the spacing between EN / ES */
#ast-hf-menu-2 .menu-item a {
    padding-left: 4px;
    padding-right: 4px;
}

/* Active language → gold + underline */
body:not([class*="translatepress-es"]) .tp_en a,
body[class*="translatepress-es"] .tp_es a {
    color: #D4A843 !important;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Inactive language → forest green */
body:not([class*="translatepress-es"]) .tp_es a,
body[class*="translatepress-es"] .tp_en a {
    color: #1A4331 !important;
}

/* Hover (either language) → gold */
.tp_en a:hover,
.tp_es a:hover {
    color: #D4A843 !important;
}

/* Make Bylaws index sticky */
.bylaws-sidebar {
    position: sticky !important;
    top: 100px !important;
    align-self: flex-start !important;
}

/* Decision Matrix - header styling */
.tablepress thead th {
    background: #1A4331 !important;
    color: #FFFFFF !important;
    font-size: 14px !important;
}

/* Decision Matrix - all body text 14px */
.tablepress tbody td {
    font-size: 14px !important;
    background: transparent !important;
}

/* Remove the white background behind the whole table */
.tablepress,
.tablepress tbody,
.tablepress tbody tr,
.tablepress tbody tr:nth-child(odd),
.tablepress tbody tr:nth-child(even) {
    background: transparent !important;
    background-color: transparent !important;
}

/* Decision Matrix - horizontal scroll on mobile */
@media (max-width: 782px) {
    .tablepress-scroll-wrapper,
    .dataTables_wrapper,
    .tablepress {
        display: block !important;
        width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    .tablepress {
        min-width: 640px !important;
    }
}

@media (max-width: 782px) {
    .elementor-widget-shortcode .elementor-widget-container {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    .elementor-widget-shortcode .tablepress {
        min-width: 640px !important;
        width: auto !important;
    }
}

/* Bylaws index - base (reserve space so nothing shifts) */
.bylaws-sidebar a[href^="#"] {
    display: block;
    border-left: 3px solid transparent;
    padding-left: 8px;
    transition: color .2s, border-color .2s;
}

/* Bylaws index - active item: gold text, green left bar, no fill */
.bylaws-sidebar a.active {
    color: #D4A843 !important;
    border-left-color: #1A4331 !important;
    background: transparent !important;
}