@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,400;0,500;0,600;1,400;1,500;1,600&display=swap');


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Roboto, Arial, Helvetica, sans-serif !important;
    background-color: #f5f5f7;
    color: #1d1d1f;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

.main-content {
    flex-grow: 1;
}

/* Styles for skip links - only visible on focus */
.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    z-index: -999;
}

.skip-link:focus {
    left: 0;
    top: 0;
    width: auto;
    height: auto;
    overflow: visible;
    z-index: 999;
    padding: 10px;
    background-color: #f0f0f0;
    color: #333;
    text-decoration: none;
    border: 1px solid #ccc;
}

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 60px;
    height: 100vh;
    background: white;
    border-right: 1px solid #e5e5e7;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 0;
    z-index: 100;
    transition: width 0.3s ease;
}

.sidebar.expanded {
    width: 200px;
}

a.sidebar-icon {
    text-decoration: none;
    height: 40px;
}

.sidebar-icon {
    width: 24px;
    height: 24px;
    margin: 2px 0;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 18px;
    width: 100%;
    position: relative;
}

.sidebar-icon:hover {
    opacity: 1;
    background: #ececec;
    border-radius: 0;
}

.sidebar-icon span {
    margin-right: 15px;
    min-width: 24px;
    text-align: center;
    display: flex;
}

.sidebar-label {
    transform: translateX(-10px);
    transition: all 0.3s ease;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.sidebar-label.chemicals,
.sidebar-label.figures-data {
    padding-left: 10px;
    margin-left: 27px;
    border-left: 1px solid #ccc;
}

.sidebar.expanded .sidebar-label {
    opacity: 1;
    transform: translateX(0);
}

.sidebar-icon.active-drawer-item {
    border-right: 4px solid red;
    background:#e8f0ff;
}

.hamburger {
    margin-bottom: 10px;
}

.main-content {
    padding: 0;
}

.main-content.expanded {
    margin-left: 200px;
}

.header {
    background: white;
    padding: 10px 20px 10px;
    border-bottom: 1px solid #e5e5e7;
    display: flex;
    gap: 15px;
    position: sticky;
    top: 0;
    z-index: 50;
    transition: box-shadow 0.2s ease;
    flex-direction: column;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.header.scrolled {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);

}

.logo {
    width: 32px;
    height: 32px;
    background: #d32f2f;
    border-radius: 50%;
    display: flex;
    align-items: center;
    align-self: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

.stacked-layer .branding {
    display: flex;
    gap: 10px;
    align-content: center;
}

.hamburger-menu {
    align-content: center;
    padding: 4px 6px;
    display: flex;

}

.hamburger-menu:hover {
    cursor: pointer;
    background: #ececec;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.header-text {
    font-size: 16px !important;
    font-weight: 500 !important;
}

.hero-section {
    background: linear-gradient(135deg, rgba(57, 105, 182, 0.9) 0%, rgba(162, 126, 75, 0.3) 80%),
        url('../images/hero-child.png') top right/cover no-repeat;
    padding: 100px 30px;
    color: white;
    position: relative;
    overflow: visible;
}

.hero-section-overview {
    padding: 40px 10px;
    text-align: left;
    background: linear-gradient(133deg, #fbf6ed 20%, #ffd17d 100%);
    color: white;
}

.hero-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: center;
    padding: 0 30px;
}

.hero-section-contact,
.hero-section-resources {
    background: linear-gradient(135deg, rgba(57, 105, 182, 0.9) 0%, rgba(162, 126, 75, 0.3) 80%);
    padding: 60px 30px;
    color: white;
    position: relative;
    overflow: hidden;
}

/* .hero-text {
    max-width: 60%;
} */

.hero-text h1 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border-radius: 25px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn:hover {
    transform: translateY(-2px);
}

.hero-image {
    display: none;
}

p {
    margin: 4px 0 8px;
    font-size: 1rem;
}

ul {
    margin-left: 10px;
}

ul li,
ul li li {
    margin-left: 20px;
    padding: 5px;
}

/* Landing page Card Layout*/

.landing .cards-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 30px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.landing .card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}

.landing .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.landing .card-icon {
    position: relative;
    margin: 8px 10px 8px 15px;
    float: right;
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.landing .card-icon img {
    width: 85px;
    height: 85px;
}

.landing .card h3 {
    font-size: 1.4rem;
    font-weight: 500;
    margin-bottom: 15px;
    margin-right: 80px;
    line-height: 1.6rem;
}

.landing .card p {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.4rem;
    font-size: 1rem;
    font-family: roboto;
}

.landing .learn-more,
.legend-popup,
#overview-panel a,
p a {
    color: #3379b7;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
}

.landing .learn-more:hover,
p a:hover {
    text-decoration: underline;
}

.landing.overview .cards-container {
    display: flow;
}
p.black-copy{
    color: #000000;
    font-size:1.1rem;
}

.landing.overview .card {
    padding: 30px;
    margin-bottom: 20px
}

.landing.overview .hero-text {
    max-width: 100%;
}

.landing.overview .hero-text p {
    margin: 4px 0 20px;
    font-size: 1rem;
    line-height: 1.4rem;
}

.landing.overview .card:hover {
    transform: translateY(0px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.landing.overview .card-icon img {
    width: 100%;
    height: auto;
    border-radius: 100px;
    background: #ffd281;
    opacity: .6;
}

.landing.overview .card-icon {
    position: relative;
    margin: 8px 10px 8px 15px;
    float: right;
    width: 200px;
    height: 200px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    opacity: .4;
    transition: all .5s ease-in-out;
    opacity: 1;
    background: #fed892;
    border-radius: 100px;


}

.landing.overview .card-icon:hover {
    transform: scale(1.05);
    transition: all .5s ease-in-out;
}

.minderoo-badge {
    position: absolute;
    bottom: 25px;
    right: 25px;
    background: #ffd93d;
    color: #333;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

.landing.overview .card-header {
    padding: 10px 25px;
    text-align: left !important;
    background: linear-gradient(133deg, #fbf6ed 20%, #ffd17d 100%) !important;
    color: #222;
}

.un-logo {
    position: absolute;
    top: 25px;
    right: 25px;
    background: #00a8e6;
    color: white;
    padding: 10px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
}


/* Evidence Content */

.header .stacked-layer {
    display: flex;
    flex-direction: row;
}

.header .header-text {
    line-height: 1.95rem;
    letter-spacing: .5px;
}

.header .school {
    font-weight: 400;
    letter-spacing: 0;
}

.header .header-text a {
    text-decoration: none;
    color: #111;
}

.nav-tabs {
    background: white;
    padding-left: 34px;
}

.nav-tab {
    padding: 6px 30px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
    border-radius: 3px;
    margin: 5px;
    text-decoration: none;
}

#navTabs .nav-tab {
    background: #efefef;
}

#navTabs .nav-tab:hover {
    background: #ddd;
}

#navTabs .nav-tab.active {
    color: #333;
    border-bottom-color: #e3d1a8;
    background: #e3d1a8;
}

#navTabs2 .nav-tab {
    border-radius: 0;
    padding: 13px 22px;
    font-size: 14px;
    letter-spacing: .02rem;
}

#navTabs2 .nav-tab.active {
    color: #333;
    border-bottom: 2px solid red;
    background: transparent;
}

.nav-tab:hover {
    background: #ddd;
}

.cards-container {
    display: flex;
    max-width: 100%;
    margin: 0 auto;
    gap: 25px;
    padding: 20px;
    max-width: 1400px;
}

.evidence .cards-container {
    padding: 20px 0 20px 20px !important;
    max-width: 1600px;
}

.evidence-detail .cards-container {
    display: flow;
}

.chemical-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 2px;
    border-bottom: 1px solid #e0e0e0;
    overflow-x: auto;
    padding: 3px 20px 0px 20px;
}

