/* =================== TYPOGRAPHY & FONTS =================== */
@import url('https://fonts.googleapis.com/css2?family=Cinzel&family=Quicksand&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Comfortaa:wght@300..700&family=Marck+Script&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400..700&display=swap');

/* =================== VARIABLES =================== */
:root {
  --h1-size: 4rem;
  --h2-size: 1.6rem;
  --h3-size: 1.6rem;
  --text-size: 1.3rem;
  --horizontal-margin-spacing: 6rem;
  --grey-color-light: rgba(232,230,230,.6);
  --grey-color: rgba(232,230,230,1);
  --gold: #327005;
  --gold-dark: #1E4403;
}

/* =================== UNIVERSAL =================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  color: #212121;
}
html { scroll-behavior: smooth; }

body {
  font-family: "Cormorant Garamond", serif;
  background: #fff;
  line-height: 1.5;
}

.hz-margin {
  padding: 0 var(--horizontal-margin-spacing);
  padding-top: 60px; /* под фиксированный navbar */
}

h1 {
  font-size: var(--h1-size);
  font-weight: 500;
  font-family: "Cormorant Garamond", serif;
}
h2 {
  font-size: var(--h2-size);
  font-weight: 500;
  font-family: "Cormorant Garamond", serif;
}
h3 {
  font-size: var(--h3-size);
  font-weight: 500;
  font-family: 'Cinzel', serif;
}

.text {
  font-family: "Caveat", cursive;
  font-size: var(--text-size);
  line-height: 1.5rem;
}

.reveal { transform: translateY(150px); opacity: 0; transition: 1s all ease; }
.reveal.active { transform: translateY(0); opacity: 1; }

/* =================== BUTTONS =================== */
.huge-btn {
  display: inline-block;
  padding: 15px 40px;
  border-radius: 50px;
  border: none;
  background-color: var(--gold);
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease;
}
.huge-btn:hover { background-color: var(--gold-dark); }

/* =================== NAVBAR =================== */
nav {
  height: 60px;
  width: 100%;
  background-color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  box-shadow: 0px 2px 5px rgba(0,0,0,0.2);
  position: fixed;
  top: 0;
  z-index: 1000;
}
label.logo { font-size: 24px; font-weight: bold; color: black; }
nav ul { display: flex; list-style: none; margin: 0; padding: 0; }
nav ul li { margin: 0 15px; }

/* одинаковый стиль для ссылок и кнопок в navbar */
nav ul li a,
nav ul li button.nav-link {
  text-decoration: none;
  font-family: 'Quicksand', sans-serif;
  font-size: 16px;
  color: black;
  padding: 10px 20px;
  border-radius: 50px;
  border: none;
  background: none;
  cursor: pointer;
  display: inline-block;
  transition: background-color 0.3s ease, color 0.3s ease;
}
nav ul li a:hover,
nav ul li button.nav-link:hover {
  background-color: #327005;
  color: white;
}

/* =================== HOME =================== */
.container-out {
  margin-top: 10vh;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}
.home-img {
  background-image: url('../images/wedding-photo.jpg');
  background-size: cover;
  background-position: center;
}
.home-img-sm {
  display: none;
  width: 100%;
  margin-top: 20px;
  height: 50vh;
}
#home-img-lg {
  display: block;
  height: 110vh;
  width: 50vw;
  background-position-x: -100px;
}
@media (max-width:1000px) {
  .container-out { flex-direction: column; }
  .home-img-sm { display: block; }
  #home-img-lg { display: none; }
}

/* =================== CELEBRATION =================== */
.celebration {
  display: block;
  background-color: var(--grey-color-light);
  position: relative;
  top: -30vh;
  width: 100%;
  backdrop-filter: blur(4px);
  padding: 8vh var(--horizontal-margin-spacing);
}
.celebration-container {
  display: flex;
  flex-direction: row;
  margin: 8vh 0;
}
.celebration-img {
  background-image: url('../images/celebration.jpg');
  height: 70vh;
  width: 30vw;
  background-position: center;
  background-size: cover;
}
.timings { margin: 10px; }
.celebration-container .text { padding: 1rem 0 1rem 4rem; }
@media (max-width:1000px) {
  .celebration { top: 0; backdrop-filter: none; }
  .celebration-container { flex-direction: column; }
  .celebration-img { width: 100%; height: 50vh; }
}

/* =================== DRESSCODE =================== */
#dresscode {
  padding-top: 10vh;
  display: flex;
  flex-direction: row;
  margin: 10vh 0;
}
#dresscode h3 { width: 40vw; }
#dresscode p {
  width: 40vw;
  text-align: justify;
  font-size: var(--h3-size);
  line-height: var(--h3-size);
}
@media (max-width:1000px) {
  #dresscode { flex-direction: column; }
  #dresscode h3, #dresscode p { width: 100%; margin: 5px 0; }
  #dresscode p { font-size: var(--text-size); line-height: var(--text-size); }
}

