/* =============================================================================
   SGResolve 
   =============================================================================
   Table of Contents:
   01. CSS Variables & Base Settings
   02. CSS Reset & Global Styles
   03. Typography & Utility Classes
   04. Navigation Bar
   05. Landing Page (Hero, Features, CTA)
   06. Login & Registration Pages
   07. Admin Dashboard
   08. Reporting Page
   09. My Reports Page
   10. Community Forum Page
   11. About Page
   12. Chatbot Container
   13. Animations & Transitions
   14. Responsive Adjustments
   15. Map Styling & Popups
   16. Profile Page & Gamification Elements  <-- NEW SECTION
   ============================================================================= */

/* ============================================================================
   01. CSS Variables & Base Settings
   ============================================================================ */
:root {
  /* Existing Colors */
  --primary-color: #0969da;
  /* Blue */
  --primary-dark: #044289;
  /* Darker blue */
  --secondary-color: #2ea44f;
  /* Green */
  --secondary-dark: #22863a;
  /* Darker green */
  --accent-color: #f4a261;
  /* Light orange */
  --background-color: #f0f2f5;
  /* Light gray */
  --white: #ffffff;
  --text-color: #24292e;
  /* Near black */
  --muted-color: #586069;
  /* Gray */
  --border-color: #d1d5da;
  /* Light border */
  --error-color: #d73a49;
  /* Red */
  --success-color: #155724;
  /* Dark green */

  /* New Gradient Colors */
  --gradient-start: #4facfe;
  /* Light blue */
  --gradient-end: #00f2fe;
  /* Cyan */

  /* Shadows */
  --shadow-light: 0 4px 6px rgba(0, 0, 0, 0.08);
  /* Softer shadow */
  --shadow-medium: 0 6px 12px rgba(0, 0, 0, 0.1);
  --shadow-heavy: 0 10px 20px rgba(0, 0, 0, 0.12);

  /* Font Families */
  --font-base: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  --font-heading: 'Segoe UI', sans-serif;

  /* Sizing */
  --max-width-content: 800px;
  --container-padding: 20px;

  /* Radius */
  --border-radius: 8px;
  --input-radius: 6px;
}

/* ============================================================================
   02. CSS Reset & Global Styles
   ============================================================================ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-base);
  line-height: 1.6;
  color: var(--text-color);
  background: var(--background-color);
  /* Simplified background */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--primary-dark);
}

ul,
ol {
  list-style: none;
}

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

#app {
  max-width: 1200px;
  /* Max width of overall app container */
  margin: 0 auto;
  /* padding: var(--container-padding); */
  /* Padding moved to individual pages for better control */
}

/* ============================================================================
   03. Typography & Utility Classes
   ============================================================================ */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  color: var(--text-color);
  margin-bottom: 0.75rem;
  /* Adjusted margin */
  line-height: 1.3;
}

h1 {
  font-size: 2.2rem;
  font-weight: 600;
}

h2 {
  font-size: 1.8rem;
  font-weight: 600;
}

h3 {
  font-size: 1.5rem;
  font-weight: 600;
}

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

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

/* Page container general styles (applied to most pages) */
.page {
  width: 100%;
  max-width: 1100px;
  /* Allow wider content */
  margin: 2rem auto;
  background: var(--white);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
  opacity: 0;
  /* For fade-in animation */
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  overflow: visible !important; height: auto !important;
}

.page.show {
  opacity: 1;
  transform: translateY(0);
}

/* Card style for elements within pages */
.card {
  background: var(--white);
  padding: 1.5rem;
  margin-bottom: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
}

.form-group {
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
}

.form-group label {
  margin-bottom: 0.5rem;
  font-weight: 500;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea,
select {
  width: 100%;
  max-width: 400px;
  /* Limit width on larger screens */
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--input-radius);
  font-size: 1rem;
  transition: all 0.3s ease;
  background-color: #f8f9fa;
  /* Slightly off-white */
}

input::placeholder,
textarea::placeholder {
  color: var(--muted-color);
  opacity: 0.7;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.15);
  outline: none;
  background-color: var(--white);
}

select {
  appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="5" fill="%23586069"><path d="M0 0l5 5 5-5z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  position: relative;
  overflow: hidden;
  text-align: center;
  text-decoration: none;
  /* Ensure text aligns */
}

.button::before {
  /* Removed hover shine effect for cleaner look */
  content: none;
}

.button::after {
  /* Removed default arrow */
  content: none;
  /* If you want icons, add them specifically per button type or use <i> tags */
}

.button:active {
  transform: scale(0.98);
}

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

.primary-button:hover {
  background-color: var(--primary-dark);
  box-shadow: var(--shadow-medium);
  transform: translateY(-2px);
}

.secondary-button {
  background-color: var(--secondary-color);
  /* Changed to solid green */
  color: var(--white);
  border: none;
  /* Remove border */
}

.secondary-button:hover {
  background-color: var(--secondary-dark);
  box-shadow: var(--shadow-medium);
  transform: translateY(-2px);
}

.danger-button {
  background-color: var(--error-color);
  color: var(--white);
}

.danger-button:hover {
  background-color: darkred;
  box-shadow: var(--shadow-medium);
  transform: translateY(-2px);
}

.success-message {
  background-color: #d4edda;
  color: var(--success-color);
  padding: 0.75rem 1rem;
  border-radius: var(--border-radius);
  margin-top: 1rem;
  /* animation: fadeOut 3s forwards; */
  /* Removed auto-fade for consistency with popup */
}

.error-message {
  color: var(--error-color);
  background: #f8d7da;
  padding: 0.75rem;
  border-radius: var(--border-radius);
  margin-top: 1rem;
  animation: fadeIn 0.3s ease;
}

/* Back Link Styling */
.back-link {
  display: inline-block;
  margin-top: 1rem;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease, transform 0.3s ease;
}

.back-link:hover {
  color: var(--primary-dark);
  transform: translateX(-5px);
}

/* Button Animations (Keep pulse and shake if used) */
@keyframes pulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes shake {
  0% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-5px);
  }

  50% {
    transform: translateX(5px);
  }

  75% {
    transform: translateX(-5px);
  }

  100% {
    transform: translateX(0);
  }
}

/* General Button Styles for Disabled State */
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  /* Prevent hover/active transforms */
  box-shadow: none !important;
}

/* Specific Form Button Styles (Simplified) */
#login-form button[type="submit"],
#register-form button[type="submit"],
#report-form button[type="submit"] {
  width: 100%;
  /* Make form buttons full width within their container */
  max-width: 300px;
  margin-top: 1rem;
}

#detectLocation,
#autoDetect,
#analyzeImageBtn {
  margin-top: 0.5rem;
  margin-bottom: 1rem;
  /* Add space below */
  padding: 0.6rem 1.2rem;
  /* Slightly smaller padding */
}

/* Detect Location button specific styles */
#detectLocation {
  padding: 8px 12px;
  /* Slightly larger padding for better clickability */
  font-size: 0.9rem;
  /* Adjust font size for readability */
  background-color: #007bff;
  /* Primary blue color */
  color: #fff;
  /* White text */
  border: none;
  /* Remove default border */
  border-radius: 5px;
  /* Rounded corners */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  /* Subtle shadow */
  transition: background-color 0.3s, transform 0.2s;
  /* Smooth hover effects */
}

#detectLocation:hover {
  background-color: #0056b3;
  /* Darker blue on hover */
  transform: translateY(-2px);
  /* Lift effect */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
  /* Enhanced shadow */
}

#detectLocation:active {
  background-color: #003f7f;
  /* Even darker blue on click */
  transform: translateY(0);
  /* Reset lift effect */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  /* Subtle shadow */
}


/* ============================================================================
   04. Navigation Bar - Modern Refinement v1
   ============================================================================ */
/* === Root Variables (Adjust as needed) === */
:root {
  --navbar-bg: #ffffff;
  --navbar-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  --text-color-nav: #333333;
  --text-color-nav-hover: #007bff;
  /* Primary color for hover/active */
  --primary-color: #007bff;
  /* Define if not already globally set */
  --navbar-divider-color: #e0e0e0;
  --pill-border-radius: 100px;
  --link-padding-vertical: 0.65rem;
  --link-padding-horizontal: 1.1rem;
  --logo-font-weight: 600;
  --transition-speed: 0.2s;
  --gamification-bg-nav: transparent;
  /* Gamification items transparent in pill */
  --gamification-text-nav: var(--text-color-nav);
}

/* === General Navbar Styling (Pill Shape for Desktop) === */
#navbar {
  display: flex;
  align-items: center;
  background-color: var(--navbar-bg);
  box-shadow: var(--navbar-shadow);
  padding: 0.4rem 0.6rem;
  /* Padding inside the pill, around the ul/toggle */
  position: sticky;
  top: 10px;
  /* Adjust to give some space from the top of the viewport */
  z-index: 1000;
  box-sizing: border-box;

  /* Pill shape and centering for desktop */
  width: fit-content;
  max-width: calc(100% - 2rem);
  /* Ensure it doesn't touch screen edges */
  margin: 1rem auto;
  /* Center the pill */
  border-radius: var(--pill-border-radius);
}

#navbar ul {
  display: flex;
  align-items: center;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: nowrap;
  /* Keep items in one line on desktop */
}

#navbar ul li {
  position: relative;
  /* For dividers */
}

/* Style for #nav-home to act as a logo area on desktop */
#navbar #nav-home {
  font-weight: var(--logo-font-weight);
  padding-left: calc(var(--link-padding-horizontal) * 1.2);
  padding-right: var(--link-padding-horizontal);
  color: var(--text-color-nav);
  /* Ensure base color */
}

/* Optional: If you add an icon to your logo link */
#navbar #nav-home svg,
#navbar #nav-home img {
  margin-right: 0.4em;
  vertical-align: middle;
  height: 1.1em;
  /* Adjust icon size */
}


/* General link styling inside the pill */
#navbar ul li a {
  color: var(--text-color-nav);
  font-weight: 500;
  text-decoration: none;
  padding: var(--link-padding-vertical) var(--link-padding-horizontal);
  display: block;
  white-space: nowrap;
  transition: color var(--transition-speed) ease, background-color var(--transition-speed) ease;
  border-radius: 0;
  /* Links are not individually rounded */
  background-color: transparent;
}

/* Dividers between li elements (inspired by "eco" image) */
#navbar ul li:not(:first-child)::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 1em;
  /* Adjust height of divider */
  background-color: var(--navbar-divider-color);
}

#navbar ul li a:hover,
#navbar ul li a:focus-visible {
  color: var(--text-color-nav-hover);
  background-color: rgba(0, 0, 0, 0.03);
  /* Very subtle hover */
}

#navbar ul li a.active {
  color: var(--text-color-nav-hover);
  font-weight: 600;
}

/* Gamification Styles in Navbar (Desktop Pill) */

.gamification-nav span {
  font-weight: 500;
  color: var(--gamification-text-nav);
  padding: var(--link-padding-vertical) var(--link-padding-horizontal);
  background-color: var(--gamification-bg-nav);
  font-size: 0.9em;
  /* Slightly smaller */
  white-space: nowrap;
  display: block;
  /* Consistent with links */
  border-radius: 0;
}


/* === Hamburger Menu Toggle Button === */
.menu-toggle {
  display: none;
  /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  margin-left: auto;
  /* Pushes toggle to the right if other direct children in #navbar */
  z-index: 1010;
  /* Above other nav elements if they overlap */
  order: 2;
  /* Ensures it comes after the logo if logo is direct child */
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--text-color-nav);
  margin: 4px 0;
  transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
  border-radius: 1px;
}

/* Hamburger animation when .nav-open is on #navbar */
#navbar.nav-open .menu-toggle span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

#navbar.nav-open .menu-toggle span:nth-child(2) {
  opacity: 0;
}

#navbar.nav-open .menu-toggle span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}


/* === Responsive Adjustments (Mobile Menu) === */
/* Adjust this breakpoint as needed (e.g., 992px or 768px) */
@media (max-width: 900px) {

  /* Breakpoint where pill might get too crowded */
  #navbar {
    width: 100%;
    max-width: 100%;
    top: 0;
    /* Stick to the very top on mobile */
    margin: 0;
    border-radius: 0;
    /* Square edges for full-width mobile nav */
    padding: 0.5rem 1rem;
    /* Typical mobile header padding */
    justify-content: space-between;
    /* For logo (if separate) and hamburger */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    /* Standard mobile header shadow */
  }

  /* Hide the main UL on mobile by default; show hamburger */
  #navbar ul {
    display: none;
    /* Hidden by default */
    flex-direction: column;
    position: absolute;
    top: 100%;
    /* Position below the navbar */
    left: 0;
    width: 100%;
    background-color: var(--navbar-bg);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    /* Dropdown shadow */
    padding: 0.5rem 0;
    /* Padding for the dropdown container */
    margin: 0;
    z-index: 1000;
    /* Ensure dropdown is on top of content */
    border-bottom-left-radius: 8px;
    /* Optional: slight rounding for dropdown */
    border-bottom-right-radius: 8px;
    max-height: calc(100vh - 60px);
    /* Limit height and allow scrolling if many items */
    overflow-y: auto;
  }

  #navbar.nav-open ul {
    display: flex;
    /* Show when .nav-open is on #navbar */
  }

  .menu-toggle {
    display: block;
    /* Show hamburger icon */
  }

  /* Style items in the mobile dropdown */
  #navbar ul li {
    width: 100%;
    border-right: none;
    /* Remove desktop dividers */
  }

  #navbar ul li::before {
    display: none;
    /* Hide pseudo-element dividers */
  }

  #navbar ul li a,
  #navbar .gamification-nav span {
    padding: 0.9rem 1.5rem;
    /* Make mobile links easy to tap */
    display: block;
    width: 100%;
    box-sizing: border-box;
    border-radius: 0;
    text-align: left;
    font-weight: 500;
    /* Consistent weight */
  }

  #navbar ul li a:hover,
  #navbar .gamification-nav span:hover {
    /* Hover for items in dropdown */
    background-color: var(--bg-nav-hover, #f5f5f5);
    /* Use variable or default */
  }


}

