/* Global Styles */
body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    background-color: #F2F6FA;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    color: #333;
}

/* Header Styles */
header {
    background-color: #277ab9;
    color: #fff;
    padding: 15px;
    position: relative;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    margin-left: 250px;
    justify-content: center;
    flex-direction: column; /* Stack elements for responsiveness */
}

.header-content {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-wrap: wrap; /* Wrap for smaller screens */
}

.logo {
    height: 80px; /* Adjusted for better spacing */
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    margin-top: 20px;
    margin-bottom: 6px;
    max-width: 150px;
    height: auto;
}

.language-selector {
    position: absolute;
    right: 15px;
    top: 15px;
    transform: translateY(-50%);
}

.language-selector select {
    padding: 5px;
    font-size: 14px;
    background-color: #277ab9;
    color: white;
    border: none;
    cursor: pointer;
}

.language-selector select:hover {
    background-color: #225f93;
}

.language-selector select:focus {
    outline: none;
}

/* Responsive Content */
img, video, iframe {
    max-width: 100%;
    height: auto;
}

h1 {
    text-align: left;
    flex: 1;
}

/* Navigation Styles */
nav {
    position: fixed; /* Fix the nav on the left */
    left: 0;
    width: 250px; /* Fixed width for the navigation */
    background-color: #277ab9;
    font-size: 1.1em;
    box-shadow: 0px 0 0px rgba(0, 0, 0, 0.1);
    overflow-y: auto; /* Ensures scrollability if needed */
    min-height: 100%; /* Extend to footer */
}

.nav-links {
    display: flex;
    flex-direction: column; /* Stack nav items vertically */
    gap: 15px;
    padding-left: 10px;
}

nav a {
    margin: 0;
    padding: 10px 15px;
    text-decoration: none;
    font-weight: bold;
    color: white;
}

nav a:hover {
    background-color: #225f93;
}

nav a:hover + .submenu, .submenu:hover {
    display: block;
}

.menu-bar {
    display: flex;
    background-color: #333;
    padding: 0px;
    justify-content: left;
    position: relative;
}

/* Submenu styling */
.submenu {
    display: none;
    position: absolute;
    top: 100%; /* Position it right below the menu item */
    left: 0;
    background-color: #444;
    min-width: 180px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

.submenu a {
    display: block;
    padding: 10px;
    color: white;
    text-decoration: none;
    white-space: nowrap; /* Prevents text from wrapping */
    overflow: hidden; /* Hides overflowed text */
    text-overflow: ellipsis; /* Adds '...' for overflowed text */
    min-width: 250px; /* Adjust width as needed */
}

.submenu a:hover {
    background-color: #b84040;
}

.menu-item {
    position: relative;
    background-color: #333;
    display: inline-block;
    color: white;
    cursor: pointer;
    padding: 10px;
}

.menu-item:hover {
    background-color: #b84040;
}

/* Show submenu when hovering over the parent */
.menu-item:hover .submenu {
    display: block;
}

/* Submenu for submenu (nested submenu) */
.submenu .submenu {
    display: none;
    position: absolute;
    top: 0;
    left: 100%; /* Position to the right of the parent submenu */
    background-color: #555;
}

.submenu-item {
    position: relative;
}

/* Show nested submenu when hovering over a submenu item */
.submenu-item:hover .submenu {
    display: block;
}

.submenu img {
    width: 20px;
    height: 20px;
    margin-right: 10px;
}
/* Main content adjustment */
main {
    padding: 2rem 1rem;
    margin-left: 250px; /* Space for the fixed left navigation */
}

.toolbar {
    display: flex;
    padding: 5px;
    justify-content: left;
    border-left: 2px solid #000;
    border-right: 2px solid #000;
}
.toolbar button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    margin-right: 5px;
}
.toolbar button img {
    width: 24px;
    height: 24px;
}
.toolbar button:hover {
    background-color: #b84040;
}  

#logger {
    border: 2px solid #333;
    padding: 10px;
    overflow-y: auto;
    height: 150px;
    margin-top: 10px;
}

/* Responsive Navigation */
.hamburger {
    display: none;
    background-color: #277ab9;
    color: white;
    border: none;
    padding: 10px;
    font-size: 24px;
    cursor: pointer;
}

/* Tab Menu */
.tab-menu {
    display: flex;
    justify-content: center;
    background-color: #f7f7f7;
    padding: 10px 0;
    flex-wrap: wrap;
}

.tab-button {
    flex: 1;
    padding: 12px;
    cursor: pointer;
    text-align: center;
    border: none;
    background-color: #f7f7f7;
    font-size: 16px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.tab-button:hover, .tab-button.active {
    color: #277ab9;
    font-weight: bold;
}

.tab-content {
    display: none;
    padding: 20px;
    background-color: white;
}

.tab-content.active {
    display: block;
}

/* Responsive Styles */
@media screen and (max-width: 767px) {
    /* Header Adjustments */
    header {
        margin-left: 0;
        padding: 10px 15px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-direction: row;
        width: 100%;
    }

    .header-content {
        display: flex;
        flex-direction: row;
        align-items: center;
        width: 100%;
        justify-content: space-between;
    }

    .logo {
        max-width: 120px;
        height: auto;
        margin-left: 10px;
    }

    .language-selector {
        position: static;
        transform: none;
        margin-right: 10px;
    }

    /* Mobile Nav */
    nav {
        position: fixed;
        top: 0;
        left: -250px; /* Hide off-screen */
        width: 250px;
        height: 100vh;
        background-color: #277ab9;
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
        z-index: 1000;
        transition: left 0.3s ease-in-out;
        padding-top: 60px; /* Space for the hamburger */
        display: flex;
        flex-direction: column;
    }

    nav.active {
        left: 0;
    }

    .nav-links {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    nav a {
        padding: 12px 20px;
        text-decoration: none;
        color: white;
        font-weight: bold;
        display: block;
    }

    /* Hamburger Menu */
    .hamburger {
        display: block;
        background: transparent;
        border: none;
        font-size: 26px;
        color: white;
        cursor: pointer;
        margin-left: 10px;
    }

    /* Overlay Effect */
    .overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }

    .overlay.active {
        display: block;
    }

    /* Main content */
    main {
        margin-left: 0;
        padding: 1rem;
    }
}

/* Video Container */
.video-container {
    width: 100%;
    height: auto;
    background-color: #333;
}

video {
    width: 100%;
}
