@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* =========================================
   CSS Variables
   ========================================= */
:root {
  --green-primary: #2c5c14;
  --green-btn: #28920e;
  --green-btn-hover: #1e7008;
  --green-footer: #0e2904;
  --green-footer-border: #1e4a0a;
  --green-light: #f0f6eb;
  --green-tab-active: #2c5c14;
  --white: #ffffff;
  --gray-light: #f8f8f6;
  --gray-border: #e0e0db;
  --text: #1e1e1e;
  --text-mid: #444444;
  --text-light: #666666;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-hover: 0 6px 24px rgba(0,0,0,0.14);
  --radius: 8px;
  --max-width: 1180px;
  --nav-height: 72px;
  --transition: 0.22s ease;
}

/* =========================================
   Reset & Base
   ========================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--white);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

/* =========================================
   Typography
   ========================================= */
h1, h2, h3, h4 {
  line-height: 1.25;
  font-weight: 700;
  color: var(--text);
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); }
h3 { font-size: 1.2rem; }

p {
  color: var(--text-mid);
  margin-bottom: 0.8em;
}
p:last-child { margin-bottom: 0; }

/* =========================================
   Layout helpers
   ========================================= */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section-pad {
  padding: 80px 0;
}

.section-pad-sm {
  padding: 56px 0;
}

/* =========================================
   Buttons
   ========================================= */
.btn {
  display: inline-block;
  padding: 13px 30px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  transition: background var(--transition), transform var(--transition);
  cursor: pointer;
}

.btn-primary {
  background: var(--green-btn);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--green-btn-hover);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--green-primary);
  border: 2px solid var(--green-primary);
}

.btn-outline:hover {
  background: var(--green-primary);
  color: var(--white);
}

.btn-white {
  background: var(--white);
  color: var(--green-primary);
}

.btn-white:hover {
  background: var(--green-light);
}

/* =========================================
   Navigation
   ========================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--gray-border);
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--green-primary);
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.nav-logo svg {
  width: 36px;
  height: 36px;
}

.nav-logo img {
  height: 44px;
  width: auto;
}

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links li a {
  display: block;
  padding: 8px 13px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-mid);
  border-radius: 6px;
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
}

.nav-links li a:hover,
.nav-links li a.active {
  color: var(--green-primary);
  background: var(--green-light);
}

.nav-links .nav-cta a {
  background: var(--green-btn);
  color: var(--white);
  padding: 10px 18px;
  border-radius: var(--radius);
  font-weight: 600;
}

.nav-links .nav-cta a:hover {
  background: var(--green-btn-hover);
  color: var(--white);
}

/* Dropdown */
.has-dropdown {
  position: relative;
}

.nav-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
  min-width: 190px;
  padding: 6px 0;
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
}

.has-dropdown:hover .nav-dropdown,
.has-dropdown:focus-within .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown li a {
  display: block;
  padding: 9px 16px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-mid);
  background: transparent;
  border-radius: 0;
  transition: color var(--transition), background var(--transition);
}

.nav-dropdown li a:hover,
.nav-dropdown li a.active {
  color: var(--green-primary);
  background: var(--green-light);
}

.has-dropdown > a::after {
  content: '';
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  margin-left: 5px;
  vertical-align: middle;
  opacity: 0.55;
}

/* Mobile sub-items */
.nav-mobile-sub {
  padding-left: 44px !important;
  font-size: 0.88rem !important;
  color: var(--text-light) !important;
}

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  border-radius: 6px;
  transition: background var(--transition);
}

.nav-hamburger:hover { background: var(--green-light); }

.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav */
.nav-mobile {
  display: none;
  flex-direction: column;
  background: var(--white);
  border-top: 1px solid var(--gray-border);
  padding: 12px 0 20px;
}

.nav-mobile.open { display: flex; }

.nav-mobile a {
  display: block;
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-mid);
  transition: color var(--transition), background var(--transition);
}

.nav-mobile a:hover { color: var(--green-primary); background: var(--green-light); }

.nav-mobile .nav-cta-mobile a {
  margin: 8px 24px 0;
  background: var(--green-btn);
  color: var(--white);
  text-align: center;
  border-radius: var(--radius);
  padding: 13px 24px;
}

/* =========================================
   Hero
   ========================================= */
.hero {
  position: relative;
  min-height: calc(100vh - var(--nav-height));
  min-height: 580px;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(14, 41, 4, 0.72) 0%,
    rgba(14, 41, 4, 0.45) 60%,
    rgba(14, 41, 4, 0.2) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 620px;
  color: var(--white);
}