.chemical-tab {
    padding: 12px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.chemical-tab.active {
    color: #E91E07;
    border-bottom-color: #E91E07;
    /*font-weight: 600;*/
}

.chemical-panel#overview-panel {
    background: linear-gradient(203deg, rgba(255, 255, 255, .6) 0%, rgba(253, 253, 253, 0.3) 80%), url(../images/hero-child2.jpg) top right / cover no-repeat;
    padding: 30px 20px;
    height: 56vh;
    border-radius: 0px;
}

.chemical-panel#overview-panel p {
    text-shadow: 1px 0px 5px #fff;
}

/* Left Content */
.left-content {
    flex: 1;
    background: white;
    border-radius: 15px;
    /* padding: 15px 40px; */
    padding: 0 0 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.chemical-title {
    font-size: 32px;
    font-weight: 500;
    margin-bottom: 10px;
    color: #333;
}

.evidence-detail .legend {
    display: flex;
    gap: 8px;
    margin-bottom: 5px;
    flex-direction: unset;

}

.legend {
    display: flex;
    gap: 11px;
    margin-bottom: 5px;
    flex-direction: column;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.legend-dot {
    width: 25px;
    height: 25px;
    border-radius: 50%;
}

.legend-dot.strong {
    background: #f4523e;
    height: 25px;
    width: 25px;
}

.legend-dot.moderate {
    background: #febe11;
    height: 25px;
    width: 25px;
}

@media (max-width: 768px) {

    .legend-dot,
    .legend-dot.strong,
    .legend-dot.moderate {
        height: 15px;
        width: 15px;
    }

    .legend {
        gap: 4px;
    }

    @media (max-width: 768px) {
        .info-gear {
            right: 20px !important;
            top: 68px !important;
            gap: 0px;
        }
    }

    header .stacked-layer {
        .header-text {
            line-height: 1.3rem !important;
            flex-direction: row;
            display: grid;
            font-size: 15px;
            width: 200px;
        }

        .header-text .pipe {
            display: none;
        }

    }

    .chemical-panel#overview-panel {
        height: auto;
    }

    .landing.overview .hero-section-overview {
        padding: 20px;
        text-align: left;
        margin-top: 44px;
    }

    .landing.overview .hero-text h1 {
        margin-bottom: 10px;
        font-size: 24px !important;
    }

    .landing.overview .card-icon {
        width: 100px;
        height: 100px
    }

    .evidence .cards-container {
        padding: 20px 15px 15px 15px !important;
    }

    .hero-section-contact,
    .hero-section-resources {
        padding: 65px 30px 0px;
    }

}

/* Container for the entire legend */
.hv-legend-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    /* Space between legend items */
    font-family: 'Inter', sans-serif;
    /* Using Inter as per instructions */
    font-size: 16px;
    color: #4A4A4A;
    /* Dark grey for text, similar to the image */
}

/* Individual legend item */
.hv-legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    /* Space between the color square and the text */
}

/* Color square indicator */
.hv-legend-color-box {
    width: 20px;
    /* Size of the color square */
    height: 20px;
    border-radius: 4px;
    /* Slightly rounded corners */
    flex-shrink: 0;
    /* Prevent the box from shrinking */
}

/* Specific colors for each category */
.hv-legend-color-box.hv-pfas {
    background-color: #BDBDBD;
    /* Light grey */
}

