/* ============================================================
   GETA OÜ – style.css
   ============================================================ */

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

:root {
  --bg:        #181818;
  --bg2:       #202020;
  --bg3:       #282828;
  --bg4:       #313131;
  --green:     #4ade80;
  --green-dim: #22c55e;
  --green-bg:  rgba(74,222,128,0.07);
  --text:      #f0f0f0;
  --text-mid:  #b0b0b0;
  --text-muted:#777;
  --border:    rgba(255,255,255,0.08);
  --border2:   rgba(74,222,128,0.25);
  --radius:    4px;
  --max-w:     1100px;
  --nav-h:     64px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Navigation ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(24,24,24,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo img {
  height: 40px;
  width: auto;
  display: block;
  cursor: pointer;
  user-select: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  flex: 1;
  justify-content: center;
}

.nav-link {
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
  white-space: nowrap;
}

.nav-link:hover { color: var(--text); text-decoration: none; }

.nav-link-btn {
  background: none;
  border: none;
  font-family: inherit;
  cursor: pointer;
  padding: 0;
}

.lang-toggle {
  display: flex;
  gap: 2px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3px;
  flex-shrink: 0;
}

.lang-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}

.lang-btn.active { background: var(--green); color: #111; }

/* ── Layout ── */
section { padding: 72px 24px; }
.container { max-width: var(--max-w); margin: 0 auto; }

.section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 16px;
}

.section-title {
  font-size: 28px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 32px;
  letter-spacing: -0.01em;
}

/* ── Hero ── */
#hero {
  padding: 96px 24px 80px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(160deg, #1e1e1e 0%, var(--bg) 60%);
}

.hero-title {
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--text);
  max-width: 720px;
  margin-bottom: 20px;
}

.hero-sub {
  font-size: 15px;
  color: var(--text-mid);
  max-width: 680px;
  line-height: 1.75;
  margin-bottom: 32px;
}

.hero-cta {
  display: inline-block;
  border: 1px solid var(--border2);
  color: var(--green);
  padding: 9px 22px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}

.hero-cta:hover { background: var(--green-bg); text-decoration: none; }

/* ── Contact ── */
#contact {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
}

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

.contact-note {
  font-size: 13px;
  color: var(--text-mid);
  line-height: 1.75;
  margin-bottom: 28px;
  border-left: 2px solid var(--border2);
  padding-left: 14px;
}

.contact-item {
  display: flex;
  flex-direction: column;
  margin-bottom: 14px;
}

.contact-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.contact-value { font-size: 14px; color: var(--text); }
.contact-value a { color: var(--green); }

.company-block {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}

.company-block h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 14px;
}

.company-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.company-row:last-child { border-bottom: none; }
.company-row span:first-child { color: var(--text-muted); }
.company-row span:last-child  { color: var(--text); font-variant-numeric: tabular-nums; }

/* ── Services ── */
#services { border-bottom: 1px solid var(--border); }

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.service-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.2s;
}

.service-card:hover { border-color: var(--border2); }

.service-card h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--green);
  margin-bottom: 10px;
  letter-spacing: 0.01em;
}

.service-card p {
  font-size: 13px;
  color: var(--text-mid);
  line-height: 1.6;
}

.services-note {
  font-size: 13px;
  color: var(--text-muted);
  border-left: 2px solid var(--border2);
  padding-left: 14px;
  line-height: 1.7;
  max-width: 760px;
}

/* ── Projects overlay ── */
.projects-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 200;
  overflow-y: auto;
}

.projects-overlay.open { display: block; }

.projects-overlay-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.projects-overlay-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
  padding-top: calc(var(--nav-h) + 8px);
}

.projects-close-btn {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 1;
  transition: border-color 0.15s, background 0.15s;
}

.projects-close-btn:hover { background: var(--bg4); border-color: var(--border2); }

/* Year filter */
.year-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.year-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 13px;
  padding: 5px 14px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s;
}

.year-btn:hover { border-color: var(--border2); color: var(--text); }
.year-btn.active { background: var(--green); color: #111; border-color: var(--green); font-weight: 600; }

/* Projects list (grouped by year) */
.projects-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.project-year-group { list-style: none; }

.project-year-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
  display: block;
  margin-bottom: 8px;
}

