/* Agregar solo estas mejoras visuales al CSS existente */

.carousel-nav button {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.carousel-nav button:not(:disabled):hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(63, 98, 91, 0.3);
}

.carousel-nav button:not(:disabled):active {
    transform: scale(0.95);
}

/* Efecto de desplazamiento suave en el carrusel */
.cards-carousel {
    scroll-behavior: smooth;
}

.carousel-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

.cards-carousel {
    width: 100%;
    max-width: 1200px;
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 15px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
    transition: none;
}

.cards-carousel.show-transition {
    transition: all 0.5s ease;
}

.cards-carousel::-webkit-scrollbar {
    display: none;
}

.card-rec {
    background: white;
    padding: 22px;
    width: 300px;
    min-height: 260px;
    border-radius: 12px;
    /* box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); */
    position: relative;
    transition: all 0.3s ease;
    border: 1px solid #eaeaea;
    scroll-snap-align: start;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
}

.card-rec:hover {
    transform: translateY(-5px);
    /* box-shadow: 0 8px 20px rgba(63, 98, 91, 0.25); */
    border-color: #3f625b;
}

.card-rec.recommended {
    border: 1px solid #3f625b;
}

.card-rec.recommended .card-rec-badge {
    display: block;
}

.card-rec-badge {
    background: #3f625b;
    color: white;
    padding: 5px 12px;
    font-size: 12px;
    border-radius: 15px;
    position: absolute;
    top: -10px;
    left: 15px;
    font-weight: 600;
    letter-spacing: 0.5px;
    /* box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15); */
    display: none;
}

.card-rec-tit {
    margin: 12px 0 15px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: #222;
    font-size: 1.2rem;
    line-height: 1.3;
}

.card-rec-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: space-evenly;
}

.card-rec-info p {
    margin: 0;
    font-size: 14px;
    color: #555;
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
}

.card-rec-info p:nth-child(2) {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.card-rec-ico {
    margin-right: 10px;
    color: #3f625b;
    width: 16px;
    text-align: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.card-rec-btns {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
}

.card-rec-btn-ubic,
.card-rec-btn-msg {
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    flex: 1;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 42px;
}

.card-rec-btn-ubic {
    background-color: #3f625b;
    color: white;
    /* box-shadow: 0 2px 4px rgba(63, 98, 91, 0.2); */
    text-decoration: none;
}

.card-rec-btn-msg {
    background-color: #f5f5f5;
    color: #3f625b;
    border: 1px solid #ddd;
    text-decoration: none;
}

.none {
    display: none !important;
}

.card-rec {
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.card-rec.show {
    opacity: 1;
}

.loading-screen {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 12px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3f625b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-screen p {
    color: #3f625b;
    font-weight: 600;
    margin-top: 15px;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    width: 100%;
    background: white;
    border-radius: 12px;
    /* box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); */
}

.empty-state i {
    font-size: 50px;
    color: #3f625b;
    margin-bottom: 20px;
}

.empty-state h3 {
    color: #3f625b;
    margin-bottom: 10px;
}

.empty-state p {
    color: #666;
    margin-bottom: 20px;
}

#retry-button {
    background-color: #3f625b;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

#retry-button:hover {
    background-color: #4a736b;
    transform: translateY(-2px);
}

.card-rec {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.cards-carousel {
    font-family: inherit;
    color: inherit;
}

.loading-screen {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3f625b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.empty-state {
    display: none;
    text-align: center;
    padding: 20px;
}

.none {
    display: none;
}

@media (hover: hover) {
    .card-rec-btn-ubic:hover {
        background-color: #4a736b;
        transform: translateY(-2px);
        /* box-shadow: 0 4px 8px rgba(63, 98, 91, 0.3); */
    }

    .card-rec-btn-msg:hover {
        background-color: #eaeaea;
        transform: translateY(-2px);
        /* box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1); */
    }
}

.carousel-nav {
    display: flex;
    justify-content: center;
    margin-top: 25px;
    gap: 15px;
}

.carousel-nav button {
    background: #3f625b;
    color: white;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 16px;
}

.carousel-nav button:hover {
    background: #4a736b;
    transform: scale(1.05);
}

.carousel-nav button:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
}

#custom-loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(63, 98, 91, 0.2);
    border-top: 4px solid #3f625b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

#loading-screen {
    position: relative;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    display: none;
    height: 400px;
}

#loading-screen p {
    text-align: center;
}

#empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: 12px;
    /* box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); */
    max-width: 500px;
    margin: 0 auto;
}

#empty-state i {
    font-size: 60px;
    color: #3f625b;
    margin-bottom: 25px;
}

#empty-state h3 {
    font-size: 24px;
    color: #3f625b;
    margin-bottom: 15px;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
}

#empty-state p {
    font-size: 16px;
    color: #666;
    margin-bottom: 30px;
    line-height: 1.5;
    max-width: 400px;
}

#retry-button {
    background-color: #3f625b;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#retry-button:hover {
    background-color: #4a736b;
    transform: translateY(-2px);
    /* box-shadow: 0 4px 8px rgba(63, 98, 91, 0.3); */
}

@media (max-width: 768px) {
    .carousel-container {
        padding: 15px;
    }

    .card-rec {
        width: 280px;
        min-height: 340px;
        padding: 20px;
    }

    .card-rec-tit {
        font-size: 1.15rem;
    }

    .card-rec-info p {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .card-rec {
        width: 260px;
        min-height: 320px;
        padding: 18px;
    }

    .card-rec-tit {
        font-size: 1.1rem;
    }

    .card-rec-btns {
        flex-direction: column;
        gap: 8px;
    }

    .card-rec-btn-ubic,
    .card-rec-btn-msg {
        width: 100%;
    }
}



.carousel-nav button {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.carousel-nav button:not(:disabled):hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(63, 98, 91, 0.3);
}

.carousel-nav button:not(:disabled):active {
    transform: scale(0.95);
}

.cards-carousel {
    scroll-behavior: smooth;
}


.card-rec.selected {
    border: 2px solid #3f625b;
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(63, 98, 91, 0.3);
}

.card-rec.selected .card-rec-badge {
    display: block;
}


.card-rec.selected {
    border: 2px solid #3f625b;
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(63, 98, 91, 0.3);
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.card-rec.selected .card-rec-badge {
    display: block;
    background: #3f625b;
}

.card-rec {
    transition: all 0.3s ease;
}

.card-rec:not(.selected) {
    border: 1px solid #eaeaea;
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.card-rec-badge {
    display: none !important;
}