/* ==========================================================================
   TERRAVIVA INTELIGÊNCIA AMBIENTAL - STYLE SYSTEM
   Custom Premium Design Framework (Montserrat & Open Sans)
   ========================================================================== */

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

/* Brand Design Tokens */
:root {
  --primary-green: #1E4D38;
  --primary-green-rgb: 30, 77, 56;
  --accent-orange: #D86A1E;
  --accent-orange-rgb: 216, 106, 30;
  --bege-terra: #B88B62;
  --bege-terra-rgb: 184, 139, 98;
  --neutral-graphite: #3A3A3A;
  
  /* Gradients */
  --grad-forest: linear-gradient(135deg, #1E4D38 0%, #0D261A 100%);
  --grad-orange: linear-gradient(135deg, #D86A1E 0%, #B8500C 100%);
  --grad-earth: linear-gradient(135deg, #B88B62 0%, #8C623C 100%);
  --grad-light: linear-gradient(135deg, #F9FBF9 0%, #EDF2EE 100%);
  --grad-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.4) 100%);
  --grad-dark-glass: linear-gradient(135deg, rgba(20, 26, 23, 0.95) 0%, rgba(10, 14, 12, 0.9) 100%);
  
  /* Standard Neutrals */
  --text-dark: #222222;
  --text-light: #F4F7F5;
  --text-muted: #6B7280;
  --border-light: rgba(30, 77, 56, 0.12);
  --border-dark: rgba(255, 255, 255, 0.08);
  --bg-light: #F4F6F4;
  --bg-dark: #0A0D0B;
  
  /* Layout tokens */
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.2s ease;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 4px 10px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 10px 25px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 20px 45px rgba(0, 0, 0, 0.1);
  --shadow-orange: 0 8px 24px rgba(216, 106, 30, 0.25);
  --shadow-green: 0 8px 24px rgba(30, 77, 56, 0.2);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-light);
  overflow-x: hidden;
}

body {
  font-family: 'Open Sans', sans-serif;
  color: var(--text-dark);
  line-height: 1.6;
  background-color: var(--bg-light);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  line-height: 1.25;
  color: var(--primary-green);
}

/* Scroll progress indicator */
.scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  background: var(--grad-orange);
  width: 0%;
  z-index: 2000;
  box-shadow: 0 0 10px rgba(216, 106, 30, 0.5);
  transition: width 0.1s ease;
}

/* Layout Classes */
.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
}

@media (max-width: 768px) {
  .container {
    padding: 0 20px;
  }
}

/* Header & Navigation */
.navbar-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: var(--transition-smooth);
  border-bottom: 1px solid transparent;
}

.navbar-header.scrolled {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid rgba(30, 77, 56, 0.08);
  padding: 10px 0;
}

.navbar-header:not(.scrolled) {
  padding: 20px 0;
  background: transparent;
}

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

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  gap: 12px;
}

.logo-img {
  height: 48px;
  width: auto;
  transition: var(--transition-smooth);
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--primary-green);
  letter-spacing: -0.5px;
}

.logo-subtitle {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--bege-terra);
  letter-spacing: 2px;
  margin-top: -2px;
}

/* Unscrolled state styles (white text logos or dark logo compatibility) */
.navbar-header:not(.scrolled) .logo-title {
  color: #ffffff;
}
.navbar-header:not(.scrolled) .logo-subtitle {
  color: rgba(255, 255, 255, 0.8);
}
.navbar-header:not(.scrolled) .nav-link {
  color: rgba(255, 255, 255, 0.9);
}
.navbar-header:not(.scrolled) .nav-link:hover {
  color: var(--accent-orange);
}
.navbar-header:not(.scrolled) .btn-nav-outline {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.4);
}
.navbar-header:not(.scrolled) .btn-nav-outline:hover {
  background: #ffffff;
  color: var(--primary-green);
  border-color: #ffffff;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-link {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--neutral-graphite);
  text-decoration: none;
  transition: var(--transition-fast);
  position: relative;
  padding: 6px 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background-color: var(--accent-orange);
  transition: var(--transition-fast);
}

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

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Buttons System */
.btn-premium {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition-smooth);
}

.btn-primary {
  background: var(--grad-orange);
  color: #ffffff;
  box-shadow: var(--shadow-orange);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(216, 106, 30, 0.4);
}

