﻿/* ---------- Site Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: #ffffff !important;
    border-bottom: 1px solid #e9e9e7;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03);
}

/* ---------- Navbar ---------- */
.navbar-custom {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif !important;
    width: 100% !important;
}

.navbar-container {
    max-width: 1600px !important;
    margin: 0 auto !important;
    padding: 0 1.5rem !important;
    height: 56px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 1rem !important;
    width: 100% !important;
}

    /* ---------- Brand ---------- */
    .navbar-container .navbar-brand {
        display: flex !important;
        align-items: center !important;
        gap: 0.5rem !important;
        font-size: 1.125rem !important;
        font-weight: 700 !important;
        color: #37352f !important;
        text-decoration: none !important;
        transition: opacity 0.15s ease;
        flex-shrink: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }

        .navbar-container .navbar-brand:hover {
            opacity: 0.6;
            text-decoration: none !important;
            color: #37352f !important;
        }

    .navbar-container .brand-icon {
        font-size: 1.375rem !important;
        line-height: 1 !important;
        display: inline-block !important;
    }

    .navbar-container .brand-name {
        font-weight: 700 !important;
        letter-spacing: -0.01em;
        display: inline-block !important;
    }

    /* ---------- Main Navigation ---------- */
    .navbar-container .navbar-nav {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 0.25rem !important;
        margin: 0 0 0 2rem !important;
        padding: 0 !important;
        flex: 1 !important;
        min-width: 0 !important;
        list-style: none !important;
    }

        .navbar-container .navbar-nav .nav-link {
            padding: 0.4rem 0.75rem !important;
            font-size: 0.875rem !important;
            font-weight: 500 !important;
            color: #73726e !important;
            text-decoration: none !important;
            border-radius: 5px !important;
            transition: all 0.15s ease;
            white-space: nowrap !important;
            line-height: 1.4 !important;
            display: inline-block !important;
            margin: 0 !important;
        }

            .navbar-container .navbar-nav .nav-link:hover {
                background-color: rgba(55, 53, 47, 0.08) !important;
                color: #37352f !important;
                text-decoration: none !important;
            }

            .navbar-container .navbar-nav .nav-link:active {
                background-color: rgba(55, 53, 47, 0.12) !important;
            }

    /* ---------- Navbar Actions ---------- */
    .navbar-container .navbar-actions {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 0.5rem !important;
        flex-shrink: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }

.btn-upload {
    display: flex !important;
    align-items: center !important;
    gap: 0.375rem !important;
    padding: 0.375rem 0.875rem !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    background-color: #37352f !important;
    color: #ffffff !important;
    text-decoration: none !important;
    border-radius: 5px !important;
    transition: all 0.15s ease;
    white-space: nowrap !important;
    border: none !important;
    margin: 0 !important;
}

    .btn-upload:hover {
        background-color: rgba(55, 53, 47, 0.85) !important;
        color: #ffffff !important;
        text-decoration: none !important;
    }

.upload-icon {
    font-size: 0.875rem !important;
    line-height: 1 !important;
}

.btn-login {
    padding: 0.375rem 0.875rem !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    color: #37352f !important;
    text-decoration: none !important;
    border-radius: 5px !important;
    transition: all 0.15s ease;
    border: none !important;
    background: transparent !important;
    margin: 0 !important;
    display: inline-block !important;
}

    .btn-login:hover {
        background-color: rgba(55, 53, 47, 0.08) !important;
        color: #37352f !important;
        text-decoration: none !important;
    }

.btn-register {
    padding: 0.375rem 0.875rem !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    background-color: #37352f !important;
    color: #ffffff !important;
    text-decoration: none !important;
    border-radius: 5px !important;
    transition: all 0.15s ease;
    border: none !important;
    margin: 0 !important;
    display: inline-block !important;
}

    .btn-register:hover {
        background-color: rgba(55, 53, 47, 0.85) !important;
        color: #ffffff !important;
        text-decoration: none !important;
    }

/* ---------- User Menu ---------- */
.user-menu {
    position: relative;
}

.user-menu-trigger {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.5rem 0.25rem 0.25rem;
    background-color: transparent;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.15s ease;
}

    .user-menu-trigger:hover {
        background-color: rgba(55, 53, 47, 0.08);
    }

.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: #37352f;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-arrow {
    font-size: 0.5rem;
    color: rgba(55, 53, 47, 0.5);
    transition: transform 0.15s ease;
}

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

/* ---------- User Dropdown ---------- */
.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 280px;
    background-color: #ffffff;
    border: 1px solid rgba(55, 53, 47, 0.09);
    border-radius: 8px;
    box-shadow: rgba(15, 15, 15, 0.05) 0px 0px 0px 1px, rgba(15, 15, 15, 0.1) 0px 3px 6px, rgba(15, 15, 15, 0.2) 0px 9px 24px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
}

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

.dropdown-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
}

.dropdown-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 600;
    flex-shrink: 0;
}

.dropdown-user-info {
    flex: 1;
    min-width: 0;
}

