/* =====================================================================
   Immensum — pagrindinis stilius
   Be jokių išorinių bibliotekų: vienas failas, jokio build proceso.
   ===================================================================== */

:root {
  /* Spalvos paimtos iš įmonės logotipo: mėlyna #1D4E8F, raudona #D6232B */
  --brand:        #1d4e8f;
  --brand-700:    #133b70;
  --brand-500:    #2a63ac;
  --accent:       #d6232b;
  --accent-600:   #b31c23;
  --accent-soft:  #fceaea;

  --ink:          #16202e;
  --ink-soft:     #4a5a6c;
  --muted:        #78889a;

  --bg:           #ffffff;
  --surface:      #f4f7fb;
  --surface-2:    #e4ebf3;
  --line:         #dbe3ec;

  --ok:           #16794a;
  --ok-bg:        #e6f4ec;
  --warn:         #92620a;
  --warn-bg:      #fdf3dd;
  --err:          #b3241f;
  --err-bg:       #fbeaea;

  --radius:       10px;
  --radius-lg:    16px;
  --shadow:       0 1px 2px rgba(22, 32, 46, .06), 0 8px 24px rgba(22, 32, 46, .07);
  --shadow-lg:    0 2px 4px rgba(22, 32, 46, .06), 0 18px 40px rgba(22, 32, 46, .12);

  --container:    1180px;
  --font:         'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.015em; }
h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 2.8vw, 2.15rem); }
h3 { font-size: 1.15rem; }
p  { margin: 0 0 1rem; }

a { color: var(--brand-500); text-decoration: none; }
a:hover { color: var(--accent); }

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

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 20px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--brand); color: #fff; padding: 10px 16px;
}
.skip-link:focus { left: 12px; top: 12px; color: #fff; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------------------------------------------------------------- Header */

.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex; align-items: center; gap: 20px;
  min-height: 82px;
}

.logo { display: flex; align-items: center; gap: 14px; color: var(--ink); flex: 0 0 auto; }
.logo:hover { color: var(--ink); }
.logo img { height: 54px; width: auto; }

.logo-slogan {
  padding-left: 14px; border-left: 1px solid var(--line);
  font-size: .72rem; color: var(--muted);
  letter-spacing: .06em; text-transform: uppercase; line-height: 1.4;
  max-width: 17ch;
}

.site-nav { display: flex; align-items: center; gap: 6px; margin-left: auto; flex-wrap: wrap; }
/* :not(.btn) — kitaip navigacijos spalva nustelbtų mygtukų stilių */
.site-nav > a:not(.btn) {
  padding: 8px 12px; border-radius: 8px;
  color: var(--ink-soft); font-size: .95rem; font-weight: 500;
}
.site-nav > a:not(.btn):hover { background: var(--surface); color: var(--brand); }
.site-nav > a.btn { margin-left: 6px; }
.site-nav > a.is-active { color: var(--brand); font-weight: 600; }

.nav-toggle { display: none; }

/* --------------------------------------------------------------- Buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border: 1px solid transparent; border-radius: var(--radius);
  font: inherit; font-weight: 600; line-height: 1.2;
  cursor: pointer; text-align: center;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .05s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-500); color: #fff; }

.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-600); color: #fff; }

.btn-outline { border-color: var(--line); background: #fff; color: var(--ink); }
.btn-outline:hover { border-color: var(--brand); color: var(--brand); }

.btn-ghost { background: transparent; color: var(--ink-soft); }
.btn-ghost:hover { background: var(--surface); color: var(--brand); }

.btn-danger { background: var(--err); color: #fff; }
.btn-danger:hover { background: #8a1c1c; color: #fff; }

.btn-sm { padding: 8px 14px; font-size: .88rem; }
.btn-block { width: 100%; }

/* ------------------------------------------------------------------ Hero */

.hero {
  position: relative;
  background: linear-gradient(150deg, var(--brand-700) 0%, var(--brand) 55%, var(--brand-500) 100%);
  color: #fff;
  padding: clamp(60px, 9vw, 108px) 0;
  overflow: hidden;
}
.hero::after {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(720px 400px at 88% 6%, rgba(214, 35, 43, .30), transparent 66%),
    repeating-linear-gradient(115deg, rgba(255,255,255,.03) 0 2px, transparent 2px 26px);
  pointer-events: none;
}
.hero > .container { position: relative; z-index: 1; max-width: 900px; }