.btn-secondary {
  background: var(--grad-forest);
  color: #ffffff;
  box-shadow: var(--shadow-green);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(30, 77, 56, 0.4);
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--primary-green);
  color: var(--primary-green);
}

.btn-outline:hover {
  background: var(--primary-green);
  color: #ffffff;
  transform: translateY(-2px);
}

.btn-nav-outline {
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  border: 1.5px solid rgba(30, 77, 56, 0.25);
  color: var(--primary-green);
  background: transparent;
  text-decoration: none;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  transition: var(--transition-fast);
}

.btn-nav-outline:hover {
  background: var(--primary-green);
  color: white;
  border-color: var(--primary-green);
}

/* Mobile Toggle */
.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.8rem;
  color: var(--primary-green);
  cursor: pointer;
}

/* Hero Section */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  overflow: hidden;
  background-color: var(--bg-dark);
}

.hero-bg-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('../assets/images/localizacao.jpg');
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
  filter: brightness(0.35);
  z-index: 1;
}

.hero-overlay-gradient {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(13, 22, 17, 0.7) 0%, rgba(10, 13, 11, 0.9) 100%);
  z-index: 2;
}

.hero-container {
  position: relative;
  z-index: 3;
  width: 100%;
  text-align: center;
  padding-top: 80px; /* Adjusted padding to accommodate the new logo */
}

/* Large Centered Logo Styling */
.hero-logo-box {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 24px;
}

.hero-logo-img {
  width: 130px;
  height: auto;
  filter: drop-shadow(0 0 25px rgba(30, 77, 56, 0.55)) drop-shadow(0 0 8px rgba(216, 106, 30, 0.25));
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  animation: logo-subtle-float 6s ease-in-out infinite alternate;
}

.hero-logo-img:hover {
  transform: scale(1.06) rotate(2deg);
  filter: drop-shadow(0 0 35px rgba(30, 77, 56, 0.75)) drop-shadow(0 0 12px rgba(216, 106, 30, 0.4));
}

@keyframes logo-subtle-float {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-8px);
  }
}


.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(216, 106, 30, 0.15);
  border: 1px solid rgba(216, 106, 30, 0.3);
  color: #ff9d5c;
  padding: 8px 18px;
  border-radius: 50px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 28px;
  backdrop-filter: blur(10px);
}

.hero-badge i {
  color: var(--accent-orange);
}

