/* ===== EXISTING GALLERY GRID (kept) ===== */
.gcs-gallery{
    display:grid;
    grid-gap:10px;
    grid-template-columns:repeat(2,1fr);
}
@media(min-width:600px){
    .gcs-gallery{grid-template-columns:repeat(2,1fr);}
}
@media(min-width:800px){
    .gcs-gallery{grid-template-columns:repeat(4,1fr);}
}
@media(min-width:1200px){
    .gcs-gallery{grid-template-columns:repeat(6,1fr);}
}
.gcs-gallery-item{
    overflow:hidden;
}
.gcs-gallery-item img{
    width:100%;
    aspect-ratio:1/1;
    height:auto;
    display:block;
    object-fit:cover;
    transition:transform 0.3s ease;
}
.gcs-gallery-item img:hover{
    transform:scale(1.03);
}

/* full-bleed wrapper */
.gcs-gallery-wrapper{
    width:100vw;
    margin-left:calc(50% - 50vw);
    margin-right:calc(50% - 50vw);
}

/* download button */
.gcs-download-all{
    display:inline-block;
    margin:0 0 1rem 1rem;
    padding:0.5rem 1rem;
    background:#ec4899;
    color:#fff;
    text-decoration:none;
    border-radius:4px;
}

/* ===== LIGHTBOX (kept) ===== */
.gcs-modal{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,0.8);
    display:flex;
    align-items:center;
    justify-content:center;
    z-index:9999;
}
.gcs-modal.hidden{display:none;}
.gcs-modal-content{
    position:relative;
    width:100vw;
    height:100vh;
    max-width:100vw;
    max-height:100vh;
    display:flex;
    align-items:center;
    justify-content:center;
}
.gcs-modal-image{
    max-width:100%;
    max-height:100%;
    width:100%;
    height:100%;
    object-fit:contain;
    display:block;
}
.gcs-modal-close,
.gcs-modal-prev,
.gcs-modal-next{
    position:absolute;
    top:50%;
    transform:translateY(-50%);
    background:rgba(0,0,0,0.5);
    color:#fff;
    border:none;
    padding:0.5rem;
    cursor:pointer;
}
.gcs-modal-close{top:10px;right:10px;transform:none;}
.gcs-modal-prev{left:-40px;}
.gcs-modal-next{right:-40px;}
.gcs-modal-download{
    position:absolute;
    top:0;
    left:0;
    margin:0;
    background:rgba(0,0,0,0.6);
    color:#fff;
    padding:0.5rem 1rem;
    text-decoration:none;
    border-radius:0;
}
/* Keep the arrows inside on small screens */
@media(max-width:640px){
    .gcs-modal-prev{left:10px;}
    .gcs-modal-next{right:10px;}
}

/* ===== GALLERY INDEX: full-bleed with side gutters, 2 cols on mobile ===== */
.gcs-gallery-index{
  display:grid;
  gap:12px;
  grid-template-columns:repeat(2,minmax(0,1fr));  /* 2 columns on mobile */
  width:100vw;
  margin-left:calc(50% - 50vw);
  margin-right:calc(50% - 50vw);
  padding-left:clamp(12px, 3vw, 32px);            /* gutters */
  padding-right:clamp(12px, 3vw, 32px);
  box-sizing:border-box;                           /* keep padding inside 100vw */
}
@media(min-width:800px){
  .gcs-gallery-index{ grid-template-columns:repeat(4,minmax(0,1fr)); }
}
@media(min-width:1200px){
  .gcs-gallery-index{ grid-template-columns:repeat(6,minmax(0,1fr)); }
}
.gcs-gallery-index-empty{
    text-align:center;
    color:#666;
    padding:2rem 0;
}

/* index cards */
.gcs-card{
    text-decoration:none;
    color:inherit;
    display:block;
}
.gcs-card-inner{
    position:relative;
    width:100%;
    aspect-ratio:4/3;
    overflow:hidden;
    border-radius:12px;
    box-shadow:0 8px 24px rgba(0,0,0,.08);
    transition:transform .2s ease, box-shadow .2s ease;
}
/* fade overlay behind the title for readability */
.gcs-card-inner::after{
    content:"";
    position:absolute;
    left:0; right:0; bottom:0;
    height:45%;
    background:linear-gradient(to top, rgba(0,0,0,.65), rgba(0,0,0,0));
    border-radius:inherit;
    pointer-events:none;
    z-index:1;
}
.gcs-card-inner:hover{
    transform:translateY(-3px);
    box-shadow:0 12px 28px rgba(0,0,0,.12);
}
.gcs-card img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}
.gcs-card-title{
    position:absolute;
    left:10px; right:10px; bottom:10px;
    padding:8px 10px;
    color:#fff;
    font-weight:600;
    font-size:15px;
    line-height:1.2;
    z-index:2;                       /* above overlay */
    background:transparent;          /* overlay supplies the contrast */
    text-shadow:0 1px 2px rgba(0,0,0,.35);
}
@media (max-width:480px){
  .gcs-card-title{ left:8px; right:8px; bottom:8px; font-size:14px; }
}

/* ===== Optional cover image on single gallery ===== */
.gcs-gallery-cover{
    margin:0 0 16px 0;
    width:100%;
}
.gcs-gallery-cover img{
    width:100%;
    height:auto;
    border-radius:12px;
    display:block;
}
