:root {
    --color-white: #ffffff;
    --color-beige: #f8f7ec;
    --color-dark-gray: #333333;
    --color-light-gray: #e7e7e5;
}

body, p, li, span, div, ul {
  font-family: 'Cormorant', serif;
  font-weight: 300;
  font-style: italic;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Ephesis", cursive;
  font-weight: 400;
  font-style: normal;
}

body {
  margin: 0;
  padding: 0;
  color: var(--color-dark-gray);
  background-color: var(--color-white);
}

/* Navbar styles */
.navbar {
  background-color: var(--color-light-gray);
  padding: 15px 0;  
}

.nav-container {
  display: flex;
  justify-content: center;
  max-width: 800px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.navbar a {
  color: var(--color-dark-gray);
  text-decoration: none;
  display: flex;
  justify-content: center;
  min-width: 60px;
  padding: 10px 20px;
  margin: 5px 10px;
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  transition: all 0.3s ease;
}

.navbar a:hover {
  font-weight: bold;
  border-radius: 4px;
}

/* INTRODUCTION */

header {
  text-align: center;
  padding: 60px 20px;
}

header h1 {
  font-size: 80px;
  margin: 40px 0 10px 0;
}

.date-location {
  text-align: center;
  font-size: 30px;
  margin: 10px 0 60px 0;
}

#introduction-img {
  width: 450px;
  height: auto;
  border-radius: 8px;
  margin: 0 auto 40px auto;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInVertical 1s ease-out forwards;
}

@media (prefers-reduced-motion: no-preference) {
  #introduction-img {
    animation-delay: 0.3s;
  }
}

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

/* GENERAL PÀNELS */

.main-section {
  width: 100%;
  padding: 60px 0px;
  text-align: center;
}

#wedding-planning {
  background-color: var(--color-light-gray);
}

#details {
  background-color: var(--color-white);
}

#gift {
  background-color: var(--color-light-gray);
}

.main-section h2 {
  font-size: 52px;
  margin-bottom: 30px;
}

.main-section p {
  max-width: 600px;
  margin: auto;
  font-size: 16px;
  line-height: 1.6;
}

/* Wedding Planning */
#wedding-planning .wedding-planning-container {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  max-width: 1200px;
  text-align: center;
}

#wedding-planning .wedding-planning-image,
#wedding-planning .wedding-planning-text {
  flex: 1;
  max-width: 500px;
}

#wedding-planning .wedding-planning-image img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}

/* Initial state for fade-in effect */
.fade-in-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 2s ease-out, transform 2s ease-out;
}

/* Visible state */
.fade-in-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

#wedding-planning .wedding-planning-text {
  text-align: right;
}

#wedding-planning .timeline {
  margin: 0;
  padding: 0;
}

#wedding-planning .event {
  margin-bottom: 50px;
  font-size: 16px;
  line-height: 1.5;
}

#wedding-planning .event div {
  margin-bottom: 5px;
}

#wedding-planning .event a {
  text-decoration: none;
  color: var(--color-dark-gray);
}

#wedding-planning #pre-wedding-event {
  display: none;
}

#wedding-planning #check-program {
  margin: 20px auto;
  color: var(--color-dark-gray);
  text-align: center;
}

#wedding-planning a.button {
  display: inline-block;
  padding: 10px 20px;
  margin: 20px 40px;
  background-color: var(--color-dark-gray);
  color: var(--color-white);
  text-decoration: none;
  border-radius: 4px;
  font-size: 16px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

#wedding-planning a.button:hover {
  background-color: var(--color-beige);
  color: var(--color-dark-gray);
  text-decoration: underline;
}

/* The Details */
.grid-2-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  width: 60%;
  margin: 6rem auto;
}

.details-text h3 {
  margin-top: 4rem;
}

.details-text ul,
.details-map ul {
  padding-left: 1rem;
  list-style-type: disc;
  text-align: left;
}

.details-map #map-container {
  width: 100%; 
  height: 480px; 
  background: #eee; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  text-align: center; 
  color: #666;
  margin: 2rem 0 3rem 0;
}

.details-map #map-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Wedding Gift */
#gift .gift-container {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  max-width: 1200px;
  text-align: center;
}

