/* Wedding Invitation Website - Custom Styles */
/* TailwindCSS Configuration and Custom Utilities */

/* ============================================
   TAILWIND CUSTOM CONFIGURATION
   ============================================ */

/* Custom Color Palette - Red Accents & White Dominant */
:root {
  /* Primary Red Accents */
  --color-red-primary: #DC2626;      /* red-600 */
  --color-red-light: #EF4444;        /* red-500 */
  --color-red-dark: #B91C1C;         /* red-700 */
  --color-red-accent: #FCA5A5;       /* red-300 */
  
  /* White Dominant Palette */
  --color-white: #FFFFFF;
  --color-white-soft: #FAFAFA;       /* gray-50 */
  --color-white-warm: #FEF2F2;       /* red-50 */
  
  /* Neutral Grays */
  --color-gray-100: #F3F4F6;
  --color-gray-200: #E5E7EB;
  --color-gray-300: #D1D5DB;
  --color-gray-600: #4B5563;
  --color-gray-800: #1F2937;
  --color-gray-900: #111827;
  
  /* Glassmorphism Variables */
  --glass-bg: rgba(255, 255, 255, 0.3);
  --glass-border: rgba(255, 255, 255, 0.5);
  --glass-shadow: rgba(0, 0, 0, 0.1);
}

/* ============================================
   TAILWIND CUSTOM UTILITIES
   ============================================ */

/* Glassmorphism Utility Classes */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 32px 0 var(--glass-shadow);
}

.glass-strong {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.15);
}

.glass-light {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.08);
}

.glass-red {
  background: rgba(220, 38, 38, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(220, 38, 38, 0.3);
  box-shadow: 0 8px 32px 0 rgba(220, 38, 38, 0.1);
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

/* Romantic & Elegant Font Styles */
.font-romantic {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-style: italic;
  letter-spacing: 0.02em;
}

.font-elegant {
  font-family: 'Playfair Display', 'Georgia', serif;
  letter-spacing: 0.05em;
}

.text-shadow-soft {
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* Mobile-First Typography Sizes */
h1, .text-hero {
  font-size: 2rem; /* 32px */
  line-height: 1.2;
}

h2, .text-section-title {
  font-size: 1.75rem; /* 28px */
  line-height: 1.3;
}

h3, .text-subsection {
  font-size: 1.5rem; /* 24px */
  line-height: 1.4;
}

@media (min-width: 640px) {
  h1, .text-hero {
    font-size: 2.5rem; /* 40px */
  }
  
  h2, .text-section-title {
    font-size: 2rem; /* 32px */
  }
  
  h3, .text-subsection {
    font-size: 1.75rem; /* 28px */
  }
}

@media (min-width: 768px) {
  h1, .text-hero {
    font-size: 3rem; /* 48px */
  }
  
  h2, .text-section-title {
    font-size: 2.5rem; /* 40px */
  }
}

@media (min-width: 1024px) {
  h1, .text-hero {
    font-size: 3.5rem; /* 56px */
  }
  
  h2, .text-section-title {
    font-size: 3rem; /* 48px */
  }
}

/* ============================================
   ANIMATIONS
   ============================================ */

/* Fade In Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeIn 0.8s ease-out forwards;
}

/* Slide In from Bottom */
@keyframes slideInBottom {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-slide-in {
  animation: slideInBottom 0.6s ease-out forwards;
}

/* Slide Out to Top */
@keyframes slideOutTop {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-50px);
  }
}

.animate-slide-out {
  animation: slideOutTop 0.4s ease-in forwards;
}

/* Pulse Animation for Hearts */
@keyframes pulse-heart {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.animate-pulse-heart {
  animation: pulse-heart 2s ease-in-out infinite;
}

/* Zoom In Animation */
@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-zoom-in {
  animation: zoomIn 0.6s ease-out forwards;
}

/* Float Animation */
@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

/* ============================================
   CURTAIN ANIMATION STYLES (Layar Terbuka)
   ============================================ */

/* Curtain Base Style */
.curtain {
  position: fixed;
  top: 0;
  width: 50%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 55; /* Di bawah konten (z-10 = 10) tapi di atas background */
  transition: transform 1.5s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
}

/* Left Curtain - Gambar kiri terpisah */
.curtain-left {
  left: 0;
  transform-origin: left center;
  background-image: url('/assets/images/cover-left.webp');
  background-position: center;
}

/* Right Curtain - Gambar kanan terpisah */
.curtain-right {
  right: 0;
  transform-origin: right center;
  background-image: url('/assets/images/cover-right.webp');
  background-position: center;
}

/* Overlay on curtains for better text readability */
.curtain::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.5));
  z-index: 1;
}

