header {
    background-image: url('assets/top_image.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    height: 150px;  /* Set a height */
    width: 100%;
    margin-bottom: 5px;
    overflow: hidden;
    position: relative;
}

header .right-nav {
        position: fixed; /* Position the menu absolutely inside the header */
        top: 120px; /* Adjust as needed */
        right: 620px;
        transform: translate(0, -50%);
        font-family: 'Montserrat', sans-serif; /* Change font type */
        z-index: 2; /* Makes sure the menu is above the image */
        text-align: center; /* Centers the navigation menu */
        padding: 10px 0; /* Adds padding around the menu */
        background-color: rgba(0, 0, 0, 0); /* Optional: Add a semi-transparent background */
}

header .left-nav {
        position: absolute; /* Position the menu absolutely inside the header */
        top: 120px; /* Adjust as needed */
        left: 10px; /* Position to the left */
        transform: translate(0, -50%);
        font-family: 'Montserrat', sans-serif; /* Change font type */
        z-index: 2; /* Makes sure the menu is above the image */
        text-align: center; /* Centers the navigation menu */
        padding: 10px 0; /* Adds padding around the menu */
        background-color: rgba(0, 0, 0, 0); /* Optional: Add a semi-transparent background */
        font-size: 12px;
}


header img {
    width: 100%; /* Makes the image full width */
    max-height: 120px; /* Limits the height to 100px */
    height: auto; /* Keeps the aspect ratio */
    object-fit: cover; 
    object-position: top;
}

.subtitle {
    position: absolute; /* Absolutely position the text */
    top: 110px; /* Adjust to be below the title */
    left: 160px; /* Center horizontally */
    transform: translate(-50%, -50%); /* Adjust position to truly center */
    color: white; /* Text color */
    font-size: 18px; /* Match font size as needed */
    font-family: 'Montserrat', sans-serif; /* Change font type */
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8); /* Add a shadow for better visibility */
    text-align: center; /* Center text */
    text-transform: none; /* Make text appear in capital letters */
    font-weight: normal; /* Make text bold */
    font-style: italic;
}

.subtitle a {
    color: white; /* Match the text color */
    text-decoration: none; /* Remove underline */
}

.subtitle a:hover {
    text-decoration: none; /* Add underline on hover */
}

.header-text {
    position: fixed; /* Absolutely position the text */
    top: 60px; /* Center vertically */
    left: 250px; /* Center horizontally */
    transform: translate(-50%, -50%); /* Adjust position to truly center */
    color: white; /* Text color */
    font-size: 40px; /* Adjust font size as needed */
    font-family: 'Montserrat', sans-serif; /* Change font type */
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8); /* Add a shadow for better visibility */
    text-align: center; /* Center text */
    text-transform: none; /* Make text appear in capital letters */
    font-weight: bold; /* Make text bold */
}


.info img {
    max-height: 40%; /* Subtract the height of header and other elements */
    width: auto; /* Keep the width auto to maintain aspect ratio */
    height: auto; /* Keep the height auto to maintain aspect ratio */
}


.leaflet-popup-content {
    width: auto !important; /* Set your desired width */
    height: auto !important;
    max-width: 50%; /* Ensure it doesn't exceed the viewport */
    box-sizing: border-box; /* Include padding in width calculation */
    padding: 0; 
    margin: 0; 
    z-index: 1000;
}

.popup-content {
    display: flex;
    flex-direction: column; /* Stack h3 and info vertically */
    padding: 10px; /* Add some padding */
    border: 1px solid #ccc; /* Optional: Add a border */
    border-radius: 5px; /* Optional: Round the corners */
    background-color: #fff; /* Optional: Background color */
    z-index: 1000;
}


.popup-image {
    max-width: 420px; /* Set a max width for the image */
    height: auto; /* Maintain aspect ratio */
}

/* Optional: Add some margin to the h3 for spacing */
.popup-content h3 {
    margin-bottom: 5px; /* Space between title and info */
}

#map {
    width: 100%;
    height: calc(96vh - 250px);
    margin-bottom: 10px;
    overflow: hidden;
    position: relative;
}

.map-menu {
    display: block;
    position: absolute;
    top: 100px;
    right: 30px;
    background: rgba(255, 255, 255, 0);
    padding: 10px;
    border-radius: 5px;
    font-family: 'Montserrat', sans-serif;
    z-index: 1000;
     
}