.hv-legend-color-box.hv-bisphenols {
    background-color: #87CEEB;
    /* Light blue */
}

.hv-legend-color-box.hv-pcbs {
    background-color: #B2DF8A;
    /* Light green */
}

.hv-legend-color-box.hv-phthalates {
    background-color: #FFD799;
    /* Light orange */
}

.hv-legend-color-box.hv-pbdes {
    background-color: #F08080;
    /* Light red/pink */
}

/* Text label for the legend item */
.hv-legend-label {
    /* No specific styles needed here, inherits from parent */
}

.bg-info {
    background-color: #d7eef9;
    border: 1px solid #c8e1ec;
    padding: 20px;
    border-radius: 8px;
}

.bg-alert {
    background-color: #f9f2d070;
    border: 1px solid #dab677;
    padding: 12px;
    border-radius: 8px;
}

img.gear {
    vertical-align: bottom;
    width: 25px;
}

.settings-drawer {
    position: fixed;
    top: 0;
    right: -85vw;
    width: 65vw;
    height: 100%;
    background: white;
    z-index: 1999;
    transition: right 0.3s ease;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.settings-drawer.active {
    right: 0;
}

.filter-section.one {
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    gap: 20px;
}

.filter-section.two {
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    gap: 20px;
}

/* Styles for fixed headers and buttons in settings drawer */
.settings-drawer .drawer-header {
    position: sticky;
    top: 0;
    background-color: #fff;
    z-index: 10;
    /* Higher z-index to stay on top */
    padding-bottom: 15px;
    /* Add some padding for visual separation */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    /* Optional: add a subtle shadow */
}

.settings-drawer .filter-actions {
    position: sticky;
    bottom: 0;
    background-color: #fff;
    z-index: 10;
    /* Higher z-index to stay on top */
    padding: 15px 20px;
    /* Add padding around buttons */
    box-shadow: 0 -4px 5px rgba(0, 0, 0, 0.1);
    /* Optional: add a subtle shadow */
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Make the content area scrollable */
.settings-drawer .filter-section {
    padding-bottom: 20px;
    /* Adjust as needed to prevent content from being hidden by fixed footer */
}

/* Adjust the settings-drawer to allow for scrolling content */
.settings-drawer {
    display: flex;
    flex-direction: column;
    height: 100%;
    /* Ensure the drawer takes full height to allow internal scrolling */
}

/* Add a container for scrollable content */
.settings-drawer-content-scroll {
    flex-grow: 1;
    /* Allow this section to grow and take available space */
    overflow-y: auto;
    /* Enable vertical scrolling */
    -webkit-overflow-scrolling: touch;
    /* Smooth scrolling on iOS */
    padding: 0 20px;
    /* Add horizontal padding for content */
}

/* Adjust filter-group to ensure labels are visible when scrolling */
.filter-group .filter-label {
    position: sticky;
    top: 0;
    /* This will make individual group labels sticky within their scrollable container */
    background-color: #fff;
    /* Background to prevent content from showing through */
    z-index: 5;
    /* Lower than drawer header, higher than content */
    padding-top: 15px;
    padding-bottom: 10px;
    margin-top: -15px;
    /* Compensate for padding-top to keep position */
}

.filter-title {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
}

.filter-group {
    margin-bottom: 1.5rem;
    width: 33%;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-label {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
}

.filter-select,
.filter-range {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.filter-checkbox input {
    margin: 0;
}

.filter-actions {
    padding: 1.5rem;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 1rem;
}

#selectionForm .filter-actions {
    padding: 10px 10px;
    display: flex;
    gap: 5px;
    justify-content: flex-end;
    position: fixed;
    background: #fff;
    width: 65%;
    bottom: 0px;
    z-index: 1111;
}

.settings-drawer.active {
    right: 0;
    padding-bottom: 48px;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    /*flex: 1;*/
}

.btn-primary {
    background: #3379b7;
    color: white;
}

.btn-primary:hover {
    background: #27659a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}
.btn-primary:hover {
    background:#276397;
}

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

.btn-secondary:hover {
    background: #545b62;
    transform: translateY(-2px);
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #1e7e34;
    transform: translateY(-2px);
}


.landing .btn-secondary {
    background: #f8f9fa;
    color: #444;
    border: 1px solid #ddd;
    font-size: 1.15rem;
}

.landing .btn-primary {
    background: #3379b7;
    color: white;
    border-radius: 6px;
    font-size: 1.15rem;
}

.landing .btn-primary:hover {
    background: #c82333;
}

.landing .btn-secondary {
    background: #f8f9fa;
    color: #666;
    border: 1px solid #ddd;
}

.landing .btn-primary.danger {
    background: #c82333;
    color: white;
    border-radius: 6px;
}

.landing .btn-primary.danger:hover {
    background: #8c111d;
}

.dashboard-card .btn-secondary {
    background: #fff;
    color: #003c50;
    border-radius: 22px;
    font-size: 12px;
    padding: 8px 24px;
    flex: unset !important;
    margin: auto;
    border: 1px solid #3379b7;
}

.btn-secondary:hover {
    background: #b8edff;
}

.filter-actions .btn-primary {
    background: #3379b7;
    color: #fff;
}
.filter-actions .btn-primary:hover {
    background:#276397;
}

.filter-actions .btn-primary:active {
    background: #8c111d;
    color: #fff;
}

.filter-actions .btn-secondary {
    background: #ffffff;
    color: #3379b7;
    border: 1px solid #3379b7;
}

.filter-actions .btn-secondary:hover {
    background: #dcdcdc !important;
}

.filter-actions .btn-secondary:active {
    background: #ccc !important;
}

#bisphenols,
#phthalates,
#pcbs,
#pbdes,
#pfas {
    scroll-margin-top: 150px;
}

/* Footer styles */
.footer {
    background-color: #6d5b51;
    /* The brown background color from the image */
    color: #ffffff;
    /* White text color for links and copyright */
    padding: 20px;
    position: relative;
    /* Needed for positioning the back-to-top button */
    display: flex;
    /* Use flexbox for centering the inner content */
    justify-content: center;
    /* Center the inner content horizontally */
}

.footer-inner-content {
    display: flex;
    flex-direction: column;
    /* Stack elements vertically on smaller screens */
    text-align: center;
    width: 100%;
    max-width: 1400px;
    /* Max width for the footer content */
}

.footer-links {
    margin-bottom: 10px;
    display: flex;
    flex-wrap: wrap;
    /* Allow links to wrap on smaller screens */
    justify-content: center;
    gap: 5px;
    /* Space between links and separators */
}

.footer-links a {
    color: #ffffff;
    text-decoration: none;
    font-size: 0.75em;
    padding: 0 5px;
    /* Add some padding around links */
    white-space: nowrap;
    /* Prevent links from breaking in the middle */
    letter-spacing: .08em;
}

.copyright a {
    color: #ffffff;
    text-decoration: none;
}

.footer-links a:hover,
.copyright a:hover {
    text-decoration: underline;
}

.footer-links .separator {
    color: #ffffff;
    font-size: 0.9em;
}

.copyright {
    font-size: 0.75em;
    color: #ffffff;
    margin-left: 20px;
}

/* Back to Top Button styles */
.back-to-top-btn {
    position: absolute;
    /* Position relative to the footer */
    bottom: 20px;
    /* Distance from the bottom of the footer */
    right: 20px;
    /* Distance from the right of the footer */
    background-color: #c00000;
    /* Red color from the image */
    color: #ffffff;
    border: none;
    border-radius: 5px;
    /* Slightly rounded corners */
    width: 35px;
    height: 35px;
    font-size: 1.5em;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 10px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease;
}

.back-to-top-btn:hover {
    background-color: #a00000;
    /* Darker red on hover */
}

/* Responsive adjustments for the footer */
@media (min-width: 768px) {
    .footer-inner-content {
        flex-direction: row;
        /* Align elements in a row on larger screens */
        justify-content: space-between;
        /* Space out links and copyright */
        padding: 0 20px;
        /* Add horizontal padding inside the inner content */
    }

    .footer-links {
        margin-bottom: 0;
        /* Remove bottom margin when in a row */
        justify-content: flex-start;
        /* Align links to the start */
        gap: 10px;
        /* Adjust gap for larger screens */
    }

    .copyright {
        text-align: right;
        /* Align copyright to the right */
    }
}

@media (max-width: 767px) {
    .back-to-top-btn {
        right: 10px;
        /* Adjust position for smaller screens */
        bottom: 10px;
    }
}

@media (max-width: 767px) {
    .back-to-top-btn {
        right: 15px;
        bottom: 60px;
    }
}

@media (max-width: 480px) {
    .settings-drawer {
        right: 100vw;
        width: 100vw;
    }

    .settings-drawer .container {
        /* display: flex; */
        gap: 0px;
        padding: 5px 2px;
        /* position: fixed; */
        top: 120px;
    }

    #selectionForm .filter-actions {
        padding: 10px 10px;
        border-bottom: 1px solid #a0a0a0;
        /display: flex;
        gap: 5px;
        justify-content: flex-end;
        position: absolute;
        background: #fff;
        width: 100%;
        /* margin: 20px; */
        z-index: 1111;
    }

    .settings-drawer.active {
        right: 0;
        padding-bottom: 48px;
    }

    .settings-drawer #layer1.column,
    .settings-drawer #layer2.column,
    .settings-drawer #layer3.column {
        height: 75vh;
        overflow-x: scroll;
        width: 32vw;

    }

    */ .settings-drawer .column h3,
    .#populationSelectors strong {
        position: sticky;
        background: #ececec;
        font-size: 14px;
    }

    #selectionSummary {
        display: none;
    }
}

