/*
Theme Name: Wedding Invitation - Colleen & Gilbert
Template: astra
Description: Custom wedding invitation child theme with lavender palette
Version: 1.0
Author: Custom
Text Domain: wedding-invitation
*/

:root {
  --burgundy-dark: #4a1a1a;
  --burgundy: #6b2737;
  --burgundy-light: #8b3a4a;
  --gold: #c9a961;
  --champagne: #e8dcc4;
  --cream: #f5f1e8;
  --white: #ffffff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Cormorant Garamond', 'Georgia', serif;
  color: var(--burgundy-dark);
  background-color: var(--cream);
  line-height: 1.6;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

/* Fix for container width issues */
.site-content,
.ast-container,
main {
  max-width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', 'Georgia', serif;
  color: var(--burgundy);
  font-weight: 700;
}

/* Hero Section */
.hero-section {
  min-height: 100vh;
  min-height: 100svh; /* For mobile browsers */
  background: linear-gradient(135deg, var(--burgundy-dark) 0%, var(--burgundy) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(1rem, 5vw, 2rem);
  position: relative;
  overflow: hidden;
  width: 100%;
  float: none !important;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 20% 50%, rgba(201, 169, 97, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(201, 169, 97, 0.1) 0%, transparent 50%);
  animation: float 20s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

.hero-content {
  position: relative;
  z-index: 2;
  animation: fadeInUp 1s ease-out;
  padding: 1rem;
  width: 100%;
  max-width: 1200px;
}

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

.hero-content h1 {
  font-size: clamp(2.5rem, 8vw, 6rem);
  color: var(--gold);
  margin-bottom: 1rem;
  font-weight: 400;
  letter-spacing: clamp(1px, 0.5vw, 2px);
  line-height: 1.2;
}

.hero-content .ampersand {
  font-size: clamp(1.8rem, 5vw, 4rem);
  color: var(--champagne);
  margin: 0 clamp(0.5rem, 2vw, 1rem);
  display: inline-block;
}

.hero-content p {
  font-size: clamp(1rem, 2.5vw, 1.8rem);
  color: var(--champagne);
  margin-top: clamp(1rem, 3vw, 2rem);
  font-style: italic;
  line-height: 1.4;
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--gold);
  animation: bounce 2s infinite;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
  40% { transform: translateX(-50%) translateY(-10px); }
  60% { transform: translateX(-50%) translateY(-5px); }
}

/* Section Styling */
.section {
  padding: clamp(3rem, 8vw, 5rem) clamp(1rem, 4vw, 2rem);
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: block;
  clear: both;
}

/* Ensure sections stack vertically */
section {
  display: block;
  width: 100%;
  float: none !important;
  position: relative;
}

.section-title {
  font-size: clamp(1.8rem, 5vw, 3rem);
  text-align: center;
  margin-bottom: clamp(2rem, 5vw, 3rem);
  color: var(--burgundy);
  position: relative;
  padding-bottom: 1rem;
  word-wrap: break-word;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: clamp(60px, 20vw, 100px);
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* Event Details */
.event-details {
  background: var(--white);
  padding: clamp(3rem, 8vw, 5rem) clamp(1rem, 4vw, 2rem);
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
  gap: clamp(1.5rem, 4vw, 3rem);
  margin-top: 2rem;
}

.detail-card {
  text-align: center;
  padding: clamp(1.5rem, 4vw, 2rem);
  background: var(--cream);
  border-radius: 10px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 2px solid var(--champagne);
}

.detail-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(107, 39, 55, 0.2);
}

.detail-icon {
  font-size: clamp(2.5rem, 6vw, 3rem);
  color: var(--gold);
  margin-bottom: 1rem;
}

.detail-card h3 {
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  margin-bottom: 0.5rem;
  color: var(--burgundy);
}

.detail-card p {
  font-size: clamp(1rem, 2.5vw, 1.1rem);
  color: var(--burgundy-light);
  line-height: 1.5;
}

/* Countdown Timer */
.countdown-section {
  background: linear-gradient(135deg, var(--burgundy) 0%, var(--burgundy-dark) 100%);
  color: var(--white);
  text-align: center;
}

.countdown-section .section-title {
  color: var(--gold);
}

.countdown-section .section-title::after {
  background: linear-gradient(90deg, transparent, var(--champagne), transparent);
}

.countdown-timer {
  display: flex;
  justify-content: center;
  gap: clamp(1rem, 3vw, 2rem);
  flex-wrap: wrap;
  margin-top: 2rem;
}

.countdown-item {
  background: rgba(255, 255, 255, 0.1);
  padding: clamp(1.5rem, 4vw, 2rem);
  border-radius: 10px;
  min-width: clamp(90px, 20vw, 120px);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(201, 169, 97, 0.3);
  flex: 1 1 auto;
  max-width: 150px;
}

.countdown-number {
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 700;
  color: var(--gold);
  display: block;
  line-height: 1;
}

.countdown-label {
  font-size: clamp(0.8rem, 2vw, 1rem);
  color: var(--champagne);
  text-transform: uppercase;
  letter-spacing: clamp(1px, 0.3vw, 2px);
  margin-top: 0.5rem;
  display: block;
}

/* Map Section */
.map-section {
  background: var(--cream);
}

.map-container {
  margin-top: 2rem;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  width: 100%;
}

.map-container iframe {
  width: 100%;
  height: clamp(300px, 60vw, 450px);
  border: none;
  display: block;
}

.map-button {
  display: inline-block;
  margin-top: 2rem;
  padding: clamp(0.8rem, 2vw, 1rem) clamp(2rem, 5vw, 3rem);
  background: var(--burgundy);
  color: var(--white);
  text-decoration: none;
  border-radius: 50px;
  font-size: clamp(1rem, 2.5vw, 1.1rem);
  transition: all 0.3s ease;
  border: 2px solid var(--burgundy);
  text-align: center;
}

.map-button:hover {
  background: transparent;
  color: var(--burgundy);
  transform: scale(1.05);
}

/* Gallery Section */
.gallery-section {
  background: var(--white);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: clamp(1rem, 3vw, 1.5rem);
  margin-top: 2rem;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  aspect-ratio: 1;
  background: var(--champagne);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

/* Entourage Section */
.entourage-section {
  background: var(--cream);
}

.entourage-grid {
  margin-top: 3rem;
}

.entourage-category {
  margin-bottom: clamp(2rem, 6vw, 4rem);
}

.entourage-category h3 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  color: var(--burgundy);
  margin-bottom: 1.5rem;
  text-align: center;
}

.entourage-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: clamp(1rem, 3vw, 2rem);
}

.entourage-card {
  background: var(--white);
  padding: clamp(1rem, 3vw, 1.5rem);
  border-radius: 10px;
  text-align: center;
  border: 2px solid var(--champagne);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.entourage-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(107, 39, 55, 0.15);
}

.entourage-role {
  font-size: clamp(0.8rem, 2vw, 0.9rem);
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: clamp(0.5px, 0.2vw, 1px);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.entourage-name {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--burgundy-dark);
  font-weight: 500;
  word-wrap: break-word;
}

/* Footer */
.footer {
  background: var(--burgundy-dark);
  color: var(--champagne);
  text-align: center;
  padding: clamp(2rem, 5vw, 3rem) clamp(1rem, 4vw, 2rem);
}

.footer p {
  font-size: clamp(1rem, 2.5vw, 1.1rem);
  font-style: italic;
  line-height: 1.6;
}

/* Mobile Specific Optimizations */
@media (max-width: 640px) {
  .hero-section {
    padding: 1rem 0.5rem;
  }
  
  .countdown-item {
    min-width: 80px;
  }
  
  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  }
  
  .map-button {
    width: 100%;
    max-width: 300px;
  }
  
  /* Improve touch targets for mobile */
  .detail-card,
  .entourage-card,
  .gallery-item {
    min-height: 44px; /* Minimum touch target size */
  }
}

