/* ==========================
CARRUSEL
========================== */

.author-index{
    display:flex;
    flex-wrap:wrap;
    gap:14px 28px;
    margin:0 0 24px;
    padding:16px 20px;
    background:#f7f7f7;
    border-left:4px solid #c63e8e;
    border-radius:6px;
}

.author-index-group{
    display:flex;
    gap:8px;
    align-items:flex-start;
}

.author-index-letter{
    font-weight:700;
    font-size:1.3em;
    color:#c63e8e;
    line-height:1.4;
}

.author-index ul{
    list-style:none;
    margin:0;
    padding:0;
}

.author-index button{
    background:none;
    border:0;
    padding:2px 0;
    font:inherit;
    color:#2B2B2B;
    cursor:pointer;
    text-align:left;
}

.author-index button:hover,
.author-index button:focus-visible{
    color:#c63e8e;
    text-decoration:underline;
}

.gallery-carousel{
    position:relative;
}

.modern-gallery{
    display:flex;
    gap:24px;
    overflow-x:auto;
    overflow-y:hidden;
    scroll-snap-type:x mandatory;
    scroll-behavior:smooth;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:none;
    padding:10px 6px 20px;
}

.modern-gallery::-webkit-scrollbar{
    display:none;
}

.gallery-arrow{
    position:absolute;
    top:50%;
    transform:translateY(-50%);
    display:flex;
    align-items:center;
    justify-content:center;
    width:48px;
    height:48px;
    border:0;
    border-radius:50%;
    background:#c63e8e;
    color:#fff;
    cursor:pointer;
    font-size:28px;
    line-height:1;
    z-index:2;
    box-shadow:0 8px 20px rgba(0,0,0,.35);
    transition:.25s;
}

.gallery-arrow:hover,
.gallery-arrow:focus-visible{
    background:#ffffff;
    color:#c63e8e;
    outline:none;
    transform:translateY(-50%) scale(1.08);
}

.gallery-prev{ left:12px; }
.gallery-next{ right:12px; }

.gallery-item{
    flex:0 0 calc((100% - 48px) / 3);
    aspect-ratio:4/5;
    position:relative;
    overflow:hidden;
    border-radius:22px;
    cursor:pointer;
    background:#2B2B2B;
    scroll-snap-align:start;
    transition:.35s ease;
}

.gallery-item:hover{
    transform:translateY(-8px);
    box-shadow:0 20px 45px rgba(0,0,0,.35);
}

.gallery-item img,
.modal-image img{
    -webkit-user-drag:none;
    user-select:none;
}

.gallery-item img{
    width:100%;
    height:125%;
    object-fit:cover;
    display:block;
    transition:.45s;
}

.gallery-item:hover img{
    transform:scale(1.06);
}

/* Overlay */

.overlay{
    position:absolute;
    left:0;
    right:0;
    bottom:0;
    padding:22px;
    background:linear-gradient(to top,rgba(236, 236, 236, 0.95),rgba(236, 236, 236, 0.95),rgba(236, 236, 236, 0.95),rgba(236, 236, 236, 0.95),rgba(236, 236, 236, 0.95),rgba(236, 236, 236, 0.95),rgba(236, 236, 236, 0.95),rgba(236, 236, 236, 0.95),rgba(236, 236, 236, 0.95),rgba(236, 236, 236, 0.95),rgba(236, 236, 236, 0.95),rgba(85,0,0,.25),transparent);
}

.overlay h3{
    margin:0;
    color:#c63e8e;
    font-family:Georgia,serif;
    font-size:1.4rem;
}

.overlay p{
    margin:8px 0 0;
    color:#c63e8e;
    font-size:.95rem;
}

/* ==========================
MODAL
========================== */

.art-modal{
    display:none;
    position:fixed!important;
    inset:0;
    background:rgba(18,18,18,.94);
    backdrop-filter:blur(10px);
    z-index:999999;
}

.art-modal.active{
    display:flex;
    justify-content:center;
    align-items:center;
}