.hero-content h1 {
  color: var(--white);
  margin-bottom: 20px;
}

.hero-content p {
  color: rgba(255,255,255,0.88);
  font-size: 1.1rem;
  margin-bottom: 32px;
}

.hero-content .hero-btn-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* =========================================
   Stats bar
   ========================================= */
.stats-bar {
  background: var(--green-primary);
  padding: 20px 0;
}

.stats-inner {
  display: flex;
  justify-content: center;
  gap: 60px;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
  color: var(--white);
}

.stat-item .stat-num {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}

.stat-item .stat-label {
  font-size: 0.85rem;
  opacity: 0.85;
  margin-top: 4px;
}

/* =========================================
   Kogemus / About section
   ========================================= */
.kogemus {
  background: var(--white);
}

.kogemus-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 56px;
}

.kogemus-header h2 {
  margin-bottom: 18px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.service-card {
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: 12px;
  padding: 28px 24px;
  transition: box-shadow var(--transition), transform var(--transition);
  text-align: center;
}

.service-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

.service-icon {
  width: 52px;
  height: 52px;
  background: var(--green-light);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
}

.service-icon svg {
  width: 28px;
  height: 28px;
  color: var(--green-primary);
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.service-card h3 {
  margin-bottom: 10px;
  color: var(--text);
}

.service-card p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin: 0;
}

/* =========================================
   CTA Section
   ========================================= */
.cta-section {
  background: var(--green-light);
  text-align: center;
}

.cta-section h2 {
  margin-bottom: 16px;
}

.cta-section p {
  max-width: 560px;
  margin: 0 auto 32px;
  font-size: 1.05rem;
}

.cta-btn-row {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* =========================================
   Gallery / Portfolio
   ========================================= */
.page-hero {
  background: var(--green-primary);
  padding: 31px 0;
  color: var(--white);
}

.page-hero h1 {
  color: var(--white);
  margin-bottom: 8px;
}

.breadcrumb {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.7);
}

.breadcrumb a {
  color: rgba(255,255,255,0.8);
  text-decoration: underline;
}

.gallery-section {
  background: var(--gray-light);
}

.filter-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 9px 22px;
  border: 2px solid var(--gray-border);
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-mid);
  background: var(--white);
  transition: all var(--transition);
}

.filter-btn:hover {
  border-color: var(--green-primary);
  color: var(--green-primary);
}

.filter-btn.active {
  background: var(--green-tab-active);
  border-color: var(--green-tab-active);
  color: var(--white);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: #ccc;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-item:hover img {
  transform: scale(1.06);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(14, 41, 4, 0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
  background: rgba(14, 41, 4, 0.58);
}

.gallery-overlay span {
  color: var(--white);
  font-weight: 600;
  font-size: 0.95rem;
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.25s ease;
  border: 2px solid rgba(255,255,255,0.7);
  padding: 8px 18px;
  border-radius: 100px;
}

.gallery-item:hover .gallery-overlay span {
  opacity: 1;
  transform: translateY(0);
}

.gallery-item.hidden {
  display: none;
}

/* =========================================
   Lightbox
   ========================================= */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.92);
  align-items: center;
  justify-content: center;
}

.lightbox.open {
  display: flex;
}

.lightbox-inner {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
}

.lightbox-inner img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
}

.lightbox-close {
  position: absolute;
  top: -42px;
  right: 0;
  color: var(--white);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.8;
}

.lightbox-close:hover { opacity: 1; }

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: var(--white);
  font-size: 2.5rem;
  cursor: pointer;
  opacity: 0.7;
  padding: 10px;
  user-select: none;
}

.lightbox-nav:hover { opacity: 1; }
.lightbox-prev { left: -50px; }
.lightbox-next { right: -50px; }

/* =========================================
   Page Content (inner pages)
   ========================================= */
.page-content {
  background: var(--white);
}

.content-block {
  max-width: 780px;
}

.content-block h2 {
  margin-bottom: 16px;
  color: var(--green-primary);
}

.content-block ul {
  list-style: disc;
  padding-left: 22px;
  color: var(--text-mid);
}

.content-block ul li {
  margin-bottom: 6px;
}

.content-block p {
  margin-bottom: 1.1em;
}

.highlight-box {
  background: var(--green-light);
  border-left: 4px solid var(--green-primary);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 20px 24px;
  margin: 32px 0;
}

.highlight-box p { margin: 0; color: var(--green-primary); font-weight: 500; }

.info-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.info-card {
  background: var(--gray-light);
  border-radius: 12px;
  padding: 28px;
}

