/* ============================================================
   SMART SENSOR MAPPING SYSTEM — MAIN CSS
   Theme: Fresh Green | All fixes applied
============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400&family=Nunito:wght@400;600;700;800&display=swap');

:root {
  --green:       #3a7d2c;
  --green2:      #4a9c3a;
  --green3:      #5db847;
  --green-light: #a8e063;
  --gold:        #e8a020;
  --gold-light:  #f5c842;
  --dark:        #0f1e0f;
  --dark2:       #1c3a1c;
  --dark3:       #2a5a2a;
  --light:       #f5f9f2;
  --light2:      #eaf3e4;
  --white:       #ffffff;
  --text:        #2d2d2d;
  --text-md:     #444444;
  --muted:       #5a7a52;
  --muted2:      #888;
  --border:      #d4e8cc;
  --shadow:      0 4px 24px rgba(58,125,44,0.12);
  --shadow-lg:   0 8px 40px rgba(0,0,0,0.15);
  --radius:      12px;
  --radius-lg:   18px;
  --font-head:   'Cormorant Garamond', Georgia, serif;
  --font-body:   'Nunito', 'Segoe UI', sans-serif;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: var(--font-body); color: var(--text); background: var(--white); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-decoration: none; transition: color .3s; }
a:hover { color: var(--green2); }
ul { list-style: none; padding: 0; margin: 0; }

/* ── TYPOGRAPHY ── */
h1, h2, h3, h4, h5, h6 { font-family: var(--font-head); color: var(--dark); line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.6rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); }
h4 { font-size: 1.1rem; font-family: var(--font-body); font-weight: 800; }
p  { line-height: 1.8; color: var(--text-md); }

/* ── LAYOUT ── */
.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }
.section-sm { padding: 50px 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 28px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 22px; }
.text-center { text-align: center; }
.flex-center { display: flex; align-items: center; justify-content: center; }

/* ── BACKGROUNDS ── */
.bg-white   { background: var(--white); }
.bg-light   { background: var(--light); }
.bg-dark    { background: var(--dark2); }
.bg-darker  { background: var(--dark); }
.bg-green   { background: var(--green); }

/* ── BUTTONS ── */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 30px; border-radius: 50px; font-family: var(--font-body); font-weight: 700; font-size: 0.92rem; transition: all .3s; cursor: pointer; border: none; text-decoration: none; }
.btn-primary { background: var(--green); color: #fff !important; box-shadow: 0 4px 20px rgba(58,125,44,0.3); }
.btn-primary:hover { background: var(--green2); transform: translateY(-2px); box-shadow: 0 8px 30px rgba(58,125,44,0.4); color: #fff !important; }
.btn-outline { background: transparent; border: 2px solid var(--green); color: var(--green) !important; }
.btn-outline:hover { background: var(--green); color: #fff !important; }
.btn-white { background: #fff; color: var(--green) !important; font-weight: 800; }
.btn-white:hover { background: var(--light); transform: translateY(-2px); color: var(--green) !important; }
.btn-gold { background: var(--gold); color: var(--dark) !important; font-weight: 800; }
.btn-gold:hover { background: var(--gold-light); transform: translateY(-2px); color: var(--dark) !important; }

/* ── SECTION LABELS ── */
.eyebrow { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-body); font-size: 0.72rem; font-weight: 800; letter-spacing: 3px; text-transform: uppercase; color: var(--green); margin-bottom: 12px; }
.eyebrow-dark { color: var(--green-light); }
.divider { width: 56px; height: 3px; background: linear-gradient(90deg, var(--green), var(--gold)); border-radius: 2px; margin: 12px 0 22px; }
.divider.center { margin-left: auto; margin-right: auto; }

/* ── CARDS ── */
.card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); transition: transform .3s, box-shadow .3s; }
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.card-body { padding: 24px; }
.card-dark { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); border-radius: var(--radius-lg); padding: 28px; }

