/* Basic Reset and Body Styles */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body, html {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    scroll-snap-type: y mandatory;
    overflow-x: hidden; /* Verhindert horizontales Scrollen */
    overflow-y: scroll;
    height: 100%;
    background-color: #fdfdfd;
    color: #333;
    scroll-behavior: smooth;
}

h1, h2 {
    font-family: 'Playfair Display', serif;
}

/* Hero Section (Big Picture) */
.hero-section {
    height: 100vh;
    background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('hero-background.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    scroll-snap-align: start;
    flex-direction: column; /* Stack items vertically */
    gap: 1.5rem; /* Add space between images and text */
    padding-top: 2rem; /* Add some padding to avoid content touching the top edge */
    box-sizing: border-box; /* Ensure padding is included in height */
    overflow-x: hidden; /* Prevent horizontal overflow from hero content */
}

.hero-image-placeholders {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2); /* Fallback color */
    border: 3px solid white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    background-size: cover;
    background-position: center;
}

.hero-image-circle:first-child {
    background-image: url('c.JPG'); /* Placeholder 1 */
    margin-right: -40px; /* Overlap the circles */
    z-index: 1; /* Ensure this circle is on top */
}

.hero-image-circle:last-child {
    background-image: url('m2.jpg'); /* Placeholder 2 */
}

.hero-text h1 {
    font-size: 5rem;
    margin: 0;
    font-weight: 700;
}

.hero-text p {
    font-size: 1.5rem;
    font-weight: 300;
    margin-top: 0.5rem;
}

/* Countdown Timer */
#countdown {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.countdown-item {
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem;
    border-radius: 5px;
    min-width: 80px;
    text-align: center;
}

.countdown-item span {
    display: block;
    color: white;
}

.countdown-item span:first-child { /* The number */
    font-size: 2.5rem;
    font-weight: bold;
}

.countdown-label { /* The label */
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.25rem;
}

/* General Content Section Styling */
.content-section {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    scroll-snap-align: start;
    padding: 2rem;
    box-sizing: border-box;
    overflow-x: hidden; /* Prevent horizontal overflow from any section */
}

.content-wrapper {
    max-width: 800px;
    text-align: center;
}

.content-section h2 {
    font-size: 3rem;
    margin-bottom: 2rem;
    color: #5D4037; /* A warm brown color */
}

/* Timeline Section */
.timeline-container {
    width: 100%;
    position: relative;
    max-width: 800px; /* Constrain width for better readability */
}

.timeline {
    list-style: none;
    padding: 0;
    position: relative;
}

/* The vertical line */
.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 3px;
    background-color: #e0e0e0;
    transform: translateY(-50%);
    transform: translateX(-50%);
}

.timeline li {
    padding: 15px 40px; /* Reduced vertical padding */
    position: relative;
    width: 50%;
    box-sizing: border-box;
}

/* The hearts on the timeline */
.timeline li::after {
    content: '♥';
    position: absolute;
    font-size: 22px;
    color: #5D4037;
    background-color: #fdfdfd; /* Match page background to cover the line */
    padding: 0 2px; /* Breathing room for the line */
    top: 35px;
    line-height: 1;
    z-index: 1;
}

/* Alternating sides */
.timeline li:nth-child(odd) {
    left: 0;
    padding-right: 30px;
    text-align: right;
}

.timeline li:nth-child(even) {
    left: 50%;
    padding-left: 30px;
}

/* Position the hearts */
.timeline li:nth-child(odd)::after {
    right: 0;
    transform: translate(50%, -50%);
}

.timeline li:nth-child(even)::after {
    left: 0;
    transform: translate(-50%, -50%);
}

