/* Variables */
:root {
    --background-color: #282828;
    --neutral-color: #fafcfc;
    --neutral-color-dim: rgba(250, 252, 252, 0.7);
    --primary-color: #009688;
    --secondary-color: #673ab7;
    --warning-color: #b71c1c;

    --navbar-height: 65px;
    --main-font: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;

    color-scheme: dark;
}

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

body {
    background-color: var(--background-color);
    color: var(--neutral-color);
    font-family: var(--main-font);
    padding-top: var(--navbar-height);
}

/* Navbar */
nav {
    background-color: var(--primary-color);
    height: var(--navbar-height);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 4px var(--secondary-color) solid;
}

    nav ul {
        float: left;
        margin-left: 20px;
    }

    nav ul li {
        display: inline-block;
        line-height: var(--navbar-height);
        margin: 0 5px;
    }

    nav ul li a {
        border-radius: 5px;
        color: var(--neutral-color);
        font-size: 18px;
        padding: 5px 10px;
    }

    #settingsIcon {
        color: var(--neutral-color);
        cursor: pointer;
        font-size: 30px;
        font-weight: bold;
        line-height: var(--navbar-height);
        margin-right: 20px;
        order: 1;
    }

    label.logo {
        font-size: 30px;
        font-weight: bold;
        line-height: var(--navbar-height);
        margin-right: 20px;
        order: 2;
    }

    label.logo a {
        color: var(--neutral-color);
        border-radius: 5px;
        padding: 5px 10px;
    }

    a.active, a:hover {
        background: #00655b;
        transition: .5s;
    }

    #side {
        display: flex;
        float: right;
    }

    .dropdown {
        float: left;
        overflow: hidden;
        border: none;
        outline: none;
        margin: 0;
      }

      .dropdown-content {
        display: none;
        position: absolute;
        background-color: var(--background-color);
        min-width: 160px;
        box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
        border: 2px solid var(--secondary-color);
        z-index: 1;
      }
      
      .dropdown-content a {
        display: flex;
        align-items: center;

        float: none;
        color: var(--neutral-color);
        padding: 12px 16px;
        text-decoration: none;
      }
      
      .dropdown:hover .dropdown-content {
        display: block;
      }

      /* when toggled via JS (touch) */
    .dropdown.open .dropdown-content {
        display: block;
    }

      .icon {
        margin-right: 10px;
        width: 30px;
        height: 30px;
        cursor: pointer;
    }
    
    .iconText {
        line-height: 1.2;
    }

/* Mobile Navbar */
/* Hamburger Icon Container */
.hamburger-icon {
    display: block;
    position: relative;
    width: 30px;
    height: var(--navbar-height);
    cursor: pointer;
    margin-right: 20px;
    float: right;
}

.hamburger-icon .line {
    position: absolute;
    height: 3px;
    width: 100%;
    background-color: var(--neutral-color);
    border-radius: 2px;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    left: 0;
    transform-origin: center;
}

.hamburger-icon .line.top { top: 22px; }
.hamburger-icon .line.middle { top: 32px; }
.hamburger-icon .line.bottom { top: 42px; }

/* Change burger lines to warning color when menu is open */
.menu-open .hamburger-icon .line {
    background-color: var(--warning-color);
}


/* Close Icon */
.close-icon {
    color: var(--warning-color);
    cursor: pointer;
    font-size: 40px;
    font-weight: bold;
    line-height: var(--navbar-height);
    margin-right: 20px;
    float: right;
    display: none;
}

/* Animation States */
.menu-open .hamburger-icon .line.top {
    transform: translateY(10px) rotate(45deg);
}

.menu-open .hamburger-icon .line.middle {
    opacity: 0;
    transform: translateX(50px);
}

.menu-open .hamburger-icon .line.bottom {
    transform: translateY(-10px) rotate(-45deg);
}

.menu-open .close-icon {
    display: block;
}

.overlay {
    height: 100%;
    width: 0;
    position: fixed;
    z-index: 900;
    top: 0;
    left: 0;
    background-color: var(--background-color);
    overflow-x: hidden;
    transition: 0.5s;
}

.overlay-content {
    position: relative;
    top: 20%;
    width: 100%;
    text-align: center;
    }

.overlay a {
    padding: 8px;
    text-decoration: none;
    font-size: 36px;
    color: #818181;
    display: block;
    transition: 0.3s;
}

.overlay a:hover, .overlay a:focus {
    color: var(--neutral-color);
}

/* Slider */
.switch {
    position: relative;
    display: inline-flex; /* Change to inline-flex to allow alignment */
    align-items: center; /* Align items vertically */
}

/* Hide default HTML checkbox */
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute; /* Move the checkbox out of the view */
}

/* The slider */
.slider {
    position: relative; /* Change to relative to position the point relative to the slider */
    cursor: pointer;
    background-color: #ccc;
    transition: .4s;
    width: 30px; /* New width */
    height: 18px; /* Adjusted height to maintain aspect ratio */
    margin-left: 5px; /* Adjusted margin to align with the language icon */
}

.slider:before {
    content: "";
    height: 14px; /* Adjusted height to maintain aspect ratio */
    width: 14px; /* Adjusted width to maintain aspect ratio */
    position: absolute; /* Position the point absolutely */
    left: 3px; /* Center the point within the slider */
    bottom: 2px; /* Adjusted bottom position */
    background-color: white;
    transition: .4s;
    border-radius: 50%; /* Adjusted border radius to maintain circular shape */
}

input:checked + .slider {
    background-color: #2196F3;
}

input:focus + .slider {
    box-shadow: 0 0 1px #2196F3;
}

input:checked + .slider:before {
    transform: translateX(100%); /* Move the point to the right end when checked */
}

/* Rounded sliders */
.slider.round {
    border-radius: 9px; /* Adjusted border radius to maintain circular shape */
}

.slider.round:before {
    border-radius: 50%; /* Adjusted border radius to maintain circular shape */
}

.sliderContainer {
    display: flex;
    align-items: center;
    margin-left: 10px; /* Adjusted margin to align with the language icon */
    margin-top: 10px;
    margin-right: 10px;
    margin-bottom: 15px;
}

/* The text next to the slider */
.sliderText {
    margin-left: 11px; /* Adjusted margin to maintain spacing */
    line-height: 1.2; /* Match line height with icon text */
}

/* Media Queries */
@media (min-width: 768px) {
    .hamburger-icon, .close-icon { display: none !important; }
}

@media only screen and (max-width: 767px) {
    /* Menu */
    .menu {
        display: none;
    }
    #side {
        float: left;
        justify-content: space-between;
    }
    .logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }
    #settingsIcon {
        margin-left: 20px;
    }
}