.project-year-items {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.project-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  cursor: default;
}

.project-item:last-child { border-bottom: none; }

.project-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(74,222,128,0.4);
  flex-shrink: 0;
}

.project-title {
  font-size: 13px;
  color: var(--text-mid);
  line-height: 1.4;
}

.project-item.has-image { cursor: pointer; }
.project-item.has-image .project-title { color: var(--text); }
.project-item.has-image:hover .project-title { color: var(--green); }

/* Hover image preview */
.img-preview {
  display: none;
  position: fixed;
  z-index: 400;
  width: 220px;
  border-radius: var(--radius);
  border: 1px solid var(--border2);
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
  pointer-events: none;
  object-fit: cover;
  aspect-ratio: 4/3;
  background: var(--bg3);
}

/* ── Image modal ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.82);
  z-index: 500;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.open { display: flex; }

.modal-box {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 720px;
  width: 100%;
  overflow: hidden;
  position: relative;
}

.modal-img {
  width: 100%;
  display: block;
  max-height: 70vh;
  object-fit: contain;
  background: var(--bg3);
}

.modal-caption { padding: 12px 16px; font-size: 13px; color: var(--text-mid); }

.modal-close {
  position: absolute;
  top: 10px; right: 10px;
  background: rgba(0,0,0,0.6);
  border: 1px solid var(--border);
  color: var(--text);
  width: 32px; height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.modal-close:hover { background: rgba(0,0,0,0.9); }

/* ── Admin login modal ── */
.admin-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 600;
  align-items: center;
  justify-content: center;
}

.admin-modal-overlay.open { display: flex; }

.admin-modal-box {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  width: 320px;
}

.admin-modal-box h3 { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 20px; }

.admin-modal-box input[type=password] {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 12px;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 14px;
  margin-bottom: 12px;
  outline: none;
}

.admin-modal-box input[type=password]:focus { border-color: var(--border2); }

.btn-green {
  background: var(--green); color: #111; border: none;
  padding: 9px 20px; border-radius: var(--radius);
  font-family: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer; width: 100%;
}

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

.btn-cancel {
  background: none; border: 1px solid var(--border); color: var(--text-muted);
  padding: 8px 16px; border-radius: var(--radius);
  font-family: inherit; font-size: 13px; cursor: pointer;
  margin-top: 8px; width: 100%;
}

.btn-cancel:hover { border-color: var(--border2); color: var(--text); }

.login-error { font-size: 13px; color: #f87171; margin-bottom: 10px; display: none; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid  { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 700px) {
  /* Nav: stack into two rows on small screens */
  nav { height: auto; }
  .nav-inner {
    padding: 0 16px;
    flex-wrap: wrap;
    gap: 0;
    padding-bottom: 10px;
  }
  .logo { padding-top: 12px; }
  .lang-toggle { margin-top: 12px; }
  .nav-links {
    order: 3;
    width: 100%;
    gap: 20px;
    padding: 10px 0 4px;
    border-top: 1px solid var(--border);
    margin-top: 4px;
    justify-content: flex-start;
  }
  .nav-link { font-size: 13px; color: var(--text-muted); }
}

@media (max-width: 600px) {
  section { padding: 48px 16px; }
  #hero   { padding: 52px 16px 48px; }
  .services-grid { grid-template-columns: 1fr; }
  .hero-title { font-size: 22px; line-height: 1.3; }
  .hero-sub { font-size: 14px; }
  .section-title { font-size: 20px; }
  .img-preview { display: none !important; }
  .projects-overlay-inner { padding: 16px 16px 60px; }
  .projects-overlay-header { padding-top: 8px; }
  .year-filter { gap: 6px; }
  .year-btn { font-size: 12px; padding: 4px 10px; }
  .contact-grid { gap: 24px; }
  .company-block { padding: 16px; }
  .service-card { padding: 18px; }
}

/* ============================
   ADMIN PANEL
   ============================ */
body.admin-page {
  background: var(--bg); color: var(--text);
  font-family: 'Inter', system-ui, sans-serif; font-size: 14px;
}

.admin-header {
  background: var(--bg2); border-bottom: 1px solid var(--border);
  padding: 0 24px; height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
}

.admin-header span { font-size: 14px; font-weight: 600; color: var(--green); }

