/* =========================================
   SPIS TREŚCI:
   1. ZMIENNE I KONFIGURACJA
   2. EFEKT KOPERTY (ENVELOPE)
   3. NAWIGACJA (STICKY NAV)
   4. HERO (POWITANIE)
   5. NASZA HISTORIA
   6. LICZNIK (COUNTDOWN)
   7. LOKALIZACJA (KIEDY & GDZIE)
   8. RSVP (POTWIERDZENIE)
   9. GALERIA
   10. STRONA PODZIĘKOWAŃ (THANKS)
   11. RESPONSYWNOŚĆ (MEDIA QUERIES)
   =========================================
*/

/* 1. ZMIENNE I KONFIGURACJA */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=Montserrat:wght@300;400;500;600;700&display=swap');

:root {
  --blue: #1a1a1a;  /* zmiana na czarny */
  --nav-blue: #1a1a1a;     /* Zmienione z czerwonego na niebieski */
  --button-color: #b56b6b;
  --bg-creme: #fdfaf6;
  --white: #ffffff;
  --text-dark: #222243;
  --envelope-bg: #358378;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Montserrat', sans-serif;
  background-color: var(--bg-creme);
  color: var(--text-dark);
  line-height: 1.6;
}

body.no-scroll { overflow: hidden; } /* Blokada scrolla dla koperty */

.container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }

.centered-title {
  text-align: center;
  font-family: 'Playfair Display', serif;
  color: var(--blue);
  font-size: 2.8rem;
  margin-bottom: 30px;
  text-transform: uppercase;
}

/* 2. EFEKT KOPERTY (ENVELOPE) */
.envelope-wrapper {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-color: var(--envelope-bg);
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 3px 3px;
  z-index: 10001;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 1.2s cubic-bezier(0.77, 0, 0.175, 1);
}

.envelope-opened { transform: translateY(-100%); }

.envelope-content { text-align: center; color: white; padding: 20px; }

.envelope-text {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.2rem, 5vw, 1.8rem);
  letter-spacing: 5px;
  text-transform: uppercase;
  margin-bottom: 40px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.wax-seal {
  width: 250px; height: 250px;
  background-image: url('logo.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  background-color: transparent;
  cursor: pointer;
  margin: 0 auto;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.3));
  transition: transform 0.3s ease;
  animation: pulseSeal 2.5s infinite;
}

@keyframes pulseSeal {
  0% { transform: scale(1); filter: drop-shadow(0 5px 10px rgba(0,0,0,0.2)); }
  50% { transform: scale(1.05); filter: drop-shadow(0 15px 25px rgba(0,0,0,0.4)); }
  100% { transform: scale(1); filter: drop-shadow(0 5px 10px rgba(0,0,0,0.2)); }
}

.envelope-hint {
  margin-top: 30px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 600;
}

/* --- 3. STICKY NAV (POPRAWIONE) --- */
.sticky-nav {
  position: sticky;
  top: 15px;
  z-index: 10002; /* Musi być nad kopertą jeśli chcemy, by było widać menu */
  display: flex;
  justify-content: center;
  width: 100%;
}

.nav-links-container {
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  pointer-events: auto;
}

.nav-links {
  display: flex;
}

.nav-links a {
  color: var(--nav-blue);
  text-decoration: none;
  margin: 0 15px;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 1px;
}

/* UKRYTY PRZYCISK HAMBURGERA NA DESKTOPACH */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 25px;
  height: 18px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 3px;
  background: var(--nav-blue);
  border-radius: 3px;
  transition: all 0.3s;
}

/* 4. HERO (POWITANIE) */
.hero-full-width {
  position: relative; height: 100vh; min-height: 700px; margin-top: -85px;
  background: url('front.png') center/cover no-repeat fixed;
  display: flex; align-items: center; justify-content: center;
}

.hero-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.35); }
.hero-container { position: relative; z-index: 2; text-align: center; color: #fff; }
.hero-main-title { font-family: 'Playfair Display', serif; font-size: clamp(3.5rem, 12vw, 7.5rem); margin: 0; line-height: 1; text-shadow: 2px 4px 20px rgba(0,0,0,0.4); }
.hero-names { font-family: 'Playfair Display', serif; font-size: clamp(1.8rem, 5vw, 3.5rem); margin: 15px 0; }
.btn-hero { display: inline-block; padding: 18px 45px; border: 2px solid #fff; color: #fff; text-decoration: none; font-weight: 700; text-transform: uppercase; background: rgba(255,255,255,0.1); }

/* 5. NASZA HISTORIA */
.history-section { padding: 100px 0; background: var(--white); text-align: center; }
.history-side-by-side { display: flex; align-items: center; justify-content: center; gap: 40px; margin-top: 40px; flex-wrap: wrap; }
.person-side { flex: 1; min-width: 250px; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.person-side h3 { font-family: 'Playfair Display', serif; color: var(--blue); font-size: 2.2rem; }
.history-photo-center img { width: 250px; height: 350px; object-fit: cover; border-radius: 120px; box-shadow: 0 20px 50px rgba(0,0,0,0.15); border: 5px solid var(--bg-creme); }

/* 6. LICZNIK (COUNTDOWN) */
.countdown-section { margin-top: 80px; padding: 50px; background: var(--bg-creme); border-radius: 30px; text-align: center; }
#countdown-timer { display: flex; justify-content: center; gap: 30px; flex-wrap: wrap; }
.timer-box { text-align: center; min-width: 90px; background: var(--white); padding: 20px 10px; border-radius: 15px; box-shadow: 0 10px 20px rgba(0,0,0,0.05); }
.timer-box span { font-size: 3rem; font-weight: 700; color: var(--blue); display: block; }
.timer-box p { margin: 10px 0 0; text-transform: uppercase; color: var(--button-color); font-weight: 600; font-size: 0.8rem; }

/* 7. LOKALIZACJA (KIEDY & GDZIE) */
.location-section { padding: 100px 0; }
.location-flex-centered { display: flex; flex-direction: column; align-items: center; gap: 60px; }

.location-card {
  display: flex;
  background: #fff;
  padding: 30px;
  border-radius: 25px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.08);
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 30px;
  width: 100%;
}

/* Podział 3-kolumnowy: Zdjęcie | Opis | Mapa */
.loc-img, .loc-details, .loc-map { flex: 1 1 300px; min-width: 280px; }
.loc-img { max-width: 400px; }
.loc-img img { width: 100%; height: 300px; object-fit: cover; border-radius: 15px; }
.loc-details { text-align: center; }
.loc-details h3 { font-family: 'Playfair Display', serif; color: var(--blue); font-size: 1.8rem; margin: 10px 0; }
.place-name { font-weight: 700; color: var(--text-dark); margin-top: 15px !important; }
.loc-map iframe { width: 100%; height: 300px; border-radius: 15px; border: 0; }

/* =========================================
   8. RSVP (POTWIERDZENIE) - POPRAWIONE
   ========================================= */
.rsvp-section {
  position: relative;
  background: url('front.png') center/cover no-repeat fixed;
  padding: 100px 0;
  color: #fff;
}

.rsvp-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.6);
}

