/* General Styles for the Header */
.main-header {
    width: 100%;
    background-color: black;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    box-sizing: border-box;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 999; /* Keeps it above other elements */
}


/* Header Left Section (Logo + Home Button Inline) */
.header-left {
    display: flex;
    align-items: center middle;
    gap: 20px; /* Space between logo and Home button */
}

/* Logo Section */
.main-header .logo img {
    height: 50px;
    width: auto;
    max-width: 100%;
}

/* Home Button (Inline with Logo) */
.home-button button {
    height:40px;
    width:80px;
    margin-top:6px;
    padding: 0px 15px;
    background-color: #28a745; /* Green Home Button */
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

.home-button button:hover {
    background-color: #218838;
}

/* Header Title Section */
.main-header .header-content {
    flex-grow: 1;
    text-align: center;
    margin: 0;
}

.main-header .header-content h1 {
    margin: 0;
    font-size: 1.5rem;
    color: #fff;
}

/* User Actions (Login/Register/Logout Buttons) */
.user-actions {
    display: flex;
    gap: 10px;
}

/* General Button Styling */
.user-actions button {
    padding: 8px 15px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

/* Button Hover Effects */
.user-actions button:hover {
    background-color: #1abc9c;
    transform: scale(1.05);
}

/* Register Button Specific Styles */
.user-actions button:nth-child(2) {
    background-color: #ff5733;
    animation: pulse 2s infinite;
}

/* Pulse Animation */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 87, 51, 0.5);
    }
    70% {
        box-shadow: 0 0 20px 20px rgba(255, 87, 51, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 87, 51, 0);
    }
}

/* Stop animation on hover */
.user-actions button:nth-child(2):hover {
    background-color: #e74c3c;
    animation: none;
}

/* ✅ Responsive Design */
@media (max-width: 768px) {
    .main-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 15px;
    }

    .header-left {
        flex-direction: row; /* Keep logo and Home button inline */
        justify-content: center;
        width: 100%;
    }

    .home-button {
        margin-left: 10px;
    }

    .main-header .header-content {
        margin: 10px 0;
    }

    .user-actions {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        margin-top: 10px;
    }
}
