/* Greenergy Distribution — public site styles */
:root {
  --green-900: #0f4a03;
  --green-700: #1a6a06;
  --green-600: #2a8e2e;
  --green-500: #33a53b;
  --green-100: #e7f5e3;
  --cyan-700: #0378a3;
  --cyan-600: #038cbb;
  --cyan-500: #04a0d3;
  --cyan-100: #e2f5fb;
  --navy: #1b356f;
  --ink: #1d2733;
  --muted: #5a6573;
  --line: #dde3e8;
  --bg: #ffffff;
  --bg-soft: #f5f8f6;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 40, 30, .06), 0 4px 16px rgba(16, 40, 30, .08);
  --wrap: 1180px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1rem; }
body { margin: 0; font: 17px/1.65 var(--font); color: var(--ink); background: var(--bg); }
img { max-width: 100%; height: auto; }
a { color: var(--cyan-700); text-underline-offset: 2px; }
a:hover { color: var(--green-700); }
h1, h2, h3, h4 { line-height: 1.25; color: var(--green-700); margin: 1.6em 0 .5em; }
h1 { font-size: clamp(1.7rem, 1.2rem + 2vw, 2.4rem); margin: 0; }
h2 { font-size: clamp(1.3rem, 1.1rem + .8vw, 1.6rem); }
h3 { font-size: 1.2rem; }
p, ul, ol, table, blockquote { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--cyan-500); outline-offset: 2px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 0; background: #fff; padding: .5rem 1rem; z-index: 100; }
.skip-link:focus { left: 1rem; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 700px) { .wrap { padding: 0 24px; } }
.narrow { max-width: 640px; padding-top: 2rem; padding-bottom: 3rem; }
.clear { clear: both; }