/* Further adjustments for very small screens if needed */
@media (max-width: 480px) {
  #navbar {
    padding: 0.4rem 0.8rem;
    /* Slightly less padding */
  }

  #navbar ul li a,
  #navbar .gamification-nav span {
    padding: 0.8rem 1.2rem;
    /* Adjust tap target size */
  }
}

/* === GLOBAL OVERRIDES (add near the top) === */
#app { max-width: none; width: 100%; }             /* allow full-bleed sections */
body { overflow-x: hidden; }                       /* prevent stray horizontal scroll */

/* ============================================================================
   05. Landing Page (FULL-BLEED, animated waves, fancy hovers)
   ============================================================================ */
:root{
  --primary:#0969da;        /* blue */
  --primary-600:#044289;
  --secondary:#2ea44f;      /* green */
  --secondary-700:#22863a;
  --ink:#0f172a;
  --muted:#f1f5f9;
  --bg:#ffffff;

  --accent-1:#7dd3fc;       /* sky */
  --accent-2:#86efac;       /* green */
  --accent-3:#c7d2fe;       /* indigo */
  --glass:white;
  --glass-brd:rgba(9,105,218,.12);

  --shadow-1: 0 10px 30px rgba(9,105,218,.12);
  --shadow-2: 0 16px 44px rgba(9,105,218,.18);
  --shadow-glow: 0 14px 42px rgba(9,105,218,.28);

  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 10px;

  --hover-scale: 1.035;
}

/* Make only the landing page full-bleed (does not affect other pages) */
#landing-page.full-bleed{
  max-width:none; margin:0; padding:0; background:transparent;
  border-radius:0; box-shadow:none; position:relative;
}
/* Prevent nested scroll in landing page */
#landing-page.full-bleed .page{ overflow:visible; }

