/* =========================================================
   ClimateCrop — custom.css
   Bootstrap 5 base, organic green theme
   ========================================================= */

/* ── Variables & Bootstrap overrides ── */
:root {
  --cc-green:      #16a34a;
  --cc-green-dark: #0f7a35;
  --cc-green-light:#dcfce7;
  --cc-dark:       #0f2918;
  --cc-dark-2:     #1a3d24;
  --cc-text:       #1e293b;
  --cc-muted:      #64748b;
  --cc-border:     #e2e8f0;
  --cc-white:      #ffffff;

  /* Bootstrap navbar overrides */
  --bs-navbar-color:          var(--cc-text);
  --bs-navbar-hover-color:    var(--cc-green);
  --bs-navbar-active-color:   var(--cc-green);
  --bs-navbar-brand-color:    var(--cc-dark);
  --bs-navbar-brand-hover-color: var(--cc-green);
}

/* ── Reset / Base ── */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--cc-text);
  background: var(--cc-white);
  line-height: 1.7;
  font-size: 1rem;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.25;
  color: var(--cc-dark);
}

a { color: var(--cc-green); text-decoration: none; }
a:hover { color: var(--cc-green-dark); text-decoration: underline; }

img { max-width: 100%; height: auto; }

/* ── Navbar ── */
.navbar {
  background: rgba(255,255,255,0.97) !important;
  box-shadow: 0 1px 12px rgba(15,41,24,0.08);
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.navbar-brand {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--cc-dark) !important;
  letter-spacing: -0.02em;
}
.navbar-brand:hover { color: var(--cc-green) !important; text-decoration: none; }

.navbar-nav .nav-link {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--cc-text) !important;
  padding: 0.5rem 0.85rem !important;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--cc-green) !important;
  background: var(--cc-green-light);
}

.navbar-toggler { border: none; padding: 0.35rem; }
.navbar-toggler:focus { box-shadow: none; }
.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%230f2918' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* CTA button in navbar */
.nav-cta {
  background: var(--cc-green) !important;
  color: var(--cc-white) !important;
  border-radius: 8px !important;
  padding: 0.45rem 1.1rem !important;
  font-weight: 600 !important;
  transition: background 0.2s !important;
}
.nav-cta:hover {
  background: var(--cc-green-dark) !important;
  color: var(--cc-white) !important;
}

/* ── Hero ── */
.hero-section {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: var(--cc-white);
  overflow: hidden;
}

.hero-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(15,41,24,0.82) 0%, rgba(22,163,74,0.55) 100%);
  z-index: 1;
}

.hero-section > .container {
  position: relative;
  z-index: 2;
}

.hero-section h1 {
  color: var(--cc-white);
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 1.15;
  margin-bottom: 1.25rem;
}

.hero-section p.lead {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: rgba(255,255,255,0.9);
  max-width: 600px;
  margin-bottom: 2rem;
}

/* Short hero for inner pages */
.hero-short {
  min-height: 52vh;
}

/* ── Buttons ── */
.btn-cc-primary {
  background: var(--cc-green);
  color: var(--cc-white);
  border: 2px solid var(--cc-green);
  border-radius: 8px;
  padding: 0.7rem 1.75rem;
  font-weight: 600;
  font-size: 1rem;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
  display: inline-block;
}
.btn-cc-primary:hover {
  background: var(--cc-green-dark);
  border-color: var(--cc-green-dark);
  color: var(--cc-white);
  transform: translateY(-2px);
  text-decoration: none;
}

.btn-cc-outline {
  background: transparent;
  color: var(--cc-white);
  border: 2px solid rgba(255,255,255,0.7);
  border-radius: 8px;
  padding: 0.7rem 1.75rem;
  font-weight: 600;
  font-size: 1rem;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
  display: inline-block;
}
.btn-cc-outline:hover {
  background: rgba(255,255,255,0.15);
  border-color: var(--cc-white);
  color: var(--cc-white);
  transform: translateY(-2px);
  text-decoration: none;
}

.btn-cc-green-outline {
  background: transparent;
  color: var(--cc-green);
  border: 2px solid var(--cc-green);
  border-radius: 8px;
  padding: 0.65rem 1.6rem;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.2s, color 0.2s, transform 0.15s;
  display: inline-block;
}
.btn-cc-green-outline:hover {
  background: var(--cc-green);
  color: var(--cc-white);
  transform: translateY(-2px);
  text-decoration: none;
}

