/* Language button emoji style for nav */
/* ===== LANGUAGE SELECTOR STYLES ===== */
.lang-selector {
  position: relative;
  display: flex;
  align-items: center;

  .lang-selector #lang-btn {
    color: white;
    font-family: var(--font-body);
    cursor: pointer;
    padding: 0.3em 0.8em;
    border-radius: 20px;
    transition: background 0.2s;
    outline: none;
    display: flex;
    align-items: center;
    gap: 0.3em;
  }
  /* Robust language button styling for dynamic nav */
  .lang-btn-emoji {
    background: none;
    border: none;
    font-size: 1.15em;
    width: 4em;
    min-width: 4em;
    min-height: 1.8em;
    color: white;
    font-family: var(--font-body);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    transition: background 0.2s;
    cursor: pointer;
    outline: none;
    gap: 0.3em;
  }

  .lang-selector #lang-btn[aria-expanded="true"],
  .lang-selector #lang-btn:focus {
    outline: none;
    background: none;
    /* Keep text white on focus unless open */
  }
}
.lang-selector #lang-btn[aria-expanded="true"] {
  background: none;
  color: var(--peony-pink) !important;
}

.lang-dropdown {
  display: none;
  position: absolute;
  top: 110%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--white);
  min-width: 60px;
  width: 60px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  border-radius: 8px;
  z-index: 1001;
  list-style: none;
  text-align: center;
}

.lang-dropdown.show {
  display: block;
}

.lang-dropdown li {
  width: 100%;
  display: flex;
  justify-content: center;
}

.lang-dropdown a {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  padding: 0.5em 0;
  color: var(--peony-pink) !important;
  text-decoration: none;
  font-size: 1.5rem;
  transition:
  background 0.2s,
  color 0.2s;
  border-radius: 8px;
}

.lang-dropdown a:hover {
  background: var(--peony-pink);
  color: var(--white);
}

@media (max-width: 768px) {
  .lang-selector {
    justify-content: center;
    /* Remove position: relative so dropdown can be fixed to viewport */
  }
  .lang-selector #lang-btn {
     color: white;
    width: 100%;
    text-align: left;
    border-radius: 10px;
    font-size: 1.5em;
    min-width: 2.5em;
    min-height: 2.5em;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.2em 0.5em;
  }
  .lang-dropdown {
    position: fixed;
    left: 0;
    top: 60px; /* match nav bar height on mobile */
    width: 100vw;
    min-width: 100vw;
    transform: none !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
    border-radius: 0;
    border-top: 1px solid #eee;
    z-index: 3000;
    background: var(--white);
    margin: 0;
    padding: 0.2em 0;
    text-align: center;
    overflow: visible;
  }
  .lang-dropdown a {
    padding-left: 0;
    justify-content: center;
    text-align: center;
  }
}

/* ===== CSS VARIABLES - EASY TO CUSTOMIZE ===== */
:root {
  --sage-green: #7d8f6f;
  --sage-green-light: #9caf88;
  --dusty-blue: #8aa8c5;
  --rose-pink: #e79086;
  --peony-pink: #ECCED0;
  --text-dark: #2c2c2c;
  --text-light: #6b6b6b;
  --white: #ffffff;
  --light-bg: #fafafa;

  /* Typography */
  --font-heading: "Playfair Display", serif;
  --font-body: "Montserrat", sans-serif;
}

/* ===== GLOBAL STYLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

/* ===== NAVIGATION ===== */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  height: 64px;
  background: linear-gradient(135deg, var(--sage-green), var(--dusty-blue));
  z-index: 1000;
  padding: 0;
  transition: all 0.3s ease;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);

  @media (max-width: 768px) {
    height: auto;
    padding: 0;
  }
}

nav.scrolled {
  /* Keep the gradient background when scrolled */
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 500;
  color: white;
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 2rem;
  height: 100%;
}

.nav-links li {
  display: flex;
  align-items: center;
  height: 100%;
}

.nav-links a {
  text-decoration: none;
  color: white;
  font-weight: 500;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
  height: 100%;
  font-size: 1.15em;
}

.nav-links a:hover {
  color: var(--peony-pink);
}

