:root {
  --pink: #d63384;
  --white: #ffffff;
  --overlay: rgba(0, 0, 0, 0.5);
  --surface: #161616;
  --surface-2: #1f1f1f;
  --line: rgba(255, 255, 255, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Montserrat", sans-serif;
  color: var(--white);
  background: #0e0e0e;
  overflow-x: hidden;
}

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 25%, #0f3460 50%, #1a1a2e 75%, #0a0a1a 100%);
  background-size: 400% 400%;
  animation: heroGradient 15s ease infinite;
}

@keyframes heroGradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0.32) 0%, rgba(0, 0, 0, 0.72) 100%);
  pointer-events: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: var(--overlay);
}

.main-nav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.6rem 2.1rem;
}

.right-controls {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.logo {
  color: var(--white);
  text-decoration: none;
  font-family: "Great Vibes", cursive;
  font-size: 2rem;
}

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(0, 0, 0, 0.36);
}

.lang-btn {
  border: none;
  border-radius: 999px;
  padding: 0.36rem 0.5rem;
  background: transparent;
  color: var(--white);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
}

.lang-btn.is-active {
  background: var(--white);
  color: #131313;
}

.flag {
  display: inline-block;
  width: 16px;
  height: 11px;
  border-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.45);
}

.flag-en {
  background: linear-gradient(0deg, #c8102e 0 33%, #ffffff 33% 66%, #012169 66% 100%);
}

.flag-hu {
  background: linear-gradient(0deg, #ce2939 0 33%, #ffffff 33% 66%, #477050 66% 100%);
}

.flag-ro {
  background: linear-gradient(90deg, #002b7f 0 33%, #fcd116 33% 66%, #ce1126 66% 100%);
}

.flag-lv {
  background: linear-gradient(0deg, #8c1c3a 0 42%, #ffffff 42% 58%, #8c1c3a 58% 100%);
}

.hero-content {
  z-index: 2;
  width: min(980px, 92vw);
  animation: fadeUp 0.9s ease-out;
}

.hero-content h1 {
  margin: 0;
  font-family: "Great Vibes", cursive;
  font-weight: 400;
  color: var(--white);
  font-size: clamp(2.8rem, 11vw, 7.2rem);
}

.subheading {
  margin: 0.45rem 0 0.6rem;
  color: var(--white);
  font-size: 0.74rem;
  letter-spacing: 0.33em;
  font-weight: 600;
}

.hero-message {
  margin: 0.5rem 0 0;
  color: #fff8ee;
  font-family: "Great Vibes", cursive;
  font-size: clamp(1.6rem, 5vw, 2.8rem);
  font-weight: 400;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

main {
  background: linear-gradient(180deg, #0e0e0e, #151515);
}

/* ── RSVP Form ──────────────────────────────────────────────────────────────── */

.rsvp-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.rsvp-form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.rsvp-form label span {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #ccc;
  text-transform: uppercase;
}

.rsvp-form input,
.rsvp-form select,
.rsvp-form textarea {
  padding: 0.7rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s, background 0.2s;
}

.rsvp-form input:focus,
.rsvp-form select:focus,
.rsvp-form textarea:focus {
  outline: none;
  border-color: #d63384;
  background: rgba(255, 255, 255, 0.1);
}

.rsvp-form select option {
  background: #1a1a1a;
  color: #fff;
}

.rsvp-form textarea {
  resize: vertical;
  min-height: 80px;
}

.guest-names-wrap {
  padding: 0.5rem 0 0;
}

.guest-names-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: #999;
  margin: 0 0 0.6rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.guest-names-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.guest-entry label {
  font-size: 0.72rem;
  color: #888;
  text-transform: none;
  font-weight: 500;
}

.rsvp-submit-btn {
  padding: 0.85rem;
  border: none;
  border-radius: 999px;
  background: #d63384;
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  margin-top: 0.5rem;
}

.rsvp-submit-btn:hover {
  background: #c02770;
  transform: translateY(-1px);
}

.rsvp-submit-btn:active {
  transform: translateY(0);
}

.form-status {
  font-size: 0.85rem;
  text-align: center;
  min-height: 1.2em;
  color: #b59a72;
}

/* ── Wedding Details ───────────────────────────────────────────────────────── */

.info-block {
  width: min(960px, 92vw);
  margin: 0 auto;
  padding: 3rem 0;
}

.info-block h2 {
  margin-top: 0;
  font-family: "Great Vibes", cursive;
  font-size: 2.2rem;
  font-weight: 400;
}

.info-block p {
  color: #f3f3f3;
}

.info-block p[data-i18n="detailsCivil"],
.info-block p[data-i18n="detailsChurch"],
.info-block p[data-i18n="detailsParty"],
.info-block p[data-i18n="detailsDate"] {
  white-space: pre-line;
}

.info-block a {
  color: #ff90bf;
}

.maps-button {
  display: inline-block;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 0.6rem 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--white);
  background: rgba(214, 51, 132, 0.28);
  transition: background 0.2s ease, transform 0.2s ease;
}

.maps-button:hover {
  background: rgba(214, 51, 132, 0.45);
  transform: translateY(-1px);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 8px;
  object-fit: contain;
  display: block;
  user-select: none;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  font-size: 2.2rem;
  line-height: 1;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 0.4rem 0.7rem;
  opacity: 0.85;
}

.lightbox-close:hover { opacity: 1; }

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 3rem;
  line-height: 1;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 0.5rem 1rem;
  opacity: 0.7;
  user-select: none;
}

.lightbox-prev:hover,
.lightbox-next:hover { opacity: 1; }

.lightbox-prev { left: 0.5rem; }
.lightbox-next { right: 0.5rem; }

.lightbox-video {
  max-width: 90vw;
  max-height: 82vh;
  border-radius: 8px;
  display: block;
  outline: none;
}

.lightbox-video[hidden] {
  display: none;
}

.lightbox-download {
  position: absolute;
  bottom: 1.4rem;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.2rem;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  backdrop-filter: blur(4px);
  transition: background 0.2s;
  white-space: nowrap;
}

.lightbox-download[hidden] {
  display: none;
}

.lightbox-download:hover {
  background: rgba(255, 255, 255, 0.28);
}

.lightbox-download::before {
  content: "\2B07";
  font-size: 1rem;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Gallery Photos ─────────────────────────────────────────────────────────── */

.gallery-section {
  margin-bottom: 1.5rem;
}

.gallery-section-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  width: 100%;
  padding: 1rem 0.8rem;
  background: rgba(255, 255, 255, 0.04);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  cursor: pointer;
  color: inherit;
  font-family: inherit;
  text-align: left;
  transition: border-color 0.2s, background 0.2s;
  min-height: 64px;
}

.gallery-section-header:hover {
  border-color: rgba(214, 51, 132, 0.4);
  background: rgba(255, 255, 255, 0.07);
}

.gallery-section-chevron {
  font-size: 1rem;
  color: #b59a72;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.gallery-header-collapsed .gallery-section-chevron {
  transform: rotate(0deg);
}

.gallery-section-header:not(.gallery-header-collapsed) .gallery-section-chevron {
  transform: rotate(90deg);
}

.gallery-section-label {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1;
  min-width: 0;
}

.gallery-section-title {
  font-family: "Great Vibes", cursive;
  font-size: 1.7rem;
  font-weight: 400;
  color: #e8d5c4;
  line-height: 1.2;
}

.gallery-section-subtitle {
  font-size: 0.72rem;
  color: #777;
  font-weight: 500;
  letter-spacing: 0.03em;
}

.gallery-section-count {
  font-size: 0.82rem;
  color: #b59a72;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.gallery-grid-wrap {
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.25s ease;
  max-height: none;
  opacity: 1;
}

.gallery-collapsed {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
  padding: 0.8rem 0;
}

.gallery-image {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.gallery-image:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 14px rgba(214, 51, 132, 0.25);
}

.gallery-image-hidden {
  display: none;
}

.gallery-toggle-btn {
  display: block;
  width: 100%;
  padding: 0.65rem;
  margin-top: 0.3rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #b59a72;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.gallery-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(214, 51, 132, 0.3);
}

.gallery-download-btn {
  display: block;
  text-align: center;
  padding: 0.65rem;
  margin-top: 0.3rem;
  background: rgba(214, 51, 132, 0.15);
  border: 1px solid rgba(214, 51, 132, 0.25);
  border-radius: 8px;
  color: #ff90bf;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.gallery-download-btn:hover {
  background: rgba(214, 51, 132, 0.25);
  border-color: rgba(214, 51, 132, 0.5);
}

/* ── Wedding Pictures ──────────────────────────────────────────────────────── */

.pictures-upload-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

#pic-input {
  display: none;
}

.upload-file-label {
  display: inline-block;
  padding: 0.5rem 1.1rem;
  background: #b59a72;
  color: #fff;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: background 0.2s;
}

.upload-file-label:hover {
  background: #9c7e55;
}

#upload-pic-btn {
  padding: 0.5rem 1.1rem;
  background: #6b513a;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: background 0.2s;
}

#upload-pic-btn:hover:not(:disabled) {
  background: #4e3828;
}

#upload-pic-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.pic-file-count {
  font-size: 0.88rem;
  color: #888;
}