/* HERO */
#hero-section{
  width:100%; position:relative;
  padding: clamp(72px, 12vh, 140px) 5% 0;
  background: linear-gradient(180deg,#f6fbff 0%,#ffffff 80%);
}
.hero-inner{
  display:grid; grid-template-columns:1.1fr .9fr;
  gap: clamp(28px, 6vw, 60px);
  align-items:center; max-width:1280px; margin-inline:auto;
}
h1{
  font-family:Poppins, Inter, ui-sans-serif;
  font-size:clamp(32px,5vw,60px); line-height:1.1; margin:12px 0 12px;
}
.hero-tagline{ font-size:clamp(16px,2.2vw,20px); color:#334155; margin:0 0 22px; }
.pill-badge{
  display:inline-flex; align-items:center; gap:8px; font-size:14px; color:#075985;
  background: linear-gradient(90deg,#e6f3ff,#e7fce9);
  border:1px solid rgba(9,105,218,.25);
  padding:8px 14px; border-radius:9999px;
  box-shadow:0 2px 8px rgba(9,105,218,.08);
}

.hero-buttons{ display:flex; gap:14px; margin:10px 0 16px; }
.button{
  --pad:12px 18px;
  display:inline-flex; align-items:center; gap:10px;
  padding:var(--pad); border-radius:14px;
  text-decoration:none; font-weight:700;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease, filter .25s ease, color .25s ease, border-color .25s ease;
  will-change: transform, filter;
  position:relative; overflow:hidden;
}
.button i{ font-size:.95em; }
.button:active{ transform: translateY(1px); }
.button:focus-visible{ outline:3px solid #93c5fd; outline-offset:2px; border-radius:14px; }

/* Primary: gradient + glow + sheen on hover */
.primary-button{
  background: linear-gradient(180deg,var(--primary) 0%,#0a5ec0 100%);
  color:#fff; box-shadow:var(--shadow-1);
}
.primary-button::after{
  content:""; position:absolute; inset:-2px;
  background: linear-gradient(120deg,transparent 35%,rgba(255,255,255,.35) 50%,transparent 65%);
  transform: translateX(-130%); transition: transform .6s ease;
  pointer-events:none;
}
.primary-button:hover{
  transform: translateY(-2px) scale(1.02);
  box-shadow:var(--shadow-2);
  filter: drop-shadow(0 10px 16px rgba(9,105,218,.25));
}
.primary-button:hover::after{ transform: translateX(130%); }

/* Secondary: pill with tint + color shift on hover */
.secondary-button{
  background:#ecfdf5; color:#065f46; border:1px solid #a7f3d0;
}
.secondary-button:hover{
  background:#d1fae5; color:#065f46; transform: translateY(-2px) scale(1.02);
  box-shadow:0 8px 22px rgba(16,185,129,.18);
}

/* Extra utility hover styles if you want to reuse */
.button.is-ghost{
  background:#ffffff; color:var(--primary);
  border:1px solid rgba(9,105,218,.25);
}
.button.is-ghost:hover{
  background:#f0f9ff; color:#0b5cc3; transform: translateY(-2px);
}

/* Checklist */
.hero-checklist{
  margin:18px 0 0; padding:0; list-style:none;
  display:grid; gap:8px; color:#334155;
}
.hero-checklist i{ color:var(--secondary); margin-right:8px; }

/* Illustration float */
.hero-image{ position:relative; display:grid; place-items:center; }
.hero-image img{
  width:100%; height:auto; transform:translateZ(0);
  animation: floatY 7s ease-in-out infinite;
  filter: drop-shadow(0 28px 28px rgba(2,132,199,.15));
}
@keyframes floatY{ 0%,100%{transform:translateY(0)} 50%{transform:translateY(-10px)} }

/* Soft animated blobs */
.hero-ornament{
  position:absolute; z-index:-1; pointer-events:none; opacity:.45; filter: blur(30px);
}
.hero-ornament--one{
  width:420px; height:420px; border-radius:50%;
  background:
    radial-gradient(closest-side at 30% 30%, #dff1ff, transparent 60%),
    radial-gradient(closest-side at 75% 70%, #eafff3, transparent 60%);
  left:-120px; top:-100px; animation: blobMove 18s ease-in-out infinite;
}
.hero-ornament--two{
  width:360px; height:360px; border-radius:50%;
  background:
    radial-gradient(closest-side at 65% 40%, #eafff3, transparent 60%),
    radial-gradient(closest-side at 20% 80%, #e6f3ff, transparent 60%);
  right:-120px; bottom:40px; animation: blobMove 22s ease-in-out infinite reverse;
}
@keyframes blobMove{ 0%,100%{transform:translate(0,0) scale(1)} 50%{transform:translate(20px,-12px) scale(1.05)} }

/* Waves container attaches to bottom of hero */
.animated-waves{
  position:absolute; left:0; right:0; bottom:-2px;
  width:100%; height:160px; pointer-events:none; overflow:hidden;
}

/* FEATURES */
#features-section{ padding:80px 0 10px; }
#features-section h2,
#how-it-works-section h2,
#testimonials-section h2,
#faq-section h2{
  font-family:Poppins, Inter, ui-sans-serif; text-align:center;
  font-size:clamp(26px,3.2vw,36px); margin:0 0 26px;
}
.features-grid{
  display:grid; grid-template-columns:repeat(4,minmax(0,1fr));
  gap:clamp(14px, 2.4vw, 22px); max-width:1200px; margin-inline:auto;
}
.feature-item{
  position:relative; overflow:hidden;
  border-radius:var(--radius-lg); padding:22px;
  box-shadow:0 6px 18px rgba(2,132,199,.08);
  transition: transform .28s ease, box-shadow .28s ease, filter .28s ease, background .28s ease, border-color .28s ease;
  /* Gradient border technique */
  background:
    linear-gradient(#fff,#fff) padding-box,
    linear-gradient(135deg, rgba(9,105,218,.16), rgba(46,164,79,.16)) border-box;
  border:1px solid transparent;
}
.feature-item::after{
  content:""; position:absolute; inset:-40%;
  background: radial-gradient(40% 40% at 30% 20%, rgba(125,211,252,.18), transparent 60%),
             radial-gradient(30% 30% at 80% 80%, rgba(134,239,172,.18), transparent 60%);
  opacity:0; transform: scale(.9); transition: opacity .4s ease, transform .4s ease;
  pointer-events:none;
}
.feature-item:hover{
  transform: translateY(-6px) scale(var(--hover-scale));
  box-shadow:0 18px 46px rgba(9,105,218,.18);
  border-color: transparent;
  background:
    linear-gradient(#ffffff,#ffffff) padding-box,
    linear-gradient(135deg, rgba(9,105,218,.35), rgba(46,164,79,.35)) border-box;
  filter:saturate(1.06);
}
.feature-item:hover::after{ opacity:1; transform: scale(1); }
.feature-item:active{ transform: translateY(-2px) scale(1.01); }
.feature-item .feature-icon{
  display:inline-grid; place-items:center; width:54px; height:54px; border-radius:14px;
  background: linear-gradient(180deg,#e6f3ff,#ecfff4);
  margin-bottom:10px; box-shadow: inset 0 0 0 1px rgba(9,105,218,.12);
  transition: transform .25s ease, filter .25s ease;
}
.feature-item:hover .feature-icon{ transform: translateY(-2px) scale(1.08) rotate(-2deg); filter:saturate(1.1); }
.feature-item h3{ margin:6px 0 6px; font-size:18px; }
.feature-item p{ margin:0; color:#475569; font-size:15px; }

/* HOW IT WORKS */
#how-it-works-section{ padding:60px 0; }
.steps-grid{
  display:grid; grid-template-columns:repeat(3,minmax(0,1fr));
  gap:clamp(16px, 2.8vw, 28px); max-width:1100px; margin-inline:auto;
}
.step{
  background:linear-gradient(180deg,#ffffff,#fbfdff);
  border:1px solid rgba(46,164,79,.16);
  border-radius:var(--radius-lg); padding:22px 20px;
  box-shadow:0 6px 18px rgba(46,164,79,.08);
  transition: transform .28s ease, box-shadow .28s ease, background .28s ease;
}
.step:hover{
  transform: translateY(-6px) scale(var(--hover-scale));
  box-shadow:0 18px 44px rgba(46,164,79,.22);
  background:linear-gradient(180deg,#ffffff,#f3fff9);
}
.step-number{
  width:36px; height:36px; border-radius:50%; display:grid; place-items:center;
  font-weight:700; color:#fff; background:var(--secondary); margin-bottom:10px;
}

/* STATS */
#stats-section{ padding:20px 0 60px; }
.stats-grid{
  display:grid; grid-template-columns:repeat(4,minmax(0,1fr));
  gap:clamp(14px, 2.4vw, 22px); max-width:1100px; margin-inline:auto;
}
.lp-stat{
  position:relative; overflow:hidden;
  background:#fff; border:1px solid rgba(15,23,42,.08); border-radius:var(--radius-lg);
  padding:22px 20px; text-align:center; box-shadow:0 6px 18px rgba(2,132,199,.08);
  transition: transform .28s ease, box-shadow .28s ease, background .28s ease;
}
.lp-stat::before{
  content:""; position:absolute; inset:-30%;
  background: radial-gradient(50% 50% at 20% 30%, rgba(199,210,254,.22), transparent 60%);
  opacity:0; transform: scale(.85); transition: opacity .35s ease, transform .35s ease;
}
.lp-stat:hover{
  transform: translateY(-6px) scale(1.03);
  box-shadow: var(--shadow-2);
  background: linear-gradient(180deg,#ffffff,#f7fbff);
}
.lp-stat:hover::before{ opacity:1; transform: scale(1); }
.lp-stat__value{
  display:block; font-family:Poppins, Inter; font-size:clamp(26px,4.2vw,40px);
  font-weight:800; color:var(--primary-600);
}
.lp-stat__label{ color:#475569; font-size:14px; }

/* ===========================
   TESTIMONIALS – Styles
   =========================== */
:root{
  /* fallbacks (won’t override your existing if already set) */
  --primary:#0969da;
  --ink:#0f172a;
  --muted:#f1f5f9;
  --radius-lg:22px;
  --radius-md:14px;
  --shadow-1:0 6px 18px rgba(2,132,199,.12);
  --shadow-2:0 10px 28px rgba(2,132,199,.18);
}

#testimonials-section{
  padding:48px 0 96px;
}
#testimonials-section .testi-head{
  text-align:center;
  margin-bottom:18px;
}
#testimonials-section h2{
  margin:0 0 6px;
}
.testi-subtitle{
  color:#475569;
  font-size:0.975rem;
}

/* Slider frame */
.testi-slider{
  position:relative;
  background: linear-gradient(180deg,#ffffff, #f8fbff);
  border:1px solid rgba(9,105,218,.12);
  border-radius:var(--radius-lg);
  box-shadow: var(--shadow-1);
  padding:22px 56px 14px;
  max-width:1180px;
  margin-inline:auto;
  overflow:hidden;
}

/* Viewport with snap */
.testi-viewport{
  display:flex;
  gap:16px;
  overflow-x:auto;
  scroll-snap-type:x mandatory;
  scroll-padding-inline:56px;
  padding: 8px 0 10px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.testi-viewport::-webkit-scrollbar{
  height:10px;
}
.testi-viewport::-webkit-scrollbar-track{
  background: #eef5ff;
  border-radius:9999px;
}
.testi-viewport::-webkit-scrollbar-thumb{
  background: rgba(9,105,218,.35);
  border-radius:9999px;
}

/* Cards */
.testi-card{
  position:relative;
  flex:0 0 88%;
  scroll-snap-align: center;
  border-radius: 18px;
  padding: 18px 18px 16px;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255,255,255,.9), rgba(255,255,255,.92)) padding-box,
    linear-gradient(135deg, rgba(9,105,218,.35), rgba(46,164,79,.35)) border-box;
  border:1px solid transparent;
  box-shadow: 0 8px 24px rgba(15,23,42,.06);
  backdrop-filter: blur(8px);
  transform: translateZ(0);
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s;
}
.testi-card:hover{
  transform: translateY(-3px);
  box-shadow: var(--shadow-2);
}
@media (min-width:640px){ .testi-card{ flex-basis: 60%; } }
@media (min-width:900px){ .testi-card{ flex-basis: 48%; } }
@media (min-width:1200px){ .testi-card{ flex-basis: 32%; } }

/* Card bits */
.testi-topline{
  display:flex; align-items:center; justify-content:space-between;
  margin-bottom:8px; gap:8px; flex-wrap:wrap;
}
.chip{
  --chip-bg:#e8f2ff;
  display:inline-flex; align-items:center; gap:8px;
  padding:6px 10px; border-radius:9999px; font-size:.8rem;
  background: var(--chip-bg);
  color:#0b4da3;
  border:1px solid rgba(9,105,218,.15);
}
.chip-green{ --chip-bg:#e9f9f1; color:#0d7a4e; border-color: rgba(16,185,129,.2); }
.chip-amber{ --chip-bg:#fff4e5; color:#9a5b00; border-color: rgba(245,158,11,.25);}
.chip-blue{ --chip-bg:#e6f6ff; color:#0a5c9d; }
.chip-purple{ --chip-bg:#f2eaff; color:#6b21a8; border-color: rgba(139,92,246,.25);}
.chip-rose{ --chip-bg:#ffe8ee; color:#a1153a; border-color: rgba(244,63,94,.25);}

.when{ color:#64748b; font-size:.8rem; display:inline-flex; align-items:center; gap:6px; }

.testi-stars{
  margin:6px 0 8px; letter-spacing:.5px;
  color:#f59e0b;  /* amber-500 */
  display:inline-flex; gap:2px; font-size:1.05rem;
}
.testi-stars .fa-regular{ color:#e2e8f0; }

.testi-quote{
  margin:6px 0 12px;
  line-height:1.55;
  font-size:1rem;
}
.testi-quote .fa-quote-left{
  margin-right:8px; color:#94a3b8;
}

.testi-meta{
  display:flex; align-items:center; gap:12px; justify-content:space-between; flex-wrap:wrap;
  border-top:1px dashed #e2e8f0; padding-top:10px;
}
.avatar{
  width:36px; height:36px; border-radius:50%;
  position:relative; flex:0 0 auto;
  background: radial-gradient(120% 120% at 30% 30%, #e0f2fe 0%, #c7f9cc 45%, #e9d5ff 100%);
  box-shadow: inset 0 0 0 2px #fff, 0 3px 8px rgba(2,132,199,.2);
}
.avatar::after{
  content: attr(data-initials);
  position:absolute; inset:0; display:grid; place-items:center;
  font-weight:700; color:#0f172a; font-size:.9rem;
}
.who{ display:flex; flex-direction:column; line-height:1.2; min-width:0; }
.name{ font-weight:600; }
.verified{ color:#22c55e; font-size:.9em; vertical-align:middle; margin-left:4px; }
.loc{ color:#64748b; font-size:.85rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.footnote{ margin-left:auto; color:#475569; font-size:.85rem; display:flex; align-items:center; gap:6px; }

/* Arrows */
.testi-nav{
  position:absolute; top:50%; transform:translateY(-50%); z-index:2;
  width:42px; height:42px; border-radius:50%;
  display:grid; place-items:center;
  background:#fff; border:1px solid rgba(9,105,218,.18);
  box-shadow: var(--shadow-1);
  color:#0f172a;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.testi-prev{ left:12px; }
.testi-next{ right:12px; }
.testi-nav:hover{ transform:translateY(-50%) translateY(-2px); box-shadow: var(--shadow-2); }
@media (max-width:640px){ .testi-nav{ display:none; } } /* hide arrows on small screens */

/* Dots */
.testi-dots{
  display:flex; gap:8px; justify-content:center; padding:10px 0 0;
}
.testi-dot{
  width:9px; height:9px; border-radius:50%; border:none; background:#cbd5e1; cursor:pointer;
  display:inline-block; transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
  outline: none;
}
.testi-dot:focus-visible{ box-shadow:0 0 0 3px rgba(9,105,218,.3); }
.testi-dot:hover{ transform: scale(1.18); background:var(--primary); }

/* Active dot states using :target (+ default t1 when none targeted) */
.testi-slider:not(:has(.testi-card:target)) .testi-dots a[href="#t1"],
.testi-slider:has(#t1:target) .testi-dots a[href="#t1"],
.testi-slider:has(#t2:target) .testi-dots a[href="#t2"],
.testi-slider:has(#t3:target) .testi-dots a[href="#t3"],
.testi-slider:has(#t4:target) .testi-dots a[href="#t4"],
.testi-slider:has(#t5:target) .testi-dots a[href="#t5"],
.testi-slider:has(#t6:target) .testi-dots a[href="#t6"]{
  background: var(--primary);
  transform: scale(1.25);
}

/* Arrow routing visibility based on :target (default = t1) */
.testi-slider .nav-1, .testi-slider .nav-2, .testi-slider .nav-3,
.testi-slider .nav-4, .testi-slider .nav-5, .testi-slider .nav-6{ display:none; }
.testi-slider:not(:has(.testi-card:target)) .nav-1{ display:block; } /* default behaves like t1 targeted */
.testi-slider:has(#t1:target) .nav-1{ display:block; }
.testi-slider:has(#t2:target) .nav-2{ display:block; }
.testi-slider:has(#t3:target) .nav-3{ display:block; }
.testi-slider:has(#t4:target) .nav-4{ display:block; }
.testi-slider:has(#t5:target) .nav-5{ display:block; }
.testi-slider:has(#t6:target) .nav-6{ display:block; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  .testi-card, .testi-nav, .testi-dot{ transition: none !important; }
  .testi-viewport{ scroll-behavior: auto; }
}

/* Screen-reader only utility */
.sr-only{
  position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0;
}
:root{
  --primary:#0969da;
  --ink:#0f172a;
  --muted:#f1f5f9;
  --radius-lg:22px;
  --shadow-1:0 6px 18px rgba(2,132,199,.12);
  --shadow-2:0 10px 28px rgba(2,132,199,.18);
}

#testimonials-section{ padding:48px 0 96px; }
.testi-head{ text-align:center; margin-bottom:18px; }
.testi-subtitle{ color:#475569; font-size:.975rem; }

.testi-slider{
  position:relative;
  background: linear-gradient(180deg,#ffffff, #f8fbff);
  border:1px solid rgba(9,105,218,.12);
  border-radius:var(--radius-lg);
  box-shadow: var(--shadow-1);
  padding:22px 56px 14px;
  max-width:1180px;
  margin-inline:auto;
  overflow:hidden;
}

.testi-viewport{
  display:flex; gap:16px;
  overflow-x:auto;
  scroll-snap-type:x mandatory;
  padding:8px 0 10px;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:none;
}
.testi-viewport::-webkit-scrollbar{ display:none; }

.testi-card{
  flex:0 0 88%;
  scroll-snap-align:center;
  border-radius:18px;
  padding:18px;
  background:#fff;
  border:1px solid rgba(0,0,0,.05);
  box-shadow:0 8px 24px rgba(15,23,42,.06);
  transition:.3s;
}
.testi-card:hover{ transform:translateY(-3px); box-shadow: var(--shadow-2); }
@media(min-width:640px){ .testi-card{ flex-basis:60%; } }
@media(min-width:900px){ .testi-card{ flex-basis:48%; } }
@media(min-width:1200px){ .testi-card{ flex-basis:32%; } }

.testi-topline{ display:flex; justify-content:space-between; margin-bottom:8px; flex-wrap:wrap; gap:8px; }
.chip{ padding:6px 10px; border-radius:9999px; font-size:.8rem; background:#e8f2ff; }
.chip-green{ background:#e9f9f1; }
.chip-amber{ background:#fff4e5; }
.chip-blue{ background:#e6f6ff; }
.chip-purple{ background:#f2eaff; }
.chip-rose{ background:#ffe8ee; }
.when{ font-size:.8rem; color:#64748b; }

.testi-stars{ color:#f59e0b; margin:6px 0; }
.testi-stars .fa-regular{ color:#e2e8f0; }

.testi-quote{ margin:6px 0 12px; font-size:1rem; line-height:1.5; }
.testi-meta{ display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; border-top:1px dashed #e2e8f0; padding-top:10px; }
.avatar{ width:36px; height:36px; border-radius:50%; background:#c7f9cc; display:grid; place-items:center; font-weight:700; color:#0f172a; }

.testi-nav{
  position:absolute; top:50%; transform:translateY(-50%);
  width:44px; height:44px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  background:#fff; border:1px solid rgba(9,105,218,.2);
  box-shadow: var(--shadow-1); font-size:1.1rem; cursor:pointer;
}
.testi-prev{ left:12px; }
.testi-next{ right:12px; }

.testi-dots{ display:flex; gap:8px; justify-content:center; padding-top:12px; }
.testi-dot{
  width:10px; height:10px; border-radius:50%;
  background:#cbd5e1; cursor:pointer; border:none;
}
.testi-dot.active{ background:var(--primary); transform:scale(1.2); }

.sr-only{ position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); }


/* FAQ (full width band) */
#faq-section{ width:100%; background:#f8fafc; padding:80px 20px; }
.faq-list{ max-width:880px; margin:0 auto; display:grid; gap:16px; }
.faq-item{
  border:1px solid rgba(15,23,42,.1); border-radius:var(--radius-md); background:#fff;
  box-shadow:0 4px 10px rgba(0,0,0,.04); overflow:hidden; transition: box-shadow .25s ease, transform .25s ease;
}
.faq-item:hover{ transform: translateY(-2px); box-shadow:0 10px 26px rgba(15,23,42,.12); }
.faq-question{
  width:100%; text-align:left; padding:16px 20px; background:none; border:none; font-size:16px; font-weight:600;
  display:flex; justify-content:space-between; align-items:center; cursor:pointer;
}
.faq-answer{ max-height:0; overflow:hidden; transition:max-height .4s ease, padding .4s ease; padding:0 20px; }
.faq-item.open .faq-answer{ max-height:200px; padding:12px 20px 18px; }
.faq-item.open .faq-question i{ transform: rotate(180deg); }

/* CTA (full width band) — upgraded styling */
#cta-section{
  width:100%; position:relative; overflow:hidden; color:#fff; text-align:center;
  padding:120px 20px 96px;
  background:
    radial-gradient(1200px 600px at 10% 10%, rgba(0, 170, 248, 0.993), transparent 60%),
    radial-gradient(900px 500px at 90% 20%, rgb(0, 255, 94), transparent 60%),
    linear-gradient(135deg, var(--primary) 0%, var(--accent-3) 100%);
  isolation:isolate;
}
#cta-section::before{
  /* soft rotating glow ring */
  content:""; position:absolute; width:900px; height:900px; left:-200px; bottom:-320px;
  background: conic-gradient(from 0deg, rgba(255,255,255,.18), transparent 40%, rgba(255,255,255,.18), transparent 80%, rgba(255,255,255,.18));
  filter: blur(22px); opacity:.45; border-radius:50%;
  animation: spinSlow 24s linear infinite;
  pointer-events:none; z-index:0;
}
#cta-section::after{
  /* subtle noise / sheen layer */
  content:""; position:absolute; inset:0;
  background: linear-gradient(0deg, rgba(255,255,255,.06), rgba(255,255,255,0) 60%);
  mix-blend-mode: soft-light; opacity:.65; pointer-events:none; z-index:0;
}
@keyframes spinSlow{ to{ transform:rotate(360deg); } }

.cta-content{ max-width:960px; margin:0 auto; position:relative; z-index:1; }
#cta-section h2{ font-size:clamp(26px,4vw,42px); margin:0 0 16px; }
#cta-section p{ font-size:18px; margin:0 0 26px; color:rgba(255,255,255,.92); }

/* CTA buttons with outline + sheen */
.cta-buttons{ display:flex; justify-content:center; gap:18px; flex-wrap:wrap; }
#cta-section .button{ box-shadow:0 10px 28px rgba(0,0,0,.18); border:1px solid rgba(255,255,255,.28); }
#cta-section .primary-button{
  background: linear-gradient(180deg, rgba(18, 55, 224, 0.836), rgba(16, 121, 241, 0.08)) padding-box,
              linear-gradient(120deg, #04003f, rgb(1, 60, 255)) border-box;
  border:1px solid transparent; color:#fff;
}
#cta-section .primary-button:hover{
  box-shadow: var(--shadow-glow);
  transform: translateY(-3px) scale(1.03);
}
#cta-section .secondary-button{
    background: linear-gradient(180deg, rgba(1, 156, 53, 0.836), rgb(60, 255, 0)) padding-box,
              linear-gradient(120deg, #00ff0d, rgb(4, 112, 0)) border-box;
  border:1px solid transparent; color:#fff;
}
#cta-section .secondary-button:hover{
    box-shadow: var(--shadow-glow);
  transform: translateY(-3px) scale(1.03);
}

/* optional wavy white divider at top of CTA */
.wave-divider-top{ position:absolute; top:0; left:0; width:100%; height:80px; fill:#fff; opacity:.95; }

/* Micro-interactions */
.hover-tilt:hover{ transform: translateY(-6px) rotateZ(.2deg); }
.hover-raise:hover{ transform: translateY(-6px); }

/* Responsive */
@media (max-width:1040px){
  .hero-inner{ grid-template-columns:1fr; text-align:left; }
  .hero-image{ order:2; } .hero-content{ order:1; }
  .features-grid{ grid-template-columns:repeat(2,minmax(0,1fr)); }
  .stats-grid{ grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:640px){
  .features-grid, .steps-grid, .stats-grid{ grid-template-columns:1fr; }
  .testi-slider{ padding:16px 44px; }
}

/* Motion safety */
@media (prefers-reduced-motion:reduce){
  *{ animation-duration:.001ms !important; animation-iteration-count:1 !important; transition-duration:.001ms !important; }
}



/* ============================================================================
   06. Login & Registration Pages
   ============================================================================ */
#login-page,
#register-page {
  max-width: 450px;
  /* Keep smaller max-width */
  margin: 3rem auto;
  /* More top margin */
  padding: 2.5rem;
  /* More padding */
  /* Inherits .page styles for background, shadow, border-radius */
}

#login-page h1,
#register-page h1 {
  margin-bottom: 2rem;
  text-align: center;
  color: var(--primary-color);
}

#login-page form,
#register-page form {
  display: flex;
  flex-direction: column;
  align-items: center;
  /* Center form elements */
  width: 100%;
}

#login-page input,
#login-page button,
#register-page input,
#register-page button {
  width: 100%;
  /* Make inputs/button full width */
  margin-bottom: 1rem;
  /* Consistent spacing */
}

#login-page p,
#register-page p {
  text-align: center;
  margin-top: 1rem;
  color: var(--muted-color);
}

#login-page p a,
#register-page p a {
  font-weight: 500;
}

#login-page button {
  background-color: var(--secondary-color);
  color: var(--white);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

#login-page button:hover {
  background-color: var(--secondary-dark);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

#login-page button:active {
  transform: scale(0.98);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

#register-page button {
  background-color: var(--primary-color);
  color: var(--white);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

#register-page button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 200%;
  height: 100%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0));
  transform: skewX(-45deg);
  transition: left 0.3s ease;
}

#register-page button:hover::before {
  left: 100%;
}

#register-page button:hover {
  background-color: var(--primary-dark);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

#register-page button:active {
  transform: scale(0.98);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}


/* ============================================================================
   07. Admin Dashboard
   ============================================================================ */

/* Inherits .page styles */
#admin-page {
  background: linear-gradient(120deg, #f9f9f9, #f0f0f0);
  min-height: 100vh;
}

.admin-container {
  max-width: 100%;
  /* Use full width within page padding */
  /* background: var(--white); */
  /* Handled by .page */
  /* padding: 2rem; */
  /* Handled by .page */
  /* border-radius: var(--border-radius); */
  /* Handled by .page */
  /* box-shadow: var(--shadow-light); */
  /* Handled by .page */
  /* animation: fadeIn 0.8s ease-out forwards; */
  /* Handled by .page */
}

#admin-page h1 {
  /* Dashboard Title */
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 2rem;
  text-align: center;
}

/* --- Compact Analytics --- */
.admin-analytics {
  display: grid;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

/* KPI Row */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.kpi-card {
  position: relative;
  border-radius: var(--border-radius);
  padding: 1rem 1rem 0.5rem;
  color: #fff;
  overflow: hidden;
  box-shadow: var(--shadow-light);
  min-height: 120px;
  display: grid;
  grid-template-rows: auto auto auto 34px;
  align-items: start;
}

.kpi-card .kpi-title {
  font-size: .9rem;
  opacity: .95;
  letter-spacing: .2px;
}

.kpi-card .kpi-value {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.2;
  margin-top: .25rem;
}

.kpi-card .kpi-delta {
  font-size: .85rem;
  margin-top: .15rem;
  opacity: .95;
}

.kpi-card .kpi-delta.subtle { opacity: .8; }
.kpi-card .kpi-foot {
  font-size: .8rem;
  opacity: .9;
}

/* Mini sparklines (Chart.js) */
.kpi-card canvas {
  width: 100% !important;
  border-bottom-left-radius: var(--border-radius);
  border-bottom-right-radius: var(--border-radius);
  background: rgba(255,255,255,.12);
}

/* Fun gradients */
.kpi-blue   { background: linear-gradient(135deg, var(--primary-color, #0969da), #0284c7); }
.kpi-amber  { background: linear-gradient(135deg, #fbbf24, #f59e0b); }
.kpi-green  { background: linear-gradient(135deg, var(--secondary-color, #2ea44f), #059669); }
.kpi-purple { background: linear-gradient(135deg, #a78bfa, #7c3aed); }
.kpi-teal   { background: linear-gradient(135deg, #22d3ee, #06b6d4); }

/* Tabbed charts */
.chart-tabs {
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
  padding: .75rem .75rem 1rem;
}

.chart-tabs .tabs {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: .5rem;
}

.chart-tabs .tab {
  border: 1px solid var(--border-color);
  background: #fff;
  padding: .4rem .75rem;
  border-radius: 999px;
  font-size: .9rem;
  cursor: pointer;
  transition: all .2s ease;
}

.chart-tabs .tab:hover {
  border-color: var(--primary-color);
}

.chart-tabs .tab.active {
  background: linear-gradient(135deg, var(--primary-color, #0969da), #0284c7);
  color: #fff;
  border-color: transparent;
}

.chart-tabs .tab-panels .panel {
  padding: .5rem;
}

.chart-tabs .tab-panels .panel.hidden {
  display: none;
}

/* Make charts compact but readable */
.chart-tabs canvas {
  width: 100% !important;
  height: 260px !important;
}

/* Reuse subtle text */
.subtle-text {
  font-size: 0.9rem;
  color: var(--muted-color);
  text-align: center;
  margin: .25rem 0 .5rem;
}

/* Reduce earlier big chart card spacing if any remain elsewhere */
.chart-card { margin: 0; padding: 0; box-shadow: none; background: transparent; }


/* Admin Reports Section */
.admin-reports h2 {
  font-size: 1.5rem;
  color: var(--text-color);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

#admin-map {
  height: 400px;
  width: 100%;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
}

/* Admin Actions & Filters */
.admin-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem;
  background-color: #f8f9fa;
  /* Light background for controls */
  border-radius: var(--border-radius);
}

.admin-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  /* Reduced gap */
  align-items: center;
}

.admin-filters label {
  font-weight: 500;
  margin-right: 0.3rem;
  font-size: 0.9rem;
}

.admin-filters select {
  padding: 0.5rem 2rem 0.5rem 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: var(--input-radius);
  background-color: var(--white);
  font-size: 0.9rem;
  /* Smaller font */
  min-width: 120px;
  /* Adjust min width */
  appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="5" fill="%23586069"><path d="M0 0l5 5 5-5z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 0.7rem top 50%;
}

.admin-filters select:hover,
.admin-filters select:focus {
  border-color: var(--primary-color);
  outline: none;
}

.admin-filters button {
  padding: 0.5rem 1rem;
  /* Match select padding */
  font-size: 0.9rem;
}

.admin-actions>button {
  /* Style top-level action buttons */
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}


/* Admin Reports List */
#admin-reports-container {
  padding: 0;
  /* Remove default list padding */
}

#admin-reports-container li {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-light);
  transition: all 0.3s ease;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  /* Adjust gap */
  position: relative;
  overflow: hidden;
}

#admin-reports-container li:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-medium);
  border-color: var(--primary-color);
}

.report-content {
  flex: 1;
  min-width: 250px;
}

/* Allow content to grow */
.report-content h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  color: var(--primary-color);
}

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

.report-content img.report-image {
  /* Ensure class is used */
  max-width: 200px;
  /* Limit image size */
  height: auto;
  border-radius: var(--input-radius);
  margin-top: 0.5rem;
  border: 1px solid var(--border-color);
  transition: transform 0.3s ease;
}

.report-content img.report-image:hover {
  transform: scale(1.05);
}

.report-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
  /* Push meta to bottom if needed */
  align-items: center;
  /* Align badges */
}

.category,
.urgency,
.threat {
  display: inline-block;
  padding: 0.2rem 0.8rem;
  border-radius: 999px;
  font-size: 0.75rem;
  /* Smaller badges */
  color: white;
  font-weight: 500;
  line-height: 1.4;
}

.category {
  background-color: var(--accent-color);
}

.urgency-low {
  background-color: #28a745;
}

.urgency-medium {
  background-color: #fd7e14;
}

.urgency-high {
  background-color: #FF474C;
}

.threat-minor {
  background-color: #17a2b8;
}

.threat-moderate {
  background-color: #ffc107;
  color: #333;
}

/* Darker text on yellow */
.threat-severe {
  background-color: #FF0000;
}

/* Report Actions */
.report-actions {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  min-width: 180px;
  /* Ensure enough width */
}

.report-actions p {
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
}

.report-actions .report-status {
  font-weight: 600;
}

.status-update {
  padding: 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: var(--input-radius);
  font-size: 0.9rem;
  background-color: var(--white);
  appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="5" fill="%23586069"><path d="M0 0l5 5 5-5z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 0.7rem top 50%;
}

.status-update:hover,
.status-update:focus {
  border-color: var(--primary-color);
  outline: none;
}

.update-status-btn,
.delete-report-btn {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

/* Admin Logout */
.admin-logout {
  text-align: center;
  margin-top: 2rem;
  border-top: 1px solid var(--border-color);
  padding-top: 1.5rem;
}

.admin-logout .danger-button {
  padding: 0.6rem 1.2rem;
}
/* ============================================================================
   Reporting Page — Detect below map + better top layout usage
   ========================================================================== */

/* Theme tokens */
:root {
  --blue-25:  #f5fbff;
  --blue-50:  #eaf6ff;
  --blue-100: #d7eeff;
  --blue-500: #0ea5e9;
  --blue-600: #0284c7;
  --blue-700: #0369a1;

  --green-500: #10b981;
  --green-600: #059669;

  --ink:        #0f172a;
  --ink-soft:   #1f2d3d;
  --muted:      #eff6fb;
  --muted-ink:  #475569;
  --white:      #ffffff;
  --error:      #dc2626;

  --radius-2xl: 24px;
  --radius-xl:  20px;
  --radius-lg:  16px;
  --radius-md:  12px;
  --radius-sm:  10px;
  --radius-pill: 9999px;

  --shadow-1: 0 8px 24px rgba(2,132,199,.10);
  --shadow-2: 0 12px 36px rgba(2,132,199,.15);
  --shadow-inset: inset 0 1px 3px rgba(2,132,199,.12);

  --font-heading: ui-rounded, "Poppins", system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans";
  --font-body: Inter, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans";

  --ring-blue: 0 0 0 4px rgba(14,165,233,.18);
}

/* Frame */
#reporting-page {
  --content-max: 1100px;
  max-width: var(--content-max);
  margin: 3.5rem auto;
  padding: 2rem;
  color: var(--ink);
  font-family: var(--font-body);
  background: linear-gradient(180deg, var(--white) 0%, var(--blue-25) 100%);
  border: 1px solid rgba(2,132,199,.15);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-1);
  animation: rp-fadeUp .6s ease-out both;
}
#reporting-page * { box-sizing: border-box; font-family: inherit; }

.reporting-container { display: grid; gap: 1.25rem; }

/* Header */
#reporting-page .rp-header { display: grid; gap: .4rem; padding: .25rem .25rem 0; animation: rp-fadeIn .5s .1s ease-out both; }
#reporting-page h1 { font-family: var(--font-heading); font-weight: 750; font-size: 2.1rem; margin: 0; color: var(--ink); letter-spacing: .2px; }
#reporting-page .subtitle { margin: 0; color: var(--muted-ink); }

/* Section wrapper */
#reporting-page .rp-section {
  background: linear-gradient(180deg, var(--white), #f7fbff);
  border: 1px solid rgba(2,132,199,.12);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-1);
  padding: 1.25rem;
}

/* Map */
#reporting-page .rp-map-section { padding: 1rem; animation: rp-fadeIn .55s .05s ease-out both; }
#reporting-page .rp-map {
  position: relative;
  height: 460px; width: 100%;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(14,165,233,.35);
  box-shadow: var(--shadow-1);
  overflow: hidden;
  background: linear-gradient(135deg, var(--blue-50), #ffffff);
  cursor: crosshair;
}
/* Make Leaflet tiles crisp */
#reporting-page #map img { max-width: none !important; }

/* Map hint */
#reporting-page #map .map-hint {
  position: absolute; left: 1rem; bottom: 1rem;
  padding: .55rem .8rem; background: rgba(2,132,199,.95);
  color: var(--white); border-radius: var(--radius-pill);
  font-size: .85rem; user-select: none; pointer-events: none;
  box-shadow: var(--shadow-1); transform: translateY(6px);
  animation: rp-hintIn .6s .2s ease-out both;
}

/* Map toolbar remains for search/geocoder; no detect button here */
#reporting-page #map .map-toolbar { position: absolute; left: 1rem; right: 1rem; top: .9rem; display: grid; grid-template-columns: 1fr; z-index: 1000; }

/* Detect BELOW map */
#reporting-page .map-actions {
  display: grid; place-items: center;
  margin-top: .8rem;
}
#reporting-page .button.tertiary {
  background: #ffffff;
  color: var(--blue-700);
  border: 1.5px solid var(--blue-500);
  padding: .8rem 1.1rem;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-1);
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease, filter .2s ease;
}
#reporting-page .button.tertiary:hover { transform: translateY(-1px); box-shadow: var(--shadow-2); }
#reporting-page .button.tertiary i { font-size: .95rem; }


/* Form */
#reporting-page .rp-form { padding: 1.25rem 1.25rem 1.1rem; animation: rp-fadeIn .5s .08s ease-out both; }

/* Top grid: uses space beside Location Name & Description */
#reporting-page .form-top-grid {
  display: grid;
  grid-template-columns: 1.25fr .75fr;  /* main + aside */
  gap: 1.2rem;
  align-items: start;
}
#reporting-page .col-main { display: grid; gap: 1rem; }
#reporting-page .col-aside { display: grid; gap: 1rem; }

#reporting-page #report-form .form-row { display: grid; gap: .55rem; margin: 0 0 1rem; }
#reporting-page #report-form label { font-weight: 700; color: #0b2942; }
#reporting-page #report-form .muted { color: #6b839b; font-weight: 600; }

#reporting-page #report-form input[type="text"],
#reporting-page #report-form select,
#reporting-page #report-form textarea {
  width: 100%;
  border: 1px solid rgba(2,132,199,.35);
  border-radius: var(--radius-lg);
  padding: 1rem 1rem;
  font-size: 1rem;
  color: var(--ink);
  background: #fff;
  transition: border-color .15s ease, box-shadow .2s ease, background .2s ease, transform .06s ease;
}
#reporting-page #report-form input::placeholder,
#reporting-page #report-form textarea::placeholder { color: #64748b; }
#reporting-page #report-form input:focus,
#reporting-page #report-form select:focus,
#reporting-page #report-form textarea:focus { border-color: var(--blue-600); box-shadow: var(--ring-blue); outline: none; }

/* Textarea + mic */
#reporting-page #report-form .textarea-wrap { position: relative; }
#reporting-page #report-form textarea { min-height: 180px; resize: vertical; padding-right: 3.35rem; }
#reporting-page #report-form .mic-btn {
  position: absolute; right: .6rem; bottom: .6rem;
  width: 44px; height: 44px; border-radius: 12px;
  border: 1px solid rgba(2,132,199,.35);
  background: linear-gradient(180deg, var(--green-500), var(--green-600));
  color: #fff; display: inline-flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-1);
  transition: transform .12s ease, box-shadow .2s ease, filter .2s ease;
}
#reporting-page #report-form .mic-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-2); }
#reporting-page #report-form .mic-btn.recording { animation: rp-pulse 1.5s infinite; }
#reporting-page #report-form .field-hint { margin: .15rem 0 0; color: #6b839b; font-size: .9rem; }

/* Aside cards */
#reporting-page .card {
  border: 1px solid rgba(2,132,199,.14);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #ffffff, #f6fbff);
  box-shadow: var(--shadow-1);
  padding: .9rem 1rem;
}
#reporting-page .tip-card h4,
#reporting-page .loc-card h4 { margin: 0 0 .5rem; font-weight: 800; color: var(--blue-700); display: flex; gap: .5rem; align-items: center; }
#reporting-page .tip-card ul { margin: 0; padding-left: 1.1rem; display: grid; gap: .35rem; color: #2b3d52; }
#reporting-page .loc-card .loc-line { margin: .15rem 0; }
#reporting-page .loc-card .muted { color: #6b839b; }

/* Details grid (categories + image) */
#reporting-page .details-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 1.2rem;
  margin-top: 1rem;
  align-items: start;
}

/* Image upload */
#reporting-page .image-upload { margin-bottom: .75rem; }
#reporting-page .image-drop {
  display: grid; justify-items: center; align-content: center; gap: .25rem;
  width: 100%; padding: 1.1rem;
  border: 1.5px dashed rgba(2,132,199,.45); border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #f3fbff);
  cursor: pointer; box-shadow: var(--shadow-inset);
  transition: border-color .2s ease, transform .12s ease, box-shadow .2s ease, background .2s ease;
  text-align: center; color: var(--muted-ink);
}
#reporting-page .image-drop i { font-size: 1.1rem; color: var(--blue-600); }
#reporting-page .image-drop:hover { border-color: var(--blue-600); box-shadow: var(--shadow-1); transform: translateY(-1px); }
#reporting-page #imageUpload { display: none; }
#reporting-page #imagePreview {
  margin-top: .75rem; width: 100%; aspect-ratio: 4 / 3;
  border-radius: 16px; background: #eef6ff; border: 1px solid rgba(2,132,199,.25);
  background-image:
    linear-gradient(45deg, #f6fbff 25%, transparent 25%),
    linear-gradient(-45deg, #f6fbff 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f6fbff 75%),
    linear-gradient(-45deg, transparent 75%, #f6fbff 75%);
  background-size: 20px 20px; background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
  overflow: hidden; display: grid; place-items: center; color: #94a3b8; position: relative;
}
#reporting-page #imagePreview img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Buttons */
#reporting-page .button {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .6rem; padding: 1rem 1.25rem;
  border-radius: var(--radius-lg); font-family: var(--font-heading);
  font-weight: 800; font-size: 1rem; border: 0; cursor: pointer;
  transition: transform .12s ease, box-shadow .2s ease, filter .2s ease, opacity .2s ease;
}
#reporting-page .button.full-width { width: 100%; }
#reporting-page .button.primary { background: linear-gradient(180deg, var(--blue-500), var(--blue-700)); color: var(--white); box-shadow: var(--shadow-1); }
#reporting-page .button.primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-2); }
#reporting-page .button.secondary { background: #e9f6ff; color: #0b2942; border: 1px solid rgba(2,132,199,.35); }
#reporting-page .button.secondary:hover { transform: translateY(-1px); box-shadow: var(--shadow-1); }
#reporting-page .button.ai { background: linear-gradient(180deg, var(--green-500), var(--green-600)); color: var(--white); box-shadow: var(--shadow-1); }
#reporting-page .button.ai:hover { transform: translateY(-1px); box-shadow: var(--shadow-2); }
#reporting-page button:disabled { opacity: .55; cursor: not-allowed; transform: none !important; }

/* CAPTCHA + errors */
#reporting-page .recaptcha-row { display: grid; place-items: center; margin: .6rem 0 1rem; }
#reporting-page .error-message { color: #c2410c; font-weight: 600; margin-top: .4rem; }

/* Focus & animations */
#reporting-page .button:focus-visible,
#reporting-page input:focus-visible,
#reporting-page select:focus-visible,
#reporting-page textarea:focus-visible { outline: 3px solid rgba(14,165,233,.35); outline-offset: 2px; }

@keyframes rp-fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes rp-fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes rp-hintIn { 0% { opacity: 0; transform: translateY(10px); } 100% { opacity: 1; transform: translateY(0); } }
@keyframes rp-pulse { 0% { box-shadow: 0 0 0 0 rgba(16,185,129,.35); } 70% { box-shadow: 0 0 0 14px rgba(16,185,129,0); } 100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); } }

/* Responsive */
@media (max-width: 1080px) {
  #reporting-page .form-top-grid { grid-template-columns: 1fr .9fr; }
}
@media (max-width: 980px) {
  #reporting-page .rp-map { height: 420px; }
  #reporting-page .details-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  #reporting-page .form-top-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  #reporting-page { padding: 1.25rem; }
  #reporting-page .rp-map { height: 380px; }
  #reporting-page .leaflet-control-search .search-input,
  #reporting-page .leaflet-control-geocoder input { width: 180px !important; }
}
@media (max-width: 420px) {
  #reporting-page .rp-map { height: 340px; }
  #reporting-page .leaflet-control-search .search-input,
  #reporting-page .leaflet-control-geocoder input { width: 150px !important; }
}

/* ============================================================================
   09. My Reports Page
   ============================================================================ */

/* Inherits .page styles */
#my-reports-page {
  max-width: 800px;
  /* Wider than reporting form */
}

#my-reports-page h1 {
  text-align: center;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
}

#user-reports-container li {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-light);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#user-reports-container li:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-medium);
}

#user-reports-container h3 {
  font-size: 1.2rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

#user-reports-container p {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  color: var(--muted-color);
}

#user-reports-container p strong {
  color: var(--text-color);
  font-weight: 500;
  margin-right: 5px;
}

.user-report-image {
  max-width: 150px;
  max-height: 150px;
  margin-top: 10px;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
}

/* ============================================================================
   10. Community Forum Page
   ============================================================================ */
/* Inherits .page styles */


#community-forum-page h1 {
  text-align: center;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
}

.forum-layout {
  display: grid;
  grid-template-columns: 1fr;
  /* Default single column */
  gap: 2rem;
}

@media (min-width: 992px) {

  /* Sidebar appears on larger screens */
  .forum-layout {
    grid-template-columns: 1fr 300px;
    /* Main content and sidebar */
  }
}

#submit-button {
  background-color: var(--primary-color);
  color: var(--white);
  font-size: 1rem;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

#submit-button:hover {
  background-color: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

#submit-button:active {
  transform: scale(0.98);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

#submit-button:disabled {
  background-color: var(--muted-color);
  cursor: not-allowed;
  opacity: 0.6;
}



.forum-sidebar {
  /* Styles for the sidebar */
  background-color: #f8f9fa;
  padding: 1.5rem;
  border-radius: var(--border-radius);
}

/* New Post Form */
#new-post {
  background: var(--white);
  padding: 1.5rem;
  margin-bottom: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
}

#new-post h2 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

#forum-post-form input,
#forum-post-form select,
#forum-post-form textarea {
  max-width: 100%;
  /* Allow full width */
  margin-bottom: 1rem;
}

#forum-post-form textarea {
  min-height: 100px;
}

#submit-button {
  /* Style the post button */
  display: block;
  /* Make it block */
  width: auto;
  /* Auto width */
  padding: 0.6rem 1.5rem;
  margin-top: 0.5rem;
}

/* Forum Controls (Search) */
.forum-controls {
  margin-bottom: 1.5rem;
}

.search-input {
  width: 100%;
  max-width: 100%;
  /* Full width */
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--input-radius);
  font-size: 1rem;
  background-color: #f8f9fa;
}

.search-input:focus {
  background-color: var(--white);
}


/* Forum Posts List */
#forum-posts .forum-post {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-light);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

#forum-posts .forum-post:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-medium);
  border-left: 3px solid var(--primary-color);
  /* Add accent on hover */
}

/* Pinned Post Styling */
#forum-posts .forum-post.pinned {
  border: 1px solid var(--secondary-color);
  /* Green border */
  border-left: 3px solid var(--secondary-color);
  background-color: #f0fff0;
  /* Subtle green background */
}

#forum-posts .forum-post.pinned:hover {
  border-color: var(--secondary-dark);
  border-left-color: var(--secondary-dark);
}

.pin-icon {
  color: var(--secondary-color);
  font-weight: bold;
  margin-right: 5px;
}




.post-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  /* Allow wrap */
  margin-bottom: 0.8rem;
  font-size: 0.9rem;
  color: var(--muted-color);
}

.post-author .user-link {
  font-weight: 500;
  color: var(--primary-color);
}

.post-meta span {
  margin-left: 5px;
}

.post-category {
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  color: var(--white);
  font-weight: 500;
  line-height: 1.3;
}

/* Category colors can be dynamic via inline style from JS */

.forum-post h3 {
  font-size: 1.3rem;
  margin-bottom: 0.8rem;
  color: var(--text-color);
  transition: color 0.3s ease;
}

.forum-post:hover h3 {
  color: var(--primary-color);
}

.post-content-preview p {
  /* Style specifically if using preview */
  color: var(--text-color);
  line-height: 1.6;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.post-actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  border-top: 1px solid #eee;
  /* Separator */
  padding-top: 1rem;
}

.post-actions button {
  background: none;
  border: none;
  padding: 0.3rem 0.5rem;
  /* Smaller padding */
  cursor: pointer;
  font-size: 0.9rem;
  /* Smaller font */
  color: var(--muted-color);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  border-radius: 4px;
}

.post-actions button:hover {
  color: var(--primary-color);
  background-color: #f0f2f5;
  /* Light hover background */
}

.post-actions .vote-btn:hover {
  color: var(--primary-color);
}

.post-actions .upvote-post:hover,
.upvote-comment:hover {
  color: var(--secondary-color);
}

.post-actions .downvote-post:hover,
.downvote-comment:hover {
  color: var(--error-color);
}

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

.pin-btn:hover {
  background-color: var(--secondary-dark);
}

.pin-btn[data-pinned="true"] {
  background: var(--accent-color);
}

.pin-btn[data-pinned="true"]:hover {
  background: darkorange;
}

.delete-post-btn,
.delete-comment-btn {
  color: var(--error-color);
}

.delete-post-btn:hover,
.delete-comment-btn:hover {
  background-color: #f8d7da;
}


/* Comments Section */
.comments-section {
  margin-top: 1.5rem;
  border-top: 1px dashed var(--border-color);
  /* Dashed separator */
  padding-top: 1.5rem;
}

.comments-section h4 {
  font-size: 1.1rem;
  color: var(--muted-color);
  margin-bottom: 1rem;
}

.comments-list {
  padding-left: 0;
  /* Remove indent */
}

.comments-list li.comment-item {
  padding: 1rem;
  margin-bottom: 1rem;
  background: #f8f9fa;
  /* Light background for comments */
  border-radius: var(--border-radius);
  border-left: 3px solid var(--accent-color);
}

.comment-author {
  font-weight: 500;
  color: var(--text-color);
}

.comment-timestamp {
  font-size: 0.8rem;
  color: var(--muted-color);
  margin-left: 5px;
}

.comment-content p {
  font-size: 0.9rem;
  margin-top: 0.5rem;
  margin-bottom: 0.8rem;
}

.comment-actions {
  display: flex;
  gap: 0.5rem;
}

.comment-form textarea {
  width: 100%;
  min-height: 80px;
  margin-bottom: 0.8rem;
  font-size: 0.9rem;
}

.comment-form button {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

/* Load More Button */
#load-more-posts {
  display: block;
  margin: 2rem auto 0;
  /* Center */
}

/* Sidebar: Trending Posts */
.forum-sidebar h2 {
  font-size: 1.2rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.trending-post {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1rem;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
  cursor: pointer;
}

.trending-post:hover {
  transform: translateX(5px);
  box-shadow: var(--shadow-light);
  border-left: 3px solid var(--secondary-color);
}

.trending-post h4 {
  font-size: 1rem;
  margin-bottom: 0.3rem;
}

.trending-post p {
  font-size: 0.85rem;
  color: var(--muted-color);
  margin-bottom: 0;
}

/* Highlight effect for jumped-to post */
.forum-post.highlight {
  animation: highlightFade 1.5s ease-out;
}

@keyframes highlightFade {
  0% {
    background-color: rgba(46, 164, 79, 0.2);
  }

  /* Light green flash */
  100% {
    background-color: var(--white);
  }
}

/* ============================================================================
   11. About Page — Refined (cards + motion + glass tiles)
   ============================================================================ */

#about-page {
  max-width: 980px;
  margin: 2.5rem auto;
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
  overflow: hidden;
}

/* Hero-ish H1 */
#about-page h1 {
  text-align: center;
  font-size: clamp(2rem, 2.2rem + 1vw, 3rem);
  font-weight: 700;
  margin: 0 0 1.25rem 0;
  background: linear-gradient(90deg, var(--primary-color), #4facfe, #00f2fe, var(--secondary-color));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: .5px;
  position: relative;
  isolation: isolate;
}

#about-page h1::after {
  content: "";
  display: block;
  height: 6px;
  width: 120px;
  margin: .75rem auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  filter: saturate(115%);
  opacity: .9;
}

/* Sections become soft cards */
.about-section {
  border: 0;
  margin: 1.25rem 0 1.75rem;
  padding: 0;
}

.about-section .content {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, .06);
  border-radius: 14px;
  box-shadow: var(--shadow-light);
  padding: 1.4rem 1.25rem;
  transform: translateY(18px);
  opacity: 0;
  transition: transform .6s cubic-bezier(.2, .8, .2, 1), opacity .6s ease;
}

/* reveal class is toggled by JS */
.about-section.visible .content {
  transform: translateY(0);
  opacity: 1;
}

/* Subhead */
.about-section h2 {
  margin-bottom: .6rem;
  color: var(--primary-dark);
  font-weight: 650;
}

/* Body lists */
.about-section ul {
  list-style: none;
  margin: .5rem 0 0;
  padding: 0;
}

.about-section ul li {
  position: relative;
  padding-left: 1.6rem;
  margin: .4rem 0;
  line-height: 1.65;
}

.about-section ul li::before {
  content: "●";
  font-size: .6rem;
  color: var(--secondary-color);
  position: absolute;
  left: .2rem;
  top: .55rem;
  opacity: .9;
}

/* Stats — pill cards with subtle glow */
.stats-container {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 1rem 0 0;
}

@media (max-width: 720px) {
  .stats-container {
    grid-template-columns: 1fr;
  }
}

.stat-box {
  text-align: center;
  padding: 1.1rem;
  border-radius: 16px;
  background: linear-gradient(180deg, #f9fbff, #f6fff9);
  border: 1px solid rgba(0, 0, 0, .05);
  box-shadow: 0 6px 24px rgba(9, 105, 218, .08);
  transition: transform .25s ease, box-shadow .25s ease;
}

.stat-box:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 26px rgba(9, 105, 218, .12);
}

.stat-number {
  display: block;
  font-size: clamp(1.8rem, 1.6rem + 1.2vw, 2.6rem);
  font-weight: 800;
  color: var(--primary-color);
  line-height: 1.1;
}

.stat-description {
  font-size: .95rem;
  color: var(--muted-color);
}

/* Slideshow — smooth marquee with edge fade + pause on hover */
.slideshow-container {
  overflow: hidden;
  width: 100%;
  margin-top: .6rem;
  mask-image: linear-gradient(to right, transparent 0, #000 6%, #000 94%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 6%, #000 94%, transparent 100%);
}

.slide-track {
  --gap: 18px;
  display: flex;
  gap: var(--gap);
  padding: 2px 0;
  animation: aboutMarquee 26s linear infinite;
  will-change: transform;
}

.slideshow-container:hover .slide-track {
  animation-play-state: paused;
}

.slide {
  flex: 0 0 280px;
  padding: 1rem;
  border-radius: 12px;
  background: #f7fafc;
  border: 1px solid rgba(0, 0, 0, .05);
  text-align: center;
  box-shadow: var(--shadow-light);
}

.slide h3 {
  margin-bottom: .35rem;
}

/* Categories — glass tiles */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 900px) {
  .categories-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .categories-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.category-item {
  display: grid;
  place-items: center;
  gap: .5rem;
  padding: 1rem .75rem;
  text-align: center;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .65), rgba(255, 255, 255, .9));
  border: 1px solid rgba(255, 255, 255, .4);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .06), inset 0 1px 0 rgba(255, 255, 255, .5);
  backdrop-filter: blur(6px);
  transform: translateY(0);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.category-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 36px rgba(4, 66, 137, .16);
  border-color: rgba(79, 172, 254, .5);
}

#about-page .category-item i {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  display: inline-block;
  background: radial-gradient(circle at 30% 30%, #e6f3ff, #d9ffe9);
  border: 1px solid rgba(0, 0, 0, .04);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5);
  /* the actual glyph color */
  --icon-color: #0ea5e9;
  position: relative;
}

#about-page .category-item i::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: 8px;
  /* scale the glyph inside the chip */
  background: var(--icon-color);
  -webkit-mask: var(--icon-mask) no-repeat center / contain;
  mask: var(--icon-mask) no-repeat center / contain;
}

/* Map each class to a simple SVG path mask (examples) */
#about-page .category-item .icon-road {
  --icon-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200" viewBox="0 0 576 512"><path fill="currentColor" d="M256 32h-74.8c-27.1 0-51.3 17.1-60.3 42.6L3.1 407.2c-2 5.8-3.1 12-3.1 18.2C0 455.5 24.5 480 54.6 480H256v-64c0-17.7 14.3-32 32-32s32 14.3 32 32v64h201.4c30.2 0 54.6-24.5 54.6-54.6c0-6.2-1.1-12.4-3.1-18.2L455.1 74.6C446 49.1 421.9 32 394.8 32H320v64c0 17.7-14.3 32-32 32s-32-14.3-32-32V32zm64 192v64c0 17.7-14.3 32-32 32s-32-14.3-32-32v-64c0-17.7 14.3-32 32-32s32 14.3 32 32z"/></svg>');
}

#about-page .category-item .icon-light {
  --icon-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="%23000" d="M12 2a7 7 0 0 0-4 12v2h8v-2a7 7 0 0 0-4-12Zm-3 18h6v2H9z"/></svg>');
}

#about-page .category-item .icon-trash {
  --icon-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="%23000" d="M9 3h6l1 2h4v2H4V5h4l1-2Zm-1 6h2v9H8V9Zm4 0h2v9h-2V9Zm-6 0h12l-1 11a2 2 0 0 1-2 2H9a2 2 0 0 1-2-2L6 9Z"/></svg>');
}

