@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Outfit:wght@400;600;700;800&display=swap');

:root {
  /* Colors - Premium Palette */
  --color-primary: #0f172a; /* Deep authoritative slate/navy */
  --color-brand-bg: #0f172a; /* Stays dark in both themes */
  --color-primary-light: #1e293b;
  --color-secondary: #d97706; /* Warm amber/gold for hope and CTAs */
  --color-secondary-hover: #b45309;
  --color-bg: #f8fafc; /* Crisp, slightly cool white */
  --color-surface: #ffffff;
  --color-surface-rgb: 255, 255, 255;
  --color-text-main: #334155;
  --color-text-muted: #64748b;
  --color-text-light: #f8fafc;
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  --gradient-secondary: linear-gradient(135deg, var(--color-secondary) 0%, #f59e0b 100%);
  --gradient-overlay: linear-gradient(to bottom, rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.95));
  
  /* Typography */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1.25rem;
  --spacing-lg: 2.5rem;
  --spacing-xl: 5rem;
  --spacing-xxl: 8rem;

  /* Shadows - Refined and softer */
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08), 0 2px 4px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 15px 35px rgba(15, 23, 42, 0.1), 0 5px 15px rgba(15, 23, 42, 0.05);

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode Variables */
[data-theme="dark"] {
  --color-primary: #f8fafc;
  --color-brand-bg: #080b12;
  --color-primary-light: #e2e8f0;
  --color-secondary: #fbbf24;
  --color-secondary-hover: #f59e0b;
  --color-bg: #0b0f19;
  --color-surface: #131b2f;
  --color-surface-rgb: 19, 27, 47;
  --color-text-main: #f1f5f9;
  --color-text-muted: #94a3b8;
  --color-text-light: #ffffff;
  
  --gradient-overlay: linear-gradient(to bottom, rgba(11, 15, 25, 0.8), rgba(11, 15, 25, 1));
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5), 0 2px 4px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 15px 35px rgba(0, 0, 0, 0.6), 0 5px 15px rgba(0, 0, 0, 0.5);
}

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

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

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all var(--transition-fast);
}

ul {
  list-style: none;
}

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

/* Layout Utilities */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

.section-padding {
  padding: var(--spacing-xxl) 0;
}

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

/* Typography Classes */
.heading-xl { 
  font-size: clamp(3rem, 6vw, 5rem); 
  font-weight: 800;
  color: var(--color-text-light); 
  margin-bottom: var(--spacing-md); 
}
.heading-lg { 
  font-size: clamp(2.5rem, 5vw, 3.5rem); 
  margin-bottom: var(--spacing-lg); 
}
.heading-md { 
  font-size: 1.75rem; 
  margin-bottom: var(--spacing-sm); 
}
.text-lead { 
  font-size: 1.25rem; 
  color: var(--color-text-muted); 
  line-height: 1.8; 
}
.text-eyebrow {
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--color-secondary);
  display: block;
  margin-bottom: var(--spacing-sm);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.1rem;
  border-radius: 100px;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  gap: 0.5rem;
}

.btn-primary {
  background: var(--gradient-secondary);
  color: #fff;
  box-shadow: 0 4px 15px rgba(217, 119, 6, 0.3);
}

.btn-primary:hover {
  background: var(--color-secondary-hover);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(217, 119, 6, 0.4);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--color-text-light);
  border: 2px solid rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(5px);
}

.btn-outline:hover {
  background: #fff;
  color: var(--color-brand-bg);
  border-color: #fff;
}

.btn-outline-alt {
  background: transparent;
  color: var(--color-text-main);
  border: 2px solid rgba(128, 128, 128, 0.3);
}

.btn-outline-alt:hover {
  background: var(--color-text-main);
  color: var(--color-surface);
  border-color: var(--color-text-main);
}

/* Forms */
.form-control {
  width: 100%;
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid rgba(128, 128, 128, 0.2);
  background: var(--color-surface);
  color: var(--color-text-main);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color var(--transition-fast);
}
.form-control:focus {
  outline: none;
  border-color: var(--color-secondary);
}
.form-control::placeholder {
  color: var(--color-text-muted);
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(var(--color-surface-rgb), 0.9);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  padding: 0.5rem 0;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 12px;
  letter-spacing: -0.5px;
}

