/*
  JCS Website vNext
  - Clean design system
  - Bootstrap 5 compatible
  - Backwards compatible helpers for older Bootstrap 4 markup still present in pages
*/

:root{
  --jcs-primary: #3a9a31;
  --primary-color: var(--jcs-primary);
  --primary-dark: var(--jcs-primary-700);
  --background-light: var(--jcs-bg);
  --text-dark: var(--jcs-text);
  --border-light: var(--jcs-border);
  --jcs-primary-700: #2e8124;
  --jcs-primary-900: #1f5f18;
  --jcs-bg: #f6f8f7;
  --jcs-card: #ffffff;
  --jcs-text: #1e293b;
  --jcs-muted: #64748b;
  --jcs-border: rgba(2, 6, 23, 0.10);
  --jcs-shadow: 0 10px 30px rgba(2, 6, 23, 0.10);
  --jcs-radius: 18px;
}

html, body{
  height: 100%;
}

body{
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  background: var(--jcs-bg);
  color: var(--jcs-text);
}

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

/* Layout helpers */
.section-padding{ padding: 80px 0; }
@media (max-width: 768px){
  .section-padding{ padding: 56px 0; }
}

.section-muted{ background: rgba(58,154,49,0.05); }

/* Header */
.site-topbar{
  background: rgba(2, 6, 23, 0.85);
  color: rgba(255,255,255,0.9);
  font-size: .9rem;
}
.site-topbar a{ color: #fff; text-decoration: none; }
.site-topbar a:hover{ text-decoration: underline; }

.site-header{
  position: sticky;
  top: 0;
  z-index: 1030;
  backdrop-filter: blur(10px);
  background: rgba(246, 248, 247, 0.72);
  border-bottom: 1px solid var(--jcs-border);
}

.navbar-brand{
  font-weight: 800;
  letter-spacing: .2px;
}

.navbar-brand .brand-badge{
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--jcs-primary), var(--jcs-primary-900));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  box-shadow: 0 10px 18px rgba(58,154,49,.22);
}

.navbar .nav-link{
  font-weight: 600;
  color: rgba(2, 6, 23, 0.78);
}

.navbar .nav-link:hover{ color: rgba(2, 6, 23, 0.95); }

.navbar .nav-link.active{
  color: var(--jcs-primary) !important;
}

.navbar .btn-cta{
  border-radius: 999px;
  padding: .55rem 1rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--jcs-primary), var(--jcs-primary-700));
  border: none;
}

.navbar .btn-cta:hover{
  filter: brightness(0.98);
  transform: translateY(-1px);
}

/* Hero */
.hero{
  position: relative;
  overflow: hidden;
  padding: 86px 0;
  min-height: 55vh;
  display: flex;
  align-items: center;
  background:
    radial-gradient(1200px 420px at 10% 10%, rgba(58,154,49,0.35), transparent 60%),
    radial-gradient(900px 380px at 80% 20%, rgba(46,129,36,0.30), transparent 55%),
    linear-gradient(135deg, rgba(31,95,24,0.95), rgba(58,154,49,0.95));
  color: #fff;
}
.hero.hero--small{ min-height: 38vh; padding: 72px 0; }
@media (max-width: 768px){
  .hero{ min-height: 44vh; padding: 72px 0; }
  .hero.hero--small{ min-height: 34vh; }
}

/* Fix: legacy/small hero alignment (centers the text block on service pages) */
.hero.hero--small .hero-content{
  max-width: 980px;
  margin: 0 auto;
  text-align: center;
}
.hero.hero--small .hero-content p{
  margin-left: auto;
  margin-right: auto;
}
.hero.hero--small .hero-content h1{
  margin-left: auto;
  margin-right: auto;
}

.hero::before{
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(500px 200px at 30% 60%, rgba(255,255,255,0.10), transparent 60%),
    radial-gradient(380px 180px at 80% 70%, rgba(255,255,255,0.09), transparent 55%);
  opacity: .9;
}

.hero::after{
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cg fill='none' stroke='rgba(255,255,255,0.08)' stroke-width='1'%3E%3Cpath d='M0 36h72M36 0v72'/%3E%3C/g%3E%3C/svg%3E");
  opacity: .25;
  mix-blend-mode: overlay;
}

.hero .container{ position: relative; z-index: 1; }

.hero h1{
  font-weight: 900;
  letter-spacing: -0.02em;
  font-size: clamp(2rem, 4vw, 3.25rem);
  margin: 0 0 .75rem;
}

.hero p{
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  opacity: .95;
  max-width: 70ch;
}

.hero .hero-actions{
  margin-top: 1.4rem;
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
}

