/* ==============================================
   CR EXIF Lightbox — Estilos
   Portfolio fotográfico de Carolina Rivas
   ============================================== */

/* --- Grilla --- */
.cr-exif-gallery {
    display: grid;
    grid-template-columns: repeat(var(--cr-cols, 3), 1fr);
    gap: 12px;
    margin: 24px 0;
}
@media (max-width: 768px) { .cr-exif-gallery { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .cr-exif-gallery { grid-template-columns: 1fr; } }

/* --- Ítem --- */
.cr-exif-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border-radius: 4px;
    background: #111;
    aspect-ratio: 3 / 2;
}
.cr-exif-item img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
    transition: transform 0.35s ease, filter 0.35s ease;
}
.cr-exif-item:hover img,
.cr-exif-item:focus img {
    transform: scale(1.03);
    filter: brightness(0.6);
}

/* --- Ícono info --- */
.cr-exif-hover-icon {
    position: absolute; bottom: 10px; right: 12px;
    color: #fff; font-size: 22px;
    opacity: 0; transition: opacity 0.25s ease;
    pointer-events: none;
    text-shadow: 0 1px 4px rgba(0,0,0,.6);
}
.cr-exif-item:hover .cr-exif-hover-icon,
.cr-exif-item:focus .cr-exif-hover-icon { opacity: 1; }

/* --- Backdrop --- */
#cr-lb-backdrop {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.92);
    z-index: 9998;
    backdrop-filter: blur(4px);
}
#cr-lb-backdrop[hidden], #cr-lightbox[hidden] { display: none; }

/* --- Lightbox --- */
#cr-lightbox {
    position: fixed; inset: 0; z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    padding: 20px; box-sizing: border-box;
}
#cr-lb-inner {
    display: flex; align-items: stretch;
    max-width: 1100px; width: 100%; max-height: 90vh;
    border-radius: 6px; overflow: hidden;
    box-shadow: 0 24px 80px rgba(0,0,0,.6);
    animation: cr-lb-in .22s ease;
}
@keyframes cr-lb-in {
    from { opacity: 0; transform: scale(.96); }
    to   { opacity: 1; transform: scale(1); }
}

/* --- Imagen --- */
#cr-lb-img-wrap {
    flex: 1 1 auto; background: #0a0a0a;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; min-width: 0;
}
#cr-lb-img { max-width: 100%; max-height: 90vh; object-fit: contain; display: block; }

/* --- Panel EXIF --- */
#cr-lb-panel {
    flex: 0 0 220px; background: #141414;
    padding: 32px 24px; display: flex; flex-direction: column;
    border-left: 1px solid #2a2a2a; overflow-y: auto;
}
.cr-lb-panel-title {
    font-family: Georgia, serif; font-size: 11px;
    letter-spacing: .18em; text-transform: uppercase;
    color: #666; margin: 0 0 20px 0;
}
#cr-lb-exif-list {
    list-style: none; padding: 0; margin: 0;
    display: flex; flex-direction: column; gap: 16px;
}
#cr-lb-exif-list li { display: flex; flex-direction: column; gap: 3px; }
#cr-lb-exif-list li .exif-label {
    font-size: 10px; letter-spacing: .12em;
    text-transform: uppercase; color: #555;
    font-family: 'Courier New', monospace;
}
#cr-lb-exif-list li .exif-value {
    font-size: 15px; color: #e8e8e8;
    font-family: Georgia, serif;
}
.cr-exif-empty { color: #444; font-size: 13px; font-style: italic; font-family: Georgia, serif; }

/* --- Botones --- */
#cr-lb-close, #cr-lb-prev, #cr-lb-next {
    position: fixed; background: none; border: none;
    color: #ccc; cursor: pointer; line-height: 1;
    padding: 8px; transition: color .2s; z-index: 10000;
}
#cr-lb-close:hover, #cr-lb-prev:hover, #cr-lb-next:hover { color: #fff; }
#cr-lb-close { top: 16px; right: 20px; font-size: 36px; }
#cr-lb-prev  { left: 12px; top: 50%; transform: translateY(-50%); font-size: 48px; }
#cr-lb-next  { right: 12px; top: 50%; transform: translateY(-50%); font-size: 48px; }

/* --- Móvil --- */
@media (max-width: 680px) {
    #cr-lb-inner { flex-direction: column; max-height: 95vh; }
    #cr-lb-panel { flex: 0 0 auto; border-left: none; border-top: 1px solid #2a2a2a; padding: 16px 20px; }
    #cr-lb-exif-list { flex-direction: row; flex-wrap: wrap; gap: 12px 24px; }
    #cr-lb-prev { left: 4px; } #cr-lb-next { right: 4px; }
}
