/* ========= HEADER STYLES ========= */

.top-header {
    background: #1a1a1a;
    color: white;
    border-bottom: 3px solid #c41e3a;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    gap: 20px;
}

.site-logo {
    font-size: 22px;
    font-weight: bold;
    color: #c41e3a;
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    text-decoration: none;
}

.site-logo.logo-image {
    background: none;
    color: transparent;
    font-size: 0;
}

.logo-img {
    height: 50px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
}

/* ========= MENU ========= */
.menu {
    margin-left: auto;
    display: flex;
}

.menu ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0;
}

.menu a {
    padding: 12px 18px;
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 15px;
    transition: 0.3s;
    white-space: nowrap;
    display: block;
}

.menu a:hover {
    color: #c41e3a;
}

/* ========= USER MENU ========= */
.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.create-news-btn {
    background: #c41e3a;
    color: white;
    padding: 8px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s;
    white-space: nowrap;
}

.create-news-btn:hover {
    background: #a01730;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    cursor: pointer;
}

.user-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #c41e3a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

/* ========= HAMBURGER BUTTON ========= */
.hamburger {
    display: none;
    font-size: 30px;
    color: white;
    cursor: pointer;
    padding: 5px 10px;
}

/* ========= PROFILE DROPDOWN ========= */
.user-profile-container {
    position: relative;
}

.profile-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 8px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    overflow: hidden;
}

.profile-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.2s;
}

.dropdown-item:hover {
    background-color: #dc3545;
}

.dropdown-item i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.dropdown-item.logout {
    color: #dc3545;
}

.dropdown-item.logout:hover {
    background-color: #fee;
}

.dropdown-divider {
    height: 1px;
    background-color: #e0e0e0;
    margin: 8px 0;
}

/* ========= Responsive Design ========= */

/* Tablets and Medium Screens */
@media (max-width: 900px) {
    .header-container {
        padding: 12px 15px;
        gap: 10px;
    }

    .site-logo {
        font-size: 18px;
        flex-shrink: 0;
        order: 1;
    }

    .logo-img {
        height: 45px;
    }

    .menu {
        position: absolute;
        top: 55px;
        left: 0;
        width: 100%;
        background: #1a1a1a;
        padding: 0;
        display: none;
        flex-direction: column;
        border-top: 1px solid #333;
        margin: 0;
    }

    .menu.open {
        display: flex;
    }

    .menu ul {
        flex-direction: column;
        width: 100%;
    }

    .menu li {
        width: 100%;
    }

    .menu a {
        width: 100%;
        text-align: center;
        padding: 15px 0;
        border-bottom: 1px solid #333;
        font-size: 14px;
    }

    .user-menu {
        margin-left: auto;
        display: flex;
        align-items: center;
        gap: 10px;
        flex-shrink: 0;
        order: 2;
    }

    .create-news-btn {
        padding: 6px 12px;
        font-size: 13px;
    }

    .user-profile span {
        display: none;
    }

    .hamburger {
        display: block;
        flex-shrink: 0;
        order: 3;
    }

    .user-profile-container {
        position: relative;
    }

    .profile-dropdown {
        position: absolute;
        top: 100%;
        left: auto;
        right: 0;
        margin-top: 8px;
    }
}

/* Small Tablets */
@media (max-width: 768px) {
    .top-header {
        position: sticky;
        top: 0;
        z-index: 100;
    }

    .header-container {
        padding: 10px 12px;
        gap: 8px;
    }

    .site-logo {
        font-size: 16px;
    }

    .logo-img {
        height: 40px;
    }

    .hamburger {
        font-size: 24px;
        padding: 5px 8px;
    }

    .menu a {
        padding: 12px 0;
        font-size: 13px;
    }

    .user-menu {
        gap: 8px;
    }

    .create-news-btn {
        padding: 5px 10px;
        font-size: 12px;
    }

    .user-avatar {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .user-profile-container {
        position: relative;
    }

    .profile-dropdown {
        position: absolute;
        top: 100%;
        left: auto;
        right: 0;
        min-width: 180px;
        margin-top: 5px;
    }

    .dropdown-item {
        padding: 10px 12px;
        font-size: 14px;
        gap: 8px;
    }

    .dropdown-item i {
        font-size: 14px;
    }
}

/* Mobile Phones */
@media (max-width: 480px) {
    .header-container {
        padding: 8px 10px;
        gap: 6px;
    }

    .site-logo {
        font-size: 14px;
        order: 1;
    }

    .logo-img {
        height: 35px;
    }

    .hamburger {
        font-size: 20px;
        padding: 4px 6px;
        order: 3;
    }

    .user-menu {
        gap: 5px;
        order: 2;
        margin-left: auto;
    }

    .create-news-btn {
        padding: 4px 8px;
        font-size: 11px;
    }

    .user-avatar {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }

    .menu {
        top: 48px;
    }

    .menu a {
        padding: 12px 10px;
        font-size: 13px;
    }

    .user-profile-container {
        position: relative;
        z-index: 1001;
    }

    .profile-dropdown {
        min-width: 150px;
        position: absolute;
        right: auto;
        left: -80px;
        top: 100%;
        bottom: auto;
        margin-top: 5px;
    }

    .profile-dropdown.show {
        opacity: 1;
        visibility: visible;
    }
}
