@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600&family=Great+Vibes&family=Source+Serif+4:wght@400;500;600&display=swap");

:root {
  color-scheme: light;
  --cream: #f8f2ec;
  --nude: #efe4d7;
  --beige: #e8d6c2;
  --sand: #d6c3ab;
  --olive: #6f7a5a;
  --brown: #5b4636;
  --text: #3a2d24;
  --white: #ffffff;
  --shadow: 0 25px 60px rgba(60, 42, 30, 0.12);
  --radius: 22px;
  --floral: url("../data/flower.png");
  --font-display: "Great Vibes", "Cormorant Garamond", cursive;
  --font-body: "Cormorant Garamond", "Source Serif 4", serif;
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background-color: #f4e9dc;
  min-height: 100vh;
  position: relative;
}

body:not(.gallery-enabled) a[href="/gallery"] {
  display: none;
}

body::after {
  content: "";
  position: fixed;
  width: 420px;
  height: 420px;
  background-image: var(--floral);
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 0;
  pointer-events: none;
  z-index: 0;
}

body::after {
  bottom: -60px;
  right: -30px;
  transform: rotate(0deg) translateY(-60px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

body.show-bottom-flower::after {
  opacity: 0.35;
  transform: rotate(0deg) translateY(-60px);
}

.page {
  display: flex;
  flex-direction: column;
  gap: 80px;
  padding-bottom: 120px;
  position: relative;
  z-index: 1;
}

.hero {
  padding: 80px 24px 40px;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.95), rgba(239, 228, 215, 0.88));
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -40px;
  left: -20px;
  width: 420px;
  height: 420px;
  background-image: var(--floral);
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 0;
  pointer-events: none;
  z-index: 0;
  transform: rotate(180deg) translateY(-60px) scale(0.98);
}

body.show-top-flower .hero::before {
  opacity: 0.35;
  transform: rotate(180deg) translateY(0px) scale(1);
}

.hero::after {
  content: "";
  position: absolute;
  inset: -60% -20% auto auto;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(111, 122, 90, 0.2), transparent 70%);
  border-radius: 50%;
}

.hero__inner {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  text-align: center;
}


.hero__tag {
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-size: 12px;
  color: var(--olive);
  margin-bottom: 16px;
  font-family: var(--font-body);
}

h1 {
  font-size: 64px;
  margin: 0;
  letter-spacing: 0.02em;
  font-family: var(--font-display);
}

.hero__date {
  font-size: 44px;
  margin: 14px 0 0;
  color: var(--brown);
  font-family: var(--font-body);
}

.hero__sub {
  font-size: 22px;
  max-width: 520px;
  margin: 20px auto 30px;
  line-height: 1.6;
  font-family: var(--font-body);
}

.hero__note {
  display: inline-block;
  margin: 0 auto 18px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(111, 122, 90, 0.15);
  color: var(--brown);
  font-size: 15px;
  font-family: var(--font-body);
}

.hero__actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero__photos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  max-width: 780px;
  margin: 40px auto 0;
  position: relative;
  z-index: 1;
}

.photo-card {
  height: 800px;
  border-radius: 24px;
  background-image: var(--photo-url, linear-gradient(130deg, rgba(214, 195, 171, 0.5), rgba(255, 255, 255, 0.95)));
  background-size: cover;
  background-position: center;
  background-color: var(--cream);
  box-shadow: none;
  -webkit-mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 1) 60%, rgba(0, 0, 0, 0.2) 80%, rgba(0, 0, 0, 0) 100%);
  mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 1) 60%, rgba(0, 0, 0, 0.2) 80%, rgba(0, 0, 0, 0) 100%);
  position: relative;
  overflow: hidden;
}

.photo-card::before {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 60px 20px rgba(251, 223, 200, 0.7);
  pointer-events: none;
}

.photo-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(248, 242, 236, 0) 40%, rgba(248, 242, 236, 0.7) 70%, rgba(248, 242, 236, 1) 100%);
  mix-blend-mode: normal;
  pointer-events: none;
}

.photo-card--one {
  --photo-url: url( "../data/1.jpeg" )
}

.photo-card--two {
  --photo-url: url( "../data/5.jpeg" )
}

