header {
    z-index: 10;
    position: relative;
}

header .navbar .navbar-nav a {
    color: var(--text-color) !important;
}

#theme-toggle {
    background-color: var(--background-color) !important;
    color: var(--text-color) !important;
}

.navbar-toggler {
    border: none;
    outline: none;
    color: var(--text-color);
}
.navbar-toggler svg {
    fill: currentColor;
    color: var(--text-color);
}
.navbar-toggler:focus {
    box-shadow: 0 0 0 .05em;
}
.navbar-text {
    font-size: 16px !important;
    opacity: 0.95;
}
header .nav-link{
    transition: none !important;
}
.navbar-brand {
    color: var(--primary-color) !important;
    opacity: 0.95;
}
.navbar .nav-link:hover {
    color: var(--primary-color) !important;
}

li > .dropdown-toggle:focus{
    color: var(--primary-color) !important;
}

.dropdown-menu {
    overflow: hidden;
    z-index: 1000;
    background-color: var(--background-color) !important;
    border: 1px solid rgba(var(--primary-rgb), 0.1) !important;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1), 0 2px 10px rgba(var(--primary-rgb), 0.05);
    padding: 0.8rem 0;
    margin-top: 0.5rem;
    transition: all 0.3s ease;
    animation: fadeIn 0.2s ease-in-out;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

/* Animation for dropdown menu */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    color: var(--text-color) !important;
    font-weight: 500;
    padding: 0.6rem 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.dropdown-item:hover {
    background-color: rgba(var(--primary-rgb), 0.08) !important;
    color: var(--primary-color) !important;
    transform: translateX(5px);
}

.dropdown-item:focus, .dropdown-item:active {
    background-color: rgba(var(--primary-rgb), 0.1) !important;
    color: var(--primary-color) !important;
}

/* Hover effect for desktop */
@media (min-width: 992px) {
    .dropdown:hover .dropdown-menu {
        display: block;
    }
}

#search {
    border-radius: 8px !important;
    background-color: rgba(var(--primary-rgb), 0.03);
    color: var(--text-color);
    border: 2px solid #000 !important;
    padding-left: 15px;
    padding-right: 15px;
    height: 40px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.8);
    width: 250px; /* Increased width for search input */
}

.dark #search {
    border: 2px solid rgba(255, 255, 255, 0.7) !important;
    box-shadow: 3px 3px 0 rgba(255, 255, 255, 0.15);
}

#search:focus {
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.8);
    background-color: rgba(var(--primary-rgb), 0.05);
    outline: none;
}

.dark #search:focus {
    box-shadow: 5px 5px 0 rgba(255, 255, 255, 0.2);
}

#search::placeholder {
    color: var(--text-secondary-color);
    opacity: 0.7;
    font-style: italic;
}
/* New search content styling */
#search-content {
    -ms-scroll-chaining: none;
    scrollbar-width: none;
    display: none;
    z-index: 9999;
    width: 320px;
    max-height: 70vh;
    position: absolute;
    overflow: auto;
    padding: 15px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: transparent;
}

#search-content::-webkit-scrollbar {
    display: none;
}

/* Cute header with animation */
#search-content::before {
    content: "✨ Found for you ✨";
    display: block;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 12px;
    color: var(--primary-color);
    text-align: center;
    font-family: 'Playfair Display', serif;
    letter-spacing: 0.03em;
    animation: fadeInDown 0.5s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Card styling */
#search-results > .card {
    background-color: rgba(255, 255, 255, 0.5) !important;
    border: none;
    margin-bottom: 12px;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.08);
    animation: fadeIn 0.5s ease-out forwards;
    opacity: 0;
    transform: translateY(10px);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.dark #search-results > .card {
    background-color: rgba(30, 30, 30, 0.5) !important;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Apply animation delay to cards */
#search-results > .card:nth-child(1) { animation-delay: 0.1s; }
#search-results > .card:nth-child(2) { animation-delay: 0.2s; }
#search-results > .card:nth-child(3) { animation-delay: 0.3s; }
#search-results > .card:nth-child(4) { animation-delay: 0.4s; }
#search-results > .card:nth-child(5) { animation-delay: 0.5s; }

#search-results > .card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 25px rgba(var(--primary-rgb), 0.15);
}

