/* Base Styles */
:root {
    --primary-color: #277ab9;
    --primary-dark: #225f93;
    --primary-darker: #1a4f7d;
    --text-color: #333;
    --bg-color: #F2F6FA;
    --white: #fff;
    --shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --nav-width: 250px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

/* Global Styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Responsive Media Elements */
img, video, iframe {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Desktop view - images take maximum half of screen width */
@media screen and (min-width: 768px) {
    img:not(.logo, .social-links img, .toolbar img, .submenu img, nav img) {
        max-width: 50vw;
    }
    
    video:not(.video-container video) {
        max-width: 50vw;
    }
}

/* Mobile view - images take full width (but constrained by parent) */
@media screen and (max-width: 767px) {
    img:not(.logo, .social-links img, .toolbar img, .submenu img, nav img) {
        max-width: 100%;
    }
    
    video:not(.video-container video) {
        max-width: 100%;
    }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-color);
    line-height: 1.2;
    margin-bottom: 1rem;
}
h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

/* 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;
}

/* 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: var(--text-color);
    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: var(--text-color);
    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 var(--text-color);
    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;
}



/* Video Container */
.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Main Content Styles */
main {
    padding: 2rem 1rem;
}
.main-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    flex: 1;
    text-align: left;
    padding: 20px; /* Added padding for better spacing */
}

/* Construction Message */
.construction-message {
    font-size: 24px;
    color: #277ab9;
    text-align: center; /* Center the message */
    padding: 20px;
}

.construction-message p {
    margin: 10px 0;
}

form {
    background: #f9f9f9;
    padding: 2rem;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.contact-details {
    margin-top: 2rem;
    background: #f9f9f9;
    padding: 1.5rem;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.contact-details h3 {
    margin-top: 0;
}

/* Footer */
footer {
    display: flex;
    align-items: center; /* Vertically center */
    justify-content: center; /* Horizontally center */
    background-color: #277ab9; /* Adjust color */
    color: white;
    text-align: center;
}

.social-links {
    position: absolute;
    bottom: 20px; /* Align it to the bottom */
    right: 20px; /* Align it to the right */
    display: flex;
    gap: 10px;
}

.social-links a {
    text-decoration: none;
}

/* LinkedIn Icon */
.social-links a.linkedin {
    color: #07405f; /* LinkedIn blue */
}

/* YouTube Icon */
.social-links a.youtube {
    color: #ff0000; /* YouTube red */
}

/* Email Icon */
.social-links a.email {
    color: var(--text-color); /* Default color for the envelope icon */
}
/* Typography */
h2 {
    font-size: 1.5em;
    color: var(--text-color);
    margin-bottom: 15px;
}

p {
    font-size: 1.1em;
    line-height: 1.8;
    margin-bottom: 10px;
}

ul li, ol li {
    font-size: 1.1em;
    line-height: 1.8;
    margin-bottom: 15px;
}

/* Tables */
.table-container {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
}

th, td {
    padding: 12px;
    text-align: left;
    border: 1px solid #ddd;
}

th {
    background-color: #4CAF50;
    color: white;
    font-weight: bold;
}

strong.green {
    font-weight: bold;
    color: #0b610b;
}

strong.red {
    font-weight: bold;
    color: #e40c0c;
}

em {
    font-style: italic;
    color: #d8cbcb;
}

tr:hover {
    background-color: #f1f1f1; /* Lighter hover effect */
}

/* Accessibility */
a:focus-visible, button:focus-visible {
    outline: 2px solid #ffcc00;
    outline-offset: 2px;
}

/* Auth Buttons Styles */
.auth-buttons a {
    background-color: #277ab9; /* Same as nav background color */
    color: white;
    padding: 10px 20px;
    margin: 5px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    display: inline-block;
    transition: background-color 0.3s ease;
}

.auth-buttons a:hover {
    background-color: #225f93; /* Darker shade of the same color for hover effect */
}

/* Active or focused auth buttons */
.auth-buttons a:focus, .auth-buttons a:active {
    outline: none;
    background-color: #1a4f7d; /* Another shade of blue for active/focused state */
}

header, footer, nav {
    background-color: #277ab9; /* Same color to connect */
    color: white;
    text-align: left;
}

/* Styling for the dropdown */
.dropdown {
    position: relative;
    display: inline-block;
    padding-left: 20px;
}
.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 160px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
    z-index: 1;
}
.dropdown:hover .dropdown-content {
    display: block;
}
.dropdown-content a {
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}
.dropdown-content a:hover {
    background-color: #f1f1f1;
}

.no-scroll {
    overflow: hidden;
}

/* Accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid #ffcc00;
  outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Animation */
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}

