/* Global Reset & Theme */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Cormorant Garamond', serif;
  background-image: 
    linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3)), 
    url('/images/hero.png');
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
  color: #33302E;
  min-height: 100vh;
}

/* 1. Header & Branding */
.header-minimal {
  background-color: #F5F2ED;
  padding: 3rem 1rem; /* Slightly reduced for better mobile balance */
  text-align: center;
  border-bottom: 1px solid #7A7468;
}

.brand-title {
  font-family: 'Cinzel', serif;
  font-size: 2.5rem;
  color: #7A7468;
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.brand-subtitle {
  font-size: 1.1rem;
  letter-spacing: 2px;
  color: #7A7468;
}

/* 2. Navbar */
.navbar {
  background: white;
  padding: 1rem;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column; /* Stacked for mobile, row for desktop */
  align-items: center;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
  transition: all 0.3s ease;
}

.nav-links a {
  text-decoration: none;
  color: #7A7468;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 1px;
  padding: 5px 0;
}

.nav-links a.active {
  border-bottom: 2px solid #7A7468;
}

/* 3. Main Content "Parchment" Container */
/* Unified with layout.js selector 'main.page' */

.parchment-container {
  max-width: 900px;
  margin: 2rem auto;
  background: rgba(245, 242, 237, 0.96); 
  padding: 4rem;
  min-height: 50vh;
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
  border-radius: 2px;
  animation: fadeIn 0.8s ease-out;
}

/* NEW: Reset the default main.page so it doesn't interfere with the background */
main.page {
  display: block;
  width: 100%;
}

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

/* 4. Form Styling */
form {
  display: flex;
  flex-direction: column;
}

form input, form select, form textarea {
  width: 100%;
  padding: 1rem;
  border: 1px solid #d1cdc7;
  background: rgba(255, 255, 255, 0.7);
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  border-radius: 0;
}

form input:focus, form select:focus, form textarea:focus {
  outline: none;
  border-color: #7a7468;
  background: #fff;
}

form button {
  background-color: #7a7468;
  color: #F5F2ED;
  padding: 1.2rem;
  font-family: 'Cinzel', serif;
  text-transform: uppercase;
  letter-spacing: 2px;
  border: none;
  cursor: pointer;
  transition: 0.3s;
}

form button:hover {
  background-color: #5e5950;
}

.form-group {
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #7a7468;
  margin-left: 2px;
}

/* Update your existing input/select styles to remove the bottom margin 
   since the .form-group handles it now */
form input, form select, form textarea {
  margin-bottom: 0; 
  background: white;
  border: 1px solid #d1cdc7;
}

/* 5. Photos Gallery */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  grid-auto-rows: 250px;
  grid-auto-flow: dense;
  gap: 15px;
}

.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: sepia(30%);
  transition: 0.5s;
}

.photo-item:hover img {
  cursor: pointer;
  filter: sepia(0%);
  transform: scale(1.05);
}

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

.timeline-day {
  margin-bottom: 3rem;
}

.day-title {
  font-family: 'Cinzel', serif;
  font-size: 1.2rem;
  color: #7a7468;
  border-bottom: 1px solid #d1cdc7;
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
  text-align: left;
}

.event-card {
  display: flex;
  gap: 2rem;
  margin-bottom: 1.5rem;
  position: relative;
  padding-left: 1rem;
}

/* The vertical "monastery pillar" line */
.event-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background-color: #7a7468;
}

.event-time {
  font-family: 'Cinzel', serif;
  font-size: 0.9rem;
  color: #7a7468;
  min-width: 80px;
  padding-top: 0.2rem;
}

.event-details h4 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.event-details p {
  font-size: 1.1rem;
  color: #555;
}

.attire {
  font-size: 0.85rem !important;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 0.5rem;
  color: #7a7468 !important;
}

