/* assets/css/public-header.css */

/* ============================================
   NAVBAR BASE
   ============================================ */
.sg-navbar {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1030;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}

.sg-navbar.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid var(--sg-gray-100);
}

.sg-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0.8rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ============================================
   BRAND / LOGO
   ============================================ */
.sg-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--sg-black);
}

.sg-brand-icon {
    width: 42px;
    height: 42px;
    /* 🔥 FIX: Dark background ensures white parts of the logo are visible */
    background-color: var(--sg-black); /* You can change this to var(--sg-orange) if preferred */
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    overflow: hidden;
    padding: 6px; /* Breathing room for the logo */
}

.sg-brand:hover .sg-brand-icon {
    transform: rotate(5deg) scale(1.05);
}

.sg-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.sg-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.sg-brand-name {
    font-family: var(--sg-font-display);
    font-weight: 800;
    font-size: 1.35rem;
    letter-spacing: -0.5px;
}

.sg-brand-tagline {
    font-size: 0.7rem;
    color: var(--sg-text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================
   NAVIGATION LINKS
   ============================================ */
.sg-nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
}

.sg-nav-link {
    text-decoration: none;
    color: var(--sg-gray-700);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    padding: 0.5rem 0;
    transition: color 0.2s ease;
}

.sg-nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--sg-orange);
    transition: width 0.3s ease;
}

.sg-nav-link:hover, .sg-nav-link.active {
    color: var(--sg-black);
}

.sg-nav-link:hover::after, .sg-nav-link.active::after {
    width: 100%;
}

/* ============================================
   ACTIONS & AUTH BUTTONS
   ============================================ */
.sg-nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sg-btn-ghost {
    background: transparent;
    border: 1px solid var(--sg-border);
    color: var(--sg-gray-700);
    font-weight: 500;
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    transition: all 0.2s ease;
}

.sg-btn-ghost:hover {
    background: var(--sg-gray-100);
    color: var(--sg-black);
    border-color: var(--sg-gray-300);
}

.sg-btn-primary {
    background: var(--sg-orange); /* Theme color */
    color: white;
    border: none;
    font-weight: 600;
    padding: 0.55rem 1.5rem;
    border-radius: 50px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(247, 148, 30, 0.3);
}

.sg-btn-primary:hover {
    background: var(--sg-orange-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(247, 148, 30, 0.4);
    color: white;
}

/* ============================================
   PROFILE DROPDOWN
   ============================================ */
.sg-profile-dropdown {
    position: relative;
}

.sg-profile-trigger {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--sg-off);
    border: 1px solid var(--sg-border);
    padding: 0.4rem 1rem 0.4rem 0.4rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sg-profile-trigger:hover {
    background: var(--sg-gray-100);
    border-color: var(--sg-orange);
}

.sg-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--sg-black); /* Dark avatar for contrast */
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

.sg-user-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--sg-black);
}

.sg-dropdown-arrow {
    font-size: 0.75rem;
    color: var(--sg-text-muted);
    transition: transform 0.3s ease;
}

.sg-profile-dropdown.open .sg-dropdown-arrow {
    transform: rotate(180deg);
}

.sg-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 260px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--sg-gray-100);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1050;
    overflow: hidden;
}

.sg-profile-dropdown.open .sg-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sg-dropdown-header {
    padding: 1rem;
    background: var(--sg-off);
    border-bottom: 1px solid var(--sg-gray-100);
}

.sg-dropdown-header strong {
    display: block;
    font-size: 0.95rem;
    color: var(--sg-black);
}

.sg-dropdown-header small {
    color: var(--sg-text-muted);
    font-size: 0.8rem;
}

.sg-dropdown-divider {
    margin: 0;
    border-color: var(--sg-gray-100);
}

.sg-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--sg-gray-700);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.sg-dropdown-item:hover {
    background: var(--sg-orange-tint);
    color: var(--sg-orange-dark);
}

.sg-dropdown-item i {
    font-size: 1.1rem;
    width: 20px;
}

