/* public/styles.css */

/* Mobile-First Reset */
* { margin: 0; padding: 0; box-sizing: border-box; transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease; }
body { font-family: Arial, sans-serif; line-height: 1.5; color: var(--text); background: var(--body-bg); padding-bottom: 80px; }


  
  /* Custom Variables (Pet-Themed Palette) */
  :root {
    --primary: #4CAF50; /* Green for CTAs */
    --accent: #FFEB3B; /* Yellow for highlights */
    --text: #333; /* Dark text for contrast */
    --background: #fff; /* White for cards */
    --border: #ddd; /* Subtle borders */
    --body-bg: #f9f9f9; /* Body background */
    --nav-bg: #fff; /* Navigation background */
    --card-bg: #fff; /* Card background */
    --shadow: rgba(0,0,0,0.08); /* Shadow color */
    --text-muted: #64748b; /* Muted text */
}

:root.dark-mode {
    --primary: #66BB6A; /* Lighter green for dark mode */
    --accent: #FFD54F; /* Lighter yellow for dark mode */
    --text: #E0E0E0; /* Light text for contrast */
    --background: #1E1E1E; /* Dark background for cards */
    --border: #404040; /* Darker borders */
    --body-bg: #121212; /* Dark body background */
    --nav-bg: #1E1E1E; /* Dark navigation background */
    --card-bg: #2D2D2D; /* Dark card background */
    --shadow: rgba(0,0,0,0.3); /* Darker shadow */
    --text-muted: #A0A0A0; /* Muted text for dark mode */
}
  
  
  /* Base Mobile Styles (<480px) */

  .container { max-width: 100%; width:100%; margin: 0 auto; padding: 0.5rem; }
  html {
    font-size: 16px; /* Base font size for rem units */
    font-family: 'Arial', sans-serif;
    line-height: 1.5;
    scroll-behavior: smooth;
  }
  
  /* Header: Logo + Search + Login (flex row on mobile) */
  header { background: var(--card-bg); border-bottom: 1px solid var(--border); padding: 1rem; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }  
  .logo { font-size: 1.5rem; font-weight: bold; color: var(--primary); } 
  .back-btn { background: none; border: none; font-size: 1.5rem; color: var(--primary); cursor: pointer; }

  /* Hero Section */
  .hero {
    color: white;
  }
  :root.dark-mode .hero {
    color: white;
  }
  .hero-overlay {
    background: rgba(0,0,0,0.5);
    padding: 20px;
    border-radius: 10px;
   /* display: inline-block;*/
  }
  :root.dark-mode .hero-overlay {
    background: rgba(0,0,0,0.7);
  }

  .search-bar { flex: 1; position: relative; min-width: 200px; }
  
  #loginBtn { background: #4CAF50; color: white; border: none; padding: 0.75rem 1.5rem; border-radius: 25px; cursor: pointer; font-size: 1rem; min-height: 44px; }
  #logoutBtn { background: #4CAF50; color: white; border: none; padding: 0.75rem 1.5rem; border-radius: 25px; cursor: pointer; font-size: 1rem; min-height: 44px; }
  .search-bar { display: flex; align-items: center; position: relative; min-width: 200px; }
  #searchInput { flex: 1; margin: 0;border-right: none; border-radius: 0px 0 0 5px; padding: 0.75rem 1rem; }
  .search-icon { position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); color: var(--text-muted); }  
  .search-suggestions { position: absolute; left: 0; right: 0; top: calc(100% + 0.5rem); background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 8px 20px var(--shadow); list-style: none; padding: 0.25rem 0; z-index: 50; max-height: 220px; overflow-y: auto; display: none; }  
  .search-suggestions li { padding: 0.65rem 1rem; font-size: 0.95rem; display: flex; flex-direction: column; gap: 0.15rem; cursor: pointer; color: var(--text);}
  .search-suggestions li:hover, .search-suggestions li.active { background: var(--background);}
  .search-suggestions strong { color: #2f855a; }
  .search-suggestions li.inactive { cursor: default; color: #64748b; pointer-events: none; }
  #searchBtn { background: var(--primary); color: white; border: none; border-radius: 0 0px 5px 0;padding: 0.75rem 0.75rem; min-width: auto;width: auto;cursor: pointer;display: flex;align-items: center;justify-content: center;min-height: 44px;}
  #searchBtn:hover {
    background: darken(var(--primary), 10%);
  }
  #searchBtn i {
    font-size: 1rem; /* Adjust icon size if needed */
  }
  h1, h2, h3 {
    color: var(--text);
    margin-bottom: 1rem;
  }
  
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.2rem; }
  
  button, input[type="submit"] {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 4px;
    min-height: 44px; /* Touch-friendly */
    min-width: 44px;
  }
  
  button:hover, input[type="submit"]:hover {
    background: darken(var(--primary), 10%);
  }
  
  input, select, textarea {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 1rem;
    min-height: 44px; /* Touch-friendly */
  }
  
  /* Override for checkboxes to make them appropriately sized */
  input[type="checkbox"] {
    min-height: auto;
    height: 20px;
    width: 20px;
    margin-bottom: 0; /* Remove margin since checkbox has its own spacing */
  }
  
  /* Navigation (Hamburger Menu) */
   /* Bottom Nav: Fixed on mobile */
   nav { position: fixed; bottom: 0; left: 0; right: 0; background: var(--nav-bg); display: flex; border-top: 1px solid var(--border); z-index: 1000; }
   nav a { flex: 1; padding: 0.75rem 0.5rem; text-align: center; color: var(--text); text-decoration: none; }
   nav a.active { color: var(--primary); font-weight: bold; }
   nav i { display: block; font-size: 1.25rem; }
   nav ul {display: flex;flex-direction: column;list-style: none;gap: 0.5rem;
  }
  
  /* Trending Feed Snippet: Scrollable list */
  .feed { background: var(--card-bg); border-radius: 10px; padding: 1rem; margin: 2rem 0; box-shadow: 0 2px 5px var(--shadow); }
  .feed h2 { color: var(--primary); margin-bottom: 1rem; }
  .feed-item { padding: 1rem 0; border-bottom: 1px solid var(--border); }
  .feed-item:last-child { border-bottom: none; }
  
  /* Card Layout (e.g., Directory, Community) */
   /* Site Info Section */
   .site-info { background: var(--card-bg); border-radius: 12px; padding: 2rem; margin: 2rem 0; box-shadow: 0 2px 8px var(--shadow); }
   .site-info h2 { color: var(--primary); text-align: center; margin-bottom: 1rem; }
   .info-intro { text-align: center; color: var(--text); margin-bottom: 2rem; font-size: 1.05rem; line-height: 1.6; }
   .tier-comparison { display: grid; grid-template-columns: 1fr; gap: 1.5rem; margin: 2rem 0; }
   .tier-card { background: var(--background); border: 2px solid var(--border); border-radius: 12px; padding: 1.5rem; }
   .tier-card.free-tier { border-color: var(--primary); }
   .tier-card.subscribed-tier { border-color: var(--accent); }
   .tier-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.25rem; }
   .tier-header i { font-size: 1.75rem; color: var(--primary); }
   .tier-header h3 { margin: 0; color: var(--text); font-size: 1.3rem; }
   .tier-features { list-style: none; padding: 0; margin: 0; }
   .tier-features li { display: flex; align-items: flex-start; gap: 0.75rem; padding: 0.5rem 0; color: var(--text); }
   .tier-features li i { color: var(--primary); margin-top: 0.25rem; flex-shrink: 0; }
   .plan-options { display: grid; gap: 1.25rem; }
   .plan-item { padding: 1rem; background: var(--card-bg); border-radius: 8px; border-left: 3px solid var(--accent); }
   .plan-item strong { display: block; color: var(--primary); margin-bottom: 0.75rem; font-size: 1.1rem; }
   .plan-item ul { list-style: none; padding: 0; margin: 0; }
   .plan-item li { padding: 0.35rem 0; color: var(--text); padding-left: 1.25rem; position: relative; }
   .plan-item li:before { content: "✓"; position: absolute; left: 0; color: var(--primary); font-weight: bold; }
   .info-cta { text-align: center; margin-top: 2rem; color: var(--text); font-size: 1rem; }
   .info-cta a { color: var(--primary); text-decoration: none; font-weight: bold; }
   .info-cta a:hover { text-decoration: underline; }
   
   /* Quick Actions: Flex grid (1-col mobile) */
   .quick-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin: 2rem 0; }
   .action-card { flex: 1 1 100%; background: var(--card-bg); border-radius: 10px; padding: 1.5rem; text-align: center; box-shadow: 0 2px 5px var(--shadow); min-height: 80px; display: flex; flex-direction: column; justify-content: center; }
   .action-card i { font-size: 2rem; color: var(--primary); margin-bottom: 0.5rem; }
   .action-card h3 { font-size: 1.1rem; }
   .card { background: var(--card-bg); border-radius: 12px; padding: 1.25rem; box-shadow: 0 2px 6px var(--shadow); }  /* Accessibility */
  button:focus, input:focus, a:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
  }
  
  [aria-hidden="true"] {
    display: none;
  }
  
  /* Lazy-Load Images */
  img[data-src] {
    opacity: 0;
    transition: opacity 0.3s;
  }
  
  img.loaded {
    opacity: 1;
  }
  
  .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 1rem;
  }

  .form-group label {
    font-weight: 600;
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    padding: 0.75rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    font-size: 1rem;
  }

  .form-group textarea {
    resize: vertical;
    min-height: 80px;
  }

  .form-group.full {
    grid-column: 1 / -1;
  }

  .form-grid {
    display: grid;
    gap: 1rem;
  }

  .hidden {
    display: none !important;
  }

  /* Service section visibility */
  .booking-details,
  .no-service {
    display: none;
  }

  .booking-details.active,
  .no-service.active {
    display: block;
  }

  /* Chatbot Floating Button (Placeholder) */
          /* Chatbot FAB: Floating action button */
          #chatbotBtn { position: fixed; bottom: 80px; right: 1rem; background: var(--primary); color: white; border: none; border-radius: 50%; width: 60px; height: 60px; font-size: 1.5rem; cursor: pointer; box-shadow: 0 2px 10px var(--shadow); z-index: 1100; display: flex; justify-content: center; align-items: center; }
          #chatbotModal { display: none; position: fixed; bottom: 150px; right: 1rem; width: 300px; max-width: calc(100vw - 2rem); max-height: 400px; min-width: 250px; min-height: 300px; background: var(--card-bg); border-radius: 10px; box-shadow: 0 2px 10px var(--shadow); overflow: hidden; z-index: 1101; display: flex; flex-direction: column; }
          .chat-pet-select { padding: 1rem; border-bottom: 1px solid var(--border); flex-shrink: 0; }
          .chat-pet-select label { display: block; margin-bottom: 0.5rem; font-weight: bold; }
          .chat-pet-select select { width: 100%; padding: 0.5rem; border: 1px solid var(--border); border-radius: 5px; background: var(--card-bg); color: var(--text); }
          .chat-messages { display: flex; flex-direction: column; padding: 1rem; overflow-y: auto; flex: 1; min-height: 0; -webkit-overflow-scrolling: touch; touch-action: auto; }
          .message.user { background: #333; align-self: flex-end; text-align: right; }          .message.ai { background: #E5E5EA; align-self: flex-start; }
          .message { padding: 0.75rem; border-radius: 18px; margin: 0.5rem; max-width: 80%; }

          .user { background: #4CAF50; color: white; text-align: right; }
          .ai { background: #f1f1f1; color: #333; }
          .chat-input { display: flex; gap: 0.5rem; padding: 0.5rem; border-top: 1px solid var(--border); flex-shrink: 0; }
          .chat-input input { flex: 1; }
          .chat-input button:disabled { opacity: 0.5; cursor: not-allowed; }
          .chat-resize-handle { position: absolute; bottom: 0; right: 0; width: 30px; height: 30px; cursor: nw-resize; background: transparent; z-index: 10; touch-action: none; }
          .chat-resize-handle::after { content: '↘'; position: absolute; bottom: 2px; right: 2px; font-size: 16px; color: var(--text-muted); }
          @media (max-width: 820px) {
              #chatbotModal { width: 100vw; left: 0; right: 0; bottom: 80px; height: 50vh; max-width: none; max-height: none; min-height: 200px; overflow: visible; }
              .chat-messages { height: calc(50vh - 120px); flex: none; }
              .chat-resize-handle { width: 40px; height: 40px; }
              .chat-resize-handle::after { font-size: 20px; bottom: 5px; right: 5px; }
          }
          
          /* Auth Modal (reuse chatbot modal styles) */
          #authModal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 100; justify-content: center; align-items: center; }
          #authModal .modal-content { background: var(--card-bg); border-radius: 10px; padding: 2rem; max-width: 90%; max-height: 80%; overflow-y: auto; }          .form-group { margin-bottom: 1rem; }
          .form-group label { display: block; margin-bottom: 0.25rem; font-weight: bold; }
          .form-group input { width: 100%; padding: 0.75rem; border: 1px solid var(--border); border-radius: 5px; }          .close-btn { position: absolute;top: 0.5rem;right: 0.5rem;background: none;border: none;font-size: 1.2rem;cursor: pointer;color: var(--text); }
          .submit-btn { background: var(--primary); color: white; border: none; padding: 0.75rem 1.5rem; border-radius: 5px; cursor: pointer; width: 100%;outline: 2px solid var(--accent); }          
          #authToggle { text-align: center; margin-top: 1rem; }
          #authToggle a { color: var(--primary); text-decoration: none; }

   /* Results: Grid of Cards */
   .results { margin-top: 1rem; }
   .results h2 { color: #4CAF50; margin-bottom: 1rem; text-align: center; }
   .service-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
  .service-card { background: var(--card-bg); border-radius: 10px; padding: 1rem; box-shadow: 0 2px 5px var(--shadow); display: flex; flex-direction: column; }
  .service-card i { font-size: 2rem; color: var(--primary); align-self: center; margin-bottom: 0.5rem; }
  .service-name { font-size: 1.2rem; font-weight: bold; margin-bottom: 0.25rem; }
  .service-location { color: var(--text-muted); margin-bottom: 0.5rem; }
  .service-rating { color: var(--accent); margin-bottom: 0.5rem; }
  .service-cta { margin-top: auto; text-align: center; }
  .book-btn { background: var(--primary); color: white; border: none; padding: 0.75rem 1.5rem; border-radius: 25px; cursor: pointer; width: 100%; }
  .review-btn { margin-top: 0.5rem; background: var(--card-bg); color: var(--primary); border: 1px solid var(--primary); padding: 0.65rem 1.5rem; border-radius: 25px; cursor: pointer; width: 100%; }
  .review-btn:hover { background: var(--background); }

           /* Autocomplete Dropdown */
   #autocomplete { position: absolute; top: 100%; left: 0; right: 0; background: var(--card-bg); border: 1px solid var(--border); border-top: none; max-height: 200px; overflow-y: auto; display: none; z-index: 10; }
   .suggestion { padding: 0.75rem; cursor: pointer; border-bottom: 1px solid var(--border); }
   .suggestion:hover, .suggestion.active { background: var(--background); }
   .suggestion:last-child { border-bottom: none; }

    /* Reviews Modal */
    .modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); display: none; align-items: center; justify-content: center; padding: 1rem; z-index: 200; }
    .modal.open { display: flex; }
    .modal-content { background: var(--card-bg); border-radius: 12px; max-width: 600px; width: 100%; max-height: 90vh; overflow-y: auto; padding: 1.5rem; display: grid; gap: 1rem; }
    .modal-header { display: flex; justify-content: space-between; align-items: center; }
    .modal-header h3 { margin: 0; color: var(--primary); }
    .close-modal { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text); }
    .reviews-list { display: grid; gap: 0.75rem; }
    .review-item { border: 1px solid var(--border); border-radius: 10px; padding: 0.75rem; }
    .review-meta { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.35rem; display: flex; justify-content: space-between; }
    .review-form { display: grid; gap: 0.75rem; }
    .review-form select, .review-form textarea { width: 100%; padding: 0.75rem; border-radius: 8px; border: 1px solid var(--border); font-size: 1rem; }
    .submit-review-btn { background: var(--primary); color: #fff; border: none; padding: 0.75rem 1.5rem; border-radius: 999px; cursor: pointer; }   
    .inline-inputs { display: grid; gap: 0.5rem; }
    .container { max-width: 750px; padding: 0.5rem; }
   form { background: var(--card-bg); border-radius: 12px; box-shadow: 0 2px 6px var(--shadow); padding: 1.5rem; }
    form h2 { font-size: 1.4rem; margin-bottom: 1rem; color: var(--primary); }
        .form-grid { display: grid; gap: 1rem; }
        .form-group { display: flex; flex-direction: column; gap: 0.35rem; }
        .availability h3 { color: #4CAF50; margin-bottom: 1rem; }
        .slot-list { display: grid; gap: 0.5rem; }
        .slot { display: flex; justify-content: space-between; padding: 0.75rem 1rem; border-radius: 8px; background: #f1f8f4; border: 1px solid #d9eedf; font-size: 0.95rem; }

        .leaflet-control-zoom-in, .leaflet-control-zoom-out {
          font-size: 18px;
          font-weight: bold;
          line-height: 1;
      }
      
      .leaflet-control-zoom-in:before {
          content: "+";
      }
      
      .leaflet-control-zoom-out:before {
          content: "−";
      }

      
    
    /* Post cards spacing */
    .post {
        margin-bottom: 1.5rem;
    }
    
    .delete-alert-btn {
        background: #f44336;
        color: white;
        border: none;
        padding: 0.25rem 0.5rem;
        border-radius: 4px;
        cursor: pointer;
        font-size: 0.8rem;
        margin-left: 0.5rem;
    }
    
    .delete-alert-btn:hover {
        background: #d32f2f;
    }
    
    .delete-post-btn {
      background: #f44336;
      color: white;
      border: none;
      padding: 0.25rem 0.5rem;
      border-radius: 4px;
      cursor: pointer;
      font-size: 0.8rem;
      margin-left: 0.5rem;
  }
  
  .delete-post-btn:hover {
      background: #d32f2f;
  }

  /* Dark Mode Toggle Button */
  #darkModeToggle {
    position: fixed;
    top: 10px;
    right: 10px;
    background: var(--card-bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 2px 10px var(--shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
  }

  #darkModeToggle:hover {
    background: var(--background);
  }

  /* Smaller dark mode toggle on mobile */
  @media (max-width: 480px) {
    #darkModeToggle {
      width: 40px;
      height: 40px;
      font-size: 1rem;
    }

    /* Navigation optimization for small screens */
    nav a {
      padding: 0.5rem 0.25rem;
      font-size: 0.75rem;
    }

    nav i {
      font-size: 1rem;
    }

    nav span {
      display: block;
      margin-top: 0.125rem;
      font-size: 0.65rem;
    }
  }

  /* Extra small screens - even more compact */
  @media (max-width: 360px) {
    nav a {
      padding: 0.4rem 0.2rem;
    }

    nav i {
      font-size: 0.9rem;
    }

    nav span {
      font-size: 0.6rem;
    }
  }

  /* Consent Manager (mobile-first) */
  .consent-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1300;
    padding: 0.75rem;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.15) 40%);
    display: none;
  }
  .consent-banner.open { display: block; }
  .consent-panel {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1rem;
    box-shadow: 0 8px 30px var(--shadow);
  }
  .consent-header { display: flex; justify-content: space-between; gap: 0.75rem; align-items: flex-start; }
  .consent-eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.35rem; }
  .consent-copy { margin: 0; color: var(--text); font-size: 0.95rem; }
  .consent-close { background: transparent; border: 1px solid var(--border); color: var(--text); width: 44px; height: 44px; border-radius: 12px; font-size: 1.25rem; }
  .consent-options { display: grid; gap: 0.5rem; margin: 1rem 0; }
  .consent-toggle { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; padding: 0.75rem; border: 1px solid var(--border); border-radius: 12px; background: var(--background); }
  .consent-toggle span { display: block; font-weight: 600; }
  .consent-toggle small { color: var(--text-muted); display: block; margin-top: 0.25rem; }
  .consent-toggle input[type="checkbox"] { width: 22px; height: 22px; margin: 0; }
  .consent-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
  .consent-actions button { width: 100%; min-height: 48px; border-radius: 12px; font-weight: 600; }
  .consent-actions .ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
  .consent-actions .secondary { background: var(--background); color: var(--text); border: 1px solid var(--border); }
  .consent-actions .primary { background: var(--primary); color: #fff; }
  .consent-reopen { position: fixed; top: 60px; right: 10px; z-index: 1200; background: var(--card-bg); color: var(--text); border: 1px solid var(--border); border-radius: 50%; width: 40px; height: 40px; padding: 0; font-size: 1rem; display: flex; align-items: center; justify-content: center; }
  .consent-reopen:focus { outline: 2px solid var(--accent); outline-offset: 3px; }

  /* Adopt Page - Mobile-First Styles */
  .adopt-page {
    padding: 1rem;
    max-width: 100%;
    box-sizing: border-box;
  }

  .cta-button.primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    color: var(--primary);
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    min-height: 48px;
  }

  .cta-button.primary:hover {
    background: #f5f5f5;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
  }

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

  .guide-section h2 {
    color: var(--primary);
    text-align: center;
    margin-bottom: 1rem;
    font-size: 1.5rem;
  }

  .guide-section > p {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 1rem;
    line-height: 1.5;
  }

  .accordion {
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 1rem;
    background: var(--card-bg);
    box-shadow: 0 2px 8px var(--shadow);
  }

  .accordion summary {
    padding: 1rem 1.25rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text);
    list-style: none;
    background: var(--background);
    border-radius: 12px;
    transition: background 0.2s ease;
  }

  .accordion summary:hover {
    background: var(--card-bg);
  }

  .accordion summary::marker {
    display: none;
  }

  .accordion summary i {
    color: var(--primary);
    margin-right: 0.5rem;
  }

  .accordion summary::after {
    content: '+';
    font-size: 1.2rem;
    color: var(--primary);
    font-weight: bold;
    transition: transform 0.3s ease;
  }

  .accordion[open] summary::after {
    transform: rotate(45deg);
  }

  .accordion-content {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border);
  }

  .accordion-content ul,
  .accordion-content ol {
    padding-left: 1.25rem;
    margin: 0;
  }

  .accordion-content li {
    margin-bottom: 0.5rem;
    color: var(--text);
    line-height: 1.4;
  }

  .toolkit-link {
    text-align: center;
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--background);
    border-radius: 12px;
    border: 1px solid var(--border);
  }

  .toolkit-link a {
    color: var(--primary);
    font-weight: bold;
    text-decoration: none;
  }

  .quick-filters {
    margin: 2rem 0;
  }

  .quick-filters h2 {
    color: var(--primary);
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
  }

  .filter-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .filter-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    text-decoration: none;
    color: var(--text);
    box-shadow: 0 2px 8px var(--shadow);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .filter-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 4px 15px var(--shadow);
  }

  .filter-card i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 0.75rem;
  }

  .filter-card h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
  }

  .sanctuaries {
    margin: 2rem 0;
  }

  .sanctuaries h2 {
    color: var(--primary);
    text-align: center;
    margin-bottom: 1rem;
    font-size: 1.5rem;
  }

  .sanctuaries > p {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 1rem;
    line-height: 1.5;
  }

  .sanctuary-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .sanctuary-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 2px 8px var(--shadow);
    border: 1px solid var(--border);
  }

  .sanctuary-card h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
  }

  .sanctuary-card p {
    margin: 0.5rem 0;
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.4;
  }

  .sanctuary-link {
    display: block;
    background: var(--primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    text-align: center;
    transition: background 0.3s ease;
    margin-top: 1rem;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .sanctuary-link:hover {
    background: #45a049;
  }

  .success-stories {
    margin: 2rem 0;
  }

  .success-stories h2 {
    color: var(--primary);
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
  }

  .stories-carousel {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 0.5rem;
    -webkit-overflow-scrolling: touch;
  }

  .story-card {
    flex: 0 0 280px;
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 2px 8px var(--shadow);
    text-align: center;
    scroll-snap-align: start;
  }

  .story-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 0.75rem;
  }

  .story-card p {
    font-size: 0.9rem;
    color: var(--text);
    line-height: 1.4;
    margin: 0;
    font-style: italic;
  }

  .disclaimer {
    margin: 2rem 0;
    padding: 1rem;
    background: var(--background);
    border-radius: 12px;
    border-left: 4px solid var(--primary);
  }

  .disclaimer p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
    text-align: center;
  }

  .disclaimer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: bold;
  }

  /* Floating CTA Button */
  .fab-cta {
    position: fixed;
    bottom: 100px;
    right: 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    z-index: 100;
  }

  .fab-cta:hover {
    background: #45a049;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.5);
  }

  /* Hide on desktop */
  @media (min-width: 769px) {
    .fab-cta {
      display: none;
    }
  }

  /* Tablet styles */
  @media (min-width: 481px) {
    .hero-mobile {
      height: 50vh;
    }

    .hero-content h1 {
      font-size: 2.5rem;
    }

    .filter-cards {
      grid-template-columns: repeat(2, 1fr);
    }

    .sanctuary-grid {
      grid-template-columns: repeat(2, 1fr);
    }

    .stories-carousel {
      justify-content: center;
    }

    .story-card {
      flex: 0 0 300px;
    }
  }

  /* Desktop styles */
  @media (min-width: 769px) {
    .adopt-page {
      max-width: 1200px;
      margin: 0 auto;
      padding: 0.5rem;
    }

    .filter-cards {
      grid-template-columns: repeat(3, 1fr);
    }

    .sanctuary-grid {
      grid-template-columns: repeat(2, 1fr);
      gap: 2rem;
    }

    .stories-carousel {
      gap: 2rem;
    }

    .story-card {
      flex: 0 0 350px;
    }
  }

  /* Adopt Teaser for Home */
  .adopt-teaser {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
    text-align: center;
    box-shadow: 0 2px 8px var(--shadow);
  }

  .adopt-teaser h2 {
    color: var(--primary);
    margin-bottom: 0.75rem;
  }

  .adopt-teaser p {
    margin-bottom: 1rem;
    color: var(--text);
  }

  .adopt-teaser .cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #4CAF50;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    box-shadow: 0 2px 10px rgba(76, 175, 80, 0.3);
  }

  .adopt-teaser .cta-button:hover {
    background: #45a049;
  }

  .sanctuary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
  }

  .sanctuary-grid .card {
    background: var(--background);
    border-radius: 8px;
    padding: 0.75rem;
    text-align: center;
    box-shadow: 0 1px 4px var(--shadow);
  }

  .sanctuary-grid .card h3 {
    font-size: 1rem;
    margin: 0;
    color: var(--primary);
  }

  .sanctuary-grid .card a {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
  }

  /* Map Styles */
  #map {
      width: 100%;
      height: 320px;
      border-radius: 14px;
      border: 1px solid var(--border);
      z-index: 1;
      background: var(--card-bg); /* Fallback for map loading */
  }
  .map-meta { margin-top: 0.75rem; font-size: 0.9rem; color: var(--text-muted); }

  /* Dark mode overrides for map */
  html.dark-mode .leaflet-container {
      background: var(--body-bg) !important; /* Dark map bg */
  }
  html.dark-mode .leaflet-tile-pane img {
      filter: brightness(0.8) contrast(1.1); /* Subtle darkening of tiles */
  }
  html.dark-mode .leaflet-control-zoom {
      background: var(--card-bg) !important;
      border: 1px solid var(--border) !important;
  }
  html.dark-mode .leaflet-popup-content-wrapper {
    background: var(--card-bg) !important;
    color: var(--text) !important;
    border: 1px solid var(--border) !important;
}

