/* Celestial Wedding Template - Template 4 */
/* Color Palette: Cream #F2EBE8, Gold #AF8E5E, Dark #2C2C2C */

@import url('https://fonts.googleapis.com/css2?family=Great+Vibes&family=Playfair+Display:wght@400;500;600;700&family=Lato:wght@300;400;500;600&display=swap');

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

:root {
  --color-cream: #F2EBE8;
  --color-cream-light: #FAF8F6;
  --color-gold: #AF8E5E;
  --color-gold-dark: #8B7149;
  --color-gold-light: #D4B896;
  --color-dark: #2C2C2C;
  --color-text: #4A4A4A;
  --color-text-light: #6B6B6B;
  --color-white: #FFFFFF;
  
  --font-script: 'Great Vibes', cursive;
  --font-heading: 'Playfair Display', serif;
  --font-body: 'Lato', sans-serif;
  
  --sidebar-width: 280px;
  --transition: all 0.3s ease;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-cream);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-dark);
  font-weight: 500;
  line-height: 1.3;
}

a {
  color: var(--color-gold);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--color-gold-dark);
}

img {
  max-width: 100%;
  height: auto;
}

/* Layout: Split Screen */
.celestial-wrapper {
  display: flex;
  min-height: 100vh;
}

/* Sidebar Navigation */
.celestial-sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background-color: var(--color-cream-light);
  border-right: 1px solid rgba(175, 142, 94, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 20px;
  z-index: 100;
}

.sidebar-monogram {
  margin-bottom: 30px;
}

.sidebar-monogram svg {
  width: 80px;
  height: auto;
  fill: var(--color-gold);
}

.sidebar-couple-names {
  font-family: var(--font-script);
  font-size: 2rem;
  color: var(--color-gold);
  text-align: center;
  margin-bottom: 10px;
}

.sidebar-date {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  letter-spacing: 2px;
  color: var(--color-text-light);
  text-transform: uppercase;
  margin-bottom: 40px;
}

.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.sidebar-nav ul {
  list-style: none;
  text-align: center;
}

.sidebar-nav li {
  margin-bottom: 25px;
}

.sidebar-nav a {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--color-text);
  position: relative;
  padding-bottom: 5px;
}

.sidebar-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 1px;
  background-color: var(--color-gold);
  transition: var(--transition);
}

.sidebar-nav a:hover::after,
.sidebar-nav a.active::after {
  width: 100%;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  color: var(--color-gold);
}

/* Main Content Area */
.celestial-main {
  flex: 1;
  min-width: 0;
  margin-left: var(--sidebar-width);
}

/* Section Base */
.celestial-section {
  padding: 80px 60px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.section-title {
  font-family: var(--font-script);
  font-size: 3rem;
  color: var(--color-gold);
  text-align: center;
  margin-bottom: 50px;
}

.section-subtitle {
  font-family: var(--font-heading);
  font-size: 1rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-text-light);
  text-align: center;
  margin-bottom: 30px;
}

/* Hero Section */
.hero-section {
  background-size: cover;
  background-position: center;
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    rgba(242, 235, 232, 0.6) 0%,
    rgba(242, 235, 232, 0.4) 50%,
    rgba(242, 235, 232, 0.7) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 40px;
}

.hero-monogram {
  margin-bottom: 30px;
}

.hero-monogram svg {
  width: 120px;
  height: auto;
  fill: var(--color-gold);
}

.hero-names {
  font-family: var(--font-script);
  font-size: 4.5rem;
  color: var(--color-gold);
  margin-bottom: 20px;
  line-height: 1.2;
}

.hero-ampersand {
  font-size: 3rem;
  display: block;
  margin: 10px 0;
}

.hero-date {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--color-dark);
  margin-bottom: 15px;
}

.hero-location {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-text-light);
  letter-spacing: 1px;
}

/* Couple Section */
.couple-section {
  background-color: var(--color-cream-light);
}

.couple-container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 80px;
  max-width: 900px;
  margin: 0 auto;
}

.couple-person {
  text-align: center;
  flex: 1;
  max-width: 350px;
}

.couple-photo {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--color-white);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  margin-bottom: 25px;
}

.couple-name {
  font-family: var(--font-script);
  font-size: 2.2rem;
  color: var(--color-gold);
  margin-bottom: 15px;
}

.couple-bio {
  font-size: 0.95rem;
  color: var(--color-text-light);
  line-height: 1.7;
  font-style: italic;
}

/* Godparents */
.godparents-section {
  margin-top: 60px;
  text-align: center;
}

.godparents-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-text-light);
  margin-bottom: 15px;
}

.godparents-names {
  font-family: var(--font-script);
  font-size: 1.8rem;
  color: var(--color-gold);
}

.parents-section {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px;
  margin-top: 60px;
  text-align: center;
}

@media (min-width: 993px) {
  .parents-section:not(.parents-section--single) {
    width: 100%;
    max-width: 780px;
    margin-left: auto;
    margin-right: auto;
  }
}

.parents-section--single {
  grid-template-columns: 1fr;
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}

