/* General Body & Typography */
body {
  font-family: "Inter", sans-serif; /* Modern sans-serif for body text */
  color: #333333; /* Dark grey for readability */
  line-height: 1.7;
  overflow-x: hidden;
  background-color: #f8f8f8; /* Light grey/off-white background */
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Montserrat", sans-serif; /* Bold sans-serif for headings */
  color: #222222; /* Dark charcoal for headings */
  margin-bottom: 1.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

h1 {
  font-size: 4rem;
  line-height: 1.1;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
}

h2.section-title {
  font-size: 2.8rem;
  position: relative;
  padding-bottom: 15px;
  margin-bottom: 3rem;
  color: #222222;
}

h2.section-title::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 80px; /* Shorter, sleeker line */
  height: 3px; /* Thinner line */
  background-color: #bbbbbb; /* Lighter grey for subtle accent */
  border-radius: 2px;
}

.name-heading {
  color: #222222;
  font-size: 2.5rem;
  margin-top: 1rem;
  font-weight: 600;
}

#hero-title {
  color: #fff;
}

.lead {
  font-size: 1.25rem;
  color: #fff;
  font-weight: 300; /* Lighter weight for sleekness */
}

.lead-story {
  font-size: 1.1rem;
  color: #666666;
  max-width: 700px;
  margin: 0 auto;
  font-style: italic;
  border-left: 3px solid #aaaaaa; /* Subtle grey border */
  padding-left: 20px;
}

/* Navbar */
.navbar {
  background-color: rgba(
    255,
    255,
    255,
    0.95
  ); /* Nearly white semi-transparent */
  padding: 1rem 0;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
  font-family: "Montserrat", sans-serif;
  font-size: 1.6rem;
  color: #222222 !important;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.navbar-logo {
  height: 35px; /* Size for logo/initials in navbar */
  width: auto;
}

.nav-link {
  color: #555555 !important; /* Darker grey for links */
  font-weight: 500;
  margin: 0;
  transition: color 0.3s ease, transform 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nav-link:hover,
.nav-link.active {
  color: #000000 !important; /* Black on hover/active */
  transform: translateY(-2px);
}

.navbar-toggler {
  border-color: rgba(0, 0, 0, 0.2);
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280, 0, 0, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Hero Section */
.hero-section {
  background-size: cover;
  background-position: center;
  min-height: 100vh;
  position: relative;
  padding-top: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
}

.hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4); /* Subtle dark overlay */
  z-index: 1;
}

.hero-section .container {
  position: relative;
  z-index: 2;
}

.wedding-date {
  font-family: "Montserrat", sans-serif;
  font-size: 1.6rem;
  margin-top: 20px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

/* Welcome Message */
#welcome-message {
  background-color: #ffffff; /* Pure white */
  padding: 60px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.welcome-text,
.blessings-text {
  font-family: "Inter", sans-serif;
  font-size: 1.2rem;
  color: #444444; /* Darker grey */
  font-weight: 400;
  max-width: 800px;
  margin: 0 auto;
}
.blessings-text {
  font-style: normal; /* No italics */
  margin-top: 10px;
  font-size: 1rem;
  color: #777777; /* Lighter grey */
}

/* Image Containers */
.image-container {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.image-container-square {
  padding-bottom: 100%; /* 1:1 aspect ratio */
}

.image-container img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* About Us Section */
#about-us {
  background-color: #f8f8f8;
  padding: 80px 0;
}

#about-us .row {
  margin-top: 4rem;
}

.border-img {
  border: 3px solid #dddddd; /* Light grey, thin border */
  padding: 3px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Events Section */
#events {
  background-color: #eeeeee; /* Slightly darker grey for contrast */
  padding: 80px 0;
}

.event-card {
  background-color: #fff;
  border-radius: 8px; /* Slightly less rounded */
  overflow: hidden;
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  padding: 20px;
  height: 100%;
  position: relative;
  border: 1px solid #dddddd;
}