.hero-title {
  color: #ffffff;
  font-size: 3.5rem;
  font-weight: 800;
  letter-spacing: -1.5px;
  max-width: 1000px;
  margin: 0 auto 20px auto;
  text-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.hero-title span {
  background: linear-gradient(120deg, #ff9f59, #b88b62);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: rgba(244, 247, 245, 0.8);
  max-width: 750px;
  margin: 0 auto 40px auto;
  font-weight: 400;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero-ctas {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

/* Scroll indicator mouse */
.scroll-indicator-mouse {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.5);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: var(--transition-fast);
}

.scroll-indicator-mouse:hover {
  color: #ffffff;
}

.mouse-frame {
  width: 26px;
  height: 42px;
  border: 2px solid rgba(255,255,255,0.4);
  border-radius: 20px;
  position: relative;
}

.mouse-wheel {
  width: 4px;
  height: 8px;
  background-color: var(--accent-orange);
  border-radius: 2px;
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  animation: mouseScroll 1.8s infinite ease-in-out;
}

@keyframes mouseScroll {
  0% { top: 8px; opacity: 0; }
  30% { opacity: 1; }
  100% { top: 22px; opacity: 0; }
}

/* Sections Global Structure */
.section-padding {
  padding: 100px 0;
}

.section-dark {
  background-color: var(--bg-dark);
  color: white;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 60px auto;
}

.section-label {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent-orange);
  margin-bottom: 12px;
  display: block;
}

.section-main-title {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.8px;
  color: var(--primary-green);
  margin-bottom: 16px;
}

.section-dark .section-main-title {
  color: #ffffff;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
}

.section-dark .section-desc {
  color: rgba(255,255,255,0.6);
}

/* Services Cards Section */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

@media (max-width: 1200px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
}

.service-card {
  background: white;
  border-radius: var(--radius-md);
  padding: 40px 30px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--grad-forest);
  opacity: 0;
  transition: var(--transition-smooth);
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(30, 77, 56, 0.15);
}

.service-card:hover::before {
  opacity: 1;
}

.service-card-orange::before {
  background: var(--grad-orange);
}

.service-icon-box {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  background: rgba(30, 77, 56, 0.06);
  color: var(--primary-green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin-bottom: 28px;
  transition: var(--transition-smooth);
}

.service-card-orange .service-icon-box {
  background: rgba(216, 106, 30, 0.06);
  color: var(--accent-orange);
}

.service-card:hover .service-icon-box {
  background: var(--primary-green);
  color: white;
  transform: scale(1.05);
}

.service-card-orange:hover .service-icon-box {
  background: var(--accent-orange);
}

.service-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 14px;
  letter-spacing: -0.3px;
}

.service-text {
  font-size: 0.92rem;
  color: var(--text-muted);
  flex-grow: 1;
}

/* WebGIS Geoportal Section */
.geoportal-section {
  padding: 0;
  background-color: var(--bg-dark);
  position: relative;
}

.geoportal-container {
  display: grid;
  grid-template-columns: 360px 1fr;
  height: 850px;
  width: 100%;
  position: relative;
}

@media (max-width: 992px) {
  .geoportal-container {
    grid-template-columns: 1fr;
    grid-template-rows: auto 550px;
    height: auto;
  }
}

/* Sidebar Styling */
.geoportal-sidebar {
  background: var(--grad-dark-glass);
  border-right: 1px solid var(--border-dark);
  display: flex;
  flex-direction: column;
  height: 100%;
  z-index: 10;
  overflow: hidden;
}

@media (max-width: 992px) {
  .geoportal-sidebar {
    height: 500px;
    border-right: none;
    border-bottom: 1px solid var(--border-dark);
  }
}

.sidebar-header {
  padding: 24px;
  border-bottom: 1px solid var(--border-dark);
}

.sidebar-title-wrapper {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-main-title {
  color: white;
  font-size: 1.15rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-main-title i {
  color: var(--accent-orange);
}

.sidebar-badge {
  align-self: flex-start;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--bege-terra);
  background: rgba(184, 139, 98, 0.1);
  padding: 4px 8px;
  border-radius: 4px;
  margin-top: 4px;
}

.sidebar-scrollable {
  flex-grow: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* Custom Scrollbar for dark sidepanel */
.sidebar-scrollable::-webkit-scrollbar {
  width: 6px;
}
.sidebar-scrollable::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar-scrollable::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}
.sidebar-scrollable::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

.sidebar-panel-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  color: #ff9f59;
  letter-spacing: 1px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* CAR Search Box */
.search-box-wrapper {
  position: relative;
}

.search-input-group {
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: var(--transition-fast);
}

.search-input-group:focus-within {
  border-color: var(--accent-orange);
  box-shadow: 0 0 10px rgba(216, 106, 30, 0.2);
}

.search-field {
  flex-grow: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 12px 16px;
  color: white;
  font-family: 'Open Sans', sans-serif;
  font-size: 0.85rem;
}

.search-field::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.search-submit-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  padding: 0 16px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.search-submit-btn:hover {
  color: var(--accent-orange);
}

.suggestions-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: #141a17;
  border: 1px solid var(--border-dark);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  z-index: 100;
  box-shadow: var(--shadow-lg);
  max-height: 200px;
  overflow-y: auto;
}

.suggestion-row {
  padding: 10px 16px;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: var(--transition-fast);
}

.suggestion-row:hover {
  background: rgba(216, 106, 30, 0.15);
  color: #ffffff;
}

/* Basemap Switcher Grid */
.basemap-option-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.basemap-button-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-sm);
  padding: 12px 8px;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.7rem;
  transition: var(--transition-fast);
}

.basemap-button-card i {
  font-size: 1.15rem;
}

.basemap-button-card:hover {
  background: rgba(255, 255, 255, 0.08);
  color: white;
}

.basemap-button-card.active {
  background: rgba(30, 77, 56, 0.2);
  border-color: var(--primary-green);
  color: #2ec4b6;
}

/* Layer Control List */
.layers-group-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.layer-control-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.layer-click-trigger {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  flex-grow: 1;
}

.layer-bullet-color {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.layer-labels-box {
  display: flex;
  flex-direction: column;
}

.layer-name-title {
  color: white;
  font-size: 0.85rem;
  font-weight: 600;
}

.layer-name-desc {
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.4);
}

