/* Carrusel horizontal continuo */
.image-carousel {
    position: relative;
    width: 100%;
    /* En lugar de 300px */
    max-width: 1200px;
    /* Descomentar */
    height: 300px;
    margin: 30px auto;
    overflow: hidden;
    border-radius: 8px;
    background: #f8f9fa;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.carousel-images-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-inner {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    transition: transform 0.5s ease-in-out;
    will-change: transform;
}

.carousel-image-container {
    flex: 0 0 auto;
    width: 250px;
    height: 250px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: white;
    border: 3px solid #f0f0f0;
}

.carousel-image-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    border-color: #ddd;
}

.carousel-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.carousel-image-container:hover img {
    transform: scale(1.05);
}

/* Overlay con información */
.image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 15px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.carousel-image-container:hover .image-overlay {
    transform: translateY(0);
}

.image-overlay h4 {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 5px 0;
    color: white;
}

.image-overlay p {
    font-size: 12px;
    margin: 0;
    opacity: 0.9;
    line-height: 1.3;
}

/* Controles de navegación */
.carousel-navigation {
    position: absolute;
    top: 10px;
    right: 15px;
    display: flex;
    gap: 5px;
    z-index: 10;
}

.carousel-nav-btn {
    width: 35px;
    height: 35px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.carousel-nav-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.carousel-nav-btn.play-pause {
    font-size: 12px;
}

/* Responsive */
@media (max-width: 1024px) {
    .carousel-image-container {
        width: 220px;
        height: 220px;
    }

    .image-carousel {
        height: 250px;
    }
}

@media (max-width: 768px) {
    .carousel-image-container {
        width: 180px;
        height: 180px;
    }

    .image-carousel {
        height: 210px;
    }

    .carousel-inner {
        gap: 10px;
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .carousel-image-container {
        width: 150px;
        height: 150px;
    }

    .image-carousel {
        height: 180px;
    }

    .carousel-inner {
        gap: 8px;
        padding: 8px;
    }
}

/* Modal para vista ampliada */
.carousel-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.carousel-modal-content {
    position: relative;
    max-width: 40%;
    max-height: 100%;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    padding: 1%;
}

.carousel-modal-content img {
    width: 100%;
    height: 512px;
    max-height: 80vh;
    object-fit: contain;
}

.carousel-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: background 0.3s ease;
}

.carousel-modal-close:hover {
    background: rgba(0, 0, 0, 0.9);
}

.carousel-modal-info {
    padding: 20px;
}

.carousel-modal-info h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 1.3em;
}

.carousel-modal-info p {
    margin: 0;
    color: #666;
    line-height: 1.6;
}