.chart-container {
    padding: 20px;
    position: relative;
    gap: 1px;
    display: grid;
}

/* Human Figures */
.human-figures {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 5px;
    align-self: flex-end;
}

.figure-container {
    text-align: center;
    position: relative;
    align-self: flex-end;
}

.figure-label {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #666;
}

.human-figure {
    width: 120px;
    height: 200px;
    margin: 0 auto;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.human-figure svg {
    width: 100%;
    height: 100%;
    fill: #f0d7b8;
    stroke: #e0c4a0;
    stroke-width: 1;
}

.health-point {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #f4523e;
}

.health-point-moderate {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #febe11;
}

.health-label {
    position: absolute;
    font-size: 11px;
    background: #ffffff85;
    padding: 2px 6px;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
    z-index: 10;
}

.health-label:hover {
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    transform: translateY(-1px);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

/* BPAS - Health points positioning for different figures */
/* .adult-female .health-point:nth-child(1) { top: 12%; right: 22px; }
.adult-female .health-point:nth-child(2) { top: 17%; right: 46px; }
.adult-female .health-point:nth-child(3) { top: 22%; right: 46px; }
.adult-female .health-point:nth-child(4) { top: 27%; right: 70px; }
.adult-female .health-point:nth-child(5) { top: 33%; right: 70px; }
.adult-female .health-point:nth-child(6) { top: 39%; right: 38px; }
.adult-female .health-point:nth-child(7) { top: 44%; right: 31px; }

.adult-male .health-point:nth-child(1) { top: 25%; right: -8px; }
.adult-male .health-point:nth-child(2) { top: 16%; right: 46px; }
.adult-male .health-point:nth-child(3) { top: 21%; right: 45px; }
.adult-male .health-point:nth-child(4) { top: 27%; right: 70px; }
.adult-male .health-point:nth-child(5) { top: 33%; right: 70px; }
.adult-male .health-point:nth-child(6) { top: 40%; right: 33px; }
.adult-male .health-point:nth-child(7) { top: 45%; right: 26px; }

.child .health-point.waist { top: 46%; left: 97px; }
.child .health-point:nth-child(2) { top: 26%; left: 83px; }
.child .health-point:nth-child(3) { top: 39%; left: 94px; }
.infant .health-point { top: 62%; left: 70px; }

.adult-female .health-label.hyper { top: 15%; right: 74px; }
.adult-female .health-label.cardio { top: 21%; right: 75px; }
.adult-female .health-label.diabetes { top: 27%; right: 100px; }
.adult-female .health-label.insulin { top: 33%; right: 100px; }
.adult-female .health-label.obesity { top: 38%; right: 68px; }
.adult-female .health-label.waist { top: 43%; right: 61px; }
.adult-female .health-label.polycystic { top: 54%; left: -40px; }

.adult-male .health-label.hyper { top: 15%; right: 77px; }
.adult-male .health-label.cardio { top: 20%; right: 77px; }
.adult-male .health-label.diabetes { top: 27%; right: 101px; }
.adult-male .health-label.insulin { top: 33%; right: 100px; }
.adult-male .health-label.obesity { top: 40%; right: 62px; }
.adult-male .health-label.waist { top: 45%; right: 54px; }

.child .health-label.cardio { top: 25%; left: -55px; }
.child .health-label.obesity { top: 39%; left: 39px; }
.child .health-label.waist { top: 46%; left: -26px; }
.infant .health-label.anogenital { top: 77%; left: 5px; } */

/* Phthalates - Health points positioning for different figures */
/* #phthalates-panel .adult-female .health-point-moderate.thyroid { top: 12%; right: 57px; }
#phthalates-panel .adult-female .health-point.insulin { top: 33%; right: 70px; }
#phthalates-panel .adult-female .health-point-moderate.obesity { top: 44%; right: 31px; }
#phthalates-panel .adult-female .health-point-moderate.waist { top: 39%; right: 38px; }
#phthalates-panel .adult-female .health-point-moderate.endometriosis { top: 48%; right: 72px; }

#phthalates-panel .adult-male .health-point-moderate.thyroid { top: 12%; right: 63px; }
#phthalates-panel .adult-male .health-point.insulin { top: 33%; right: 70px; }
#phthalates-panel .adult-male .health-point-moderate.obesity { top: 40%; right: 33px; }
#phthalates-panel .adult-male .health-point-moderate.waist { top: 45%; right: 26px; }
#phthalates-panel .adult-male .health-point-moderate.sperm { top: 51%; right: 72px; }

#phthalates-panel .child .health-point-moderate.puberty { top: 1%; left: 72px; }
#phthalates-panel .child .health-point-moderate.iq { top: 6%; left: 50px; }
#phthalates-panel .child .health-point.motor { top: 6%; left: 95px; }
#phthalates-panel .child .health-point-moderate.thyroid { top: 18%; left: 81px; }
#phthalates-panel .child .health-point-moderate.blood { top: 26%; left: 80px; }
#phthalates-panel .child .health-point-moderate.asthma { top: 30%; left: 60px; }
#phthalates-panel .child .health-point.insulin { top:37%; left: 86px; }
#phthalates-panel .child .health-point-moderate.waist { top: 46%; left: 97px; }


#phthalates-panel .infant .health-point:nth-child(2) { top: 2%; left: 70px; }
#phthalates-panel .infant .health-point:nth-child(3) { top: 2%; left: 81px; }
#phthalates-panel .infant .health-point-moderate { top: 51%; left: 37px; }

#phthalates-panel .adult-female .health-label.thyroid { top: 12%; right: 85px; }
#phthalates-panel .adult-female .health-label.insulin { top: 33%; right: 100px; }
#phthalates-panel .adult-female .health-label.obesity { top: 38%; right: 68px; }
#phthalates-panel .adult-female .health-label.waist { top: 43%; right: 61px; }
#phthalates-panel .adult-female .health-label.endometriosis { top: 54%; left: 40px; }

#phthalates-panel .adult-male .health-label.thyroid { top: 12%; right: 89px; }
#phthalates-panel .adult-male .health-label.insulin { top: 33%; right: 100px; }
#phthalates-panel .adult-male .health-label.obesity { top: 40%; right: 62px; }
#phthalates-panel .adult-male .health-label.waist { top: 45%; right: 54px; }
#phthalates-panel .adult-male .health-label.spermquality { top: 56%; right: 0px; }
#phthalates-panel .adult-male .health-label.spermcount { top: 61%; right: 41px; } */

/* #phthalates-panel .angled-line { width: 50px;
    height: 1px;
    background-color: rgb(156 152 152);
    transform: rotate(-26deg);
    transform-origin: left center;
    top: 16%;
    padding: 0;
    box-shadow: none;
    left: 50px;
    position: absolute;
} */
#phthalates-panel .child .health-label.puberty {
    top: -6%;
    left: 40px;
}

#phthalates-panel .child .health-label.iq {
    top: 6%;
    left: -101px;
}