.map-menu ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.map-menu ul li {
    margin: 0px 10px;
}

.map-menu ul li a {
    color: white;
    text-decoration: none;
    font-weight: normal;
    font-size: 14px;
}

.map-menu ul li a:hover {
    text-decoration: underline;
}

.info {
    width: 30%;
    padding: 10px;
}
img {
    max-width: 100%;
    height: auto;
}

footer {
    background-image: url('assets/bottom_image.jpeg');
    overflow: hidden;
    margin-top: 5px; /* Add space above footer */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    height: 105px;  /* Set a height */
    width: 100%;
    overflow: hidden;
    position: relative;
}

footer img {
    width: 100%; /* Makes the image full width */
    max-height: 80px; /* Limits the height */
    height: auto; /* Keeps the aspect ratio */
    object-fit: cover; /* Ensures the image covers the entire area without distortion */
    object-position: bottom;
}
footer nav {
    position: absolute; /* Position the menu absolutely inside the footer */
    bottom: 10px;
    left: 12%;
    transform: translate(-50%, -50%);
    z-index: 2; /* Makes sure the menu is above the image */
    text-align: center; /* Centers the navigation menu */
    padding: 10px 0; /* Adds padding around the menu */
    background-color: rgba(0, 0, 0, 0); /* Optional: Add a semi-transparent background */
}
nav ul {
    list-style-type: none;
    padding: 0;
    margin: 10px 0 0; /* Adds margin on top */
}

nav ul li {
    display: inline-block;
    margin: 0 15px; /* Spacing between the menu items */
}

nav ul li a {
    color: white; /* Menu text color */
    text-decoration: none; /* Removes underline */
    font-size: 18px;
    font-family: 'Montserrat', sans-serif; /* Change font type */
    font-weight: bold;
}

nav ul li a:hover {
    text-decoration: underline; /* Adds underline on hover */
}

.logos {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 50px;
    padding: 10px 0;
    position: absolute;
    bottom: 12px; /* Position logos at the bottom of the footer */
    right: 30px; 
    z-index: 2; /* Ensure logos appear on top of the background image */
}

.logo {
    max-height: 60px;
    height: auto;
    width: auto;
}

/* Flexbox for footer logos */
footer .logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}


/* Add this to your style.css file */
.info.legend {
    background: rgb(16 163 229 / 16%); /* Half-transparent white background */
    padding: 5px 15px;
    font: 12px/12px 'Montserrat', sans-serif; /* Use the same font as the title */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    #position: absolute;
    top: 5000%; /* Center vertically */
    right: 265%; /* Align to the left with some margin */
    transform: translateY(150%); /* Adjust position to center vertically */
}
.info.legend img {
   # vertical-align: middle;
}
.info.legend i {
    display: inline-block;
    width: 200px;
    height: 10px;
    margin-right: 200px;
}


.color-bar-container {
    position: fixed;
    top: 160px;
    right: 30px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    background: rgba(255, 255, 255, 0);
    padding: 10px;
    border-radius: 5px;
    font-family: 'Montserrat', sans-serif;
}

.color-bar-title {
    font-weight: bold;
    margin-bottom: 5px;
    text-align: center;
    color: #000;
    width: 200px
}

.color-bar {
    width: 200px;
    height: 20px;
    background: linear-gradient(to right, rgba(0, 0, 255, 0.5), rgba(255, 255, 255, 0.5), rgba(255, 0, 0, 0.5));
    border: 1px solid #000;
    margin-bottom: 5px;
    text-align: center;
}

.dropdown-container {
    position: fixed;
    top: 240px;
    right: 85px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    background: rgba(255, 255, 255, 0);
    padding: 5px;
    border-radius: 5px;
    font-family: 'Montserrat', sans-serif;
    text-align:;
    width: 100px
}

.responsive-image {
    width: 100%;
    height: auto;
    max-width: 800px; /* Maximum width for the largest display */
    object-fit: cover;
    object-position: top;
}

/* Add this to your style.css file */
@keyframes grow {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    width: 80vw;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    padding: 20px;
    z-index: 1000;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
    min-height: auto; /* Allow height to be dynamic */
    max-height: 200vh; /* Prevent the overlay from growing too much */
    overflow: auto; /* Ensure scrolling if content overflows */
    overflow-y: scroll;
}