#search-results .card a {
    display: block;
    text-decoration: none !important;
    color: var(--text-color) !important;
    padding: 15px;
    transition: all 0.3s ease;
    position: relative;
}

#search-results .card h5 {
    font-family: 'Playfair Display', serif;
    font-size: 1.05rem;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color) !important;
    transition: all 0.3s ease;
}

#search-results .card:hover h5 {
    color: var(--primary-color) !important;
}

#search-results .card .result-description {
    font-size: 0.85rem;
    color: var(--text-secondary-color) !important;
    line-height: 1.5;
    margin-top: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* No results message */
#search-results > p {
    text-align: center;
    padding: 15px;
    color: var(--text-secondary-color);
    font-style: italic;
    font-size: 0.9rem;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    margin: 10px 0;
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.08);
    animation: fadeIn 0.5s ease-out forwards;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.dark #search-results > p {
    background-color: rgba(30, 30, 30, 0.5);
}

/* Fix for custom cursor */
.cursor-dot, .cursor-dot-outline {
    z-index: 100001 !important;
    pointer-events: none !important;
}

/* Ensure proper cursor interaction with search elements */
#search-content {
    cursor: default !important;
}

#search-results .card a {
    cursor: pointer !important;
}

/* Make sure the search input shows the text cursor */
#search {
    cursor: text !important;
}

/* Mobile search styling */
.mobile-search-container {
    margin-bottom: 20px;
    position: relative;
}

.mobile-search-input {
    width: 100% !important;
    border: 2px solid #000 !important;
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.8) !important;
    transition: all 0.2s ease !important;
    font-size: 1rem !important;
    height: 45px !important;
    padding: 10px 15px !important;
    border-radius: 8px !important;
}

.dark .mobile-search-input {
    border: 2px solid rgba(255, 255, 255, 0.7) !important;
    box-shadow: 3px 3px 0 rgba(255, 255, 255, 0.15) !important;
}

.mobile-search-input:focus {
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.8) !important;
}

.dark .mobile-search-input:focus {
    box-shadow: 5px 5px 0 rgba(255, 255, 255, 0.2) !important;
}

/* Additional animations for search results */
@keyframes popIn {
    0% {
        opacity: 0;
        transform: translateX(-50%) scale(0.9);
    }
    50% {
        opacity: 1;
        transform: translateX(-50%) scale(1.03);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) scale(1);
    }
}

@keyframes slideDown {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Cute pill-shaped category labels */
.section-label {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 6px;
    float: right;
    margin-bottom: 10px;
    border: 1.5px solid #000;
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.7);
    transition: all 0.2s ease;
}

.dark .section-label {
    border: 1.5px solid rgba(255, 255, 255, 0.7);
    box-shadow: 2px 2px 0 rgba(255, 255, 255, 0.15);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-5px);}
    60% {transform: translateY(-2px);}
}

/* Different section types with cute feminine colors */
.blog-result {
    position: relative;
    border-top: 3px solid #FF9A8B !important; /* Soft pink */
}

.blog-result .section-label {
    background: linear-gradient(135deg, #FF9A8B, #FF7E6B);
    color: white;
}

.page-result {
    position: relative;
    border-top: 3px solid #A0DAA9 !important; /* Soft green */
}

.page-result .section-label {
    background: linear-gradient(135deg, #A0DAA9, #7BC288);
    color: white;
}

.project-result {
    position: relative;
    border-top: 3px solid #9DCEFF !important; /* Soft blue */
}

.project-result .section-label {
    background: linear-gradient(135deg, #9DCEFF, #6BAFF2);
    color: white;
}

/* Add a cute heart decoration to the cards */
.blog-result::after {
    content: "♥";
    position: absolute;
    bottom: 10px;
    right: 15px;
    font-size: 1.2rem;
    color: rgba(255, 154, 139, 0.3);
}

.page-result::after {
    content: "♦";
    position: absolute;
    bottom: 10px;
    right: 15px;
    font-size: 1.2rem;
    color: rgba(160, 218, 169, 0.3);
}

.project-result::after {
    content: "★";
    position: absolute;
    bottom: 10px;
    right: 15px;
    font-size: 1.2rem;
    color: rgba(157, 206, 255, 0.3);
}