.admin-logout {
  font-size: 13px; color: var(--text-muted);
  border: 1px solid var(--border); padding: 6px 14px;
  border-radius: var(--radius); background: none;
  cursor: pointer; font-family: inherit; text-decoration: none; display: inline-block;
}

.admin-logout:hover { border-color: var(--border2); color: var(--text); }

.admin-container { max-width: 900px; margin: 0 auto; padding: 32px 24px; }

.admin-nav-tabs {
  display: flex; gap: 4px; margin-bottom: 28px;
  border-bottom: 1px solid var(--border); padding-bottom: 0;
}

.admin-tab {
  font-size: 13px; color: var(--text-muted);
  padding: 8px 16px; border-bottom: 2px solid transparent;
  text-decoration: none; display: inline-block; font-family: inherit;
  background: none; border-top: none; border-left: none; border-right: none;
  cursor: pointer; margin-bottom: -1px;
}

.admin-tab:hover { color: var(--text); }
.admin-tab.active { color: var(--green); border-bottom-color: var(--green); }

.admin-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; margin-bottom: 16px;
}

.admin-card h2 { font-size: 16px; font-weight: 600; margin-bottom: 20px; color: var(--text); }

.form-group { margin-bottom: 14px; }

.form-group label {
  display: block; font-size: 12px; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 5px;
}

.form-group input[type=text],
.form-group input[type=number],
.form-group input[type=password],
.form-group input[type=email],
.form-group select,
.form-group textarea {
  width: 100%; background: var(--bg3); border: 1px solid var(--border);
  color: var(--text); padding: 9px 12px; border-radius: var(--radius);
  font-family: inherit; font-size: 14px; outline: none;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--border2);
}

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

.form-actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }

.btn-primary {
  background: var(--green); color: #111; border: none;
  padding: 9px 20px; border-radius: var(--radius);
  font-family: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer; text-decoration: none; display: inline-block;
}

.btn-primary:hover { background: var(--green-dim); }

.btn-secondary {
  background: var(--bg3); color: var(--text-mid);
  border: 1px solid var(--border); padding: 8px 18px;
  border-radius: var(--radius); font-family: inherit; font-size: 13px;
  cursor: pointer; text-decoration: none; display: inline-block;
}

.btn-secondary:hover { border-color: var(--border2); }

.btn-danger {
  background: none; color: #f87171;
  border: 1px solid rgba(248,113,113,0.3);
  padding: 6px 14px; border-radius: var(--radius);
  font-family: inherit; font-size: 12px; cursor: pointer;
}

.btn-danger:hover { background: rgba(248,113,113,0.1); }

.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }

.admin-table th {
  text-align: left; padding: 8px 10px; font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-muted); border-bottom: 1px solid var(--border);
}

.admin-table td {
  padding: 10px; border-bottom: 1px solid var(--border);
  color: var(--text-mid); vertical-align: middle;
}

.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { color: var(--text); }

.admin-table .td-year {
  color: var(--green); font-weight: 600;
  min-width: 50px; font-variant-numeric: tabular-nums;
}

.badge-visible {
  font-size: 11px; padding: 2px 7px; border-radius: 10px;
  background: rgba(74,222,128,0.12); color: var(--green);
}

.badge-hidden {
  font-size: 11px; padding: 2px 7px; border-radius: 10px;
  background: rgba(255,255,255,0.06); color: var(--text-muted);
}

.alert { padding: 10px 14px; border-radius: var(--radius); font-size: 13px; margin-bottom: 16px; }
.alert-ok  { background: rgba(74,222,128,0.1); border: 1px solid var(--border2); color: var(--green); }
.alert-err { background: rgba(248,113,113,0.1); border: 1px solid rgba(248,113,113,0.3); color: #f87171; }

.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }

.login-box {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 36px; width: 340px;
}

.login-box h2 { font-size: 18px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.login-box p  { font-size: 13px; color: var(--text-muted); margin-bottom: 24px; }
.login-logo   { text-align: center; margin-bottom: 24px; }
.login-logo img { height: 36px; }
.thumb { width: 48px; height: 36px; object-fit: cover; border-radius: 2px; border: 1px solid var(--border); }

@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
  .admin-container { padding: 20px 16px; }
}