/* Owner Link Button */
.owner-link-btn {
    display: inline-block;
    margin-left: 0rem;
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.owner-link-btn:hover {
    background: #45a049;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.owner-link-btn i {
    margin-right: 0.5rem;
}

/* Payment Modal Billing Toggle Styles */
.billing-toggle {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.upgrade-prompt {
  text-align: center;
  padding: 2rem;
  background: var(--card-bg);
  border-radius: 12px;
  border: 2px solid var(--border);
}

.upgrade-prompt h3 {
  color: var(--primary);
  margin-bottom: 1rem;
}

.upgrade-prompt p {
  margin-bottom: 1rem;
  color: var(--text-muted);
}

.upgrade-prompt button {
  margin-top: 1rem;
}

.billing-toggle h4 {
margin: 0 0 0.75rem 0;
font-size: 1rem;
font-weight: 600;
color: var(--text);
}

.billing-options {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 0.75rem;
}

.billing-option {
position: relative;
display: flex;
align-items: center;
background: var(--card-bg);
border: 2px solid var(--border);
border-radius: 8px;
padding: 0.75rem 1rem;
cursor: pointer;
transition: all 0.3s ease;
min-height: 60px;
}

.billing-option:hover {
border-color: var(--primary);
background: var(--background);
transform: translateY(-1px);
box-shadow: 0 2px 8px var(--shadow);
}

.billing-option input[type="radio"] {
position: absolute;
opacity: 0;
width: 0;
height: 0;
}

.billing-option input[type="radio"]:checked + .option-content {
color: var(--primary);
}

.billing-option input[type="radio"]:checked ~ * {
border-color: var(--primary);
}

.billing-option.yearly input[type="radio"]:checked ~ .option-content .option-subtitle {
background: var(--accent);
color: #000;
padding: 0.125rem 0.375rem;
border-radius: 10px;
font-weight: 600;
}

.option-content {
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
width: 100%;
transition: color 0.3s ease;
}

.option-title {
font-weight: 600;
font-size: 1rem;
margin-bottom: 0.125rem;
}

.option-subtitle {
font-size: 0.85rem;
color: var(--text-muted);
transition: all 0.3s ease;
}

/* Selected state indicator */
.billing-option::before {
content: '';
position: absolute;
top: -2px;
left: -2px;
right: -2px;
bottom: -2px;
border: 2px solid var(--primary);
border-radius: 10px;
opacity: 0;
transition: opacity 0.3s ease;
pointer-events: none;
}

.billing-option input[type="radio"]:checked ~ .option-content::after {
content: '';
position: absolute;
top: 8px;
right: 8px;
width: 8px;
height: 8px;
background: var(--primary);
border-radius: 50%;
animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
from { opacity: 0; transform: scale(0.8); }
to { opacity: 1; transform: scale(1); }
}


    /* Media Queries: Tablet (481-768px) */
@media (min-width: 480px) {  /* Tablet */
    .quick-actions .action-card { flex: 1 1 48%; }
    .container { padding: 0.5rem; }
    header { flex-wrap: nowrap; }
    .billing-options {
      grid-template-columns: 1fr;
      gap: 0.5rem;
    }
    
    .billing-option {
      padding: 0.625rem 0.875rem;
      min-height: 50px;
    }
    
    .option-title {
      font-size: 0.95rem;
    }
    
    .option-subtitle {
      font-size: 0.8rem;
    }

}

@media (min-width: 769px) {  /* Desktop */
    .service-grid { grid-template-columns: repeat(3, 1fr); max-width: 1200px; margin: 0 auto; }
    .quick-actions { max-width: 1200px; margin: 2rem auto; }
    .quick-actions .action-card { flex: 1 1 22%; }
    .tier-comparison { grid-template-columns: 1fr 1fr; max-width: 1200px; margin: 2rem auto; }
    .site-info { max-width: 1200px; margin: 2rem auto; }
    nav { position: fixed; justify-content: center; gap: 2rem; padding: 1rem 0; }
    .container { max-width: 800px; padding: 0.5rem; }
    #chatbotBtn { bottom: 6rem; right: 2rem; }
    #chatbotModal { bottom: calc(6rem + 1.5rem); right: 2rem; width: 400px;max-height: 50vh; min-width: 300px; min-height: 350px; background: var(--background);border-radius: 10px;box-shadow: 0 2px 10px rgba(0,0,0,0.2);overflow: auto; z-index: 1101; display: flex; flex-direction: column; resize:vertical;   }
    #chatbotModal .chat-messages { flex: 1; min-height: 0; overflow-y: visible; }
    .hero-overlay { padding: 40px; }
}