/* Hide mobile content on larger screens by default */
.mobile-content {
    display: none;
    text-align: center;
    /* Center text horizontally */
    padding: 20px;
    /* Add padding around the content */
    box-sizing: border-box;
    /* Include padding in the width calculation */
}

/* CSS Media Query for Mobile Devices */
@media screen and (max-width: 768px) {

    /* Hide full site content on mobile */
    .full-site-content {
        display: none;
    }

    /* Show mobile content on mobile */
    .mobile-content {
        display: block;
    }

    /* Additional styling for mobile content */
    .mobile-content img {
        width: 100%;
        /* Make images responsive */
        max-width: 400px;
        /* Limit maximum image width */
        margin: 10px auto;
        /* Center images and add space between them */
        display: block;
        /* Ensure images are block elements to center properly */
    }

    .mobile-content p {
        margin-bottom: 20px;
        font-size: 20px;
        /* Adjust text size for readability */
    }
}

/* Ensure full site content is visible on larger screens */
@media screen and (min-width: 769px) {
    .full-site-content {
        display: block;
        height: 100%;
    }
}

body,
html {
    height: 100%;
    margin: 0;
    /* zoom: 105%; */
    /* font-family: Arial, sans-serif; */
    background-color: #f4f4f4;
    font-size: 20px;
    font-family: 'Libre Baskerville', serif;
}

.additional-info {
    color: gray;
    /* Light gray font color */
    font-size: 16px;
    /* Smaller font size */
    margin-top: 20px;
    /* Space above the additional info */
    text-align: center;
    /* Center the text */
}

/* Other styles remain unchanged */
.master-container {
    display: grid;
    grid-template-columns: 3fr 1fr;
    /* 3:1 ratio for the left and right columns */
    height: 100%;
    /* Full viewport height */
    padding: 25px;
    gap: 30px;
    overflow: hidden;
    /* Hide overflow to contain the grid items */
    box-sizing: border-box;
    /* Include padding in the height calculation */
}

.container,
.container2 {
    display: grid;
    grid-template-rows: auto 1fr;
    /* First row sized by content, second row takes remaining space */
    overflow: hidden;
    /* Prevents internal content from overflowing */
    height: 100%;
    width: 100%;
    /* Ensure these containers fill their grid areas */
    box-sizing: border-box;
    /* Include padding and border in the height */
}

.controls {
    /* Combine grid layout properties */
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* Two columns of equal width */
    gap: 10px;
    /* Space between grid items */
    align-items: center;
    /* Align items vertically in the center */

    /* Styling for border and padding */
    padding: 10px;
    border-color: #C9ADA7;
    border-radius: 15px;
    border-style: solid;
    border-width: 2px;
    box-sizing: border-box;
    /* Include padding and borders in the width calculation */

    /* Style adjustments for form elements */
    label,
    select,
    input[type="range"] {
        width: 100%;
        /* Full width for each item */
        font-size: 20px;
        /* Font size for all controls */
    }

    /* Custom styling for select elements */
    select {
        padding: 8px;
        border-radius: 5px;
        border: 1px solid #ccc;
        background-color: #ffffff68;
        appearance: none;
        -webkit-appearance: none;
        -moz-appearance: none;
        /* Custom arrow styling */
        background-image: linear-gradient(45deg, transparent 50%, gray 50%),
            linear-gradient(135deg, gray 50%, transparent 50%),
            linear-gradient(to right, #ddd, #ddd);
        background-position: calc(100% - 20px) calc(1em + 2px),
            calc(100% - 15px) calc(1em + 2px),
            calc(100% - 2.5em) 0.5em;
        background-size: 5px 5px, 5px 5px, 1px 1.5em;
        background-repeat: no-repeat;
    }

    /* Slider styles */
    input[type="range"] {
        grid-column: 1 / -1;
        /* Span across all columns */
        padding: 5px 0;
        /* Reduced padding for visual comfort */
        background: #e4e4e4;
        /* Light grey background */
        cursor: pointer;
        /* Cursor on hover */
        border-radius: 5px;
        /* Rounded corners for the slider */
        height: 5px;
        /* Specified height of the track */
        width: calc(100% - 20px);
        /* Adjust width to account for padding */
    }

    /* Focus and hover styles for select elements */
    select:focus {
        outline: none;
        border-color: #a0a0a0;
        box-shadow: 0 0 3px 2px rgba(0, 100, 250, 0.2);
    }

    select:hover {
        border-color: #888;
    }

    /* Label styles */
    label {
        margin-bottom: 3px;
        font-weight: bold;
    }
}

/* Responsive adjustments for smaller screens */
@media screen and (max-width: 768px) {
    .controls {
        grid-template-columns: 1fr;
        /* One column layout for smaller screens */
    }
}



#chart {
    /* Full width and height within its grid area */
    height: 90%;
}