.timeline-content {
    padding: 20px 30px;
    background-color: #fff;
    position: relative;
    border-radius: 6px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

/* Add arrows */
.timeline-content::before {
    content: " ";
    height: 0;
    width: 0;
    position: absolute;
    top: 30px;
    border: 10px solid transparent;
}

.timeline li:nth-child(odd) .timeline-content::before {
    right: -20px;
    border-left-color: #fff;
}

.timeline li:nth-child(even) .timeline-content::before {
    left: -20px;
    border-right-color: #fff;
}

.timeline-year {
    position: absolute;
    top: 35px;
    transform: translateY(-50%);
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: bold;
    color: #5D4037;
    width: 120px; /* Give it a fixed width */
}

.timeline li:nth-child(odd) .timeline-year {
    left: 100%;
    margin-left: 35px;
}

.timeline li:nth-child(even) .timeline-year {
    right: 100%;
    margin-right: 35px;
    text-align: right;
}

.timeline-content p {
    margin: 0;
    font-size: 1rem;
    color: #666;
}

/* Allow contact section to be wider for the form */
#contact .content-wrapper {
    max-width: 100%;
    width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Dresscode Section */
.dresscode-container {
    display: flex;
    justify-content: center;
    gap: 4rem;
    width: 100%;
    margin-top: 2rem;
}

.dresscode-category {
    text-align: center;
}

.dresscode-category h3 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: #795548;
    margin-bottom: 1.5rem;
}

.dresscode-category .color-palette {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.color-swatch-container {
    text-align: center;
}

.color-swatch {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin-bottom: 0.5rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.color-name {
    font-weight: bold;
    color: #555;
}

.color-burnt-sienna { background-color: #a0522d; }
.color-bordeaux { background-color: #722F37; }
.color-sage-green { background-color: #9DC183; }
.color-petroleum { background-color: #549b8c; }
.color-navy-blue { background-color: #000080; }
.color-dark-grey { background-color: #5A5A5A; }

/* Schedule Section Background */
#schedule {
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('schedule-background.png');
    background-size: cover;
    background-position: center;
    color: white;
}

#schedule h2 {
    color: white;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

#schedule .schedule-container h3 {
    color: white;
    border-bottom-color: rgba(255, 255, 255, 0.5);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
}

#schedule .schedule-container ul {
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
}

/* Specific Section Styles */
.schedule-container h3 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: #795548; /* A slightly lighter brown */
    margin-top: 2rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
}

.schedule-container h3:first-of-type {
    margin-top: 0;
}

.schedule-container ul {
    list-style: none;
    padding: 0;
    font-size: 1.2rem;
    text-align: left;
    max-width: 400px;
    margin: 0 auto 2rem auto; /* Center the list and add bottom margin */
}

.schedule-container li {
    margin-bottom: 1rem;
}

#location {
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://images.unsplash.com/photo-1506905925346-21bda4d32df4?q=80&w=2070&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    color: white;
}

#location .content-wrapper p {
    font-size: 1.2rem;
    line-height: 1.6;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

#location h2 {
    color: white;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

#accommodation h3 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: #795548;
    margin: 1.5rem 0;
}

#accommodation p {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    max-width: 600px; /* Improve readability */
    margin-left: auto;
    margin-right: auto;
}

#faq dl {
    text-align: left;
    font-size: 1.1rem;
}

#faq dt {
    font-weight: bold;
    margin-top: 1.5rem;
    color: #5D4037;
}

#faq dd {
    margin-left: 0;
    margin-top: 0.5rem;
}

#registry p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.registry-link {
    display: inline-block;
    margin: 0 1rem;
    padding: 0.8rem 1.5rem;
    border: 2px solid #5D4037;
    color: #5D4037;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    transition: background-color 0.3s, color 0.3s;
}

.registry-link:hover {
    background-color: #5D4037;
    color: white;
}

/* Side Navigation */
.side-nav {
    position: fixed;
    top: 50%;
    right: 2rem;
    transform: translateY(-50%);
    z-index: 1000;
}

.side-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.side-nav li {
    margin: 1.5rem 0;
    position: relative; /* Required for positioning the tooltip */
}

.side-nav a {
    display: block;
    width: 12px;
    height: 12px;
    background-color: transparent;
    border-radius: 50%;
    border: 2px solid #5D4037;
    transition: background-color 0.3s;
}

.side-nav a.active,
.side-nav a:hover  {
    background-color: #5D4037;
}

.side-nav a::before {
    content: attr(data-text);
    position: absolute;
    top: 50%;
    right: 30px; /* Position to the left of the dot */
    transform: translateY(-50%);
    background-color: #5D4037;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    pointer-events: none; /* Prevents the tooltip from interfering with clicks */
}
 
