/* =================================================================
   HEADER STYLES - Free Online CV Maker
   ================================================================= */

/* -----------------------------------------------------
   TOP BAR - Social Media & Contact
----------------------------------------------------- */
.top-bar {
    background: var(--brand-blue);
    padding: 8px 0;
    font-size: 0.85rem;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-contact {
    display: flex;
    align-items: center;
    gap: 20px;
}

.top-bar-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.3s ease;
}

.top-bar-link:hover {
    color: var(--brand-green);
}

.top-bar-link.whatsapp:hover {
    color: #25D366;
}

.top-bar-link i {
    font-size: 0.9rem;
}

.top-bar-social {
    display: flex;
    align-items: center;
    gap: 12px;
}

.social-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.8rem;
}

.social-icon:hover {
    background: var(--brand-green);
    color: white;
    transform: translateY(-2px);
}

/* -----------------------------------------------------
   MAIN HEADER
----------------------------------------------------- */
.main-header {
    background: var(--white);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

/* -----------------------------------------------------
   LOGO
----------------------------------------------------- */
.logo a {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo-img {
    height: 45px;
    width: auto;
    object-fit: contain;
}

/* -----------------------------------------------------
   DESKTOP NAVIGATION
----------------------------------------------------- */
.desktop-nav {
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 5px;
}

.nav-link {
    display: block;
    padding: 10px 18px;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--brand-blue);
    background: var(--light-gray);
}

.nav-link.active {
    color: var(--brand-blue);
    background: rgba(31, 58, 95, 0.08);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: var(--brand-green);
    border-radius: 3px;
}

/* -----------------------------------------------------
   HEADER ACTIONS
----------------------------------------------------- */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-login {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: transparent;
    border: 2px solid var(--brand-blue);
    color: var(--brand-blue);
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-login:hover {
    background: var(--brand-blue);
    color: white;
}

.btn-create-cv {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--brand-green);
    border: 2px solid var(--brand-green);
    color: white;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-create-cv:hover {
    background: var(--brand-green-hover);
    border-color: var(--brand-green-hover);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

/* -----------------------------------------------------
   USER DROPDOWN
----------------------------------------------------- */
.user-dropdown {
    position: relative;
}

.user-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--light-gray);
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-dark);
    transition: all 0.3s ease;
}

.user-dropdown-btn:hover {
    background: rgba(31, 58, 95, 0.1);
}

.user-dropdown-btn i.fa-user-circle {
    font-size: 1.4rem;
    color: var(--brand-blue);
}

.user-dropdown-btn .dropdown-arrow {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

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

.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    min-width: 260px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1001;
    overflow: hidden;
}

.user-dropdown.active .user-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--light-gray);
}

.dropdown-header i {
    font-size: 2.2rem;
    color: var(--brand-blue);
}

.dropdown-header div {
    display: flex;
    flex-direction: column;
}

.dropdown-header strong {
    font-size: 0.95rem;
    color: var(--text-dark);
}

.dropdown-header small {
    font-size: 0.8rem;
    color: #666;
}

.dropdown-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 5px 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: var(--light-gray);
    color: var(--brand-blue);
}

.dropdown-item i {
    width: 18px;
    text-align: center;
    color: var(--brand-blue);
}

.dropdown-item.logout {
    color: #dc3545;
}

.dropdown-item.logout i {
    color: #dc3545;
}

.dropdown-item.logout:hover {
    background: #fff5f5;
}

/* -----------------------------------------------------
   HAMBURGER BUTTON
----------------------------------------------------- */
.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    gap: 5px;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.hamburger-btn:hover {
    background: var(--light-gray);
}

.hamburger-line {
    width: 24px;
    height: 3px;
    background: var(--brand-blue);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.hamburger-btn.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

.hamburger-btn.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* -----------------------------------------------------
   MOBILE MENU OVERLAY
----------------------------------------------------- */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1998;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* -----------------------------------------------------
   MOBILE SLIDE MENU
----------------------------------------------------- */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -320px;
    width: 320px;
    max-width: 85%;
    height: 100%;
    background: white;
    z-index: 1999;
    transition: right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.2);
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: var(--brand-blue);
}