.fade-in {
animation: fadeIn 0.5s ease-in;
}

@media screen and (max-width: 767px) {
    /* Header adjustments */
    header {
        margin-left: 0;
        position: fixed;
        top: 0;
        width: 100%;
        height: 200px;
        padding: 10px 15px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: space-between;
        z-index: 1000;
        background: #277ab9; /* Unified background color */
    }

    /* Language selector (Top Right, Slightly Lower) */
    .language-selector {
        position: fixed;
        top: 40px; /* Moved slightly down */
        right: 15px;
        z-index: 1002;
    }

    .language-selector select {
        background-color: rgba(255, 255, 255, 0.2);
        color: white;
        border-radius: 4px;
        padding: 6px 8px;
        font-size: 14px;
        border: 1px solid rgba(255, 255, 255, 0.3);
    }

    /* Centered Header Description */
    .header-description {
        text-align: center;
        font-size: 18px;
        color: white;
        font-weight: bold;
        width: 100%;
        padding: 10px 15px;
    }

    /* Bottom row: Social links & Hamburger */
    .header-bottom {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 20px 15px;
    }

    /* Hamburger menu (Left side) - Modified to stick to left */
    .hamburger {
        display: block;
        background: none;
        border: none;
        color: white;
        font-size: 24px;
        cursor: pointer;
        z-index: 1001;
        position: absolute;
        left: 15px;
        top: 40px;
    }

    /* Social links (Right side, Slightly Lower) - Modified position */
    .social-links {
        display: flex;
        gap: 10px;
        align-items: center;
        position: absolute;
        right: 15px;
        top: 80px; /* Adjusted to move slightly down */
    }

    .social-links a {
        color: white;
        font-size: 18px;
        text-decoration: none;
    }

    /* Rest of your existing styles remain unchanged */
    /* Navigation styles */
    nav {
        position: fixed;
        top: 200px;
        left: 0;
        width: 280px;
        max-width: 85%;
        height: calc(100vh - 200px);
        background: #277ab9; /* Unified background color */
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 999;
        overflow-y: auto;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    }

    nav.active {
        transform: translateX(0);
    }

    .nav-links {
        padding: 20px 0;
    }

    nav a {
        padding: 15px 25px;
        font-size: 16px;
        display: flex;
        align-items: center;
        min-height: 44px;
    }

    /* Main content adjustments */
    main {
        margin-left: 0;
        padding: 20px 15px;
        margin-top: 200px;
        width: 100%;
    }

    /* Submenu adjustments */
    .submenu {
        position: static;
        display: none;
        background-color: var(--primary-dark);
        box-shadow: none;
        min-width: auto;
    }

    .submenu.active {
        display: block;
    }

    .submenu a {
        padding-left: 40px;
        min-width: auto;
    }

    /* Add mobile menu toggle indicator */
    .has-submenu::after {
        content: '+';
        margin-left: auto;
        font-size: 18px;
    }

    .has-submenu.active::after {
        content: '-';
    }

    /* Overlay when menu is open */
    .nav-overlay {
        position: fixed;
        top: 200px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 998;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }

    .nav-overlay.active {
        opacity: 1;
        pointer-events: auto;
    }
}