#gift .gift-image,
#gift .gift-text {
  flex: 1;
  max-width: 500px;
}

#gift .gift-image img {
  max-width: 80%;
  height: auto;
  border-radius: 10px;
}

#gift .gift-text {
  text-align: left;
}

#gift .gift-text .highlight {
  font-weight: bold;
}

#gift .gift-text #first-datum {
  margin-top: 20px;
}

#gift .gift-text #last-datum {
  margin-bottom: 20px;
}

#gift .gift-text #gift-name {
  text-align: right;
  margin-right: 5%;
}

#cookie-banner {
  position: fixed;
  bottom: 0;
  width: 100%;
  background: #444444;
  color: white;
  padding: 1em;
  text-align: center;
  z-index: 9999;
}

#cookie-banner a {
  color: #b1b1b1;
}

#cookie-banner #accept-cookies {
  margin-left: 1em; 
  background: #ffffff; 
  border: none; 
  color: black; 
  padding: 0.5em 1em; 
  cursor: pointer;
}

footer {
  font-size: 0.9em;
  color: #666;
  border-top: 1px solid #ccc;
  padding: 0.5em;
  text-align: center;
}

@media (max-width: 500px) {
  .navbar a {
    padding: 10px 10px;
    margin: 5px 5px;
    font-size: 14px;
  }

  header h1 {
    font-size: 40px;
  }

  .date-location {
    font-size: 16px;
  }

  #introduction-img {
    max-width: 90%;
    margin: 0 auto 10px auto;
  }

  /* GENERAL PANELS */
  .main-section h2 {
    font-size: 36px;
  }

  .main-section p, .main-section li {
    font-size: 14px;
    line-height: 1.4;
  }

  /* Wedding planning */
  #wedding-planning .wedding-planning-container {
    flex-direction: column;
  }

  #wedding-planning .wedding-planning-image,
  #wedding-planning .wedding-planning-text {
    max-width: 100%;
  }

  #wedding-planning .wedding-planning-text {
    text-align: center;
  }

  #wedding-planning .event {
    font-size: 14px;
    line-height: 1.4;
  }

  /* The details */
  .grid-2-cols {
    grid-template-columns: 1fr;
    width: 80%;
    margin: 1rem auto;
  }

  .details-text h3 {
    margin-top: 3rem;
  }

  .details-map #map-container {
    height: 580px;
    margin: 1rem 0 1rem 0;
  }

  /* Wedding gift */
  #gift .gift-container {
    flex-direction: column;
  }

  #gift .gift-image,
  #gift .gift-text {
    max-width: 100%;
  }

  #gift .gift-image img {
    margin: 30px 0;
  }

  #gift .gift-text {
    margin: 0 50px;
    text-align: left;
  }
}

@media (min-width: 501px) and (max-width: 1024px) {
  .navbar a {
    padding: 12px 15px;
    margin: 6px 8px;
    font-size: 15px;
  }

  header h1 {
    font-size: 60px;
  }

  .date-location {
    font-size: 24px;
  }

  #introduction-img {
    max-width: 80%;
    margin: 0 auto 20px auto;
  }

  /* GENERAL PANELS */
  .main-section h2 {
    font-size: 42px;
  }

  .main-section p, .main-section li {
    font-size: 15px;
    line-height: 1.5;
  }

  /* Wedding planning */
  #wedding-planning .wedding-planning-container {
    flex-direction: column;
    gap: 20px;
  }

  #wedding-planning .wedding-planning-image,
  #wedding-planning .wedding-planning-text {
    max-width: 100%;
  }

  #wedding-planning .wedding-planning-text {
    text-align: center;
  }

  #wedding-planning .event {
    font-size: 15px;
    line-height: 1.5;
  }

  /* The details */
  .grid-2-cols {
    grid-template-columns: 1fr 1fr;
    width: 70%;
    margin: 3rem auto;
  }

  .details-text h3 {
    margin-top: 2rem;
  }

  .details-map #map-container {
    height: 500px;
    margin: 1.5rem 0 2rem 0;
  }

  /* Wedding gift */
  #gift .gift-container {
    flex-direction: column;
    gap: 20px;
  }

  #gift .gift-image,
  #gift .gift-text {
    max-width: 100%;
  }
}