/* ================= RESET ================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #ffffff;
  font-family: 'Segoe UI', sans-serif;
  color: #000000;
  overflow-x: hidden;
}

/* ================= HERO ================= */
.gallery-hero {
  position: relative;
  height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  color: #fff;
}

.gallery-hero h1 {
  font-size: 4rem;
  letter-spacing: 4px;
  color: #ffffff;
  position: relative;
  z-index: 2;
  animation: fadeDown 1.5s ease;
}

/* Background div for zoom effect */
.gallery-hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("../../images/Ritmies5_3.png") center/cover no-repeat;
  z-index: 1;
  transition: transform 0.2s ease-out;
  will-change: transform;
}

/* Optional dark overlay */
.gallery-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.3);
  z-index: 1;
}

/* ================= GRID ================= */
.gallery-container {
  padding: 80px 6%;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
}

/* ================= CARD ================= */
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  cursor: pointer;
  transition: transform 0.4s ease;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
}

.gallery-item:hover {
  transform: scale(1.04);
}

.gallery-item:hover img {
  transform: scale(1.15);
}

/* Overlay */
.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(255,255,255,0.8), transparent);
  opacity: 0;
  display: flex;
  align-items: flex-end;
  padding: 20px;
  transition: opacity 0.4s ease;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-overlay span {
  font-size: 18px;
  letter-spacing: 1px;
  color: #000000;
}

/* ================= LIGHTBOX ================= */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.95);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.lightbox img {
  max-width: 90%;
  max-height: 85%;
  border-radius: 12px;
  animation: zoomIn 0.6s ease;
}

.lightbox::after {
  content: "✕";
  position: absolute;
  top: 30px;
  right: 40px;
  font-size: 30px;
  cursor: pointer;
  color: #000000;
}

/* ================= ANIMATIONS ================= */
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-40px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes zoomIn {
  from { transform: scale(0.7); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* ================= RESPONSIVE ================= */
@media (max-width: 768px) {
  .gallery-hero h1 {
    font-size: 2.5rem;
  }
}