#phthalates-panel .child .health-label.motor {
    top: 4%;
    left: 119px;
    text-align: left
}

#phthalates-panel .child .health-label.thyroid {
    top: 18%;
    left: 110px;
}

#phthalates-panel .child .health-label.blood {
    top: 26%;
    left: 108px;
}

#phthalates-panel .child .health-label.asthma {
    top: 30%;
    left: 2px;
}

#phthalates-panel .child .health-label.insulin {
    top: 37%;
    left: 116px;
}

#phthalates-panel .child .health-label.waist {
    top: 46%;
    left: -26px;
}

#phthalates-panel .infant .health-label.miscarriage {
    top: 0%;
    left: 7px;
}

#phthalates-panel .infant .health-label.birthweight {
    top: 32%;
    left: 5px;
}

#phthalates-panel .infant .health-label.anogenital {
    top: 77%;
    left: 5px;
}


/* Right Sidebar */
.right-sidebar {
    width: 300px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.stats-card {
    background: white;
    border-radius: 15px;
    padding: 15px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    cursor: pointer;
}

.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stats-title {
    font-size: 16px;
    color: #666;
    font-weight: 500;
}

.stats-icon {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
}

.stats-icon img {
    width: 60px;
    height: 60px;
}

.stats-number {
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

.stats-link {
    color: #3379b7;
    text-decoration: none;
    font-size: 14px;
}

.stats-link:hover {
    text-decoration: underline;
}

.modal-body a,
.modal-body:visited {
    color: #3379b7;
    display: flex;
    gap: 5px;
}

/* Color coding for different stats */
/*.systematic-reviews .stats-icon { background: #87CEEB; }
.primary-studies .stats-icon { background: #DDA0DD; }
.meta-analyses .stats-icon { background: #FFB366; }
.participants .stats-icon { background: #87CEEB; }
.individual-chemicals .stats-icon { background: #90EE90; }*/

/* Evidence content Responsive Design */
@media (max-width: 768px) {
    .cards-container {
        flex-direction: column;
        padding: 10px;
    }

    .right-sidebar {
        width: 100%;
    }

    .chemical-tab {
        padding: 10px 10px;
        font-size: .85rem;
    }

    .human-figures {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
    }

    .header-top {
        padding: 10px 15px;
    }

    .nav-tab {
        padding: 4px 15px;
        font-size: 13px;
    }

    .chemical-title {
        font-size: 18px !important;
    }

    .left-content {
        padding: 0px 0 20px;
        margin-top: 40px;
    }

    .settings-drawer {
        right: 100vw;
        width: 100vw;
    }

    .btn,
    .landing .btn-secondary,
    .landing .btn-primary {
        padding: .85rem 1rem;
        font-size: .9rem;
    }

    #selectionForm .filter-actions {
        width: 100%;
    }

    .stats-icon img {
        width: 70px;
        height: 70px;
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding: 35px 22px 20px;
    }

    .legend {
        flex-direction: column;
        gap: 10px;
    }

    .human-figures {
        grid-template-columns: 1fr;
    }

    .stats-card {
        padding: 20px;
    }

    .stats-number {
        font-size: 24px;
    }

    .settings-drawer {
        right: 100vw;
        width: 100vw;
    }

}

/* Adjust main content when sidebar is open */
.cards-container {
    transition: margin-left 0.3s ease;
}

.content-shifted {
    margin-left: 280px;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-tab {
        margin: 0;
        padding: 5px 15px;
    }

    #navTabs2 .nav-tab {
        padding: 12px 10px;
        font-size: 12px;
    }

    .nav-tabs {
        padding: 10px 10px 10px 10px;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: white;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);

    }

    .nav-tabs.show {
        display: flex;
    }

    .sidebar-toggle {
        display: block;
    }

    .content-shifted {
        margin-left: 0;
    }

    .header {
        padding: 10px;
    }

    .header-title {
        font-size: 14px;
    }

}