/* Curtain Open State */
.curtain-left.open {
  transform: translateX(-100%);
}

.curtain-right.open {
  transform: translateX(100%);
}

/* Opening Cover Fade Out */
#opening-cover.fade-out {
  animation: coverFadeOut 1s ease-out forwards;
  animation-delay: 1s;
}

@keyframes coverFadeOut {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    visibility: hidden;
  }
}

/* ============================================
   ENVELOPE ANIMATION STYLES
   ============================================ */

/* Envelope Container */
.envelope-container {
  position: relative;
  width: 320px;
  height: 240px;
  perspective: 1000px;
}

@media (min-width: 640px) {
  .envelope-container {
    width: 400px;
    height: 300px;
  }
}

@media (min-width: 1024px) {
  .envelope-container {
    width: 480px;
    height: 360px;
  }
}

/* Envelope Back (Bottom Part) */
.envelope-back {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60%;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 0 0 8px 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  z-index: 1;
}

/* Envelope Front (Front Flaps) */
.envelope-front {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60%;
  background: linear-gradient(135deg, #ffffff 0%, #f1f3f5 100%);
  clip-path: polygon(0 40%, 50% 0, 100% 40%, 100% 100%, 0 100%);
  border-radius: 0 0 8px 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  z-index: 3;
}

/* Envelope Flap (Top Triangular Part) */
.envelope-flap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 50%;
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  clip-path: polygon(0 0, 50% 100%, 100% 0);
  transform-origin: top center;
  transition: transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 5px 20px rgba(220, 38, 38, 0.4);
  z-index: 4;
}

/* Envelope Flap Open State */
.envelope-flap.open {
  transform: rotateX(-180deg);
  transition: transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Invitation Card Inside Envelope */
.invitation-card {
  position: absolute;
  top: 15%;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  width: 90%;
  height: 85%;
  background: linear-gradient(135deg, #ffffff 0%, #fef2f2 100%);
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  transition: transform 1.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.8s ease;
  z-index: 2;
  opacity: 0;
}

/* Card Visible State */
.invitation-card.visible {
  opacity: 1;
  animation: cardSlideUp 1.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Card Slide Up Animation */
@keyframes cardSlideUp {
  0% {
    transform: translateX(-50%) translateY(0);
  }
  100% {
    transform: translateX(-50%) translateY(-40%);
  }
}

/* Card Content */
.card-content {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  text-align: center;
}

@media (min-width: 640px) {
  .card-content {
    padding: 2rem;
  }
}

/* Card Decorative Border */
.card-border {
  width: 100%;
  height: 100%;
  border: 3px solid #dc2626;
  border-radius: 6px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(254, 242, 242, 0.9) 100%);
  box-shadow: inset 0 2px 10px rgba(220, 38, 38, 0.1);
}

@media (min-width: 640px) {
  .card-border {
    padding: 2rem;
  }
}

/* Envelope Wrapper Fade Out */
#envelope-wrapper.fade-out {
  animation: envelopeFadeOut 1s ease-out forwards;
}

@keyframes envelopeFadeOut {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.2);
  }
}

/* Opening Cover Fade Out */
#opening-cover.closing {
  animation: coverFadeOut 1s ease-out forwards;
}

@keyframes coverFadeOut {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    visibility: hidden;
  }
}

/* ============================================
   LAYOUT UTILITIES
   ============================================ */

/* Section Spacing - Mobile First */
.section-padding {
  padding-top: 3rem;
  padding-bottom: 3rem;
  min-height: 100vh;
}

@media (min-width: 768px) {
  .section-padding {
    padding-top: 5rem;
    padding-bottom: 5rem;
  }
}

@media (min-width: 1024px) {
  .section-padding {
    padding-top: 6rem;
    padding-bottom: 6rem;
  }
}

