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

:root {
  --bg-white: #FFFFFF;
  --bg-cream: #F8F3EF;
  --brown: #4A2913;
  --brown-muted: #73543F;
  --blue-dark: #104175;
  --blue: #3D86BE;
  --shadow: 0 2px 20px rgba(74, 41, 19, 0.08);
  --radius: 12px;
  --max-w: 1200px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Book Antiqua', 'Palatino Linotype', Palatino, serif;
  color: var(--brown);
  background: var(--bg-cream);
  line-height: 1.6;
}

.script {
  font-family: 'Corinthia', cursive;
  color: var(--blue-dark);
}

/* Navigation */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(74, 41, 19, 0.08);
  transition: transform 0.3s;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0.6rem 1.5rem;
  position: relative;
}

.nav-logo {
  font-family: 'Corinthia', cursive;
  font-size: 32px;
  color: var(--blue-dark);
  line-height: 1;
}
.nav-logo:hover { background: none; }

.nav-toggle {
  display: block;
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  color: var(--blue-dark);
}
.nav-toggle svg {
  display: block;
  width: 28px;
  height: 28px;
}

nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(8px);
  border-radius: 0 0 12px 12px;
  padding: 0;
  gap: 8px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  visibility: hidden;
  transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease, visibility 0s 0.4s;
  z-index: 99;
}
nav ul.open {
  max-height: 500px;
  opacity: 1;
  padding: 24px;
  visibility: visible;
  transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease, visibility 0s;
}

nav a {
  text-decoration: none;
  color: var(--blue-dark);
  font-size: 14px;
  padding: 6px 14px;
  border-radius: 20px;
  transition: all 0.2s;
  white-space: nowrap;
}

nav a:hover { background: rgba(16, 65, 117, 0.1); color: var(--blue-dark); }

.nav-btn-item {
  margin-top: 8px;
}

/* Button component */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  border: none;
  border-radius: 50px;
  padding: 0.7rem 2rem;
  transition: background 0.2s;
}
.btn-primary {
  background: var(--blue);
  color: var(--bg-white);
}
.btn-primary:hover {
  background: var(--blue-dark);
}
.btn-disabled {
  opacity: 0.5;
  cursor: default;
  pointer-events: none;
}
.btn svg {
  width: 18px;
  height: 18px;
}

.nav-btn {
  background: var(--blue) !important;
  color: var(--bg-white) !important;
  border-radius: 50px !important;
  padding: 6px 14px !important;
}
.nav-btn:hover {
  background: var(--blue-dark) !important;
}

nav a.btn.btn-primary {
  background: var(--blue);
  color: var(--bg-white);
  border-radius: 50px;
  padding: 6px 14px;
}
nav a.btn.btn-primary:hover {
  background: var(--blue-dark);
}

@media (min-width: 769px) {
  .nav-toggle { display: none; }
  nav ul {
    display: flex;
    flex-direction: row;
    position: static;
    background: none;
    backdrop-filter: none;
    border-radius: 0;
    padding: 0;
    gap: 0.25rem;
    max-height: none;
    opacity: 1;
    overflow: visible;
    visibility: visible;
    transition: none;
  }
  nav ul.open {
    max-height: none;
    opacity: 1;
    padding: 0;
    visibility: visible;
    transition: none;
  }
  nav a { padding: 6px 14px; }
  .nav-btn-item { margin-top: 0; margin-left: 14px; }
}

@media (max-width: 768px) {
  nav a { font-size: 20px; }
  nav ul { gap: 16px; }
}

