/* CSS Variables */
:root {
  /* Refined Palette Example */
  --primary-color: #C8A2C8; /* Softer Lilac/Mauve */
  --secondary-color: #E6D9E6; /* Lighter complementary shade */
  --accent-color: #F8F4F0; /* Warmer off-white background */
  --highlight-color: #B08D57; /* Soft Gold for accents */
  --text-color: #4A4A4A; /* Darker gray */
  --heading-color: #333; /* Slightly darker for headings */
  --white: #fff;
  --subtle-pattern-color: rgba(0, 0, 0, 0.03); /* Very light grey for pattern */
  --header-font: 'Playfair Display', serif;
  --body-font: 'Poppins', sans-serif;
  --shadow: 0px 8px 15px rgba(0, 0, 0, 0.08); /* Softer shadow */
  --border-radius: 8px; /* Slightly smaller radius */
  --header-transition: all 0.3s ease-in-out;
  --hover-transition: all 0.2s ease-in-out; /* Standard transition for hovers */
}

/* Global Reset & Base Styles */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--body-font); background-color: var(--accent-color); color: var(--text-color);
  line-height: 1.7; font-size: 16px;
  /* Subtle Background Pattern */
  background-image: linear-gradient(135deg, var(--subtle-pattern-color) 25%, transparent 25%),
                    linear-gradient(225deg, var(--subtle-pattern-color) 25%, transparent 25%);
  background-size: 10px 10px;
}
@media (min-width: 768px) { body { font-size: 17px; } }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--highlight-color); text-decoration: none; transition: color 0.3s ease, opacity 0.3s ease; }
a:hover, a:focus { color: var(--primary-color); opacity: 0.8; text-decoration: none; }
ul { list-style: none; }

/* --- Header Styles --- */
header {
  padding: 0.8rem 5%; background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
  color: var(--white); text-align: center; position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1); transition: var(--header-transition);
}
.header-content { transition: var(--header-transition); }
.header-content h1 {
  font-family: var(--header-font); font-size: clamp(1.8rem, 4vw, 2.5rem); margin-bottom: 0.1rem;
  transition: var(--header-transition); color: var(--white);
}
.header-content h2 {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem); font-weight: 300; color: var(--white); margin-bottom: 0.3rem;
  transition: var(--header-transition), opacity 0.3s ease, height 0.3s ease, margin 0.3s ease;
  overflow: hidden; height: auto; opacity: 1;
}
.date-location {
  font-size: clamp(0.85rem, 1.8vw, 1rem); opacity: 0.9; color: var(--white);
  transition: var(--header-transition), opacity 0.3s ease, height 0.3s ease, margin 0.3s ease;
  overflow: hidden; height: auto; opacity: 1;
}
nav { margin-top: 0.5rem; transition: var(--header-transition); }
#nav-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 1rem 1.5rem; }
#nav-links a {
  color: var(--white); font-weight: 400; font-size: 0.95rem; padding: 0.3rem 0;
  position: relative; text-decoration: none; transition: var(--hover-transition); /* Use hover transition */
  opacity: 0.9;
}
#nav-links a:hover, #nav-links a:focus {
    opacity: 1; color: var(--white);
    transform: translateY(-1px); /* Subtle lift effect */
}
#nav-links a::after { /* Underline effect */
  content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px;
  background-color: var(--white); transition: width 0.3s ease;
}
#nav-links a:hover::after, #nav-links a:focus::after { width: 100%; }
#menu-toggle {
  display: none; background: none; border: none; color: var(--white); font-size: 1.8rem;
  cursor: pointer; position: absolute; top: 0.8rem; right: 5%; transition: var(--header-transition);
}

/* --- Scrolled Header Styles --- */
header.header-scrolled {
    padding: 0.3rem 5%; background: var(--primary-color); box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
header.header-scrolled .header-content h1 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 0; }
header.header-scrolled .header-content h2, header.header-scrolled .date-location { opacity: 0; height: 0; margin-bottom: 0; padding: 0; }
header.header-scrolled nav { margin-top: 0.2rem; }
header.header-scrolled #nav-links a { font-size: 0.9rem; padding: 0.2rem 0; }
header.header-scrolled #menu-toggle { top: 0.4rem; font-size: 1.6rem; }

/* --- Hero Section Styles --- */
.hero {
  height: 65vh; min-height: 400px; background: url('us2.jpg') no-repeat; background-size: cover;
  background-position: center 25%; /* Keep adjusted position */
  position: relative; display: flex; align-items: center; justify-content: center;
}
.hero::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.45); }
.hero-text { position: relative; color: var(--white); text-align: center; padding: 2rem; background: transparent; max-width: 700px; margin: auto; }
.hero-text h2 { color: var(--white); font-size: clamp(2.5rem, 7vw, 4.5rem); font-family: var(--header-font); font-weight: 700; text-shadow: 1px 1px 3px rgba(0,0,0,0.5); }

