/* ========================================
   V2: Post-Wedding Announcement Site
   Supplements parent site.css + static.css
   ======================================== */

/* --- Global Overrides to fight parent CSS --- */

/* Force decorative monogram images to stay small */
img[src*="assets/6.png"] {
  width: 80px !important;
  max-width: 80px !important;
  height: auto !important;
}

/* --- Header Overrides --- */

/* Show nav items (override v1 "hide Home" rule) */
.header-nav-item--homepage {
  display: block !important;
}
.header-nav-item--homepage a {
  display: inline !important;
}

/* Hide RSVP CTA button in header */
.header .header-actions-action--cta {
  display: none !important;
}

/* Show nav links (override v1 hide rules) */
.header-nav-list .header-nav-item a {
  display: inline !important;
}

/* --- "Just Married" subtitle on hero --- */
.hero-subtitle {
  text-align: center;
  font-family: MaldivesSignature, cursive;
  font-size: clamp(2.5rem, 4vw + 1rem, 4rem);
  font-weight: 400;
  color: #fff;
  margin-bottom: 0;
  line-height: 1.2;
}

/* --- Section heading pattern (lines + text) --- */
.section-heading {
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.section-heading-line {
  flex: 0 1 80px;
  height: 1px;
  background: #000;
}

.section-heading h2 {
  white-space: nowrap;
  margin: 0;
}

/* --- Wedding Day Section --- */
#wedding-day .featured-photos {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
  max-width: 1100px;
  margin: 0 auto;
}

#wedding-day .featured-photos img {
  width: 100%;
  height: 350px;
  object-fit: cover;
  display: block;
}

/* --- Wedding Video Section --- */
#wedding-video {
  position: relative;
  width: 100%;
  padding: 0;
  margin: 0;
}

#wedding-video .video-container {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 */
  overflow: hidden;
  background: #000;
}

#wedding-video video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}

#wedding-video .audio-icon {
  position: absolute;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  cursor: pointer;
  z-index: 10;
}

#wedding-video:hover .audio-icon {
  opacity: 1;
}

#wedding-video .audio-icon.unmuted {
  background: rgba(0, 0, 0, 0.8);
}

#wedding-video .audio-icon svg {
  width: 24px;
  height: 24px;
  fill: #000;
}

#wedding-video .audio-icon.unmuted svg {
  fill: #fff;
}

/* --- Photo Gallery --- */

/* Initially hide items beyond the preview count (show first 16) */
.gallery-grid:not(.gallery-show-all) .gallery-item:nth-child(n+17) {
  display: none;
}

.gallery-view-all-wrapper {
  text-align: center;
  margin-top: 2.5rem;
}

.gallery-view-all-btn {
  display: inline-block;
  padding: 1rem 3rem;
  background: #000;
  color: #fff;
  border: none;
  border-radius: 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.2s ease;
  font-family: inherit;
}

.gallery-view-all-btn:hover {
  opacity: 0.8;
}

.gallery-grid {
  column-count: 4;
  column-gap: 8px;
  max-width: 1200px;
  margin: 0 auto;
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: 8px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s ease, filter 0.4s ease;
}

.gallery-item:hover img {
  transform: scale(1.03);
  filter: brightness(1.05);
}

/* Lazy load placeholder */
.gallery-item img[loading="lazy"]:not([src=""]) {
  background: #e8e8e8;
}

/* --- Lightbox --- */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 100000;
  display: none;
  align-items: center;
  justify-content: center;
}

.lightbox.active {
  display: flex;
}

