: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: url("./wedding-photo.jpg") center / cover no-repeat;
}

.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;
}

.menu {
  display: flex;
  gap: 1.15rem;
}

.menu a {
  color: var(--white);
  text-decoration: none;
  letter-spacing: 0.16em;
  font-size: 0.74rem;
  font-weight: 600;
}

.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 1.8rem;
  color: var(--white);
  font-size: 0.74rem;
  letter-spacing: 0.33em;
  font-weight: 600;
}

.countdown {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.countdown-circle {
  width: 108px;
  height: 108px;
  border-radius: 999px;
  background: var(--pink);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-shadow: 0 12px 22px rgba(214, 51, 132, 0.4);
}

.countdown-circle span {
  font-size: 1.85rem;
  line-height: 1;
  font-weight: 700;
}

.countdown-circle small {
  margin-top: 0.22rem;
  letter-spacing: 0.14em;
  font-size: 0.66rem;
  font-weight: 700;
}

.cta {
  margin: 1.9rem auto 0;
  display: inline-block;
  text-decoration: none;
  color: var(--pink);
  background: var(--white);
  border-radius: 999px;
  padding: 0.85rem 1.7rem;
  letter-spacing: 0.08em;
  font-weight: 700;
  font-size: 0.8rem;
}

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

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

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

.info-block p,
.invite-card p,
.invite-card label {
  color: #f3f3f3;
}

.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);
}

.rsvp-form {
  display: grid;
  gap: 0.8rem;
  margin-top: 1rem;
}

.rsvp-form label {
  display: grid;
  gap: 0.38rem;
  font-size: 0.92rem;
}

.rsvp-form input,
.rsvp-form textarea,
.rsvp-form select {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.78rem;
  font: inherit;
  color: var(--white);
  background: var(--surface-2);
}

.rsvp-form textarea {
  resize: vertical;
}

.rsvp-form button {
  margin-top: 0.4rem;
  border: none;
  border-radius: 999px;
  padding: 0.9rem 1rem;
  font: inherit;
  font-weight: 700;
  color: var(--pink);
  background: var(--white);
  cursor: pointer;
}

.contact-info {
  margin: 0.25rem 0 0;
  color: #f3d5e2;
  font-size: 0.9rem;
}

#form-status {
  min-height: 1.2rem;
  font-weight: 500;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}

.gallery-image {
  width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
  object-fit: cover;
  aspect-ratio: 1;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-image:hover {
  transform: scale(1.04);
  box-shadow: 0 8px 16px rgba(214, 51, 132, 0.3);
}

.pets-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.pet-card {
  text-align: center;
}

.pet-card-wide {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.pet-card-wide .pet-image {
  max-width: 560px;
  width: 100%;
  aspect-ratio: auto;
  height: auto;
  object-fit: unset;
}

.pet-image {
  width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
  object-fit: cover;
  aspect-ratio: 1;
  margin-bottom: 0.8rem;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pet-image:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 16px rgba(214, 51, 132, 0.2);
}

.pet-card h3 {
  margin: 0 0 0.3rem;
  font-size: 1.1rem;
  color: var(--white);
}

.pet-card p {
  margin: 0;
  font-size: 0.9rem;
  color: #d5afc5;
}

/* 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; }

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

@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;
  }

  .menu {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.38rem;
    padding: 0.36rem;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.34);
  }

  .menu a {
    text-align: center;
    font-size: 0.62rem;
    letter-spacing: 0.09em;
    padding: 0.46rem 0.3rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
  }

  .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;
  }

  .countdown {
    display: grid;
    grid-template-columns: repeat(2, minmax(64px, 1fr));
    gap: 0.5rem;
    width: min(238px, 88vw);
    margin: 0 auto;
  }

  .countdown-circle {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
  }

  .countdown-circle span {
    font-size: 1.28rem;
  }

  .countdown-circle small {
    letter-spacing: 0.08em;
    font-size: 0.54rem;
  }

  .cta {
    width: min(280px, 88vw);
    padding: 0.86rem 1.15rem;
    margin-top: 1.35rem;
  }

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

  .rsvp-form input,
  .rsvp-form textarea,
  .rsvp-form select,
  .rsvp-form button {
    min-height: 44px;
  }

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

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

  .pet-card-wide {
    grid-column: auto;
  }
}

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

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

  .countdown {
    grid-template-columns: repeat(2, minmax(58px, 1fr));
    width: min(214px, 84vw);
    gap: 0.42rem;
  }

  .countdown-circle span {
    font-size: 1.14rem;
  }

  .countdown-circle small {
    font-size: 0.5rem;
  }

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

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

  .gallery-image {
    border-radius: 8px;
  }

  .pets-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .pet-card h3 {
    font-size: 1rem;
  }

  .pet-card p {
    font-size: 0.85rem;
  }
}
