/* ===================================
   CSS Custom Properties - Colorful Birthday Party Theme
   =================================== */
:root {
  --color-primary: #FF6B9D;
  --color-primary-dark: #E84D88;
  --color-primary-light: #FF9EC6;
  --color-accent: #FFD93D;
  --color-accent-2: #6BCB77;
  --color-accent-3: #4D96FF;
  --color-bg: #FFFEF7;
  --color-bg-alt: #FFF8E7;
  --color-bg-dark: #2D1B4E;
  --color-text: #2D2D3F;
  --color-text-light: #7B7B8E;
  --color-text-white: #FFFEF7;
  --color-border: #FFE4E1;
  --color-success: #6BCB77;

  --font-display: 'Fredoka One', 'Comic Sans MS', cursive;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;

  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 4px 20px rgba(255, 107, 157, 0.12);
  --shadow-lg: 0 8px 32px rgba(255, 107, 157, 0.18);
  --transition: 0.3s ease;
}

/* ===================================
   Reset & Base
   =================================== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ===================================
   Layout
   =================================== */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: var(--space-2xl) 0;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 400;
  color: var(--color-text);
  margin-bottom: var(--space-lg);
  line-height: 1.3;
}

.section-title--center {
  text-align: center;
}

/* ===================================
   Buttons
   =================================== */
.btn {
  display: inline-block;
  padding: 0.875rem 2rem;
  border: none;
  border-radius: 50px;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 400;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}

.btn-primary {
  background: var(--color-primary);
  color: white;
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 24px rgba(255, 107, 157, 0.4);
}

.btn-full {
  width: 100%;
}