#infoBox {
    display: grid;
    grid-template-rows: auto 1fr auto;
    /* Header, content, footer */
    height: 100%;
    /* Fill its container */
    /* padding: 10px; */
    box-sizing: border-box;
    padding-bottom: 10px;
    /* Include padding in the height */
}

#hoverInfo {
    grid-area: content;
    /* Styles for hoverInfo */
}

#infoDivider {
    grid-area: divider;
    /* Styles for infoDivider */
}

/* Make sure the content area takes up the remaining space and places items in the center */
#hoverInfo {
    grid-area: content;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow-y: auto;
}

/* Divider line styling */
#infoDivider {
    grid-area: divider;
    border: none;
    /* Remove border */
    height: 2px;
    /* Height of the horizontal line */
    background: rgba(0, 0, 0, 0.1);
    margin: 0;
    /* Reset margin */
}

#infoText {
    font-size: 24px;
    color: #22223B;
    display: flex;
    flex-direction: column;
    /* Aligns children vertically */
    background-color: #F2E9E4;
    padding: 2px;
    /* Adjust padding as needed */
    box-sizing: border-box;
    overflow: auto;
    height: 100%;
    border-radius: 15px;
    /* Adds rounded edges, adjust as needed */
}

#infoText .header-row {
    padding-top: 0px;
    text-align: center;
    /* Aligns header text to the left */
}

#infoText .hr-row hr {
    border: none;
    height: 1px;
    background-color: gray;
    /* Solid color for visibility */
    width: 80%;
    /* Full width of the container */
    margin-top: 0px;
    /* Adjust as needed */
    margin-bottom: 0px;
    /* Adjust as needed */
}

#infoText .summary-text-row {
    font-size: 20px;
    padding: 7vh;
    flex-grow: 2;
    /* Allows this row to take up remaining space */
    display: flex;
    align-items: top;
    /* Vertically centers the content */
    text-align: left;
    /* Aligns summary text to the left */
}

/* Adjust the dropdowns and slider to the full width of the left side */


/* Style adjustments for the form labels */
.controls label {
    font-size: 20px;
    /* Smaller font size for captions */
    color: #555;
    /* Dark grey color for text */
    margin-bottom: 2px;
    /* Reduced space between caption and select box or slider */
}