.logo img {
  height: 48px;
  width: 48px;
  border-radius: 8px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.nav-link {
  font-weight: 600;
  font-size: 1rem;
  color: var(--color-text-muted);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 3px;
  bottom: -6px;
  left: 0;
  background: var(--gradient-secondary);
  transition: width var(--transition-fast);
  border-radius: 3px;
}

.nav-link:hover, .nav-link.active {
  color: var(--color-primary);
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.mobile-toggle {
  display: none;
  font-size: 1.75rem;
  color: var(--color-primary);
  cursor: pointer;
  background: none;
  border: none;
}

/* Hero Section */
.hero {
  position: relative;
  height: 100vh;
  min-height: 700px;
  display: flex;
  align-items: center;
  text-align: left;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  padding-top: 86px; /* Offset for the fixed navbar */
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: var(--gradient-overlay);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero-actions {
  display: flex;
  gap: 1.5rem;
  margin-top: var(--spacing-lg);
}

/* Glassmorphism Cards */
.glass-card {
  background: rgba(var(--color-surface-rgb), 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(var(--color-primary-light), 0.1);
  border-radius: 20px;
  padding: 3rem 2rem;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
}
[data-theme="dark"] .glass-card {
  border-color: rgba(255, 255, 255, 0.05);
}

.glass-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

/* Image Cards (For Who We Help) */
.image-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  padding: 3rem 2rem;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
  color: white;
  text-align: center;
  min-height: 350px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.image-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.8));
  z-index: 1;
  transition: all var(--transition-normal);
}

.image-card:hover::before {
  background: linear-gradient(to bottom, rgba(0,0,0,0.4), rgba(0,0,0,0.9));
}

.image-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.image-card-content {
  position: relative;
  z-index: 2;
}

.image-card h3 {
  color: white;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.image-card p {
  color: rgba(255, 255, 255, 0.9);
}

/* Specific Section Styles */
.mission-text {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.5rem;
  color: var(--color-primary);
  font-weight: 500;
  line-height: 1.6;
}

.help-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 4rem;
}

.help-icon {
  font-size: 3.5rem;
  background: var(--gradient-secondary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1.5rem;
}

/* Cost Breakdown Section */
.cost-breakdown {
  background: var(--color-surface);
}

.cost-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.cost-card {
  padding: 2rem;
  border-radius: 16px;
  background: var(--color-bg);
  text-align: center;
  border: 1px solid rgba(0,0,0,0.05);
}

.cost-amount {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--color-secondary);
  margin: 1rem 0;
}

/* Footer */
.footer {
  background-color: var(--color-brand-bg);
  color: rgba(255, 255, 255, 0.7);
  padding: var(--spacing-xxl) 0 2rem;
}

.footer-quote {
  text-align: center;
  max-width: 800px;
  margin: 0 auto var(--spacing-xl);
  padding-bottom: var(--spacing-xl);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-quote h3 {
  color: var(--color-secondary);
  font-size: 2rem;
  margin-bottom: 1rem;
}

.footer-quote p {
  font-size: 1.25rem;
  font-style: italic;
  color: #fff;
  line-height: 1.8;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 4rem;
}

.footer-col h4 {
  color: #fff;
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-col li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.footer-col i {
  color: var(--color-secondary);
  margin-top: 6px;
}

.footer-col a:hover {
  color: var(--color-secondary);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.875rem;
}

/* Trust Badges */
.trust-badges {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
  margin: 3rem 0;
  padding: 2rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.trust-badge-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--color-secondary);
  transition: transform 0.3s ease;
}

.trust-badge-item:hover {
  transform: translateY(-3px);
}

.trust-badge-item i {
  font-size: 2.2rem;
  margin-top: 0;
}

.trust-badge-text {
  text-align: left;
}

.trust-badge-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
  letter-spacing: 0.5px;
}

.trust-badge-desc {
  font-size: 0.85rem;
  opacity: 0.7;
  color: #fff;
}

/* Utilities & Animations */
.text-white { color: #fff !important; }
.bg-primary { background: var(--color-brand-bg); }
.mt-2 { margin-top: 2rem; }

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

.animate-up {
  animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
}
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }

/* Responsive */
@media (max-width: 992px) {
  .hero-content {
    text-align: center;
    margin: 0 auto;
  }
  .hero-actions {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 86px; /* Match total navbar height */
    left: -100%;
    width: 100%;
    height: calc(100vh - 86px);
    background: var(--color-surface); /* Solid background to prevent text bleed */
    flex-direction: column;
    justify-content: flex-start; /* Start from top instead of center */
    padding-top: 2rem;
    gap: 2rem;
    transition: left var(--transition-normal);
    overflow-y: auto; /* Allow scrolling if menu items overflow */
    z-index: 999;
  }
  
  .nav-links.active {
    left: 0;
  }
  
  .mobile-toggle {
    display: block;
  }
  
  .hero-actions {
    flex-direction: column;
  }
}

/* ==========================================================================
   8. Magic Water Filter Game (Education Page)
   ========================================================================== */
.education-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

@media (max-width: 992px) {
    .education-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}

.filter-game-container {
    background: var(--color-surface);
    border: 2px dashed rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 2.5rem;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
}
[data-theme="dark"] .filter-game-container {
    background: rgba(30, 41, 59, 0.5);
    border-color: rgba(255,255,255,0.05);
}

.filter-message {
    background: rgba(11, 164, 219, 0.1);
    color: var(--color-primary);
    padding: 1rem;
    border-radius: 12px;
    text-align: center;
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(11, 164, 219, 0.2);
}

.filter-message.error {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.2);
}

