/* Floating Navbar (Aceternity Style Adaptation) */
.navbar-floating {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    width: 95%; /* Increased width */
    max-width: 1100px; /* Increased max-width significantly */
    border-radius: 2rem;
    padding: 1rem 2rem; /* Increased padding */
    background-color: rgba(20, 20, 20, 0.9); /* Slightly darker for better contrast */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.25); /* More visible border */
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37); /* Glassmorphism shadow */
    z-index: 1030;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Estado Expandido (Mobile ou Scroll) */
.navbar-floating.scrolled {
    background-color: rgba(10, 10, 10, 0.98);
    border-color: rgba(255, 255, 255, 0.2);
    padding: 0.75rem 2rem;
    width: 98%;
    max-width: 1400px;
    top: 1rem;
}

/* Ajustes nos itens internos */
.navbar-floating .navbar-brand img {
    height: 48px; /* Increased logo size */
    filter: brightness(1.2) drop-shadow(0 0 5px rgba(255,255,255,0.2)); /* Highlight logo */
    transition: all 0.3s ease;
}

.navbar-floating .nav-link {
    font-size: 1rem; /* Slightly larger text */
    font-weight: 500;
    color: #e4e4e7 !important; /* Lighter text (Zinc-200) */
    padding: 0.6rem 1.2rem !important; /* More breathing room */
    margin: 0 0.25rem; /* Space between items */
    border-radius: 1.5rem;
    transition: all 0.2s ease;
    border: 1px solid transparent; /* Prevent layout shift on hover */
}

.navbar-floating .nav-link:hover,
.navbar-floating .nav-link.active {
    color: #fff !important;
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.1); /* Subtle border on hover */
}

/* --- New Search Bar Styling (Capsule Style) - FIXED LAYOUT --- */
.navbar-floating .input-group {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 9999px; /* Pill shape */
    padding: 0 0.75rem !important; /* Horizontal padding only */
    height: 42px !important; /* Fixed height container */
    transition: all 0.3s ease;
    overflow: hidden; /* Contain children */
}

.navbar-floating .input-group:hover,
.navbar-floating .input-group:focus-within {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.5); /* Brighter border on focus */
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1); /* Glow effect */
}

.navbar-floating .input-group-text {
    background: transparent !important;
    border: none !important;
    padding: 0 0.5rem 0 0 !important;
    margin: 0 !important;
    color: #d4d4d8 !important; /* Brighter icon */
    height: 100% !important; /* Match container height */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.navbar-floating .form-control {
    background: transparent !important;
    border: none !important;
    color: #fff !important;
    font-size: 0.95rem;
    padding: 0 !important; /* Reset padding */
    margin: 0 !important;
    height: 100% !important; /* Match container height */
    box-shadow: none !important; /* Remove focus ring */
    width: 140px !important; /* Base width */
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex !important;
    align-items: center !important;
}

.navbar-floating .form-control:focus {
    width: 240px !important; /* Expanded width on focus */
    outline: none !important;
}

.navbar-floating .form-control::placeholder {
    color: #a1a1aa; /* Zinc-400 */
    font-weight: 400;
}

/* User Dropdown Button Styling */
.navbar-floating .dropdown-toggle {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 9999px !important;
    padding: 0 1rem;
    height: 40px; /* Fixed height matching search */
    display: flex;
    align-items: center;
    color: #e4e4e7 !important;
    transition: all 0.2s ease;
}

.navbar-floating .dropdown-toggle:hover,
.navbar-floating .dropdown-toggle[aria-expanded="true"] {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3) !important;
    color: #fff !important;
}

/* Mobile Responsiveness Updates */
@media (max-width: 991px) {
    .navbar-floating {
        width: 95%;
        border-radius: 1.5rem;
        padding: 0.75rem;
    }
    
    .navbar-collapse {
        margin-top: 1rem;
        background: transparent;
        max-height: 70vh;
        overflow-y: auto;
    }

    .navbar-nav .nav-link {
        padding: 0.75rem 1rem !important;
        margin-bottom: 0.25rem;
    }
    
    .d-flex.align-items-center.gap-3 {
        flex-direction: column;
        align-items: stretch !important;
        margin-top: 1rem;
    }
    
    .navbar-floating .input-group {
        width: 100%;
        margin-bottom: 1rem;
    }

    .navbar-floating .form-control {
        width: 100% !important;
    }
}

/* Remove default bootstrap fixed-top styles from this class if applied */
.navbar-floating.fixed-top {
    position: fixed; /* Reassert */
    right: auto;
}