/* Styled Switch Checkbox toggle */
.switch-control {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 20px;
}

.switch-control input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-knob {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.1);
  transition: .3s;
  border-radius: 34px;
}

.switch-knob:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .switch-knob {
  background-color: var(--accent-orange);
}

input:checked + .switch-knob:before {
  transform: translateX(18px);
}

/* Real-time stats grid side panel */
.sidebar-stats-box {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.stat-cell {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-sm);
  padding: 12px;
}

.stat-cell-title {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.stat-cell-value {
  color: white;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
}

.stat-cell-unit {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--bege-terra);
}

.sidebar-logo-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-dark);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.3);
}

/* Leaflet Map Interactive Box */
#leaflet-webgis-map {
  width: 100%;
  height: 100%;
  background-color: var(--bg-dark);
  position: relative;
}

/* Custom Coordinate Display Box */
.map-coords-badge {
  position: absolute;
  bottom: 20px;
  left: 20px;
  background: rgba(10, 13, 11, 0.8);
  border: 1px solid var(--border-dark);
  color: rgba(255, 255, 255, 0.6);
  padding: 6px 12px;
  border-radius: 50px;
  font-size: 0.72rem;
  font-family: monospace;
  z-index: 999;
  backdrop-filter: blur(10px);
  pointer-events: none;
}

/* Floating custom toolbar inside Leaflet */
.map-floating-utility-panel {
  position: absolute;
  top: 20px;
  left: 20px;
  right: auto;
  z-index: 1005;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gis-tool-button {
  width: 44px;
  height: 44px;
  background: rgba(10, 13, 11, 0.85);
  border: 1px solid var(--border-dark);
  color: white;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: var(--shadow-md);
  transition: var(--transition-fast);
  backdrop-filter: blur(10px);
}

.gis-tool-button:hover {
  background: var(--accent-orange);
  color: white;
  border-color: var(--accent-orange);
  transform: translateY(-2px);
}

.gis-tool-button.active {
  background: var(--accent-orange);
  color: white;
  border-color: var(--accent-orange);
}

/* Popups Design for Leaflet */
.leaflet-popup-content-wrapper {
  background: #141a17 !important;
  color: white !important;
  border-radius: var(--radius-sm) !important;
  border: 1px solid var(--border-dark) !important;
  box-shadow: var(--shadow-lg) !important;
}

.leaflet-popup-tip {
  background: #141a17 !important;
}

.gis-popup-content-box {
  padding: 4px;
}

.gis-popup-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  color: #ff9f59;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--border-dark);
  padding-bottom: 6px;
}

.gis-popup-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 0.75rem;
  padding: 4px 0;
}

.gis-popup-lbl {
  color: rgba(255, 255, 255, 0.5);
  font-weight: 600;
}

.gis-popup-val {
  color: white;
  font-weight: 600;
}

/* Floating Chart Dashboard on Map */
.map-floating-dashboard {
  position: absolute;
  bottom: 20px;
  right: 20px;
  z-index: 999;
  width: 420px;
  background: rgba(10, 13, 11, 0.92);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(15px);
  display: none; /* Controlled by JS */
}

.floating-dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 8px;
}

.floating-dashboard-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.82rem;
  color: white;
  display: flex;
  align-items: center;
  gap: 8px;
}

.floating-dashboard-title i {
  color: var(--accent-orange);
}

.floating-dashboard-close {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  font-size: 1.15rem;
  transition: var(--transition-fast);
}

.floating-dashboard-close:hover {
  color: white;
}

.floating-chart-canvas-box {
  position: relative;
  height: 180px;
  width: 100%;
}

/* Map Loader Preloader Screen */
.geoportal-loader-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-dark);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  transition: var(--transition-smooth);
}