.lightbox-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.92);
  animation: fadeIn 0.3s ease;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.lightbox-image {
  max-width: 90vw;
  max-height: 82vh;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox-image.loaded {
  opacity: 1;
}

.lightbox-close {
  position: fixed;
  top: 20px;
  right: 25px;
  font-size: 2.5rem;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 2;
  line-height: 1;
  padding: 0.5rem;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

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

.lightbox-prev,
.lightbox-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  font-size: 3rem;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
  padding: 1rem;
  z-index: 2;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

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

.lightbox-prev {
  left: 15px;
}

.lightbox-next {
  right: 15px;
}

.lightbox-counter {
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 1rem;
  font-family: 'orpheus-pro', serif;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* --- Scroll margin for anchor nav --- */
#our-story,
#wedding-day,
#gallery,
#wedding-video,
#registry {
  scroll-margin-top: 80px;
}

/* --- Digital Guestbook --- */
#guestbook {
  scroll-margin-top: 80px;
}

.guestbook-container {
  max-width: 700px;
  margin: 0 auto;
}

.guestbook-form {
  margin-bottom: 3rem;
}

.guestbook-form .form-field {
  margin-bottom: 1.5rem;
}

.guestbook-form label {
  display: block;
  font-size: 1rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
  color: #000;
  letter-spacing: 0.02em;
}

.guestbook-form input,
.guestbook-form textarea {
  width: 100%;
  padding: 1rem;
  border: 1px solid #ddd;
  border-radius: 0;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s ease;
  background: #fff;
  box-sizing: border-box;
}

.guestbook-form input:focus,
.guestbook-form textarea:focus {
  outline: none;
  border-color: #000;
}

.guestbook-form textarea {
  resize: vertical;
  min-height: 120px;
}

.guestbook-char-count {
  font-size: 0.8rem;
  color: #999;
  text-align: right;
  margin-top: 0.25rem;
}

.guestbook-submit-btn {
  display: inline-block;
  padding: 1rem 3rem;
  background: #000;
  color: #fff;
  border: none;
  border-radius: 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.2s ease;
  font-family: inherit;
}

.guestbook-submit-btn:hover {
  opacity: 0.8;
}

.guestbook-submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.guestbook-success {
  display: none;
  background: #f0f7f0;
  color: #2d6a2e;
  padding: 1rem 1.5rem;
  margin-bottom: 2rem;
  font-size: 0.95rem;
  border-left: 3px solid #2d6a2e;
}

.guestbook-error {
  display: none;
  background: #fdf0f0;
  color: #9a2020;
  padding: 1rem 1.5rem;
  margin-bottom: 2rem;
  font-size: 0.95rem;
  border-left: 3px solid #9a2020;
}

/* Message cards */
.guestbook-messages-heading {
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 3rem 0 2rem;
}

.guestbook-messages-heading span {
  flex: 0 1 60px;
  height: 1px;
  background: #ddd;
}

.guestbook-messages-heading h3 {
  white-space: nowrap;
  margin: 0;
  font-size: 1.2rem;
  font-weight: 400;
  color: #666;
  letter-spacing: 0.03em;
}

.guestbook-card {
  padding: 2rem;
  margin-bottom: 1.5rem;
  background: #fff;
  border: 1px solid #eee;
  position: relative;
}

.guestbook-card-new {
  animation: slideInUp 0.5s ease-out;
}

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

.guestbook-card-quote {
  font-family: 'orpheus-pro', serif;
  font-size: 3rem;
  color: #ddd;
  line-height: 1;
  margin-bottom: -0.5rem;
}

.guestbook-card-message {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #333;
  margin: 0 0 1rem;
  font-style: italic;
}

.guestbook-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.guestbook-card-name {
  font-family: 'orpheus-pro', serif;
  font-size: 1rem;
  color: #000;
  font-weight: 500;
}

.guestbook-card-date {
  font-size: 0.85rem;
  color: #999;
}

.guestbook-empty {
  text-align: center;
  color: #999;
  font-style: italic;
  padding: 2rem 0;
}

/* --- Footer v2 --- */
/* Override parent site.css which hides #footer-sections */
#footer-sections {
  display: block !important;
}

.footer-v2 {
  text-align: center;
  padding: 3rem 1rem;
  color: #999;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
}

.footer-v2 .footer-names {
  font-family: 'Ambrosia Daughter', cursive;
  font-size: 2rem;
  color: #000;
  margin-bottom: 0.5rem;
}

/* --- Opening Verse --- */

.verse-section {
  text-align: center !important;
  max-width: 700px;
  margin: 0 auto;
}

.verse-section p {
  text-align: center !important;
}

