/* css/style.css */

html, body {
    height: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
}

/* Header Styling */
.navbar.is-fixed-top {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: #1e3a8a; /* New Navy Blue */
    color: white;
    min-height: 3.25rem; /* Fixed height */
    overflow: visible; /* Allow dropdown to overflow */
}

.navbar.is-primary {
    background-color: #1e3a8a !important; /* Override Bulma primary with new navy */
}

.navbar.is-fixed-top .navbar-item {
    color: white;
}

.navbar.is-fixed-top .navbar-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.navbar.is-fixed-top .navbar-brand .navbar-item .title {
    color: white !important;
}

.navbar-burger span {
    background-color: white;
}

/* Footer Styling */
.footer.is-fixed-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: #1e3a8a; /* New Navy Blue */
    color: white;

    padding: 0.75rem 1.5rem; /* Maintain compact height */
    font-size: 0.8rem;
    line-height: 1.2;
}

/* Ensure links in footer are visible */
.footer.is-fixed-bottom a {
    color: lightblue;
}

.footer.has-background-dark {
    background-color: #1e3a8a !important; /* Override Bulma dark with new navy */
}

/* Content Wrapper Styling */
.content-wrapper {
    flex-grow: 1;
    padding-top: 52px; /* Matches header height */
    padding-bottom: 52px; /* Set to roughly header/footer height for clearance */
    overflow-y: auto; /* Explicitly ensure vertical scroll if content overflows */
    background-color: white;
    color: #363636;
}

/* Style for the active nav item */
.navbar-item.is-active {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Dropdown styling - critical changes for mobile */
.navbar-item.has-dropdown {
    position: static; /* Changed from relative for mobile */
}

.navbar-item.has-dropdown .navbar-dropdown {
    display: none;
    position: absolute;
    right: 0;
    left: auto;
    top: 100%; /* Position below navbar */
    background: white;
    min-width: 200px;
    z-index: 1001;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.navbar-item.has-dropdown.is-active .navbar-dropdown {
    display: block;
}

/* Custom styles to keep navbar-end aligned right */
.navbar > .container {
    display: flex;
    justify-content: space-between;
    flex-wrap: nowrap;
    width: 100%;
}

.navbar-brand {
    flex-shrink: 0;
    min-height: 3.25rem; /* Match Bulma's navbar height */
    align-items: center;
}

.navbar-end {
    flex-shrink: 0;
    margin-left: auto !important; /* Force it to the right */
}

/* Make language options visible */
#languageOptionLabelEs {
    color: #1e3a8a !important;
}

#languageOptionLabelEn {
    color: #1e3a8a !important;
}

#languageOptionLabelZh {
    color: #1e3a8a !important;
}

@media screen and (max-width: 1023px) {
    .navbar > .container {
        padding: 0 1rem;
    }
    
    #variableLabel1 {
        display: none;
    }
    
    .navbar-brand h3 {
        font-size: 1rem;
        margin-left: 0.5rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 150px;
    }
    
    /* Ensure navbar maintains fixed height on mobile */
    .navbar.is-fixed-top {
        min-height: 3.25rem;
        height: 3.25rem;
        overflow: visible;
    }
    
    /* Position dropdown correctly on mobile */
    .navbar-item.has-dropdown .navbar-dropdown {
        right: 10px;
        left: auto;
        width: 180px;
    }
}

/* Demo content styles */
.content-section {
    padding: 2rem;
    border-bottom: 1px solid #eee;
}

.flag-icon {
    height: 1rem;
    width: 1.5rem;
    object-fit: cover;
    border-radius: 2px;
}