/* Show tooltip on hover */
.side-nav li:hover a::before {
    opacity: 1;
    visibility: visible;
}

/* Class added by JS to show tooltip temporarily when a section becomes active */
.side-nav a.active.tooltip-visible-temp::before {
    opacity: 1;
    visibility: visible;
}

/* --- Animation on Scroll --- */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive Styles --- */

@media (max-width: 768px) {
  .hero-section {
      gap: 1rem;
      padding-top: 1rem;
  }

  .hero-image-circle {
      width: 120px;
      height: 120px;
  }

  .hero-image-circle:first-child {
      margin-right: -30px;
  }

  /* Adjust hero section text size */
  .hero-text h1 {
      font-size: 3.5rem;
  }

  .hero-text p {
      font-size: 1.2rem;
  }

  #countdown {
      gap: 0.5rem;
  }

  .countdown-item {
      padding: 0.75rem;
      min-width: 65px;
  }

  .countdown-item span:first-child {
      font-size: 2rem;
  }

  .countdown-label {
      font-size: 0.7rem;
  }

  /* Timeline responsive styles */
  .timeline-container {
      padding: 1rem;
  }
  .timeline::before {
      left: 20px;
      transform: translateX(0);
  }

  .timeline li {
      width: 100%;
      padding-left: 50px;
      padding-right: 15px;
      padding-top: 10px; /* Add a little top padding */
      padding-bottom: 40px; /* Increase space between items */
  }

  .timeline li:nth-child(odd),
  .timeline li:nth-child(even) {
      left: 0;
      text-align: left;
  }

  .timeline li::after {
      left: 11px;
  }

  .timeline-year {
      position: static; /* Reset absolute positioning */
      transform: none; /* Reset transform */
      width: auto;
      margin: 0 0 10px 0; /* Margin below the year */
      text-align: left; /* Align with content */
      font-size: 1.3rem; /* Slightly smaller */
  }

  .timeline li:nth-child(odd) .timeline-year,
  .timeline li:nth-child(even) .timeline-year {
      margin-left: 0;
      margin-right: 0;
  }

  .timeline-content::before {
      left: -20px;
      border-right-color: #fff;
      border-left-color: transparent;
  }

  .timeline li:nth-child(odd) .timeline-content::before {
      right: auto;
  }

  .dresscode-container {
      flex-direction: column;
      gap: 2.5rem; /* Increase gap for better separation */
  }

  .color-swatch {
      width: 60px;
      height: 60px;
  }

  .content-section {
      padding: 3rem 1rem; /* Adjust main section padding for mobile */
  }

  /* Center content and reduce padding */
  .content-wrapper {
      width: 100%;
      max-width: 100%; /* Override desktop max-width */
      padding: 0; /* Let parent section handle the padding */
  }

  .content-section h2 {
      font-size: 2.5rem;
  }

  /* Adjust FAQ list */
  #faq dl {
      text-align: left; /* Keep text alignment on mobile */
  }

  /* Make registry links stack on top of each other */
  .registry-link {
      display: block;
      margin: 1rem auto;
      width: 80%; /* Control the width of the buttons on mobile */
  }

    #rsvp-form {
        padding: 2rem 1.5rem; /* Reduce horizontal padding on mobile */
        max-width: 100%;
    }

    /* Adjust side navigation */
    .side-nav {
        right: 1rem; /* Move closer to the edge */
    }

    .side-nav li {
        margin: 1rem 0;
    }

     .side-nav a::before {
        right: 25px; /* Adjust tooltip position */
    }

    #back-to-top-btn {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
        font-size: 1.5rem;
    }
}

/* Very small screens */
@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 3rem;
    }

    .hero-image-circle {
        width: 100px;
        height: 100px;
    }

    .hero-image-circle:first-child {
        margin-right: -25px;
    }
}

/* --- RSVP Form Styles --- */
#rsvp-form {
    max-width: 650px;
    margin: 2rem auto 0 auto;
    background: #ffffff;
    padding: 2rem 2.5rem;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    text-align: left;
}

.form-group, .form-group-radio {
    margin-bottom: 1.5rem;
}

