.banner {
    align-items: center;
    height: fit-content;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    border-bottom: 1px solid #4B5460;
    margin-bottom: 20px;
    padding: 1rem 2rem;
    width: 100%;
}

#banner-text {
    text-align: left;
}

#banner h1{
    color: #191970;
}

#banner-logo {
    display: inline;
}

.banner-button {
    margin: 2px;
    height: 30px;
    color: #555;
    text-align: center;
    align-items: center;
    background-color: transparent;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .1rem;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    border-radius: 4px;
    border: 1px solid #bbb;
    cursor: pointer;
    box-sizing: border-box;
}

.banner Img {
    height: 4.5rem;
    margin: 0px 10px;
}

#banner-buttons {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-end;
}

.banner-group {
    display: flex;
    flex-direction: row;
}

.sidebar {
    width: 100%;
    height: auto;
    background-color: #f8f9fa;
    padding: 10px;
    margin-bottom: 20px; /* Add margin to separate from the footer */
    text-align: center;
}

.sidebar h2{
    text-align: center;
    color: #191970;
}

.sidebar_dropdown{
    margin-bottom: 20px;
}

.sidebar_buttons{
    display: table-column;
    justify-content: center;
    align-items: center;
    text-align: center;
    margin: 5px;
}

#start-datepicker{
    display: inline-block;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    margin-left: 10px;
    margin-bottom: 20px;
}

#end-datepicker{
    display: inline-block;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
}

.main-container {
    display: flex;
    flex-direction: row;  /* Side by side on desktop */
    width: 100%;
    overflow-x: hidden;
}

.left-column {
    width: 30%;  /* Fixed width for desktop */
    margin-left: 1%;
    flex-shrink: 0;
}

.right-column {
    width: 67%;  /* Adjust to complement left column */
    margin-left: 1%;
    margin-right: 1%;
    height: auto;
    overflow-x: hidden;
    overflow-y: auto;
}

.footer {
    display: flex; /* Flexbox for responsive alignment */
    justify-content: center;
    align-items: center;
    text-align: center;
    width: 100%; /* Full width of the container */
}

#ifremer{
    padding: 1em;
    height: 100%;
    width: 30%;
}

#cnrs{
    height: 100%;
    width: 20%;
}

.loading-component{
    margin-top: 20%;
    z-index: 99 !important;
}

.centered-table {
    width: 100%;
    border-collapse: collapse;
}
.centered-table th, .centered-table td {
    text-align: center;
    padding: 8px;
}
.centered-table th {
    background-color: #f2f2f2;
}

/* Mobile-specific styles */
@media (max-width: 768px) {
    .banner {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }

    #banner-text {
        text-align: center;
        margin-bottom: 1rem;
    }

    .banner-group {
        flex-direction: column-reverse;
        align-items: center;
    }

    #banner-buttons {
        align-items: center;
        margin-top: 1rem;
    }

    .banner Img {
        height: 3rem;
    }

    .main-container {
        flex-direction: column;  /* Stack on mobile */
    }

    .left-column {
        width: 98%;  /* Full width on mobile */
        margin: 0 1%;
    }

    .right-column {
        width: 98%;  /* Full width on mobile */
        margin: 0 1%;
    }

    #start-datepicker,
    #end-datepicker {
        width: 80% !important;
        margin: 5px auto;
        display: block;
    }

    .dash-table-container {
        overflow-x: auto;
    }

    .map-container,
    html.Embed {
        height: 300px;
    }

    .turtle-cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 10px;
        padding: 10px;
    }
}

/* Tablet-specific styles */
@media (min-width: 769px) and (max-width: 1024px) {
    .left-column {
        width: 35%;
    }

    .right-column {
        width: 63%;
    }

    .turtle-cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 250px));
    }
}

/* Touch device optimizations */
@media (hover: none) {
    .banner-button,
    .sidebar_buttons,
    .turtle-card {
        padding: 12px;
    }

    .turtle-card:hover {
        transform: none;
        box-shadow: none;
    }
}

/* Add this to your existing CSS */
#data-info-block {
    margin-bottom: 20px;
    padding: 10px;
}

#data-info-block p {
    margin: 5px 0;
    font-size: 0.9em;
}

#data-info-block h2 {
    margin-bottom: 10px;
}

.turtle-cards-container {
    padding: 20px;
    width: 100%;
}

.turtle-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 200px));
    gap: 20px;
    padding: 20px;
    max-width: 1350px;
}

.turtle-card {
    transition: transform 0.2s;
    cursor: pointer;
}

.turtle-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.turtle-card img {
    height: 150px;
    object-fit: cover;
}

.map-container {
    order: 1;
    width: 100%;
    margin-bottom: 20px;
    min-height: 0;  /* Default height when empty */
    height: 500px;  /* Height when has content */
    display: none;  /* Hidden by default */
}

.map-container:not(:empty) {
    display: block;  /* Show only when has content */
}

/* Improve dropdown usability on mobile */
.Select-control {
    min-height: 38px;
}

.Select-menu-outer {
    max-height: 300px;
}

/* Ensure modals and popups are usable on mobile */
.modal-content {
    width: 90%;
    margin: auto;
    max-height: 80vh;
    overflow-y: auto;
}