/* Estilos para la sección profesional de libros */

:root {
    --book-primary: #8B5A2B;
    --book-secondary: #D2B48C;
    --book-accent: #A0522D;
    --book-light: #F5F5DC;
    --book-dark: #3E2723;
    --book-gradient: linear-gradient(135deg, var(--book-primary), var(--book-accent));
    --book-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    --book-transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Sección principal */
.books-section {
    padding: 120px 0 150px;
    position: relative;
    background-image: url('../img/recursos/pngtree-vintage-book-cover-s-aged-fabric-texture-image_13871737.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    overflow: hidden;
}

.books-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.95), rgba(245, 245, 220, 0.9));
    z-index: 0;
}

.books-section .container {
    position: relative;
    z-index: 2;
}

/* Elementos flotantes de fondo */
.books-bg-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

.floating-element {
    position: absolute;
    opacity: 0.1;
    filter: blur(2px);
    z-index: 1;
}

.book-element-1 {
    top: 10%;
    left: 5%;
    width: 200px;
    height: 200px;
    background-image: url('../img/recursos/pngtree-vintage-book-cover-s-aged-fabric-texture-image_13871737.png');
    background-size: contain;
    background-repeat: no-repeat;
    animation: float 15s ease-in-out infinite alternate;
}

.book-element-2 {
    bottom: 15%;
    right: 8%;
    width: 150px;
    height: 150px;
    background-image: url('../img/recursos/pngtree-vintage-book-cover-s-aged-fabric-texture-image_13871737.png');
    background-size: contain;
    background-repeat: no-repeat;
    transform: rotate(45deg);
    animation: float 12s ease-in-out infinite alternate-reverse;
}

.book-element-3 {
    top: 50%;
    left: 85%;
    width: 180px;
    height: 180px;
    background-image: url('../img/recursos/pngtree-vintage-book-cover-s-aged-fabric-texture-image_13871737.png');
    background-size: contain;
    background-repeat: no-repeat;
    transform: rotate(-15deg);
    animation: float 18s ease-in-out infinite alternate;
}

@keyframes float {
    0% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(20px, -15px) rotate(5deg); }
    100% { transform: translate(-15px, 15px) rotate(-5deg); }
}

/* Encabezado de sección */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-family: var(--font-primary);
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--book-dark);
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.section-divider {
    width: 100%;
    max-width: 150px;
    height: 3px;
    margin: 0 auto 25px;
    position: relative;
    overflow: hidden;
}

.section-divider span {
    display: block;
    width: 100%;
    height: 100%;
    background: var(--book-gradient);
    position: relative;
}

.section-divider span::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { left: -100%; }
    100% { left: 100%; }
}

.section-subtitle {
    font-family: var(--font-secondary);
    font-size: 1.2rem;
    color: var(--book-accent);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
    font-style: italic;
}

/* Cuadrícula de libros */
.books-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 60px 40px;
    margin-top: 60px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Tarjetas de libros */
.book-item {
    perspective: 1500px;
}

.book-card {
    position: relative;
    height: 100%;
    min-height: 580px;
    transform-style: preserve-3d;
    transition: var(--book-transition);
}

.book-card-inner {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background-color: white;
    border-radius: 15px;
    box-shadow: var(--book-shadow);
    overflow: hidden;
    transition: var(--book-transition);
}

.book-card:hover .book-card-inner {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

.book-front {
    position: relative;
    height: 350px;
    overflow: hidden;
    border-radius: 15px 15px 0 0;
    background: linear-gradient(135deg, #e6d7bf, #f9f4e8);
    display: flex;
    align-items: center;
    justify-content: center;
}

.book-cover {
    height: 100%;
    max-height: 320px;
    max-width: 90%;
    object-fit: contain;
    box-shadow: 5px 5px 25px rgba(0, 0, 0, 0.3);
    transition: var(--book-transition);
    transform-origin: center;
    border-radius: 5px;
    z-index: 2;
}

.book-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 70%, rgba(0,0,0,0.2));
    z-index: 1;
}

.book-card:hover .book-cover {
    transform: scale(1.05) translateY(-10px);
    box-shadow: 10px 15px 35px rgba(0, 0, 0, 0.4);
}

/* Información del libro */
.book-info {
    padding: 30px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    position: relative;
    z-index: 2;
}

.book-badge {
    position: absolute;
    top: -15px;
    right: 30px;
    background: var(--book-gradient);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(139, 90, 43, 0.3);
    font-family: var(--font-secondary);
}

.book-title {
    font-family: var(--font-primary);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--book-dark);
    margin-bottom: 10px;
    line-height: 1.2;
}

.book-subtitle {
    font-family: var(--font-secondary);
    font-size: 1rem;
    font-weight: 500;
    color: var(--book-accent);
    margin-bottom: 20px;
    line-height: 1.4;
}

.book-description {
    font-family: var(--font-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    color: #666;
    margin-bottom: 25px;
    flex-grow: 1;
}

.book-description p {
    margin-bottom: 0;
}

/* Botones de acción */
.book-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: auto;
}

.btn-details {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 25px;
    background-color: var(--book-primary);
    color: white;
    border: none;
    border-radius: 5px;
    font-family: var(--font-secondary);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(139, 90, 43, 0.3);
}

.btn-details:hover {
    background-color: var(--book-accent);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(139, 90, 43, 0.4);
}

.btn-details i {
    margin-right: 8px;
    font-size: 1.1rem;
}

.btn-amazon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 25px;
    background-color: #FF9900;
    color: white;
    border: none;
    border-radius: 5px;
    font-family: var(--font-secondary);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(255, 153, 0, 0.3);
}

.btn-amazon:hover {
    background-color: #E88A00;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 153, 0, 0.4);
}

.btn-amazon i {
    margin-right: 8px;
    font-size: 1.2rem;
}

/* CTA de libros */
.books-cta {
    text-align: center;
    margin-top: 60px;
    position: relative;
    z-index: 2;
}

.btn-lg {
    padding: 15px 40px;
    font-size: 1.1rem;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transition: all 0.4s ease;
}

.btn-lg:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: var(--book-gradient);
    border: none;
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--book-accent), var(--book-primary));
}

.btn-lg i {
    margin-right: 10px;
    font-size: 1.2rem;
}

/* Estilos responsivos */
@media screen and (max-width: 1200px) {
    .books-grid {
        gap: 40px 30px;
    }
    
    .section-title {
        font-size: 3rem;
    }
}

@media screen and (max-width: 992px) {
    .books-section {
        padding: 100px 0 120px;
    }
    
    .books-grid {
        gap: 30px 25px;
    }
    
    .book-card {
        min-height: 550px;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
}

@media screen and (max-width: 768px) {
    .books-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px 20px;
    }
    
    .book-front {
        height: 300px;
    }
    
    .book-title {
        font-size: 1.5rem;
    }
    
    .book-subtitle {
        font-size: 0.9rem;
    }
    
    .book-description {
        font-size: 0.85rem;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
}

@media screen and (max-width: 576px) {
    .books-section {
        padding: 80px 0 100px;
    }
    
    .books-grid {
        grid-template-columns: 1fr;
        max-width: 350px;
        margin: 40px auto 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
}
