/* Gateway Page Styles */

.gateway-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #FF7F6E 0%, #FFB89A 50%, #FFA07A 100%);
}

.gateway-photo-container {
  position: relative;
  margin-bottom: 2rem;
  margin-top: 4rem; /* Add top margin to prevent title cutoff */
  opacity: 0;
  animation: fade-in-up 1s ease-out 0.5s forwards;
}

.gateway-photo {
  width: 320px;
  height: 320px;
  object-fit: cover;
  object-position: center 30%;
  border-radius: 50%;
  border: 8px solid white;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.curved-text {
  position: absolute;
  top: -80px; /* Reduced from -90px to keep it closer */
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 300px;
  pointer-events: none;
}

.curved-text text {
  fill: white;
  font-family: Cormorant, serif;
  font-size: 2.5rem;
  font-weight: 400;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  letter-spacing: 3px;
}

/* Header Styles */
.memorial-header {
  text-align: center;
  margin-bottom: 0.75rem;
  z-index: 10;
}

.title-primary {
  font-family: Cormorant, serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 400;
  color: #FFF;

  /* Enhanced text shadow for better contrast (WCAG AA compliance) */
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
  margin-bottom: 0.5rem;
  opacity: 0;
  animation: fade-in-up 1s ease-out forwards;
}

.title-secondary {
  font-family: Cormorant, serif;
  font-size: clamp(1.25rem, 3vw, 2rem);
  font-weight: 400;
  color: #FFF;

  /* Enhanced text shadow for better contrast (WCAG AA compliance) */
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
  opacity: 0;
  animation: fade-in-up 1s ease-out 0.3s forwards;
}

/* Visitor Registration */
.visitor-registration {
  background: rgba(255, 255, 255, 0.95);
  padding: 2.5rem;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  max-width: 450px;
  width: 100%;
  text-align: center;
  opacity: 0;
  animation: fade-in-up 1s ease-out 0.6s forwards;
}

.welcome-message {
  font-family: Cormorant, serif;
  font-size: 1.125rem;
  color: var(--text-color, #1A1A1A);
  margin-bottom: 1.5rem;
}

#registration-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#registration-form input {
  padding: 0.75rem 1rem;

  /* Enhanced border visibility for better form field identification */
  border: 1px solid rgba(0, 0, 0, 0.2);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
}

#registration-form input:focus {
  outline: none;
  border-color: var(--primary-color, #FF8C00);
  box-shadow: 0 0 0 3px rgba(255, 140, 0, 0.1);
}

.enter-button {
  background: linear-gradient(135deg, #FFB347, #FF9B3D);
  color: #1A1A1A;
  border: none;
  padding: 0.875rem 2rem;
  border-radius: 8px;
  font-size: 1.125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 0.5rem;
}

.enter-button:hover {
  background: linear-gradient(135deg, #FFC266, #FFB347);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(255, 140, 0, 0.3);
}

/* Video Section */
.video-container {
  width: 100%;
  max-width: 900px;
  position: relative;
  margin: 0 auto;
  padding: 2rem;
  transition: background 0.6s ease;
}

/* Video page heading */
.video-heading {
  font-family: Cormorant, serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  color: #FFF;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  text-align: center;
  margin-bottom: 2rem;
  opacity: 0;
  animation: fade-in-up 1s ease-out forwards;
}

/* Light blue background for video pages (hi-from-lily and celebration) */
.gateway-container:has(.video-container:not(.hidden, .disclaimer-video)) {
  background: linear-gradient(135deg, #B3D9FF 0%, #C9E4FF 50%, #D6ECFF 100%) !important;
}

/* Emerald green background for disclaimer page */
.gateway-container:has(.video-container.disclaimer-video:not(.hidden)) {
  background: linear-gradient(135deg, #4DB8A0 0%, #6ACAB5 50%, #87DCC9 100%) !important;
}

#video-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

/* Plyr Customization */
.plyr {
  border-radius: 12px;
}

.plyr--youtube .plyr__video-wrapper {
  background: #000;
}

.play-button {
  background: linear-gradient(135deg, #FFB347, #FF7043);
  color: white;
  border: none;
  padding: 1rem 2.5rem;
  border-radius: 8px;
  font-size: 1.25rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 2rem auto;
  display: block;
  white-space: nowrap;
  opacity: 1;
}

.play-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 140, 0, 0.4);
}

.play-button:active {
  opacity: 0.8;
  transform: translateY(0);
}

/* Continue Button */
.continue-button {
  background: linear-gradient(135deg, #FFB347, #FF7043);
  color: white;
  border: none;
  padding: 1rem 2.5rem;
  border-radius: 8px;
  font-size: 1.25rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 1rem auto;
  display: block;
  white-space: nowrap;
  opacity: 1;
}

.continue-button:hover:not(.disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 140, 0, 0.4);
}

.continue-button:active:not(.disabled) {
  opacity: 0.8;
  transform: translateY(0);
}

.continue-button.disabled {
  background: linear-gradient(135deg, #999, #777);
  cursor: not-allowed;
  opacity: 0.6;
}

.continue-button.disabled:hover {
  transform: none;
  box-shadow: none;
}

/* Video Messages */
.video-message {
  text-align: center;
  font-size: 1rem;
  color: #1A1A1A;
  text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5);
  margin: 1rem auto;
  padding: 0.75rem 1.5rem;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 8px;
  max-width: 600px;
}

.wait-message {
  text-align: center;
  font-size: 0.9rem;
  color: #F44;
  background: rgba(255, 255, 255, 0.9);
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  margin: 1rem auto;
  max-width: 500px;
  border: 2px solid #F44;
  font-weight: 600;
}

/* Lily Vines Decoration */
.lily-vines {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.1;
  background: url('../images/lily-pattern.svg') no-repeat center;
  background-size: cover;
}

/* Animations */
@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fade-in 0.5s ease-out forwards;
}

.fade-out {
  animation: fade-out 0.5s ease-out forwards;
}

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

@keyframes fade-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* Utility Classes */
.hidden {
  display: none;
}

/* Responsive Design */

/* Tablet and Desktop - Optimized form width */
@media (width >= 768px) {
  .visitor-registration {
    max-width: 450px;
    margin: 0 auto;
  }
}

@media (width <= 768px) {
  .gateway-container {
    padding: 1rem;
  }

  .visitor-registration {
    padding: 1.5rem;
  }

  .play-button {
    font-size: 1rem;
    padding: 0.875rem 2rem;
  }

  #video-player {
    aspect-ratio: 16 / 9;
  }

  #registration-form input {
    min-height: 48px;
    font-size: 16px; /* Prevents iOS zoom */
  }

  .enter-button {
    min-height: 48px;
  }
}

@media (width <= 480px) {
  .title-primary {
    font-size: 1.75rem;
  }

  .title-secondary {
    font-size: 1.125rem;
  }

  .play-button {
    bottom: -60px;
    font-size: 0.875rem;
    padding: 0.75rem 1.5rem;
  }

  .curved-text {
    width: 100%;
    max-width: 350px;
    height: auto;
    top: -50px;
  }

  .curved-text text {
    font-size: 1.75rem;
  }

  .gateway-photo-container {
    margin-top: 3rem;
  }

  .video-container {
    padding: 1rem;
  }

  .video-heading {
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }

  .play-button,
  .continue-button {
    width: 100%;
    min-height: 48px;
  }
}

@media (width <= 375px) {
  .curved-text {
    max-width: 300px;
    top: -40px;
  }

  .curved-text text {
    font-size: 1.5rem;
  }

  .gateway-photo {
    width: 260px;
    height: 260px;
  }
}