/* style.css (clean, valid, de-duplicated) */
html, body {
  width: 100%;
  overflow-x: hidden;
}

:root {
  --bg: #0b1824;
  --bg-alt: #121f2d;
  --accent: #1abc9c;
  --accent-soft: rgba(26, 188, 156, 0.15);
  --accent-strong: #16a085;
  --text: #ecf0f1;
  --muted: #95a5a6;
  --danger: #e74c3c;
  --card-border: #223245;
  --text-light: #95a5a6;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #1b2a3d 0, #020711 70%);
  color: var(--text);
}

/* =========================
   Layout
   ========================= */
.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 20px;
}

/* =========================
   Header / nav
   ========================= */
.site-header {
  background: rgba(2, 10, 25, 0.95);
  border-bottom: 1px solid #1f3147;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
}

.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-group,
.logo-group a,
.logo-group img {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

.logo-group img {
    display: block;
}


.logo-text {
  font-size: 1.2rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.5px;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
}

/* Global link style (pill) */
a {
  display: inline-block;
  padding: 4px 10px;
  font-size: 0.9rem;
  color: var(--accent);
  background: rgba(26, 188, 156, 0.08);
  border: 1px solid rgba(26, 188, 156, 0.25);
  border-radius: 6px;
  text-decoration: none;
  transition: 0.2s;
}

a:hover {
  background: var(--accent);
  color: #0a1a1f;
  border-color: var(--accent);
}

/* Nav links as clean text */
.nav-links a {
  display: inline;
  padding: 10 !important;
  margin: 10 !important;
  background: none !important;
  border: none !important;
  color: #ffffff !important;
  font-weight: 500;
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--accent) !important;
}


.nav-links {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
}

.nav-user {
    margin-left: 12px;
    font-size: 0.85rem;
    color: #95a5a6;
}
.nav-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding-bottom: 10px;
    margin-bottom: -10px;
}

.nav-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    text-decoration: none;
}

.nav-dropdown-toggle::after {
    content: "▾";
    font-size: 0.75rem;
    opacity: 0.85;
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 210px;
    background: #12202d;
    border: 1px solid #223245;
    border-radius: 12px;
    box-shadow: 0 12px 28px rgba(0,0,0,0.22);
    padding: 0.5rem 0;
    display: none;
    z-index: 1000;
}

.nav-dropdown-menu a {
    display: block;
    padding: 0.75rem 1.2rem;
    text-decoration: none;
    color: #ecf0f1;
    white-space: nowrap;
}

.nav-dropdown-menu a:hover {
    background: rgba(255,255,255,0.05);
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
    display: block;
}

@media (max-width: 768px) {
    .nav-links {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .nav-dropdown {
        width: 100%;
        display: block;
    }

    .nav-dropdown-menu {
        position: static;
        display: block;
        min-width: 100%;
        margin-top: 0.35rem;
        box-shadow: none;
        border-radius: 10px;
    }

    .nav-dropdown-toggle::after {
        display: none;
    }
}


/* =========================
   Hero
   ========================= */
.hero {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 24px;
  align-items: center;
}

.hero-text {
  flex: 1 1 520px;
  min-width: 280px;
}

.hero-text h1 {
  font-size: 2rem;
  margin: 0 0 10px;
}

.hero-text p {
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.5;
  max-width: 620px;
}

.hero-buttons {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Keep banner compact */
.hero-banner{
  flex: 0 1 420px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.hero-banner img{
  width: 100%;
  max-width: 420px;
  aspect-ratio: 1 / 1;      /* make it a square */
  height: auto;             /* ignored when aspect-ratio controls height */
  object-fit: cover;        /* fill the square */
  object-position: center;
  border-radius: 16px;
  border: 1px solid var(--card-border);
  box-shadow: 0 14px 40px rgba(0,0,0,0.5);
  display: block;
}

/* =========================
   Buttons
   ========================= */
.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.9rem;
  border: 1px solid var(--accent);
  color: var(--accent);
  background: transparent;
  transition: background 0.15s ease, color 0.15s ease, transform 0.05s ease;
}

.btn.primary {
  background: var(--accent);
  color: #021019;
}

.btn.ghost {
  border-color: #3c4b5e;
  color: var(--muted);
}

.btn:hover {
  background: var(--accent-strong);
  color: #021019;
  transform: translateY(-1px);
}

/* =========================
   Intro two-column layout (YOUR missing piece)
   ========================= */
.feature-section {
  display: grid;
  grid-template-columns: 60% 40%; /* use % to avoid any parser weirdness */
  gap: 40px;
  align-items: start;
  margin-top: 10px;
}

.feature-section > * {
  min-width: 0;
}

/* =========================
   Cards / sections
   ========================= */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 36px;
}

.card {
  background: rgba(4, 13, 28, 0.95);
  border-radius: 16px;
  padding: 16px 18px;
  border: 1px solid var(--card-border);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}

.card h2 {
  font-size: 1.05rem;
  margin: 0 0 8px;
}

.card p {
  font-size: 0.9rem;
  color: var(--muted);
}

/* =========================
   Forms
   ========================= */
form { margin-top: 16px; }

label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.9rem;
}