#rsvp-form label, #rsvp-form legend {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #5D4037;
    font-size: 1.1rem;
}

#rsvp-form input[type="text"],
#rsvp-form input[type="number"],
#rsvp-form textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s;
}

#rsvp-form input[type="text"]:focus,
#rsvp-form input[type="number"]:focus,
#rsvp-form textarea:focus {
    outline: none;
    border-color: #795548;
    box-shadow: 0 0 0 3px rgba(93, 64, 55, 0.1);
}

/* Custom Radio Buttons */
.radio-group {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
}

#rsvp-form input[type="radio"] {
    opacity: 0; /* Hide the default radio button */
    position: fixed;
    width: 0;
}

.radio-group label {
    display: inline-block;
    padding-left: 30px;
    position: relative;
    cursor: pointer;
    font-weight: normal;
    color: #333;
    font-size: 1rem;
    margin-bottom: 0;
}

/* The custom radio button circle */
.radio-group label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 2px solid #ccc;
    border-radius: 50%;
    background: #fff;
    transition: border-color 0.3s;
}

/* The inner dot for the selected state */
.radio-group label::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 50%;
    transform: translateY(-50%) scale(0);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #5D4037;
    transition: transform 0.2s ease-out;
}

#rsvp-form input[type="radio"]:checked + label::before {
    border-color: #5D4037;
}

#rsvp-form input[type="radio"]:checked + label::after {
    transform: translateY(-50%) scale(1);
}

#rsvp-form button[type="submit"] {
    display: block;
    width: 100%;
    padding: 1rem;
    background-color: #5D4037;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    margin-top: 1rem;
}

#rsvp-form button[type="submit"]:hover {
    background-color: #4e342e;
}

#rsvp-form button[type="submit"]:disabled {
    background-color: #9e9e9e;
    cursor: not-allowed;
}

/* Form Status Messages */
#form-status {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 6px;
    font-weight: bold;
    text-align: center;
    display: none; /* Hidden by default */
}

#form-status.success {
    background-color: #e8f5e9; /* Light green */
    color: #2e7d32; /* Dark green */
    border: 1px solid #a5d6a7;
    display: block;
}

#form-status.error {
    background-color: #ffebee; /* Light red */
    color: #c62828; /* Dark red */
    border: 1px solid #ef9a9a;
    display: block;
}

/* Language Switcher */
.language-switcher {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1001; /* Higher than side-nav */
    background: rgba(255, 255, 255, 0.8);
    border-radius: 5px;
    padding: 5px;
}

.language-switcher button {
    background: transparent;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    font-weight: bold;
    color: #333;
    transition: color 0.3s, background-color 0.3s;
}

.language-switcher button.active {
    background-color: #5D4037;
    color: white;
    border-radius: 3px;
}

/* Style for the switcher inside the password box */
.password-box .language-switcher {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    padding: 0;
}

.password-box .language-switcher button {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 5px;
}

.password-box .language-switcher button.active {
    background-color: #fff;
    color: #333;
}

/* Password Protection Overlay */
body.locked > *:not(#password-overlay):not(#back-to-top-btn) {
    display: none !important;
}

#password-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
}

.password-box {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 2rem 3rem;
    border-radius: 10px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative; /* For positioning the switcher inside */
    width: 90%;
    max-width: 400px;
}

.password-box h2 {
    color: white;
    font-size: 2.5rem;
}

.password-box p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

#password-form input {
    padding: 0.75rem;
    border-radius: 5px;
    border: 1px solid #ccc;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 1rem;
}

#password-form button {
    background-color: #5D4037;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}

#password-error {
    color: #ff8a80; /* A lighter red for dark background */
    height: 1rem;
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

/* Back to Top Button */
#back-to-top-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background-color: #5D4037;
    color: white;
    text-decoration: none;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, background-color 0.3s;
}

#back-to-top-btn.show {
    opacity: 1;
    visibility: visible;
}

#back-to-top-btn:hover {
    background-color: #4e342e; /* Darker shade on hover */
}

.countdown-ended {
    font-size: 2rem;
    font-weight: bold;
    padding: 1rem;
    background: rgba(0,0,0,0.3);
    border-radius: 5px;
}