/* ---------- Header ---------- */
.topbar { background: var(--green-700); color: #fff; font-size: .875rem; }
.topbar__inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 38px; }
.topbar__tag { opacity: .9; display: none; }
@media (min-width: 700px) { .topbar__tag { display: inline; } }
.topbar__links { display: flex; gap: 1.1rem; margin-left: auto; align-items: center; }
.topbar a { color: #fff; text-decoration: none; }
.topbar a:hover { text-decoration: underline; color: #fff; }
.topbar__phone { display: inline-flex; gap: .35rem; align-items: center; font-weight: 600; }

.masthead { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; padding-bottom: 14px; }
.logo img { display: block; width: 220px; height: auto; }
@media (min-width: 700px) { .logo img { width: 280px; } }

.nav-toggle { display: inline-flex; align-items: center; gap: .5rem; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: .55rem .8rem; font: 600 .95rem var(--font); color: var(--green-700); cursor: pointer; }
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after { display: block; width: 20px; height: 2px; background: currentColor; position: relative; transition: transform .2s; }
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

.site-nav { background: linear-gradient(90deg, var(--green-600), var(--green-500)); }
.site-nav__list { list-style: none; margin: 0 auto; }
.site-nav a { color: #fff; text-decoration: none; font-weight: 600; display: block; }

/* Mobile menu */
@media (max-width: 959px) {
  .site-nav { display: none; }
  .site-nav.is-open { display: block; }
  .site-nav__list { padding: .25rem 0 .75rem; }
  .site-nav__item { position: relative; border-bottom: 1px solid rgba(255,255,255,.18); }
  .site-nav__item > a { padding: .8rem 3rem .8rem 0; }
  .site-nav__expand { position: absolute; right: 0; top: 0; width: 48px; height: 48px; background: none; border: 0; color: #fff; cursor: pointer; }
  .site-nav__expand::after { content: ""; display: block; margin: 0 auto; width: 9px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .2s; }
  .site-nav__expand[aria-expanded="true"]::after { transform: rotate(-135deg); }
  .site-nav__sub { display: none; list-style: none; margin: 0 0 .6rem; padding: 0 0 0 1rem; }
  .site-nav__item.is-expanded .site-nav__sub { display: block; }
  .site-nav__sub a { font-weight: 500; padding: .45rem 0; opacity: .95; }
  .site-nav__item.is-active > a { text-decoration: underline; text-underline-offset: 6px; }
}

/* Desktop menu with dropdowns */
@media (min-width: 960px) {
  .nav-toggle { display: none; }
  .site-nav__list { display: flex; justify-content: space-between; }
  .site-nav__item { position: relative; }
  .site-nav__item > a { padding: .85rem .7rem; font-size: .95rem; white-space: nowrap; }
  .site-nav__item > a:hover, .site-nav__item.is-active > a, .site-nav__item:focus-within > a { background: rgba(0,0,0,.14); }
  .site-nav__expand { display: none; }
  .site-nav__sub { position: absolute; left: 0; top: 100%; min-width: 250px; list-style: none; margin: 0; padding: .4rem 0; background: #fff; border-radius: 0 0 var(--radius) var(--radius); box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(4px); transition: opacity .15s, transform .15s, visibility .15s; z-index: 50; }
  .site-nav__item:hover .site-nav__sub, .site-nav__item:focus-within .site-nav__sub { opacity: 1; visibility: visible; transform: none; }
  .site-nav__item:last-child .site-nav__sub { left: auto; right: 0; }
  .site-nav__sub a { color: var(--ink); font-weight: 500; padding: .5rem 1rem; font-size: .95rem; }
  .site-nav__sub a:hover, .site-nav__sub a[aria-current] { background: var(--green-100); color: var(--green-700); }
}

.flash-wrap { padding-top: 1rem; }
.flash { padding: .8rem 1rem; border-radius: 8px; border: 1px solid; margin: 0 0 1rem; }
.flash--success { background: var(--green-100); border-color: #b9dfb0; color: var(--green-900); }
.flash--error { background: #fdecea; border-color: #f3b8b2; color: #8a1c12; }
.flash--info { background: var(--cyan-100); border-color: #a9dcef; color: #054b66; }

/* ---------- Hero (home) ---------- */
.hero { position: relative; background: #8fc4ea url(/assets/img/bg-header.jpg) center/cover; }
.hero__slides { position: relative; min-height: clamp(260px, 42vw, 460px); }
.hero__slide { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transition: opacity 1s ease; display: flex; align-items: flex-end; }
.hero__slide.is-active { opacity: 1; }
.hero__slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(4,30,10,.55)); }
.hero__slide .wrap { position: relative; z-index: 1; padding-bottom: 5rem; }
.hero__quote { color: #fff; max-width: 46rem; text-shadow: 0 1px 3px rgba(0,0,0,.45); }
.hero__quote h2, .hero__quote h3, .hero__quote p { color: #fff; margin: 0 0 .4rem; font-size: clamp(1.05rem, .9rem + .9vw, 1.6rem); font-weight: 600; }
.hero__quote p { font-size: 1rem; font-weight: 400; }
.hero__cta { position: absolute; left: 0; right: 0; bottom: 1.25rem; z-index: 2; display: flex; gap: .75rem; flex-wrap: wrap; }
@media (max-width: 699px) {
  .hero__slides { min-height: 300px; }
  .hero__slide .wrap { padding-bottom: 1.5rem; }
  .hero__cta { position: static; padding-top: 1rem; padding-bottom: 1rem; background: var(--green-700); }
  .hero__cta .btn { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) { .hero__slide { transition: none; } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .7rem 1.25rem; border-radius: 999px; font: 600 1rem var(--font); text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: background .15s, color .15s, transform .1s; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--green-600); color: #fff; }
.btn--primary:hover { background: var(--green-700); color: #fff; }
.btn--light { background: rgba(255,255,255,.92); color: var(--green-700); }
.btn--light:hover { background: #fff; color: var(--green-900); }

.quicklinks { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .75rem; margin-top: -1px; padding-top: 1.5rem; padding-bottom: .5rem; }
.quicklink { display: flex; align-items: center; gap: .6rem; padding: .85rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); font-weight: 600; background: #fff; transition: border-color .15s, box-shadow .15s; }
.quicklink:hover { border-color: var(--green-500); box-shadow: var(--shadow); color: var(--green-700); }
.quicklink__icon { display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--green-100); color: var(--green-700); font-size: 1.1rem; flex: none; }

/* ---------- Inner page banner ---------- */
.page-banner { background: linear-gradient(90deg, rgba(3,120,163,.92), rgba(4,160,211,.65) 60%, rgba(4,160,211,.25)), url(/assets/img/bg-header.jpg) right center/cover; color: #fff; padding: 1.6rem 0 1.5rem; }
.page-banner h1 { color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.2); }
.page-banner__date { margin: .3rem 0 0; opacity: .95; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .25rem; margin: 0 0 .35rem; padding: 0; font-size: .875rem; }
.breadcrumbs li + li::before { content: "›"; margin-right: .25rem; opacity: .8; }
.breadcrumbs a { color: #fff; }

/* ---------- Layout ---------- */
.layout { padding-top: 2rem; padding-bottom: 3.5rem; }
.content { min-width: 0; }
.content > .block:first-child > .block__title:first-child, .content > .block:first-child .prose > :first-child { margin-top: 0; }
@media (min-width: 960px) {
  .layout--with-sidebar { display: grid; grid-template-columns: 250px 1fr; gap: 2.5rem; align-items: start; }
  .layout--contact { display: grid; grid-template-columns: 1fr 320px; gap: 2.5rem; align-items: start; }
}
.content--home { padding-top: 1.5rem; padding-bottom: 3rem; }

.subnav { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 0; margin-bottom: 1.5rem; }
.subnav__title { font-size: 1rem; margin: 0 1rem .5rem; text-transform: uppercase; letter-spacing: .04em; }
.subnav__title a { color: var(--green-700); text-decoration: none; }
.subnav ul { list-style: none; margin: 0; padding: 0; }
.subnav ul ul { padding-left: .9rem; }
.subnav a { display: block; padding: .4rem 1rem; color: var(--ink); text-decoration: none; border-left: 3px solid transparent; font-size: .95rem; }
.subnav a:hover { color: var(--green-700); background: #fff; }
.subnav a[aria-current] { border-left-color: var(--green-500); color: var(--green-700); font-weight: 600; background: #fff; }
@media (max-width: 959px) { .subnav { order: 2; } }

/* ---------- Content blocks ---------- */
.block { margin-bottom: 1.75rem; }
.block::after { content: ""; display: table; clear: both; }
.block__title a { color: inherit; }
.prose { overflow-wrap: anywhere; }
.prose > :last-child { margin-bottom: 0; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li { margin-bottom: .3rem; }
.prose table { border-collapse: collapse; width: 100%; display: block; overflow-x: auto; }
.prose td, .prose th { border: 1px solid var(--line); padding: .45rem .6rem; text-align: left; vertical-align: top; }
.prose th { background: var(--bg-soft); }
.prose blockquote, blockquote { margin: 0 0 1.25rem; padding: 1.1rem 1.3rem; border-left: 4px solid var(--green-500); background: linear-gradient(90deg, #e3f5f2, #eaf6e9); border-radius: 0 var(--radius) var(--radius) 0; }
.prose blockquote h2, .prose blockquote h3 { margin: 0 0 .3rem; font-size: 1.15rem; font-style: italic; color: var(--green-700); }
.prose .small, .small { font-size: .875rem; }
.prose .large { font-size: 1.12rem; }
.prose a.button { display: inline-block; background: var(--green-600); color: #fff; padding: .55rem 1.1rem; border-radius: 999px; text-decoration: none; font-weight: 600; }
.text-center { text-align: center; }
.text-right { text-align: right; }

.media { margin: 0 0 1rem; }
.media img { display: block; border-radius: 8px; }
.media figcaption { font-size: .875rem; color: var(--muted); margin-top: .35rem; }
.media--above, .media--below { text-align: center; }
.media--above img, .media--below img { margin: 0 auto; }
@media (min-width: 600px) {
  .media--float-right { float: right; margin: .3rem 0 1rem 1.5rem; max-width: 50%; }
  .media--float-left { float: left; margin: .3rem 1.5rem 1rem 0; max-width: 50%; }
}
.doc-thumb img { border: 1px solid var(--line); box-shadow: var(--shadow); }

.video { position: relative; aspect-ratio: 16 / 9; margin: 0 0 1rem; max-width: 720px; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 8px; }

.download a { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: .9rem; align-items: center; padding: .75rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); max-width: 560px; transition: border-color .15s, box-shadow .15s; }
.download a:hover { border-color: var(--cyan-500); box-shadow: var(--shadow); }
.download__icon { grid-row: span 2; display: grid; place-items: center; width: 2.8rem; height: 2.8rem; border-radius: 8px; background: var(--cyan-100); color: var(--cyan-700); font-size: .72rem; font-weight: 700; }
.download__label { font-weight: 600; color: var(--cyan-700); }
.download__meta { font-size: .8rem; color: var(--muted); }

.gallery { display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0 0 1.75rem; }
@media (min-width: 700px) {
  .gallery--cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gallery--cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 420px) { .gallery { grid-template-columns: 1fr 1fr; gap: .6rem; } }
.gallery__item { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .15s, transform .15s; }
.gallery__item:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.gallery__item > a { display: block; background: var(--bg-soft); }
.gallery__img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.gallery--docs .gallery__img { aspect-ratio: 4 / 5; object-position: top; }
.gallery--docs .gallery__item > a { padding: .6rem .6rem 0; }
.gallery--docs .gallery__img { border: 1px solid var(--line); border-radius: 4px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.gallery__icon { display: grid; place-items: center; aspect-ratio: 3 / 2; font-weight: 700; color: var(--cyan-700); font-size: 1.4rem; }
.gallery__item figcaption { padding: .55rem .7rem .7rem; font-size: .9rem; font-weight: 600; line-height: 1.35; }
.gallery__meta { display: block; font-weight: 400; color: var(--muted); font-size: .78rem; margin-top: .15rem; }

.slideshow { position: relative; margin: 0 0 1.75rem; background: #0e1a12; border-radius: var(--radius); overflow: hidden; }
.slideshow__slide { margin: 0; }
.slideshow__slide img { display: block; margin: 0 auto; max-height: 70vh; width: auto; }
.slideshow__slide figcaption { color: #fff; text-align: center; padding: .5rem 1rem; font-size: .9rem; }
.slideshow__btn { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.85); color: var(--green-700); font-size: 1.8rem; line-height: 1; cursor: pointer; }
.slideshow__btn:hover { background: #fff; }
.slideshow__btn--prev { left: .6rem; }
.slideshow__btn--next { right: .6rem; }
.slideshow__count { position: absolute; right: .8rem; bottom: .3rem; margin: 0; color: #fff; font-size: .8rem; opacity: .85; }

.cards { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin: 1.5rem 0; }
.card { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; transition: box-shadow .15s, transform .15s; }
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); color: var(--green-700); }
.card__img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: var(--bg-soft); }
.card__img--blank { background: linear-gradient(135deg, var(--green-100), var(--cyan-100)); }
.card__title { padding: .8rem 1rem; font-weight: 600; }

.index-list { list-style: none; padding: 0; margin: 1.25rem 0; border-top: 1px solid var(--line); }
.index-list li { border-bottom: 1px solid var(--line); }
.index-list a { display: flex; justify-content: space-between; padding: .75rem .25rem; text-decoration: none; font-weight: 600; }
.index-list a::after { content: "→"; color: var(--green-500); }

.news-list { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.news-list__item { display: grid; gap: .1rem; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.news-list__item a { font-weight: 600; font-size: 1.05rem; text-decoration: none; }
.news-list time { color: var(--muted); font-size: .875rem; }
.news-list--compact li { padding: .35rem 0; }
.pager { display: flex; gap: 1rem; align-items: center; justify-content: space-between; }
.back-link { margin-top: 2rem; }

/* ---------- Forms ---------- */
.form { margin: 1.5rem 0; }
.form--narrow { max-width: 420px; }
.form__grid { display: grid; gap: 1rem; }
@media (min-width: 600px) { .form__grid { grid-template-columns: 1fr 1fr; } .field--wide { grid-column: 1 / -1; } }
.field { margin-bottom: 1rem; }
.form__grid .field { margin: 0; }
.field label { display: block; font-weight: 600; margin-bottom: .3rem; }
.field input, .field textarea, .field select { width: 100%; padding: .65rem .75rem; font: inherit; border: 1px solid #b9c3cc; border-radius: 8px; background: #fff; color: var(--ink); }
.field input:focus, .field textarea:focus { border-color: var(--cyan-500); outline: 3px solid rgba(4,160,211,.2); }
.has-error input, .has-error textarea { border-color: #c0392b; }
.field__error { color: #b42318; font-size: .875rem; margin: .3rem 0 0; }
.req { color: #b42318; }
.opt { font-weight: 400; color: var(--muted); font-size: .875rem; }
.form .btn { margin-top: 1.25rem; }
.form__aside { margin-top: 1rem; font-size: .9rem; }
.form__hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.contact-card { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.4rem; }
.contact-card h2 { margin-top: 0; font-size: 1.15rem; }
.contact-card__big { font-size: 1.4rem; font-weight: 700; }
.contact-card__big a { text-decoration: none; color: var(--green-700); }
.contact-card dt { font-weight: 600; color: var(--muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; }
.contact-card dd { margin: 0 0 .8rem; }

/* ---------- Footer ---------- */
.site-footer { background: #10261a; color: #cfe0d4; font-size: .95rem; }
.site-footer a { color: #fff; }
.site-footer h2 { color: #fff; font-size: .95rem; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 .7rem; }
.site-footer__grid { display: grid; gap: 2rem; padding-top: 2.5rem; padding-bottom: 2rem; }
@media (min-width: 700px) { .site-footer__grid { grid-template-columns: 1.3fr 1fr 1fr; } }
.site-footer__logo { background: #fff; padding: 8px 10px; border-radius: 8px; width: 223px; margin-bottom: .8rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; columns: 2; }
.site-footer li { margin-bottom: .3rem; }
.site-footer ul a { text-decoration: none; }
.site-footer ul a:hover { text-decoration: underline; }
.site-footer__legal { border-top: 1px solid rgba(255,255,255,.12); padding-top: 1rem; padding-bottom: 1.5rem; font-size: .85rem; opacity: .8; }
.site-footer__legal p { margin: 0; }

/* ---------- Lightbox ---------- */
.lightbox-overlay { position: fixed; inset: 0; background: rgba(5, 15, 8, .9); z-index: 200; display: grid; place-items: center; padding: 3rem 1rem 1rem; }
.lightbox-overlay[hidden] { display: none; }
.lightbox-overlay figure { margin: 0; text-align: center; }
.lightbox-overlay img { max-height: 82vh; max-width: 92vw; border-radius: 6px; }
.lightbox-overlay figcaption { color: #fff; margin-top: .6rem; }
.lightbox-overlay__close { position: absolute; top: .6rem; right: .8rem; width: 44px; height: 44px; font-size: 2rem; line-height: 1; color: #fff; background: none; border: 0; cursor: pointer; }

@media print {
  .site-header, .site-footer, .subnav, .hero__cta, .quicklinks { display: none; }
  .page-banner { background: none; color: #000; }
  .page-banner h1 { color: #000; }
}