.filter-message.success {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border-color: rgba(34, 197, 94, 0.2);
}

.filter-game-layout {
    display: flex;
    gap: 3rem;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .filter-game-container {
        padding: 1rem 0.5rem;
    }
    
    .filter-message {
        font-size: 0.8rem;
        padding: 0.5rem;
        margin-bottom: 0.5rem;
        line-height: 1.3;
    }
    
    .filter-game-layout {
        display: flex;
        flex-direction: row;
        align-items: center; 
        justify-content: flex-start; /* Prevents flask from being pushed off the left edge */
        gap: 0;
        width: 100%;
    }
    
    .flask-system {
        transform: scale(0.45);
        transform-origin: left center;
        margin: -120px -100px -120px 0px; /* -100px right margin completely deletes dead space */
        flex-shrink: 0;
    }
    
    .materials-tray,
    [data-theme="dark"] .materials-tray {
        flex: 1;
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
        padding: 0; /* Remove internal padding to save space */
        border: none;
        background: transparent;
        margin: 0;
        max-width: none;
    }
    
    .materials-tray h4 {
        display: none; /* Hide 'Materials Tray' title to save vertical height */
    }
    
    .draggable-item {
        padding: 0.35rem 0.2rem;
        font-size: 0.65rem;
        flex-direction: column;
        justify-content: center;
        text-align: center;
        gap: 0.2rem;
        border-width: 1px;
        min-height: 55px;
        touch-action: none; /* Required for mobile-drag-drop polyfill */
    }
    
    .draggable-item i {
        font-size: 0.8rem;
    }
}

/* ==========================================================================
   9. Did You Know Facts Section
   ========================================================================== */
.facts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.fact-card {
    padding: 2.5rem;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
}

/* ==========================================
   Legal Modals
   ========================================== */
.legal-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.legal-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.legal-modal-container {
    background: var(--color-surface);
    width: 90%;
    max-width: 800px;
    height: 85vh;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    position: relative;
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
}

.legal-modal-overlay.active .legal-modal-container {
    transform: translateY(0) scale(1);
}

.legal-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(128, 128, 128, 0.1);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--color-text-main);
    transition: background 0.2s, color 0.2s;
    z-index: 10;
}

.legal-modal-close:hover {
    background: rgba(239, 68, 68, 0.1); /* Subtle red */
    color: #ef4444;
}

.legal-modal-content {
    padding: 3rem 2rem;
    overflow-y: auto;
    flex-grow: 1;
    color: var(--color-text-main);
}

.legal-section {
    margin-bottom: 2rem;
}