/* ── HERB CARDS ── */
.herb-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); transition: all .35s; }
.herb-card:hover { transform: translateY(-8px); box-shadow: 0 16px 48px rgba(58,125,44,0.18); border-color: var(--green3); }
.herb-card img { width: 100%; height: 200px; object-fit: cover; transition: transform .5s; }
.herb-card:hover img { transform: scale(1.06); }
.herb-tag { display: inline-block; background: var(--light); border: 1px solid var(--border); color: var(--green); font-size: 0.68rem; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; padding: 4px 12px; border-radius: 50px; margin-bottom: 10px; }
.herb-name { font-family: var(--font-head); font-size: 1.3rem; color: var(--dark); margin-bottom: 4px; }
.herb-sci { font-style: italic; font-size: 0.82rem; color: var(--green2); margin-bottom: 10px; display: block; }
.herb-desc { font-size: 0.87rem; color: var(--muted2); line-height: 1.75; margin-bottom: 10px; }
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 0.71rem; font-weight: 700; padding: 4px 12px; border-radius: 50px; }
.badge-critical { background: #fdecea; color: #c0392b; border: 1px solid #f5c6c2; }
.badge-rare     { background: #fef9e7; color: #d68910; border: 1px solid #f9e4a0; }
.badge-protected{ background: #e8f4fd; color: #1a6e9e; border: 1px solid #c0dff4; }
.badge-endangered{background: #f4ecfe; color: #7d3c98; border: 1px solid #d7b8f5; }

/* ── SERVICE CARDS ── */
.service-card { background: var(--light); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 36px 28px; text-align: center; transition: all .35s; }
.service-card:hover { background: var(--white); transform: translateY(-8px); box-shadow: var(--shadow-lg); border-color: var(--green); }
.service-icon { width: 72px; height: 72px; border-radius: 50%; background: var(--green); display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; font-size: 1.8rem; box-shadow: 0 4px 20px rgba(58,125,44,0.3); }
.service-card h4 { color: var(--dark); margin-bottom: 12px; font-size: 1.1rem; }
.service-card p { font-size: 0.89rem; color: var(--muted2); line-height: 1.8; }

/* ── TECH ITEMS ── */
.tech-item { display: flex; gap: 14px; align-items: flex-start; background: var(--light); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 12px; transition: border-color .3s; }
.tech-item:hover { border-color: var(--green3); }
.tech-item .icon { font-size: 1.6rem; flex-shrink: 0; margin-top: 2px; }
.tech-item h5 { font-family: var(--font-body); font-weight: 700; color: var(--dark); margin-bottom: 3px; font-size: 0.95rem; }
.tech-item p { font-size: 0.83rem; color: var(--muted2); margin: 0; }

/* ── LOCATION ITEMS ── */
.loc-item { padding: 16px 20px; border-left: 3px solid var(--green); background: var(--light); border-radius: 0 var(--radius) var(--radius) 0; margin-bottom: 12px; transition: all .3s; }
.loc-item:hover { border-left-color: var(--gold); transform: translateX(6px); }
.loc-item h5 { font-family: var(--font-body); font-weight: 700; color: var(--green); margin-bottom: 5px; font-size: 0.92rem; }
.loc-item p { font-size: 0.84rem; color: var(--muted2); margin: 0; }

/* ── STATS STRIP (homepage) ── */
.stats-strip { background: linear-gradient(135deg,#0a1a0a,#1c3a1c,#0a180a); padding: 18px 0; border-top: 2px solid rgba(93,184,71,.25); border-bottom: 2px solid rgba(93,184,71,.25); }
.stats-inner { display: grid; grid-template-columns: repeat(4,1fr); max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.stat-col { text-align: center; padding: 10px 16px; border-right: 1px solid rgba(255,255,255,.1); }
.stat-col:last-child { border-right: none; }
.stat-icon { font-size: 1.6rem; display: block; margin-bottom: 4px; }
.stat-num { font-family: var(--font-head); font-size: 2.4rem; font-weight: 700; color: #f5c842; display: block; line-height: 1; }
.stat-lbl { font-size: .65rem; color: #a8e063; text-transform: uppercase; letter-spacing: 2px; margin-top: 5px; display: block; font-weight: 700; }

/* ── STAT CARDS (about/conservation pages) ── */
.stat-card { text-align: center; padding: 28px 20px; }
.stat-num-lg { font-family: var(--font-head); font-size: 3rem; font-weight: 700; color: var(--gold); display: block; line-height: 1; }
.stat-label { font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 1.5px; margin-top: 6px; display: block; }

/* ── PAGE HERO (inner pages) ── */
.page-hero { padding: 140px 0 70px; position: relative; overflow: hidden; }
.page-hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; background-repeat: no-repeat; }
.page-hero-overlay { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(15,30,15,0.88) 0%, rgba(26,58,28,0.72) 50%, rgba(15,30,15,0.85) 100%); }
.page-hero-content { position: relative; z-index: 2; }
.page-hero h1 { color: #fff; margin-bottom: 16px; }
.page-hero p { color: rgba(255,255,255,0.85); font-size: 1.08rem; max-width: 580px; }

/* ── FORM ── */
.form-group { margin-bottom: 14px; }
.form-control { width: 100%; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.18); border-radius: var(--radius); padding: 13px 16px; color: #fff; font-family: var(--font-body); font-size: 0.92rem; outline: none; transition: border-color .3s; }
.form-control:focus { border-color: var(--green3); }
.form-control::placeholder { color: rgba(255,255,255,0.45); }
.form-control-light { background: var(--light); border: 1px solid var(--border); color: var(--text); }
.form-control-light::placeholder { color: var(--muted); }
.form-control-light:focus { border-color: var(--green); }

/* ── GALLERY PAGE (white theme) ── */
.gal-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.gal-item { position: relative; overflow: hidden; cursor: pointer; background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 2px 12px rgba(0,0,0,0.07); transition: transform .3s, box-shadow .3s; aspect-ratio: 4/3; }
.gal-item:hover { transform: translateY(-6px); box-shadow: 0 12px 36px rgba(58,125,44,0.18); border-color: var(--green); }
.gal-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.gal-item:hover img { transform: scale(1.06); }
.gal-overlay { position: absolute; inset: 0; background: linear-gradient(to top,rgba(15,30,15,0.9) 0%,rgba(0,0,0,0.1) 55%,transparent 100%); opacity: 0; transition: opacity .35s; display: flex; align-items: flex-end; padding: 22px; border-radius: 14px; }
.gal-item:hover .gal-overlay { opacity: 1; }
.gal-info h5 { color: #fff; font-family: var(--font-body); font-weight: 700; font-size: 0.95rem; margin-bottom: 4px; }
.gal-info p { color: rgba(255,255,255,0.75); font-size: 0.8rem; margin: 0 0 8px; }
.gal-view { color: #a8e063; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; }
.gal-loading, .gal-empty { grid-column: 1/-1; text-align: center; padding: 80px 20px; color: var(--muted); }

/* ── LIGHTBOX ── */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,0.96); z-index: 99999; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: opacity .35s; }
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox-img { max-height: 85vh; max-width: 85vw; border-radius: 8px; object-fit: contain; }
.lightbox-close { position: absolute; top: 20px; right: 24px; background: rgba(255,255,255,0.1); border: none; color: #fff; font-size: 1.5rem; width: 44px; height: 44px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.1); border: none; color: #fff; font-size: 2rem; width: 52px; height: 52px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }
.lightbox-info { position: absolute; bottom: 24px; text-align: center; width: 100%; }
.lightbox-info h4 { color: #fff; font-size: 1rem; margin-bottom: 4px; }
.lightbox-info p { color: rgba(255,255,255,0.65); font-size: 0.9rem; }
.lightbox-dots { margin-top: 12px; display: flex; justify-content: center; gap: 8px; }
.lightbox-dots span { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.35); cursor: pointer; transition: background .3s; }
.lightbox-dots span.active { background: #fff; }

/* ── HEADER ── */
#header { position: fixed; top: 0; left: 0; right: 0; z-index: 9999; transition: all .4s; }
#header.scrolled { background: rgba(255,255,255,0.98) !important; backdrop-filter: blur(20px); box-shadow: 0 2px 30px rgba(0,0,0,0.1); border-bottom: 1px solid var(--border); }
.topbar { background: var(--green); padding: 6px 0; transition: all .4s; }
#header.scrolled .topbar { display: none; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; }
.topbar a, .topbar span { font-size: 0.75rem; color: rgba(255,255,255,0.9); font-family: var(--font-body); }
.navbar { padding: 14px 0; background: rgba(255,255,255,0.96); backdrop-filter: blur(10px); transition: all .4s; }
.navbar-inner { display: flex; align-items: center; justify-content: space-between; }
.nav-logo img { height: 46px; width: auto; transition: height .3s; }
#header.scrolled .nav-logo img { height: 40px; }
.nav-menu { display: flex; align-items: center; gap: 4px; }
.nav-menu a { color: var(--text); font-weight: 600; font-size: 0.88rem; padding: 8px 16px; border-radius: 50px; transition: all .3s; }
.nav-menu a:hover, .nav-menu a.active { color: var(--green); background: var(--light); }
.nav-cta { margin-left: 8px; }
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; background: none; border: none; padding: 4px; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--green); border-radius: 2px; transition: all .3s; }
.mobile-nav { display: none; background: var(--white); border-top: 1px solid var(--border); padding: 16px 20px; }
.mobile-nav.open { display: block; }
.mobile-nav a { display: block; padding: 10px 0; border-bottom: 1px solid var(--border); color: var(--text); font-weight: 600; font-size: 0.92rem; }

/* ── FOOTER (Agron style — all inline in JS, this is fallback) ── */
#footer { background: #eef4e8; border-top: 3px solid #c8dfc0; }

/* ── ANIMATIONS ── */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .65s ease, transform .65s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-left { transform: translateX(-28px); }
.reveal-right { transform: translateX(28px); }
.reveal-left.visible, .reveal-right.visible { transform: translateX(0); opacity: 1; }

/* ── RESPONSIVE ── */
@media (max-width:1024px) {
  .grid-4 { grid-template-columns: repeat(2,1fr); }
  .gal-grid { grid-template-columns: repeat(2,1fr); }
  .stats-inner { grid-template-columns: repeat(2,1fr); }
}
@media (max-width:768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; gap: 24px; }
  .section { padding: 56px 0; }
  .hamburger { display: flex; }
  .nav-menu { display: none; }
  .gal-grid { grid-template-columns: 1fr; }
  .stats-inner { grid-template-columns: 1fr 1fr; }
  .page-hero { padding: 120px 0 56px; }
}
@media (max-width:480px) { h1 { font-size: 1.9rem; } .stats-inner { grid-template-columns: 1fr; } }