.photo-card--three {
  --photo-url: url( "../data/Nasa3.jpg" )
}

.photo-card--four {
  --photo-url: url( "../data/Nasa4.jpg" )
}
.hero--compact {
  padding-bottom: 24px;
}

.section {
  padding: 0 24px;
}

.section__inner {
  max-width: 1000px;
  margin: 0 auto;
}

h2 {
  font-size: 32px;
  margin-bottom: 24px;
  font-family: var(--font-body);
}

.invitation .section__inner {
  text-align: center;
}

.section--schedule {
  color: #1b1b1b;
}

.schedule {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 28px 18px;
  justify-items: center;
}

.schedule__item {
  display: grid;
  gap: 10px;
  justify-items: center;
  text-align: center;
  padding: 10px 6px;
  max-width: 240px;
}

.schedule__time {
  font-size: 20px;
  color: #1b1b1b;
  margin: 0;
  font-weight: 600;
  font-family: var(--font-body);
}

.schedule__item h3 {
  margin: 0;
  font-size: 20px;
  font-family: var(--font-body);
}

.schedule__icon {
  width: 128px;
  height: 128px;
  border-radius: 16px;
  border: 1px solid rgba(27, 27, 27, 0.15);
  background-image: var(--schedule-icon, linear-gradient(140deg, rgba(232, 214, 194, 0.9), rgba(255, 255, 255, 0.95)));
  background-size: cover;
  background-position: center;
}

.schedule__icon--crkva {
  --schedule-icon:url("../data/Church.png"); 
}

.schedule__icon--sala {
  --schedule-icon:url("../data/hall.png"); 
}

.schedule__icon--svadba {
  --schedule-icon:url("../data/Rings.png"); 
}

.schedule__location {
  color: #1b1b1b;
  text-decoration: none;
  font-size: 15px;
  border-bottom: 1px solid rgba(27, 27, 27, 0.35);
  display: inline-block;
  font-family: var(--font-body);
}

.schedule__location:hover {
  color: var(--olive);
  border-bottom-color: var(--olive);
}

.location__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.location__name {
  font-size: 20px;
  margin: 0;
  font-family: var(--font-body);
}

.map-card {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--white);
  margin-top: 16px;
}

#map-embed {
  border: none;
  width: 100%;
  height: 320px;
}

.moments {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  align-items: center;
  background-image: linear-gradient(120deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.7)), var(--moments-photo, linear-gradient(120deg, rgba(239, 228, 215, 0.5), rgba(255, 255, 255, 0.95)));
  background-size: cover;
  background-position: center;
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}

.moments__text {
  margin: 0;
  line-height: 1.6;
  color: rgba(58, 45, 36, 0.75);
  font-family: var(--font-body);
}

.moments__photos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}

.moment-photo {
  height: 180px;
  border-radius: 20px;
  background-image: linear-gradient(120deg, rgba(214, 195, 171, 0.5), rgba(255, 255, 255, 0.95));
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(91, 70, 54, 0.15);
}

.countdown {
  text-align: center;
}

.countdown__lead {
  margin: 0 0 24px;
  color: rgba(58, 45, 36, 0.75);
  font-family: var(--font-body);
}

.countdown__timer {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 16px;
}

.countdown__item {
  background: var(--white);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 6px;
  font-size: 22px;
  font-family: var(--font-body);
}

.countdown__item span:first-child {
  font-size: 28px;
  font-weight: 600;
}

.countdown__label {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(58, 45, 36, 0.6);
  font-family: var(--font-body);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 999px;
  border: none;
  text-decoration: none;
  font-size: 16px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  font-family: var(--font-body);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(60, 42, 30, 0.18);
}

.btn--primary {
  background: var(--olive);
  color: var(--white);
}

.btn--ghost {
  background: transparent;
  color: var(--brown);
  border: 1px solid rgba(91, 70, 54, 0.3);
}