.verse-text {
  font-family: orpheus-pro, 'Times New Roman', serif;
  font-size: 1.6rem;
  font-weight: 400;
  font-style: italic;
  line-height: 2;
  letter-spacing: 0.01em;
  color: #333;
  margin: 0 0 1.5rem;
}

.verse-source {
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #999;
  margin: 0;
}

/* --- Photo Divider --- */

.photo-divider {
  width: 100%;
  height: 55vh;
  overflow: hidden;
  position: relative;
}

.photo-divider img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  display: block;
}

/* --- Thank You --- */

.thank-you-section {
  text-align: center !important;
  max-width: 700px;
  margin: 0 auto;
}

.thank-you-section p {
  text-align: center !important;
}

.thank-you-monogram {
  width: 80px;
  height: auto;
  opacity: 0.7;
  margin-bottom: 2rem;
  pointer-events: none;
}

.thank-you-text {
  font-size: 1.15rem;
  line-height: 1.9;
  color: #444;
  margin: 0 0 2.5rem;
}

.thank-you-signature {
  font-size: 1.1rem;
  color: #666;
  line-height: 1.8;
  margin: 0;
}

.thank-you-names {
  font-family: inherit;
  font-size: 1.1rem;
  color: #333;
  display: block;
  margin-top: 0.5rem;
}

/* --- Closing Section --- */

.closing-content {
  text-align: center !important;
  color: #fff;
}

.closing-content * {
  text-align: center !important;
}

.closing-tagline {
  font-family: inherit;
  font-size: 1rem;
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin: 0 0 2rem;
  opacity: 0.9;
}

.closing-names {
  font-family: 'Ambrosia Daughter', cursive;
  font-size: clamp(2.5rem, 5vw + 1rem, 4.5rem);
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.closing-date {
  font-size: 1rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin: 0 0 2.5rem;
  opacity: 0.8;
}

.closing-contact {
  font-size: 0.9rem;
  opacity: 0.7;
}

.closing-contact a {
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.3);
  transition: opacity 0.2s ease;
}

.closing-contact a:hover {
  opacity: 1;
  border-bottom-color: #fff;
}

.closing-contact-divider {
  margin: 0 1rem;
  opacity: 0.4;
}

/* ========================================
   MOBILE RESPONSIVE
   ======================================== */

@media (max-width: 1024px) {
  .gallery-grid {
    column-count: 3;
  }
}

@media (max-width: 768px) {
  .gallery-grid {
    column-count: 2;
    column-gap: 6px;
  }

  .gallery-item {
    margin-bottom: 6px;
  }

  #wedding-day .featured-photos {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  #wedding-day .featured-photos img {
    height: 250px;
  }

  .lightbox-prev,
  .lightbox-next {
    font-size: 2rem;
    padding: 0.5rem;
  }

  .lightbox-prev {
    left: 5px;
  }

  .lightbox-next {
    right: 5px;
  }

  .lightbox-close {
    top: 10px;
    right: 15px;
    font-size: 2rem;
  }

  /* Push hero text to bottom of section on mobile */
  .page-section.vertical-alignment--middle:first-child {
    display: flex !important;
    flex-direction: column;
    justify-content: flex-end;
  }

  .page-section.vertical-alignment--middle:first-child > .content-wrapper {
    margin-top: auto;
    padding-bottom: 2rem !important;
  }

  .page-section.vertical-alignment--middle:first-child .content {
    margin-top: 0 !important;
  }

  .hero-subtitle {
    font-size: clamp(2rem, 3vw + 0.5rem, 3rem);
  }

  .section-heading-line {
    flex: 0 1 30px;
  }

  .guestbook-card {
    padding: 1.5rem;
  }

  .guestbook-card-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .verse-text {
    font-size: 1.3rem;
  }

  .photo-divider {
    height: 40vh;
  }

  .thank-you-text {
    font-size: 1.05rem;
  }

  .closing-contact-divider {
    display: none;
  }

  .closing-contact a {
    display: block;
    margin-bottom: 0.5rem;
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    column-count: 2;
    column-gap: 4px;
  }

  .gallery-item {
    margin-bottom: 4px;
  }
}