.nav-links a.active {
  color: var(--peony-pink);
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.menu-toggle span {
  width: 25px;
  height: 2px;
  background: var(--text-dark);
  margin: 3px 0;
  transition: 0.3s;
}

/* ===== SHARED PAGE STYLES ===== */
.hero {
  height: 100vh;
  background-image: url("images/christine-florentin-516.jpg");
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  position: relative;
  padding: 100px 0 50px;
}

.page-hero {
  width: 100vw;
  min-height: 100vh;
  background-image: url("images/christine-florentin-516.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  position: fixed;
  top: 0;
  left: 0;
  z-index: -1;
}

.hero-content {
  max-width: 800px;
  padding: 2rem;
}

.page-content {
  max-width: 1000px;
  width: 100%;
  margin: 0 auto;
  padding-top: 90px; /* Prevents content from being hidden under nav */
  position: relative;
  z-index: 1;
  padding-bottom: 20px;
}

.content-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 2rem 4rem 3rem;
  border-radius: 20px;
  justify-content: center;
  min-height: 80vh;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
  text-align: center;
}

.page-title {
  font-family: var(--font-heading);
  font-size: 3rem;
  color: var(--sage-green);
  margin-bottom: 1rem;
}

/* ===== HOMEPAGE SPECIFIC STYLES ===== */
.hero h1 {
  font-family: var(--font-heading);
  font-size: 4rem;
  font-weight: 400;
  margin-bottom: 1rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero .date {
  font-size: 3rem;
  font-weight: 300;
  margin-bottom: 1rem;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.hero .subtitle {
  font-size: 1.5rem;
  opacity: 0.9;
  margin-bottom: 2rem;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

/* Countdown Styles */
.countdown {
  margin-top: 2rem;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  backdrop-filter: blur(10px);
}

.countdown-title {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  opacity: 0.9;
}

.countdown-timer {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

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

.countdown-number {
  font-size: 2.5rem;
  font-weight: 600;
  display: block;
  margin-bottom: 0.5rem;
}

.countdown-label {
  font-size: 0.9rem;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 1px;
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-10px);
  }
  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

/* ===== STORY PAGE STYLES ===== */
.story-text {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-light);
  margin-bottom: 2rem;
  text-align: left;
}

.story-text p {
  margin-bottom: 1.5rem;
}

/* Photo Gallery */
.photo-gallery {
  margin-top: 2rem;
  background: var(--white);
  border-radius: 15px;
  overflow: hidden;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.gallery-container {
  position: relative;
  height: 500px;
  width: 100%;
  overflow: hidden;
}

.gallery-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.5s ease-in-out;
}

.gallery-slide.active {
  opacity: 1;
  transform: translateX(0);
}

.gallery-slide.prev {
  transform: translateX(-100%);
}

.gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  color: var(--white);
  padding: 2rem 1.5rem 1rem;
  text-align: center;
  font-size: 1rem;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  border: none;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--text-dark);
  transition: all 0.3s ease;
  z-index: 10;
}

.gallery-nav:hover {
  background: var(--sage-green-light);
  color: var(--white);
}

.gallery-nav.prev {
  left: 15px;
}

.gallery-nav.next {
  right: 15px;
}

.gallery-indicators {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem;
  background: var(--sage-green-light);
}

.indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--sage-green);
  opacity: 0.3;
  cursor: pointer;
  transition: all 0.3s ease;
}

.indicator.active {
  opacity: 1;
  transform: scale(1.2);
}

/* ===== DETAILS PAGE STYLES ===== */
.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.details-grid-bottom {
  margin-bottom: 2rem;
}

.details-grid-top {
  margin-top: 2rem;
}

.detail-card {
  background: var(--white);
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  text-align: left;
  transition: transform 0.3s ease;
}

.detail-card:hover {
  transform: translateY(-5px);
}

.detail-card h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--sage-green);
  margin-bottom: 1rem;
  text-align: center;
}

.detail-card p {
  color: var(--text-light);
  margin-bottom: 0.8rem;
  line-height: 1.6;
}

.detail-card strong {
  color: var(--text-dark);
}

.map-section {
  background: var(--white);
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.map-section h3 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  color: var(--sage-green);
  margin-bottom: 1.5rem;
  text-align: center;
}

#map {
  width: 100%;
  height: 400px;
  border-radius: 10px;
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
}

.map-info {
  margin-top: 1rem;
  text-align: center;
  color: var(--text-light);
  font-size: 0.9rem;
}