#about-page .category-item .icon-nature {
  --icon-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200" viewBox="0 0 384 512"><path fill="currentColor" d="M378.31 378.49L298.42 288h30.63c9.01 0 16.98-5 20.78-13.06c3.8-8.04 2.55-17.26-3.28-24.05L268.42 160h28.89c9.1 0 17.3-5.35 20.86-13.61c3.52-8.13 1.86-17.59-4.24-24.08L203.66 4.83c-6.03-6.45-17.28-6.45-23.32 0L70.06 122.31c-6.1 6.49-7.75 15.95-4.24 24.08C69.38 154.65 77.59 160 86.69 160h28.89l-78.14 90.91c-5.81 6.78-7.06 15.99-3.27 24.04C37.97 283 45.93 288 54.95 288h30.63L5.69 378.49c-6 6.79-7.36 16.09-3.56 24.26c3.75 8.05 12 13.25 21.01 13.25H160v24.45l-30.29 48.4c-5.32 10.64 2.42 23.16 14.31 23.16h95.96c11.89 0 19.63-12.52 14.31-23.16L224 440.45V416h136.86c9.01 0 17.26-5.2 21.01-13.25c3.8-8.17 2.44-17.47-3.56-24.26z"/></svg>');
}

#about-page .category-item .icon-construction {
  --icon-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200" viewBox="0 0 15 15"><path fill="currentColor" d="M13.5 11h-1.8L8.2.5C8-.2 7-.2 6.8.5L3.3 11H1.5c-.3 0-.5.2-.5.5v1c0 .3.2.5.5.5h12c.3 0 .5-.2.5-.5v-1c0-.3-.2-.5-.5-.5ZM7 3h1l.7 2H6.4L7 3ZM5.7 7h3.6l.7 2H5l.7-2Z"/></svg>');
}