/* Menu toggle for mobile */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #333;
}

/* Evidence end */

@media (max-width: 768px) {
    .landing .cards-container {
        padding: 20px 15px;
        gap: 20px;
    }

    .sidebar {
        width: 50px;
    }

    .sidebar-icon {
        padding: 2px 12px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: left;
        padding: 0px;
    }

    .hero-text {
        max-width: 100%;
    }

    .hero-text h1 {
        font-size: 1.25rem;
        line-height: 1.75rem;
    }

    .cards-container {
        grid-template-columns: 1fr;
        padding: 55px 10px;
    }

    .card {
        padding: 25px 20px;
    }

    .card h3,
    .landing .card h3 {
        margin-right: 0;
        margin-bottom: 10px;
        font-size: 1.2rem;
    }

    .landing .card p {
        font-size: .95rem;
    }

    .landing .card {
        padding: 20px;
    }

    .landing .card-icon {
        position: relative;
        top: 0;
        right: 0;
        margin-bottom: 15px;
        width: 40px;
        height: 40px;
    }

    .landing .card-icon img {
        width: 75px;
        height: 75px;
        margin: 0;
    }
}

/* Overview Accordian, modal */

.accordion {
    margin-top: 20px;
}

.accordion-toggle {
    width: 175px;
    padding: 10px 10px !important;
    background: #f8f9fa;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    color: blue;
}

.accordion-toggle:hover {
    background: #e9ecef;
}

.accordion-content {
    display: none;
    padding: 20px;
    background: white;
    border-radius: 0 0 8px 8px;
    animation: slideDown 0.3s ease;
}

.accordion-content.show {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    max-width: 750px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease;
    font-size: 15px;
}