.legal-section h3 {
    font-family: var(--font-heading);
    color: var(--color-primary);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(128, 128, 128, 0.1);
    padding-bottom: 0.5rem;
}

.legal-section p, .legal-section li {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--color-text-muted);
    margin-bottom: 0.75rem;
}

.legal-section ul {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

/* Base styles for standalone legal pages */
body.legal-page {
    background: var(--color-bg);
}
body.legal-page #legal-content {
    background: var(--color-surface);
    padding: 3rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

/* ==========================================
   Cookie Consent Banner
   ========================================== */
.cookie-banner {
    position: fixed;
    bottom: -150px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-surface);
    width: 90%;
    max-width: 900px;
    border-radius: 12px;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.2);
    z-index: 10001; /* Ensure it floats above the chatbot and whatsapp */
    transition: bottom 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    gap: 1.5rem;
}

.cookie-banner.show {
    bottom: 20px;
}

.cookie-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex: 1 1 300px;
}

.cookie-icon {
    font-size: 2rem;
    color: var(--color-secondary);
}

.cookie-content p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--color-text-muted);
}

.cookie-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: nowrap;
}

@media (max-width: 768px) {
    .cookie-banner {
        flex-direction: column;
        align-items: stretch;
        padding: 0.75rem 1rem;
        bottom: -200px;
        width: 90%;
        max-width: 350px;
        border-radius: 12px;
        margin: 0;
        gap: 0.75rem;
    }
    .cookie-content {
        flex: 1;
        gap: 0.75rem;
    }
    .cookie-content p {
        font-size: 0.75rem;
        line-height: 1.3;
    }
    .cookie-icon {
        font-size: 1.25rem;
    }
    .cookie-actions {
        display: flex;
        justify-content: flex-end;
        gap: 0.5rem;
    }
    .cookie-actions .btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.7rem;
    }
    .cookie-banner.show {
        bottom: 90px;
    }
    .legal-modal-content {
        padding: 1.5rem 1rem;
    }
    body.legal-page #legal-content {
        padding: 1rem;
    }
}
.fact-card:hover {
    transform: translateY(-5px);
}

.fact-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    line-height: 1;
}

.sodis-card {
    grid-column: 1 / -1;
}

.sodis-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

[data-theme="dark"] .sodis-header {
    border-bottom-color: rgba(255,255,255,0.1);
}

.sodis-header .fact-icon {
    margin-bottom: 0;
    font-size: 3.5rem;
}

.sodis-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

@media (max-width: 992px) {
    .facts-grid {
        grid-template-columns: 1fr;
    }
    .sodis-details {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .sodis-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

/* Flask System Styles */
.flask-system {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    gap: 10px;
}

.flask-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    filter: drop-shadow(0 15px 25px rgba(0,0,0,0.25));
}

.flask-neck {
    width: 70px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.8);
    border-bottom: none;
    background: linear-gradient(90deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.6) 20%, rgba(255,255,255,0.1) 80%, rgba(255,255,255,0.5) 100%);
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    position: relative;
    z-index: 2;
    backdrop-filter: blur(5px);
    box-shadow: inset 0 5px 10px rgba(255,255,255,0.4);
}

.flask-body {
    width: 180px;
    height: 240px;
    border: 4px solid rgba(255, 255, 255, 0.8);
    border-top: none;
    border-bottom: none;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.05) 100%);
    display: flex;
    flex-direction: column-reverse; /* Bottom items first */
    overflow: hidden;
    position: relative;
    box-shadow: inset 15px 0 30px rgba(255,255,255,0.4), inset -15px 0 30px rgba(0,0,0,0.15);
    backdrop-filter: blur(5px);
}

.flask-funnel {
    width: 180px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.8);
    border-top: none;
    border-bottom-left-radius: 50px;
    border-bottom-right-radius: 50px;
    background: linear-gradient(90deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.4) 20%, rgba(255,255,255,0.1) 80%);
    position: relative;
    z-index: 2;
    backdrop-filter: blur(5px);
    box-shadow: inset 0 -10px 15px rgba(0,0,0,0.15);
}

