/* Body styling */
body {
    font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
    font-size: 16px;
    color: #06042f; 
    line-height: 1.6;
    background-color: rgb(0, 0, 0); 
    margin: 0 auto;
    max-width: 950px; 
    padding-top: 60px;
  }
  
/* Headings */
h1 {
    color: #ffffff; 
    margin-top: 24px;
    margin-bottom: 16px;
    margin-left: 24px;
    font-weight: 600;
    text-shadow: 2px 2px 5px rgba(124, 142, 143, 0.5); 
}
  
h2, h3, h4, h5, h6 {
    color: #2f287d; 
    margin-top: 24px;
    margin-left: 24px;
    margin-bottom: 16px;
    font-weight: 600;
}

/* Text sizing */
.big {
    font-size: 3em;
}
h2 {
    font-size: 1.5em;
}
.small {
    font-size: 1.25em;
}

/* Adjusting h1 to screen size*/
h1.big {
    font-size: 2.5rem; 
}

/* Paragraph styling */
p {
    font-size: 1rem; 
    margin-bottom: 1em;
    margin-left: 24px;
    color: #525A76; 
    font-weight: 300;
}

/* Section styling */
section {
    background-color: #FFFFFF;
    margin: 20px 0;
    padding: 20px;
    border-radius: 40px;
    border: 5px inset #1C6EA4;
    box-shadow: 0px 2px 8px rgb(210, 213, 213); 
    box-sizing: border-box;      /* Includes padding and border in width calculations */
    overflow: hidden;            /* Ensures no content overflows the section box */
}


/* I want both charts to be side by side in two columns*/
.two-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 20px auto; 
    padding: 20px; 
    box-sizing: border-box;
    margin-left: -0px; /* Adjust the margin to shift the container to the left */
}

.section-header {
    text-align: center;
    width: 100%;
    margin-bottom: 0px;
}

.column-container {
    display: flex;
    flex-direction: row;
    width: 100%;
    justify-content: flex-start; /* Align items to the start (left) */
    flex-wrap: wrap; 
    padding: 0 10px;
    box-sizing: border-box;
}

.column {
    display: flex;
    flex: 1 1 calc(50% - 20px); 
    flex-direction: column;
    align-items: center;
    margin: 5px;
    box-sizing: border-box;
    min-width: 300px;
    padding: 10px;
    margin-left: -20px;
}

.chart-description {
    width: 100%;
    max-width: 500px;
    box-sizing: border-box;
}

figure {
    width: 100%;
    height:auto;
    margin: 0;
    padding: 0;
}
  
/* Override heading & paragraph margin-left inside sections */
section h1, 
section h2, 
section h3, 
section h4, 
section h5, 
section h6,
section p {
    margin-left: 10;
}

/* Links styling */
a {
    color: #377c87; 
    /* text-decoration-style: double; */
}
a:hover {
    color: #2A2A72; 
    text-decoration: underline;
}

/* Images styling */
img {
    max-width: 100%;
    height: auto;
}

/*Size of charts and description areas*/
.chart-description {
    width: 100%; 
    align-items: center;
    margin: 0 auto; 
}

/* Responsive adjustments for smaller screens */
@media screen and (max-width: 768px) {
    .two-column {
        flex-wrap: wrap;         /* Allow wrapping on smaller screens */
        gap: 40px;               /* Space between rows */
    }
    .column {
        max-width: 100%;         /* Full width for stacked layout */
    }
}

/* Styles for devices smaller than 480px (like mobile phones) */
@media screen and (max-width: 480px) {
    .big {
        font-size: 1.2em;
    }
    .iframe-wrapper::before {
      content: "";
      display: block;
      padding-top: 56.25%; /* 16:9 aspect ratio */
    }
    .iframe-wrapper {
        flex-direction: column;
        min-height: 300px;
        max-height: 500px;
        overflow: auto; 
    }
    .embedded-iframe {
      height: 250px; 
      min-height: 200px;
    }
    iframe {
        height: 200px; 
    }
}


/* Loader container to cover the whole screen */
.loader-container {
    position: fixed; /* Fixes the container to the viewport */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000000; 
    display: flex;
    justify-content: center; /* Centers the loader horizontally */
    align-items: center; /* Centers the loader vertically */
    z-index: 9999; /* Ensures it appears above all content */
}

/* Loader itself */
.loader {
    width: 40px;
    aspect-ratio: 1;
    background:
        radial-gradient(farthest-side, #000 90%, #0000) 50% / 8px 8px no-repeat,
        conic-gradient(from -90deg at 15px 15px, #00000000 90deg, #fff 0) 0 0 / 25px 25px;
    animation: l7 1s infinite;
}

@keyframes l7 {
    0% {
        background-position: 50%, 0 0;
    }
    50% {
        background-position: 50%, 25px 0;
    }
    100% {
        background-position: 50%, 25px 25px;
    }
}

/*progress bar at the top of page*/
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 10px;
    z-index: 10000;
    background: linear-gradient(to right, #D799AF 0%, #D799AF 0%); 
    transition: background 0.5s; /* Smooth color change */
  }

/* Prevent scrolling when the loader is active */
.no-scroll {
    overflow: hidden;
    height: 100%; /* Ensures no scrolling */
}

.scroll-content {
    position: relative;
    margin: 100px auto;
    max-width: 800px;
    font-size: 18px;
    line-height: 1.6;
    color: #333;
    transition: filter 0.3s; /* Smooth blur transitions */
}

.scroll-blur {
    will-change: filter; /* Optimize for better performance */
    transition: filter 0.3s;
}

/*back to top button*/
#backToTop {
    position: fixed;         
    bottom: 20px;          
    right: 20px; 
    padding: 10px 15px; 
    font-size: 16px; 
    background-color: #ffffff;
    color: rgb(0, 0, 0);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    box-shadow: 4px 4px 6px rgb(155, 230, 245);
    z-index: 1000; 
    transition: opacity 0.3s;
    opacity: 0;
    visibility: hidden;
}

#backToTop:hover {
    background-color: #d7edf9; /* Darker shade on hover */
}

#backToTop.show {
    opacity: 1;             /* Fully visible when the class is added */
    visibility: visible;    /* Make it clickable */
}
