/* General Body & Typography */
body {
  font-family: "Montserrat", sans-serif; /* Clean sans-serif for body text */
  color: #4a4a4a; /* Soft charcoal for readability */
  line-height: 1.8;
  overflow-x: hidden;
  background-color: #f8f5f2; /* Soft cream background */
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Playfair Display", serif; /* Elegant serif for headings */
  color: #5d4a3d; /* Muted brown for headings */
  margin-bottom: 1.5rem;
  font-weight: 700;
}

h1 {
  font-size: 5rem; /* Larger hero title */
  line-height: 1.1;
  text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.4);
  font-weight: 500; /* Lighter weight for elegance */
}

.section-heading {
  text-align: center;
  margin-bottom: 3rem;
}

h2.section-title {
  font-size: 3.2rem;
  color: #5d4a3d;
  position: relative;
  padding-bottom: 15px;
}

.section-subtitle {
  font-size: 1.1rem;
  color: #7a7a7a;
  margin-top: 10px;
  font-style: italic;
  font-weight: 300;
}

/* CSS Dividers */
.section-divider {
  width: 60px; /* Width of the line */
  height: 2px; /* Thickness of the line */
  background-color: #a1887f; /* Soft rose gold/muted pink */
  margin: 20px auto; /* Centered, with vertical spacing */
  display: block;
  border-radius: 1px;
}

.hero-divider {
  /* Used for hero and RSVP sections (light color) */
  width: 80px;
  height: 2px;
  background-color: #ffffff; /* White for dark backgrounds */
  margin: 25px auto;
  display: block;
  opacity: 0.8;
  border-radius: 1px;
}

.footer-divider {
  width: 50px;
  height: 1px;
  background-color: #e5d5c6; /* Light cream for dark backgrounds */
  margin: 20px auto;
  display: block;
  opacity: 0.9;
  border-radius: 0.5px;
}

.card-divider {
  /* New divider for event cards */
  width: 30px;
  height: 1px;
  background-color: #dcdcdc; /* Light grey */
  margin: 10px auto 15px; /* Centered, with vertical spacing */
  display: block;
}

.lead {
  font-size: 1.3rem;
  color: #6a6a6a;
  font-weight: 400;
}

.lead-story {
  font-size: 1.15rem;
  color: #5a5a5a;
  max-width: 800px;
  margin: 0 auto;
  font-style: normal;
  line-height: 2;
}

/* Navbar */
.navbar {
  background-color: rgba(
    255,
    255,
    255,
    0.95
  ); /* Near white, slightly transparent */
  padding: 1.2rem 0;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 1px 10px rgba(0, 0, 0, 0.08);
}

.navbar-brand {
  font-family: "Playfair Display", serif;
  font-size: 2rem; /* Larger brand name */
  color: #5d4a3d !important;
  font-weight: 500;
}

/* Navbar Initials Styling */
.navbar-initials {
  font-family: "Allura", cursive; /* Beautiful handwriting font */
  font-size: 3.5rem; /* Larger and more prominent initials */
  color: #a1887f; /* Soft rose gold/muted pink accent color */
  line-height: 1;
  margin-top: -8px; /* Adjust vertical alignment if needed */
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
}

.nav-link {
  font-family: "Montserrat", sans-serif;
  color: #6a6a6a !important;
  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: #a1887f !important; /* Soft rose gold/muted pink on hover */
  transform: translateY(-2px);
}

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

.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%2880, 80, 80, 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;
  background: url("./images/hero-bg.jpg") no-repeat center center/cover; /* Initial background, replaced by JS */
  min-height: 100vh;
  position: relative;
  padding-top: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.7);
}

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

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

.wedding-date {
  font-family: "Playfair Display", serif;
  font-size: 2.2rem;
  margin-top: 10px;
  font-weight: 400;
  letter-spacing: 1px;
}

.welcome-text,
.blessings-text {
  font-family: "Montserrat", sans-serif;
  font-size: 1.15rem;
  color: #ffffff;
  font-weight: 300;
  max-width: 900px;
  margin: 0 auto;
  opacity: 0.9;
}
.blessings-text {
  font-style: italic;
  margin-top: 10px;
  font-size: 1rem;
  opacity: 0.8;
}

/* Countdown Section */
.countdown-section {
  background-color: #ffffff; /* Pure white background */
  padding: 80px 0;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}

#countdown-timer {
  display: flex;
  justify-content: center;
  gap: 30px; /* Space between items */
}

