
:root {
  --black: #000000;
  --white: #FFFFFF;
  --zip-green: #1A5642;
  --zip-gray: #B1B3B6;
  --zip-dark: #58595B;
  --zip-light: #E6E7E8;
  --radius: 16px;
  --header-h: 92px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, system-ui, "Segoe UI", Roboto, Arial, "Helvetica Neue", sans-serif;
  color: var(--black);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.container { width: min(1100px, 92%); margin: 0 auto; }

.section, .team-banner { scroll-margin-top: calc(var(--header-h) + 16px); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 100; background: var(--zip-green); color: var(--white); border-bottom: 1px solid rgba(255,255,255,.1); }
.header-inner { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 18px 0; }
.logo img { display:block; }

/* Desktop nav */
.nav { display:flex; align-items:center; gap: 6px; }
.nav .nav-link { color: var(--white); text-decoration: none; font-weight: 600; padding: 8px 12px; border-radius: 999px; transition: background .2s ease, transform .12s ease; }
.nav .nav-link:hover { background: rgba(255,255,255,.14); }
.nav .nav-link.clicked { animation: navPop .28s ease; }
@keyframes navPop { 0% { transform: scale(1); } 50% { transform: scale(0.96); } 100% { transform: scale(1); } }

/* Language switch */
.lang-switch { display:flex; gap: 8px; }
.lang-btn { background: transparent; border: 1px solid rgba(255,255,255,.4); color: var(--white); padding: 8px 12px; border-radius: 999px; cursor: pointer; font-weight: 600; }
.lang-btn.active, .lang-btn:focus { background: var(--white); color: var(--zip-green); }

/* Hamburger */
.hamburger { display:none; width: 42px; height: 36px; background: transparent; border: 1px solid rgba(255,255,255,.35); border-radius: 10px; align-items:center; justify-content:center; }
.hamburger img { display:block; }
@media (max-width: 900px) {
  .nav { display:none; }
  .hamburger { display:flex; }
}

/* Mobile nav */
.mobile-nav { display:none; background: var(--zip-green); border-top: 1px solid rgba(255,255,255,.12); }
.mobile-nav.open { display:block; }
.mobile-nav .mobile-link { display:block; padding: 14px 16px; color: #fff; text-decoration:none; border-radius: 0; transition: background .2s ease, transform .12s ease; }
.mobile-nav .mobile-link:hover { background: rgba(255,255,255,.14); }
.mobile-nav .mobile-link.clicked { animation: navPop .28s ease; }

/* Hero solid (v10) */
.hero-solid {
  color: var(--white);
  padding: 70px 0 55px;
  background: linear-gradient(180deg, #1A5642 0%, #134737 100%);
}
.hero-inner { display:flex; align-items:center; justify-content:center; min-height: 28vh; }
.hero h1 { font-size: clamp(28px, 4vw, 44px); line-height: 1.15; margin: 0 0 12px; }
.tagline { font-size: 18px; opacity: .95; margin: 0 0 24px; }

/* Buttons */
.btn { display:inline-block; padding: 12px 20px; border-radius: var(--radius); text-decoration:none; font-weight:700; border: 1px solid transparent; transition: filter .15s ease, transform .12s ease, box-shadow .2s ease; }
.btn-primary { background: var(--zip-green); color: #fff; border-color: var(--zip-green); box-shadow: 0 6px 14px rgba(26,86,66,.22); }
.btn-primary:hover { filter: brightness(1.03); transform: translateY(-1px); box-shadow: 0 8px 18px rgba(26,86,66,.28); }
.btn-secondary { background: transparent; border-color: rgba(255,255,255,.5); color: var(--white); }
.btn-secondary:hover { background: rgba(255,255,255,.1); }

/* Sections */
.section { padding: 64px 0; }
.section-alt { background: var(--zip-light); }
h2 { font-size: clamp(22px, 3vw, 34px); margin: 0 0 20px; }
h3 { font-size: 20px; margin: 0 0 6px; }
.grid { display: grid; gap: 18px; }
.cards-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.cards-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.cards-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.card { background: var(--white); border: 1px solid var(--zip-light); border-radius: var(--radius); padding: 18px; box-shadow: 0 6px 16px rgba(0,0,0,.04); }

/* Split */
.split { display: grid; gap: 24px; grid-template-columns: 1.1fr .9fr; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }


/* About */
.about-card { background: var(--white); border: 1px solid var(--zip-light); border-radius: var(--radius); padding: 20px; }
.ticks { list-style: none; padding-left: 0; margin: 0; }
.ticks li { margin: 8px 0; }
.ticks li::before { content: "✓"; color: var(--zip-green); font-weight: 900; margin-right: 10px; }

/* Team */
.team-banner img { width: 100%; height: 44vh; object-fit: cover; display:block; }
.section-intro { max-width: 70ch; color: var(--zip-dark); }
#team .section-intro { max-width: none; }
.team-grid .team-card { padding: 0; overflow: hidden; }
.team-photo { position: relative; border-radius: var(--radius); overflow:hidden; }
.team-photo img { width: 100%; height: 360px; object-fit: cover; display:block; transform: scale(1); transition: transform .45s ease; }
.team-card:hover .team-photo img { transform: scale(1.04); }
.team-overlay { position: absolute; inset: 0; display:flex; flex-direction: column; align-items:center; justify-content: flex-end; background: linear-gradient(180deg, rgba(0,0,0,0) 45%, rgba(0,0,0,.55) 100%); color: var(--white); padding: 18px; opacity: 0; transition: opacity .35s ease; }
.team-card:hover .team-overlay { opacity: 1; }
.team-overlay h3 { margin: 0 0 4px; }
.team-overlay p { margin: 0; opacity: .95; }
.team-links { margin-top: 8px; font-weight: 700; }
.team-overlay a { color: #fff; text-decoration: none; }
.team-overlay a:hover { text-decoration: underline; }

/* Services */
.service-card { text-align: left; }
.service-icon { height: 72px; width: auto; display:block; margin: 0 auto 10px; }

/* Why */
.why-card { text-align: left; }
.why-icon { height: 64px; width: auto; display:block; margin: 0 0 10px; }

/* Contact */
.contact-icon { width: 270px; max-width: 100%; height: auto; display:block; margin-bottom: 12px; }
@media (max-width: 520px) { .contact-icon { width: 220px; } }
.contact-list { list-style: none; padding: 0; margin: 12px 0 0; }
.contact-list li { margin: 6px 0; }
.contact-form { background: var(--white); border: 1px solid var(--zip-light); border-radius: var(--radius); padding: 20px; }
.fields-actions {
  padding-top: 10px;
}
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fields .span-2 { grid-column: span 2; }
@media (max-width: 720px) { .fields { grid-template-columns: 1fr; } .fields .span-2 { grid-column: auto; } }
label span { display:block; font-size: 14px; color: var(--zip-dark); margin-bottom: 6px; font-family: Arial, "Helvetica Neue", sans-serif; }
input, textarea { width: 100%; padding: 12px 12px; border: 1px solid var(--zip-light); border-radius: 10px; font-size: 16px; }
input:focus, textarea:focus { outline: 2px solid var(--zip-green); outline-offset: 1px; }

/* Footer */
.site-footer { border-top: 1px solid var(--zip-light); background: #fafafa; padding: 22px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.footer-inner a { color: var(--zip-green); text-decoration: none; }
.footer-inner a:hover { text-decoration: underline; }
.foot-meta .link-lv, .foot-meta .link-en { margin-left: 12px; }
html[lang="lv"] .foot-meta .link-en { display: none; }
html[lang="en"] .foot-meta .link-lv { display: none; }

/* Global links */
a { color: #000; transition: color .2s ease; }
a:hover { color: var(--zip-green); }

/* Back to top */
.back-to-top{
  position: fixed;
  right: clamp(12px, 2vw, 24px);
  bottom: calc(16px + env(safe-area-inset-bottom));
  width: 48px; height: 48px;
  border-radius: 999px;
  background: var(--zip-green);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  border: 0;
  box-shadow: 0 10px 24px rgba(26,86,66,.28);
  opacity: 0; transform: translateY(10px);
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease, box-shadow .2s ease, filter .2s ease;
  z-index: 99;
}
.back-to-top svg{ width: 22px; height: 22px; }
.back-to-top:hover{ filter: brightness(1.05); box-shadow: 0 12px 28px rgba(26,86,66,.32); }
.back-to-top:focus{ outline: 3px solid #fff; outline-offset: 2px; }
.back-to-top.show{ opacity: 1; transform: translateY(0); pointer-events: auto; }

@media (min-width: 992px){
  .back-to-top{ width: 56px; height: 56px; }
  .back-to-top svg{ width: 24px; height: 24px; }
}


/* --- PATCH: keep hero CTA text white on hover --- */
.btn:hover, .btn:focus, .btn-primary:hover, .btn-secondary:hover { color: #FFFFFF; }
/* --- END PATCH --- */


.loading-spinner {
  display: inline-block;
  width: 22px;
  height: 22px;
  border: 3px solid #ccc;
  border-top-color: var(--zip-green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
  margin-left: 8px;
}

@keyframes spin {
  100% { transform: rotate(360deg); }
}

.btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}