/* Ensure dropdown menus inherit the custom font */
.dropdown-menu,
.dropdown-item {
  font-family: var(--bs-body-font-family);
}

/* Ensure form select and options use the custom font */
.form-select,
.form-select option {
  font-family: var(--bs-body-font-family);
}

/* Hero Section */
.hero {
  min-height: 75vh;
  background-image: linear-gradient(
      rgba(255, 255, 255, 0.6),
      rgba(255, 255, 255, 0.3)
    ),
    url("/static/img/hero-bg.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}
.fiorellino-bg {
  background-image: url("/static/img/matera.svg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

/* iOS-specific fix */
@supports (-webkit-touch-callout: none) {
  .hero {
    background-attachment: scroll;
  }
  .fiorellino-bg {
    background-attachment: scroll;
  }
}
/* Fix for card image height */
.card-img-top {
  width: 100%;
  height: 40vh;
  object-fit: cover;
}

.white-shadow {
  text-shadow: 1px 1px 8px white;
}

.wedding-title {
  font-family: "Parisienne", cursive;
  font-style: normal;
  text-transform: none !important;
  font-size: 3.2rem;
}

.wedding-date {
  opacity: 0;
}

body.animations-ready .wedding-date {
  animation: fade-in 0.5s ease-in-out 1.5s forwards;
}

.rsvp-button {
  opacity: 0;
}
body.animations-ready .rsvp-button {
  animation: fade-in 0.5s ease-in-out 1.5s forwards,
    pulse 1.5s ease-in-out 1s forwards;
  animation-iteration-count: 1, 2;
}

.text-part {
  display: inline-block;
  position: relative;
  transform: translateX(0);
}

body.animations-ready .text-part {
  animation-duration: 1.5s;
  animation-timing-function: ease-out;
  animation-fill-mode: forwards;
}

.text-part.left {
  transform: translateX(-200%);
  opacity: 0;
}
body.animations-ready .text-part.left {
  animation-name: slide-in-left;
}
.wedding-heart {
  opacity: 0;
}
body.animations-ready .wedding-heart {
  animation: fade-in-and-zoom-in 1s ease-in-out 1s forwards;
}

.text-part.right {
  transform: translateX(200%);
  opacity: 0;
}
body.animations-ready .text-part.right {
  animation-name: slide-in-right;
}

.text-part.and {
  opacity: 0;
}
body.animations-ready .text-part.and {
  animation: fade-in 1s ease-in-out 1s forwards;
}

@keyframes fade-in-and-zoom-in {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes fade-in {
  to {
    opacity: 1;
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.25);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes slide-in-left {
  0% {
    transform: translateX(-200%);
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slide-in-right {
  0% {
    transform: translateX(200%);
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Countdown Timer Styles */
.countdown-container {
  padding: 0.75rem;
  text-shadow: 0 0 8px rgba(255, 255, 255, 1);
  opacity: 0;
}

body.animations-ready .countdown-container {
  animation: fade-in 0.5s ease-in-out 1.5s forwards;
}

.countdown-item {
  transition: transform 0.3s ease;
  padding: 0.25rem 0.25rem;
  min-width: 60px;
}

.countdown-item:hover {
  transform: translateY(-5px);
}

.countdown-value {
  color: var(--bs-primary);
  transition: color 0.3s ease;
  font-size: 1.3rem;
}

.countdown-item:hover .countdown-value {
  color: var(--bs-danger);
}

/* Our Story Section Styles */
.our-story-section {
  position: relative;
}

.divider-heart {
  position: relative;
  margin: 1.5rem 0;
}

.divider-heart::before,
.divider-heart::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 30%;
  height: 1px;
  background: rgba(0, 0, 0, 0.1);
}

.divider-heart::before {
  left: 0;
}

.divider-heart::after {
  right: 0;
}

.divider-heart i {
  font-size: 1.5rem;
  display: inline-block;
  padding: 0 1rem;
  background: white;
  position: relative;
}

/* Timeline Story Styles */
.timeline-story {
  position: relative;
  max-width: 80%;
  margin: 0 auto;
}

.timeline-story::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: rgba(var(--bs-danger-rgb), 0.3);
  -webkit-transform: translateX(-50%);
  transform: translateX(-50%);
}

.timeline-item-story {
  position: relative;
  margin-bottom: 2.5rem;
  display: flex;
  justify-content: center;
}

.timeline-dot-story {
  position: absolute;
  left: 50%;
  top: 0;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bs-danger);
  -webkit-transform: translateX(-50%);
  transform: translateX(-50%);
  z-index: 2;
}

.timeline-content-story {
  width: calc(50% - 30px);
  padding: 1.25rem;
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.1);
  border-left: 3px solid var(--bs-primary);
  margin-left: auto;
  -webkit-transition: transform 0.3s ease;
  transition: transform 0.3s ease;
}

.timeline-item-story:nth-child(even) .timeline-content-story {
  margin-left: 0;
  margin-right: auto;
  border-left: none;
  border-right: 3px solid var(--bs-primary);
}

.timeline-content-story:hover {
  -webkit-transform: translateY(-5px);
  transform: translateY(-5px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.timeline-content-story h4 {
  color: var(--bs-primary);
  margin-bottom: 0.5rem;
}

.timeline-content-story i.fa-solid {
  margin-right: 0.5rem;
}

/* Responsive Timeline Story */
@media (max-width: 768px) {
  .timeline-story {
    max-width: 100%;
  }

  .timeline-story::before {
    left: 0;
  }

  .timeline-item-story {
    justify-content: start;
  }

  .timeline-dot-story {
    left: 0;
  }

  .timeline-content-story,
  .timeline-item-story:nth-child(even) .timeline-content-story {
    width: calc(100% - 30px);
    margin-left: 30px;
    margin-right: 0;
    border-left: 3px solid var(--bs-primary);
    border-right: none;
  }
}

/* Event Timeline */
.timeline {
  position: relative;
  padding: 2rem 0;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  height: 100%;
  width: 2px;
  background: var(--bs-primary);
  -webkit-transform: translateX(-50%);
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  margin-bottom: 3rem;
}

.timeline-dot {
  position: absolute;
  left: 50%;
  width: 20px;
  height: 20px;
  background: white;
  border: 3px solid var(--bs-primary);
  border-radius: 50%;
  -webkit-transform: translateX(-50%);
  transform: translateX(-50%);
  z-index: 1;
}

.timeline-content {
  width: calc(50% - 3rem);
  padding: 1.5rem;
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
  position: relative;
}

.timeline-item:nth-child(odd) .timeline-content {
  margin-left: auto;
}

.timeline-item:nth-child(odd) .timeline-content::before {
  content: "";
  position: absolute;
  left: -10px;
  top: 50%;
  border-width: 10px 10px 10px 0;
  border-style: solid;
  border-color: transparent white transparent transparent;
  -webkit-transform: translateY(-50%);
  transform: translateY(-50%);
}

.timeline-item:nth-child(even) .timeline-content::before {
  content: "";
  position: absolute;
  right: -10px;
  top: 50%;
  border-width: 10px 0 10px 10px;
  border-style: solid;
  border-color: transparent transparent transparent white;
  -webkit-transform: translateY(-50%);
  transform: translateY(-50%);
}

.timeline-content h4 {
  color: var(--bs-primary);
  margin-bottom: 0.5rem;
}

.timeline-content .time {
  font-size: 0.875rem;
  color: var(--bs-secondary);
  margin-bottom: 0.5rem;
}

/* Card Hover Effects */
.hover-card {
  -webkit-transition: transform 0.3s ease;
  transition: transform 0.3s ease;
}

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

/* Responsive Adjustments */
@media (max-width: 768px) {
  .timeline::before {
    left: 1rem;
  }

  .timeline-dot {
    left: 1rem;
  }

  .timeline-content {
    width: calc(100% - 3rem);
    margin-left: 3rem !important;
  }

  .timeline-item:nth-child(odd) .timeline-content::before,
  .timeline-item:nth-child(even) .timeline-content::before {
    left: -10px;
    border-width: 10px 10px 10px 0;
    border-color: transparent white transparent transparent;
  }
}

/* Pulsating Couple Logo Effect - Serena & Giulio */

.couple-logo-container {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  font-weight: bold;
}

/* Serena's initial - static */
.couple-initial-s {
  color: var(--bs-primary, #0d6efd);
  font-size: 1.2em;
  font-weight: 700;
  transition: transform 0.3s ease;
}

.couple-initial-s:hover {
  transform: scale(1.1);
}

/* Pulsating heart between initials */
.pulsating-heart {
  color: var(--bs-danger, #dc3545);
  font-size: 1em;
  animation: pulsate-heart 2s ease-in-out infinite;
  display: inline-block;
}

/* Giulio's initial - static */
.couple-initial-g {
  color: var(--bs-primary, #0d6efd);
  font-size: 1.2em;
  font-weight: 700;
  transition: transform 0.3s ease;
}

.couple-initial-g:hover {
  transform: scale(1.1);
}

/* Alternative design: Interlocking initials with fade effect */
.interlocking-initials {
  display: inline-block;
  position: relative;
  font-weight: 700;
}

.initial-s-fade {
  color: var(--bs-primary, #0d6efd);
  animation: fade-in-out-s 4s ease-in-out infinite;
}

.initial-g-fade {
  color: var(--bs-danger, #dc3545);
  animation: fade-in-out-g 4s ease-in-out infinite;
  animation-delay: 2s;
}

/* Heart pulsating animation */
@keyframes pulsate-heart {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.3);
    opacity: 1;
  }
}

/* Alternating fade for initials */
@keyframes fade-in-out-s {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  25% {
    opacity: 1;
    transform: scale(1.1);
  }
  50%,
  75% {
    opacity: 0.3;
    transform: scale(0.95);
  }
}

@keyframes fade-in-out-g {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  25% {
    opacity: 1;
    transform: scale(1.1);
  }
  50%,
  75% {
    opacity: 0.3;
    transform: scale(0.95);
  }
}

/* Wedding Day Celebration Enhancements */
.celebration-sparkle {
  position: relative;
  overflow: hidden;
}

.celebration-sparkle::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.6),
    transparent
  );
  animation: sparkle-sweep 2s linear infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes sparkle-sweep {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* Enhanced countdown transitions */
.countdown-wrapper {
  transition: all 0.5s ease-in-out;
}

/* RSVP Section transitions for wedding day */
#rsvpSection,
#rsvpMessage {
  transition: opacity 1s ease-out, transform 1s ease-out;
}

#rsvpSection.hidden,
#rsvpMessage.hidden {
  opacity: 0;
  transform: translateY(-20px);
  pointer-events: none;
}

/* Wedding celebration particle effects */
.wedding-particle {
  position: fixed;
  pointer-events: none;
  z-index: 1000;
  animation: float-up 4s linear forwards;
}

@keyframes float-up {
  0% {
    opacity: 1;
    transform: translateY(0) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translateY(-100vh) rotate(360deg);
  }
}

/* Celebration text effects */
.celebration-text-glow {
  animation: celebration-glow-text 3s ease-in-out infinite;
}

@keyframes celebration-glow-text {
  0%,
  100% {
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5),
      0 0 20px rgba(255, 20, 147, 0.3), 0 0 30px rgba(255, 69, 180, 0.2);
  }
  50% {
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.8),
      0 0 40px rgba(255, 20, 147, 0.6), 0 0 60px rgba(255, 69, 180, 0.4);
  }
}

/* Enhanced hero background for celebration */
.hero.celebration-mode {
  background-blend-mode: overlay;
  background-color: rgba(255, 240, 245, 0.3);
}

/* Responsive wedding celebration */
@media (max-width: 768px) {
  .celebration-message {
    padding: 1rem !important;
  }

  .celebration-text {
    font-size: 1.8rem !important;
  }

  .celebration-subtitle {
    font-size: 1.2rem !important;
  }

  .dancing-heart {
    font-size: 1rem !important;
  }
}

@media (max-width: 576px) {
  .celebration-text {
    font-size: 1.5rem !important;
  }

  .celebration-subtitle {
    font-size: 1rem !important;
  }
}