/* =================== GALLERY =================== */
.gallery {
  display: flex;
  flex-wrap: wrap;
  padding: 10vh 0;
  justify-content: center;
  gap: 15px;
}
.gallery-img {
  flex: 1 1 calc(30% - 20px);
  background-size: cover;
  background-position: center;
  aspect-ratio: 3/4;
}
.gallery-img:nth-child(1){ background-image: url('../images/left-gallery.jpg'); }
.gallery-img:nth-child(2){ background-image: url('../images/center-gallery.jpg'); }
.gallery-img:nth-child(3){ background-image: url('../images/right-gallery.jpg'); }
@media (max-width:1000px) {
  .gallery { flex-direction: column; padding: 0; }
  .gallery-img { width: 100%; aspect-ratio: 3/4; }
}

/* =================== QUOTE =================== */
.quote { margin: 10vh 0; }
.quote h1 {
  width: 55vw;
  font-size: 3rem;
  text-align: center;
  margin: auto;
}
.author { text-align: center; margin: 20px 0 10vh; }

/* =================== PHOTO =================== */
.photo {
  height: 100vh;
  width: 100vw;
  background-image: url('../images/main-photo.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
@media (max-width: 768px) { .photo { height: 50vh; background-position: top; } }

/* =================== LOCATION =================== */
#location {
  background-color: var(--grey-color);
  padding: 10vh var(--horizontal-margin-spacing);
}
.location-container {
  display: flex;
  justify-content: space-around;
  margin: 20vh 0;
}
.location-item .text { margin: 20px 0; }
.links { text-decoration: underline; cursor: pointer; }
@media (max-width:1000px) { .location-container { flex-direction: column; margin: 10px 0; } }

/* =================== GIFTS =================== */
#gifts {
  padding: 20vh var(--horizontal-margin-spacing);
  display: flex;
  justify-content: space-between;
}
.gifts-container { width: 40vw; }
.gifts-img {
  width: 40vw;
  height: 40vh;
  background-image: url('../images/gift-image.jpg');
  background-size: cover;
  background-position: top;
}
.gifts-img-sm { display: none; }
@media (max-width:1000px) {
  #gifts { flex-direction: column; }
  .gifts-container, .gifts-img { width: 100%; }
  .gifts-img-sm { display: block; margin-top: 10vh; }
  .gifts-img-lg { display: none; }
}

/* =================== PARTING MESSAGE =================== */
.parting-message h1,
.parting-message h3 {
  text-align: center;
  margin-top: 10vh;
}

.parting-message button {
  display: block;
  margin: 40px auto 0 auto;
}

/* =================== FORM =================== */
.form-container {
  text-align: center;
  max-width: 400px;
  width: 100%;
  margin: 100px auto;
  padding: 40px;
  background: #fff;
  border-radius: 15px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}
form label { display: block; margin-bottom: 5px; width: 100%; text-align: left; }
form input, form textarea {
  width: 100%; padding: 10px; margin-bottom: 15px;
  border: 1px solid #E6E2DF; border-radius: 5px;
  font-size: 1rem; background-color: #F9F5F0; color: #5A463A;
}
form textarea { resize: none; height: 100px; }
.number-input { display: flex; justify-content: center; gap: 10px; margin-bottom: 20px; }
.number-input input { width: 50px; text-align: center; }
.error-message {
  color: #327005;
  font-size: 0.9rem;
  margin: 10px 0;
  text-align: center;
}


/* =================== FEED =================== */
.feed-container { padding-top: 60px; }
.feed { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.feed-item { aspect-ratio: 1 / 1; position: relative; overflow: hidden; }
.feed-item img, .feed-item video { width: 100%; height: 100%; object-fit: cover; cursor: pointer; }
.feed-item img:hover, .feed-item video:hover { transform: scale(1.05); }

.modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.9); justify-content: center; align-items: center; z-index: 2000; }
.modal-content { max-width: 90%; max-height: 90%; border-radius: 10px; }
.close { position: absolute; top: 20px; right: 35px; font-size: 40px; color: #fff; cursor: pointer; }
.nav-btn { position: absolute; top: 50%; transform: translateY(-50%); font-size: 40px; color: white; cursor: pointer; padding: 10px; background: rgba(0,0,0,0.4); border-radius: 50%; }
.prev { left: 20px; } .next { right: 20px; }
.download-btn { position: absolute; bottom: 20px; right: 30px; font-size: 18px; color: white; background: rgba(0,0,0,0.6); padding: 10px 20px; border-radius: 8px; text-decoration: none; }
.download-btn:hover { background: #327005; }
.video-thumb::after { content: "▶"; position: absolute; color: white; font-size: 40px; top: 50%; left: 50%; transform: translate(-50%, -50%); }
#loadingOverlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.7); color: white; font-size: 2rem; justify-content: center; align-items: center; z-index: 3000; }