/* Container with Max Width - Mobile First */
.container-custom {
  width: 100%;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

@media (min-width: 640px) {
  .container-custom {
    max-width: 640px;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 768px) {
  .container-custom {
    max-width: 768px;
  }
}

@media (min-width: 1024px) {
  .container-custom {
    max-width: 1024px;
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

@media (min-width: 1280px) {
  .container-custom {
    max-width: 1200px;
  }
}

/* ============================================
   BUTTON STYLES
   ============================================ */

/* Primary Button with Red Accent */
.btn-primary {
  background-color: var(--color-red-primary);
  color: var(--color-white);
  padding: 0.75rem 2rem;
  border-radius: 9999px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(220, 38, 38, 0.2);
}

.btn-primary:hover {
  background-color: var(--color-red-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(220, 38, 38, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(220, 38, 38, 0.2);
}

/* Secondary Button with Glass Effect */
.btn-secondary {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--color-gray-800);
  padding: 0.75rem 2rem;
  border-radius: 9999px;
  border: 1px solid var(--glass-border);
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Icon Button */
.btn-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

/* Touch-Friendly Minimum Size (44x44px) */
.touch-target {
  min-width: 44px;
  min-height: 44px;
}

/* ============================================
   CARD STYLES
   ============================================ */

.card-glass {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 8px 32px 0 var(--glass-shadow);
  transition: all 0.3s ease;
}

.card-glass:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.15);
}

/* ============================================
   FORM STYLES
   ============================================ */

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--color-gray-200);
  border-radius: 0.5rem;
  background-color: var(--color-white);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--color-red-primary);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--color-gray-800);
}

.form-select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--color-gray-200);
  border-radius: 0.5rem;
  background-color: var(--color-white);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.form-select:focus {
  outline: none;
  border-color: var(--color-red-primary);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--color-gray-200);
  border-radius: 0.5rem;
  background-color: var(--color-white);
  font-size: 1rem;
  resize: vertical;
  min-height: 100px;
  transition: all 0.3s ease;
}

.form-textarea:focus {
  outline: none;
  border-color: var(--color-red-primary);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* Form Error States */
.form-input.is-invalid,
.form-input.form-error,
.form-select.is-invalid,
.form-select.form-error,
.form-textarea.is-invalid,
.form-textarea.form-error {
  border-color: var(--color-red-primary);
  background-color: #FEF2F2; /* red-50 */
}

.form-input.is-invalid:focus,
.form-input.form-error:focus,
.form-select.is-invalid:focus,
.form-select.form-error:focus,
.form-textarea.is-invalid:focus,
.form-textarea.form-error:focus {
  border-color: var(--color-red-dark);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

.form-error-message {
  color: var(--color-red-primary);
  font-size: 0.875rem;
  margin-top: 0.25rem;
  display: block;
}

/* ============================================
   DECORATIVE ELEMENTS
   ============================================ */

/* Heart Decorations */
.heart-decoration {
  color: var(--color-red-primary);
  font-size: 1.5rem;
  display: inline-block;
}

/* Divider with Heart */
.divider-heart {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 2rem 0;
}

.divider-heart::before,
.divider-heart::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--color-gray-200);
}

.divider-heart::before {
  margin-right: 1rem;
}

.divider-heart::after {
  margin-left: 1rem;
}

/* ============================================
   GALLERY MASONRY LAYOUT
   ============================================ */

/* Masonry Grid using CSS Columns */
.gallery-grid,
.masonry-grid {
  column-count: 1;
  column-gap: 1rem;
  width: 100%;
}

/* Tablet: 2 columns */
@media (min-width: 640px) {
  .gallery-grid,
  .masonry-grid {
    column-count: 2;
    column-gap: 1.5rem;
  }
}

/* Desktop: 3 columns */
@media (min-width: 1024px) {
  .gallery-grid,
  .masonry-grid {
    column-count: 3;
    column-gap: 2rem;
  }
}

/* Prevent column breaks inside images */
.gallery-grid > *,
.masonry-grid > * {
  break-inside: avoid;
  page-break-inside: avoid;
  margin-bottom: 1rem;
  display: block;
}

@media (min-width: 640px) {
  .gallery-grid > *,
  .masonry-grid > * {
    margin-bottom: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .gallery-grid > *,
  .masonry-grid > * {
    margin-bottom: 2rem;
  }
}

/* Gallery images styling */
.gallery-grid img,
.masonry-grid img {
  width: 100%;
  height: auto;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-grid img:hover,
.masonry-grid img:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

/* ============================================
   LIGHTBOX MODAL
   ============================================ */

/* Lightbox Container */
#lightbox,
.lightbox-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Lightbox Active State */
#lightbox.active,
.lightbox-modal.active {
  opacity: 1;
  visibility: visible;
}

/* Lightbox Image Container */
.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Lightbox Image */
#lightbox img,
.lightbox-modal img {
  max-width: 100%;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 0.5rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* Close Button */
.lightbox-close,
#lightbox .close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 3rem;
  height: 3rem;
  background-color: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10001;
}

.lightbox-close:hover,
#lightbox .close-btn:hover {
  background-color: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

/* Navigation Buttons */
.lightbox-prev,
.lightbox-next,
#lightbox .prev-btn,
#lightbox .next-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 3rem;
  height: 3rem;
  background-color: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10001;
}

.lightbox-prev,
#lightbox .prev-btn {
  left: 1rem;
}

