/* ===== GALLERY PAGE SPECIFIC STYLES ===== */

/* PAGE HEADER */
.page-header {
  background: linear-gradient(135deg, #801612 0%, #b82c25 100%);
  color: var(--white);
  text-align: center;
  padding: 60px 20px;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.page-header h1 {
  font-family: 'Merriweather', serif;
  font-size: 42px;
  font-weight: 700;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.breadcrumb {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  position: relative;
  z-index: 1;
}

.breadcrumb a {
  color: rgba(255, 255, 255, 0.9);
  transition: color 0.2s;
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb span {
  margin: 0 8px;
}

/* SECTION TITLES */
.section-title {
  font-family: 'Merriweather', serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.title-underline {
  width: 60px;
  height: 3px;
  background: var(--accent);
  margin-bottom: 24px;
}

/* INTRO */
.intro-section {
  padding: 48px 0 32px;
  background: var(--white);
}

.intro-section p {
  font-size: 15px;
  line-height: 1.9;
  color: #555;
  max-width: 860px;
}

/* GALLERY SECTIONS */
.gallery-section {
  padding: 56px 0;
  background: var(--white);
}

.gallery-section + .gallery-section {
  background: var(--light-bg);
}

/* PHOTO GRIDS */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 28px;
}

/* 6-item grid: 4 in first row, 2 spanning wider in second */
.photo-grid-5 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 28px;
}

.photo-grid-5 .photo-item:nth-child(5),
.photo-grid-5 .photo-item:nth-child(6) {
  grid-column: span 2;
}

/* PHOTO ITEM */
.photo-item {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #d8e3f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.photo-item:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.16);
}

.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Placeholder when no image available */
.photo-item.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #c8d8f0 0%, #e8eff8 100%);
}

.photo-item.placeholder .ph-icon {
  font-size: 32px;
  color: rgba(128, 22, 18, 0.25);
}

/* Photo label overlay */
.photo-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(128, 22, 18, 0.85) 0%, transparent 100%);
  color: var(--white);
  font-size: 12px;
  font-weight: 600;
  padding: 20px 10px 8px;
}

/* CATEGORIES */
.categories-section {
  padding: 56px 0;
  background: var(--white);
}

.categories-section > .container > p {
  font-size: 14px;
  color: #555;
  line-height: 1.9;
  margin-bottom: 28px;
  max-width: 860px;
}

.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.cat-card {
  background: var(--white);
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}

.cat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.cat-card .cat-icon {
  font-size: 24px;
  margin-bottom: 10px;
}

.cat-card h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.cat-card p {
  font-size: 13px;
  line-height: 1.7;
  color: #666;
}

/* PHOTO SUBMISSION */
.submission-section {
  padding: 56px 0;
  background: var(--light-bg);
}

.submission-note {
  background: #fff8e6;
  border-left: 4px solid var(--accent);
  padding: 20px 24px;
  border-radius: 4px;
  font-size: 13.5px;
  color: #555;
  max-width: 860px;
  line-height: 1.8;
}

.submission-note a {
  color: var(--primary);
  border-bottom: 1px solid var(--accent);
  text-decoration: none;
}

.link-arrow {
  display: inline-block;
  margin-top: 28px;
  color: var(--primary);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 2px;
  transition: color 0.2s;
}

.link-arrow:hover {
  color: var(--accent);
}

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

.lightbox-overlay.active {
  display: flex;
}

.lightbox-inner {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
}

.lightbox-inner img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 6px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: -36px;
  right: 0;
  color: var(--white);
  font-size: 28px;
  cursor: pointer;
  background: none;
  border: none;
  line-height: 1;
}

.lightbox-caption {
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
  text-align: center;
  margin-top: 10px;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .photo-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .photo-grid-5 {
    grid-template-columns: repeat(2, 1fr);
  }

  .photo-grid-5 .photo-item:nth-child(5),
  .photo-grid-5 .photo-item:nth-child(6) {
    grid-column: span 1;
  }

  .cat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .page-header h1 {
    font-size: 32px;
  }
}

@media (max-width: 600px) {
  .photo-grid,
  .photo-grid-5,
  .cat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .photo-grid-5 .photo-item:nth-child(5),
  .photo-grid-5 .photo-item:nth-child(6) {
    grid-column: span 1;
  }

  .page-header h1 {
    font-size: 26px;
  }

  .section-title {
    font-size: 22px;
  }
}