/* Glassmorphism & premium utilities */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.glass-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.glass-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 10px 15px -3px rgba(0, 0, 0, 0.03);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.02);
}

.container-premium {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Smooth Accordion Content */
.collapse-content {
    overflow: hidden;
}

.collapse-content-inner {
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.collapse-content.expanded .collapse-content-inner {
    opacity: 1;
    transform: translateY(0);
}

/* Custom SVG Icons Base */
svg.premium-icon {
    width: 24px;
    height: 24px;
    stroke-width: 1.5;
}


/* =========================
    ANIMATIONS
========================== */

@keyframes float-slow {
    0%, 100% {
        transform: translateY(0) scale(1) rotate(0deg);
    }

    50% {
        transform: translateY(-25px) scale(1.08) rotate(15deg);
    }
}

@keyframes float-reverse {
    0%, 100% {
        transform: translateY(0) scale(1) rotate(0deg);
    }

    50% {
        transform: translateY(20px) scale(0.92) rotate(-15deg);
    }
}

@keyframes shimmer-sweep {
    0% {
        transform: translateX(-150%) skewX(-25deg);
    }

    100% {
        transform: translateX(150%) skewX(-25deg);
    }
}

@keyframes pulse-soft {
    0%, 100% {
        opacity: 0.8;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.03);
    }
}

.animate-float-1 {
    animation: float-slow 12s ease-in-out infinite;
}

.animate-float-2 {
    animation: float-reverse 15s ease-in-out infinite;
}

.animate-pulse-soft {
    animation: pulse-soft 3s ease-in-out infinite;
}

/* =========================
      PRELOADER
========================== */

#preloader {
    transition: all 0.8s cubic-bezier(0.77, 0, 0.175, 1);
}

.loading-ring {
    border: 2px solid rgba(59, 130, 246, 0.1);
    border-top: 2px solid rgb(59, 130, 246);
    border-right: 2px solid rgb(59, 130, 246);
}

/* =========================
    LIGHT GLASSMORPHISM
========================== */

.glass-dark {
    background: rgba(255, 255, 255, 0.78);

    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);

    border: 1px solid rgba(203, 213, 225, 0.7);

    box-shadow:
        0 10px 30px rgba(15, 23, 42, 0.08),
        0 4px 12px rgba(15, 23, 42, 0.04);
}

/* =========================
    BUTTON SHIMMER
========================== */

.shimmer-btn::after {
    content: '';

    position: absolute;

    top: 0;
    left: 0;

    width: 100%;
    height: 100%;

    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.35) 50%,
        rgba(255, 255, 255, 0) 100%
    );

    transform: translateX(-100%) skewX(-25deg);

    transition: 0.75s;
}

.shimmer-btn:hover::after {
    animation: shimmer-sweep 1.5s ease-in-out infinite;
}

#service-search input[type="search"]::-webkit-search-cancel-button {
    appearance: none;
}

.header-search-container {
    min-width: 0;
    transition: all 0.3s ease;
}

@media (min-width: 640px) {
    .header-search-container {
        flex: 1 1 auto;
        min-width: 180px;
    }
}

.search-input-wrapper {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    /* border: 1px solid rgba(226, 232, 240, 0.9); */
    border: 1px solid rgba(226, 232, 240, 0.55);

    border-radius: 1.5rem;
    /* box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02), 0 1px 2px rgba(0, 0, 0, 0.02); */
    box-shadow:
    0 4px 12px rgba(15, 23, 42, 0.04),
    0 1px 3px rgba(15, 23, 42, 0.025);

    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.search-input-wrapper:focus-within {
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(59, 130, 246, 0.6);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12), 0 4px 12px rgba(59, 130, 246, 0.04);
}

#service-search-results {
    opacity: 0;
    transform: translateY(-2px) scale(0.995);
    transform-origin: top center;

    transition:
        opacity 90ms ease-out,
        transform 90ms cubic-bezier(0.16, 1, 0.3, 1);

    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 1rem;
    box-shadow:
        0 10px 30px -5px rgba(15, 23, 42, 0.08),
        0 4px 12px -2px rgba(15, 23, 42, 0.03);

    max-height: 380px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(203, 213, 225, 0.7) transparent;
}

#service-search-results:not(.hidden) {
    opacity: 1;
    transform: translateY(0) scale(1);
}


#service-search-results::-webkit-scrollbar {
    width: 5px;
}

#service-search-results::-webkit-scrollbar-track {
    background: transparent;
}

#service-search-results::-webkit-scrollbar-thumb {
    background: rgba(203, 213, 225, 0.7);
    border-radius: 9999px;
}