/* ===== RSVP PAGE STYLES ===== */
.page-subtitle {
  font-size: 1.1rem;
  color: var(--text-light);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.rsvp-form {
  text-align: left;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-size: 1rem;
  font-family: var(--font-body);
  background: var(--white);
  color: var(--text-dark);
  transition: border-color 0.3s ease;
}

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

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

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.submit-btn {
  background: linear-gradient(135deg, var(--sage-green), var(--dusty-blue));
  color: var(--white);
  border: none;
  padding: 1rem 2rem;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  margin-top: 1rem;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.success-message {
  display: none;
  background: var(--sage-color);
  color: var(--white);
  padding: 1rem;
  border-radius: 10px;
  margin-bottom: 1rem;
  text-align: center;
}

.success-message.show {
  display: block;
}

/* ===== LOGIN PAGE STYLES ===== */

.center-vertical-horizontal {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.full-viewport {
  min-height: 100vh;
}

.login-title {
  font-family: var(--font-body);
  font-size: 2rem;
  font-weight: 300;
}

.login-err {
  font-size: 1.5rem;
  color: var(--rose-pink);
  font-weight: 500;
  line-height: 1.2;
  min-height: 2.2rem;
  text-shadow: 0 1px 4px rgba(44,44,44,0.7), 0 0.5px 0 #fff;
  padding-top: 0.5rem;
}

.login-bg {
  background: var(--sage-green);
  color: var(--white);
  margin: 0;
}

.login-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.login-input {
  margin: 1rem 0;
  height: 2.8em;
  font-size: 1.2em;
  padding: 0.5em 1em;
  border-radius: 6px;
}

.login-btn {
  font-size: 1.2rem;
  padding: 0.75em 2em;
  border-radius: 6px;
  border: 1px solid black;
  background: white;
  color: var(--sage-green);
  cursor: pointer;
}

.login-logo {
  font-family: var(--font-heading);
  font-size: 5rem;
  font-weight: 500;
  text-decoration: none;
  padding-bottom: 10px;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 60px;
    left: 0;
    width: 100vw;
    background: var(--white);
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 2rem 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition:
      max-height 0.3s ease,
      opacity 0.3s ease;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    z-index: 2001;
  }

  .nav-links a {
    color: var(--sage-green) !important;
  }

  /* Mobile: lang-selector next to menu, not in dropdown */
  .nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .lang-selector {
    order: 2;
    margin-right: 0.5em;
    margin-left: auto;
    display: flex;
    align-items: center;
    z-index: 2002;
    background: none;
  }
  .menu-toggle {
    order: 3;
    margin-left: 0;
    z-index: 2003;
  }
  .nav-links {
    order: 4;
  }

  .nav-links.active {
    opacity: 1;
    max-height: 500px;
    pointer-events: auto;
  }

  .menu-toggle {
    display: flex;
  }

  .nav-container {
    padding: 0 1rem;
  }

  .page-content {
    padding: 1rem;
    padding-top: 75px;
  }

  .content-card {
    padding: 2rem;
  }

  .page-hero {
    background-attachment: scroll;
    position: fixed;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero .date {
    font-size: 1.2rem;
  }

  .hero .subtitle {
    font-size: 1rem;
  }

  .page-title {
    font-size: 2rem;
  }

  .countdown-timer {
    gap: 1rem;
  }

  .countdown-number {
    font-size: 2rem;
  }

  .gallery-container {
    height: 300px;
  }

  .gallery-nav {
    width: 35px;
    height: 35px;
    font-size: 1rem;
  }

  .gallery-nav.prev {
    left: 10px;
  }

  .gallery-nav.next {
    right: 10px;
  }

  .details-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .detail-card {
    padding: 1.5rem;
  }

  .map-section {
    padding: 1.5rem;
  }

  #map {
    height: 300px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2.2rem;
  }

  .hero .date {
    font-size: 2rem;
  }

  .hero .subtitle {
    font-size: 1.2rem;
  }

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

  .content-card {
    padding: 1.5rem;
  }

  .countdown-number {
    font-size: 1.5rem;
  }

  .countdown-label {
    font-size: 0.8rem;
  }

  .gallery-container {
    height: 250px;
  }

  .detail-card h3 {
    font-size: 1.3rem;
  }
}