#about-page .category-item .icon-pest {
  --icon-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200" viewBox="0 0 24 24"><path fill="currentColor" d="M12 21q-1.6 0-2.863-.825T7.075 18L4.7 19.35l-1-1.725l2.575-1.5q-.075-.275-.125-.563T6.05 15H3v-2h3.05q.05-.3.1-.588t.125-.562L3.7 10.35l1-1.725L7.05 10q.2-.35.463-.688T8.05 8.7Q8 8.525 8 8.35V8q0-.6.175-1.15t.475-1.025L7 4.175L8.4 2.75l1.75 1.7q.425-.225.888-.337T12 4q.5 0 .975.125t.9.35L15.6 2.75L17 4.175l-1.65 1.65q.3.475.463 1.025T15.975 8v.338q0 .162-.05.337q.275.275.537.625t.463.7L19.3 8.65l1 1.725l-2.6 1.475q.075.275.137.563t.113.587H21v2h-3.05q-.05.3-.1.588t-.125.562l2.575 1.5l-1 1.725L16.925 18q-.8 1.35-2.063 2.175T12 21ZM10.1 7.35q.425-.175.913-.263T12 7q.5 0 .963.075t.887.25q-.2-.575-.7-.95T12 6q-.65 0-1.175.388t-.725.962ZM12 19q1.825 0 2.913-1.525T16 14q0-1.75-1.012-3.375T12 9q-1.95 0-2.975 1.613T8 14q0 1.95 1.088 3.475T12 19Zm-1-2v-6h2v6h-2Z"/></svg>');
}