/* Ensure select elements are 100% width of their cell */
.controls select {
    font-size: 20px;
    width: 95%;
    padding: 8px;
    /* Adjust the padding as needed */
    border-radius: 5px;
    border: 1px solid #ccc;
    background-color: #ffffff68;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

/* Slider styles */
.controls input[type="range"] {
    grid-column: 1 / -1;
    /* Span across all columns */
    padding: 5px 0;
    /* Reduced padding for visual comfort */
    width: 97%;
    /* Full-width */
    background: #e4e4e4;
    /* Light grey background */
    cursor: pointer;
    /* Cursor on hover */
    border-radius: 5px;
    /* Rounded corners for the slider */
    height: 5px;
    /* Specified height of the track */
}

/* Adjust styles for other control elements as needed */

/* If you are using additional spans or elements, you may need to adjust their styling as well */

/* Adding a custom arrow to the select elements */
.controls select {
    background-image: linear-gradient(45deg, transparent 50%, gray 50%),
        linear-gradient(135deg, gray 50%, transparent 50%),
        linear-gradient(to right, #ddd, #ddd);
    background-position: calc(100% - 20px) calc(1em + 2px),
        calc(100% - 15px) calc(1em + 2px),
        calc(100% - 2.5em) 0.5em;
    background-size: 5px 5px, 5px 5px, 1px 1.5em;
    background-repeat: no-repeat;
}

/* Styling the select element when focused */
.controls select:focus {
    outline: none;
    border-color: #a0a0a0;
    box-shadow: 0 0 3px 2px rgba(0, 100, 250, 0.2);
}

/* Styling the select element when hovered */
.controls select:hover {
    border-color: #888;
}

/* Adjust label styles */
label {
    margin-bottom: 3px;
    /* Reduced margin between labels */
    font-weight: bold;
}

.info-icon-container {
    position: absolute;
    top: 20px;
    padding-right: 10px;
    right: 10px;
    width: 40px;
    /* Adjust width as needed */
    height: 40px;
    /* Adjust height as needed */
}

.info-icon-container img {
    width: 100%;
    height: auto;
    display: block;
    /* This will remove any extra space beneath the image */
}

/* Overlay styles */
/* Styles for the tutorial overlay */
.overlay {
    display: none;
    /* Initially hidden */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    /* Slight semi-transparent background */
    z-index: 1000;
    justify-content: space-between;
    /* Align buttons to the bottom */
    align-items: center;
    /* Center vertically */
    text-align: center;
    backdrop-filter: blur(5px);
    /* Add a slight blur effect to the background */
}

.overlay-button {
    font-size: 36px;
    /* Increase if you want bigger text */
    background-color: white;
    color: black;
    border: 5px solid transparent;
    /* Default transparent border */
    /* border: 5px solid white; Adjust thickness as needed */
    padding: 40px 40px;
    /* Adjust for bigger size */
    border-radius: 50%;
    /* This makes it a circle */
    width: 60px;
    /* Adjust for size */
    height: 60px;
    /* Adjust for size */
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1010;
    /* Same or above as popup */
}

#highlightOverlay {
    position: absolute;
    border: 5px solid #f4a261;
    /* Adjust the border size and color as needed */
    border-radius: 10px;
    box-sizing: border-box;
    display: none;
    /* Initially hidden */
    pointer-events: none;
    /* Allows click events to pass through */
}


.overlay-container {
    display: none;
    /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    /* Dark semi-transparent background */
    z-index: 1000;
    /* Make sure it's above all other content */
    justify-content: center;
    align-items: center;
}

.popup {
    position: absolute;
    max-width: 40vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1020;
    /* Ensure it's above other content */
}

.popup h1 {
    text-align: center;
    margin-bottom: 15px;
    /* Space below the title */
}

.popup p {
    font-size: 18px;
    /* Slightly larger font size for readability */
    margin-bottom: 10px;
    /* Space between paragraphs */
}

/* Add margin to the last paragraph */
.popup p:last-of-type {
    margin-bottom: 20px;
    /* Adds 20px space below the last paragraph */
}

/* Alternatively, add margin to the top of the footer */
.footer {
    margin-top: 20px;
    /* Adds 20px space above the footer */
    text-align: center;
    padding: 0px;
    /* background-color: #f4f4f4; */
    border-top: 1px solid #e0e0e0;
}

.footer-text,
.footer-license {
    margin: 0;
    font-size: 16px;
    color: #333;
}


.additional-info {
    color: lightgray;
    font-size: 14px;
    margin-top: 20px;
    text-align: center;
}


/* Additional styling for the intro slide */
/* You can add background colors, padding, borders, etc., as needed */



#infoPopup {
    display: none;
    /* Hidden by default */
    position: fixed;
    /* Fixed position */
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    /* Semi-transparent background */
    z-index: 1000;
    /* Make sure it's on top of everything */
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* Content styles within the popup */
#infoPopupContent {
    font-size: 18px;
    background: white;
    padding: 50px;
    /* Add padding to all sides */
    border-radius: 15px;
    display: inline-block;
    margin: auto;
    max-width: 600px;
    /* Maximum width of the content box */
}

#infoPopupContent h2 {
    color: #333;
    font-size: 1.2em;
}

#infoPopupContent p {
    color: #666;
    line-height: 1.6;
}

#infoPopupContent a {
    color: #007bff;
    text-decoration: none;
}

#infoPopupContent a:hover {
    text-decoration: underline;
}

#infoPopupContent img {
    vertical-align: middle;
    margin-right: 8px;
}

#sliderValue {
    display: none;
}

/* Add this CSS to your stylesheet */
h2#bookTitle {
    margin: 0;
    /* Remove default top and bottom margins */
    padding-top: 0;
    /* Remove default top padding */
    padding-bottom: 10px;
    vertical-align: top;
    /* Align text to the top */
}

/* Spacing for individual elements inside the infoBox */
#infoBox div,
#infoBox h1,
#infoBox p {
    margin-bottom: 0.3vh;
    /* Uniform spacing */
}

/* Styles for the content */
.content {
    text-align: center;
    margin-bottom: 20px;
}

/* Styles for the buttons */
.buttons {
    display: flex;
    gap: 20px;
}

button {
    padding: 10px 20px;
    font-size: 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.button-container {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 10px;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 1010;
    /* Same z-index as popup */
    padding: 50px;
    /* Adds padding around the entire container */
}


button:hover {
    background-color: #D3D3D3;
}

#infoPopupContent {
    /* ... existing styles ... */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.social-links {
    display: flex;
    gap: 15px;
    /* Adjust the space between icons as needed */
    justify-content: center;
    /* Centers the links horizontally */
    align-items: center;
    /* Aligns icons and text vertically */
    margin-top: 10px;
    /* Optional: Adds space above the social links */
}

.social-links a {
    display: flex;
    align-items: center;
    /* Aligns icon and text inside the link */
}

.social-links img {
    margin-right: 8px;
    /* Space between icon and text */
}