/* ── Stats Bar ── */
.stats-bar {
  background: var(--cc-dark);
  padding: 2.5rem 0;
}
.stats-bar .stat-number {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--cc-green);
  line-height: 1;
  display: block;
}
.stats-bar .stat-label {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.75);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.3rem;
  display: block;
}

/* ── Section Utilities ── */
.section-title {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 800;
  color: var(--cc-dark);
  margin-bottom: 1rem;
}
.section-subtitle {
  font-size: 1.05rem;
  color: var(--cc-muted);
  max-width: 620px;
}

.section-pad { padding: 80px 0; }
.section-pad-sm { padding: 60px 0; }
.bg-dark-section { background: var(--cc-dark); }
.bg-light-green { background: #f0fdf4; }

/* ── Cards ── */
.cc-card {
  background: var(--cc-white);
  border: 1px solid var(--cc-border);
  border-radius: 14px;
  padding: 1.75rem;
  box-shadow: 0 2px 12px rgba(15,41,24,0.06);
  transition: box-shadow 0.25s, transform 0.25s;
  height: 100%;
}
.cc-card:hover {
  box-shadow: 0 8px 32px rgba(15,41,24,0.12);
  transform: translateY(-4px);
}

.cc-card .card-icon {
  width: 56px;
  height: 56px;
  background: var(--cc-green-light);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--cc-green);
  margin-bottom: 1.1rem;
}

.cc-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  color: var(--cc-dark);
}
.cc-card p { color: var(--cc-muted); font-size: 0.95rem; margin-bottom: 0; }

/* Feature card with image */
.crop-card {
  background: var(--cc-white);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(15,41,24,0.07);
  transition: box-shadow 0.25s, transform 0.25s;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.crop-card:hover {
  box-shadow: 0 10px 36px rgba(15,41,24,0.14);
  transform: translateY(-5px);
}
.crop-card > img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 0;
  display: block;
  flex-shrink: 0;
}
.crop-card .crop-card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.crop-card .crop-icon {
  width: 60px;
  height: 60px;
  margin-bottom: 0.85rem;
}
.crop-card h4 { font-size: 1.1rem; font-weight: 700; color: var(--cc-dark); margin-bottom: 0.4rem; }
.crop-card p { font-size: 0.9rem; color: var(--cc-muted); margin-bottom: 0.75rem; flex: 1; }
.crop-card ul {
  padding-left: 1.1rem;
  font-size: 0.88rem;
  color: var(--cc-muted);
  margin-bottom: 1rem;
}
.crop-card ul li { margin-bottom: 0.25rem; }
.crop-card .crop-card-body > div:last-child { margin-top: auto; }
.crop-card .cc-tag {
  display: inline-block;
  background: var(--cc-green-light);
  color: var(--cc-green-dark);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  margin-right: 0.3rem;
  margin-bottom: 0.3rem;
}
.crop-card .crop-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 0.5rem;
}

/* Pipeline / numbered steps */
.pipeline-step {
  display: flex;
  gap: 1.25rem;
  margin-bottom: 2rem;
  align-items: flex-start;
}
.pipeline-step .step-num {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: var(--cc-green);
  color: var(--cc-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 800;
}
.pipeline-step .step-body h5 { font-size: 1.05rem; font-weight: 700; color: var(--cc-dark); margin-bottom: 0.35rem; }
.pipeline-step .step-body p { font-size: 0.93rem; color: var(--cc-muted); margin: 0; }

/* Tech pill badges */
.tech-badge {
  display: inline-block;
  background: var(--cc-dark);
  color: var(--cc-green);
  border: 1px solid var(--cc-green);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  margin: 0.2rem;
}

/* Icon feature row */
.icon-feature {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}
.icon-feature .icon-box {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background: var(--cc-green-light);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--cc-green);
}
.icon-feature h5 { font-size: 0.97rem; font-weight: 700; color: var(--cc-dark); margin-bottom: 0.2rem; }
.icon-feature p { font-size: 0.88rem; color: var(--cc-muted); margin: 0; }

/* ── Image Rules ── */
.cc-img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
}