/* Tablet Specific */
@media (min-width: 641px) and (max-width: 1024px) {
  .details-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
  
  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }
  
  .entourage-list {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

/* Desktop Enhancements */
@media (min-width: 1025px) {
  .section {
    padding: 5rem 2rem;
  }
  
  .details-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .countdown-timer {
    gap: 2.5rem;
  }
  
  /* Add subtle parallax effect on desktop */
  .hero-section::before {
    transform-style: preserve-3d;
  }
}

/* Landscape Mobile */
@media (max-height: 500px) and (orientation: landscape) {
  .hero-section {
    min-height: auto;
    padding: 2rem 1rem;
  }
  
  .hero-content h1 {
    font-size: clamp(2rem, 6vw, 4rem);
  }
  
  .scroll-indicator {
    display: none;
  }
}

/* Print Styles */
@media print {
  .hero-section::before,
  .scroll-indicator {
    display: none;
  }
  
  .section {
    page-break-inside: avoid;
  }
  
  body {
    background: white;
  }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .detail-card,
  .entourage-card,
  .gallery-item {
    border-width: 1px;
  }
}

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

/* Theme Override Fixes */
/* Force vertical layout and prevent horizontal scrolling */
body.wedding-invitation,
body.page-template-wedding-invitation {
  overflow-x: hidden !important;
  width: 100% !important;
  max-width: 100vw !important;
}

.site,
#page,
.site-content,
#content,
.ast-container,
article,
.entry-content {
  max-width: 100% !important;
  width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  overflow-x: hidden !important;
  float: none !important;
  display: block !important;
}

/* Ensure no flexbox on main containers */
.site-content,
#content {
  display: block !important;
  flex-direction: column !important;
}

/* Override any theme grid layouts */
.ast-separate-container .ast-article-single,
.ast-separate-container .ast-article-post {
  padding: 0 !important;
  margin: 0 !important;
}

/* Reset any column layouts from theme */
.entry-content > * {
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
  clear: both !important;
}

/* Ensure images don't break layout */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Fix for Astra theme specific issues */
.ast-single-post .entry-content {
  padding: 0 !important;
}

.ast-container {
  display: block !important;
}

/* Hide default Astra elements that might interfere */
body.wedding-invitation .site-header,
body.wedding-invitation .ast-header-break-point .site-header,
body.page-template-wedding-invitation .site-header {
  display: none !important;
}

/* Ensure footer is at bottom */
.footer {
  clear: both;
  width: 100%;
  margin-top: 0;
}