/* ===========================================
   LOVABLE MAIN CSS - SELF-CONTAINED STYLES
   Version: 3.0
   ALL selectors scoped under #lovable-root
   to prevent Bootstrap/legacy CSS conflicts
   =========================================== */

/* ===========================================
   1. CSS VARIABLES & BASE STYLES
   =========================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  /* Color Palette */
  --lp-navy: #2d1b69;
  --lp-navy-dark: #1f1248;
  --lp-teal: #15a5b5;
  --lp-teal-light: #1dbdce;
  --lp-red: #ec1313;
  --lp-orange: #f4a261;
  --lp-yellow: #e9c46a;
  
  /* Backgrounds */
  --lp-bg: #ffffff;
  --lp-bg-muted: #f8fafc;
  --lp-bg-alt: #f1f5f9;
  --lp-bg-dark: #0f172a;
  
  /* Text */
  --lp-text: #1e293b;
  --lp-text-muted: #64748b;
  --lp-text-light: #94a3b8;
  --lp-text-white: #ffffff;
  
  /* Borders */
  --lp-border: #e2e8f0;
  --lp-border-light: #f1f5f9;
  
  /* Shadows */
  --lp-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --lp-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --lp-shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --lp-shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --lp-shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  
  /* Spacing */
  --lp-space-xs: 0.5rem;
  --lp-space-sm: 1rem;
  --lp-space-md: 1.5rem;
  --lp-space-lg: 2rem;
  --lp-space-xl: 3rem;
  --lp-space-2xl: 4rem;
  --lp-space-3xl: 6rem;
  
  /* Border Radius */
  --lp-radius-sm: 0.375rem;
  --lp-radius: 0.5rem;
  --lp-radius-md: 0.75rem;
  --lp-radius-lg: 1rem;
  --lp-radius-xl: 1.5rem;
  --lp-radius-full: 9999px;
  
  /* Transitions */
  --lp-transition: 0.2s ease-in-out;
  --lp-transition-slow: 0.3s ease-in-out;
}

/* ===========================================
   LEGACY CSS ISOLATION
   All Lovable pages must be wrapped in
   <div id="lovable-root"> to prevent any
   legacy CSS from interfering.
   =========================================== */
#lovable-root {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  font-size: 16px !important;
  line-height: 1.6 !important;
  color: var(--lp-text) !important;
  background-color: var(--lp-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#lovable-root *,
#lovable-root *::before,
#lovable-root *::after {
  box-sizing: border-box !important;
}

/* ===========================================
   2. CONTAINER CLASSES (scoped)
   =========================================== */
#lovable-root .container {
  width: 100% !important;
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 0 var(--lp-space-md) !important;
}

#lovable-root .container.narrow {
  max-width: 800px !important;
}

#lovable-root .container.wide {
  max-width: 1400px !important;
}

/* ===========================================
   3. TYPOGRAPHY (scoped)
   =========================================== */
#lovable-root h1, #lovable-root h2,
#lovable-root h3, #lovable-root h4,
#lovable-root h5, #lovable-root h6 {
  font-family: 'Inter', sans-serif !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  color: var(--lp-navy) !important;
  margin: 0 0 var(--lp-space-sm) !important;
}

#lovable-root h1 {
  font-size: clamp(2rem, 5vw, 2.75rem) !important;
  font-weight: 800 !important;
  letter-spacing: -0.02em !important;
}

#lovable-root h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem) !important;
  letter-spacing: -0.01em !important;
}

#lovable-root h3 {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem) !important;
}

#lovable-root h4 {
  font-size: 1.125rem !important;
  font-weight: 600 !important;
}

#lovable-root a {
  color: var(--lp-teal) !important;
  text-decoration: none !important;
  transition: color var(--lp-transition) !important;
}

#lovable-root a:hover {
  color: var(--lp-teal-light) !important;
}

#lovable-root p {
  margin: 0 0 var(--lp-space-sm) !important;
  color: var(--lp-text) !important;
  font-family: 'Inter', sans-serif !important;
}

/* ===========================================
   4. BUTTONS (scoped)
   =========================================== */
#lovable-root .btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5rem !important;
  padding: 0.75rem 1.5rem !important;
  font-family: 'Inter', sans-serif !important;
  font-size: 0.9375rem !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  text-decoration: none !important;
  border: none !important;
  border-radius: var(--lp-radius) !important;
  cursor: pointer !important;
  transition: all var(--lp-transition) !important;
  white-space: nowrap !important;
}