.modal-content{
    width:min(92vw,1400px);
    height:min(90vh,820px);
    display:grid;
    /* grid-template-columns:1.7fr 1fr; */
    grid-template-columns:1;
    background:#2B2B2B;
    border-radius:24px;
    overflow:hidden;
    box-shadow:0 25px 70px rgba(0,0,0,.45);
}

/* Zona de imagen */

.modal-image{
    display:flex;
    justify-content:center;
    align-items:center;
    background:linear-gradient(135deg,#1C1C1C,#2B2B2B);
    overflow:hidden;
    position:relative;
}

.pdf-pages{
    width:100%;
    height:100%;
    overflow:auto;
    background:#555;
    padding:10px 10px 50px;
    box-sizing:border-box;
    text-align:center;
    color:#fff;
}

.pdf-pages canvas{
    display:block;
    margin:0 auto 10px;
    max-width:100%;
    background:#fff;
    box-shadow:0 2px 10px rgba(0,0,0,.4);
}

.pdf-open-link{
    position:absolute;
    bottom:12px;
    left:50%;
    transform:translateX(-50%);
    background:rgba(0,0,0,.7);
    color:#fff;
    padding:6px 14px;
    border-radius:20px;
    font-size:14px;
    text-decoration:none;
}

/* Panel derecho */

.modal-info{
    background:linear-gradient(180deg,#c63e8e,#c63e8e);
    color:white;
    padding:40px;
    overflow:auto;
}

.modal-info h2{
    margin-top:0;
    font-family:Georgia,serif;
    font-size:2.2rem;
    color:white;
}

.modal-info strong{
    color:#c63e8e;
}

.modal-info p{
    color:#E7E7E7;
    line-height:1.8;
    font-size:1.05rem;
}

.modal-info hr{
    border:none;
    height:1px;
    background:rgba(154,154,154,.45);
    margin:28px 0;
}

/* Cerrar */

.close{
    position:absolute;
    top:20px;
    right:24px;
    color:white;
    font-size:42px;
    cursor:pointer;
    z-index:30;
    transition:.25s;
}

.close:hover{
    color:#c63e8e;
}

/* Flechas */

.modal-arrow{
    position:absolute;
    top:50%;
    transform:translateY(-50%);
    width:56px;
    height:56px;
    border:none;
    border-radius:50%;
    background:#c63e8e;
    color:white;
    cursor:pointer;
    font-size:26px;
    z-index:30;
    transition:.25s;
    box-shadow:0 8px 20px rgba(0,0,0,.35);
}

.modal-arrow:hover{
    background:#ffffff;
    color:#c63e8e;
    transform:translateY(-50%) scale(1.08);
}

.prev-arrow{ left:18px; }
.next-arrow{ right:18px; }

/* Botones de zoom */

.zoom-controls{
    position:absolute;
    bottom:22px;
    right:22px;
    display:flex;
    gap:12px;
}

.zoom-controls button{
    width:48px;
    height:48px;
    border:none;
    border-radius:50%;
    cursor:pointer;
    background:#c63e8e;
    color:white;
    font-size:20px;
    transition:.25s;
    box-shadow:0 8px 20px rgba(0,0,0,.35);
}

.zoom-controls button:hover{
    background:#ffffff;
    color:#c63e8e;
    transform:scale(1.08);
}

/* ==========================
RESPONSIVE
========================== */

@media(max-width:980px){
    
    .gallery-item{
        flex-basis:280px;
    }
    
    .modal-content{
        grid-template-columns:1fr;
        grid-template-rows:55% 45%;
        height:92vh;
    }
    
    .modal-info{
        padding:28px;
    }
    
}

@media(max-width:640px){
    
    .gallery-arrow{
        width:40px;
        height:40px;
        font-size:22px;
    }
    
    .gallery-item{
        flex-basis:82%;
    }
    
    .overlay{
        padding:18px;
    }
    
    .overlay h3{
        font-size:1.35rem;
    }
    
    .modal-info h2{
        font-size:1.7rem;
    }
    
    .modal-arrow{
        width:44px;
        height:44px;
        font-size:20px;
    }
    
    .zoom-controls button{
        width:42px;
        height:42px;
        font-size:18px;
    }
    
}