/* Hero */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  background: var(--bg-white);
  padding: 100px 24px;
}
.hero-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: 1000px;
  width: 100%;
}
.hero-left {
  width: 50%;
  text-align: center;
}
.hero-left .script {
  font-family: 'Corinthia', cursive;
  color: var(--blue-dark);
  font-size: 64px;
  line-height: 1.15;
}
.hero-ampersand {
  font-family: 'Corinthia', cursive;
  font-size: 32px;
  color: var(--blue-dark);
  line-height: 1;
  margin: -16px 0;
}
.hero-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 0.5rem 0;
}
.hero-dots span {
  display: block;
  border-radius: 50%;
  background: var(--blue);
}
.hero-dots span:nth-child(1),
.hero-dots span:nth-child(3) {
  width: 6px;
  height: 6px;
}
.hero-dots span:nth-child(2) {
  width: 10px;
  height: 10px;
}
.hero-subtitle {
  font-family: 'Book Antiqua', 'Palatino Linotype', Palatino, serif;
  font-size: 20px;
  color: var(--brown);
  margin-top: 1rem;
  line-height: 1.4;
}
.hero-date {
  font-family: 'Book Antiqua', 'Palatino Linotype', Palatino, serif;
  font-size: 24px;
  font-weight: bold;
  color: var(--brown);
  margin-top: 0.5rem;
}
.hero-right {
  width: 50%;
  display: flex;
  justify-content: center;
}
.hero-circle {
  width: 100%;
  aspect-ratio: 1;
  max-width: 400px;
  background: url('resources/images/hero.png') center/cover no-repeat;
}

@media (max-width: 767px) {
  .hero-inner {
    flex-direction: column;
    gap: 2rem;
  }
  .hero-left, .hero-right { width: 100%; }
  .hero-right { order: -1; }
  .hero-left .script { font-size: 40px; }
  .hero-ampersand { font-size: 20px; margin: -10px 0; }
  .hero-subtitle { font-size: 16px; }
  .hero-date { font-size: 18px; }
}

/* Sections */
section { background: var(--bg-white); }
section:nth-of-type(even) { background: var(--bg-cream); }

section {
  padding: 5rem 1.5rem;
  margin: 0 auto;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  position: relative;
}
section:nth-of-type(odd) .section-title { color: var(--blue-dark); }
section:nth-of-type(even) .section-title { color: var(--brown); }
.section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.section-title-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 0.5rem 0 3rem 0;
}
.section-title-dots span {
  display: block;
  border-radius: 50%;
}
.section-title-dots span:nth-child(1),
.section-title-dots span:nth-child(3) {
  width: 6px;
  height: 6px;
}
.section-title-dots span:nth-child(2) {
  width: 10px;
  height: 10px;
}
section:nth-of-type(odd) .section-title-dots span { background: var(--brown-muted); }
section:nth-of-type(even) .section-title-dots span { background: var(--blue); }

/* Ceremony */
#obrad {
  text-align: center;
  background: var(--bg-cream);
  padding: 5rem 1.5rem;
}

#obrad .section-title { margin-bottom: 1.5rem; }
#obrad .section-title::after { display: none; }

.ceremony-text {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  line-height: 1.7;
  max-width: 700px;
  margin: 0 auto;
}

.ceremony-big {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  margin-top: 1rem;
  font-weight: bold;
  color: var(--blue-dark);
}

/* Timeline */
.timeline {
  position: relative;
  max-width: 400px;
  margin: 0 auto;
  padding: 0;
}

.timeline-item {
  position: relative;
  padding: 0 0 1.2rem 56px;
  min-height: 36px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 27px;
  top: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
  z-index: 1;
}

.timeline-item::after {
  content: '';
  position: absolute;
  left: 30px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: repeating-linear-gradient(
    to bottom,
    var(--blue) 0px,
    var(--blue) 4px,
    transparent 4px,
    transparent 10px
  );
  opacity: 0.35;
}
.timeline-item:first-child::after {
  top: 6px;
}
.timeline-item:last-child::after {
  bottom: 11px;
}

.timeline-item .time {
  color: var(--blue-dark);
  font-weight: bold;
  font-size: 16px;
  margin-bottom: 2px;
  line-height: 1.2;
}

.timeline-item .text {
  font-size: 20px;
  color: var(--brown);
  line-height: 1.4;
}

