:root {
  --sac-red: #c9282d;
  --text: #111;
  --radius: 8px;
}

*,*::before,*::after { box-sizing:border-box; }

html,body { margin:0; padding:0; font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial; background:#fff; color: var(--text); }

.sac-gallery-page {
  display: grid;
  grid-template-columns: 320px 1fr;
  max-width: 1200px;
  margin: 0 auto;
  gap: 20px;
  padding: 40px 20px;
}

.sac-left {
  display: flex;
  flex-direction: column; /* ensure vertical stacking */
  align-items: flex-start; /* left-align content */
}

.sac-subtitle {
  margin-top: 12px;
  font-size: 1.2rem;
  font-weight: 400;
  color: #666;
  line-height: 1.3;
}
.sac-title {
  font-size:48px;
  font-weight:800;
  line-height:0.95;
  letter-spacing:-0.02em;
  margin:0;
}


.sac-right { min-width:0; }

.sac-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  grid-auto-rows: 120px;
  grid-auto-flow: dense; /* <-- key to reducing gaps */
  gap: 14px;
}
.sac-gallery-item {
  width: 100%;       /* fill grid cell */
  height: 100%;      /* fill cell height */
  object-fit: cover;
  cursor: pointer;
  border-radius: var(--radius);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}


.sac-gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

/* Lightbox */
.sac-lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  top:0; left:0; width:100%; height:100%;
  background: rgba(0,0,0,0.85);
  justify-content: center;
  align-items: center;
}

.sac-lightbox-img {
  max-width: 90%;
  max-height: 90%;
  border-radius: var(--radius);
}

.sac-close {
  position: absolute;
  top:20px; right:30px;
  font-size:40px;
  color:#fff;
  cursor:pointer;
}

/* Responsive */
@media(max-width:420px){
  .sac-gallery-page { grid-template-columns: 1fr; }
  .sac-title { font-size:34px; margin-bottom:16px; }
  .sac-gallery-grid { grid-template-columns: repeat(auto-fill, minmax(120px,1fr)); gap:10px; }
}