.hero .eyebrow {
  display: inline-block; margin-bottom: 18px;
  padding: 6px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .2);
  font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 600;
}
.hero h1 { color: #fff; margin-bottom: .35em; }
.hero .lead { font-size: clamp(1.05rem, 1.7vw, 1.28rem); color: rgba(255,255,255,.85); max-width: 640px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-actions .btn-outline { background: transparent; border-color: rgba(255,255,255,.35); color: #fff; }
.hero-actions .btn-outline:hover { background: rgba(255,255,255,.1); border-color: #fff; color: #fff; }

.hero-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 24px; margin-top: 56px; padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,.16);
}
.hero-stats strong { display: block; font-size: 2rem; line-height: 1.1; }
.hero-stats span { color: rgba(255,255,255,.7); font-size: .9rem; }

/* -------------------------------------------------------------- Sections */

.section { padding: clamp(52px, 7vw, 88px) 0; }
.section--surface { background: var(--surface); }

.section-head { max-width: 680px; margin-bottom: 44px; }
.section-head.is-center { margin-inline: auto; text-align: center; }
.section-head .eyebrow {
  display: block; margin-bottom: 10px;
  color: var(--accent); font-size: .78rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
}
.section-head p { color: var(--ink-soft); margin-bottom: 0; }

/* ----------------------------------------------------------------- Cards */

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 28px;
}

.feature-card .icon {
  display: grid; place-items: center;
  width: 46px; height: 46px; margin-bottom: 18px;
  border-radius: 12px; background: var(--accent-soft); color: var(--accent);
}
.feature-card h3 { margin-bottom: .4em; }
.feature-card p { color: var(--ink-soft); margin-bottom: 0; font-size: .96rem; }

/* -------------------------------------------------------- Objektų kortelė */

.object-card {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease;
}
.object-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.object-card .thumb {
  position: relative; aspect-ratio: 16 / 10; background: var(--surface-2);
  display: grid; place-items: center; color: var(--muted);
}
.object-card .thumb img { width: 100%; height: 100%; object-fit: cover; }

.object-card .body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.object-card h3 { font-size: 1.08rem; margin-bottom: .3em; }
.object-card h3 a { color: var(--ink); }
.object-card h3 a:hover { color: var(--brand-500); }
.object-card .place { color: var(--muted); font-size: .88rem; margin-bottom: 14px; }
.object-card .desc { color: var(--ink-soft); font-size: .93rem; flex: 1; }

.object-meta {
  display: flex; flex-wrap: wrap; gap: 8px 18px;
  padding-top: 16px; margin-top: 16px; border-top: 1px solid var(--line);
  font-size: .9rem;
}
.object-meta .price { font-weight: 700; color: var(--brand); }
.object-meta .area  { color: var(--ink-soft); }

/* ---------------------------------------------------------------- Badges */

.badge {
  display: inline-block; padding: 4px 11px; border-radius: 999px;
  font-size: .74rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
}
.badge-laisva,     .badge-patvirtintas, .badge-atsakyta   { background: var(--ok-bg);   color: var(--ok); }
.badge-rezervuota, .badge-laukia,       .badge-nauja      { background: var(--warn-bg); color: var(--warn); }
.badge-isnuomota,  .badge-atmestas,     .badge-uzblokuotas{ background: var(--err-bg);  color: var(--err); }
.badge-perziureta { background: var(--surface-2); color: var(--ink-soft); }
.badge-tipas { background: var(--brand); color: #fff; }

.thumb .badge { position: absolute; top: 12px; left: 12px; }

/* --------------------------------------------------------------- Filtrai */

.filters {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end;
  padding: 20px; margin-bottom: 32px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
}
.filters .field { margin-bottom: 0; flex: 1 1 180px; }

/* ----------------------------------------------------------------- Forms */

.field { margin-bottom: 18px; }
.field label { display: block; margin-bottom: 6px; font-size: .9rem; font-weight: 600; color: var(--ink); }
.field .hint { display: block; margin-top: 6px; font-size: .82rem; color: var(--muted); }
.field .req  { color: var(--err); }

input[type=text], input[type=email], input[type=password], input[type=tel],
input[type=number], input[type=file], select, textarea {
  width: 100%; padding: 11px 14px;
  font: inherit; font-size: .96rem; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(29, 78, 143, .15);
}
textarea { min-height: 140px; resize: vertical; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 36px; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.auth-wrap { max-width: 480px; margin: clamp(40px, 7vw, 80px) auto; padding-inline: 20px; }
.auth-wrap.is-wide { max-width: 720px; }
.auth-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: clamp(28px, 4vw, 44px); }
.auth-card h1 { font-size: 1.7rem; }
.auth-card .sub { color: var(--ink-soft); margin-bottom: 28px; }
.auth-foot { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line); font-size: .92rem; color: var(--ink-soft); text-align: center; }

/* --------------------------------------------------------------- Alertai */

.alert {
  padding: 14px 18px; margin: 20px 0; border-radius: var(--radius);
  border: 1px solid transparent; font-size: .94rem;
}
.alert-success { background: var(--ok-bg);   border-color: #c2e2d0; color: #14563a; }
.alert-error   { background: var(--err-bg);  border-color: #eec7c7; color: #7d1c1c; }
.alert-warning { background: var(--warn-bg); border-color: #ecd9a6; color: #6b4c05; }
.alert-info    { background: var(--surface); border-color: var(--line); color: var(--ink-soft); }
.alert ul { margin: 8px 0 0; padding-left: 20px; }

/* --------------------------------------------------------------- Lentelė */

.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); }
table.data { width: 100%; border-collapse: collapse; font-size: .93rem; min-width: 720px; }
table.data th, table.data td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data thead th { background: var(--surface); font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: #fafcfe; }
.table-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.empty-state { padding: 56px 24px; text-align: center; color: var(--muted); }
.empty-state h3 { color: var(--ink); }

/* ------------------------------------------------------ Vidinė sritis */

.panel-head {
  background: var(--brand); color: #fff; padding: 36px 0 30px;
}
.panel-head h1 { color: #fff; margin-bottom: .2em; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.panel-head p { color: rgba(255,255,255,.75); margin-bottom: 0; }

.panel-nav { background: var(--brand-700); }
.panel-nav .container { display: flex; gap: 4px; overflow-x: auto; }
.panel-nav a {
  padding: 13px 16px; color: rgba(255,255,255,.72);
  font-size: .93rem; font-weight: 500; white-space: nowrap;
  border-bottom: 3px solid transparent;
}
.panel-nav a:hover { color: #fff; }
.panel-nav a.is-active { color: #fff; border-bottom-color: var(--accent); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 18px; margin-bottom: 36px; }
.stat {
  background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--brand);
  border-radius: var(--radius); padding: 20px 22px;
}
.stat.is-warn { border-left-color: var(--accent); }
.stat strong { display: block; font-size: 2rem; line-height: 1.15; }
.stat span { color: var(--muted); font-size: .87rem; }

.detail-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.detail-media { border-radius: var(--radius-lg); overflow: hidden; background: var(--surface-2); aspect-ratio: 16/10; display: grid; place-items: center; color: var(--muted); }
.detail-media img { width: 100%; height: 100%; object-fit: cover; }

.spec-list { list-style: none; margin: 0; padding: 0; }
.spec-list li { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.spec-list li:last-child { border-bottom: 0; }
.spec-list span:first-child { color: var(--muted); }
.spec-list span:last-child { font-weight: 600; text-align: right; }

.sticky-box { position: sticky; top: 100px; }

.breadcrumbs { font-size: .88rem; color: var(--muted); margin-bottom: 20px; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--brand); }

/* ------------------------------------------------------------- Žemėlapis */

.map-block {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow);
}
.map-title { padding: 20px 24px 0; margin-bottom: 14px; }

.map-embed { position: relative; aspect-ratio: 16 / 8; background: var(--surface-2); }
.map-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }

.map-foot {
  display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: center;
  padding: 18px 24px; border-top: 1px solid var(--line);
}
.map-address {
  display: flex; align-items: center; gap: 10px; margin: 0;
  font-size: .96rem; font-weight: 600; color: var(--ink);
}
.map-address svg { color: var(--accent); flex: 0 0 auto; }
.map-foot .btn { margin-left: auto; }

@media (max-width: 620px) {
  .map-embed { aspect-ratio: 4 / 3; }
  .map-foot .btn { margin-left: 0; width: 100%; }
}

/* ---------------------------------------------------------------- Footer */

.site-footer { background: var(--brand-700); color: rgba(255,255,255,.72); padding: 60px 0 0; margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 44px; }
.site-footer h3 { color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 16px; }
.logo--footer { height: 60px; width: auto; margin-bottom: 18px; }
.footer-text { font-size: .93rem; max-width: 34ch; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 9px; font-size: .93rem; }
.footer-links a { color: rgba(255,255,255,.72); }
.footer-links a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 20px 0; font-size: .86rem; }
.footer-bottom p { margin: 0; }

/* ------------------------------------------------------------ Responsive */

@media (max-width: 900px) {
  .detail-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 780px) {
  .nav-toggle {
    display: grid; place-items: center; margin-left: auto;
    width: 44px; height: 44px; padding: 0;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer;
  }
  .nav-toggle-bar,
  .nav-toggle-bar::before,
  .nav-toggle-bar::after {
    content: ''; display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px;
  }
  .nav-toggle-bar::before { transform: translateY(-6px); }
  .nav-toggle-bar::after  { transform: translateY(4px); }

  .site-nav {
    display: none; width: 100%; margin: 0 0 16px;
    flex-direction: column; align-items: stretch; gap: 2px;
  }
  .site-nav.is-open { display: flex; }
  .site-nav > a { padding: 12px 14px; }
  .site-nav .btn { justify-content: center; margin-top: 6px; }

  .header-inner { flex-wrap: wrap; }
  .field-row { grid-template-columns: 1fr; }
  .logo img { height: 42px; }
  .logo-slogan { display: none; }
}

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