.info-card h3 {
  color: var(--green-primary);
  margin-bottom: 12px;
}

/* =========================================
   Contact Page
   ========================================= */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.contact-info h2 {
  margin-bottom: 28px;
  color: var(--green-primary);
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 24px;
}

.contact-item-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background: var(--green-light);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-item-icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--green-primary);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact-item-text strong {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 3px;
}

.contact-map {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--gray-border);
}

.contact-map iframe {
  width: 100%;
  height: 400px;
  border: 0;
  display: block;
}

/* =========================================
   Contact / Quote Form
   ========================================= */
.form-section {
  background: var(--gray-light);
}

.form-card {
  background: var(--white);
  border-radius: 14px;
  padding: 44px 48px;
  box-shadow: var(--shadow);
  max-width: 720px;
  margin: 0 auto;
}

.form-card h2 {
  margin-bottom: 8px;
  color: var(--green-primary);
}

.form-card > p {
  margin-bottom: 32px;
  color: var(--text-light);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}

.form-group label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-mid);
}

.form-group input,
.form-group textarea,
.form-group select {
  padding: 12px 16px;
  border: 1.5px solid var(--gray-border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--white);
  transition: border-color var(--transition);
  width: 100%;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--green-btn);
}

.form-group textarea {
  resize: vertical;
  min-height: 130px;
}

.form-submit {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.form-note {
  font-size: 0.82rem;
  color: var(--text-light);
}

/* =========================================
   Hetkel töös
   ========================================= */
.progress-note {
  background: var(--white);
  border-radius: 12px;
  border: 1px solid var(--gray-border);
  padding: 32px;
  margin-bottom: 40px;
  display: flex;
  align-items: flex-start;
  gap: 18px;
}

.progress-note-icon {
  font-size: 2.4rem;
  flex-shrink: 0;
  line-height: 1;
}

.progress-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.progress-item {
  border-radius: var(--radius);
  overflow: hidden;
  background: #ccc;
  aspect-ratio: 4/3;
}

.progress-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* =========================================
   Footer
   ========================================= */
.site-footer {
  background: var(--green-footer);
  color: rgba(255,255,255,0.82);
}

.footer-main {
  padding: 60px 0 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}

.footer-brand .footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.footer-brand .footer-logo svg {
  width: 32px;
  height: 32px;
}

.footer-brand > p {
  color: rgba(255,255,255,0.65);
  font-size: 0.9rem;
  margin-bottom: 20px;
  max-width: 320px;
}

.footer-contact-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.8);
}

.footer-contact-item svg {
  width: 16px;
  height: 16px;
  stroke: rgba(255,255,255,0.5);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.footer-contact-item a:hover {
  color: var(--white);
  text-decoration: underline;
}

.social-links {
  display: flex;
  gap: 10px;
}

.social-link {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), border-color var(--transition);
}

.social-link:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.5);
}

.social-link svg {
  width: 18px;
  height: 18px;
  fill: rgba(255,255,255,0.75);
}

.footer-map iframe {
  width: 100%;
  height: 240px;
  border: 0;
  border-radius: 10px;
  filter: grayscale(20%);
  display: block;
}

.footer-bottom {
  border-top: 1px solid var(--green-footer-border);
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-bottom p {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.45);
  margin: 0;
}

.footer-bottom a {
  color: rgba(255,255,255,0.5);
  font-size: 0.85rem;
  transition: color var(--transition);
}

.footer-bottom a:hover { color: rgba(255,255,255,0.85); }

/* =========================================
   Responsive
   ========================================= */
@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .progress-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  :root { --nav-height: 60px; }

  .nav-links { display: none; }
  .nav-hamburger { display: flex; }

  .hero { min-height: 520px; }
  .hero-content { padding: 20px 0; }

  .stats-inner { gap: 28px; }

  .section-pad { padding: 56px 0; }

  .services-grid {
    grid-template-columns: 1fr 1fr;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
  .progress-gallery { grid-template-columns: 1fr 1fr; }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-main {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .form-card {
    padding: 28px 24px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .lightbox-prev { left: -34px; }
  .lightbox-next { right: -34px; }
}

@media (max-width: 520px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  .progress-gallery { grid-template-columns: 1fr; }

  .hero-content .hero-btn-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .cta-btn-row { flex-direction: column; align-items: center; }

  .stats-inner { gap: 20px; }
  .stat-item .stat-num { font-size: 1.6rem; }

  .lightbox-prev, .lightbox-next { display: none; }
}