/* --- Main Content & Other Section Styles --- */
.container { width: 90%; max-width: 850px; margin: 3rem auto; padding: 0 15px; }
.content-section { background: var(--white); margin: 3.5rem 0; padding: clamp(2rem, 6vw, 3rem); border-radius: var(--border-radius); box-shadow: var(--shadow); text-align: left; }
.content-section h2, details.collapsible summary h2 { font-family: var(--header-font); color: var(--heading-color); font-size: clamp(1.8rem, 5vw, 2.5rem); margin-bottom: 1.5rem; text-align: center; font-weight: 700; letter-spacing: 0.5px; }
details.collapsible { padding: 0; background: transparent; margin: 3.5rem 0; box-shadow: none; border-radius: var(--border-radius); overflow: hidden; box-shadow: var(--shadow); }
details.collapsible summary { list-style: none; cursor: pointer; padding: 1.2rem 1.8rem; position: relative; background-color: var(--secondary-color); border-bottom: 1px solid rgba(0,0,0,0.05); transition: background-color 0.3s ease; }
details.collapsible summary:hover, details.collapsible summary:focus { background-color: #ddd5dd; }
details[open].collapsible summary { border-bottom: none; }
details.collapsible summary::-webkit-details-marker { display: none; }
details.collapsible summary::after { content: '+'; position: absolute; right: 1.8rem; top: 50%; transform: translateY(-50%); font-size: 1.8rem; font-weight: 300; color: var(--primary-color); transition: transform 0.3s ease; }
details[open].collapsible summary::after { content: '−'; }
.collapsible-content { padding: 1.5rem 1.8rem; background-color: var(--white); }
.collapsible-content ul, .content-section ul { margin-top: 1rem; padding-left: 0; list-style: none; }
.collapsible-content li, .content-section li { margin-bottom: 0.8rem; padding-left: 1.5rem; position: relative; }
.collapsible-content li::before, .content-section li::before { content: '•'; color: var(--highlight-color); font-weight: bold; display: inline-block; width: 1em; margin-left: -1.5em; position: absolute; left: 1em; top: 0; }
.details p, .collapsible-content p { margin-bottom: 1.2rem; }
.details strong, .collapsible-content strong { font-weight: 600; color: var(--heading-color); }
.collapsible-content h3 { font-family: var(--header-font); font-size: 1.4rem; color: var(--primary-color); margin-top: 1.8rem; margin-bottom: 1rem; border-bottom: 1px solid var(--secondary-color); padding-bottom: 0.3rem; }
.map-image { border-radius: calc(var(--border-radius) / 2); box-shadow: 0 4px 8px rgba(0,0,0,0.1); margin: 1.5rem auto; display: block; }
.rsvp iframe { border: 1px solid #eee; border-radius: var(--border-radius); min-height: 700px; margin-top: 1.5rem; width: 100%; box-shadow: none; }
.rsvp p { text-align: center; font-size: 1.1rem; margin-bottom: 1.5rem; color: var(--text-color); }

/* Added styles for inline images */
.inline-image {
    border-radius: var(--border-radius);
    margin: 1.5rem 0; /* Add some space around the images */
    box-shadow: var(--shadow);
}

/* Added styles for icons */
.icon-location::before,
.icon-time::before,
.icon-dresscode::before {
    display: inline-block;
    margin-right: 0.6em; /* Space between icon and text */
    color: var(--primary-color); /* Use primary color for icons */
    font-size: 1.1em; /* Slightly larger icons */
    vertical-align: middle; /* Align icon better with text */
}

.icon-location::before {
    content: '📍'; /* Map pin emoji */
}

.icon-time::before {
    content: '⏰'; /* Clock emoji */
}

.icon-dresscode::before {
    content: '👕'; /* T-shirt emoji */
    font-size: 1.2em; /* Make shirt slightly larger */
}

/* Added styles for button link */
.button-link {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: var(--white) !important; /* Ensure text is white */
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: var(--hover-transition); /* Use hover transition */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    opacity: 1; /* Override default link opacity */
}

.button-link:hover, .button-link:focus {
    background-color: #b38cb3; /* Slightly darker shade of primary */
    color: var(--white) !important;
    transform: scale(1.03); /* Slight grow effect */
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    opacity: 1;
}


footer { margin-top: 4rem; padding: 2.5rem 5%; background: var(--heading-color); color: #ccc; text-align: center; font-size: 0.95rem; }
footer p { margin-bottom: 0; }

/* --- Fade-In Animation Styles --- */
.fade-in { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.fade-in.active { opacity: 1; transform: translateY(0); }

/* --- Responsive Design --- */
@media (max-width: 768px) {
  body { line-height: 1.6; }
  header { padding: 0.6rem 5%; }
  header.header-scrolled { padding: 0.2rem 5%; }
  header.header-scrolled #menu-toggle { top: 0.2rem; font-size: 1.5rem; }
  #menu-toggle { display: block; top: 0.6rem; }
  #nav-links { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; width: 100%; background: var(--primary-color); padding: 0.5rem 0; box-shadow: 0 4px 8px rgba(0,0,0,0.2); }
  #nav-links.active { display: flex; } #nav-links li { width: 100%; text-align: center; }
  #nav-links a { padding: 0.8rem 1rem; display: block; width: 100%; } #nav-links a::after { display: none; }
  #nav-links a:hover, #nav-links a:focus { transform: none; } /* Disable lift effect on mobile menu */
  .container { width: 95%; margin: 2rem auto; } .hero { height: 55vh; } .hero-text h2 { font-size: clamp(2rem, 8vw, 3rem); }
  .content-section { margin: 2.5rem 0; padding: 1.5rem; } details.collapsible { margin: 2.5rem 0; }
  details.collapsible summary { padding: 1rem 1.2rem; } details.collapsible summary::after { right: 1.2rem; font-size: 1.5rem; }
  .collapsible-content { padding: 1.2rem; } .content-section h2, details.collapsible summary h2 { font-size: clamp(1.6rem, 6vw, 2rem); }
}
@media (max-width: 480px) {
    .header-content h1 { font-size: 1.6rem; } header.header-scrolled .header-content h1 { font-size: 1.3rem; }
    .hero { height: 50vh; } .hero-text h2 { font-size: clamp(1.8rem, 7vw, 2.5rem); }
    .content-section h2, details.collapsible summary h2 { font-size: clamp(1.5rem, 5.5vw, 1.8rem); }
    .rsvp iframe { min-height: 850px; }
    .content-section, details.collapsible summary, .collapsible-content { padding: 1rem; }
    details.collapsible summary::after { right: 1rem; }
}