/* ===================================
   Navbar
   =================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem 0;
  transition: all var(--transition);
}

.navbar.scrolled {
  background: rgba(255, 254, 247, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 12px rgba(255, 107, 157, 0.1);
  padding: 0.5rem 0;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 400;
  color: white;
  transition: color var(--transition);
}

.navbar.scrolled .nav-logo {
  color: var(--color-primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  transition: color var(--transition);
}

.navbar.scrolled .nav-links a {
  color: var(--color-text-light);
}

.nav-links a:hover,
.navbar.scrolled .nav-links a:hover {
  color: var(--color-primary);
}

.nav-cta {
  background: var(--color-primary);
  color: white !important;
  padding: 0.5rem 1.25rem;
  border-radius: 50px;
}

.nav-cta:hover {
  background: var(--color-primary-dark) !important;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: white;
  transition: all var(--transition);
}

.navbar.scrolled .nav-toggle span {
  background: var(--color-text);
}

/* ===================================
   Hero - Colorful Birthday Party
   =================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: url('../pictures/kids.jpeg') center center/cover no-repeat;
  color: white;
  text-align: center;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(45, 27, 78, 0.5) 0%,
    rgba(45, 27, 78, 0.6) 40%,
    rgba(255, 107, 157, 0.4) 100%
  );
}

/* Floating Balloons */
.hero-balloons {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.balloon {
  position: absolute;
  width: 40px;
  height: 52px;
  border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
  opacity: 0;
  animation: floatBalloon linear infinite;
  will-change: transform;
}

.balloon::after {
  content: '';
  position: absolute;
  bottom: -20px;
  left: 50%;
  width: 1px;
  height: 20px;
  background: rgba(255,255,255,0.3);
  transform: translateX(-50%);
}

@keyframes floatBalloon {
  0% {
    transform: translateY(100vh) rotate(0deg);
    opacity: 0;
  }
  5% {
    opacity: 0.7;
  }
  50% {
    transform: translateY(50vh) rotate(8deg) translateX(20px);
  }
  90% {
    opacity: 0.7;
  }
  100% {
    transform: translateY(-120px) rotate(-5deg) translateX(-10px);
    opacity: 0;
  }
}

/* Confetti */
.hero-confetti {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.confetti-piece {
  position: absolute;
  width: 8px;
  height: 8px;
  top: -10px;
  opacity: 0;
  animation: confettiFall linear 1;
  will-change: transform;
}

@keyframes confettiFall {
  0% {
    transform: translateY(-10px) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: var(--space-xl) 0;
}

.hero-subtitle {
  font-size: clamp(0.8rem, 1.5vw, 1rem);
  font-weight: 500;
  letter-spacing: 0.1em;
  opacity: 0.9;
  margin-bottom: var(--space-sm);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 9vw, 6rem);
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 0.25rem;
  text-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.hero-age {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  color: var(--color-accent);
  margin-bottom: 0.25rem;
  text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.hero-theme {
  font-size: clamp(0.9rem, 2vw, 1.15rem);
  font-weight: 300;
  opacity: 0.85;
  margin-bottom: var(--space-xl);
  letter-spacing: 0.05em;
}

/* Countdown - Colorful Bubbles */
.countdown {
  display: flex;
  justify-content: center;
  gap: clamp(0.5rem, 2vw, 1.25rem);
  margin-bottom: var(--space-xl);
}

.countdown-bubble {
  border-radius: 50%;
  width: clamp(65px, 12vw, 95px);
  height: clamp(65px, 12vw, 95px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 2px solid rgba(255,255,255,0.3);
  transition: transform 0.3s ease;
}

.countdown-bubble:hover {
  transform: scale(1.1);
}

.countdown-pink {
  background: rgba(255, 107, 157, 0.4);
}

.countdown-yellow {
  background: rgba(255, 217, 61, 0.4);
}

.countdown-green {
  background: rgba(107, 203, 119, 0.4);
}

.countdown-blue {
  background: rgba(77, 150, 255, 0.4);
}

.countdown-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.countdown-value {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 400;
  line-height: 1;
}

.countdown-value.pulse {
  animation: countdownPulse 0.4s ease;
}

@keyframes countdownPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

.countdown-label {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.9;
  margin-top: 0.125rem;
}

.hero-btn {
  font-size: 1.1rem;
  padding: 1rem 2.5rem;
}

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255,255,255,0.7);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
}

.scroll-arrow {
  width: 20px;
  height: 20px;
  border-right: 2px solid rgba(255,255,255,0.5);
  border-bottom: 2px solid rgba(255,255,255,0.5);
  transform: rotate(45deg);
  animation: scrollBounce 2s infinite;
}

@keyframes scrollBounce {
  0%, 20%, 50%, 80%, 100% { transform: rotate(45deg) translateY(0); }
  40% { transform: rotate(45deg) translateY(6px); }
  60% { transform: rotate(45deg) translateY(3px); }
}

/* ===================================
   Cartoon Animations
   =================================== */
.wiggle {
  animation: wiggle 3s ease-in-out infinite;
}

@keyframes wiggle {
  0%, 100% { transform: rotate(-1.5deg); }
  50% { transform: rotate(1.5deg); }
}

.bounce-gentle {
  animation: bounceGentle 2.5s ease-in-out infinite;
}

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

.pop-in {
  animation: popIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

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

/* Scroll-triggered pop animation */
.pop-enter {
  opacity: 0;
  transform: scale(0.8) translateY(30px);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.pop-enter.visible {
  opacity: 1;
  transform: scale(1) translateY(0);
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .wiggle,
  .bounce-gentle,
  .pop-in,
  .balloon,
  .confetti-piece,
  .countdown-value.pulse {
    animation: none !important;
  }
  .pop-enter {
    transition: opacity 0.3s ease !important;
    transform: none !important;
  }
  .pop-enter.visible {
    transform: none !important;
  }
}

/* ===================================
   About
   =================================== */
.about {
  background: var(--color-bg);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--space-xl);
  align-items: center;
}

.about-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 4px solid var(--color-accent);
}

.about-image img {
  width: 100%;
  height: 450px;
  object-fit: cover;
}

.about-intro {
  font-size: 1.1rem;
  color: var(--color-text);
  margin-bottom: var(--space-md);
}

.about-text p {
  margin-bottom: var(--space-sm);
  color: var(--color-text-light);
}

.about-text p strong {
  color: var(--color-primary);
}

.about-funfacts {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-lg);
  flex-wrap: wrap;
}

.funfact {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--color-bg-alt);
  padding: 0.625rem 1rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  border: 2px solid var(--color-border);
}

.funfact-emoji {
  font-size: 1.25rem;
}

/* ===================================
   Event Details
   =================================== */
.details {
  background: var(--color-bg-alt);
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}

.detail-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--space-lg) var(--space-md);
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform var(--transition);
  border: 2px solid var(--color-border);
}

.detail-card:hover {
  transform: translateY(-6px) rotate(1deg);
}

.detail-card:nth-child(even):hover {
  transform: translateY(-6px) rotate(-1deg);
}

.detail-emoji {
  font-size: 2.5rem;
  margin-bottom: var(--space-sm);
}

.detail-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--color-primary);
}

.detail-card p {
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.25rem;
}

.detail-note {
  font-size: 0.8rem;
  color: var(--color-text-light);
}

/* ===================================
   Gallery
   =================================== */
.gallery {
  background: var(--color-bg);
}

.gallery-subtitle {
  text-align: center;
  color: var(--color-text-light);
  margin-bottom: var(--space-xl);
  margin-top: -1rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 280px;
  gap: var(--space-sm);
}

.gallery-grid--single {
  grid-template-columns: 1fr;
  max-width: 600px;
  margin: 0 auto;
  grid-auto-rows: 380px;
}

.gallery-item {
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  border: 3px solid var(--color-border);
  transition: border-color var(--transition);
}