#about-page .category-item .icon-noise {
  --icon-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200" viewBox="0 0 24 24"><path fill="currentColor" d="M13 18q1.275 0 2.138-.875T16 15h-2q0 .425-.288.713T13 16q-.325 0-.575-.188t-.375-.512q-.15-.425-.363-.838t-.562-.762l-1.35-1.35q-.375-.375-.575-.862T9 10.5q0-1.05.725-1.775T11.5 8q.9 0 1.588.563T13.95 10h2.025q-.2-1.725-1.475-2.863T11.5 6Q9.625 6 8.312 7.313T7 10.5q0 .925.35 1.763t1 1.487l1.375 1.375q.175.175.263.388t.162.437q.325.9 1.113 1.475T13 18Zm.5-4q.65 0 1.075-.438T15 12.5q0-.65-.425-1.075T13.5 11q-.625 0-1.063.425T12 12.5q0 .625.438 1.063T13.5 14ZM12 22q-2.075 0-3.9-.788t-3.175-2.137q-1.35-1.35-2.137-3.175T2 12q0-2.075.788-3.9t2.137-3.175q1.35-1.35 3.175-2.137T12 2q2.075 0 3.9.788t3.175 2.137q1.35 1.35 2.138 3.175T22 12q0 2.075-.788 3.9t-2.137 3.175q-1.35 1.35-3.175 2.138T12 22Zm0-2q3.35 0 5.675-2.325T20 12q0-3.35-2.325-5.675T12 4Q8.65 4 6.325 6.325T4 12q0 3.35 2.325 5.675T12 20Z"/></svg>');
}