.sg-text-danger { color: #dc3545 !important; }
.sg-dropdown-item.sg-text-danger:hover { background: #fff5f5; color: #dc3545; }

/* ============================================
   MOBILE MENU
   ============================================ */
.sg-mobile-toggle {
    display: none;
    background: transparent;
    border: none;
    width: 40px;
    height: 40px;
    position: relative;
    cursor: pointer;
}

.sg-hamburger, .sg-hamburger::before, .sg-hamburger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: var(--sg-black);
    transition: all 0.3s ease;
    left: 8px;
}

.sg-hamburger { top: 19px; }
.sg-hamburger::before { top: -7px; }
.sg-hamburger::after { top: 7px; }

.sg-mobile-toggle.active .sg-hamburger { background: transparent; }
.sg-mobile-toggle.active .sg-hamburger::before { top: 0; transform: rotate(45deg); }
.sg-mobile-toggle.active .sg-hamburger::after { top: 0; transform: rotate(-45deg); }

.sg-mobile-menu {
    position: fixed;
    top: 70px; 
    left: 0;
    width: 100%;
    height: calc(100vh - 70px);
    background: white;
    padding: 2rem;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1020;
    overflow-y: auto;
}

.sg-mobile-menu.open {
    transform: translateX(0);
}

.sg-mobile-nav-links {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
}

.sg-mobile-nav-links li a {
    display: block;
    padding: 1rem 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--sg-black);
    text-decoration: none;
    border-bottom: 1px solid var(--sg-gray-100);
}

/* ============================================
   AUTH MODAL STYLES
   ============================================ */
.sg-auth-modal-content {
    border-radius: 20px;
    overflow: hidden;
}

.sg-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
    background: rgba(0,0,0,0.05);
    border-radius: 50%;
    padding: 0.5rem;
    opacity: 0.8;
}

.sg-modal-close:hover {
    background: rgba(0,0,0,0.1);
    opacity: 1;
}

.sg-auth-hero {
    background: linear-gradient(135deg, #1a1a1a 0%, #000000 100%);
    color: white;
    padding: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.sg-auth-hero::before {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    background: var(--sg-orange);
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    top: -50px;
    right: -50px;
}

.sg-auth-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

/* 🔥 Hero Logo Styling */
.sg-hero-logo {
    width: 80px;
    margin-bottom: 1.5rem;
    /* If your logo2.svg is white, it will show perfectly on this dark background */
}

.sg-auth-hero h2 {
    font-family: var(--sg-font-display);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.sg-auth-hero p {
    color: rgba(255,255,255,0.7);
    font-size: 0.95rem;
}

.sg-auth-forms {
    padding: 2.5rem;
}

.sg-auth-tabs {
    border-bottom: 2px solid var(--sg-gray-100);
    margin-bottom: 2rem;
}

.sg-auth-tabs .nav-link {
    border: none;
    color: var(--sg-text-muted);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    position: relative;
}

.sg-auth-tabs .nav-link.active {
    color: var(--sg-black);
    background: transparent;
}

.sg-auth-tabs .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--sg-orange);
}

.sg-auth-title {
    font-family: var(--sg-font-display);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.sg-auth-subtitle {
    color: var(--sg-text-muted);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.sg-text-orange { color: var(--sg-orange) !important; }

/* Input styling overrides for modal */
.sg-auth-forms .form-control {
    padding: 0.75rem 1rem;
    border-radius: 10px;
    border: 1px solid var(--sg-gray-200);
}

.sg-auth-forms .form-control:focus {
    border-color: var(--sg-orange);
    box-shadow: 0 0 0 3px rgba(247, 148, 30, 0.15);
}

.sg-auth-forms .input-group-text {
    background: var(--sg-off);
    border: 1px solid var(--sg-gray-200);
    border-right: none;
    color: var(--sg-text-muted);
}

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */
@media (max-width: 991px) {
    .sg-nav-links { display: none; }
    .sg-mobile-toggle { display: block; }
    
    .sg-auth-guest, .sg-auth-user { display: none !important; } 
    .sg-mobile-auth { display: block; }
}

@media (min-width: 992px) {
    .sg-mobile-auth { display: none; }
}

@media (max-width: 576px) {
    .sg-brand-tagline { display: none; }
    .sg-auth-forms { padding: 1.5rem; }
}