/* ===== Gallery Section Component ===== */
.gallery-section {
    padding: 5rem 0;
    background: var(--bg-white);
}

.gallery-section .section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.gallery-section .section-subtitle {
    text-align: center;
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 3rem;
    font-style: italic;
}

.gallery-wrapper {
    position: relative;
    margin-bottom: 3rem;
}

/* Grid para Desktop */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

/* Carrusel para Móvil - Oculto en desktop */
.gallery-carousel {
    display: none;
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

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

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-slide.active {
    opacity: 1;
    z-index: 1;
}

.carousel-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    aspect-ratio: 4 / 3;
    cursor: pointer;
}

.gallery-item:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-image {
    transform: scale(1.1);
}

.gallery-item .image-placeholder {
    width: 100%;
    height: 100%;
    background: var(--bg-light);
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 1.1rem;
}

.gallery-cta {
    text-align: center;
    margin-top: 2rem;
}

.gallery-cta .cta-btn {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 1rem 2.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: var(--transition);
}

.gallery-cta .cta-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* ===== Controles del Carrusel ===== */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.carousel-btn:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.carousel-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.carousel-btn svg {
    width: 24px;
    height: 24px;
    color: var(--primary-color);
}

.carousel-prev {
    left: 20px;
}

.carousel-next {
    right: 20px;
}

/* Indicadores */
.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.75rem;
    z-index: 10;
}

.carousel-indicators .indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.carousel-indicators .indicator:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

.carousel-indicators .indicator.active {
    background: white;
    width: 32px;
    border-radius: 6px;
}

/* ===== Responsive ===== */

/* Tablet */
@media (max-width: 968px) {
    .gallery-section {
        padding: 4rem 0;
    }

    .gallery-section .section-title {
        font-size: 2rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .gallery-section {
        padding: 3rem 0;
    }

    .gallery-section .section-title {
        font-size: 1.75rem;
    }

    .gallery-section .section-subtitle {
        font-size: 0.9rem;
        margin-bottom: 2rem;
    }

    .gallery-wrapper {
        margin-bottom: 2rem;
    }

    /* Ocultar grid en móvil */
    .gallery-grid {
        display: none;
    }

    /* Mostrar carrusel en móvil */
    .gallery-carousel {
        display: block;
        aspect-ratio: 16 / 9;
    }

    .carousel-btn {
        width: 40px;
        height: 40px;
    }

    .carousel-btn svg {
        width: 20px;
        height: 20px;
    }

    .carousel-prev {
        left: 10px;
    }

    .carousel-next {
        right: 10px;
    }

    .carousel-indicators {
        bottom: 15px;
    }

    .carousel-indicators .indicator {
        width: 10px;
        height: 10px;
    }

    .carousel-indicators .indicator.active {
        width: 24px;
    }

    .gallery-cta {
        margin-top: 1.5rem;
    }

    .gallery-cta .cta-btn {
        padding: 0.875rem 2rem;
        font-size: 1rem;
    }
}

/* Mobile pequeño */
@media (max-width: 480px) {
    .gallery-section {
        padding: 2.5rem 0;
    }

    .gallery-section .section-title {
        font-size: 1.5rem;
    }

    .gallery-section .section-subtitle {
        font-size: 0.85rem;
        margin-bottom: 1.5rem;
    }

    .gallery-wrapper {
        margin-bottom: 1.5rem;
    }

    .carousel-btn {
        width: 35px;
        height: 35px;
    }

    .carousel-btn svg {
        width: 18px;
        height: 18px;
    }

    .carousel-prev {
        left: 5px;
    }

    .carousel-next {
        right: 5px;
    }

    .gallery-cta {
        margin-top: 1rem;
    }

    .gallery-cta .cta-btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
    }
}