/* Premium CORS Alert Toast */
.map-cors-alert-toast {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1010;
  width: 90%;
  max-width: 600px;
  background: rgba(10, 13, 11, 0.95);
  border: 1px solid rgba(216, 106, 30, 0.4);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(15px);
  padding: 16px;
  transition: opacity 0.4s ease;
  animation: slide-down-fade 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slide-down-fade {
  from {
    opacity: 0;
    transform: translate(-50%, -20px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.cors-alert-content {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  position: relative;
}

.cors-alert-icon {
  font-size: 1.5rem;
  color: var(--accent-orange);
  margin-top: 2px;
}

.cors-alert-text-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-right: 24px;
}

.cors-alert-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  color: white;
}

.cors-alert-message {
  font-size: 0.72rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.7);
}

.cors-alert-status {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--bege-terra);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.cors-alert-close-btn {
  position: absolute;
  top: -2px;
  right: -2px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  font-size: 1.2rem;
  transition: var(--transition-fast);
}

.cors-alert-close-btn:hover {
  color: white;
}

.geoportal-loader-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(30, 77, 56, 0.2);
  border-top-color: var(--accent-orange);
  border-radius: 50%;
  animation: spinner-rotate 1s linear infinite;
}

.geoportal-loader-text {
  color: rgba(255, 255, 255, 0.7);
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
}

@keyframes spinner-rotate {
  to { transform: rotate(360deg); }
}


/* Case Study Section */
.case-study-section {
  background: var(--grad-light);
}

.case-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
}

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

.case-visual-panel {
  position: relative;
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-light);
}

.case-img-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.case-map-image-wrapper {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-light);
  aspect-ratio: 4/3;
}

.case-map-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.case-map-image-wrapper:hover img {
  transform: scale(1.03);
}

.case-map-tag {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--primary-green);
  color: white;
  padding: 6px 12px;
  border-radius: 4px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 0.5px;
}

.case-map-tag.tag-orange {
  background: var(--accent-orange);
}

/* Dynamic Stats Grid for Case */
.case-stats-panel-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

@media (max-width: 576px) {
  .case-stats-panel-grid {
    grid-template-columns: 1fr;
  }
}

.case-stat-metric-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 24px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition: var(--transition-smooth);
}

.case-stat-metric-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(30, 77, 56, 0.15);
}

.case-stat-metric-num {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 1.8rem;
  color: var(--accent-orange);
  margin-bottom: 6px;
}

.case-stat-metric-num-green {
  color: var(--primary-green);
}

.case-stat-metric-lbl {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  line-height: 1.3;
}

.case-content-box .section-label {
  margin-bottom: 8px;
}

.case-paragraph {
  color: var(--text-muted);
  font-size: 0.98rem;
  margin-bottom: 24px;
}

.case-list-features {
  list-style: none;
  margin-bottom: 36px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.case-list-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.95rem;
  color: var(--neutral-graphite);
}

.case-list-item i {
  color: var(--primary-green);
  font-size: 1.2rem;
  margin-top: 2px;
}

/* About / Manifesto Section */
.about-section {
  background-color: #ffffff;
  position: relative;
}

.about-bg-curves {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100%25' height='100%25' viewBox='0 0 1600 800'%3E%3Cpath d='M-100,500 C400,200 800,700 1700,400' fill='none' stroke='rgba(30, 77, 56, 0.025)' stroke-width='6'/%3E%3Cpath d='M-100,600 C300,300 700,800 1700,500' fill='none' stroke='rgba(30, 77, 56, 0.015)' stroke-width='4'/%3E%3C/svg%3E");
  background-size: cover;
  z-index: 1;
}

.about-container {
  position: relative;
  z-index: 2;
}

.about-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 80px;
  align-items: center;
}

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

.about-text-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.about-quote {
  border-left: 4px solid var(--bege-terra);
  padding-left: 20px;
  font-size: 1.1rem;
  font-style: italic;
  color: var(--primary-green);
  font-weight: 500;
}

.about-bullets-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 20px;
}

@media (max-width: 576px) {
  .about-bullets-grid {
    grid-template-columns: 1fr;
  }
}

.about-bullet-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.about-bullet-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--primary-green);
  display: flex;
  align-items: center;
  gap: 8px;
}

.about-bullet-title i {
  color: var(--accent-orange);
}

.about-bullet-text {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.about-manifesto-box {
  background: var(--grad-forest);
  border-radius: var(--radius-lg);
  padding: 50px;
  color: white;
  box-shadow: var(--shadow-lg);
}

.manifesto-title {
  color: white;
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 20px;
}

.manifesto-body {
  font-family: 'Open Sans', sans-serif;
  font-size: 1rem;
  line-height: 1.8;
  opacity: 0.85;
}

.manifesto-body p {
  margin-bottom: 16px;
}

/* Technology Section */
.tech-section {
  background: #fbfcfb;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.tech-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
  align-items: center;
}

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

.tech-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tech-partnership-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent-orange);
  background: rgba(216, 106, 30, 0.08);
  padding: 6px 12px;
  border-radius: 4px;
  align-self: flex-start;
}

