/* Base Styles */
body {
    font-family: "Manrope", sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Main Header Styles */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 0 200px;
    box-sizing: border-box;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    padding: 0 20px;
    box-sizing: border-box;
}

.logo-container img {
    height: 40px;
    width: auto;
}

/* Desktop Navigation */
.header-desktop-nav {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-grow: 1;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-right: 30px;
}

.nav-item {
    position: relative;
    padding-bottom: 10px;
    color: #333333;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.nav-item:hover {
    color: #3b82f6;
}

.nav-item::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #3b82f6;
    transform: scaleX(0);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    transform-origin: center;
}

.nav-item:hover::after,
.nav-item.active::after {
    transform: scaleX(1);
}

/* Desktop Dropdown */
.dropdown-container {
    position: relative;
    display: inline-block;
}

.dropdown-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.dropdown-trigger .arrow img {
    transition: transform 0.2s ease;
}

.dropdown-container:hover .dropdown-trigger .arrow img {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 15px);
    left: 50%;
    transform: translateX(-50%) translateY(0);
    background-color: #ffffff;
    min-width: 220px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    z-index: 110;
    border: 1px solid #e0e0e0;
}

.dropdown-container:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    top: calc(100% + 8px);
}

.dropdown-item {
    display: block;
    padding: 12px 20px;
    color: #555555;
    text-decoration: none;
    font-size: 15px;
    transition: background-color 0.2s, color 0.2s;
    text-align: left;
}

.dropdown-item:hover {
    background-color: #f0f8ff;
    color: #3b82f6;
}

/* Desktop Buttons */
.button-container {
    display: flex;
    gap: 15px;
}
@media (max-width: 768px) {
    .button-container {
        display: none;
    }
}

.login-btn,
.register-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.25s ease-in-out;
    white-space: nowrap;
}

.login-btn {
    background-color: #3b82f6;
    color: white;
    border: none;
}

.register-btn {
    background-color: white;
    color: #3b82f6;
    border: 1px solid #3b82f6;
}

.login-btn:hover {
    background-color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.register-btn:hover {
    background-color: #e6f0ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.15);
}

/* Hamburger Button - Hidden on Desktop */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    cursor: pointer;
    z-index: 1001;
    position: relative;
}

.hamburger span {
    height: 3px;
    background: #333;
    border-radius: 2px;
    transition: all 0.3s ease-in-out;
}

/* Mobile Drawer - Hidden by Default */
.mobile-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85vw;
    max-width: 300px;
    height: 100vh;
    background-color: #ffffff;
    box-shadow: -6px 0 20px rgba(0, 0, 0, 0.3);
    z-index: 999;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* Overlay - Hidden by Default */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease-out, visibility 0.4s ease-out;
    pointer-events: none;
}

/* ACTIVE STATES */
.mobile-drawer.active {
    right: 0;
}

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

.hamburger.active span:nth-child(1) {
    transform: translateY(8.5px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-8.5px) rotate(-45deg);
}

/* MOBILE STYLES (Screen size <= 768px) */
@media (max-width: 768px) {
    .main-header {
        padding: 0 15px;
    }

    .header-container {
        height: 70px;
        padding: 0 15px;
    }

    .logo-container img {
        height: 35px;
    }

    .hamburger {
        display: flex;
    }

    .header-desktop-nav {
        display: none;
    }

    .mobile-drawer {
        display: flex;
        flex-direction: column;
    }

    .drawer-header {
        display: flex;
        justify-content: flex-end;
        align-items: center;
        padding: 15px 20px;
        position: sticky;
        top: 0;
        background-color: #ffffff;
        z-index: 1;
    }

    .drawer-nav-menu {
        display: flex;
        flex-direction: column;
        width: 100%;
        padding: 10px 0;
        margin-top: 70px;
        overflow-x: hidden;
    }

    .drawer-nav-menu .nav-item {
        padding: 15px 20px;
        width: 100%;
        text-align: left;
        font-size: 17px;
        color: #333;
        transition: background-color 0.2s;
        display: flex;
        justify-content: space-between;
        align-items: center;
        white-space: normal;
        word-wrap: break-word;
        box-sizing: border-box;
    }

    .drawer-nav-menu .dropdown-container {
        width: 100%;
        box-sizing: border-box;
    }

    .drawer-nav-menu .dropdown-menu {
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        box-shadow: none;
        border: none;
        border-radius: 0;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out, padding 0.3s ease-out;
        background-color: #fcfcfc;
        width: 100%;
        box-sizing: border-box;
    }

    .drawer-nav-menu .dropdown-container.active .dropdown-menu {
        max-height: 400px; /* Adjust as needed */
        padding: 10px 0;
        border-top: 1px solid #eee;
    }

    .drawer-nav-menu .dropdown-item {
        padding: 12px 30px;
        font-size: 16px;
        color: #555;
        width: 100%;
        box-sizing: border-box;
    }

    .button-container.drawer-buttons {
        display: flex;
        flex-direction: column;
        gap: 15px;
        padding: 20px;
        border-top: 1px solid #f0f0f0;
        margin-top: auto;

        box-sizing: border-box;
    }

    .drawer-buttons .login-btn,
    .drawer-buttons .register-btn {
        justify-content: center;
        font-size: 16px;
        padding: 14px 20px;
        box-sizing: border-box;
        white-space: normal;
    }

    .overlay {
        display: block;
    }

    .overlay.active {
        opacity: 1;
    }
}