/* ── CTA Banner ── */
.cta-banner {
  background: linear-gradient(135deg, var(--cc-dark) 0%, var(--cc-dark-2) 100%);
  padding: 80px 0;
  text-align: center;
  color: var(--cc-white);
}
.cta-banner h2 { color: var(--cc-white); font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 1rem; }
.cta-banner p { color: rgba(255,255,255,0.8); font-size: 1.05rem; max-width: 580px; margin: 0 auto 2rem; }

/* ── Footer ── */
.site-footer {
  background: var(--cc-dark);
  color: rgba(255,255,255,0.75);
  padding: 60px 0 0;
}
.site-footer .footer-brand h3 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--cc-white);
  margin-bottom: 0.5rem;
}
.site-footer .footer-brand p {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.7;
  max-width: 280px;
}
.site-footer h5 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.5);
  margin-bottom: 0.85rem;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer ul li { margin-bottom: 0.5rem; }
.site-footer ul li a {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  transition: color 0.2s;
}
.site-footer ul li a:hover { color: var(--cc-green); text-decoration: none; }

.footer-bottom {
  margin-top: 3rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 1.25rem 0;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.4);
}

/* ── Cookie Banner ── */
#cookie-banner {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #0f2918;
  color: #e8f5e9;
  padding: 16px 24px;
  z-index: 9999;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  box-shadow: 0 -2px 16px rgba(0,0,0,0.35);
}
#cookie-banner p {
  margin: 0;
  font-size: 14px;
  flex: 1 1 300px;
}
#cookie-banner a { color: var(--cc-green); }
.cookie-btn-accept {
  background: var(--cc-green);
  color: #fff;
  border: none;
  padding: 8px 22px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.2s;
}
.cookie-btn-accept:hover { background: var(--cc-green-dark); }
.cookie-btn-decline {
  background: transparent;
  color: #e8f5e9;
  border: 1px solid rgba(255,255,255,0.4);
  padding: 8px 22px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: border-color 0.2s;
}
.cookie-btn-decline:hover { border-color: rgba(255,255,255,0.8); }

/* ── Responsive Helpers ── */
@media (max-width: 991.98px) {
  .hero-section { min-height: 70vh; }
  .hero-short   { min-height: 45vh; }
}
@media (max-width: 767.98px) {
  .section-pad  { padding: 55px 0; }
  .hero-section { min-height: 60vh; }
}


/* =========================================================
   Article / Blog Detail Pages
   ========================================================= */

.page-hero {
  background: linear-gradient(135deg, #0d1f0d 0%, #1a3a1a 100%);
  padding: 80px 0 60px;
  text-align: center;
}
.page-hero h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  color: #e8f5e9;
  margin-bottom: 0.75rem;
  line-height: 1.25;
}
.page-hero p {
  color: #a5d6a7;
  font-size: 1.05rem;
  max-width: 640px;
  margin: 0 auto;
}
.page-hero .article-meta {
  color: #a5d6a7;
  font-size: 0.95rem;
}
.article-tag {
  display: inline-block;
  background: rgba(76,175,80,0.15);
  color: #4caf50;
  border: 1px solid rgba(76,175,80,0.3);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}
.container-narrow {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 1.25rem;
}
.article-wrap {
  padding: 60px 0 80px;
}
.article-wrap .article-back {
  display: inline-block;
  color: var(--cc-green);
  font-size: 0.93rem;
  margin-bottom: 1.75rem;
  text-decoration: none;
}
.article-wrap .article-back:hover {
  text-decoration: underline;
}
.article-wrap .article-thumb {
  width: 100%;
  height: auto;
  border-radius: 10px;
  display: block;
  margin-bottom: 2.5rem;
}
.article-wrap h2 {
  color: var(--cc-dark);
  font-size: 1.45rem;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--cc-green-light);
}
.article-wrap h3 {
  color: var(--cc-green-dark);
  font-size: 1.1rem;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
}
.article-wrap p {
  color: var(--cc-text);
  margin-bottom: 1.2rem;
  line-height: 1.7;
}
.article-wrap ul, .article-wrap ol {
  padding-left: 1.4rem;
  margin-bottom: 1.2rem;
  color: var(--cc-text);
}
.article-wrap li {
  margin-bottom: 0.4rem;
}
