/* html {
    overflow-y: scroll;
}
body {
    overflow-y: scroll !important;
    font-family: Arial, sans-serif;
} */

.mainContent ul, .mainContent ol{
    padding-left:0;
}
.tab {
    padding: 10px 20px;
    background-color: #C65D0E;
    /* Dark orange */
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 50px;
    margin: 6px;
    transition: background-color 0.3s, color 0.3s;
    display: inline-block;
}

.tab:hover,
.tab:focus {
    background-color: #FFA500;
    /* Lighter orange */
    color: black;
}

.tab.active {
    background-color: #FFA500;
    /* Active tab color */
    color: black;
}

#infographic-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    /* Align items to the left */
    width: 100%;
    min-height: 200px;
    /* Ensure minimum height for better layout */
}

/* Paginator styling */
#infographic-container .paginator {
    flex: 0 0 100%;
    /* Full width for paginator */
    width: 100%;
    display: flex;
    flex-direction: column;

}

#magnify-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    /* Align items to the left */
    width: 100%;
}

.infographic {
    flex: 0 1 calc(33.33% - 10px);
    /* 3 items per row with space */
    margin: 5px;
    margin-bottom: 30px;
    /* Space around each item */
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    overflow: hidden;
    transition: all 0.3s ease;
    max-height: 600px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    background-color: #fff;
    position: relative;
}

.infographic::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(48, 127, 46, 0);
    transition: background 0.3s ease;
    pointer-events: none;
    border-radius: 5px;
}

.infographic:hover{
    transform: scale(1.15);
    border: 5px solid royalblue;
    box-shadow: 0 2px 5px rgba(136, 91, 91, 0.1);
    background: #fff;
    transition: transform 0.3s ease;
    z-index: 10;
}

.infographic img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.infographicTitle {
    font-weight: bold;
    line-height: normal;
    color: #307f2e;
    font-size: 1em;
    padding-left: 8px;
}

.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
}

.modal-content {
    background-color: #fff;
    margin: auto;
    padding: 20px;
    width: 90%;
    max-width: 600px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    position: relative;
    top: 1%;
}

.modal img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    margin-bottom: 10px;
}

.modal-description {
    margin: 10px 0 !important;
    flex-grow: 1;
    line-height: 1.2;
    font-size: 0.7em;
    color: #000 !important;
}

.closeModal {
    cursor: pointer;
    font-size: 25px;
    position: absolute;
    top: -5px;
    right: 5px;
    z-index: 101;
}

.download-button {
    display: block;
    padding: 10px;
    background-color: #005f30;
    /* Dark green */
    color: white !important;
    text-align: center;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s, color 0.3s;
    font-size: 0.7em;
}

.download-button:hover {
    background-color: #66cdaa;
    /* Light green */
    color: black !important;
}

.external-link::after,
.new-icon::after {
    content: "";
    display: inline-block;
    width: 1em;
    height: 1em;
    margin-left: 0.3em;
    background-size: contain;
    background-repeat: no-repeat;
    vertical-align: top;
}

.external-link::after {
    background-image: url('../../images/external_link.svg');
}

.new-icon::after {
    background-image: url('../../images/icon_new_tc.png');
}

body .section_header_banner h1 {
    max-width: 1180px;
    width: 100%;
    padding: 0 15px !important;
    margin: auto !important;
    text-align: left;
    display: flex;
    align-items: center;
    height: 100%;
    font-size: clamp(2em, 4vw, 4em) !important;
}

#modal_title {
    font-size: 1.2em;
    margin: 8px 0;
}

body.modal-open {
    /* overflow: hidden !important; */
    /* padding-right: 15px; */
    /* Compensate for scrollbar */
}

/* Responsive styles */
@media (max-width: 1024px) {
    .infographic {
        flex: 0 1 calc(50% - 10px);
        /* Two items per row on medium screens */
    }
}

@media (max-width: 768px) {
    .tab {
        flex: 0 0 100%;
        /* Full width on mobile */
    }

    .infographic {
        flex: 0 1 100%;
        /* One item per row on small screens */
    }

    .modal-content {
        width: 100%;
        max-width: 500px;
        /* Adjust for mobile */
    }

    .closeModal {
        font-size: 28px;
        top: -5px;
        /* Smaller button on mobile */
    }

    /* Ensure single item displays properly */
    @media (min-width: 769px) {
        .infographic:only-of-type:not(.paginator) {
            flex: 0 1 calc(33.33% - 10px);
            /* Maintain consistent width even when alone */
        }
    }

    /* Loading, error, and no results styles */
    .loading-indicator,
    .error-message,
    .no-results {
        width: 100%;
        text-align: center;
        padding: 40px 0;
        min-height: 200px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .loading-indicator p {
        font-size: 1.2em;
        color: #666;
        animation: pulse 1.5s ease-in-out infinite;
    }

    @keyframes pulse {

        0%,
        100% {
            opacity: 1;
        }

        50% {
            opacity: 0.5;
        }
    }

    .error-message p {
        font-size: 1.2em;
        color: #d9534f;
        font-weight: bold;
    }

    .no-results p {
        font-size: 1.2em;
        color: #666;
    }
}