/* styles/header.css */

/* Header main styling */
#mainHeader {
    background: linear-gradient(to right, #ffffff, #cce7ff);
    box-shadow: none;
    padding: 10px 0;
    text-align: center;
    position: relative;
    z-index: 200;
}

/* Container inside header */
.header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    overflow: visible !important;
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    position: relative;
}

/* Logo and Title side-by-side */
.logo-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Logo (emoji or later SVG) */
.logo {
    font-size: 40px;
}

/* Main title */
#mainHeader h1 {
    margin: 0;
    font-size: 48px;
    color: rgb(0, 122, 204); /* Strong blue */
}

/* Tagline under the title */
.tagline {
    margin-top: 5px;
    font-size: 20px;
    color: #333;
}

/* Navigation menu */
#mainNav {
    position: sticky;
    top: 0;
    background: linear-gradient(
        to right,
        #ffffff,
        #cce7ff
    ); /* Same as header */
    #mainNav {
        border-top: 1px solid linear-gradient(to right, #ffffff, #cce7ff);
    }
    padding: 15px 20px;
    z-index: 100;
    transition: all 0.3s ease;
    backface-visibility: hidden;
    transform: translate3d(0, 0, 0);
    will-change: transform;
}

#mainNav::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(
        to right,
        #ffffff,
        #cce7ff
    ); /* same as nav bg */
    z-index: -1;
}

/* Navigation list */
#mainNav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
}

/* Navigation links */
#mainNav a {
    text-decoration: none;
    color: rgb(0, 122, 204);
    font-size: 18px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 12px;
    transition: background-color 0.4s ease, color 0.4s ease; /* <-- smooth transitions */
}

/* Active link smooth transition */
#mainNav a:hover,
#mainNav a.active {
    background: rgba(0, 122, 204, 0.1);
    color: rgb(0, 100, 180);
    text-decoration: none;
}

.auth-links {
    position: absolute;
    top: 15px;
    right: 25px;
    display: flex;
    gap: 10px;
    z-index: 1001;
    overflow: visible !important;
}

.auth-links a {
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    color: rgb(0, 122, 204);
    background: rgba(0, 122, 204, 0.1);
    padding: 6px 14px;
    border-radius: 20px;
    transition: background 0.3s ease, color 0.3s ease;
    box-shadow: 0 0 5px rgba(0, 122, 204, 0.1);
}

.auth-links a:hover {
    background: rgba(0, 122, 204, 0.2);
    color: rgb(0, 100, 180);
}

@keyframes fadeActive {
    from {
        opacity: 0.4;
    }
    to {
        opacity: 1;
    }
}

@media (max-width: 900px) {
    #mainHeader h1 {
        font-size: 32px;
    }

    .logo {
        font-size: 32px;
    }

    .tagline {
        font-size: 16px;
    }

    #mainHeader {
        padding-top: 50px;
    }
}

/* Responsive tweaks for smaller screens */
@media (max-width: 600px) {
    #mainHeader {
        padding: 40px 0 0 0; /* Tighter on mobile */
    }

    .header-flex {
        flex-direction: column;
        align-items: center;
    }

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

    .logo {
        display: none;
    }

    .logo-title {
        display: flex;
        align-items: center;
        gap: 10px;
        flex-shrink: 1;
    }

    #mainNav ul {
        flex-direction: row !important;
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
    }

    #mainNav {
        padding: 12px 15px 12px 15px;
    }

    .auth-links {
        top: 10px;
        right: 10px;
        gap: 6px;
    }

    .auth-links a {
        font-size: 13px;
        padding: 5px 10px;
    }
}

.user-menu {
    position: relative;
    display: inline-block;
    z-index: 9999;
}

.user-menu button {
    background: rgba(0, 122, 204, 0.1);
    color: rgb(0, 122, 204);
    font-weight: 600;
    font-size: 14px;
    padding: 6px 18px;
    min-width: 160px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease;
    box-shadow: 0 0 5px rgba(0, 122, 204, 0.1);
}

.user-menu button:hover {
    background: rgba(0, 122, 204, 0.2);
    color: rgb(0, 100, 180);
}

.user-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: none;
    backdrop-filter: blur(8px); /* blur content underneath */
    -webkit-backdrop-filter: blur(8px); /* for Safari */
    border-radius: 12px;
    padding: 6px;
    box-shadow: none; /* 🔧 no shadow */
    min-width: 160px;
    z-index: 9999;
}

.user-dropdown a {
    display: block;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    color: rgb(0, 122, 204);
    background: rgba(0, 122, 204, 0.1);
    padding: 6px 14px;
    border-radius: 20px;
    transition: background 0.3s ease, color 0.3s ease;
    box-shadow: 0 0 5px rgba(0, 122, 204, 0.1);
    margin-bottom: 4px;
}

.user-dropdown a:hover {
    background: rgba(0, 122, 204, 0.2);
    color: rgb(0, 100, 180);
}

.user-dropdown a:last-child {
    margin-bottom: 0; /* prevent extra space at the bottom */
}

/* When menu is open */
.user-menu.open .user-dropdown {
    display: block;
}