.parents-family-title {
  font-family: var(--font-script);
  font-size: 2rem;
  color: var(--color-gold);
  margin-bottom: 16px;
}

.parent-name {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: var(--color-text);
  margin: 12px 0 4px;
}

.parent-role {
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-text-light);
  margin: 0;
}

/* Countdown Section */
.countdown-section {
  background-size: cover;
  background-position: center;
  position: relative;
  min-height: 60vh;
}

.countdown-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(44, 44, 44, 0.5);
}

.countdown-content {
  position: relative;
  z-index: 2;
  text-align: center;
}

.countdown-intro {
  font-family: var(--font-script);
  font-size: 2.5rem;
  color: var(--color-white);
  margin-bottom: 40px;
}

.countdown-timer {
  display: flex;
  justify-content: center;
  gap: 40px;
}

.countdown-item {
  text-align: center;
}

.countdown-number {
  font-family: var(--font-heading);
  font-size: 4rem;
  color: var(--color-gold-light);
  display: block;
  line-height: 1;
}

.countdown-label {
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-white);
  margin-top: 10px;
}

/* Story Section */
.story-section {
  background-color: var(--color-cream);
}

.story-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.story-text {
  font-size: 1.1rem;
  line-height: 1.9;
  color: var(--color-text);
  margin-bottom: 30px;
}

.story-signature {
  font-family: var(--font-script);
  font-size: 2rem;
  color: var(--color-gold);
}

.story-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 20px;
  width: 100%;
  max-width: 1000px;
  margin: 40px auto 0;
}

.story-gallery-photo {
  display: block;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--color-gold-light);
  border-radius: 8px;
  background-color: var(--color-cream-light);
  cursor: zoom-in;
}

.story-gallery-photo:only-child {
  width: 100%;
  max-width: 440px;
  justify-self: center;
}

.story-gallery-photo:focus-visible {
  outline: 2px solid var(--color-gold-dark);
  outline-offset: 4px;
}

.story-gallery-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.gallery-lightbox {
  width: min(1000px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 56px 20px 20px;
  border: 1px solid var(--color-gold-light);
  border-radius: 8px;
  background-color: var(--color-cream-light);
  color: var(--color-text);
}

.gallery-lightbox::backdrop {
  background: rgba(0, 0, 0, 0.85);
}

.gallery-lightbox figure {
  text-align: center;
}

.gallery-lightbox img {
  display: block;
  width: 100%;
  height: min(65dvh, 680px);
  max-height: calc(100dvh - 196px);
  object-fit: contain;
}

.gallery-lightbox figcaption {
  margin-top: 12px;
}

.gallery-lightbox button {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--color-gold);
  border-radius: 6px;
  background: transparent;
  color: var(--color-gold-dark);
  font-size: 24px;
  cursor: pointer;
}

.gallery-lightbox button:focus-visible {
  outline: 2px solid var(--color-gold-dark);
  outline-offset: 3px;
}

.gallery-lightbox-close {
  position: absolute;
  top: 8px;
  right: 8px;
}

.gallery-lightbox-controls {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 12px;
}

.gallery-lightbox button:disabled {
  opacity: 0.4;
  cursor: default;
}

body.gallery-open {
  overflow: hidden;
}

/* Events Section */
.events-section {
  background-color: var(--color-cream-light);
}

.events-container {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  max-width: 1100px;
  margin: 0 auto;
}

.event-card {
  background-color: var(--color-white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  transition: var(--transition);
}

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

.event-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.event-content {
  padding: 30px;
  text-align: center;
}

.event-type {
  font-family: var(--font-script);
  font-size: 1.8rem;
  color: var(--color-gold);
  margin-bottom: 15px;
}

.event-datetime {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--color-text);
  margin-bottom: 10px;
}

.event-datetime svg {
  width: 16px;
  height: 16px;
  fill: var(--color-gold);
}

.event-location {
  text-align: center;
  font-size: 0.9rem;
  color: var(--color-text-light);
  margin-bottom: 20px;
}

.event-location svg {
  width: 16px;
  height: 16px;
  fill: var(--color-gold);
  display: inline-block;
  vertical-align: -2px;
  margin-right: 4px;
}

.event-map-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--color-gold);
  border: 1px solid var(--color-gold);
  padding: 10px 20px;
  border-radius: 4px;
  transition: var(--transition);
}

.event-map-link:hover {
  background-color: var(--color-gold);
  color: var(--color-white);
}

/* RSVP Section */
.rsvp-section {
  background-size: cover;
  background-position: center;
  position: relative;
  min-height: 100vh;
}

.rsvp-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(242, 235, 232, 0.92);
}

.rsvp-container {
  position: relative;
  z-index: 2;
  max-width: 500px;
  margin: 0 auto;
}

.rsvp-section > .section-title {
  position: relative;
  z-index: 2;
  color: var(--color-dark);
}

.rsvp-intro {
  text-align: center;
  margin-bottom: 40px;
}

.rsvp-intro p {
  font-size: 1rem;
  color: var(--color-text);
  line-height: 1.7;
}