.upload-pic-status {
  min-height: 1.3em;
  font-size: 0.9rem;
  color: #6b513a;
  margin-bottom: 0.75rem;
}

.pictures-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 0.5rem;
}

.picture-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  border-radius: 8px;
  overflow: hidden;
  background: #f5f0ea;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.picture-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.pic-thumb {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.pic-video-wrap {
  position: relative;
  line-height: 0;
}

.pic-video-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.pic-download-btn {
  display: block;
  text-align: center;
  padding: 0.35rem 0.5rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #6b513a;
  text-decoration: none;
  letter-spacing: 0.03em;
  background: #efe8df;
  transition: background 0.2s;
}

.pic-download-btn:hover {
  background: #ddd3c6;
}

.no-pics-msg {
  color: #999;
  font-style: italic;
  grid-column: 1 / -1;
}

.picture-item-hidden {
  display: none;
}

.guest-toggle-btn {
  display: block;
  width: 100%;
  padding: 0.65rem;
  margin-top: 0.5rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #b59a72;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.guest-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(214, 51, 132, 0.3);
}

/* ── Share button ── */
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.42rem 0.9rem 0.42rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(0, 0, 0, 0.36);
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  transition: background 0.2s;
  white-space: nowrap;
}

.share-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* ── Share modal ── */
.share-modal[hidden] {
  display: none;
}