.climatological-overlay {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.5);
  width: 80vw;
  max-width: 100%;
  height: auto;
  max-height: 90vh;
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease-out, transform 0.3s ease-out;
  overflow: auto;
}


.overlay .close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #f4;
    color: black;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 18px;
}

.overlay-content {
    width: 100%;
    max-height: 200vh; /* Allow more space */
    overflow-y: auto;
    font-family: 'Montserrat', sans-serif;
    text-align: left;

}

.overlay-content-clim {
    width: 100%;
    max-height: 200vh; /* Allow more space */
    overflow-y: auto;
    font-family: 'Montserrat', sans-serif;
    text-align: left;

}

.overlay-content iframe {
    width: 100%;
    min-height: 600px; /* Ensure it has a minimum height */
    max-height: 85vh;
    min-width: 30px; /* Ensure it has a minimum height */
    max-width: 85vw;
    border: none;
    display: block;
}
.overlay.active {
    width: 70%;
    opacity: 1;
    height: auto;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}



.iframe-container {
    width: 100%;
    height: 100%;
    max-height: 85vh;
    overflow: hidden;
    padding: 0;
    margin: 0;
}

.iframe-container {
  width: 100%;
  height: auto;
  max-height: 85vh;
  overflow: hidden;
  padding: 0;
  margin: 0;
}
 .menu-toggle {
            position: absolute;
            display: none;
            cursor: pointer;
            right: 40px;
            font-size: 40px;
            background:;
            color: white;
            padding: 10px;
            border-radius: 5px;
            font-family: 'Montserrat', sans-serif;
            top: 10px;
            right: 40px;
            width: 10%;
     }

#climatologicalOverlay iframe {
  width: 100%;
  min-height: 400px;
  height: auto;
  max-width: 100%;
  border: none;
  display: block;
}



/* Hide the menu by default on small screens */
@media (max-width: 768px) {
    
    .overlay{max-height: 70vh; /* Prevent the overlay from growing too much */
             width: 100%;   
    }
    
    .iframe-container {
        width: 100%;
        padding: 0;
        margin: 0;
        height: auto;
        max-height: 85vh;
        overflow: hidden;
    }
    
    .iframe-container iframe {
        width: 100%;
        height: auto;
        transform: none;
        min-width: unset;
        top: 0;
    }
    

    
  .menu-toggle {
     display: block;
            }
    
    .map-menu.active {
                display: block;
            }
    
.map-menu {
    position: absolute;
    top: 80px;
    right: 200px;
    padding: 10px;
    border-radius: 5px;
    font-family: 'Montserrat', sans-serif;
    z-index: 1000;
    display: none;
     
}
    
    
.map-menu ul {
    margin: 0;
    background: rgba(0, 0, 0, 0.5);
    flex-direction: column;
    border-radius: 5px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.3);
    position: absolute;
    top: 50px;
    width: 180px;
    height: 110px;
}

.map-menu ul li {
    margin: 0px 10px;
}