#about-page .category-item .icon-facilities {
  --icon-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200" viewBox="0 0 1024 1024"><path fill="currentColor" d="M992 1024H32q-13 0-22.5-9.5T0 992t9.5-22.5T32 960h32q27 0 45.5-19t18.5-45V64q0-26 19-45t45-19h640q27 0 45.5 19T896 64v832q0 27 19 45.5t45 18.5h32q13 0 22.5 9.5t9.5 22.5t-9.5 22.5t-22.5 9.5zM384 160q0-13-9.5-22.5T352 128h-64q-13 0-22.5 9.5T256 160v64q0 13 9.5 22.5T288 256h64q13 0 22.5-9.5T384 224v-64zm0 192q0-13-9.5-22.5T352 320h-64q-13 0-22.5 9.5T256 352v64q0 13 9.5 22.5T288 448h64q13 0 22.5-9.5T384 416v-64zm0 192q0-13-9.5-22.5T352 512h-64q-13 0-22.5 9.5T256 544v64q0 13 9.5 22.5T288 640h64q13 0 22.5-9.5T384 608v-64zm192-384q0-13-9.5-22.5T544 128h-64q-13 0-22.5 9.5T448 160v64q0 13 9.5 22.5T480 256h64q13 0 22.5-9.5T576 224v-64zm0 192q0-13-9.5-22.5T544 320h-64q-13 0-22.5 9.5T448 352v64q0 13 9.5 22.5T480 448h64q13 0 22.5-9.5T576 416v-64zm0 192q0-13-9.5-22.5T544 512h-64q-13 0-22.5 9.5T448 544v64q0 13 9.5 22.5T480 640h64q13 0 22.5-9.5T576 608v-64zm32 224H416q-13 0-22.5 9.5T384 800v128q0 13 9.5 22.5T416 960h192q13 0 22.5-9.5T640 928V800q0-13-9.5-22.5T608 768zm160-608q0-13-9.5-22.5T736 128h-64q-13 0-22.5 9.5T640 160v64q0 13 9.5 22.5T672 256h64q13 0 22.5-9.5T768 224v-64zm0 192q0-13-9.5-22.5T736 320h-64q-13 0-22.5 9.5T640 352v64q0 13 9.5 22.5T672 448h64q13 0 22.5-9.5T768 416v-64zm0 192q0-13-9.5-22.5T736 512h-64q-13 0-22.5 9.5T640 544v64q0 13 9.5 22.5T672 640h64q13 0 22.5-9.5T768 608v-64z"/></svg>');
}

/* Optional: hover color */
#about-page .category-item:hover i {
  --icon-color: #10b981;
}

.category-item span {
  font-weight: 600;
  color: #113a5c;
}

/* Contact list polish */
.contact-list li {
  margin: .4rem 0;
}

/* Privacy / generic links inside About */
#about-page a {
  text-decoration: none;
}

/* Keyframes */
@keyframes aboutMarquee {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }

  /* duplicate slides in markup make this seamless */
}

/* Reduce motion support */
@media (prefers-reduced-motion: reduce) {

  .about-section .content,
  .slide-track {
    transition: none;
    animation: none;
  }
}

/* ============================================================================
   12. Chatbot Container - Revised for Better Mobile Positioning
   ============================================================================ */
.chat-widget {
  position: fixed;
  bottom: 20px;
  /* Adjust as needed */
  right: 20px;
  /* Adjust as needed */
  z-index: 1000;
}

/* Chat Container (Hidden by default) */
.chat-container {
  position: fixed;
  /* Changed from absolute */
  bottom: 20px;
  /* Align with widget */
  right: 20px;
  /* Align with widget */
  width: 90vw;
  /* Mobile first width */
  max-width: 380px;
  /* Max width for desktop/tablet */
  height: 500px;
  /* Let content determine height */
  max-height: 70vh;
  /* Limit height, especially on mobile */
  background: linear-gradient(135deg, #ffffff, #f0f0f0);
  /* Glossy effect */
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  border: 1px solid #dcdcdc;
  display: flex;
  /* Use flex for internal layout */
  flex-direction: column;
  overflow: hidden;
  /* Initial hidden state - ADJUSTED TRANSFORM */
  opacity: 0;
  /* Option 1: Only slide up, no scale */
  /* transform: translateY(50px); */
  /* Option 2: Start slightly smaller, but not tiny */
  transform: scale(0.95) translateY(30px);
  /* Start closer to full size */
  transform-origin: bottom right;
  transition: transform 0.3s ease-out, opacity 0.3s ease-out;
  visibility: hidden;
  /* Use visibility for better accessibility */
}

/* Chat Icon (Visible by default) */
.chat-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--primary-color);
  /* Use primary color */
  display: flex;
  /* Use flex to center icon */
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  transition: background 0.3s ease, transform 0.3s ease;
}

.chat-icon:hover {
  background: var(--primary-dark);
  transform: scale(1.1);
}

.chat-icon img {
  width: 32px;
  height: 32px;
}

/* Active State (Toggled via JS on .chat-widget) */
.chat-widget.active .chat-container {
  opacity: 1;
  transform: scale(1) translateY(0);
  visibility: visible;
}

.chat-widget.active .chat-icon {
  display: none;
  /* Hide icon when chat is open */
}

/* Keep remaining internal chat container styles (.chat-container h2, .chat-box, .message, etc.) */
.chat-container h2 {
  background: var(--primary-color);
  color: #fff;
  padding: 12px;
  text-align: center;
  font-size: 1.1rem;
  /* Adjusted size */
  border-bottom: 1px solid var(--primary-dark);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
  /* Prevent shrinking */
}

.chat-box {
  flex: 1;
  /* Allow box to grow */
  padding: 12px;
  overflow-y: auto;
  background: #f7f9fb;
}

.message {
  margin-bottom: 12px;
  padding: 10px 14px;
  border-radius: 20px;
  max-width: 85%;
  line-height: 1.5;
  word-wrap: break-word;
  font-size: 0.95rem;
}

.message.user {
  background-color: var(--primary-color);
  /* Use primary color */
  color: #fff;
  margin-left: auto;
  border-bottom-right-radius: 6px;
}

.message.bot {
  background-color: var(--secondary-color);
  /* Use secondary color */
  color: #fff;
  margin-right: auto;
  border-bottom-left-radius: 6px;
}


.message.bot.error {
  background-color: #f8d7da;
  color: #721c24;
}

.chat-input {
  display: flex;
  border-top: 1px solid #ccc;
  padding: 10px;
  background: #fff;
  flex-shrink: 0;
  /* Prevent shrinking */
}

.input-box {
  flex: 1;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 10px;
  font-size: 1rem;
  outline: none;
  height: 40px;
  line-height: 1.5;
}

.input-box:focus {
  border-color: var(--primary-color);
}

.send-button {
  margin-left: 10px;
  padding: 0 16px;
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.send-button:hover {
  background: var(--primary-dark);
}

.send-button:disabled {
  background-color: #adb5bd;
  cursor: not-allowed;
}

/* Scrollbar */
.chat-box::-webkit-scrollbar {
  width: 6px;
}

.chat-box::-webkit-scrollbar-track {
  background: #f7f9fb;
}

.chat-box::-webkit-scrollbar-thumb {
  background-color: #ccc;
  border-radius: 3px;
}

.chat-box::-webkit-scrollbar-thumb:hover {
  background-color: #aaa;
}

/* Mobile Specific Adjustments (Optional Refinements) */
@media (max-width: 480px) {
  .chat-widget {
    bottom: 15px;
    right: 15px;
  }

  .chat-container {
    bottom: 15px;
    right: 15px;
    width: calc(100vw - 30px);
    /* Full width minus padding */
    max-height: 75vh;
    border-radius: 12px;
    /* Slightly smaller radius */
  }

  .chat-icon {
    width: 55px;
    height: 55px;
  }

  .chat-icon img {
    width: 30px;
    height: 30px;
  }

  .chat-container h2 {
    font-size: 1rem;
    padding: 10px;
  }

  .message {
    font-size: 0.9rem;
  }

  .input-box,
  .send-button {
    font-size: 0.95rem;
  }
}

.chat-container h2 {
  background: var(--primary-color);
  color: #fff;
  padding: 12px 16px;
  /* Balanced padding */
  text-align: center;
  font-size: 1.1rem;
  /* Adjusted size */
  border-bottom: 1px solid var(--primary-dark);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
  /* Prevent shrinking */
  position: relative;
  /* Needed for absolute positioning of button */
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* Space between title and button */
}

.chat-container h2 span {
  flex-grow: 1;
  /* Allow title to take available space */
  text-align: center;
}

.chat-close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  /* White but slightly transparent */
  font-size: 1.5rem;
  /* Larger close button */
  line-height: 1;
  cursor: pointer;
  transition: color 0.3s ease, transform 0.3s ease;
}

.chat-close-btn:hover,
.chat-close-btn:focus {
  color: #fff;
  /* Fully opaque white on hover/focus */
  transform: scale(1.2);
  /* Slightly larger on hover */
  outline: none;
}

.chat-close-btn:active {
  transform: scale(0.95);
  /* Slightly smaller on click */
}



/* ============================================================================
   13. Animations & Transitions (General)
   ============================================================================ */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* @keyframes fadeInUp ... */
/* Define if needed */
/* @keyframes messageAppear ... */
/* Define if needed */
/* @keyframes fadeOut ... */
/* Define if needed */

/* ============================================================================
   14. Responsive Adjustments
   ============================================================================ */
@media (max-width: 768px) {

  .page {
    padding: 1.5rem;
    /* Reduce page padding */
    margin: 1rem auto;
    /* Reduce margin */
  }

  h1 {
    font-size: 1.8rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.2rem;
  }

  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  textarea,
  select {
    max-width: 100%;
  }

  /* Ensure inputs are full width */

  /* Adjust specific page layouts if needed */
  #login-page,
  #register-page {
    max-width: 90%;
    padding: 2rem;
  }

  .admin-analytics-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
  }

  .stat-card {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
    padding: 1rem;
  }

  .stat-icon {
    margin-bottom: 0.5rem;
  }

  .stat-value {
    font-size: 1.6rem;
  }

  .admin-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-filters {
    justify-content: center;
  }

  .admin-filters>* {
    flex-grow: 1;
  }

  /* Make filters take space */
  .admin-actions>button {
    width: 100%;
    text-align: center;
    margin-top: 0.5rem;
  }

  #admin-reports-container li {
    flex-direction: column;
  }

  .report-actions {
    width: 100%;
  }

  .forum-layout {
    grid-template-columns: 1fr;
  }

  /* Force single column */
  .forum-sidebar {
    margin-top: 2rem;
  }

  .chat-container {
    width: 90%;
    max-width: 300px;
  }
}

/* ============================================================================
   15. Map Styling & Popups
   ============================================================================ */
#map,
#admin-map,
#nearby-map {
  /* Style all maps */
  height: 300px;
  /* Standard height */
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-color);
}