.tech-partners-logos {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.tech-logo-card {
  background: white;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-fast);
}

.tech-logo-card:hover {
  border-color: rgba(30, 77, 56, 0.15);
  box-shadow: var(--shadow-md);
}

.tech-logo-icon {
  width: 56px;
  height: 56px;
  background: rgba(30, 77, 56, 0.04);
  color: var(--primary-green);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 1.6rem;
}

.tech-logo-card-orange .tech-logo-icon {
  background: rgba(216, 106, 30, 0.04);
  color: var(--accent-orange);
}

.tech-logo-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--primary-green);
}

.tech-logo-card-orange .tech-logo-title {
  color: var(--accent-orange);
}

.tech-logo-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Contact Section */
.contact-section {
  background-color: var(--bg-light);
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 60px;
}

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

.contact-info-panel {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.contact-info-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.contact-links-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-link-row {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: var(--neutral-graphite);
  transition: var(--transition-fast);
}

.contact-link-row:hover {
  color: var(--primary-green);
}

.contact-link-icon {
  width: 48px;
  height: 48px;
  background: white;
  border-radius: 50%;
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--primary-green);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-fast);
}

.contact-link-row:hover .contact-link-icon {
  background: var(--primary-green);
  color: white;
  transform: scale(1.05);
}

.contact-link-labels {
  display: flex;
  flex-direction: column;
}

.contact-link-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.contact-link-val {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
}

/* Contact Form */
.contact-form-panel {
  background: white;
  border-radius: var(--radius-lg);
  padding: 50px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-md);
}

@media (max-width: 576px) {
  .contact-form-panel {
    padding: 30px 20px;
  }
}

.form-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.form-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 30px;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}

@media (max-width: 576px) {
  .form-grid-2 {
    grid-template-columns: 1fr;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}

.form-group-last {
  margin-bottom: 30px;
}

.form-label {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--primary-green);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-control-input {
  background: var(--bg-light);
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-family: 'Open Sans', sans-serif;
  font-size: 0.9rem;
  color: var(--text-dark);
  outline: none;
  transition: var(--transition-fast);
}

.form-control-input:focus {
  background: white;
  border-color: var(--primary-green);
  box-shadow: 0 0 10px rgba(30, 77, 56, 0.1);
}

.form-control-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-notification {
  display: none; /* Controlled by JS */
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.form-notification.success {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.form-notification.error {
  background: rgba(239, 68, 68, 0.1);
  color: #b91c1c;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* WhatsApp Floating Button */
.whatsapp-float-bubble {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background: #25d366;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.1rem;
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.35);
  z-index: 1000;
  text-decoration: none;
  transition: var(--transition-smooth);
}

.whatsapp-float-bubble:hover {
  transform: scale(1.08) translateY(-4px);
  box-shadow: 0 12px 30px rgba(37, 211, 102, 0.5);
}

/* Corporate Footer */
.corporate-footer {
  background-color: var(--bg-dark);
  color: white;
  border-top: 1px solid var(--border-dark);
  padding: 80px 0 30px 0;
}

.footer-top-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  gap: 60px;
  margin-bottom: 60px;
}

@media (max-width: 992px) {
  .footer-top-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

.footer-about-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-about-col .logo-title {
  color: white;
}

.footer-about-col .logo-subtitle {
  color: rgba(255, 255, 255, 0.6);
}

.footer-about-desc {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.7;
}

.footer-socials {
  display: flex;
  gap: 12px;
}

.social-icon-btn {
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-dark);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  text-decoration: none;
  transition: var(--transition-fast);
}

.social-icon-btn:hover {
  background: var(--accent-orange);
  color: white;
  border-color: var(--accent-orange);
  transform: translateY(-2px);
}

.footer-col-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.88rem;
  text-transform: uppercase;
  color: white;
  letter-spacing: 1px;
  margin-bottom: 24px;
  position: relative;
  padding-bottom: 8px;
}

.footer-col-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background: var(--bege-terra);
}

.footer-links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-lnk {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.88rem;
  text-decoration: none;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 6px;
}

.footer-lnk:hover {
  color: var(--accent-orange);
  transform: translateX(4px);
}

