* {
  box-sizing: border-box;
}

:root {
  --azul: #061f4a;
  --dourado: #f3d58a;
  --fundo: #f6f1e9;
}

body {
  margin: 0;
  background: var(--fundo);
  color: var(--azul);
  font-family: Arial, sans-serif;
}

.gallery-header {
  padding: 28px 18px 22px;
  text-align: center;
  background:
    linear-gradient(rgba(6,31,74,0.82), rgba(6,31,74,0.9)),
    url('https://luizeerika.com.br/convite/save-the-date.jpg') center/cover no-repeat;
  color: white;
}

.gallery-header img {
  width: 110px;
  height: auto;
  margin-bottom: 8px;
}

.gallery-header h1 {
  margin: 0;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 36px;
  font-weight: normal;
}

.gallery-header p {
  margin: 8px 0 0;
  color: var(--dourado);
  letter-spacing: 4px;
  font-family: Georgia, 'Times New Roman', serif;
}

main {
  padding: 14px;
}

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

.gallery-item {
  position: relative;
  aspect-ratio: 1 / 1;
  border: none;
  padding: 0;
  background: #ddd;
  overflow: hidden;
  border-radius: 10px;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-label {
  position: absolute;
  right: 6px;
  top: 6px;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(0,0,0,0.65);
  color: white;
  font-size: 11px;
}

.load-more-wrap {
  padding: 22px 0 34px;
  text-align: center;
}

#btnCarregarMais {
  border: none;
  border-radius: 999px;
  background: var(--azul);
  color: white;
  padding: 14px 22px;
  font-weight: bold;
}

.photo-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.94);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.photo-modal[hidden] {
  display: none;
}

.modal-close {
  position: fixed;
  top: 14px;
  right: 16px;
  z-index: 3;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.14);
  color: white;
  font-size: 30px;
}

.modal-media-wrap {
  width: 100%;
  height: calc(100vh - 110px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.modal-media-wrap img,
.modal-media-wrap video {
  max-width: 100%;
  max-height: 100%;
  border-radius: 14px;
}

.modal-actions {
  height: 86px;
  width: 100%;
  padding: 12px 16px;
  display: flex;
  gap: 12px;
  background: rgba(0,0,0,0.75);
}

.modal-actions button {
  flex: 1;
  border: none;
  border-radius: 14px;
  background: white;
  color: var(--azul);
  font-weight: bold;
  font-size: 15px;
}

@media (min-width: 700px) {
  .gallery-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
  }

  main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px;
  }
}