.event-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px; /* Thinner top bar */
  background-color: #aaaaaa; /* Grey accent */
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

.event-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.event-card h3 {
  font-size: 1.6rem;
  color: #333333;
  margin-bottom: 12px;
  text-transform: capitalize; /* Don't force uppercase here */
}

.event-card p {
  font-size: 0.9rem;
  color: #666666;
  margin-bottom: 6px;
}

.event-card .fas {
  color: #777777; /* Subtle icon color */
  margin-right: 8px;
}

.event-card .map-link {
  color: #555555;
  text-decoration: underline;
  font-weight: 500;
  transition: color 0.3s ease;
}

.event-card .map-link:hover {
  color: #000000;
  text-decoration: none;
}

/* Gallery Section */
#gallery {
  background-color: #ffffff;
  padding: 80px 0;
}

.gallery-item {
  overflow: hidden;
  border-radius: 4px; /* Minimal border radius */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
  transform: scale(1.02);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.gallery-item .image-container {
  padding-bottom: 75%; /* 4:3 aspect ratio */
}

/* RSVP Section */
#rsvp {
  background-color: #333333; /* Dark grey background */
  padding: 80px 0;
  color: #fff;
}

#rsvp h2 {
  color: #ffffff;
}

#rsvp .lead {
  color: #dddddd;
  margin-bottom: 40px;
  font-weight: 300;
}

.btn-primary-custom {
  background-color: #666666; /* Medium grey button */
  border-color: #666666;
  color: #ffffff;
  padding: 12px 40px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.btn-primary-custom:hover {
  background-color: #222222; /* Darker grey on hover */
  border-color: #222222;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.3);
}

/* Footer */
.footer {
  background-color: #222222; /* Very dark grey/near black */
  color: #bbbbbb;
  padding: 40px 0;
  font-size: 0.85rem;
}

.footer .contact-info p {
  margin-bottom: 5px;
  font-size: 0.95rem;
}

.footer .fas,
.footer .fab {
  color: #999999; /* Lighter grey icons */
}

/* Modal/Lightbox Styles (re-using existing structure but with new colors) */
#imageModal .modal-dialog {
  max-width: 90vw;
  margin: 1.75rem auto;
  position: relative;
}

#imageModal .modal-content {
  background-color: rgba(0, 0, 0, 0.9); /* Near black overlay */
  border: none;
  border-radius: 8px; /* Slightly less rounded */
  overflow: hidden;
}

#imageModal .modal-body {
  position: relative;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
  max-height: 80vh; /* Consistent image viewing height */
}

.btn-close.btn-close-white {
  filter: invert(1) grayscale(100%) brightness(200%);
  opacity: 1;
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 1060;
}

.image-viewer-container {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 50vh;
  max-height: 80vh;
}

.modal-image {
  max-width: 100%;
  max-height: 80vh;
  display: block;
  object-fit: contain;
  margin: auto;
}

.carousel-control-prev,
.carousel-control-next {
  width: 5%;
  opacity: 0.7; /* Slightly less opaque */
  transition: opacity 0.3s ease;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
  opacity: 1;
  background-color: rgba(255, 255, 255, 0.05); /* Very subtle hover effect */
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23ccc'%3e%3cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/%3e%3c/svg%3e"); /* Lighter grey icons */
  width: 2rem;
  height: 2rem;
}
.carousel-control-next-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23ccc'%3e%3cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