.modal-content .btn-primary {
    background: #3379b7;
    color: #fff;
}

.modal-content .btn-secondary {
    background: #ffffff;
    color: #3379b7;
    border: 1px solid #3379b7;
}

.modal-content .btn-secondary:hover {
    background: #dcdcdc !important;
}

.modal-content .btn-secondary:active {
    background: #ccc !important;
}

.modal p {
    margin-bottom: 20px;
    line-height: 1.6;
}

.modal-cta-btn {
    margin-top: 25px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.modal-footer {
    margin-top: 25px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.modal-title {
    font-size: 22px;
    font-weight: 500;
    color: #333;
}

.close {
    font-size: 28px;
    font-weight: 500;
    cursor: pointer;
    color: #aaa;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close:hover {
    color: #000;
    background: #f8f9fa;
}

.bpa-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 12px;
    margin-top: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.bpa-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.bpa-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
}

.bpa-description {
    opacity: 0.9;
    line-height: 1.5;
}


.hamburger-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 24px;
    height: 20px;
    justify-content: center;
}

.hamburger-btn span {
    display: block;
    height: 2px;
    width: 100%;
    background: #666;
    transition: all 0.3s ease;
}

.hamburger-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger-btn.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.active span:nth-child(3) {
    transform: rotate(-120deg) translate(7px, -6px);
}

.info-gear {
    position: absolute;
    right: 40px;
    top: 72px;
    display: flex;
    gap: 2px;
}
.info-gear img{
    width: 30px;
    height: 30px;
}

.info-btn,
.settings-btn,
.download-btn {
    border: none;
    color: #2e6ca3;
    height: 40px;
    width: 70px;
    font-size: 1.2rem;
    cursor: pointer;
    background: none;
    transition: transform 0.3s ease;
    transform-origin: center center;
    display: flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    font-variant: all-small-caps;
    letter-spacing: .01rem;
}

.download-btn {
    width: 108px;
}

.settings-btn:hover,
.download-btn:hover,
.info-btn:hover:hover {
    transform: scale(1.02);
    color: #333;
}

.legend-modal-content {
    display: grid;
    gap: 15px;
}

.legend-detail {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 4px 0;

}

.legend-detail.red {
    border-color: #dc3545;
    background: #fff5f5;
}

.legend-detail.orange {
    border-color: #fd7e14;
    background: #fff8f0;
}

.legend-detail.yellow {
    border-color: #ffc107;
    background: #fffbf0;
}

.legend-detail.blue {
    border-color: #007bff;
    background: #f0f8ff;
}

.legend-detail.gray {
    border-color: #6c757d;
    background: #f8f9fa;
}

.legend-icon {
    width: 20px;
    height: 20px;
}

/* Drawer Overlay */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Navigation Drawer */
.nav-drawer {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100%;
    background: white;
    z-index: 1999;
    transition: left 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.);
    display: flex;
    flex-direction: column;
}

.nav-drawer.active {
    left: 0;
}

.drawer-header {
    padding: 1rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.drawer-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.drawer-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.drawer-close:hover {
    background: #f8f9fa;
}

/* .modal-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease;
}
.modal.show{
    display: flex
;
    align-items: center;
    justify-content: center;
} */

.modal {
    display: none;
    /* IMPORTANT: Hidden by default */
    position: fixed;
    /* Stay in place */
    z-index: 1000;
    /* Sit on top */
    left: 0;
    top: 0;
    width: 100%;
    /* Full width */
    height: 100%;
    /* Full height */
    overflow: auto;
    /* Enable scroll if needed */
    background-color: rgba(0, 0, 0, 0.4);
    /* Black w/ opacity */
}

.modal.show {
    display: flex;
    /* This will make it visible and centered */
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease;
    /* Ensure you have this @keyframes slideUp defined in your CSS */
}

/* Example keyframes for slideUp animation if you don't have it */
@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}


/* Grid style */

