/* G. Ecorecycling SA – site styles (mobile first) */

@font-face {
  font-family: "Montserrat";
  src: url("../Fonts/montserrat-latin.woff2") format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Montserrat";
  src: url("../Fonts/montserrat-latin-ext.woff2") format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --green: #6aab23;
  --green-dark: #3f7a14;
  --green-darker: #2c5a0c;
  --yellow: #f2c500;
  --ink: #1d2318;
  --text: #3b4236;
  --muted: #6b7365;
  --line: #e3e7de;
  --bg-soft: #f4f6f1;
  --white: #fff;
  --radius: 10px;
  --shadow: 0 6px 24px rgba(20, 30, 10, .08);
  --header-h: 72px;
  --container: 1200px;
  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--white);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--green-darker); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 2px;
}
h1, h2, h3, h4 { color: var(--ink); line-height: 1.25; margin: 0 0 .6em; font-weight: 700; }
h1 { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.75rem); }
h2 { font-size: clamp(1.35rem, 1.1rem + 1.1vw, 1.9rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
strong { color: var(--ink); }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .container { padding: 0 32px; } }
.section { padding-top: 48px; padding-bottom: 64px; }
@media (min-width: 992px) { .section { padding-top: 72px; padding-bottom: 96px; } }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 1000;
  background: var(--ink); color: var(--white); padding: 10px 16px; border-radius: 6px;
}
.skip-link:focus { top: 12px; color: var(--white); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: 0 26px; border-radius: 999px;
  font: 600 .95rem/1 var(--font); letter-spacing: .02em; text-decoration: none;
  border: 2px solid transparent; cursor: pointer; transition: background .2s, color .2s, border-color .2s;
}
.btn--primary { background: var(--green); color: var(--ink); }
.btn--primary:hover { background: var(--yellow); color: var(--ink); }
.btn--ghost { border-color: rgba(255, 255, 255, .85); color: var(--white); }
.btn--ghost:hover { background: var(--white); color: var(--ink); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--white); border-bottom: 1px solid var(--line);
  transition: box-shadow .2s;
}
.site-header.is-scrolled { box-shadow: var(--shadow); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 24px; }
.site-header__logo img { width: 170px; height: auto; }
@media (min-width: 1200px) { .site-header__logo img { width: 200px; } }

.nav-toggle {
  position: relative; width: 48px; height: 48px; margin-right: -8px;
  background: none; border: 0; cursor: pointer;
}
.nav-toggle__bar, .nav-toggle__bar::before, .nav-toggle__bar::after {
  position: absolute; left: 12px; width: 24px; height: 2px; background: var(--ink);
  transition: transform .25s, background .25s; content: "";
}
.nav-toggle__bar { top: 23px; }
.nav-toggle__bar::before { left: 0; top: -7px; }
.nav-toggle__bar::after { left: 0; top: 7px; }
.nav-open .nav-toggle__bar { background: transparent; }
.nav-open .nav-toggle__bar::before { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle__bar::after { transform: translateY(-7px) rotate(-45deg); }

.main-menu, .submenu, .lang-menu { list-style: none; margin: 0; padding: 0; }
.main-menu a { text-decoration: none; color: var(--ink); font-weight: 600; }

/* Mobile navigation panel */
@media (max-width: 1099.98px) {
  .site-nav {
    position: fixed; inset: var(--header-h) 0 0 0;
    background: var(--white); overflow-y: auto; padding: 8px 16px 32px;
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity .2s, transform .2s, visibility .2s;
  }
  .nav-open { overflow: hidden; }
  .nav-open .site-nav { visibility: visible; opacity: 1; transform: none; }
  .main-menu__item { position: relative; border-bottom: 1px solid var(--line); }
  .main-menu__item > a { display: block; padding: 14px 56px 14px 0; font-size: 1.05rem; }
  .main-menu__item.is-active > a { color: var(--green-dark); }
  .submenu-toggle {
    position: absolute; right: 0; top: 4px; width: 48px; height: 48px;
    background: none; border: 0; cursor: pointer;
  }
  .submenu-toggle::before {
    content: ""; position: absolute; left: 18px; top: 16px; width: 10px; height: 10px;
    border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink);
    transform: rotate(45deg); transition: transform .2s;
  }
  .is-open > .submenu-toggle::before { transform: translateY(5px) rotate(-135deg); }
  .submenu { display: none; padding: 0 0 12px 12px; }
  .is-open > .submenu { display: block; }
  .submenu a { display: block; padding: 9px 0; font-weight: 500; font-size: .95rem; color: var(--text); }
  .submenu .is-active > a { color: var(--green-dark); }
  .lang-menu { display: flex; gap: 8px; margin-top: 24px; }
}

/* Desktop navigation */
@media (min-width: 1100px) {
  .nav-toggle { display: none; }
  .site-nav { display: flex; align-items: center; gap: 28px; }
  .main-menu { display: flex; gap: 4px; }
  .main-menu__item { position: relative; }
  .main-menu__item > a {
    display: flex; align-items: center; height: var(--header-h); padding: 0 12px;
    font-size: .92rem; position: relative;
  }
  .main-menu__item > a::after {
    content: ""; position: absolute; left: 12px; right: 12px; bottom: 18px; height: 3px;
    background: var(--green); border-radius: 2px; transform: scaleX(0); transition: transform .2s;
  }
  .main-menu__item:hover > a::after, .main-menu__item.is-active > a::after { transform: scaleX(1); }
  .submenu-toggle { display: none; }
  .submenu {
    position: absolute; left: 0; top: 100%; min-width: 320px; padding: 10px 0;
    background: var(--white); border-radius: 0 0 var(--radius) var(--radius); box-shadow: var(--shadow);
    border-top: 3px solid var(--green);
    visibility: hidden; opacity: 0; transform: translateY(6px); transition: opacity .15s, transform .15s, visibility .15s;
  }
  .main-menu__item:hover > .submenu, .main-menu__item:focus-within > .submenu { visibility: visible; opacity: 1; transform: none; }
  .submenu a { display: block; padding: 8px 22px; font-weight: 500; font-size: .9rem; line-height: 1.4; color: var(--text); }
  .submenu a:hover, .submenu .is-active > a { color: var(--green-dark); background: var(--bg-soft); }
  .lang-menu { display: flex; gap: 4px; }
}

.lang-menu a, .lang-menu span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; height: 36px; padding: 0 8px; border-radius: 6px;
  font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; text-decoration: none;
  color: var(--muted); border: 1px solid var(--line);
}
.lang-menu a:hover { color: var(--ink); border-color: var(--ink); }
.lang-menu .is-active { background: var(--ink); border-color: var(--ink); color: var(--white); }

/* Home hero */
.hero {
  position: relative; display: flex; align-items: flex-end;
  min-height: min(78vh, 720px); min-height: min(78svh, 720px);
  background: var(--ink); color: var(--white); overflow: hidden;
}
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 40%; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10, 15, 5, .05) 20%, rgba(10, 15, 5, .78) 100%);
}
@media (min-width: 992px) {
  .hero { align-items: center; }
  .hero::after { background: linear-gradient(90deg, rgba(10, 15, 5, .82) 0%, rgba(10, 15, 5, .45) 45%, rgba(10, 15, 5, 0) 75%); }
}
.hero__inner { position: relative; z-index: 1; padding-top: 48px; padding-bottom: 48px; }
.hero__kicker {
  display: inline-block; margin-bottom: 16px; padding: 4px 12px; border-radius: 4px;
  background: var(--green); color: var(--ink); font-weight: 700; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase;
}
.hero__title { color: var(--white); max-width: 15em; font-size: clamp(1.9rem, 1.2rem + 3vw, 3.4rem); margin-bottom: .4em; }
.hero__lead { max-width: 32em; font-size: clamp(1.05rem, 1rem + .4vw, 1.3rem); color: rgba(255, 255, 255, .92); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* Inner page hero */
.page-hero {
  position: relative; background: var(--ink) linear-gradient(120deg, #24301b 0%, #1d2318 60%); color: var(--white);
  overflow: hidden;
}
.page-hero::before {
  content: ""; position: absolute; right: -80px; top: -80px; width: 320px; height: 320px; border-radius: 50%;
  border: 40px solid rgba(106, 171, 35, .25);
}
.page-hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .35; }
.page-hero__inner { position: relative; padding-top: 40px; padding-bottom: 40px; }
@media (min-width: 992px) { .page-hero__inner { padding-top: 64px; padding-bottom: 64px; } }
.page-hero__title { color: var(--white); margin: 0; max-width: 22em; }
.breadcrumb ol { display: flex; flex-wrap: wrap; list-style: none; margin: 0 0 12px; padding: 0; font-size: .85rem; }
.breadcrumb li { color: rgba(255, 255, 255, .7); }
.breadcrumb li + li::before { content: "/"; margin: 0 8px; color: rgba(255, 255, 255, .4); }
.breadcrumb a { color: rgba(255, 255, 255, .85); text-decoration: none; }
.breadcrumb a:hover { color: var(--white); text-decoration: underline; }

/* Content elements (fluid_styled_content) */
.frame { margin-bottom: 48px; }
.frame:last-child { margin-bottom: 0; }
.frame > header h2, .ce-headline-center { position: relative; padding-bottom: .5em; }
.frame > header h2::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 56px; height: 4px; border-radius: 2px; background: var(--green);
}
.ce-headline-center { text-align: center; }
.frame > header .ce-headline-center::after { left: 50%; transform: translateX(-50%); }
.ce-bodytext { max-width: 72ch; }
.ce-bodytext ul { padding-left: 1.2em; }

.ce-textpic { display: flex; flex-direction: column; gap: 28px; }
@media (min-width: 992px) {
  .ce-textpic.ce-intext, .ce-textpic.ce-nowrap { flex-direction: row; align-items: flex-start; gap: 48px; }
  .ce-textpic.ce-right { flex-direction: row-reverse; }
  .ce-textpic.ce-intext .ce-gallery, .ce-textpic.ce-nowrap .ce-gallery { flex: 0 0 46%; }
  .ce-textpic.ce-intext .ce-bodytext, .ce-textpic.ce-nowrap .ce-bodytext { flex: 1 1 auto; }
}

/* Gallery: responsive grid regardless of configured columns */
.ce-gallery { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ce-gallery[data-ce-images="1"] { grid-template-columns: 1fr; }
@media (min-width: 768px) {
  .ce-gallery[data-ce-columns="3"], .ce-gallery[data-ce-columns="4"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1200px) {
  .ce-gallery[data-ce-columns="4"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.ce-outer, .ce-inner, .ce-row { display: contents; }
.ce-column { min-width: 0; }
.ce-gallery figure { margin: 0; }
.ce-gallery .image a, .ce-gallery .image > img { display: block; overflow: hidden; border-radius: var(--radius); background: var(--bg-soft); }
.ce-gallery[data-ce-images]:not([data-ce-images="1"]) img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.ce-gallery[data-ce-images="1"] img { width: 100%; border-radius: var(--radius); }
.ce-gallery .image a img { transition: transform .35s ease; }
.ce-gallery .image a:hover img { transform: scale(1.04); }
.ce-gallery figcaption { font-size: .85rem; color: var(--muted); padding-top: 6px; }

/* Logo gallery (frame class "logos") */
.frame-layout-1 .ce-gallery img, .logos .ce-gallery img { aspect-ratio: 3 / 2; object-fit: contain; background: var(--white); padding: 16px; border: 1px solid var(--line); }

/* Service cards (menu_subpages) */
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; } }
.card { display: flex; }
.card__link {
  display: flex; flex-direction: column; width: 100%; overflow: hidden;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--text); text-decoration: none; transition: box-shadow .2s, transform .2s, border-color .2s;
}
.card__link:hover { box-shadow: var(--shadow); transform: translateY(-3px); border-color: transparent; color: var(--text); }
.card__media { display: block; aspect-ratio: 3 / 2; background: var(--bg-soft); overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.card__link:hover .card__media img { transform: scale(1.05); }
.card__body { display: flex; flex-direction: column; flex: 1; padding: 20px 22px 22px; }
.card__title { color: var(--ink); font-weight: 700; font-size: 1.08rem; line-height: 1.35; margin-bottom: 8px; }
.card__text { font-size: .93rem; line-height: 1.6; margin-bottom: 16px; }
.card__more { margin-top: auto; color: var(--green-dark); font-weight: 700; font-size: .88rem; }
.card__more::after { content: " →"; transition: margin .2s; }
.card__link:hover .card__more::after { margin-left: 4px; }

/* Address boxes on contact page */
.addresses { display: grid; gap: 20px; grid-template-columns: 1fr; margin: 8px 0 0; }
@media (min-width: 768px) { .addresses { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.address-box { padding: 24px; border-radius: var(--radius); background: var(--bg-soft); border-left: 4px solid var(--green); }
.address-box h3 { margin-bottom: .4em; }
.address-box p:last-child { margin-bottom: 0; }

/* Forms (EXT:form) */
form .form-group, form .clearfix { margin-bottom: 18px; }
form .row { display: grid; gap: 0 20px; grid-template-columns: 1fr; }
@media (min-width: 768px) { form .row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
form .row > [class*="col-"] { min-width: 0; }
form .form-label, form label { display: block; font-weight: 600; color: var(--ink); margin-bottom: 6px; font-size: .95rem; }
form .required { color: #b3261e; margin-left: 2px; }
form input[type="text"], form input[type="email"], form input[type="tel"], form textarea, form select {
  width: 100%; min-height: 48px; padding: 10px 14px;
  font: inherit; color: var(--ink); background: var(--white);
  border: 1px solid #c9cfc2; border-radius: 8px; transition: border-color .15s, box-shadow .15s;
}
form textarea { min-height: 160px; resize: vertical; }
form input:focus, form textarea:focus { border-color: var(--green-dark); box-shadow: 0 0 0 3px rgba(106, 171, 35, .25); outline: none; }
form .form-check, form .checkbox label { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
form input[type="checkbox"] { width: 20px; height: 20px; margin-top: 3px; flex: 0 0 auto; accent-color: var(--green-dark); }
form .help-block, form .invalid-feedback, form .error { color: #b3261e; font-size: .88rem; }
form .has-error input, form .has-error textarea { border-color: #b3261e; }
form .actions, form nav.form-navigation { margin-top: 8px; }
form .btn-toolbar { display: flex; }
form button[type="submit"], form .btn-primary, form input[type="submit"] {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 30px; border: 0; border-radius: 999px;
  background: var(--green-dark); color: var(--white); font: 600 1rem/1 var(--font); cursor: pointer;
}
form button[type="submit"]:hover, form .btn-primary:hover { background: var(--green-darker); }
.form-wrap { max-width: 860px; padding: 28px 20px; border-radius: var(--radius); background: var(--white); border: 1px solid var(--line); }
@media (min-width: 768px) { .form-wrap { padding: 40px; } }

/* Footer */
.site-footer { background: var(--ink); color: rgba(255, 255, 255, .78); font-size: .95rem; }
.site-footer a { color: var(--white); text-decoration: none; }
.site-footer a:hover { color: var(--green); text-decoration: underline; }
.site-footer__grid { display: grid; gap: 36px; grid-template-columns: 1fr; padding-top: 56px; padding-bottom: 48px; }
@media (min-width: 768px) { .site-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .site-footer__grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer h2 { color: var(--white); font-size: 1rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 14px; }
.site-footer__logo { width: 210px; height: auto; margin-bottom: 18px; padding: 10px 14px; background: var(--white); border-radius: 8px; }
.site-footer__brand p { max-width: 28em; }
.site-footer address { font-style: normal; margin-bottom: 12px; }
.site-footer__bottom { border-top: 1px solid rgba(255, 255, 255, .12); font-size: .85rem; }
.site-footer__bottom .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 18px; padding-bottom: 18px; }
.site-footer__bottom p { margin: 0; }
@media (max-width: 767.98px) { .site-footer__bottom .container { padding-bottom: 80px; } }

.back-to-top {
  position: fixed; right: 16px; bottom: 16px; z-index: 90; width: 48px; height: 48px; border-radius: 50%;
  background: var(--green); box-shadow: var(--shadow); opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s;
}
.back-to-top::before {
  content: ""; position: absolute; left: 18px; top: 20px; width: 12px; height: 12px;
  border-left: 2px solid var(--ink); border-top: 2px solid var(--ink); transform: rotate(45deg);
}
.back-to-top.is-visible { opacity: 1; visibility: visible; }

/* Lightbox */
.lightbox { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(10, 12, 8, .94); }
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox::backdrop { background: rgba(10, 12, 8, .94); }
.lightbox__img { max-width: calc(100vw - 32px); max-height: calc(100vh - 120px); width: auto; height: auto; object-fit: contain; border-radius: 6px; }
.lightbox__btn {
  position: absolute; width: 52px; height: 52px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .12); color: var(--white); font-size: 2rem; line-height: 1; cursor: pointer;
}
.lightbox__btn:hover { background: rgba(255, 255, 255, .25); }
.lightbox__close { top: 16px; right: 16px; }
.lightbox__prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 12px; top: 50%; transform: translateY(-50%); }
@media (max-width: 767.98px) {
  .lightbox__prev, .lightbox__next { top: auto; bottom: 20px; transform: none; }
  .lightbox__prev { left: calc(50% - 64px); }
  .lightbox__next { right: calc(50% - 64px); }
}
.lightbox.is-single .lightbox__prev, .lightbox.is-single .lightbox__next { display: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

@media print {
  .site-header, .site-footer, .back-to-top, .lightbox { display: none !important; }
}