.countdown-item {
  background-color: #fdfdfd; /* Slightly off-white for individual items */
  border: 1px solid #ebebeb;
  border-radius: 8px;
  padding: 25px 15px;
  flex: 1;
  max-width: 180px; /* Max width for each item */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.countdown-number {
  font-family: "Playfair Display", serif;
  font-size: 3.5rem;
  color: #a1887f; /* Soft rose gold/muted pink */
  display: block;
  line-height: 1;
  margin-bottom: 5px;
}

.countdown-label {
  font-family: "Montserrat", sans-serif;
  font-size: 0.95rem;
  color: #6a6a6a;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 500;
}

/* Image Containers - Crucial for fixed ratio/placeholder */
.image-container {
  position: relative;
  width: 100%; /* Will take full width of its parent (.about-image-fixed-wrapper) */
  overflow: hidden;
  background-color: #efebea; /* Placeholder background color */
  display: block; /* Ensure it behaves as a block */
}

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

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

.image-container img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* Ensures image covers the container without distortion */
  display: block;
  transition: opacity 0.3s ease; /* Smooth fade in if image loads later */
  /* opacity: 0; */ /* You can uncomment this if you want images to initially be invisible and fade in */
}

/* About Us Section (Our Story) */
#about-us {
  background-color: #f8f5f2; /* Soft cream */
  padding: 80px 0;
}

.story-block {
  margin-bottom: 60px; /* Space between groom/bride blocks */
}

.about-text-content {
  padding: 20px;
  /* background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06); */
}

.about-text-content h3 {
  font-family: "Playfair Display", serif;
  font-size: 2.2rem;
  color: #5d4a3d;
  margin-bottom: 15px;
  font-weight: 500;
}

.about-text-content p {
  font-size: 1rem;
  color: #5a5a5a;
}

/* NEW: Wrapper for About Us images to control fixed width and center */
.about-image-fixed-wrapper {
  width: 300px; /* Fixed width for the parent container */
  margin: 0 auto; /* Center the wrapper within its column */
}

.border-elegant {
  border: 6px solid #e5d5c6; /* Lighter, soft border */
  padding: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.short-story-section {
  padding-top: 40px;
  border-top: 1px solid #ededed;
  margin-top: 60px !important;
}

.short-story-title {
  font-size: 2.5rem;
  font-weight: 500;
  margin-bottom: 25px;
}

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

.event-card {
  background-color: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  padding: 30px; /* More padding */
  height: 100%;
  position: relative;
  border: 1px solid #e0d8d0;
}

.event-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px; /* Slightly thicker top bar */
  background-color: #a1887f; /* Soft rose gold/muted pink */
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

.event-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.event-card h3 {
  font-family: "Playfair Display", serif;
  font-size: 2rem;
  color: #5d4a3d;
  margin-bottom: 15px;
  font-weight: 500;
}

.event-card p {
  font-size: 0.95rem;
  color: #6a6a6a;
  margin-bottom: 10px;
}

.event-card .fas {
  color: #a1887f; /* Soft rose gold/muted pink icons */
  margin-right: 10px;
  font-size: 1.1rem;
}

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

.event-card .map-link:hover {
  color: #5d4a3d;
  text-decoration: underline;
}

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

.gallery-item {
  overflow: hidden;
  border-radius: 5px;
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

/* RSVP Section */
#rsvp {
  background-color: #a1887f; /* Soft rose gold/muted pink background */
  padding: 80px 0;
  color: #fff;
}

#rsvp h2 {
  color: #ffffff;
  font-weight: 500;
}

#rsvp .lead {
  color: #f8f5f2; /* Light cream for description */
  margin-bottom: 40px;
}

.btn-primary-custom {
  background-color: #5d4a3d; /* Muted brown button */
  border-color: #5d4a3d;
  color: #ffffff;
  padding: 14px 45px; /* Larger button */
  border-radius: 50px;
  font-weight: 600;
  font-size: 1.15rem;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.btn-primary-custom:hover {
  background-color: #45382d; /* Darker brown on hover */
  border-color: #45382d;
  color: #ffffff;
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

/* Footer */
.footer {
  background-color: #5d4a3d; /* Muted brown */
  color: #e5d5c6; /* Light cream text */
  padding: 50px 0; /* More padding */
  font-size: 0.9rem;
}

.footer-quote {
  font-family: "Playfair Display", serif;
  font-size: 1.4rem;
  font-style: italic;
  margin-bottom: 20px;
}

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

.footer .fas,
.footer .fab {
  color: #f8f5f2; /* Light cream icons */
}

.copyright-text {
  margin-top: 25px;
  font-size: 1.2rem;
  opacity: 0.8;
}

/* Modal/Lightbox Styles - Adjusted for Elegant Bliss colors */
#imageModal .modal-dialog {
  max-width: 90vw;
  margin: 1.75rem auto;
  position: relative;
}

#imageModal .modal-content {
  background-color: rgba(0, 0, 0, 0.88); /* Darker background for image focus */
  border: none;
  border-radius: 10px; /* Slightly more rounded */
  overflow: hidden;
}