input[type="text"],
input[type="date"],
input[type="file"],
select {
  width: 100%;
  max-width: 380px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #2d3e52;
  background: #071320;
  color: var(--text);
  font-size: 0.9rem;
  margin-bottom: 10px;
}

input[type="file"] { padding: 6px; }

button,
input[type="submit"] {
  padding: 9px 18px;
  border-radius: 999px;
  border: none;
  background: var(--accent);
  color: #021019;
  font-size: 0.9rem;
  cursor: pointer;
  margin-top: 4px;
}

button:hover,
input[type="submit"]:hover {
  background: var(--accent-strong);
}

/* =========================
   Analysis cards
   ========================= */
.analysis-card {
  background: rgba(4, 13, 28, 0.95);
  border-radius: 14px;
  border: 1px solid var(--card-border);
  padding: 14px 16px;
  margin-bottom: 14px;
}

.header-line {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.stats {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 6px;
}

.thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.thumbs img {
  max-width: 180px;
  border-radius: 8px;
  border: 1px solid #2c3d50;
}

small.caption {
  display: block;
  font-size: 0.8rem;
  margin-bottom: 2px;
  color: var(--muted);
}

/* =========================
   NDVI legend layout
   ========================= */
.ndvi-row {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 25px;
}

.ndvi-row img {
  max-width: 400px;
  height: auto;
  border-radius: 10px;
  border: 1px solid #2c3d50;
}

.legend-box {
  font-size: 0.85rem;
  line-height: 1.4;
  max-width: 260px;
  color: var(--muted);
}

.color-bar {
  width: 100%;
  height: 14px;
  border: 1px solid #555;
  margin: 4px 0 8px;
  border-radius: 999px;
}

.color-bar-ndvi {
  background: linear-gradient(to right, #000000, #004d1a, #00ff66);
}

.color-bar-delta {
  background: linear-gradient(to right, #e74c3c, #f1c40f, #2ecc71);
}

/* =========================
   Banner slider (if you use it elsewhere)
   ========================= */
.banner-slider {
  position: relative;
  width: 100%;
  height: 340px;
  overflow: hidden;
}

.banner-slider .slides {
  display: flex;
  height: 100%;
  transition: transform 0.7s ease;
}

.banner-slider .slide {
  min-width: 100%;
  height: 100%;
}

.banner-slider img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner-caption {
  position: absolute;
  bottom: 30px;
  left: 40px;
  font-size: 32px;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.banner-slider .nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 40px;
  padding: 10px 20px;
  color: #fff;
  cursor: pointer;
  user-select: none;
  text-shadow: 0 4px 10px rgba(0,0,0,0.4);
}
.banner-slider .prev { left: 10px; }
.banner-slider .next { right: 10px; }

/* =========================
   Pixel tooltip
   ========================= */
.pixel-tooltip {
  position: fixed;
  background: rgba(0, 0, 0, 0.85);
  color: #ecf0f1;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  pointer-events: none;
  z-index: 2000;
  max-width: 220px;
  border: 1px solid #2ecc71;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.hover-numeric {
  cursor: crosshair;
  image-rendering: pixelated;
}

/* =========================
   Image Compare Slider (works with CSS vars OR inline backgrounds)
   ========================= */
.image-compare-container{
  --before: none;
  --after: none;
  --pos: 50%;

  position: relative;
  width: 100%;
  max-width: 520px;
  height: 320px;
  border-radius: 14px;
  overflow: hidden;
  background: #111;
  cursor: ew-resize;
  user-select: none;
  touch-action: none;
}

.image-compare-container .compare-base,
.image-compare-container .compare-overlay{
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* If you set --before/--after in HTML, these apply.
   If you set background-image inline on the divs, inline will override. */
.image-compare-container .compare-base{
  background-image: var(--before);
}
.image-compare-container .compare-overlay{
  background-image: var(--after);
  width: var(--pos);
  overflow: hidden;
}

.image-compare-container .slider-handle{
  position: absolute;
  top: 0;
  left: var(--pos);
  transform: translateX(-50%);
  width: 4px;
  height: 100%;
  background: rgba(255,255,255,.95);
  z-index: 5;
}

.image-compare-container .slider-handle::after{
  content:"";
  position:absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: rgba(255,255,255,.95);
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}

.image-compare-container .slider-handle::before{
  content:"⇆";
  position:absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
  font-size: 18px;
  color: #111;
  z-index: 6;
}

.compare-caption{
  text-align:center;
  margin-top: .6rem;
  font-weight: 600;
}

/* =========================
   Tables
   ========================= */
.table-basic {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.table-basic th,
.table-basic td {
  border-bottom: 1px solid #223245;
  padding: 6px 8px;
  text-align: left;
}

.table-basic th {
  background: #101a25;
  color: #ecf0f1;
  font-weight: 500;
}

/* =========================
   Footer (single, final version)
   ========================= */
.site-footer {
  background: #020812;
  border-top: 1px solid #1a2a3a;
  padding: 24px 0;
  margin-top: 40px;
  color: #cdd2d8;
  font-size: 0.85rem;
}

.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-left { flex: 1; text-align: left; color: #a7c7d9; }
.footer-center { flex: 1; text-align: center; }
.footer-right { flex: 1; text-align: right; }

.support-title {
  font-size: 0.9rem;
  color: #6cb0d6;
  margin-bottom: 6px;
}

.support-logos {
  display: inline-flex;
  gap: 14px;
  align-items: center;
}

.support-logos img {
  height: 32px;
  opacity: 0.9;
  transition: opacity 0.2s;
}

.support-logos img:hover { opacity: 1; }

.site-footer a.no-style {
  all: unset;
  display: inline;
  cursor: pointer;
  color: var(--accent);
}
.site-footer a.no-style:hover { text-decoration: underline; }

/* =========================
   Responsive
   ========================= */
@media (max-width: 900px) {
  .feature-section { grid-template-columns: 1fr; }

  .hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-banner {
    justify-content: flex-start;
    flex: 0 1 auto;
    width: 100%;
  }

  .hero-banner img {
    max-width: 520px;
    max-height: 320px;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-left, .footer-center, .footer-right {
    text-align: center;
  }
}

@media (max-width: 600px) {
  body { font-size: 14px; }

  .hero-text h1 {
    font-size: 1.6rem;
    line-height: 1.2;
  }

  .hero-buttons .btn {
    display: block;
    width: 100%;
    text-align: center;
  }

  .container { padding: 16px; }
}
/* ===== Image Compare (no drifting) ===== */
.image-compare-container{
  --pos: 50%;
  position: relative;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  overflow: hidden;
  background: #111;
  cursor: ew-resize;
  user-select: none;
  touch-action: none;
  box-sizing: border-box;
}


/* two image layers pinned */
/*.image-compare-container .compare-img{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;    
  object-position: center;
  display: block;
}*/

.image-compare-container .compare-img{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;   /* keep full image, no cropping */
  object-position: center;
  display: block;
}

/* clip the top image only */
.image-compare-container .compare-img.overlay{
  clip-path: inset(0 calc(100% - var(--pos)) 0 0);
}
/* ===== Fix slider line + knob alignment ===== */
.image-compare-container .slider-handle{
  position: absolute;
  top: 0;
  left: var(--pos);
  transform: translateX(-50%);
  width: 4px;                 /* the line itself */
  height: 100%;
  background: rgba(255,255,255,.95);
  z-index: 10;
}

/* knob sits centered on the 4px line */
.image-compare-container .slider-handle::after{
  content:"⇆";
  position:absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: rgba(255,255,255,.95);
  display: grid;
  place-items: center;
  color: #111;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
  font-size: 18px;
}

/* remove the old ::before line if you had it */
.image-compare-container .slider-handle::before{
  content: none !important;
}



/*Flood watch*/

.image-compare-container-flood {
  position: relative;
  width: 700px;
  height: 700px;
  max-width: 100%;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid #cfd8dc;
  cursor: ew-resize;
  background: #000;
  line-height: 0;
}

.image-compare-container-flood .compare-img{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;   /* keep full image, no cropping */
  object-position: center;
  display: block;
}


/* clip the top image only */
.image-compare-container-flood .compare-img.overlay{
  clip-path: inset(0 calc(100% - var(--pos)) 0 0);
}
/* ===== Fix slider line + knob alignment ===== */
.image-compare-container-flood .slider-handle{
  position: absolute;
  top: 0;
  left: var(--pos);
  transform: translateX(-50%);
  width: 4px;                 /* the line itself */
  height: 100%;
  background: rgba(255,255,255,.95);
  z-index: 10;
}

/* knob sits centered on the 4px line */
.image-compare-container-flood .slider-handle::after{
  content:"⇆";
  position:absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: rgba(255,255,255,.95);
  display: grid;
  place-items: center;
  color: #111;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
  font-size: 18px;
}

/* remove the old ::before line if you had it */
.image-compare-container-flood .slider-handle::before{
  content: none !important;
}

.image-compare-container-flood,
.image-compare-container-flood * {
  user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
}

.image-compare-container-flood img {
  -webkit-user-drag: none;
  user-drag: none;
  pointer-events: none;
}

.image-compare-container-flood .slider-handle,
.image-compare-container-flood .slider-handle::after {
  pointer-events: none;
}

.image-compare-container-flood.fw-slider-with-mask .after-layer{
  position: absolute;
  inset: 0;
  z-index: 1;
}

.image-compare-container-flood.fw-slider-with-mask .compare-img.base{
  z-index: 1;
}

.image-compare-container-flood.fw-slider-with-mask .compare-img.flood-mask{
  z-index: 2;
  pointer-events: none;
}

.image-compare-container-flood.fw-slider-with-mask .compare-img.overlay{
  z-index: 3;
}

.image-compare-container-flood.fw-slider-with-mask.fw-mask-off .compare-img.flood-mask{
  display: none;
}


.fw-overlay-viewer {
  position: relative;
  width: 700px;
  height: 700px;
  max-width: 100%;
  border: 1px solid #cfd8dc;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
}

.fw-overlay-viewer img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.fw-overlay-mask {
  z-index: 2;
  pointer-events: none;
}

.fw-overlay-base {
  z-index: 1;
}

.fw-overlay-viewer.fw-overlay-off .fw-overlay-mask {
  display: none;
}

.fw-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  cursor: pointer;
}

/*For flooding slider*/
.fw-compare-block {
    position: relative;
}

.fw-compare-label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 8px;
}

.fw-label-left {
    float: left;
}

.fw-label-right {
    float: right;
    text-align: right;
}

.fw-image-compare {
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    border: 1px solid #ddd;
    border-radius: 10px;
    background: #111;
    clear: both;
}

.fw-image-compare img {
    display: block;
    width: 100%;
    height: auto;
    user-select: none;
    pointer-events: none;
}

.fw-img-base {
    position: relative;
    z-index: 1;
}

.fw-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    overflow: hidden;
    z-index: 2;
}

.fw-img-overlay {
    display: block;
    width: 100%;
    height: auto;
}

.fw-slider-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #fff;
    transform: translateX(-50%);
    z-index: 3;
    pointer-events: none;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.15);
}

.fw-slider-handle {
    position: absolute;
    top: 50%;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #ccc;
    transform: translate(-50%, -50%);
    z-index: 4;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.fw-slider-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: ew-resize;
    z-index: 5;
}

@media (max-width: 768px) {
    .fw-compare-label {
        font-size: 0.8rem;
    }

    .fw-slider-handle {
        width: 32px;
        height: 32px;
    }
}

.video-center-block {
  max-width: 1280px;
  margin: 0 auto;
  text-align: center;
}

.video-center-block h2 {
  margin-bottom: 0.75rem;
}

.video-center-block p {
  margin: 0 auto 1.5rem;
  max-width: 760px;
  color: var(--text-light);
}

.video-wrap.large {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 18px 40px rgba(0,0,0,0.35);
}

.video-wrap.large iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