/* About */
.about-grid {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  align-items: center;
  max-width: 800px;
  margin: 0 auto;
  overflow: hidden;
}
.about-person {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  text-align: center;
  max-width: 100%;
}
.about-circle {
  position: relative;
  width: 100%;
  max-width: 360px;
  aspect-ratio: 1;
}
.about-circle .photo {
  position: absolute;
  inset: 0;
  background: url('resources/images/klarka.png') center/cover no-repeat;
  z-index: 0;
}
.about-circle .deco {
  position: absolute;
  inset: -15px;
  background: url('resources/images/ozdoba-4.svg') center/contain no-repeat;
  z-index: 1;
  pointer-events: none;
}
.about-circle .deco-bride {
  background-image: url('resources/images/ozdoba-1.svg');
}
.about-circle .deco-groom {
  background-image: url('resources/images/ozdoba-4.svg');
}
.about-name {
  font-size: 1.5rem;
  color: var(--blue-dark);
  margin-top: 16px;
  margin-bottom: 24px;
}
.about-text {
  font-size: 1rem;
  color: var(--brown);
  line-height: 1.6;
  margin-top: 0.3rem;
}

.about-details {
  text-align: center;
  font-size: 20px;
  color: var(--brown);
  line-height: 1.6;
  width: 100%;
  max-width: 100%;
}
.about-row {
  margin-bottom: 1.5rem;
}
.about-label {
  font-size: 16px;
  font-weight: bold;
  color: var(--blue-dark);
  margin-bottom: 2px;
}
.about-value {
  font-size: 20px;
  color: var(--brown);
}

/* FAQ */
.faq-list {
  max-width: 700px;
  margin: 0 auto;
}

.faq-intro {
  color: var(--brown);
  font-size: 20px;
  line-height: 1.7;
  margin-bottom: 2.5rem;
}
.faq-intro p + p {
  margin-top: 1em;
}

.faq-category {
  margin-bottom: 48px;
}
.faq-category:last-child {
  margin-bottom: 0;
}

.faq-category-title {
  font-size: 16px;
  font-weight: bold;
  color: var(--brown);
  margin-bottom: 0.5rem;
}

.faq-item {
  border-bottom: 1px solid rgba(74, 41, 19, 0.1);
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: 1.2rem 0;
  font-family: inherit;
  font-size: 20px;
  color: var(--blue-dark);
  cursor: pointer;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.faq-question::after {
  content: '+';
  font-size: 1.4rem;
  color: var(--blue-dark);
  flex-shrink: 0;
  transition: transform 0.3s;
}

.faq-item.open .faq-question::after {
  content: '−';
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-answer-inner {
  padding: 0 0 1.2rem 0;
  color: var(--brown);
  line-height: 1.7;
  font-size: 20px;
}
.faq-answer-inner p + p {
  margin-top: 1em;
}
.faq-answer-inner ul {
  margin: 0.5em 0;
  padding-left: 1.5em;
}
.faq-answer-inner li {
  margin-bottom: 0.5em;
}
.faq-answer-inner a {
  color: var(--blue-dark);
}
.faq-answer-inner iframe {
  margin-bottom: 0.5em;
}

.faq-item.open .faq-answer {
  max-height: 1000px;
}

/* Gallery */
.gallery-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  transition: transform 0.2s;
  flex: 1 1 calc(33.333% - 8px);
  min-width: 200px;
}
.gallery-item:hover {
  transform: scale(1.02);
}
.gallery-item::before {
  content: '';
  display: block;
  padding-bottom: 100%;
}
.gallery-item:nth-child(1),
.gallery-item:nth-child(4),
.gallery-item:nth-child(6) {
  flex: 2 1 calc(66.666% - 8px);
}
.gallery-item:nth-child(1)::before,
.gallery-item:nth-child(4)::before,
.gallery-item:nth-child(6)::before {
  padding-bottom: 50%;
}

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

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

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  z-index: 10;
  padding: 8px;
}
.lightbox-close svg {
  width: 32px;
  height: 32px;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 8px;
  object-fit: contain;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  cursor: pointer;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
  z-index: 10;
}
.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.3);
}
.lightbox-nav svg {
  width: 28px;
  height: 28px;
}
.lightbox-prev {
  left: 16px;
}
.lightbox-next {
  right: 16px;
}