.lightbox-next,
#lightbox .next-btn {
  right: 1rem;
}

.lightbox-prev:hover,
.lightbox-next:hover,
#lightbox .prev-btn:hover,
#lightbox .next-btn:hover {
  background-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-50%) scale(1.1);
}

/* Larger navigation buttons on desktop */
@media (min-width: 768px) {
  .lightbox-prev,
  .lightbox-next,
  #lightbox .prev-btn,
  #lightbox .next-btn {
    width: 4rem;
    height: 4rem;
    font-size: 2rem;
  }
  
  .lightbox-prev,
  #lightbox .prev-btn {
    left: 2rem;
  }
  
  .lightbox-next,
  #lightbox .next-btn {
    right: 2rem;
  }
  
  .lightbox-close,
  #lightbox .close-btn {
    top: 2rem;
    right: 2rem;
    width: 3.5rem;
    height: 3.5rem;
    font-size: 1.75rem;
  }
}

/* Lightbox Loading State */
.lightbox-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Prevent body scroll when lightbox is open */
body.lightbox-open {
  overflow: hidden;
}

/* ============================================
   RESPONSIVE BREAKPOINTS TESTING
   ============================================ */

/* Mobile First: 320px - 639px */
@media (min-width: 320px) {
  .responsive-test-mobile {
    display: block;
  }
}

/* Small Tablets: 640px - 767px */
@media (min-width: 640px) {
  .responsive-test-sm {
    display: block;
  }
}

/* Tablets: 768px - 1023px */
@media (min-width: 768px) {
  .responsive-test-md {
    display: block;
  }
}

/* Desktop: 1024px - 1279px */
@media (min-width: 1024px) {
  .responsive-test-lg {
    display: block;
  }
}

/* Large Desktop: 1280px - 1535px */
@media (min-width: 1280px) {
  .responsive-test-xl {
    display: block;
  }
}

/* Extra Large Desktop: 1536px+ (up to 1920px) */
@media (min-width: 1536px) {
  .responsive-test-2xl {
    display: block;
  }
}

/* Maximum Width: 1920px */
@media (min-width: 1920px) {
  .responsive-test-max {
    display: block;
  }
  
  /* Constrain content on ultra-wide screens */
  .container-custom {
    max-width: 1920px;
  }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

/* Smooth Transitions */
.transition-smooth {
  transition: all 0.3s ease;
}

/* Hover Lift Effect */
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

/* Image Overlay */
.image-overlay {
  position: relative;
  overflow: hidden;
}

.image-overlay::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
  pointer-events: none;
}

/* Gradient Text */
.text-gradient-red {
  background: linear-gradient(135deg, var(--color-red-light) 0%, var(--color-red-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Loading Spinner */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.spinner {
  border: 3px solid var(--color-gray-200);
  border-top-color: var(--color-red-primary);
  border-radius: 50%;
  width: 2rem;
  height: 2rem;
  animation: spin 0.8s linear infinite;
}

/* Hidden but accessible (for honeypot fields) */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
  .no-print {
    display: none !important;
  }
  
  body {
    background: white;
  }
  
  .glass,
  .glass-strong,
  .glass-light {
    background: white;
    border: 1px solid #ccc;
  }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

/* Focus Visible Styles */
*:focus-visible {
  outline: 2px solid var(--color-red-primary);
  outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  .glass,
  .glass-strong,
  .glass-light {
    border: 2px solid currentColor;
  }
  
  .btn-primary,
  .btn-secondary {
    border: 2px solid currentColor;
  }
}

/* ============================================
   SECTION BACKGROUNDS - MOBILE OPTIMIZED
   ============================================ */

/* Opening Cover - Already has background */
#opening-cover {
  background-size: cover;
  background-position: center;
  background-attachment: scroll; /* Better for mobile */
}

/* Hero Section - Light elegant background */
#hero {
  background-image: url('/assets/images/hero-bg.webp');
  background-size: cover;
  background-position: center;
  background-attachment: scroll;
  min-height: 100vh;
}

/* Couple Section - Soft romantic background */
#couple {
  background-image: url('/assets/images/backgrounds/couple-bg.webp');
  background-size: cover;
  background-position: center;
  background-attachment: scroll;
  min-height: 100vh;
}

/* Event Details Section - Elegant venue background */
#event-details {
  background-image: url('/assets/images/backgrounds/event-bg.webp');
  background-size: cover;
  background-position: center;
  background-attachment: scroll;
  min-height: 100vh;
}