@media (min-width: 768px) {

  #map,
  #admin-map,
  #nearby-map {
    height: 400px;
  }
}


.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  background: var(--white);
  border-radius: var(--input-radius);
  /* Match input radius */
  box-shadow: var(--shadow-medium);
  font-size: 0.9rem;
}

.leaflet-popup-content {
  line-height: 1.5;
}

.leaflet-popup-content img.popup-report-image {
  /* Class for map popup images */
  max-width: 150px;
  height: auto;
  margin-top: 8px;
  border-radius: var(--input-radius);
}

/* Popup Overlay */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  /* Darker overlay */
  display: none;
  /* Changed to none */
  justify-content: center;
  align-items: center;
  z-index: 1050;
  /* High z-index */
  opacity: 0;
  transition: opacity 0.3s ease;
}

.popup-overlay.show {
  /* Add class to show */
  display: flex;
  opacity: 1;
}

.popup {
  background: var(--white);
  padding: 25px 30px;
  /* More padding */
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-heavy);
  max-width: 400px;
  width: 90%;
  /* Responsive width */
  text-align: center;
  position: relative;
  animation: popupSlideIn 0.4s ease-out;
}

@keyframes popupSlideIn {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.popup-close {
  position: absolute;
  top: 10px;
  right: 12px;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
  color: var(--muted-color);
  transition: color 0.2s ease, transform 0.2s ease;
}

.popup-close:hover {
  color: var(--text-color);
  transform: rotate(90deg);
}

.popup-icon {
  font-size: 2.5rem;
  margin-bottom: 15px;
}

.popup p {
  margin-bottom: 0;
}

/* Remove default p margin inside popup */
#popup-message {
  font-size: 1.05rem;
  line-height: 1.5;
}


/* Popup Type-specific styling */
.popup.success {
  border-top: 4px solid var(--secondary-color);
}

.popup.error {
  border-top: 4px solid var(--error-color);
}

.popup.info {
  border-top: 4px solid var(--primary-color);
}

.popup.warning {
  border-top: 4px solid var(--accent-color);
}

/* Popup Points Indicator */
.popup-points-indicator {
  display: block;
  font-weight: bold;
  color: var(--secondary-color);
  /* Green */
  margin-top: 8px;
  font-size: 1.1em;
  animation: pointsPulse 1s ease-out;
}

@keyframes pointsPulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.15);
  }

  100% {
    transform: scale(1);
  }
}

/* ============================================================================
   16. Profile Page & Gamification Elements
   ============================================================================ */
#profile-page {
  /* Inherits .page styles */
  max-width: 800px;
  /* Specific max-width */
}

#profile-page h1 {
  text-align: center;
  color: var(--primary-color);
  margin-bottom: 2rem;
}


#profile-username {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.profile-summary p {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--muted-color);
}

.profile-summary p strong {
  color: var(--text-color);
  font-weight: 600;
}

#profile-level-name {
  /* Added span in HTML for level name */
  font-style: italic;
  color: var(--secondary-color);
  font-weight: 500;
}

.progress-bar-container {
  width: 100%;
  background-color: #e9ecef;
  border-radius: 5px;
  height: 12px;
  /* Slightly thicker */
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  /* Updated by JS */
  background: linear-gradient(90deg, var(--secondary-color), #86e3a0);
  /* Gradient fill */
  border-radius: 5px;
  transition: width 0.5s ease-out;
}

#rp-to-next-level {
  font-size: 0.9rem;
  color: var(--muted-color);
}

.profile-badges h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
  color: var(--primary-dark);
}

.badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  /* Adjust size */
  gap: 1.5rem;
  /* Increase gap */
}

.badge-item {
  text-align: center;
  padding: 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  background-color: #f8f9fa;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* Center content vertically */
  min-height: 150px;
  /* Ensure consistent height */
}

.badge-item:hover {
  transform: translateY(-5px) scale(1.03);
  box-shadow: var(--shadow-medium);
  border-color: var(--secondary-color);
}

.badge-icon {
  font-size: 2.8rem;
  /* Larger icon */
  display: block;
  margin-bottom: 0.8rem;
  line-height: 1;
  /* Prevent extra space */
}

.badge-name {
  font-weight: 600;
  /* Bolder name */
  font-size: 0.95rem;
  color: var(--text-color);
  margin-bottom: 0.3rem;
}

.badge-description {
  font-size: 0.8rem;
  color: var(--muted-color);
  line-height: 1.3;
}

#no-badges-message {
  grid-column: 1 / -1;
  /* Span full width */
  text-align: center;
  color: var(--muted-color);
  font-style: italic;
  padding: 2rem;
}

/* Nearby Reports Specific Styling */
#nearby-reports-page h1 {
  text-align: center;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  font-size: 2rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.nearby-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background-color: #f8f9fa;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
  border: 1px solid var(--border-color);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.nearby-controls:hover {
  box-shadow: var(--shadow-medium);
  transform: translateY(-3px);
}

.nearby-controls label {
  font-weight: 600;
  margin-right: 0.5rem;
  font-size: 1rem;
  color: var(--text-color);
}

.nearby-controls select {
  padding: 0.6rem 2rem 0.6rem 0.6rem;
  font-size: 1rem;
  min-width: 160px;
  border: 1px solid var(--border-color);
  border-radius: var(--input-radius);
  background-color: var(--white);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.nearby-controls select:hover,
.nearby-controls select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.15);
  outline: none;
}

.nearby-controls button {
  padding: 0.6rem 1.2rem;
  font-size: 1rem;
  background-color: var(--primary-color);
  color: var(--white);
  border: none;
  border-radius: var(--input-radius);
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.nearby-controls button:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

#nearby-status {
  text-align: center;
  color: var(--muted-color);
  margin-bottom: 1rem;
  font-style: italic;
  font-size: 0.95rem;
}

#nearby-reports-container {
  padding-left: 0;
}

.nearby-report-item {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1.2rem;
  margin-bottom: 1.2rem;
  box-shadow: var(--shadow-light);
  display: flex;
  gap: 1.2rem;
  align-items: center;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.nearby-report-item:hover {
  transform: translateX(6px);
  box-shadow: var(--shadow-medium);
  border-left: 4px solid var(--accent-color);
}

.nearby-report-info {
  flex-grow: 1;
}

.nearby-report-info p {
  margin-bottom: 0.3rem;
  font-size: 0.9rem;
}

.report-distance {
  color: var(--secondary-color);
  font-weight: 500;
}

.report-distance i {
  margin-right: 3px;
}

.nearby-report-image {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
}

.nearby-report-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--input-radius);
}

.nearby-report-image.no-image {
  background-color: #e9ecef;
  border-radius: var(--input-radius);
  /* Placeholder style */
}


/* ============================================================================
  Profile Details Card
  ============================================================================ */
.profile-details {
  margin-top: 2rem;
}

.profile-details h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--primary-dark);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.profile-details p {
  font-size: 1rem;
  color: var(--text-color);
  margin-bottom: 0.5rem;
}

.profile-details form {
  margin-top: 1rem;
}

.profile-details label {
  font-size: 0.95rem;
  color: var(--muted-color);
  font-weight: 500;
  margin-bottom: 0.5rem;
  display: block;
}

.profile-details input[type="text"] {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--input-radius);
  font-size: 1rem;
  flex-grow: 1;
  background-color: #f8f9fa;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.profile-details input[type="text"]:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.15);
  outline: none;
  background-color: var(--white);
}

.profile-details button {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-details button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.profile-details .form-message {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--muted-color);
}

/* ============================================================================
  Change Password Card
  ============================================================================ */
.change-password {
  margin-top: 2rem;
}

.change-password h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--primary-dark);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.change-password label {
  font-size: 0.95rem;
  color: var(--muted-color);
  font-weight: 500;
  margin-bottom: 0.5rem;
  display: block;
}

.change-password input[type="password"] {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--input-radius);
  font-size: 1rem;
  background-color: #f8f9fa;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.change-password input[type="password"]:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.15);
  outline: none;
  background-color: var(--white);
}

.change-password button {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.change-password button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.change-password .form-message {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--muted-color);
}

/* ============================================================================
  reCAPTCHA Styling
  ============================================================================ */
.recaptcha-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 1.5rem;
}

.recaptcha-container iframe {
  border: none;
  box-shadow: var(--shadow-light);
  border-radius: var(--border-radius);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.recaptcha-container iframe:hover {
  box-shadow: var(--shadow-medium);
  transform: translateY(-2px);
}

.recaptcha-container .recaptcha-error {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--error-color);
  text-align: center;
}

/* ============================================================================
   17. RP Notification Sidebar
   ============================================================================ */
.rp-notification-sidebar {
  position: fixed;
  bottom: 20px;
  right: 20px;
  min-width: 200px;
  max-width: 300px;
  background-color: #2a3035;
  /* Dark background */
  color: var(--white);
  padding: 15px 20px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-medium);
  display: flex;
  align-items: center;
  gap: 15px;
  z-index: 1100;
  /* Higher than popup overlay */
  opacity: 0;
  transform: translateX(120%);
  /* Start off-screen */
  visibility: hidden;
  transition: transform 0.4s ease-out, opacity 0.4s ease-out, visibility 0s linear 0.4s;
}

.rp-notification-sidebar.show {
  opacity: 1;
  transform: translateX(0);
  visibility: visible;
  transition: transform 0.4s ease-out, opacity 0.4s ease-out, visibility 0s linear 0s;
}

/* Optional Fade Out Animation */
.rp-notification-sidebar.fade-out {
  opacity: 0;
  transition: opacity 0.5s ease-out;
}


.rp-notification-sidebar .rp-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.rp-notification-sidebar .rp-message {
  flex-grow: 1;
  font-size: 0.95rem;
  line-height: 1.4;
}

.rp-notification-sidebar .rp-points {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--secondary-color);
  /* Green for points */
  white-space: nowrap;
}

@media (max-width: 480px) {
  .rp-notification-sidebar {
    right: 10px;
    bottom: 10px;
    left: 10px;
    /* Span more width on small screens */
    max-width: none;
    width: auto;
  }
}

/* Ensure popup point indicator (used only for registration now) has CSS */
.popup-points-indicator {
  display: inline-block;
  /* Changed from block */
  font-weight: bold;
  color: var(--secondary-color);
  /* Green */
  margin-left: 5px;
  /* Add space */
  font-size: 1em;
  /* Match surrounding text */
}

/* ============================================================================
   18. Voice Input Styles
   ============================================================================ */
.voice-input-container {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: 1rem;
}

.voice-input-btn {
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  cursor: pointer;
  box-shadow: var(--shadow-light);
  transition: background 0.3s ease, transform 0.3s ease;
}

.voice-input-btn:active,
.voice-input-btn.listening {
  background: var(--secondary-color);
  transform: scale(1.08);
  box-shadow: var(--shadow-medium);
}

.voice-input-btn:focus {
  box-shadow: 0 0 0 3px rgba(46, 164, 79, 0.2);
}

.voice-input-status {
  font-size: 0.98rem;
  color: var(--muted-color);
  font-style: italic;
  transition: color 0.3s;
}

.voice-input-btn.listening::after {
  content: '';
  position: absolute;
  top: -8px;
  left: -8px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid var(--secondary-color);
  animation: voicePulse 1s infinite;
  pointer-events: none;
}

@keyframes voicePulse {
  0% {
    opacity: 0.7;
    transform: scale(1);
  }

  70% {
    opacity: 0.2;
    transform: scale(1.25);
  }

  100% {
    opacity: 0;
    transform: scale(1.4);
  }
}

@media (max-width: 480px) {
  .voice-input-btn {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }

  .voice-input-btn.listening::after {
    width: 54px;
    height: 54px;
    top: -7px;
    left: -7px;
  }

  .voice-input-status {
    font-size: 0.9rem;
  }
}

/* Sticky Trending Posts */
:root {
  --nav-h: 56px;
  /* fallback if JS hasn't measured yet */
  --sticky-gap: 20px;
  /* <= change this to the gap you want */
  --nav-shadow-pad: 8px;
  /* extra space for the navbar's back card/shadow */
}

/* Ensure sticky works inside the grid */
.forum-layout {
  overflow: visible;
}

/* Make the WHOLE sidebar sticky */
.forum-sidebar {
  position: sticky;
  top: calc(var(--nav-h) + var(--sticky-gap) + var(--nav-shadow-pad));
  align-self: start;
  z-index: 1;
  /* below navbar */
}

/* We no longer need the inner box (#trending-posts) to be sticky */
#trending-posts {
  position: static;
}

/* Trending list only scrolls on hover (same look as your main cards) */
#trending-container {
  max-height: calc(100vh - var(--nav-h) - var(--sticky-gap) - var(--trend-head) - 16px);
  overflow: hidden;
  padding-right: 8px;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
}

#trending-container:hover {
  overflow: auto;
}

/* Card parity */
.post-card {
  background: var(--white, #fff);
  border: 1px solid var(--muted, #e5eef5);
  border-radius: var(--radius, 18px);
  box-shadow: 0 8px 20px rgba(2, 6, 23, .06);
  padding: 12px 14px;
  display: grid;
  gap: 6px;
}

pre {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