.footer-contact-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.5);
}

.footer-contact-row i {
  color: var(--bege-terra);
  font-size: 1.15rem;
  margin-top: 2px;
}

.footer-bottom-bar {
  border-top: 1px solid var(--border-dark);
  padding-top: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.4);
}

@media (max-width: 768px) {
  .footer-bottom-bar {
    flex-direction: column;
    gap: 14px;
    text-align: center;
  }
}

.footer-copyright {
  font-weight: 500;
}

.footer-designer {
  display: flex;
  align-items: center;
  gap: 4px;
}

.footer-designer i {
  color: var(--accent-orange);
}

/* Sidebar Custom Action Button */
.btn-sidebar-action {
  background: var(--grad-orange);
  color: #ffffff;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-orange);
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-sidebar-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(216, 106, 30, 0.45);
}

.btn-sidebar-action.active {
  background: var(--grad-forest);
  box-shadow: var(--shadow-green);
}

/* ==========================================================================
   LIVE MAP SWIPE COMPARATOR SYSTEM
   ========================================================================== */

/* Draggable Vertical Slider Handle Bar on the map */
.map-swipe-slider-bar {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  background: var(--accent-orange);
  cursor: ew-resize;
  z-index: 1000; /* Above Leaflet layers but below UI alerts */
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.6);
  pointer-events: all;
  transform: translateX(-2px);
}

.map-swipe-slider-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  background: rgba(10, 13, 11, 0.95);
  border: 2px solid var(--accent-orange);
  border-radius: 50%;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.55);
  font-size: 1.15rem;
  pointer-events: none; /* Let events trigger on the bar */
  transition: background 0.2s ease, transform 0.2s ease;
}

.map-swipe-slider-bar:hover .map-swipe-slider-handle,
.map-swipe-slider-bar:active .map-swipe-slider-handle {
  background: var(--grad-orange);
  transform: translate(-50%, -50%) scale(1.08);
}

/* Live Map Swipe active toast/badge */
.map-swipe-active-badge {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1005;
  background: rgba(10, 13, 11, 0.9);
  border: 1px solid var(--border-dark);
  color: #ffffff;
  padding: 8px 18px;
  border-radius: 30px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  animation: slideDownIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.map-swipe-active-badge i {
  color: var(--accent-orange);
  font-size: 1rem;
}

.map-swipe-active-close-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  border-radius: 50%;
  transition: var(--transition-fast);
  margin-left: 4px;
}

.map-swipe-active-close-btn:hover {
  color: var(--accent-orange);
  background: rgba(255, 255, 255, 0.08);
}

@keyframes slideDownIn {
  from {
    transform: translate(-50%, -30px);
    opacity: 0;
  }
  to {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}

/* Ensure Leaflet image element transitions and CSS clip paths render perfectly in map container */
.leaflet-image-layer {
  will-change: clip-path, filter;
  transition: filter 0.3s ease;
}

/* ==========================================================================
   FLOATING GIS THEMATIC MAP LEGEND
   ========================================================================== */
.map-floating-legend {
  position: absolute;
  top: 198px; /* Sits elegantly below the floating utility panel */
  left: 20px;
  right: auto;
  z-index: 1000;
  width: 220px;
  background: rgba(10, 13, 11, 0.9);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-sm);
  padding: 14px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(15px);
  color: white;
  font-family: 'Open Sans', sans-serif;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.legend-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 8px;
  margin-bottom: 10px;
}

.legend-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
  color: white;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-title i {
  color: var(--accent-orange);
}

.legend-content-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.legend-content-section:last-child {
  margin-bottom: 0;
}

.legend-subtitle {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--bege-terra);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend-color-box {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
}

.legend-label {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
}

/* ==========================================================================
   NDVI TEMPORAL COMPARISON MODAL (SWIPE MODAL)
   ========================================================================== */
.comparison-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(8, 10, 9, 0.85);
  backdrop-filter: blur(10px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.comparison-modal-backdrop.show {
  opacity: 1;
  pointer-events: all;
}

.comparison-modal-card {
  width: 100%;
  max-width: 900px;
  background: rgba(18, 24, 20, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: 90vh;
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.comparison-modal-backdrop.show .comparison-modal-card {
  transform: scale(1);
}

.comparison-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.comparison-modal-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  color: white;
  display: flex;
  align-items: center;
  gap: 10px;
  text-transform: uppercase;
}

.comparison-modal-title i {
  color: var(--accent-orange);
}

.comparison-modal-close-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  padding: 4px;
}

.comparison-modal-close-btn:hover {
  color: white;
  transform: rotate(90deg);
}

.comparison-modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
}

