/* Hero Carrusel Mejorado */
.hero-carousel {
    position: relative;
    height: 80vh;
    min-height: 500px; /* Altura mínima para móviles */
    margin-top: 0;
    overflow: hidden;
    background-color: #000; /* Fondo de respaldo */
}

.carousel-inner {
    height: 100%;
    position: relative;
}

.slide {
    position: absolute;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    will-change: opacity; /* Optimización de rendimiento */
}

.slide.active {
    opacity: 1;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2;
}

.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 90%;
    max-width: 1200px;
    z-index: 3;
    padding: 0 2rem;
}

.hero-text h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem); /* Texto responsivo */
    margin-bottom: 1rem;
    color: white;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    line-height: 1.2;
    animation: fadeInUp 0.8s ease-out;
}

.subtitle {
    font-size: clamp(1.2rem, 3vw, 1.5rem); /* Texto responsivo */
    color: white;
    margin-bottom: 2rem;
    text-shadow: 0 2px 5px rgba(0,0,0,0.5);
    line-height: 1.5;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.carousel-controls {
    position: absolute;
    bottom: 50px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    z-index: 10;
}

.carousel-btn {
    background: rgba(255, 174, 0, 0.7);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.2);
}

.carousel-btn:hover {
    background: var(--primary-color);
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(255, 174, 0, 0.5);
}

.indicators {
    display: flex;
    gap: 15px;
    align-items: center;
    background: rgba(0,0,0,0.3);
    padding: 0.5rem 1rem;
    border-radius: 30px;
    backdrop-filter: blur(5px);
}

.indicators span {
    display: block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicators span.active {
    background: var(--primary-color);
    transform: scale(1.3);
}

/* Galería Mejorada */
.gallery-section {
    padding: 5rem 5%;
    background-color: var(--light-color);
    text-align: center;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--dark-color);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--primary-color);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.gallery-item {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    height: 280px;
    box-shadow: var(--box-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-hover);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: 1.5rem;
    color: white;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-overlay h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.3rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease 0.1s;
}

.gallery-item:hover .gallery-overlay h3 {
    opacity: 1;
    transform: translateY(0);
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Mejorado */
@media (max-width: 992px) {
    .hero-carousel {
        height: 70vh;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .hero-carousel {
        height: 60vh;
        min-height: 400px;
    }
    
    .carousel-controls {
        bottom: 30px;
    }
    
    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .indicators span {
        width: 10px;
        height: 10px;
    }
    
    .gallery-item {
        height: 220px;
    }
}

@media (max-width: 576px) {
    .hero-carousel {
        height: 50vh;
        min-height: 350px;
    }
    
    .hero-content {
        padding: 0 1rem;
    }
    
    .gallery-section {
        padding: 3rem 5%;
    }
    
    .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
}