#service-search-results::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.9);
}

#service-search-results:not(.hidden) {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.service-result {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid #f8fafc;
    padding: 0.75rem 0.9rem;
    color: #1e293b;
    text-decoration: none;
    transition: background-color 140ms ease, transform 140ms ease;
    cursor: pointer;
}

.service-result:last-child {
    border-bottom: 0;
}

.service-result:hover,
.service-result:focus-visible,
.service-result.is-active {
    outline: none;
    transform: translateX(3px);
}

.service-result-lime:hover, .service-result-lime:focus-visible, .service-result-lime.is-active { background: #f7fee7; }
.service-result-blue:hover, .service-result-blue:focus-visible, .service-result-blue.is-active { background: #eff6ff; }
.service-result-orange:hover, .service-result-orange:focus-visible, .service-result-orange.is-active { background: #fff7ed; }
.service-result-violet:hover, .service-result-violet:focus-visible, .service-result-violet.is-active { background: #f5f3ff; }
.service-result-olive:hover, .service-result-olive:focus-visible, .service-result-olive.is-active { background: #fbfded; }

.service-result-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.1rem;
    height: 2.1rem;
    flex: 0 0 auto;
    border-radius: 0.65rem;
    font-size: 0.82rem;
    transition: transform 140ms ease;
}

.service-result:hover .service-result-icon,
.service-result.is-active .service-result-icon {
    transform: scale(1.05);
}

.service-result-lime .service-result-icon { background: #ecfccb; color: #65a30d; }
.service-result-blue .service-result-icon { background: #dbeafe; color: #2563eb; }
.service-result-orange .service-result-icon { background: #ffedd5; color: #ea580c; }
.service-result-violet .service-result-icon { background: #ede9fe; color: #7c3aed; }
.service-result-olive .service-result-icon { background: #f4f8d3; color: #657500; }

.service-result-copy {
    display: block;
    min-width: 0;
    flex: 1;
}

.service-result-copy strong,
.service-result-copy span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.service-result-copy strong {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e293b;
    letter-spacing: -0.01em;
}

.service-result-copy span {
    margin-top: 0.15rem;
    color: #64748b;
    font-size: 0.73rem;
}

.service-result-arrow {
    flex: 0 0 auto;
    color: #94a3b8;
    font-size: 0.7rem;
    transition: transform 140ms ease, color 140ms ease;
}

.service-result:hover .service-result-arrow,
.service-result.is-active .service-result-arrow {
    color: #475569;
    transform: translateX(2px);
}

.service-empty {
    padding: 1.25rem 1rem;
    color: #64748b;
    font-size: 0.875rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* =========================
    SEARCH DESTINATION HIGHLIGHT
========================== */

/* =========================
    SEARCH DESTINATION HIGHLIGHT (OTIMIZADO)
========================== */

@keyframes search-highlight-fade {
    0% {
        /* Início instantâneo e bem visível */
        box-shadow: 0 0 0 4px color-mix(in srgb, var(--search-highlight-color, var(--highlight-color, #3b82f6)) 50%, transparent),
                    0 8px 24px -2px color-mix(in srgb, var(--search-highlight-color, var(--highlight-color, #3b82f6)) 25%, transparent);
        background-color: color-mix(in srgb, var(--search-highlight-color, var(--highlight-color, #3b82f6)) 10%, transparent);
    }
    30% {
        /* Mantém o brilho rapidamente */
        box-shadow: 0 0 0 3px color-mix(in srgb, var(--search-highlight-color, var(--highlight-color, #3b82f6)) 40%, transparent),
                    0 6px 18px -2px color-mix(in srgb, var(--search-highlight-color, var(--highlight-color, #3b82f6)) 18%, transparent);
        background-color: color-mix(in srgb, var(--search-highlight-color, var(--highlight-color, #3b82f6)) 8%, transparent);
    }
    100% {
        /* Suaviza até desaparecer de forma fluida */
        box-shadow: 0 0 0 0 transparent, 0 0 0 0 transparent;
        background-color: transparent;
    }
}

.search-highlight,
.hash-highlight {
    position: relative;
    z-index: 10;
    border-radius: 0.875rem;
    /* Reduzido de 2s para 1.2s com curva de aceleração imediata */
    animation: search-highlight-fade 0.7s cubic-bezier(0, 0, 0.2, 1) forwards;

    /* animation: search-highlight-fade 1.2s cubic-bezier(0, 0, 0.2, 1) forwards; */
    will-change: box-shadow, background-color; /* Otimização de GPU */
}