.comparison-modal-desc {
  font-size: 0.8rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}

/* Modal Swipe UI elements */
.modal-swipe-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  max-height: 55vh;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
  user-select: none;
}

.modal-swipe-bg, .modal-swipe-fg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.modal-swipe-fg {
  z-index: 2;
  clip-path: inset(0 0 0 50%); /* Init at 50% */
  transition: none;
}

.modal-swipe-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.swipe-year-tag {
  position: absolute;
  bottom: 16px;
  background: rgba(10, 13, 11, 0.85);
  color: white;
  padding: 6px 12px;
  border-radius: 4px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.5px;
  backdrop-filter: blur(5px);
  z-index: 10;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.swipe-year-tag.left {
  left: 16px;
}

.swipe-year-tag.right {
  right: 16px;
}

/* Modal vertical slider bar handle */
.modal-swipe-handle {
  position: absolute;
  top: 0;
  left: 50%;
  width: 3px;
  height: 100%;
  background: var(--accent-orange);
  cursor: ew-resize;
  z-index: 15;
  transform: translateX(-50%);
}

.modal-swipe-arrow-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 38px;
  height: 38px;
  background: var(--accent-orange);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
  transition: transform 0.2s ease;
  font-size: 1.1rem;
}

.modal-swipe-handle:hover .modal-swipe-arrow-circle,
.modal-swipe-handle:active .modal-swipe-arrow-circle {
  transform: translate(-50%, -50%) scale(1.1);
  background: #f17b2b;
}

/* ==========================================================================
   MOBILE RESPONSIVE NAVIGATION OVERLAY (Drawer)
   ========================================================================== */
@media (max-width: 768px) {
  .mobile-nav-toggle {
    display: block !important;
    color: #ffffff;
    z-index: 1001;
  }
  
  /* Scrolled header menu toggle styling */
  .navbar-header.scrolled .mobile-nav-toggle {
    color: var(--primary-green) !important;
  }
  
  .nav-menu {
    display: none; /* Controlled dynamically by JS */
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 2px solid var(--border-light);
    box-shadow: var(--shadow-md);
    padding: 24px 40px;
    gap: 16px;
    align-items: flex-start;
    z-index: 999;
    animation: mobileMenuFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }

  /* Not scrolled header drop menu glass style */
  .navbar-header:not(.scrolled) .nav-menu {
    background: rgba(20, 26, 23, 0.98);
    border-bottom-color: var(--border-dark);
    backdrop-filter: blur(15px);
  }

  .navbar-header:not(.scrolled) .nav-menu .nav-link {
    color: rgba(255, 255, 255, 0.9);
  }
  
  .nav-link {
    font-size: 1.05rem;
    width: 100%;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  }

  .navbar-header:not(.scrolled) .nav-link {
    border-bottom-color: rgba(255, 255, 255, 0.08);
  }
  
  .nav-link::after {
    display: none !important;
  }
  
  .nav-actions {
    gap: 12px;
  }

  /* Hide header button on small mobile views to prevent overlap with logo */
  #header-geoportal-btn {
    display: none !important;
  }

  /* GIS Portal Mobile Optimization */
  .geoportal-container {
    grid-template-rows: auto 450px !important;
  }

  .geoportal-sidebar {
    height: 380px !important;
  }

  .map-coords-badge {
    bottom: 10px !important;
    left: 10px !important;
    padding: 4px 10px !important;
    font-size: 0.65rem !important;
  }

  .map-floating-utility-panel {
    top: 10px !important;
    left: 10px !important;
    gap: 6px !important;
  }

  .gis-tool-button {
    width: 38px !important;
    height: 38px !important;
    font-size: 1rem !important;
  }

  .map-floating-legend {
    top: 145px !important;
    left: 10px !important;
    width: 190px !important;
    padding: 10px !important;
  }

  .map-floating-dashboard {
    bottom: 10px !important;
    right: 10px !important;
    left: 10px !important;
    width: auto !important;
    padding: 12px !important;
  }
}

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