.hero .btn-hero{
  border-radius: 999px;
  padding: .75rem 1.1rem;
  font-weight: 800;
}

.hero .btn-hero.btn-light{
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(255,255,255,0.25);
}

.hero .btn-hero.btn-outline-light{
  border-color: rgba(255,255,255,0.55);
}

.hero .hero-metrics{
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 760px;
}

@media (max-width: 768px){
  .hero .hero-metrics{ grid-template-columns: 1fr; }
}

.metric{
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 18px;
  padding: 14px 16px;
}

.metric .k{ font-weight: 900; font-size: 1.25rem; }
.metric .v{ opacity: .9; font-size: .95rem; }

/* Cards / blocks */
.card-soft{
  background: var(--jcs-card);
  border: 1px solid var(--jcs-border);
  border-radius: var(--jcs-radius);
  box-shadow: 0 8px 24px rgba(2, 6, 23, 0.06);
}

.card-soft:hover{
  transform: translateY(-2px);
  box-shadow: var(--jcs-shadow);
}

.icon-pill{
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(58,154,49,0.10);
  border: 1px solid rgba(58,154,49,0.18);
  color: var(--jcs-primary);
}

.kicker{ color: var(--jcs-primary); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: .8rem; }

/* Anchor offsets (fixed header) */
.scroll-target{ scroll-margin-top: 110px; }

/* Service boxes (legacy markup) */
.service-box{
  background: var(--jcs-card);
  border: 1px solid var(--jcs-border);
  border-radius: var(--jcs-radius);
  padding: 22px;
  height: 100%;
  transition: transform .2s ease, box-shadow .2s ease;
}
.service-box:hover{ transform: translateY(-2px); box-shadow: var(--jcs-shadow); }
.service-box h4, .service-box h5{ color: var(--jcs-primary); font-weight: 800; }
.service-box i{ color: var(--jcs-primary); }

.green-line{
  border: 0;
  height: 2px;
  background: var(--jcs-primary);
  width: 56px;
  margin: 10px 0 14px;
}

/* Team cards (legacy) */
.team-section{ background: transparent; }
.team-card-new{
  background: var(--jcs-card);
  border: 1px solid var(--jcs-border);
  border-radius: var(--jcs-radius);
  padding: 22px;
  text-align: center;
  transition: transform .2s ease, box-shadow .2s ease;
  height: 100%;
}
.team-card-new:hover{ transform: translateY(-2px); box-shadow: var(--jcs-shadow); }
.team-card-new img{ width: 96px; height: auto; object-fit: contain; }
.team-card-new h5{ color: var(--jcs-primary); font-weight: 900; }
.team-card-new a{ text-decoration: none; }
.team-card-new a:hover{ text-decoration: underline; }

.support-collapse{
  background: rgba(58,154,49,0.06);
  border: 1px solid rgba(58,154,49,0.14);
  border-radius: 14px;
  padding: 12px;
  text-align: left;
}

/* Logos row */
.logo-strip{
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px;
  align-items: center;
}
@media (max-width: 992px){ .logo-strip{ grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 576px){ .logo-strip{ grid-template-columns: repeat(2, 1fr); } }
.logo-strip img{ width: 100%; max-height: 44px; object-fit: contain; filter: grayscale(1); opacity: .85; }
.logo-strip img:hover{ filter: none; opacity: 1; }

/* Footer */
.site-footer{
  background: rgba(2, 6, 23, 0.92);
  color: rgba(255,255,255,0.85);
}
.site-footer a{ color: rgba(255,255,255,0.9); text-decoration: none; }
.site-footer a:hover{ text-decoration: underline; }
.site-footer .footer-title{ color: #fff; font-weight: 900; font-size: 1rem; }
.site-footer .footer-bottom{
  border-top: 1px solid rgba(255,255,255,0.12);
  margin-top: 22px;
  padding-top: 14px;
  font-size: .92rem;
}

/* News popup */
.news-popup{
  position: fixed;
  right: 20px;
  bottom: 90px;
  width: min(420px, calc(100% - 24px));
  background: rgba(2, 6, 23, 0.92);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(2, 6, 23, 0.45);
  overflow: hidden;
  z-index: 1500;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
}
.news-popup.is-open{ opacity: 1; transform: translateY(0); pointer-events: auto; transition: opacity .25s ease, transform .25s ease; }
.news-popup-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: rgba(58,154,49,0.92);
}
.news-popup-title{ font-weight: 900; display: flex; gap: 10px; align-items: center; }
.news-popup-logo{ width: 26px; height: 26px; object-fit: contain; border-radius: 8px; background: rgba(255,255,255,0.92); padding: 3px; }
.news-popup-close{
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.news-popup-body{ padding: 12px 14px; max-height: 60vh; overflow: auto; }
.news-list{ margin: 0; padding-left: 0; list-style: none; }
.news-list li{ margin-bottom: 14px; }
.news-item-title{ font-weight: 900; margin-bottom: 6px; display: block; }
.news-item-date{ font-size: .85rem; opacity: .85; margin-top: -2px; margin-bottom: 8px; }

.news-popup-actions{ margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,0.12); }
.news-popup-link{ color: rgba(255,255,255,0.92); text-decoration: underline; font-weight: 700; }

.news-fab{
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1500;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  border: 1px solid rgba(2,6,23,0.12);
  background: rgba(58,154,49,0.98);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 18px 40px rgba(2,6,23,0.22);
  cursor: pointer;
}
.news-fab:hover{ filter: brightness(1.03); transform: translateY(-1px); }
.news-fab:active{ transform: translateY(0); }

.news-fab-badge{
  position: absolute;
  top: -6px;
  right: -6px;
  background: #ef4444;
  color: #fff;
  font-weight: 900;
  font-size: 12px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255,255,255,0.92);
}