/* Gallery Section - Soft gallery background */
#gallery {
  background-image: url('/assets/images/backgrounds/gallery-bg.webp');
  background-size: cover;
  background-position: center;
  background-attachment: scroll;
  min-height: auto; /* Gallery height depends on content */
}

/* Quote Section - Spiritual background */
#quote {
  background-image: url('/assets/images/backgrounds/quote-bg.webp');
  background-size: cover;
  background-position: center;
  background-attachment: scroll;
  min-height: 100vh;
}

/* Gift Section - Elegant gift background */
#gift {
  background-image: url('/assets/images/backgrounds/gift-bg.webp');
  background-size: cover;
  background-position: center;
  background-attachment: scroll;
  min-height: 100vh;
}

/* RSVP Section - Warm invitation background */
#rsvp {
  background-image: url('/assets/images/backgrounds/rsvp-bg.webp');
  background-size: cover;
  background-position: center;
  background-attachment: scroll;
  min-height: 100vh;
}

/* Footer Section - Closing background */
#footer {
  background-image: url('/assets/images/backgrounds/footer-bg.webp');
  background-size: cover;
  background-position: center;
  background-attachment: scroll;
  min-height: auto;
}

/* Parallax effect for desktop */
@media (min-width: 1024px) {
  #hero,
  #couple,
  #event-details,
  #quote,
  #gift,
  #rsvp {
    background-attachment: fixed;
  }
}

/* Mobile-specific optimizations */
@media (max-width: 767px) {
  /* Ensure all sections are full viewport height on mobile */
  section.section-padding {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  
  /* Optimize background images for mobile */
  #hero,
  #couple,
  #event-details,
  #gallery,
  #quote,
  #gift,
  #rsvp,
  #footer {
    background-size: cover;
    background-position: center center;
  }
  
  /* Adjust overlay opacity for better mobile readability */
  #hero .absolute,
  #couple .absolute,
  #event-details .absolute,
  #gallery .absolute,
  #quote .absolute,
  #gift .absolute,
  #rsvp .absolute,
  #footer .absolute {
    background-color: rgba(255, 255, 255, 0.92) !important;
  }
}

/* ============================================
   MOBILE-FIRST CARD ADJUSTMENTS
   ============================================ */

@media (max-width: 767px) {
  .card-glass {
    padding: 1.25rem;
    border-radius: 0.75rem;
  }
  
  /* Countdown timer mobile optimization */
  #hero .card-glass {
    padding: 1rem 1.5rem;
  }
  
  #hero .flex.gap-4 {
    gap: 0.75rem;
  }
  
  #countdown-days,
  #countdown-hours,
  #countdown-minutes,
  #countdown-seconds {
    font-size: 2rem !important;
  }
  
  /* Event cards mobile stacking */
  #event-details .grid {
    gap: 1.5rem;
  }
  
  /* Gallery mobile optimization */
  #gallery .columns-1 {
    column-gap: 0.75rem;
  }
  
  #gallery img {
    margin-bottom: 0.75rem;
  }
}

/* ============================================
   MOBILE BUTTON OPTIMIZATIONS
   ============================================ */

@media (max-width: 767px) {
  .btn-primary,
  .btn-secondary {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
    min-width: 48px;
    min-height: 48px;
  }
  
  /* Full width buttons on mobile for forms */
  #rsvp-form .btn-primary {
    width: 100%;
  }
}

/* ============================================
   WISHES SECTION STYLES
   ============================================ */

/* Wishes Section Background */
#wishes {
  background-image: url('/assets/images/backgrounds/wishes-bg.webp');
  background-size: cover;
  background-position: center;
  background-attachment: scroll;
  min-height: 100vh;
}

/* Wishes Card Styles */
#wishes-list .card-glass {
  transition: all 0.3s ease;
}

#wishes-list .card-glass:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.15);
}

/* Avatar Gradient */
#wishes-list .card-glass .rounded-full {
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

/* Wishes Animation */
@keyframes wishFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#wishes-list .card-glass {
  animation: wishFadeIn 0.5s ease-out forwards;
}

/* Mobile Optimization for Wishes */
@media (max-width: 767px) {
  #wishes {
    min-height: auto;
  }
  
  #wishes-list .card-glass {
    padding: 1rem;
  }
  
  #wishes-list .card-glass .rounded-full {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1rem;
  }
}

/* Parallax effect for desktop */
@media (min-width: 1024px) {
  #wishes {
    background-attachment: fixed;
  }
}