@media (max-width: 640px) {
  .gallery-item:nth-child(1),
  .gallery-item:nth-child(4),
  .gallery-item:nth-child(6) {
    flex: 1 1 calc(100% - 0px);
  }
  .gallery-item::before {
    padding-bottom: 133%;
  }
  .gallery-item:nth-child(1)::before,
  .gallery-item:nth-child(4)::before,
  .gallery-item:nth-child(6)::before {
    padding-bottom: 100%;
  }
}

.gallery-link {
  text-align: center;
  margin-top: 2rem;
}

.gallery-link p {
  font-size: 20px;
  color: var(--brown);
  margin-bottom: 1rem;
}

/* People */
.people-category {
  margin-bottom: 64px;
}
.people-category:last-child { margin-bottom: 0; }
.people-category-title {
  font-size: 24px;
  color: var(--brown);
  margin-bottom: 1.5rem;
  text-align: center;
  font-weight: bold;
  letter-spacing: 1px;
}
.people-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 5rem;
  justify-content: center;
}
.person-card {
  text-align: center;
  max-width: 220px;
}
.person-circle {
  position: relative;
  width: 180px;
  aspect-ratio: 1;
  border-radius: 50%;
  margin: 0 auto;
  border: 2px solid var(--blue);
}
.person-circle .photo {
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: url('resources/images/hero.jpg') center/cover no-repeat;
  z-index: 0;
}
.person-name {
  font-size: 20px;
  color: var(--blue-dark);
  margin-top: 20px;
  font-weight: bold;
}
.person-role {
  font-size: 16px;
  color: var(--brown);
  margin-top: 0.15rem;
}

/* Thanks */
.thanks-list {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.thanks-item {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.thanks-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
}
.thanks-icon svg {
  width: 24px;
  height: 24px;
  color: var(--bg-white);
}

.thanks-body {
  flex: 1;
}

.thanks-name {
  font-size: 20px;
  font-weight: bold;
  color: var(--blue-dark);
}

.thanks-role {
  font-size: 16px;
  color: var(--brown);
  font-weight: bold;
  margin-top: 4px;
}

.thanks-desc {
  font-size: 16px;
  color: var(--brown);
  line-height: 1.5;
  margin-top: 4px;
}

/* RSVP */
.rsvp-content {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}
.rsvp-text {
  font-size: 20px;
  color: var(--brown);
  line-height: 1.7;
  margin-bottom: 2rem;
}

@media (max-width: 480px) {
  nav ul { gap: 6px; }
  .about-details { font-size: 16px; }
  .about-value { font-size: 16px; }
  .about-label { font-size: 14px; }
  .about-name { font-size: 1.3rem; }
  .modal-card { padding: 2rem 1.25rem; }
}

/* Changes modal */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  align-items: center;
  justify-content: center;
}
.modal.open {
  display: flex;
}
.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}
.modal-card {
  position: relative;
  background: var(--bg-cream);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 520px;
  width: calc(100% - 48px);
  max-height: 85vh;
  overflow-y: auto;
  padding: 2.5rem 2rem;
}
.modal-card-inner {
  text-align: center;
  color: var(--brown);
  font-size: 18px;
  line-height: 1.7;
}
.modal-sign {
  margin-top: 1.5rem;
  font-size: 18px;
  padding-bottom: 16px;
}
.modal-signature {
  font-size: 36px;
  line-height: 1.2;
}
.modal-ampersand {
  font-size: 18px;
  padding: 0 4px 0 6px;
}
.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  color: var(--brown);
  cursor: pointer;
  padding: 8px;
  z-index: 10;
}
.modal-close svg {
  width: 24px;
  height: 24px;
}
.modal-close:hover {
  color: var(--blue-dark);
}
.modal-btn {
  margin-top: 1.5rem;
  font-size: 16px;
}