.mobile-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.mobile-logo-img {
    height: 38px;
    width: auto;
    object-fit: contain;
    /* Make logo white on blue mobile menu header (CSS-only) */
    filter: brightness(0) invert(1);
}

/* Make the mobile Login/Sign Up button smaller/narrower */
.mobile-nav .mobile-nav-link.mobile-login-btn {
    width: fit-content !important;
    max-width: 220px;
    margin: 12px auto 0;
    padding: 10px 14px;
    border-radius: 12px;
}

.mobile-menu-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-menu-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* Mobile User Info */
.mobile-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    background: var(--light-gray);
    border-bottom: 1px solid #e0e0e0;
}

.mobile-user-info i {
    font-size: 2rem;
    color: var(--brand-blue);
}

.mobile-user-info div {
    display: flex;
    flex-direction: column;
}

.mobile-user-info strong {
    font-size: 0.95rem;
    color: var(--text-dark);
}

.mobile-user-info small {
    font-size: 0.8rem;
    color: #666;
}

/* Mobile Navigation */
.mobile-nav {
    flex: 1;
    padding: 15px 0;
    overflow-y: auto;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px 20px;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

/* Make the mobile Login/Sign Up button a bit smaller/narrower */
.mobile-nav-link.mobile-login-btn {
    width: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 8px 20px;
    padding: 10px 14px;
    border-radius: 10px;
    background: var(--light-gray);
}

.mobile-nav-link:hover {
    background: var(--light-gray);
    color: var(--brand-blue);
}

.mobile-nav-link.active {
    background: rgba(31, 58, 95, 0.08);
    color: var(--brand-blue);
    border-left: 4px solid var(--brand-green);
}

.mobile-nav-link i {
    width: 22px;
    text-align: center;
    font-size: 1.1rem;
    color: var(--brand-blue);
}

.mobile-nav-link.logout {
    color: #dc3545;
}

.mobile-nav-link.logout i {
    color: #dc3545;
}

.mobile-nav-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 10px 20px;
}

.mobile-login-btn {
    background: var(--brand-green) !important;
    color: white !important;
    margin: 10px 20px;
    border-radius: 8px;
    justify-content: center;
}

.mobile-login-btn:hover {
    background: var(--brand-green-hover) !important;
}

.mobile-login-btn i {
    color: white !important;
}

/* Mobile Menu Footer */
.mobile-menu-footer {
    padding: 20px;
    background: var(--light-gray);
    border-top: 1px solid #e0e0e0;
}

.mobile-contact {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.mobile-contact a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 0.85rem;
}

.mobile-contact a:hover {
    color: var(--brand-blue);
}

.mobile-contact i {
    width: 18px;
    text-align: center;
    color: var(--brand-blue);
}

.mobile-social {
    display: flex;
    gap: 10px;
}

.mobile-social a {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-blue);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
}

.mobile-social a:hover {
    background: var(--brand-green);
    transform: translateY(-2px);
}

/* -----------------------------------------------------
   RESPONSIVE STYLES
----------------------------------------------------- */

/* Tablet */
@media (max-width: 992px) {
    .desktop-nav {
        display: none;
    }

    .hamburger-btn {
        display: flex;
    }

    .btn-login span,
    .btn-create-cv span {
        display: none;
    }

    .btn-login,
    .btn-create-cv {
        padding: 10px 14px;
    }

    .user-dropdown-btn .user-name {
        display: none;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .top-bar-contact span {
        display: none;
    }

    .top-bar-link {
        font-size: 1rem;
    }

    .top-bar-contact {
        gap: 15px;
    }

    .header-wrapper {
        padding: 12px 0;
    }

    .logo .logo-free {
        font-size: 0.75rem;
    }

    .logo .logo-cv {
        font-size: 1.3rem;
    }
}

/* Small Mobile */
@media (max-width: 576px) {
    .top-bar {
        padding: 6px 0;
    }

    .social-icon {
        width: 26px;
        height: 26px;
        font-size: 0.75rem;
    }

    .top-bar-social {
        gap: 8px;
    }

    .btn-login {
        display: none;
    }

    .btn-create-cv {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    .header-actions {
        gap: 8px;
    }

    .mobile-menu {
        width: 280px;
    }
}

/* Body scroll lock when menu is open */
body.menu-open {
    overflow: hidden;
}