#lovable-root .btn:focus {
  outline: 2px solid var(--lp-teal) !important;
  outline-offset: 2px !important;
}

#lovable-root .btn-primary,
#lovable-root .btn.btn-primary {
  background-color: var(--lp-red) !important;
  color: var(--lp-text-white) !important;
}

#lovable-root .btn-primary:hover,
#lovable-root .btn.btn-primary:hover {
  background-color: #d32f3d !important;
  color: var(--lp-text-white) !important;
  transform: translateY(-2px) !important;
  box-shadow: var(--lp-shadow-md) !important;
}

#lovable-root .btn-secondary,
#lovable-root .btn.btn-secondary {
  background-color: var(--lp-navy) !important;
  color: var(--lp-text-white) !important;
}

#lovable-root .btn-secondary:hover,
#lovable-root .btn.btn-secondary:hover {
  background-color: var(--lp-navy-dark) !important;
  color: var(--lp-text-white) !important;
  transform: translateY(-2px) !important;
  box-shadow: var(--lp-shadow-md) !important;
}

#lovable-root .btn-ghost,
#lovable-root .btn.btn-ghost {
  background-color: transparent !important;
  color: var(--lp-navy) !important;
  border: 2px solid var(--lp-border) !important;
}

#lovable-root .btn-ghost:hover,
#lovable-root .btn.btn-ghost:hover {
  background-color: var(--lp-bg-muted) !important;
  border-color: var(--lp-navy) !important;
  color: var(--lp-navy) !important;
}

#lovable-root .btn-outline,
#lovable-root .btn.btn-outline {
  background-color: transparent !important;
  color: var(--lp-teal) !important;
  border: 2px solid var(--lp-teal) !important;
}

#lovable-root .btn-outline:hover,
#lovable-root .btn.btn-outline:hover {
  background-color: var(--lp-teal) !important;
  color: var(--lp-text-white) !important;
}

#lovable-root .btn-lg,
#lovable-root .btn.btn-lg {
  padding: 1rem 2rem !important;
  font-size: 1.0625rem !important;
}

#lovable-root .btn-sm,
#lovable-root .btn.btn-sm {
  padding: 0.5rem 1rem !important;
  font-size: 0.875rem !important;
}

#lovable-root .btn-block {
  width: 100% !important;
}

/* ===========================================
   5. BADGES (scoped)
   =========================================== */
#lovable-root .badge {
  display: inline-flex !important;
  align-items: center !important;
  padding: 0.375rem 0.875rem !important;
  font-size: 0.8125rem !important;
  font-weight: 600 !important;
  border-radius: var(--lp-radius-full) !important;
  background-color: var(--lp-bg-muted) !important;
  color: var(--lp-text) !important;
  margin-right: 0.5rem !important;
  margin-bottom: 0.5rem !important;
}

#lovable-root .badge.price {
  background-color: var(--lp-teal) !important;
  color: var(--lp-text-white) !important;
  font-size: 0.9375rem !important;
  font-weight: 700 !important;
}

#lovable-root .badge.age {
  background-color: var(--lp-orange) !important;
  color: var(--lp-text-white) !important;
}

#lovable-root .badge.duration {
  background-color: var(--lp-navy) !important;
  color: var(--lp-text-white) !important;
}

#lovable-root .badge.location {
  background-color: var(--lp-bg-alt) !important;
  color: var(--lp-text) !important;
}

#lovable-root .badge.staff {
  background-color: #22c55e !important;
  color: var(--lp-text-white) !important;
}

#lovable-root .badge.participants {
  background-color: var(--lp-bg-muted) !important;
  color: var(--lp-text) !important;
  border: 1px solid var(--lp-border) !important;
}

/* ===========================================
   6. SECTION STYLES (scoped)
   =========================================== */
#lovable-root section {
  padding: var(--lp-space-lg) 0 !important;
}

#lovable-root .section-muted {
  background-color: var(--lp-bg-muted) !important;
}

#lovable-root .section-alt {
  background-color: var(--lp-bg-alt) !important;
}

#lovable-root .section-dark {
  background-color: var(--lp-bg-dark) !important;
  color: var(--lp-text-white) !important;
}

#lovable-root .section-dark h1,
#lovable-root .section-dark h2,
#lovable-root .section-dark h3,
#lovable-root .section-dark h4 {
  color: var(--lp-text-white) !important;
}

#lovable-root .section-dark p {
  color: rgba(255, 255, 255, 0.8) !important;
}

/* ===========================================
   7. GRID UTILITIES (scoped)
   =========================================== */
