@import url("https://fonts.googleapis.com/css?family=Open+Sans:700");

/* Navigation Bar Base Styles */
.navbar {
    display: flex;
    background: var(--navbar-background, #2a2a2a);
    padding: 0;
    position: fixed;
    z-index: 1000;
    transition: background-color 0.3s ease;
}

.nav-item {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    display: flex;
    align-items: center;
    position: relative;
    transition: all 0.3s ease;
}

.nav-icon {
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
    pointer-events: none;
    filter: brightness(0) invert(1);
    opacity: 0.7;
}

/* Override filter for the globe icon in the region selector to use its native white color */
.region-button .nav-icon {
    filter: none;
}

.nav-text {
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
    color: white;
}

.logo-icon {
    height: 100%;
    width: auto;
    max-height: 50px; 
    filter: invert(1);
}

.mobile-logo-icon {
    height: 100%;
    width: auto;
    max-height: 50px; 
}

/* Desktop Styles */
@media (min-width: 769px) {
    .navbar {
        top: 0;
        left: 0;
        flex-direction: row;
        height: 5rem;
        width: 100%;
        padding: 0 1rem 0 2rem;
        justify-content: space-between;
        align-items: center;
        clip-path: polygon(
            0% 0%,                  /* Top left corner */
            0% 75%,                 /* Left line */
            55% 75%,                /* Bottom left point */
            58% 100%,               /* Bottom point */
            100% 100%,              /* Bottom right corner */
            100% 0%                 /* Top right corner */
        );
    }

    .navbar::before {
        content: '';
        display: block;
        width: 60%;
        /*border-bottom: 2rem solid rgb(156, 16, 16);*/
        border-top: 3rem solid var(--navbar-background, #2a2a2a);
        position: absolute;
        border-right: 4rem solid transparent;
        border-left: 4rem solid transparent;
        right: 60%;
        top: 2rem;
        transition: border-color 0.3s ease;
    }

    .nav-left,
    .nav-center,
    .nav-right {
        display: flex;
        align-items: center;
        height: 100%;
    }

    .nav-center {
        flex: 1;
        justify-content: center;
        gap: 2rem;
    }

    .nav-item {
        padding: 0 1rem;
        height: 100%;
        justify-content: center;
        gap: 0.5rem;
    }

    .nav-item .nav-icon {
        display: inline-block;
        width: 20px;
        height: 20px;
        margin-right: 6px;
        opacity: 0.8;
    }

    .nav-item:hover .nav-icon,
    .nav-item.active .nav-icon {
        opacity: 1;
        transform: scale(1.1);
    }

    .nav-item .nav-text {
        display: inline-block;
        font-size: 0.95rem;
    }

    .nav-item.active::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 3px;
        background: var(--background-color);
    }

    .nav-item:hover::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 3px;
        background: var(--background-color);
    }

    .nav-logo {
        display: flex;
        align-items: center;
        height: 100%;
        padding: 0;
    }

    .nav-item.active {
        color: white;
        background: var(--hover-bg);
    }

    .nav-item:hover:not(.active) {
        background: rgba(255, 255, 255, 0.1);
    }

    .nav-right {
        display: flex;
        align-items: center;
    }

    .nav-right .user-section {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 8px 16px;
    }

    .nav-right .user-section img {
        width: 32px;
        height: 32px;
        border-radius: 50%;
    }

    .nav-right .user-section button {
        padding: 8px 16px;
        background-color: var(--primary-color);
        color: white;
        border: none;
        border-radius: 4px;
        cursor: pointer;
        font-size: 14px;
        
    }

    .nav-right .user-section button:hover {
        background-color: var(--primary-color-dark);
    }
}

/* Mobile Styles - Exactly as before */
@media (max-width: 768px) {
    .navbar {
        flex-direction: row;
        justify-content: space-evenly;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 70px;
        box-shadow: 0 -1px 15px rgba(0, 0, 0, 0.2);
    }

    .nav-item {
        flex: 1;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 0.75rem 0;
        min-width: 60px;
        max-width: 80px;
    }

    .nav-icon {
        margin-top: 10px;
    }

    .nav-text {
        opacity: 0;
        visibility: hidden;
        font-size: 0.85rem;
        text-align: center;
    }

    /* Semi-circle for active state on mobile */
    .nav-item::before {
        content: '';
        position: absolute;
        top: 0px;
        left: 50%;
        transform: translateX(-50%) scale(0);
        width: 50px;
        height: 60px;
        background: var(--hover-bg);
        clip-path: polygon(99% 0%,78% 0%,70% 6%,35% 6%,29% 0%,11% 0%,0% 9%,0% 100%,100% 100%);
        transition: transform 0.3s ease;
        z-index: -1;
    }

    .nav-item.active::before {
        transform: translateX(-50%) scale(1.6);
    }

    .nav-item.active .nav-icon {
        transform: translateY(-12px);
    }

    .nav-item.active .nav-text {
        visibility: visible;
        opacity: 1;
        transform: translateY(-8px);
    }

    /* Reset margin for mobile */
    body > *:not(.navbar) {
        width: 100%;
    }

    .nav-left,
    .nav-center,
    .nav-right {
        display: none;
    }

    #desktopUserSection {
        display: none;
    }
}

/* Mobile Header Styles */

@media (max-width: 768px) {

    
    #userSection {
        display: none;
    }
}

@media (min-width: 769px) {
    
    
    #userSection {
        display: block;
    }
    
    .nav-right #userSection {
        margin-right: 20px;
    }
}

/* Navigation Colors */
.nav-item[href="index.html"] {
    --hover-bg: var(--indigo-blue);
}

.nav-item[href="calendar.html"] {
    --hover-bg: var(--indigo-blue);
}

.nav-item[href="location.html"] {
    --hover-bg: var(--indigo-blue);
}

.nav-item[href="profile.html"] {
    --hover-bg: var(--indigo-blue);
}

/* Region/Language Selector Specific Styles */
.region-button {
    cursor: pointer;
}

.region-button .separator {
    margin: 0 0.25rem;
    opacity: 0.5;
}

.region-button .lang-text {
    font-weight: bold;
}

.region-button .dropdown-arrow {
    font-size: 12px;
    margin-left: 8px;
    opacity: 0.7;
    transition: transform 0.2s ease-in-out;
}

.region-button:hover .dropdown-arrow {
    opacity: 1;
}

.region-button.active .dropdown-arrow {
    transform: rotate(180deg);
}