#imageModal .modal-body {
  position: relative;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 65vh; /* Taller min height */
  max-height: 85vh; /* Taller max height */
}

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

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

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

.carousel-control-prev,
.carousel-control-next {
  width: 6%; /* Slightly wider controls */
  opacity: 0.75;
  transition: opacity 0.3s ease;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
  opacity: 1;
  background-color: rgba(255, 255, 255, 0.08); /* 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='%23fff'%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");
  width: 2.2rem; /* Slightly larger icons */
  height: 2.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='%23fff'%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 */
.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.5rem;
  }
  h2.section-title {
    font-size: 2.5rem;
  }
  .lead {
    font-size: 1.15rem;
  }
  .navbar-brand {
    font-size: 1.8rem;
  }
  .navbar-initials {
    /* Adjust for smaller screens */
    font-size: 3rem;
  }
  .navbar-toggler {
    margin-left: auto;
  }
  .navbar-collapse {
    background-color: rgba(255, 255, 255, 0.98);
    padding: 15px;
    border-radius: 8px;
    margin-top: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  }
  .nav-link {
    text-align: center;
    margin: 8px 0;
  }
  .countdown-item {
    max-width: 140px;
    padding: 20px 10px;
  }
  .countdown-number {
    font-size: 2.8rem;
  }
  .countdown-label {
    font-size: 0.9rem;
  }
  /* Updated: Adjust the fixed width of the wrapper for smaller desktop/tablet */
  .about-image-fixed-wrapper {
    width: 250px; /* Example: set a smaller fixed width */
  }
  .about-text-content h3 {
    font-size: 1.8rem;
  }
  .modal-body {
    min-height: 55vh;
    max-height: 75vh;
  }
  .modal-image {
    max-height: 75vh;
  }
}

@media (max-width: 767.98px) {
  h1 {
    font-size: 2.8rem;
  }
  .wedding-date {
    font-size: 1.8rem;
  }
  h2.section-title {
    font-size: 2.2rem;
  }
  .section-subtitle,
  .welcome-text,
  .blessings-text,
  .lead-story {
    font-size: 1rem;
  }
  #countdown-timer {
    gap: 15px;
  }
  .countdown-item {
    max-width: 120px;
    padding: 15px 8px;
  }
  .countdown-number {
    font-size: 2.5rem;
  }
  .countdown-label {
    font-size: 0.8rem;
  }
  .about-text-content {
    padding: 15px;
  }
  .about-text-content h3 {
    font-size: 1.6rem;
  }
  .event-card {
    padding: 20px;
  }
  .event-card h3 {
    font-size: 1.6rem;
  }
  .gallery-item .image-container {
    padding-bottom: 66%;
  }
  .btn-primary-custom {
    padding: 12px 35px;
    font-size: 1rem;
  }
  .modal-body {
    min-height: 45vh;
    max-height: 65vh;
  }
  .modal-image {
    max-height: 65vh;
  }
  .carousel-control-prev,
  .carousel-control-next {
    width: 8%;
  }
  /* Updated: Adjust the fixed width of the wrapper for tablets/mobile */
  .about-image-fixed-wrapper {
    width: 200px; /* Adjust as needed for smaller screens */
  }
}

@media (max-width: 575.98px) {
  h1 {
    font-size: 2.2rem;
  }
  .navbar-brand {
    font-size: 1.6rem;
  }
  .navbar-initials {
    /* Adjust for very small screens */
    font-size: 2.8rem;
  }
  .countdown-item {
    max-width: 100px; /* Even smaller for very small screens */
    padding: 10px 5px;
  }
  .countdown-number {
    font-size: 2rem;
  }
  .countdown-label {
    font-size: 0.8rem;
  }
  /* Updated: Adjust the fixed width of the wrapper for small mobiles */
  .about-image-fixed-wrapper {
    width: 180px; /* Smallest fixed width for portrait layout */
  }
  .short-story-title {
    font-size: 2rem;
  }
}

/* New Combined Footer */
#main-footer {
  background-color: rgba(255, 255, 255, 0.95);
  color: #5d4a3d; /* 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: #5d4a3d; /* Lighter color for the CTA line */
}

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

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

.display-1,
.lead {
  color: #fff;
}

/* 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;
  }
}