#lovable-root .grid {
  display: grid !important;
  gap: var(--lp-space-md) !important;
}

#lovable-root .grid-2 {
  grid-template-columns: repeat(2, 1fr) !important;
}

#lovable-root .grid-3 {
  grid-template-columns: repeat(3, 1fr) !important;
}

#lovable-root .grid-4 {
  grid-template-columns: repeat(4, 1fr) !important;
}

@media (max-width: 992px) {
  #lovable-root .grid-4,
  #lovable-root .grid-3 {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 640px) {
  #lovable-root .grid-4,
  #lovable-root .grid-3,
  #lovable-root .grid-2 {
    grid-template-columns: 1fr !important;
  }
}

/* ===========================================
   8. FLEX UTILITIES (scoped)
   =========================================== */
#lovable-root .flex {
  display: flex !important;
}

#lovable-root .flex-center {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

#lovable-root .flex-between {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

#lovable-root .flex-wrap {
  flex-wrap: wrap !important;
}

#lovable-root .flex-col {
  flex-direction: column !important;
}

#lovable-root .gap-sm { gap: var(--lp-space-sm) !important; }
#lovable-root .gap-md { gap: var(--lp-space-md) !important; }
#lovable-root .gap-lg { gap: var(--lp-space-lg) !important; }

/* ===========================================
   9. SPACING UTILITIES (scoped)
   =========================================== */
#lovable-root .mt-sm { margin-top: var(--lp-space-sm) !important; }
#lovable-root .mt-md { margin-top: var(--lp-space-md) !important; }
#lovable-root .mt-lg { margin-top: var(--lp-space-lg) !important; }
#lovable-root .mt-xl { margin-top: var(--lp-space-xl) !important; }

#lovable-root .mb-sm { margin-bottom: var(--lp-space-sm) !important; }
#lovable-root .mb-md { margin-bottom: var(--lp-space-md) !important; }
#lovable-root .mb-lg { margin-bottom: var(--lp-space-lg) !important; }
#lovable-root .mb-xl { margin-bottom: var(--lp-space-xl) !important; }

#lovable-root .py-sm { padding-top: var(--lp-space-sm) !important; padding-bottom: var(--lp-space-sm) !important; }
#lovable-root .py-md { padding-top: var(--lp-space-md) !important; padding-bottom: var(--lp-space-md) !important; }
#lovable-root .py-lg { padding-top: var(--lp-space-lg) !important; padding-bottom: var(--lp-space-lg) !important; }

/* ===========================================
   10. TEXT UTILITIES (scoped)
   =========================================== */
#lovable-root .text-muted {
  color: var(--lp-text-muted) !important;
}

#lovable-root .text-center {
  text-align: center !important;
}

#lovable-root .accent {
  color: var(--lp-teal) !important;
}

/* ===========================================
   11. PROSE / CONTENT BLOCKS (scoped)
   =========================================== */
#lovable-root .prose {
  max-width: 65ch !important;
}

#lovable-root .prose p {
  margin-bottom: var(--lp-space-md) !important;
  font-size: 1.0625rem !important;
  line-height: 1.7 !important;
}

#lovable-root .prose p:last-child {
  margin-bottom: 0 !important;
}

#lovable-root .intro-text {
  font-size: 1.125rem !important;
  color: var(--lp-text-muted) !important;
  line-height: 1.7 !important;
  margin-bottom: var(--lp-space-lg) !important;
}

/* ===========================================
   12. IMAGES (scoped)
   =========================================== */
#lovable-root .img-responsive {
  max-width: 100% !important;
  height: auto !important;
  display: block !important;
}

#lovable-root .img-rounded {
  border-radius: var(--lp-radius-lg) !important;
}

#lovable-root .img-cover {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

/* ===========================================
   13. DIVIDERS (scoped)
   =========================================== */
#lovable-root .divider {
  height: 1px !important;
  background-color: var(--lp-border) !important;
  margin: var(--lp-space-lg) 0 !important;
}

#lovable-root .divider-lg {
  margin: var(--lp-space-xl) 0 !important;
}

/* ===========================================
   14. RESPONSIVE VISIBILITY (scoped)
   =========================================== */
@media (max-width: 768px) {
  #lovable-root .hide-mobile {
    display: none !important;
  }
}

@media (min-width: 769px) {
  #lovable-root .hide-desktop {
    display: none !important;
  }
}

/* ===========================================
   15. ANIMATIONS
   =========================================== */
@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#lovable-root .animate-in {
  animation: fade-in 0.4s ease-out !important;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

#lovable-root .animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite !important;
}
