/* =========================
   GALERÍA
========================= */

.galeria {
    background: #fff;
    padding: 10px;
  }
  
  .galeria .grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    max-width: 1000px;
    margin: 0 auto;
  }
  
  .galeria .img-item {
    position: relative;
    overflow: hidden;
  }
  
  .galeria img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
    cursor: pointer;
    transition: transform 0.4s ease;
  }
  
  .galeria .img-item::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.35);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
  }
  
  .galeria .img-item:hover::after {
    opacity: 1;
  }
  
  .galeria .img-item:hover img {
    transform: scale(1.05);
  }
  
  /* =========================
     LIGHTBOX
  ========================= */
  
  .lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
  
    display: none;
    align-items: center;
    justify-content: center;
  
    z-index: 3000;
  
    padding: 20px;
    box-sizing: border-box;
    overflow: hidden;
  }
  
  .lightbox.active {
    display: flex;
  }
  
  .lightbox img {
    max-width: 90vw;
    max-height: 85vh;
  
    width: auto;
    height: auto;
  
    object-fit: contain;
  
    border-radius: 10px;
  
    cursor: grab;
  
    transform: scale(1) translate(0,0);
    transition: transform 0.1s ease;
  }
  
  .lightbox img:active {
    cursor: grabbing;
  }
  
  .close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 35px;
    color: white;
    cursor: pointer;
    z-index: 4000;
  }
  
  .nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 45px;
    color: white;
    cursor: pointer;
    padding: 10px;
    user-select: none;
    z-index: 4000;
  }
  
  .prev { left: 15px; }
  .next { right: 15px; }
  
  /* =========================
     RESPONSIVE
  ========================= */
  
  @media (min-width: 768px) {
    .galeria .grid {
      max-width: 1200px;
    }
  
    .galeria img {
      height: 400px;
      aspect-ratio: auto;
    }
  }
  
  @media (max-width: 768px) {
    .nav {
      font-size: 35px;
    }
  
    .close {
      font-size: 30px;
    }
  }