/* Estilos para el Hero Slider */
.hero-slider {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 700px;
    overflow: hidden;
}

.slider-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out, transform 1.2s ease-in-out;
    z-index: 1;
    transform: scale(1.1);
}

.slide.active {
    opacity: 1;
    z-index: 2;
    transform: scale(1);
}

.slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(1px); /* Ligero desenfoque para mejorar la legibilidad del texto */
}

.slide-content {
    position: relative;
    z-index: 10;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 20px;
}

.slide-content-inner {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding: 0 20px;
}

.text-box {
    background-color: rgba(26, 26, 26, 0.7);
    padding: 30px;
    border-radius: 8px;
    backdrop-filter: blur(5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: inline-block;
    max-width: 700px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    transition-delay: 0.2s;
    border: 1px solid rgba(193, 154, 107, 0.3);
}

.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(26, 26, 26, 0.85) 0%, rgba(26, 26, 26, 0.6) 50%, rgba(26, 26, 26, 0.4) 100%);
    z-index: 2;
}

.slide-title {
    font-family: var(--font-primary);
    font-size: 4.5rem;
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    transition-delay: 0.3s;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.slide-subtitle {
    font-family: var(--font-secondary);
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--color-sand-light);
    margin-bottom: 30px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    transition-delay: 0.5s;
    max-width: 700px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    line-height: 1.8;
}

.slide-buttons {
    display: flex;
    gap: 15px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    transition-delay: 0.7s;
}

.slide.active .slide-title,
.slide.active .slide-subtitle,
.slide.active .slide-buttons,
.slide.active .text-box {
    opacity: 1;
    transform: translateY(0);
}

.book-display {
    position: absolute;
    right: 10%;
    top: 50%;
    transform: translateY(-50%);
    perspective: 1000px;
    z-index: 5;
    opacity: 0;
    transition: opacity 1s ease-out, transform 1s ease-out;
    transition-delay: 0.8s;
}

.slide.active .book-display {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

.book {
    width: 380px;
    height: 570px;
    position: relative;
    transform-style: preserve-3d;
    transform: rotateY(-30deg) rotateX(5deg);
    transition: transform 0.6s ease;
    box-shadow: 20px 20px 30px rgba(0, 0, 0, 0.3);
    background-color: rgba(0, 0, 0, 0.05);
}

.book:hover {
    transform: rotateY(-15deg) rotateX(5deg) translateZ(20px);
}

.book-cover {
    position: absolute;
    width: 100%;
    height: 100%;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 5px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.book-cover-img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 5px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.6s ease;
}

.book:hover .book-cover-img {
    transform: scale(1.05);
}

.book-spine {
    position: absolute;
    width: 40px;
    height: 100%;
    transform: rotateY(90deg) translateZ(-20px);
    background-color: var(--color-brown);
    left: -20px;
    top: 0;
    border-radius: 3px 0 0 3px;
}

.slider-nav {
    position: absolute;
    bottom: 50px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 15px;
    z-index: 10;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-dot.active {
    background-color: var(--color-white);
    transform: scale(1.3);
}

.slider-arrows {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 30px;
    z-index: 10;
    transform: translateY(-50%);
}

.slider-arrow {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-arrow:hover {
    background-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
}

.slider-arrow i {
    color: var(--color-white);
    font-size: 24px;
}

/* Animación de desvanecimiento para las diapositivas */
@keyframes fadeIn {
    from { opacity: 0; transform: scale(1.1); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes fadeOut {
    from { opacity: 1; transform: scale(1); }
    to { opacity: 0; transform: scale(0.9); }
}

/* Responsive */
@media screen and (max-width: 1200px) {
    .book-display {
        right: 5%;
    }
    
    .book {
        width: 300px;
        height: 450px;
    }
}

@media screen and (max-width: 992px) {
    .slide-title {
        font-size: 3rem;
    }
    
    .slide-subtitle {
        font-size: 1.2rem;
    }
    
    .book-display {
        position: relative;
        right: auto;
        top: auto;
        transform: none;
        margin: 40px auto 0;
    }
    
    .slide-content {
        text-align: center;
        padding-top: 100px;
    }
    
    .slide-content-inner {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .slide-buttons {
        justify-content: center;
    }
    
    .slide-subtitle {
        margin-left: auto;
        margin-right: auto;
    }
}

@media screen and (max-width: 768px) {
    .hero-slider {
        height: auto;
        min-height: 100vh;
    }
    
    .slide-title {
        font-size: 2.5rem;
    }
    
    .book {
        width: 240px;
        height: 360px;
    }
    
    .slider-arrows {
        padding: 0 15px;
    }
    
    .slider-arrow {
        width: 40px;
        height: 40px;
    }
}

@media screen and (max-width: 480px) {
    .slide-title {
        font-size: 2rem;
    }
    
    .slide-subtitle {
        font-size: 1rem;
    }
    
    .book {
        width: 200px;
        height: 300px;
    }
}