/* 6. Mobile Responsiveness */
@media (max-width: 768px) {
  main.page {
    margin: 0rem;
    padding: 0rem;
  }

  .nav-links {
    display: none; /* Controlled by layout.js 'open' class */
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    text-align: center;
    padding-top: 1rem;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: block;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #7A7468;
    cursor: pointer;
  }

  .brand-title { font-size: 1.8rem; }

  .event-card {
    flex-direction: column;
    gap: 0.5rem;
  }
  .event-time {
    min-width: auto;
  }

  .parchment-container {
    margin: 1rem;
    padding: 1rem;
  }
}

@media (min-width: 769px) {
  .nav-toggle { display: none; }
}

/* Utilities */
.center { text-align: center; }
h2 { font-family: 'Cinzel', serif; color: #7A7468; margin-bottom: 1.5rem; }


/* The Lightbox (background) */
.lightbox {
  display: none; /* Hidden by default */
  position: fixed;
  z-index: 2000; /* Above the navbar */
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(46, 43, 41, 0.95); /* Deep charcoal to match theme */
  cursor: zoom-out;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.lightbox.active {
  display: flex;
  opacity: 1;
  pointer-events: auto;
}

/* Lightbox Image */
.lightbox-content {
  max-width: 90%;
  max-height: 80vh;
  box-shadow: 0 0 30px rgba(0,0,0,0.5);
  border: 4px solid #F5F2ED; /* Sandy beige frame */
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.lightbox.active .lightbox-content {
  transform: scale(1);
}

/* Caption Text */
#caption {
  margin-top: 15px;
  color: #F5F2ED;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.2rem;
}

/* Close Button */
.close-lightbox {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #F5F2ED;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}

.close-lightbox {
  position: absolute;
  top: 30px;
  right: 40px;
  color: white;
  font-size: 50px;
  font-weight: bold;
  cursor: pointer;
  z-index: 2010; /* Ensure it stays above arrows */
  line-height: 1;
}

.close-lightbox:hover {
  color: #7a7468; /* Your gold theme color */
}

/* Navigation Arrows */
.prev, .next {
  cursor: pointer;
  position: absolute; /* Takes them out of the normal document flow */
  top: 50%;           /* Moves them to the middle vertically */
  transform: translateY(-50%); /* Perfectly centers them regardless of height */
  width: auto;
  padding: 20px;
  color: #F5F2ED;     /* Sandy Beige */
  font-weight: bold;
  font-size: 40px;    /* Big enough to tap on mobile */
  background: none;
  border: none;
  user-select: none;
  transition: 0.3s ease;
  z-index: 10005;     /* Ensures they stay above the image */
}

/* Position specifically on the left and right */
.prev {
  left: 20px;
}

.next {
  right: 20px;
}

/* Hover effect for a touch of gold */
.prev:hover, .next:hover {
  color: #7a7468;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

/* Ensure the lightbox spans the whole screen and centers its children */
.lightbox {
  display: none; 
  position: fixed;
  z-index: 9999;
  left: 0; 
  top: 0;
  width: 100vw; 
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.95);
  align-items: center;
  justify-content: center;
}

/* 7. Slim & Airy Travel Cards */

/* Venue Hero Card */
.venue-container {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}

.venue-hero {
  text-decoration: none;
  color: inherit;
  background: #fdfcfb; /* Slightly warmer than pure white */
  border: 1px solid #7a7468; /* Use the gold/brown for the primary venue */
  padding: 3rem;
  width: 100%;
  max-width: 600px;
  text-align: center;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.venue-hero:hover {
  background: white;
  box-shadow: 0 10px 30px rgba(122, 116, 104, 0.1);
}

.venue-label {
  display: block;
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #7a7468;
  margin-bottom: 1rem;
}

.venue-hero h2 {
  margin-bottom: 1rem;
  font-size: 1.8rem;
}

.address-block p {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.2rem;
  line-height: 1.5;
  color: #555;
}

.map-link {
  display: inline-block;
  margin-top: 1.5rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #7a7468;
  border-bottom: 1px solid transparent;
  transition: border 0.3s;
}

.venue-hero:hover .map-link {
  border-bottom: 1px solid #7a7468;
}

/* Subtle Divider */
.divider {
  border: 0;
  height: 1px;
  background: #e5e1da;
  margin: 2rem auto;
  max-width: 200px;
}

.travel-grid {
  display: grid;
  /* Increase the gap to 3rem for more "breathing room" */
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem; 
  margin-top: 2rem;
}

.travel-card {
  text-decoration: none;
  color: inherit;
  background: white;
  /* Thinner, lighter border */
  border: 1px solid #e5e1da; 
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  /* Rounded slightly for a softer feel */
  border-radius: 4px;
  text-align: center;
}

.travel-card:hover {
  border-color: #7a7468;
  background-color: #fcfbf9;
  box-shadow: 0 8px 20px rgba(122, 116, 104, 0.08);
}

.travel-card h3 {
  font-family: 'Cinzel', serif;
  font-size: 1.15rem;
  color: #7a7468;
  margin-bottom: 0.4rem;
  letter-spacing: 1px;
}

.location-town {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.1rem;
  color: #666;
  margin-bottom: 1rem;
}

.meta-data {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #9c978e;
  border-top: 1px solid #f0ede9;
  padding-top: 1rem;
  width: 80%;
  text-align: center;
}

/* Subtle link hint */
.travel-card::after {
  content: 'View Website';
  font-size: 0.6rem;
  text-transform: uppercase;
  color: #7a7468;
  margin-top: 1.2rem;
  letter-spacing: 1px;
  opacity: 0.5;
}

/* WELCOME PAGE */
/* Container inside the parchment */
.welcome-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 0;
}

/* The Arched Window */
.arch-window {
  width: 320px;
  height: 450px;
  /* Arched top */
  border-radius: 160px 160px 0 0;
  
  /* Background Image */
  background: url('/images/hero.png') no-repeat center center;
  background-size: cover;
  
  /* The "Frame" */
  border: 2px solid #7a7468;
  box-shadow: inset 0 10px 20px rgba(0,0,0,0.1), 0 5px 15px rgba(122, 116, 104, 0.2);
  margin-bottom: 1rem;
}

@media (max-width: 400px) {
  .arch-window {
    width: 260px;
    height: 360px;
    border-radius: 130px 130px 0 0;
  }
}

.welcome-content {
  text-align: center;
}

.welcome-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.8rem;
  font-style: italic;
  color: #33302E;
  line-height: 1.4;
  margin-bottom: 2.5rem;
}

/* Button Layout */
.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 1rem;
}

.enter-button {
  display: inline-block;
  text-decoration: none;
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  letter-spacing: 2px;
  color: #F5F2ED;
  background: #7a7468;
  border: 1px solid #7a7468;
  padding: 12px 25px;
  transition: all 0.3s ease;
}

.enter-button.outline {
  background: transparent;
  color: #7a7468;
}

.enter-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(122, 116, 104, 0.2);
  opacity: 0.9;
}

.parchment-container.small {
  padding: 1rem;
}


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

.faq-item {
  margin-bottom: 3rem;
  border-left: 1px solid #7a7468; /* Matches the timeline "pillar" style */
  padding-left: 1.5rem;
}

.faq-question {
  font-family: 'Cinzel', serif;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #7a7468;
  margin-bottom: 0.8rem;
}

.faq-answer {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  line-height: 1.6;
  color: #33302E;
}

.faq-answer strong {
  font-weight: 600;
  color: #000;
}

/* --- Simple Portrait Gallery --- */
.portrait-gallery {
  display: flex;
  gap: 20px;          /* Space between the two photos */
  justify-content: center;
  margin-top: 2rem;
}

.photo-frame {
  flex: 1;            /* Each frame takes up equal width */
  max-width: 400px;   /* Prevents them from getting too huge on giant screens */
}

.photo-frame img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid #d1cdc7; /* Subtle border to match your parchment theme */
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

/* --- Mobile Stack Logic --- */
@media (max-width: 768px) {
  .portrait-gallery {
    flex-direction: column; /* Stacks them vertically */
    align-items: center;
  }
  
  .photo-frame {
    max-width: 100%; /* Allows photos to fill the width of the phone */
  }
}