[data-theme="dark"] .flask-neck, 
[data-theme="dark"] .flask-body, 
[data-theme="dark"] .flask-funnel {
    border-color: rgba(255,255,255,0.3);
}

/* Jug Container */
.jug-container {
    width: 150px;
    height: 120px;
    border: 4px solid rgba(255,255,255,0.8);
    border-radius: 10px 10px 40px 40px;
    background: linear-gradient(135deg, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0.05) 100%);
    position: relative;
    backdrop-filter: blur(5px);
    box-shadow: inset 15px 0 30px rgba(255,255,255,0.4), inset -15px 0 30px rgba(0,0,0,0.1), 0 15px 25px rgba(0,0,0,0.25);
    overflow: hidden;
    margin-top: 5px;
    display: flex;
    align-items: flex-end;
}
[data-theme="dark"] .jug-container { border-color: rgba(255,255,255,0.3); }

/* 3D Layers */
.filter-layer {
    width: 100%;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 800;
    color: rgba(255,255,255,0.95);
    text-shadow: 1px 2px 4px rgba(0,0,0,0.8);
    animation: dropIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    position: relative;
    z-index: 1;
    border-top: 2px solid rgba(255,255,255,0.3);
    box-shadow: inset 0 5px 15px rgba(0,0,0,0.3);
}

@keyframes dropIn {
    from { transform: translateY(-80px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.layer-cotton { background: #f8f9fa; color: #495057; text-shadow: none; box-shadow: inset 0 5px 10px rgba(0,0,0,0.05); }
.layer-charcoal { background: #212529; }
.layer-fine-sand { background: #e9ceb5; color: #5a4a35; text-shadow: none; }
.layer-coarse-sand { background: #c29b76; }
.layer-big-rocks { background: #6c757d; }

/* Materials Tray */
.materials-tray {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    background: rgba(0,0,0,0.02);
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.1);
}
[data-theme="dark"] .materials-tray {
    background: rgba(0,0,0,0.2);
}

.draggable-item {
    background: var(--color-surface);
    border: 1px solid rgba(11, 164, 219, 0.2);
    padding: 0.8rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: grab;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    color: var(--color-text-main);
}

[data-theme="dark"] .draggable-item {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.1);
}

.draggable-item:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 15px rgba(11, 164, 219, 0.2);
    border-color: var(--color-primary);
}

.draggable-item:active {
    cursor: grabbing;
    transform: scale(0.98);
}

.draggable-item.dragging {
    opacity: 0.4;
    transform: scale(1.05);
}

/* Water Animations */
.water-pour-top {
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 0;
    background: rgba(139, 69, 19, 0.9); /* Dirty water color */
    border-radius: 15px;
    z-index: 3;
    transition: height 1s ease-in;
    box-shadow: 0 0 15px rgba(139, 69, 19, 0.5);
}

.water-drip {
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 0;
    background: rgba(11, 164, 219, 0.9); /* Clean water */
    border-radius: 6px;
    z-index: 3;
    opacity: 0;
    box-shadow: 0 0 10px rgba(11, 164, 219, 0.6);
}

.clean-water-fill {
    width: 100%;
    height: 0;
    background: linear-gradient(180deg, rgba(11, 164, 219, 0.6) 0%, rgba(11, 164, 219, 0.9) 100%);
    box-shadow: inset 0 8px 20px rgba(255,255,255,0.6);
    transition: height 12s cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* Active Animation States triggered by JS */
.flask-system.animating .water-pour-top {
    height: 100px; /* Pours down into the layers */
}

.flask-system.animating .water-drip {
    animation: dripAnimation 0.8s infinite 1s; /* Starts dripping after 1s */
    opacity: 1;
}

.flask-system.animating .clean-water-fill {
    height: 85%; /* Fills the jug */
    transition-delay: 1s; /* Starts growing exactly as the first drip falls */
}

@keyframes dripAnimation {
    0% { height: 0; bottom: -5px; opacity: 1; }
    50% { height: 25px; bottom: -35px; opacity: 1; }
    100% { height: 0; bottom: -50px; opacity: 0; }
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    width: 55px;
    height: 55px;
    bottom: 42px;
    left: 30px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 32px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    color: #FFF;
}