@media (max-width: 768px){
  .news-fab{ right: 12px; bottom: 12px; }
}



@media (max-width: 768px){
  .news-popup{ left: 12px; right: 12px; bottom: 86px; width: auto; }
}

/* Reveal animations (replaces GSAP dependency) */
.reveal{ opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.reveal.is-visible{ opacity: 1; transform: translateY(0); }

/* Backwards compatibility helpers */
.ml-auto{ margin-left: auto !important; }
.mr-auto{ margin-right: auto !important; }

/* Bootstrap 4 embed-responsive compatibility */
.embed-responsive{ position: relative; display: block; width: 100%; padding: 0; overflow: hidden; border-radius: 16px; border: 1px solid var(--jcs-border); background: rgba(255,255,255,0.65); }
.embed-responsive::before{ display: block; content: ""; }
.embed-responsive-16by9::before{ padding-top: 56.25%; }
.embed-responsive-item{ position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Buttons */
.btn-success{ background-color: var(--jcs-primary); border-color: var(--jcs-primary); }
.btn-success:hover{ background-color: var(--jcs-primary-700); border-color: var(--jcs-primary-700); }
.btn-primary{ background-color: var(--jcs-primary); border-color: var(--jcs-primary); }
.btn-primary:hover{ background-color: var(--jcs-primary-700); border-color: var(--jcs-primary-700); }

/* Typography improvements for content pages */
main h2{ color: var(--jcs-primary); font-weight: 900; }
main strong{ color: var(--jcs-primary); }

/* Prevent canvas from messing layout if old markup still includes it */
canvas.canvas{ display: none; }

/* Extra legacy section polish */
.text-green{ color: var(--jcs-primary) !important; }
.main-title{ text-align:center; color: var(--jcs-primary); font-weight: 900; }
.JCS_ADVIES{ background: transparent; }
.JCS_SUPPORT{ background: transparent; }
.JCS_PARTNERS{ background: transparent; }
.routekaart h4{ color: var(--jcs-primary); font-weight: 800; }

/* Partner/client logos on consultancy page */
#JCS_PARTNERS img{ border-radius: 14px; border: 1px solid var(--jcs-border); background: rgba(255,255,255,0.75); padding: 10px; }

/* Old hero markup compatibility (pages that use .hero-content without .container) */
.hero .hero-content{ position: relative; z-index: 1; }
.hero .hero-content{ padding-left: 0; padding-right: 0; }
.hero .hero-content img{ max-width: 96px; height: auto; }
.hero.hero--small .hero-content{ text-align: center; }
.hero .hero-content{ width: 100%; padding: 0 1rem; }

/* ===== Cookie banner ===== */
.cookie-banner{
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 2000;
}
.cookie-inner{
  max-width: 980px;
  margin: 0 auto;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(15,23,42,.10);
  border-radius: 18px;
  box-shadow: 0 18px 45px rgba(15,23,42,.16);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
}
.cookie-title{ font-weight: 900; margin-bottom: 2px; }
.cookie-desc{ color: rgba(15,23,42,.72); font-size: .95rem; }
.cookie-links{ font-size: .9rem; opacity: .8; }
.cookie-links a{ text-decoration: underline; }
.cookie-actions{ display:flex; gap:10px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 768px){
  .cookie-inner{ flex-direction: column; align-items: stretch; }
  .cookie-actions{ justify-content: stretch; }
}
