* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto;
  background: #f8fafc;
  color: #0f172a;
}

html, body {
  height: 100%;
}

body {
  min-height: 100svh; /* mobiilis õige */
  display: flex;
  flex-direction: column;
}

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

.container {
  max-width: 1200px;
  margin: auto;
  padding: 0 20px;
}

/* ================= HEADER ================= */

.topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #e5e7eb;
  transition: box-shadow .3s ease;
}

.topbar.scrolled {
  box-shadow: 0 6px 20px rgba(0,0,0,.08);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
}

/* DESKTOP NAV */
.nav-links {
  display: flex;
  gap: 28px;
}

.nav-links a {
  font-weight: 500;
  color: #334155;
}

.nav-links a:hover {
  color: #2563eb;
}

/* ================= MOBILE MENU ================= */

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 34px;
  height: 24px;
  position: relative;
}

.menu-toggle span {
  position: absolute;
  width: 100%;
  height: 3px;
  background: #0f172a;
  left: 0;
  transition: .3s;
}

.menu-toggle span:nth-child(1) { top: 0; }
.menu-toggle span:nth-child(2) { top: 10px; }
.menu-toggle span:nth-child(3) { top: 20px; }

.menu-toggle.open span:nth-child(1) {
  transform: rotate(45deg);
  top: 10px;
}

.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
  transform: rotate(-45deg);
  top: 10px;
}

/* MOBILE NAV PANEL */
@media (max-width: 900px) {
  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 64px;
    left: 0;
    width: 100%;
    background: white;
    flex-direction: column;
    gap: 0;
    border-bottom: 1px solid #e5e7eb;
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s ease;
  }

  .nav-links.open {
    max-height: 260px;
  }

  .nav-links a {
    padding: 16px 20px;
    border-top: 1px solid #f1f5f9;
  }
}

/* ================= HERO ================= */

.hero {
  background: linear-gradient(135deg, #1e293b, #334155);
  color: white;
  text-align: center;
  padding: 90px 20px 110px;
}

.hero h1 {
  font-size: 40px;
  margin-bottom: 16px;
}

.hero p {
  max-width: 700px;
  margin: auto;
  opacity: .9;
}

.btn {
  margin-top: 26px;
  display: inline-block;
  background: #2f9e6f;
  color: white;
  padding: 14px 28px;
  border-radius: 10px;
  font-weight: 600;
}

/* ================= SECTIONS ================= */

.section {
  padding: 80px 0;
}

.gray {
  background: #eef2f7;
}

.section-title {
  text-align: center;
  font-size: 28px;
  margin-bottom: 40px;
}

/* ================= SERVICES ================= */

.services {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(240px,1fr));
  gap: 30px;
}

.item {
  background: white;
  padding: 26px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
}

/* ================= WORKS ================= */

.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px,260px));
  gap: 30px;
  justify-content: center;
}

.work-card {
  background: white;
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
  transition: transform .25s ease;
}

.work-card:hover {
  transform: translateY(-6px);
}

.work-card img {
  width: 100%;
  height: auto;
  max-height: 250px; /* piirab liiga kõrgeid pilte */
  object-fit: cover;
  border-radius: 12px;
}

.work-card p {
  margin-top: 10px;
  font-size: 14px;
}

/* ================= CONTACT ================= */

.contact {
  text-align: center;
}

.contact-text {
  max-width: 500px;
  margin: 0 auto 40px;
  color: #475569;
}

.contact-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  max-width: 600px;
  margin: auto;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: white;
  padding: 20px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
  transition: transform .25s ease, box-shadow .25s ease;
}

.contact-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(0,0,0,.12);
}

.contact-card .icon {
  font-size: 30px;
}

.contact-card strong {
  display: block;
  font-size: 15px;
  color: #0f172a;
}

.contact-card span {
  font-size: 14px;
  color: #475569;
}

/* ========== LIGHTBOX ========== */

.lightbox{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.85);
  display:none;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  z-index:9999;
  padding:20px;
}

.lightbox img{
  max-width:90%;
  max-height:70vh;
  border-radius:16px;
  box-shadow:0 20px 50px rgba(0,0,0,.6);
}

.lightbox p{
  color:#e5e7eb;
  margin-top:18px;
  max-width:700px;
  text-align:center;
  font-size:15px;
}

.lightbox .close{
  position:absolute;
  top:20px;
  right:26px;
  font-size:36px;
  color:white;
  cursor:pointer;
}

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

.lightbox .prev{left:20px}
.lightbox .next{right:20px}

@media(max-width:768px){
  .lightbox .nav{
    font-size:40px;
  }
}


.contact-hero {
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #fff;
  padding: 80px 20px;
  text-align: center;
}

.contact-hero h1 {
  font-size: 2.2rem;
  margin-bottom: 10px;
}

.contact-section {
  padding: 60px 20px;
}

.contact-box {
  max-width: 720px;
  margin: auto;
  background: #fff;
  padding: 40px;
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0,0,0,.08);
}

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

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 14px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  font-size: 15px;
}

.contact-form textarea {
  min-height: 140px;
  margin-top: 16px;
}

.contact-form button {
  margin-top: 20px;
  padding: 14px 28px;
  border: none;
  border-radius: 10px;
  background: #16a34a;
  color: #fff;
  font-size: 15px;
  cursor: pointer;
}

.alert {
  padding: 14px;
  border-radius: 10px;
  margin-bottom: 20px;
}

.alert.success { background: #ecfdf5; color: #065f46; }
.alert.error { background: #fef2f2; color: #991b1b; }

@media (max-width: 700px) {
  .contact-form .form-row {
    grid-template-columns: 1fr;
  }
}





nav a {
  position: relative;
  padding: 8px 12px;
  text-decoration: none;
  color: #0f172a;
  font-weight: 500;
}

nav a.active {
  color: #2563eb;
  font-weight: 600;
}

nav a.active::after {

  left: 0;
  bottom: -6px;
  width: 100%;
  height: 3px;
  background: #2563eb;
  border-radius: 2px;
}
/* ===== LIGHTBOX ===== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.9);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 9999;
  animation: fadeIn .25s ease;
}

.lightbox.open {
  display: flex;
}

.lightbox-img {
  max-width: 90%;
  max-height: 75vh;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
}

.lightbox-desc {
  margin-top: 18px;
  max-width: 700px;
  text-align: center;
  color: #e5e7eb;
  font-size: 16px;
  line-height: 1.6;
}

.lightbox-close {
  position: absolute;
  top: 22px;
  right: 26px;
  font-size: 42px;
  color: #fff;
  cursor: pointer;
  opacity: .8;
}

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

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 44px;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 20px;
  opacity: .7;
}

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

.lightbox-prev:hover,
.lightbox-next:hover {
  opacity: 1;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* MOBIIL */
@media (max-width: 768px) {
  .lightbox-img { max-height: 65vh; }
  .lightbox-prev,
  .lightbox-next {
    font-size: 34px;
    padding: 10px;
  }
}
@media (max-width: 768px) {
  .works-grid {
    grid-template-columns: 1fr;
  }
}


/* ================= FOOTER ================= */

.footer {
  margin-top: auto;
  background: #020617;
  color: #94a3b8;
  text-align: center;
  padding: 40px 20px;
}