.gallery-item:hover {
  border-color: var(--color-primary);
}

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 107, 157, 0);
  transition: background var(--transition);
}

.gallery-item:hover::after {
  background: rgba(255, 107, 157, 0.1);
}

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

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

/* ===================================
   Location / Map
   =================================== */
.location {
  background: var(--color-bg-alt);
}

.location-address {
  text-align: center;
  color: var(--color-text-light);
  margin-bottom: var(--space-lg);
  margin-top: -1rem;
}

.map-container {
  width: 100%;
  height: 400px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-light);
  border: 3px solid var(--color-border);
}

.location-note {
  text-align: center;
  font-size: 0.85rem;
  color: var(--color-text-light);
  margin-top: var(--space-md);
}

/* ===================================
   RSVP / Registration
   =================================== */
.register {
  background: var(--color-bg);
}

.register-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: start;
}

.register-info .section-title {
  margin-bottom: var(--space-md);
}

.register-info p {
  color: var(--color-text-light);
  margin-bottom: var(--space-sm);
  font-size: 1.05rem;
}

.register-reminder {
  display: flex;
  gap: var(--space-sm);
  background: var(--color-bg-alt);
  padding: var(--space-md);
  border-radius: var(--radius);
  margin-top: var(--space-lg);
  align-items: flex-start;
  border: 2px solid var(--color-border);
}

.reminder-emoji {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.register-reminder p {
  font-size: 0.9rem;
  margin: 0;
}

.register-form-wrapper {
  position: relative;
}

.register-form {
  background: white;
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 2px solid var(--color-border);
}

.form-group {
  margin-bottom: var(--space-md);
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.375rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--color-border);
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-text);
  background: var(--color-bg);
  transition: border-color var(--transition);
  resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
}

.form-success {
  display: none;
  position: absolute;
  inset: 0;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 2px solid var(--color-border);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-xl);
}

.form-success.active {
  display: flex;
}

.success-emoji {
  font-size: 3.5rem;
  margin-bottom: var(--space-md);
}

.form-success h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--color-primary);
  margin-bottom: var(--space-sm);
}

.form-success p {
  color: var(--color-text-light);
}

.form-error {
  display: none;
  background: #FFF0F0;
  color: #E84D88;
  padding: var(--space-sm) var(--space-md);
  border-radius: 12px;
  font-size: 0.9rem;
  margin-top: var(--space-sm);
  border: 2px solid #FFD0D0;
}

.form-error.active {
  display: block;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ===================================
   Footer
   =================================== */
.footer {
  background: var(--color-bg-dark);
  color: var(--color-text-white);
  padding: var(--space-xl) 0;
  text-align: center;
}

.footer-quote {
  font-family: var(--font-display);
  font-size: 1.15rem;
  opacity: 0.85;
  margin-bottom: var(--space-md);
}

.footer-organizer {
  font-size: 0.9rem;
  opacity: 0.7;
  margin-bottom: var(--space-xs);
}

.footer-copy {
  font-size: 0.8rem;
  opacity: 0.5;
}

.footer-powered {
  margin-top: 1.5rem;
  font-size: 1.1rem;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.footer-powered:hover {
  opacity: 1;
}

.footer-powered a {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.powered-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: #4F46E5;
  color: white;
  border-radius: 6px;
  font-weight: 800;
  font-size: 0.7rem;
}

/* ===================================
   Lightbox
   =================================== */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(45, 27, 78, 0.92);
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  cursor: pointer;
}

.lightbox.active {
  display: flex;
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity var(--transition);
  line-height: 1;
}

.lightbox-close:hover {
  opacity: 1;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius);
}

/* ===================================
   Responsive
   =================================== */
@media (max-width: 1024px) {
  .details-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 75%;
    max-width: 320px;
    height: 100vh;
    background: white;
    flex-direction: column;
    justify-content: center;
    gap: 1.5rem;
    padding: 2rem;
    box-shadow: -4px 0 20px rgba(255, 107, 157, 0.15);
    transition: right var(--transition);
  }

  .nav-links.open {
    right: 0;
  }

  .nav-links a {
    color: var(--color-text) !important;
    font-size: 1.1rem;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .about-image img {
    height: 300px;
  }

  .details-grid {
    grid-template-columns: 1fr 1fr;
  }

  .gallery-grid--single {
    grid-auto-rows: 260px;
  }

  .register-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .map-container {
    height: 300px;
  }

  .about-funfacts {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .section {
    padding: var(--space-xl) 0;
  }

  .countdown {
    gap: 0.375rem;
  }

  .countdown-bubble {
    width: 55px;
    height: 55px;
  }

  .details-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .hero-scroll {
    display: none;
  }

  .about-funfacts {
    flex-direction: column;
    align-items: center;
  }
}