.cta {
  text-align: center;
  background: var(--white);
  padding: 36px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.upload-card {
  position: relative;
  border-radius: var(--radius);
  border: 2px dashed rgba(91, 70, 54, 0.25);
  background: rgba(255, 255, 255, 0.8);
  padding: 32px;
  text-align: center;
  transition: border-color 0.2s ease, background 0.2s ease;
  margin-bottom: 18px;
}

.upload-card.dragover {
  border-color: var(--olive);
  background: rgba(239, 228, 215, 0.9);
}

.upload-card input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-title {
  font-size: 20px;
  margin: 0 0 8px;
  font-family: var(--font-body);
}

.upload-sub {
  margin: 0 0 18px;
  font-family: var(--font-body);
}

.upload-progress {
  height: 8px;
  background: rgba(91, 70, 54, 0.1);
  border-radius: 999px;
  overflow: hidden;
}

.upload-progress__bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #6f7a5a, #8a9b72);
  transition: width 0.2s ease;
}

.upload-progress__label {
  margin: 8px 0 16px;
  font-size: 14px;
  font-family: var(--font-body);
}

.upload-list {
  display: grid;
  gap: 12px;
}

.upload-item {
  background: var(--white);
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 8px;
}

.upload-item__title {
  font-size: 16px;
  font-family: var(--font-body);
}

.upload-item__bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(91, 70, 54, 0.12);
  overflow: hidden;
}

.upload-item__bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--beige);
  transition: width 0.2s ease;
}

.error-text {
  color: #9b3d36;
  min-height: 20px;
  font-family: var(--font-body);
}

.gallery-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--font-body);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
  margin: 20px 0 30px;
}

.gallery-card {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow);
  cursor: pointer;
}

.gallery-pagination {
  display: none;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
}

.gallery-pagination__label {
  font-size: 14px;
  color: rgba(58, 45, 36, 0.75);
}

.gallery-pagination__dots {
  font-size: 16px;
  color: rgba(58, 45, 36, 0.7);
}

.gallery-page {
  border: 1px solid rgba(91, 70, 54, 0.25);
  background: var(--white);
  color: var(--brown);
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  font-family: var(--font-body);
}

.gallery-page:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(60, 42, 30, 0.16);
}

.gallery-page.is-active {
  background: var(--olive);
  color: var(--white);
  border-color: var(--olive);
}

.gallery-card img,
.gallery-card video {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.gallery-card__placeholder {
  height: 200px;
  display: grid;
  place-items: center;
  color: rgba(58, 45, 36, 0.65);
  background: linear-gradient(140deg, var(--nude), var(--white));
  font-family: var(--font-body);
  font-size: 18px;
}

.gallery-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.35));
}

.play-icon {
  position: absolute;
  inset: auto 16px 16px auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  display: grid;
  place-items: center;
  font-size: 18px;
  color: var(--brown);
}

.lightbox {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 50;
}

.lightbox.is-open {
  display: flex;
}

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(28, 20, 16, 0.75);
}

.lightbox__content {
  position: relative;
  z-index: 1;
  background: var(--white);
  border-radius: var(--radius);
  padding: 18px;
  max-width: 920px;
  width: 100%;
  box-shadow: var(--shadow);
}

.lightbox__media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--brown);
  font-size: 36px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(60, 42, 30, 0.16);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.lightbox__nav:hover:not(:disabled) {
  transform: translateY(-50%) scale(1.04);
}

.lightbox__nav:disabled {
  opacity: 0.35;
  cursor: default;
}

.lightbox__nav--prev {
  left: 8px;
}

.lightbox__nav--next {
  right: 8px;
}

.lightbox__close {
  margin-left: auto;
  background: transparent;
  border: none;
  font-size: 16px;
  color: var(--brown);
  cursor: pointer;
  font-family: var(--font-body);
}

#lightbox-body img,
#lightbox-body video {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
}

@media (max-width: 1100px) {
  .gallery-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .hero {
    padding-top: 60px;
  }

  h2 {
    font-size: 26px;
  }

  .hero__photos {
    grid-template-columns: 1fr;
  }

  .countdown__timer {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

  .gallery-card img,
  .gallery-card video,
  .gallery-card__placeholder {
    height: 170px;
  }

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

  .lightbox {
    padding: 16px;
  }

  .lightbox__content {
    padding: 14px;
  }

  .lightbox__nav {
    width: 44px;
    height: 44px;
    font-size: 30px;
  }
}