/* Kontener główny - CENTROWANIE PIONOWE NAPISU I KARTY */
.rsvp-flex-layout {
  position: relative;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
}

/* LEWA STRONA - NAPISY */
.rsvp-text-side {
  flex: 2;
  min-width: 350px;
  text-align: left;
}

.rsvp-text-side h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  margin-bottom: 15px;
  color: #fff;
  line-height: 1.2;
}

.rsvp-text-side p {
  font-size: 1.1rem;
  line-height: 1.6;
  opacity: 0.95;
  margin-bottom: 0;
  white-space: normal;
}

/* PRAWA STRONA - KARTA ANKIETY */
.rsvp-card-side {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  min-width: 320px;
}

.rsvp-card-box {
  background: #fff;
  color: var(--text-dark);
  padding: 40px;
  border-radius: 25px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.4);
}

/* STYLE POLA FORMULARZA */
.form-group { margin-bottom: 25px; }

.rsvp-card-box label {
  display: block;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.rsvp-card-box input[type="text"] {
    border: 1px solid var(--silver-accent);
    background-color: #fafafa;
    transition: border-color 0.3s;
}

.rsvp-card-box input[type="text"]:focus {
    border-color: var(--black);
    outline: none;
}
.rsvp-card-box textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-family: inherit;
}

/* ZMIANA: CHECKBOX NA PRAWO, NAPIS NA LEWO */
.check-box-wrap {
  display: flex;
  flex-direction: row; /* Tekst pierwszy, znacznik drugi */
  justify-content: space-between; /* Rozsuwa je na boki */
  align-items: center;
  padding: 15px;
  background: var(--bg-creme);
  border-radius: 10px;
  margin-bottom: 25px;
}

.check-box-wrap label {
  margin-bottom: 0; /* Usuwa zbędny odstęp dla równego paska */
  cursor: pointer;
  font-weight: 600;
}

.check-box-wrap input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--blue); /* Kolor zaznaczenia pasujący do strony */
}

.btn-rsvp-send {
  width: 100%;
  background: var(--button-color);
  color: white;
  border: none;
  padding: 18px;
  border-radius: 12px;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.3s;
}

.btn-rsvp-send:hover {
  background: var(--blue);
}

/* 9. GALERIA */
.gallery-section { padding: 80px 0; }
.gallery-layout { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 25px; }
.gallery-layout img { width: 100%; height: 450px; object-fit: cover; border-radius: 15px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); }

/* 10. STRONA PODZIĘKOWAŃ (THANKS) */
.thanks-body { height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #fdfaf6 0%, #f7f1e6 100%); }
.thanks-card { background: var(--white); padding: 60px 40px; border-radius: 30px; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,0.1); }

/* 11. RESPONSYWNOŚĆ (MEDIA QUERIES) */
@media (max-width: 992px) {
  .hero-main-title { font-size: 3.8rem; }
  .history-side-by-side, .location-card, .rsvp-centered-content { flex-direction: column; text-align: center; }
  .text-right, .text-left { text-align: center; }
  .loc-img, .loc-map { max-width: 100%; width: 100%; }
  .loc-img img, .loc-map iframe { height: auto; min-height: 250px; }
  .rsvp-info-centered h2 { font-size: 2rem; }
  .rsvp-flex-layout { flex-direction: column; text-align: center;}
  .rsvp-text-side { text-align: center; margin-bottom: 30px;}
  .rsvp-card-side { justify-content: center; width: 100%; }
}
/* --- 11. RESPONSYWNOŚĆ (DLA MENU) --- */
@media (max-width: 992px) {
  .menu-toggle {
    display: flex; /* Pokazujemy hamburgera na telefonie */
  }

  .nav-links {
    display: none; /* Chowamy linki standardowo */
    position: absolute;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    width: 200px;
    flex-direction: column;
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border: 1px solid #eee;
  }

  .nav-links.active {
    display: flex; /* Pokazujemy po kliknięciu */
  }

  .nav-links a {
    margin: 10px 0;
    text-align: center;
    font-size: 0.9rem;
  }

  /* Animacja ikony X po otwarciu */
  .menu-toggle.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  .menu-toggle.open span:nth-child(2) { opacity: 0; }
  .menu-toggle.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }