:root {
  --green: #1f8a4c;
  --green-dark: #146b39;
  --green-deep: #0f5a2f;
  --green-soft: #dff3e6;
  --bg: #ffffff;
  --bg-alt: #f3f8f5;
  --text: #12261a;
  --muted: #5a6b60;
  --border: #dbe7df;
  --card: #ffffff;
  --shadow: 0 10px 30px rgba(18, 38, 26, .10);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1712;
    --bg-alt: #142019;
    --text: #e6f2ea;
    --muted: #9fb3a6;
    --border: #24372b;
    --card: #17241c;
    --green-soft: #1d3a28;
    --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }

/* ================= Viršutinė juosta ================= */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: var(--green-dark);
  color: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .15);
}
.topbar-inner {
  max-width: 1160px; margin: 0 auto; padding: 10px 16px;
  display: flex; align-items: center; gap: 16px;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; }
.logo-badge {
  display: grid; place-items: center;
  width: 42px; height: 42px; border-radius: 12px;
  background: #fff; color: var(--green-dark); font-weight: 900;
}
.logo small { display: block; font-weight: 400; font-size: 12px; opacity: .85; line-height: 1.2; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { padding: 8px 12px; border-radius: 10px; font-size: 15px; color: rgba(255, 255, 255, .9); }
.nav a:hover { background: rgba(255, 255, 255, .14); color: #fff; }

/* SAVITARNA mygtukas ir meniu */
.self { position: relative; }
.btn-self {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border: 0; border-radius: 12px; cursor: pointer;
  background: #fff; color: var(--green-dark);
  font-family: inherit; font-size: 15px; font-weight: 800; line-height: 1; letter-spacing: .06em;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
  transition: transform .15s, background .15s;
}
.btn-self svg { width: 18px; height: 18px; fill: currentColor; }
.btn-self:hover, .btn-self[aria-expanded="true"] { background: var(--green-soft); transform: translateY(-1px); }
.self-menu {
  position: absolute; right: 0; top: calc(100% + 10px);
  width: 330px; padding: 8px;
  background: var(--card); color: var(--text);
  border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow);
}
.self-item { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 12px; }
.self-item:hover, .self-item:focus-visible { background: var(--green-soft); outline: none; }
.self-item b { display: block; font-size: 15px; }
.self-item small { color: var(--muted); font-size: 13px; }
.self-ico {
  flex: none; display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 12px; background: var(--green-soft); font-size: 22px;
}

/* ================= Didelis paveikslėlis ================= */
.hero { position: relative; height: min(86vh, 780px); min-height: 460px; overflow: hidden; background: #2b3a31; }
.hero-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: left top;   /* nuotraukos autorių ženklas lieka matomas */
  animation: zoom 24s ease-in-out infinite alternate;
  transform-origin: left top;
}
@keyframes zoom { from { transform: scale(1); } to { transform: scale(1.06); } }
.hero-shade {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 35%, rgba(8, 30, 17, .55) 65%, rgba(8, 30, 17, .85) 100%);
}
.hero-text {
  position: absolute; left: 0; right: 0; bottom: 0;
  max-width: 1160px; margin: 0 auto; padding: 0 16px 56px;
  color: #fff;
}
.hero-tag {
  display: inline-block; padding: 6px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .16); backdrop-filter: blur(6px);
  font-size: 13px; font-weight: 600; letter-spacing: .03em;
}
.hero h1 { font-size: clamp(40px, 7vw, 76px); line-height: 1.02; margin: 14px 0 10px; font-weight: 900; }
.hero h1 span { display: block; font-size: .42em; font-weight: 600; opacity: .92; margin-top: 8px; }
.hero p { max-width: 620px; font-size: clamp(16px, 2vw, 19px); opacity: .92; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.photo-credit { position: absolute; right: 12px; top: 10px; font-size: 11px; color: rgba(255, 255, 255, .8); text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }

.btn {
  display: inline-block; padding: 14px 26px; border-radius: 12px;
  background: var(--green); color: #fff; font-weight: 700;
  transition: background .15s, transform .15s, box-shadow .15s;
}
.btn:hover { background: var(--green-dark); transform: translateY(-1px); box-shadow: 0 8px 20px rgba(31, 138, 76, .4); }
.btn-big { font-size: 17px; padding: 16px 30px; }
.btn-ghost { background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .5); backdrop-filter: blur(6px); }
.btn-ghost:hover { background: rgba(255, 255, 255, .26); box-shadow: none; }

/* ================= Skyriai ================= */
.section { padding: 80px 0; }
.section-alt { background: var(--bg-alt); }
.section-title { font-size: clamp(28px, 4vw, 40px); line-height: 1.15; margin-bottom: 8px; }
.section-sub { color: var(--muted); font-size: 17px; margin-bottom: 32px; }

/* Savitarnos plytelės – dideli paveikslėliai.
   Nuotrauką galima įdėti į img/savitarna-deklaravimas.jpg ir img/savitarna-balsavimas.jpg – kol jų nėra, rodomas spalvotas fonas. */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.tile {
  position: relative; display: flex; align-items: flex-end;
  min-height: 400px; border-radius: 22px; overflow: hidden; color: #fff;
  background-size: cover; background-position: center;
  box-shadow: var(--shadow);
  transition: transform .25s, box-shadow .25s;
}
.tile::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 20%, rgba(6, 28, 15, .82) 100%);
}
.tile:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(18, 38, 26, .25); }
.tile-heat { background-image: url("img/savitarna-deklaravimas.jpg"), radial-gradient(circle at 80% 15%, #ffb36b 0, transparent 45%), linear-gradient(135deg, #e5673a, #1f8a4c 85%); }
.tile-vote { background-image: url("img/savitarna-balsavimas.jpg"), radial-gradient(circle at 80% 15%, #9be7b8 0, transparent 45%), linear-gradient(135deg, #2a7fb8, #146b39 85%); }
.tile-body { position: relative; padding: 32px; }
.tile-ico {
  display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 16px;
  border-radius: 18px; background: rgba(255, 255, 255, .18); backdrop-filter: blur(6px); font-size: 32px;
}
.tile h3 { font-size: 26px; line-height: 1.2; margin-bottom: 8px; }
.tile p { opacity: .9; max-width: 440px; }
.tile-go {
  display: inline-block; margin-top: 18px; padding: 10px 18px; border-radius: 10px;
  background: #fff; color: var(--green-dark); font-weight: 800;
}

.mini-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 16px; }
.mini-tile {
  display: grid; grid-template-columns: auto 1fr; column-gap: 14px; align-items: center;
  padding: 18px 20px; border-radius: 18px; background: var(--card); border: 1px solid var(--border);
  box-shadow: var(--shadow); transition: transform .2s;
}
.mini-tile:hover { transform: translateY(-3px); }
.mini-tile span { grid-row: span 2; display: grid; place-items: center; width: 50px; height: 50px; border-radius: 14px; background: var(--green-soft); font-size: 24px; }
.mini-tile b { font-size: 17px; }
.mini-tile small { color: var(--muted); font-size: 14px; }

/* Apie */
.about { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.about-img {
  min-height: 420px; border-radius: 22px; box-shadow: var(--shadow);
  background-size: cover; background-position: left top;
}
.about p { color: var(--muted); font-size: 17px; margin-top: 8px; }
.about p b { color: var(--text); }
.facts { list-style: none; margin-top: 24px; display: grid; gap: 12px; }
.facts li { padding: 14px 18px; background: var(--card); border: 1px solid var(--border); border-radius: 14px; }
.facts b { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--green); }

/* Galerija */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-top: 24px; }
.gallery figure { border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); background: var(--card); }
.gallery img { display: block; width: 100%; height: 260px; object-fit: cover; transition: transform .4s; }
.gallery figure:hover img { transform: scale(1.04); }
.gallery figcaption { padding: 10px 14px; font-size: 14px; color: var(--muted); }

/* Kontaktai */
.contacts { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.contact-list { margin-top: 16px; display: grid; grid-template-columns: max-content 1fr; gap: 12px 24px; }
.contact-list dt { color: var(--muted); font-size: 14px; padding-top: 2px; }
.contact-list dd { font-weight: 600; }
.contact-list a { color: var(--green); }
.map-link { margin-left: 8px; font-size: 14px; font-weight: 600; }
.contact-card { padding: 28px; border-radius: 18px; background: var(--green-dark); color: #fff; box-shadow: var(--shadow); }
.contact-card h3 { font-size: 20px; margin-bottom: 8px; }
.contact-card p { opacity: .92; }
.contact-card a { text-decoration: underline; font-weight: 700; }

.footer { padding: 28px 16px; text-align: center; color: var(--muted); font-size: 14px; border-top: 1px solid var(--border); }

/* ================= Mažesni ekranai ================= */
@media (max-width: 860px) {
  .nav { display: none; }
  .self { margin-left: auto; }
  .tiles, .about, .contacts, .mini-tiles { grid-template-columns: 1fr; }
  .tile { min-height: 320px; }
  .about-img { min-height: 260px; }
  .section { padding: 56px 0; }
}
@media (max-width: 480px) {
  .logo span:last-child { display: none; }
  .btn-self { padding: 10px 14px; font-size: 14px; }
  .self-menu { position: fixed; left: 16px; right: 16px; top: 70px; width: auto; }
  .hero-text { padding-bottom: 36px; }
  .tile-body { padding: 24px; }
  .contact-list { grid-template-columns: 1fr; gap: 2px; }
  .contact-list dd { margin-bottom: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-img { animation: none; }
  .tile, .btn, .btn-self, .gallery img { transition: none; }
}
