/* Botó flotant - OCULT (comentat per no usar-lo) */
.floating-search-trigger {
    display: none !important; /* OCULT */
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #EC892E;
    border-radius: 50%;
    /* display: flex; */
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(236, 137, 46, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9998;
    color: white;
}

/* .floating-search-trigger:hover {
    transform: scale(1.1);
    background: #000;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6);
}

.floating-search-trigger:active {
    transform: scale(0.95);
} */

/* Modal */
.floating-search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.floating-search-modal.active {
    display: flex;
    opacity: 1;
}

/* Overlay fosc */
.floating-search-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

/* Contingut del modal */
.floating-search-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

/* Botó de tancar */
.floating-search-close {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10000;
    color: #333;
    padding: 17px;
}

.floating-search-close:hover {
    background: white;
    transform: scale(1.1);
}

/* Widget del cercador */
.floating-search-widget {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 25px;
    padding: 4rem 3rem;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Contingut del widget per assegurar que estigui per sobre de les partícules */
.floating-search-widget .floating-search-title,
.floating-search-widget .floating-search-subtitle,
.floating-search-widget .floating-search-form {
    position: relative;
    z-index: 10;
}

.floating-search-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #2c3e50;
    text-align: center;
}

.floating-search-subtitle {
    font-size: 1.1rem;
    margin-bottom: 3rem;
    color: #666;
    text-align: center;
    font-weight: 400;
}

.floating-search-form {
    width: 100%;
    display: flex;
    justify-content: center;
}

.floating-search-wrapper {
    position: relative;
    width: 100%;
    max-width: 500px;
    display: flex;
    align-items: center;
}

.floating-input-container {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.floating-input-container:focus-within {
    border-color: #EC892E;
    background: rgba(255, 255, 255, 1);
}

.floating-search-input {
    width: 100%;
    padding: 1.2rem 4rem 1.2rem 1.5rem;
    border: none;
    border-radius: 0;
    font-size: 1rem;
    background: transparent;
    color: #2c3e50;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    font-weight: 500;
}

.floating-search-input::placeholder {
    color: #999;
    font-weight: 400;
}

/* Aplicar los mismos estilos que el input principal */
.floating-input-container {
    border: 2px solid #e0e0e0 !important;
    border-radius: 8px !important;
    transition: all 0.2s !important;
}

.floating-input-container:focus-within {
    border-color: #EC892E !important;
    background: rgba(255, 255, 255, 1) !important;
}

.floating-input-container:hover {
    border-color: #EC892E !important;
}

.floating-search-input {
    border: none !important;
    outline: none !important;
}

.floating-search-input:focus {
    border: none !important;
    outline: none !important;
}

.floating-search-input:hover {
    border: none !important;
    outline: none !important;
}

.floating-search-button {
    position: absolute;
    right: 0;
    top: 0;
    width: 50px;
    height: 100%;
    border: none;
    border-radius: 0 8px 8px 0;
    background: #EC892E;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(236, 137, 46, 0.3);
    z-index: 2;
}

.floating-search-button:hover {
    background: #000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.floating-search-button:active {
    transform: scale(0.98);
}

/* Partícules decoratives */
.floating-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.floating-particle {
    position: absolute;
    background-image: url('../images/679821.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.6;
    animation: floating-float 6s ease-in-out infinite;
}

.floating-particle-1 {
    width: 45px;
    height: 45px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
    animation: floating-float 6s ease-in-out infinite, floating-rotate-15 6s ease-in-out infinite;
}

.floating-particle-2 {
    width: 30px;
    height: 30px;
    top: 60%;
    right: 15%;
    animation-delay: 2s;
    animation: floating-float 6s ease-in-out infinite, floating-rotate-25 6s ease-in-out infinite;
}

.floating-particle-3 {
    width: 70px;
    height: 70px;
    bottom: 10%;
    left: 15%;
    animation-delay: 4s;
    animation: floating-float 6s ease-in-out infinite, floating-rotate-45 6s ease-in-out infinite;
}

.floating-particle-4 {
    width: 50px;
    height: 50px;
    top: 30%;
    right: 5%;
    animation-delay: 1s;
    animation: floating-float 6s ease-in-out infinite, floating-rotate-10 6s ease-in-out infinite;
}

/* Animacions de les partícules */
@keyframes floating-float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes floating-rotate-15 {
    0%, 100% {
        transform: translateY(0px) rotate(15deg);
    }
    50% {
        transform: translateY(-20px) rotate(15deg);
    }
}

@keyframes floating-rotate-25 {
    0%, 100% {
        transform: translateY(0px) rotate(-25deg);
    }
    50% {
        transform: translateY(-20px) rotate(-25deg);
    }
}

@keyframes floating-rotate-45 {
    0%, 100% {
        transform: translateY(0px) rotate(45deg);
    }
    50% {
        transform: translateY(-20px) rotate(45deg);
    }
}

@keyframes floating-rotate-10 {
    0%, 100% {
        transform: translateY(0px) rotate(-10deg);
    }
    50% {
        transform: translateY(-20px) rotate(-10deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .floating-search-trigger {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }

    .floating-search-content {
        padding: 1rem;
    }

    .floating-search-widget {
        padding: 2.5rem 2rem;
        margin: 0;
        max-width: 100%;
    }

    .floating-search-title {
        font-size: 2rem;
    }

    .floating-search-subtitle {
        font-size: 1rem;
        margin-bottom: 2.5rem;
    }

    .floating-search-close {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        padding: 12px;
    }

    .floating-search-input {
        padding: 1rem 3.5rem 1rem 1.2rem;
        font-size: 0.95rem;
    }

    .floating-search-button {
        width: 45px;
    }
}

@media (max-width: 480px) {
    .floating-search-trigger {
        bottom: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
    }

    .floating-search-content {
        padding: 0.5rem;
    }

    .floating-search-widget {
        padding: 2rem 1.5rem;
        border-radius: 20px;
    }

    .floating-search-title {
        font-size: 1.5rem;
        margin-bottom: 0.8rem;
    }

    .floating-search-subtitle {
        font-size: 0.9rem;
        margin-bottom: 2rem;
    }

    .floating-search-close {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
        padding: 10px;
    }

    .floating-search-input {
        padding: 0.9rem 3rem 0.9rem 1rem;
        font-size: 0.9rem;
    }

    .floating-search-button {
        width: 40px;
    }

    .floating-particle {
        display: none;
    }
}

/* Desactivar scroll quan el modal estigui obert */
body.modal-open {
    overflow: hidden;
}