.map-menu ul li a {
    color: white;
    text-decoration: none;
    font-weight: normal;
    font-size: 11px;
}
    
    .color-bar-container {
    display: flex;
    flex-direction: column;
    align-items: center; /* Center align items horizontally */
    top: 200px;
    padding: 10px;
    border-radius: 5px;
    font-family: 'Montserrat', sans-serif;
    right: 00px;
}
    
    .color-bar {
    width: 100px;
    height: 20px;
    border: 1px solid #000;
    text-align: center;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    
}
    
    .color-bar-title {

    margin-bottom: 5px;
    color: #000;
    font-size: 12px;
    text-align: center; /* Center align text */
}

    
    .dropdown-container {
    top: 280px;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    text-align: center;
    right: 55px;
    bottom: auto;
        
}

    
    header .right-nav {
        position: absolute; /* Position the menu absolutely inside the header */
        top: 70px; /* Adjust as needed */
        right: 10px;
        transform: translate(0, -50%);
        font-family: 'Montserrat', sans-serif; /* Change font type */
        z-index: 2; /* Makes sure the menu is above the image */
        text-align: center; /* Centers the navigation menu */
        padding: 10px 0; /* Adds padding around the menu */
        background-color: rgba(0, 0, 0, 0); /* Optional: Add a semi-transparent background */
}

    header .left-nav {
        position: absolute; 
        top: 70px; /* Adjust as needed */
        left: 10px; /* Position to the left */
        transform: translate(0, -50%);
        font-family: 'Montserrat', sans-serif; /* Change font type */
        z-index: 2; /* Makes sure the menu is above the image */
        text-align: center; /* Centers the navigation menu */
        padding: 10px 0; /* Adds padding around the menu */
        background-color: rgba(0, 0, 0, 0); /* Optional: Add a semi-transparent background */
        font-size: 12px;
}

    
    header{
        height:100px
    }

    .header-text {
        font-size: 18px; /* Smaller title on mobile */
        top: 40px; /* Center vertically */
        left: 130px;

        transform: translate(-50%, -50%); /* Adjust position to truly center */
    }
    
    .logos {
        display: absolute;
        justify-content: flex-end;
        align-items: center;
        gap: 50px;
        padding: 10px 0;
        position: absolute;
        bottom: 1px; /* Position logos at the bottom of the footer */
        right: 2%; 
        z-index: 2; /* Ensure logos appear on top of the background image */
}

     .logo {
        max-height: 24px; /* Smaller logos on mobile */
        height: auto;
    }

    
    header img {
        object-fit: cover; /* Ensure the image covers the area */
        object-position: top; /* Show only the upper half of the header image */
    }
    
    footer {
    margin-top: 5px; /* Add space above footer */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    height: 65px;  /* Set a height */
    width: 100%;
    overflow: hidden;
    position: relative;
}

    footer img {
        object-fit: cover; /* Ensure the image covers the area */
        object-position: bottom; /* Show only the bottom half of the footer image */
    }
    
    #map {
    width: 100%;
    height: calc(105vh - 250px);
    margin-bottom: 10px;
}

    footer nav {
        position: fixed; /* Position the menu absolutely inside the footer */
        bottom: px;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: 2; /* Makes sure the menu is above the image */
        text-align: center; /* Centers the navigation menu */
        padding: 10px 0; /* Adds padding around the menu */
        background-color: rgba(0, 0, 0, 0); /* Optional: Add a semi-transparent background */
}

    
    .subtitle {
    position: absolute; /* Absolutely position the text */
    top: 70px; /* Adjust to be below the title */
    left: 105px;
    transform: translate(-50%, -50%); /* Adjust position to truly center */
    color: white; /* Text color */
    font-size: 11px; /* Match font size as needed */
    font-family: 'Montserrat', sans-serif; /* Change font type */
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8); /* Add a shadow for better visibility */
    text-align: center; /* Center text */
    text-transform: none; /* Make text appear in capital letters */
    font-weight: normal; /* Make text bold */
}

    /* --- MOBILE PATCH START --- */

    /* Ensure active overlays use full width on phones */
    .overlay.active,
    .climatological-overlay.active {
      width: 100% !important;
      left: 50% !important;
      transform: translate(-50%, -50%) scale(1) !important;
      max-width: 100% !important;
      padding: 12px !important;
      box-sizing: border-box !important;
    }

    /* Make iframe heights reasonable on phones */
    #climatologicalOverlay iframe,
    .overlay-content iframe {
      min-height: 40vh !important;
      height: auto !important;
      max-height: 85vh !important;
    }

    /* Allow scrolling inside overlays and smooth touch scrolling */
    .climatological-overlay,
    .overlay {
      overflow-y: auto !important;
      -webkit-overflow-scrolling: touch !important;
    }

    /* Reduce large fixed right offsets that push controls off-screen */
    .map-menu,
    .color-bar-container,
    .dropdown-container {
      right: 10px !important;
      left: auto !important;
    }

    /* Ensure menu is reachable and not hidden off-canvas */
    .map-menu ul {
      width: auto !important;
      right: 10px !important;
    }

    /* Reduce iframe min-height in iframe-container on very small screens */
    .iframe-container iframe {
      min-height: 30vh !important;
    }

    /* --- MOBILE PATCH END --- */
}

/* Keep the menu always visible on larger screens */

@media (min-width: 769px) {

}