/* Page Turning Effect (Flip) - Retained from previous theme */
.image-flip-card {
  perspective: 1000px;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.image-flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.image-flip-card-inner.flipping-in {
  transform: rotateY(90deg);
  opacity: 0;
}

.image-flip-card-inner.flipping-active {
  transform: rotateY(0deg);
  opacity: 1;
}

.image-flip-card-inner .modal-image {
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  position: relative;
  z-index: 2;
}

/* Responsive Adjustments */
@media (max-width: 991.98px) {
  h1 {
    font-size: 3.2rem;
  }
  h2.section-title {
    font-size: 2.2rem;
  }
  .lead {
    font-size: 1.1rem;
  }
  .navbar-brand {
    font-size: 1.4rem;
  }
  .navbar-toggler {
    margin-left: auto;
  }
  .navbar-collapse {
    background-color: rgba(255, 255, 255, 0.98);
    padding: 15px;
    border-radius: 8px;
    margin-top: 10px;
  }
  .nav-link {
    text-align: center;
    margin: 5px 0;
  }
  .image-container-square {
    max-width: 200px;
  }
  .name-heading {
    font-size: 1.8rem;
  }
  #imageModal .modal-dialog {
    max-width: 95vw;
  }
  #imageModal .modal-body {
    min-height: 50vh;
    max-height: 70vh;
  }
  .modal-image {
    max-height: 70vh;
  }
}

@media (max-width: 767.98px) {
  h1 {
    font-size: 2.5rem;
  }
  .wedding-date {
    font-size: 1.3rem;
  }
  h2.section-title {
    font-size: 1.8rem;
  }
  .lead-story,
  .welcome-text,
  .blessings-text {
    font-size: 0.95rem;
  }
  .event-card {
    padding: 18px;
  }
  .event-card h3 {
    font-size: 1.4rem;
  }
  .gallery-item .image-container {
    padding-bottom: 66%;
  }
  .btn-primary-custom {
    padding: 10px 30px;
    font-size: 0.95rem;
  }
  #imageModal .modal-body {
    min-height: 40vh;
    max-height: 60vh;
  }
  .modal-image {
    max-height: 60vh;
  }
  .carousel-control-prev,
  .carousel-control-next {
    width: 8%;
  }
}

@media (max-width: 575.98px) {
  h1 {
    font-size: 2rem;
  }
  .navbar-brand {
    font-size: 1.2rem;
  }
  .navbar-logo {
    height: 30px;
  }
  .image-container-square {
    max-width: 120px;
  }
}

/* New Combined Footer */
#main-footer {
  background-color: rgba(255, 255, 255, 0.95);
  color: #222222; /* Soft charcoal text */
}

#main-footer p {
  font-family: "Cormorant Garamond", serif; /* New elegant serif font */
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

#main-footer .footer-credit {
  margin-bottom: 0.5rem;
}

#main-footer .footer-cta {
  font-style: italic;
  font-family: "Cormorant Garamond", serif; /* New elegant serif font */
  font-size: 1.2rem;
  color: #222222; /* Lighter color for the CTA line */
}

#main-footer .happinest-link {
  color: #222222; /* Soft rose gold/muted pink for links */
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

#main-footer .happinest-link:hover {
  color: #222222; /* Muted brown on hover */
  text-decoration: underline;
}

/* Collapse behavior between 992px and 1024px */
@media (min-width: 992px) and (max-width: 1024px) {
  .navbar-expand-lg .navbar-collapse {
    display: none !important;
  }

  .navbar-expand-lg .navbar-toggler {
    display: block !important;
  }

  .navbar-expand-lg .navbar-collapse.collapse.show {
    display: block !important;
  }

  .navbar-expand-lg .navbar-nav {
    flex-direction: column !important;
    align-items: start;
  }

  .navbar-expand-lg .nav-item {
    width: 100%;
  }

  .navbar-expand-lg .nav-link {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* Full expanded behavior starting at 1025px */
@media (min-width: 1025px) {
  .navbar-expand-lg .navbar-collapse {
    display: flex !important;
    flex-basis: auto;
    flex-grow: 1;
    align-items: center;
  }

  .navbar-expand-lg .navbar-toggler {
    display: none !important;
  }

  .navbar-expand-lg .navbar-nav {
    flex-direction: row;
    margin-left: auto;
  }

  .navbar-expand-lg .nav-item {
    margin-left: 0.5rem;
    margin-right: 0.5rem;
    width: auto;
  }

  .navbar-expand-lg .nav-link {
    padding: 0.5rem 0.75rem;
  }
}