.dashboard-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.dashboard-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.card-header {
    padding: 10px 25px;
    text-align: center;
    background: linear-gradient(86deg, #e5b942 0%, #ed4343 100%);
    color: white;
}

.evidence-detail .card-header-outcome {
    padding: 8px 25px;
    text-align: center;
    background: linear-gradient(230deg, #ffe5b6 0%, #e5af42);
    color: #222222;
}

body.evidence .card-header {
    padding: 10px 25px;
    text-align: left !important;
    background: linear-gradient(133deg, #f0ddba 20%, #ffd17d 100%) !important;
    color: #222;
    border-radius: 10px 10px 0 0;
}

.evidence-detail .card-header-outcome h2 {
    font-size: 16px;
}

.grid .card-header {
    background: linear-gradient(86deg, #40ccdc 0%, #1a49ae 100%);
}

.card-title {
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 0px;
}

.card-title .sm {
    font-size: 16px;
    color: #fffd17;
}

.chart-container {
    padding: 0px 20px 20px;
    position: relative;
}

.chart {
    display: flex;
    align-items: end;
    justify-content: center;
    height: 250px;
    margin: 40px 0;
    position: relative;
}

.chart-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 20px;
}

.section-title {
    font-weight: 600;
    margin-bottom: 20px;
    color: #555;
    font-size: 14px;
}

.bars-group {
    display: flex;
    gap: 8px;
    align-items: end;
}

.bar {
    width: 60px;
    background: #a8d5a8;
    border-radius: 4px 4px 0 0;
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
}

.bar:hover {
    opacity: 0.8;
    transform: translateY(-2px);
}

.bar.high {
    height: 180px;
}

.bar.med {
    height: 120px;
}

.bar.low {
    height: 80px;
}

.y-axis {
    position: absolute;
    left: 50px;
    top: 0;
    height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-size: 12px;
    color: #666;
}

.y-axis-label {
    position: absolute;
    left: -60px;
    top: 50%;
    transform: rotate(-90deg) translateX(-50%);
    font-weight: 500;
    color: #555;
}

.x-axis-label {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    font-weight: 500;
    color: #555;
}

.legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    border-radius: 6px;
    background: #f8f9fa;
    font-size: 13px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.legend-item:hover {
    background: #e9ecef;
    transform: translateY(-1px);
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.btn {
    padding: 10px 20px;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    border-radius: 8px;
    overflow-x: scroll;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: max-height 0.3s ease-out;
    animation: slideDown .3s ease;
}

.data-table th,
.data-table td {
    padding: 3px 6px;
    text-align: left;
    border-bottom: 1px solid #ccc;
}

.data-table th {
    background: #e5e7eb;
    font-weight: 500;
    color: #374151;
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.data-table tr:hover {
    background: #f8f9fa;
}

.data-table td {
    font-size: 15px;
}

table,
th,
td {
    border: 1px solid #ccc;
}

.accordion {
    margin-top: 20px;
    transition: all 0.3s ease;

}

table td a {
    color: #3379b7;
}

.accordion-toggle,
.action-button {
    padding: 15px 20px;
    background: #3379b7 !important;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    color: #fff !important;

}

.accordion-toggle:hover,
.action-button:hover {
    background: #276397 !important;
}

.accordion-toggle:active,
.action-button:active {
    background: #276397 !important;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

#legendModal .modal-content {
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.modal-title {
    font-size: 24px;
    font-weight: 500;
    color: #333;
}

.close {
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close:hover {
    color: #000;
    background: #f8f9fa;
}

.legend-modal-content {
    display: grid;
    gap: 15px;
}

.legend-detail {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 4px 0;

}

.legend-detail.red {
    border-color: #dc3545;
    background: #fff5f5;
}

.legend-detail.orange {
    border-color: #fd7e14;
    background: #fff8f0;
}

.legend-detail.yellow {
    border-color: #ffc107;
    background: #fffbf0;
}

.legend-detail.blue {
    border-color: #007bff;
    background: #f0f8ff;
}

.legend-detail.gray {
    border-color: #6c757d;
    background: #f8f9fa;
}

.legend-icon {
    width: 20px;
    height: 20px;
}

.bpa-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 12px;
    margin-top: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.bpa-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.bpa-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
}

.bpa-description {
    opacity: 0.9;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .chart {
        height: 250px;
        overflow-x: auto;
    }

    .chart-section {
        margin: 0 10px;
    }

    .bar {
        width: 45px;
    }

    .controls {
        /* flex-direction: column; */
        align-items: center;
    }

    .legend {
        /* flex-direction: column; */
        /* align-items: center; */
    }

    .data-table {
        font-size: 12px;
    }

    .data-table th,
    .data-table td {
        padding: 8px 10px;
    }

    .info-btn,
    .settings-btn,
    .download-btn {
        border: none;
        color: #666;
        height: 30px;
        width: 30px;
        font-size: 1.2rem;
        cursor: pointer;
        background: none;
        transition: transform 0.3s ease;
        transform-origin: center center;

    }

    .btn-text {
        display: none;
    }


}

/* Evidence Grid Styles**/


.sticky-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: #e2e8f0;
    /* Light blue-gray for sticky header */
}

.table-container {
    max-height: 70vh;
    /* Limit height for scrollability */
    overflow-y: auto;
    /* Enable vertical scrolling */
}

.table-container {
    max-height: 70vh;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    border-radius: 0 0 12px 12px;
}

.table-container th,
.table-container td {
    border: 1px solid #e5e7eb;
    letter-spacing: .02rem;
}


.table-container th {
    background: #e5e7eb;
}

/* Accordion specific styles */
.accordion-header {
    cursor: pointer;
    padding: .65rem .75rem;
    background-color: #f3f4f6;
    /* Light gray for headers */
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #374151;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
}

.accordion-content {
    padding: 0 .25rem .25rem .25rem;
    background-color: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    display: block;
    /* Hidden by default */
    animation: slideDown .3s ease;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.accordion-content1 {
    padding: 0 .25rem .25rem .25rem;
    background-color: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    display: block;
    /* Hidden by default */
    animation: slideDown .3s ease;
    transition: max-height 0.3s ease-out;
}

.accordion-content.active {
    display: block;
    /* Shown when active */
}

.accordion-item-outcome {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
}

.accordion-item-outcome.overall-picture {
    background-color: #e8f0ff;
    /* Apply blue background to overall picture in accordion */
    color: #3379b7;
}

.overall-picture {
    background-color: #e8f0ff;
    color: #3379b7;
}

.accordion-item-outcome div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.accordion-item-outcome div:last-child {
    margin-bottom: 0;
}

.accordion-item-outcome span:first-child {
    font-weight: 400;
    font-size: .95rem;
    color: #4b5563;
}

/* No specific styling for span:last-child here, as score-box-mobile handles it */
.arrow-icon {
    transition: transform 0.3s ease;
}

.arrow-icon.rotated {
    transform: rotate(180deg);
}

/* Hide table on small screens, show accordion */
@media (max-width: 767px) {
    .table-desktop {
        display: none;
    }

    .accordion-mobile {
        display: block;
    }
}

/* Hide accordion on large screens, show table */
@media (min-width: 768px) {
    .table-desktop {
        display: block;
    }

    .accordion-mobile {
        display: none;
    }
}