.share-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
}

.share-dialog {
  position: relative;
  z-index: 1;
  background: #1c1310;
  border: 1px solid rgba(255, 248, 238, 0.2);
  border-radius: 20px;
  padding: 2rem 2rem 1.6rem;
  text-align: center;
  max-width: 300px;
  width: 90vw;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.share-dialog h2 {
  margin: 0;
  font-family: "Cormorant Garamond", "Great Vibes", serif;
  font-size: 1.6rem;
  color: #fff8ee;
}

.share-dialog p {
  margin: 0;
  font-size: 0.85rem;
  color: #b59a72;
}

.share-close {
  position: absolute;
  top: 0.6rem;
  right: 0.8rem;
  background: none;
  border: none;
  color: #fff8ee;
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.2rem 0.4rem;
  opacity: 0.6;
  transition: opacity 0.15s;
}

.share-close:hover {
  opacity: 1;
}

.qr-container {
  display: flex;
  justify-content: center;
}

.copy-link-btn {
  padding: 0.5rem 1.6rem;
  background: rgba(255, 248, 238, 0.1);
  color: #fff8ee;
  border: 1px solid rgba(255, 248, 238, 0.25);
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  font-family: inherit;
  transition: background 0.2s;
}

.copy-link-btn:hover {
  background: rgba(255, 248, 238, 0.2);
}

.copy-confirm {
  color: #b59a72;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.copy-confirm[hidden] {
  display: none;
}

/* ── Media Queries ────────────────────────────────────────────────────────── */

@media (max-width: 760px) {
  .main-nav {
    align-items: stretch;
    gap: 0.75rem;
    padding: max(0.8rem, env(safe-area-inset-top)) 0.8rem 0.6rem;
  }

  .logo {
    font-size: 1.7rem;
  }

  .right-controls {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .language-switch {
    width: 100%;
    justify-content: space-between;
  }

  .lang-btn {
    flex: 1;
    justify-content: center;
    min-height: 36px;
    padding: 0.34rem 0.22rem;
    font-size: 0.62rem;
  }

  .hero-content {
    margin-top: 8.7rem;
    width: min(96vw, 560px);
    padding: 0 0.25rem;
  }

  .hero-content h1 {
    font-size: clamp(2.3rem, 13vw, 3.7rem);
  }

  .subheading {
    letter-spacing: 0.2em;
    font-size: 0.64rem;
    margin-bottom: 1.2rem;
  }

  .hero-message {
    font-size: clamp(1.4rem, 6vw, 2rem);
  }

  .info-block {
    width: min(94vw, 540px);
    padding: 2.2rem 0;
  }

  .info-block h2 {
    font-size: 2.8rem;
  }

  .info-block p {
    font-size: 1.14rem;
    line-height: 1.72;
  }

  .maps-button {
    font-size: 1.06rem;
  }

  .pictures-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .gallery-section-title {
    font-size: 1.3rem;
  }
}

@media (max-width: 420px) {
  .hero-content {
    margin-top: 9.4rem;
  }

  .lang-btn span:last-child {
    font-size: 0.58rem;
  }

  .hero-message {
    font-size: clamp(1.2rem, 7vw, 1.6rem);
  }

  .info-block h2 {
    font-size: 2.55rem;
  }

  .info-block p {
    font-size: 1.08rem;
    line-height: 1.68;
  }

  .maps-button {
    font-size: 1rem;
  }

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

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.4rem;
  }

  .gallery-section-title {
    font-size: 1.15rem;
  }
}

/* ── Footer ─────────────────────────────────────────────────────────────────── */

.site-footer {
  text-align: center;
  padding: 3rem 1.5rem 2.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 2rem;
}

.footer-names {
  font-family: "Great Vibes", cursive;
  font-size: 2rem;
  color: #e8d5c4;
  margin: 0 0 0.3rem;
}

.footer-tagline {
  font-size: 0.85rem;
  color: #888;
  margin: 0 0 0.8rem;
  font-style: italic;
}

.footer-copy {
  font-size: 0.72rem;
  color: #555;
  margin: 0;
}