.rsvp-form {
  background-color: var(--color-white);
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.form-group {
  margin-bottom: 25px;
}

.form-group label {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--color-text);
  margin-bottom: 8px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 14px 16px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-dark);
  background-color: var(--color-cream-light);
  border: 1px solid transparent;
  border-radius: 4px;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--color-gold);
  background-color: var(--color-white);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 20px;
}

.btn-submit {
  width: 100%;
  padding: 16px 30px;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-white);
  background-color: var(--color-gold);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-submit:hover {
  background-color: var(--color-gold-dark);
}

/* Footer */
.celestial-footer {
  background-color: var(--color-cream-light);
  padding: 60px 40px;
  text-align: center;
  border-top: 1px solid rgba(175, 142, 94, 0.2);
}

.footer-names {
  font-family: var(--font-script);
  font-size: 2.5rem;
  color: var(--color-gold);
  margin-bottom: 15px;
}

.footer-date {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  letter-spacing: 2px;
  color: var(--color-text-light);
}

/* Alert Messages */
.alert {
  padding: 15px 20px;
  border-radius: 4px;
  margin-bottom: 20px;
  font-size: 0.95rem;
}

.alert-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-danger {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Inactive Notice */
.inactive-notice {
  background-color: #fff3cd;
  color: #856404;
  padding: 15px;
  text-align: center;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

/* Mobile Navigation Toggle */
.mobile-nav-toggle {
  display: none;
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 200;
  background-color: var(--color-gold);
  color: var(--color-white);
  border: none;
  padding: 12px 15px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1.2rem;
}

/* Responsive Design */
@media (max-width: 992px) {
  :root {
    --sidebar-width: 0;
  }
  
  .celestial-sidebar {
    transform: translateX(-100%);
    width: 280px;
    transition: transform 0.3s ease;
  }
  
  .celestial-sidebar.active {
    transform: translateX(0);
  }
  
  .mobile-nav-toggle {
    display: block;
  }
  
  .celestial-main {
    margin-left: 0;
  }
  
  .celestial-section {
    padding: 48px 30px;
    min-height: 0;
  }

  .hero-section {
    min-height: 100vh;
  }

  .countdown-section {
    min-height: 0;
    padding-top: 56px;
    padding-bottom: 56px;
  }

  .section-title {
    margin-bottom: 28px;
  }

  .godparents-section {
    margin-top: 36px;
  }

  .parents-section {
    grid-template-columns: 1fr;
    gap: 32px;
    margin-top: 36px;
  }

  .hero-names {
    font-size: 3rem;
  }
  
  .couple-container {
    flex-direction: column;
    align-items: center;
    gap: 36px;
  }
  
  .countdown-timer {
    gap: 20px;
  }

  .countdown-intro {
    margin-bottom: 28px;
  }
  
  .countdown-number {
    font-size: 2.5rem;
  }
  
  .events-container {
    grid-template-columns: 1fr;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 576px) {
  .celestial-section {
    padding: 36px 20px;
  }

  .hero-section {
    min-height: 0;
    padding: 80px 20px 48px;
  }

  .hero-content {
    width: 100%;
    padding: 0;
    overflow-wrap: anywhere;
  }

  .countdown-section {
    padding-top: 40px;
    padding-bottom: 40px;
  }

  .section-title {
    font-size: 2.2rem;
    margin-bottom: 20px;
  }

  .story-text {
    margin-bottom: 20px;
  }

  .story-gallery {
    gap: 16px;
    margin-top: 28px;
  }

  .divider {
    margin: 18px 0;
  }

  .godparents-section {
    margin-top: 28px;
  }

  .parents-section {
    margin-top: 28px;
    gap: 28px;
  }

  .couple-container {
    gap: 28px;
  }

  .couple-photo {
    width: 160px;
    height: 160px;
    margin-bottom: 16px;
  }

  .hero-names {
    font-size: 2.5rem;
  }
  
  .hero-ampersand {
    font-size: 2rem;
  }
  
  .countdown-timer {
    flex-wrap: wrap;
    gap: 20px;
  }
  
  .countdown-item {
    width: 40%;
  }
  
  .countdown-number {
    font-size: 2rem;
  }

  .countdown-intro {
    font-size: 2rem;
    margin-bottom: 20px;
  }
  
  .rsvp-form {
    padding: 30px 20px;
  }
}

/* Overlay for mobile sidebar */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 99;
}

.sidebar-overlay.active {
  display: block;
}

/* Decorative Elements */
.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 30px 0;
}

.divider::before,
.divider::after {
  content: '';
  height: 1px;
  width: 60px;
  background-color: var(--color-gold-light);
}

.divider-icon {
  margin: 0 15px;
  color: var(--color-gold);
  font-size: 1.2rem;
}

.rsvp-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.form-group .rsvp-choice-label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  margin-bottom: 0;
  padding: 12px 10px;
  border: 2px solid var(--color-gold-light);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}

.rsvp-choice-label {
  position: relative;
}

.rsvp-choice-label input[type="radio"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.rsvp-choice-label:focus-within {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}