.dropdown-user-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #37352f;
    margin-bottom: 0.125rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-user-email {
    font-size: 0.75rem;
    color: rgba(55, 53, 47, 0.65);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-divider {
    height: 1px;
    background-color: rgba(55, 53, 47, 0.09);
    margin: 0.375rem 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0.75rem;
    margin: 0 0.375rem;
    font-size: 0.875rem;
    color: #37352f;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.15s ease;
    cursor: pointer;
}

    .dropdown-item:hover {
        background-color: rgba(55, 53, 47, 0.08);
        color: #37352f;
        text-decoration: none;
    }

.dropdown-icon {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.dropdown-form {
    margin: 0;
}

.logout-item {
    width: 100%;
    border: none;
    background: none;
    text-align: left;
    font-family: inherit;
}

/* ---------- Mobile Menu ---------- */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    border-radius: 4px;
    transition: background-color 0.15s ease;
}

    .mobile-menu-toggle:hover {
        background-color: rgba(55, 53, 47, 0.08);
    }

.menu-icon {
    width: 18px;
    height: 2px;
    background-color: #37352f;
    position: relative;
    transition: all 0.3s ease;
}

    .menu-icon::before,
    .menu-icon::after {
        content: '';
        position: absolute;
        width: 18px;
        height: 2px;
        background-color: #37352f;
        transition: all 0.3s ease;
    }

    .menu-icon::before {
        top: -5px;
    }

    .menu-icon::after {
        top: 5px;
    }

.mobile-menu-toggle.active .menu-icon {
    background-color: transparent;
}

    .mobile-menu-toggle.active .menu-icon::before {
        top: 0;
        transform: rotate(45deg);
    }

    .mobile-menu-toggle.active .menu-icon::after {
        top: 0;
        transform: rotate(-45deg);
    }

.mobile-nav {
    display: none;
    flex-direction: column;
    padding: 1rem 1.5rem 1.5rem;
    border-top: 1px solid rgba(55, 53, 47, 0.09);
    background-color: #fafaf9;
}

    .mobile-nav.active {
        display: flex;
    }

.mobile-nav-link {
    padding: 0.625rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #37352f;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.15s ease;
}

    .mobile-nav-link:hover {
        background-color: rgba(55, 53, 47, 0.08);
        color: #37352f;
        text-decoration: none;
    }

.mobile-nav-divider {
    height: 1px;
    background-color: rgba(55, 53, 47, 0.09);
    margin: 0.5rem 0;
}

.mobile-user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background-color: #ffffff;
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

.mobile-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
}

.mobile-user-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #37352f;
}

.mobile-logout-form {
    margin: 0;
}

.logout-link {
    width: 100%;
    border: none;
    background: none;
    text-align: left;
    font-family: inherit;
    color: rgba(55, 53, 47, 0.65);
}

    .logout-link:hover {
        background-color: rgba(220, 38, 38, 0.08);
        color: #dc2626;
    }

/* ---------- Site Content ---------- */
.site-content {
    min-height: calc(100vh - 120px);
}

    .site-content main {
        padding: 0;
    }

    /* Override Bootstrap container */
    .site-content .container {
        max-width: 100%;
        padding: 0;
    }

/* ---------- Footer ---------- */
.site-footer {
    border-top: 1px solid rgba(55, 53, 47, 0.09);
    padding: 1.5rem 0;
    margin-top: 4rem;
    background-color: #fafaf9;
}

.footer-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-size: 0.8125rem;
    color: rgba(55, 53, 47, 0.65);
}

.footer-divider {
    color: rgba(55, 53, 47, 0.3);
}

.footer-link {
    color: rgba(55, 53, 47, 0.65);
    text-decoration: none;
    transition: color 0.15s ease;
}

    .footer-link:hover {
        color: #37352f;
    }

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
    /* Hide desktop nav on tablet/mobile */
    .navbar-container .navbar-nav {
        display: none !important;
    }

    /* Hide desktop user menu on tablet/mobile */
    .navbar-container .navbar-actions .user-menu {
        display: none !important;
    }

    /* Show mobile menu toggle */
    .mobile-menu-toggle {
        display: flex !important;
    }

    /* Adjust container for mobile */
    .navbar-container {
        height: auto !important;
        padding: 0.75rem 1rem !important;
    }

        /* Keep brand and mobile toggle in a row */
        .navbar-container .navbar-brand {
            flex: 1;
        }

        /* Hide desktop action buttons on mobile */
        .navbar-container .navbar-actions {
            display: none !important;
        }
}

@media (max-width: 768px) {
    .navbar-container {
        padding: 0.5rem 1rem !important;
    }

    /* Brand adjustments */
    .brand-icon {
        font-size: 1.25rem !important;
    }

    .brand-name {
        font-size: 1rem !important;
    }

    /* Footer adjustments */
    .footer-container {
        padding: 0 1rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 0.5rem;
        font-size: 0.75rem;
    }

    .footer-divider {
        display: none;
    }
}

@media (max-width: 480px) {
    /* Hide brand name on very small screens */
    .brand-name {
        display: none !important;
    }
}
}
