/*!
 * © 2025 Livest Kinnisvara. Kõik õigused kaitstud.
 */

/* ── Project hero ─────────────────────────────────────────── */
.proj-hero {
  position: relative;
  width: 100%;
  height: 72vh;
  min-height: 440px;
  max-height: 700px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  /* Brändivärvi taust servadele, kui pilt ei täida tervet kasti (nt ruut/püstpilt) */
  background: linear-gradient(135deg, #0f2347, #1a3a6b);
}

/* Hägune täitetaust — sama pilt cover-ina, hägustatud. Ainult uuematel
   genereeritud lehtedel (vanad kasutavad ülalolevat gradienti). */
.proj-hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: blur(28px) brightness(0.55);
  transform: scale(1.15);
  z-index: 0;
}

.proj-hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  /* contain — näita alati TERVET pilti, ära lõika/zuumi */
  object-fit: contain;
  object-position: center;
  z-index: 0;
}

.proj-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.15) 55%, transparent 100%);
  z-index: 1;
}

.proj-hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  color: #fff;
}

.proj-hero__badges {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.badge--status { background-color: #27ae60; color: #fff; }
.badge--type   { background-color: rgba(255,255,255,0.2); color: #fff; border: 1px solid rgba(255,255,255,0.5); }

.proj-hero__content h1 {
  font-size: 2.2rem;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 0.5rem;
  color: #fff;
}

.proj-hero__location {
  font-size: 1rem;
  opacity: 0.9;
  margin-bottom: 1.25rem;
}

.proj-hero__cta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 0.65rem 1.4rem;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
  border: 2px solid transparent;
}
.btn--primary   { background-color: var(--lv-navy); color: #fff; }
.btn--primary:hover { background-color: var(--lv-navy-dark); }
.btn--secondary { background-color: var(--lv-navy); color: #fff; }
.btn--secondary:hover { background-color: var(--lv-navy-dark); }
.btn--outline   { background-color: transparent; color: var(--lv-navy); border-color: var(--lv-navy); }
.btn--outline:hover { background-color: var(--lv-navy); color: #fff; }

/* ── Key specs strip ──────────────────────────────────────── */
.specs-strip {
  background-color: var(--background-color-secondary);
  border-bottom: 1px solid #dde4e4;
  padding: 1.5rem 1rem;
}

.specs-strip__inner {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
}

.spec__label {
  display: block;
  font-size: 0.75rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.spec__value {
  display: block;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--lv-navy);
  line-height: 1.2;
  margin-top: 0.2rem;
}

/* ── Ostuvõimalused ───────────────────────────────────────── */
.ostuvoimalused-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 0.75rem;
  position: relative;
}

.ostuv-card {
  background: var(--background-color-secondary);
  border-radius: 10px;
  border: 2px solid #dde4e4;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: border-color 0.2s, box-shadow 0.2s, opacity 0.25s;
}
.ostuv-card:hover:not(.ostuv-expanded) {
  border-color: var(--lv-navy);
  box-shadow: 0 4px 16px rgba(26,58,107,0.1);
}
.ostuv-card--highlight {
  border-color: var(--lv-navy);
  background: var(--lv-surface);
}
.ostuv-card.ostuv-dim {
  opacity: 0.28;
  pointer-events: none;
}

.ostuv-card__icon { font-size: 2rem; }
.ostuv-card__title { font-size: 1.1rem; font-weight: 600; }
.ostuv-card__price {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--lv-navy);
  line-height: 1.1;
}
.ostuv-card__tagline {
  font-size: 0.87rem;
  color: #666;
  margin: 0;
  line-height: 1.4;
}
.ostuv-card__list {
  list-style: none;
  padding: 0;
  margin: 0.25rem 0 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.9rem;
  color: #444;
}

/* Expand button */
.ostuv-expand-btn {
  background: none;
  border: none;
  color: var(--lv-navy);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0.4rem 0 0;
  text-align: left;
  margin-top: auto;
}
.ostuv-expand-btn:hover { text-decoration: underline; }

/* Detail panel (hidden until expanded) */
.ostuv-detail {
  display: none;
  border-top: 1px solid #edf2f9;
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  animation: ostuvDetailIn 0.22s ease 0.28s both;
}
@keyframes ostuvDetailIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.ostuv-detail__footer {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}
.ostuv-close {
  background: none;
  border: none;
  color: #666;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0.4rem 0;
}
.ostuv-close:hover { color: #333; }

.ostuv-pakett__desc {
  font-size: 0.87rem;
  color: #444;
  line-height: 1.6;
  margin: 0.4rem 0 0;
}

/* Two-column package preview (Elegants | Premium) */
.ostuv-pkg-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 0.5rem;
}
.ostuv-pkg-col {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.6rem 0.75rem;
  background: rgba(26,58,107,0.05);
  border-radius: 6px;
  border: 1px solid rgba(26,58,107,0.12);
}
.ostuv-pkg-col__name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--lv-navy);
}
.ostuv-pkg-col__price {
  font-size: 0.82rem;
  color: #555;
  line-height: 1.3;
}

/* ── Project sections ─────────────────────────────────────── */
.proj-section {
  max-width: 860px;
  margin: 2.5rem auto;
  padding: 0 1.5rem;
}

.proj-section h2.heading {
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--background-color-secondary);
  padding-bottom: 0.5rem;
}

.proj-section p { margin-bottom: 0.9rem; line-height: 1.7; }

.proj-description__title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--lv-navy);
  margin: 0 0 1rem;
  line-height: 1.35;
}

/* ── Map ──────────────────────────────────────────────────── */
.proj-map {
  width: 100%;
  height: 340px;
  border: 0;
  border-radius: 8px;
  display: block;
  margin-top: 0.75rem;
}

/* ── Gallery carousel ─────────────────────────────────────── */
.gallery-carousel {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #000;
  aspect-ratio: 3/2;
  max-height: 600px;
  margin-top: 0.75rem;
}

.gallery-carousel__track {
  display: flex;
  height: 100%;
  transition: transform 0.4s ease;
}

.gallery-carousel__slide {
  flex: 0 0 100%;
  height: 100%;
  cursor: zoom-in;
}

.gallery-carousel__slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.gallery-carousel__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.45);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 2.5rem;
  height: 2.5rem;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.gallery-carousel__btn:hover { background: rgba(0,0,0,0.7); }
.gallery-carousel__btn--prev { left: 0.75rem; }
.gallery-carousel__btn--next { right: 0.75rem; }

.gallery-carousel__dots {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.6rem;
}
.gallery-carousel__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #ccc;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s;
}
.gallery-carousel__dot.active { background: var(--lv-navy); }

.gallery-placeholder {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 0.75rem;
}

.gallery-placeholder__item {
  background: var(--background-color-secondary);
  border: 2px dashed #c5cece;
  border-radius: 8px;
  height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #888;
  font-size: 0.9rem;
  gap: 0.5rem;
}

/* ── Lightbox ─────────────────────────────────────────────── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1rem;
}
.lightbox.open { display: flex; }

.lightbox__img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 4px;
}

.lightbox__controls {
  display: flex;
  gap: 0.75rem;
}
.lightbox__btn {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 6px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-size: 0.9rem;
}
.lightbox__btn:hover { background: rgba(255,255,255,0.25); }
.lightbox__close {
  position: absolute;
  top: 1rem; right: 1rem;
  background: none; border: none;
  color: #fff; font-size: 1.8rem;
  cursor: pointer; line-height: 1;
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  width: 2.5rem;
  height: 2.5rem;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.lightbox__nav:hover { background: rgba(255,255,255,0.3); }
.lightbox__nav--prev { left: 1rem; }
.lightbox__nav--next { right: 1rem; }

/* ── Building rights table ────────────────────────────────── */
.proj-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.75rem;
  font-size: 0.95rem;
}
.proj-table th, .proj-table td {
  text-align: left;
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid #dde4e4;
}
.proj-table th {
  background-color: var(--background-color-secondary);
  font-weight: 600;
  width: 55%;
}
.proj-table tr:last-child th,
.proj-table tr:last-child td { border-bottom: none; }

/* ── Documents ────────────────────────────────────────────── */
.docs-list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.docs-list li a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--lv-navy);
  font-weight: 500;
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  background-color: var(--background-color-secondary);
  transition: background-color 0.2s;
}
.docs-list li a:hover { background-color: #dde8e8; }

/* ── Timeline (horisontaalne) ──────────────────────────────── */
.timeline {
  display: flex;
  position: relative;
  margin-top: 1.5rem;
  padding-bottom: 0.5rem;
  overflow-x: auto;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 0.85rem;
  left: 2%;
  right: 2%;
  height: 2px;
  background: #dde4e4;
  z-index: 0;
}

.timeline__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  min-width: 110px;
  position: relative;
  padding: 0 0.5rem;
}

.timeline__dot {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: #e0e0e0;
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: #fff;
  z-index: 1;
  margin-bottom: 0.75rem;
  flex-shrink: 0;
}

/* Tehtud — checkmark */
.timeline__item--done .timeline__dot {
  background: #27ae60;
  box-shadow: 0 0 0 2px #27ae60;
}
.timeline__item--done .timeline__dot::after {
  content: "✓";
  font-size: 0.75rem;
  font-weight: 700;
}

/* Aktiivne */
.timeline__item--active .timeline__dot {
  background: var(--lv-navy);
  box-shadow: 0 0 0 3px rgba(26,58,107,0.25);
  width: 2rem;
  height: 2rem;
}
.timeline__item--active .timeline__dot::after {
  content: "●";
  font-size: 0.5rem;
}

.timeline__title {
  font-weight: 600;
  font-size: 0.82rem;
  text-align: center;
  line-height: 1.3;
  color: var(--lv-text, #1a1a2e);
}
.timeline__item--active .timeline__title {
  color: var(--lv-navy);
}
.timeline__meta {
  font-size: 0.75rem;
  color: var(--lv-muted, #6b7280);
  text-align: center;
  margin-top: 0.3rem;
  line-height: 1.3;
}
@media (max-width: 680px) {
  .timeline { gap: 0; }
  .timeline__item { min-width: 90px; }
  .timeline__title { font-size: 0.72rem; }
  .timeline__meta  { font-size: 0.68rem; }
}

/* ── Contact ──────────────────────────────────────────────── */
.proj-contact {
  max-width: 860px;
  margin: 2.5rem auto;
  padding: 0 1.5rem;
}
.proj-contact h2.heading {
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--background-color-secondary);
  padding-bottom: 0.5rem;
}

/* ── Projects list ────────────────────────────────────────── */
.proj-list-section {
  max-width: 960px;
  margin: 2rem auto;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.proj-list-intro {
  max-width: 600px;
  text-align: center;
  margin-bottom: 1.5rem;
  color: #555;
}

.proj-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.proj-filter {
  background: transparent;
  border: 1.5px solid #c5cece;
  border-radius: 20px;
  padding: 0.35rem 0.9rem;
  font-size: 0.85rem;
  cursor: pointer;
  color: #555;
  transition: all 0.2s;
}
.proj-filter:hover { border-color: var(--lv-navy); color: var(--lv-navy); }
.proj-filter.active { background: var(--lv-navy); border-color: var(--lv-navy); color: #fff; font-weight: 600; }

/* Tag pillid */
.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.4rem;
}
.proj-tag {
  background-color: var(--background-color-secondary);
  border: 1px solid #dde4e4;
  border-radius: 12px;
  padding: 0.15rem 0.55rem;
  font-size: 0.75rem;
  color: #555;
  white-space: nowrap;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
  width: 100%;
}

.project-card {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  text-decoration: none;
  color: var(--text-color);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, transform 0.2s;
  background: #fff;
}
.project-card:hover { box-shadow: 0 6px 18px rgba(0,0,0,0.18); transform: translateY(-2px); }

.project-card__img-wrap { position: relative; }
.project-card__img { width: 100%; height: 200px; object-fit: cover; display: block; }
.card-status-watermark {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%) rotate(-20deg);
  font-size: 1.1rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: rgba(255,255,255,.8); text-shadow: 0 1px 6px rgba(0,0,0,.5);
  border: 0.2em solid rgba(255,255,255,.8); border-radius: 8px; padding: 0.1em 0.4em;
  white-space: nowrap; pointer-events: none; z-index: 2;
}

.project-card__body {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.project-card__status { font-size: 0.78rem; font-weight: 600; text-transform: uppercase; color: #27ae60; }
.project-card__status--müügis    { color: #27ae60; }
.project-card__status--üürida    { color: #1a73e8; }
.project-card__status--broneeritud { color: #e67e22; }
.project-card__status--üüritud   { color: #6a7080; }
.project-card__status--müüdud    { color: #b91c1c; }
.project-card__title  { font-size: 1.05rem; font-weight: 600; line-height: 1.3; }
.project-card__meta   { font-size: 0.88rem; color: #666; }
.project-card__link   { margin-top: auto; padding-top: 0.75rem; font-size: 0.88rem; font-weight: 600; color: var(--lv-navy); }

/* ── Seotud blogipostitus ─────────────────────────────────── */
.proj-blog-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}
.proj-blog-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem 1.25rem;
  border: 1px solid #e2e8f4;
  border-left: 4px solid var(--lv-navy);
  border-radius: 2px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s;
}
.proj-blog-card:hover { box-shadow: 0 2px 12px rgba(26,58,107,0.1); }
.proj-blog-card__cat { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--lv-navy); }
.proj-blog-card__title { font-size: 1rem; font-weight: 600; color: var(--lv-text, #1a1a2e); line-height: 1.35; }
.proj-blog-card__meta { font-size: 12px; color: var(--lv-muted, #6b7280); }
.proj-blog-card__arrow { font-size: 12px; font-weight: 600; color: var(--lv-navy); margin-top: 0.25rem; }

/* ── Sticky bottom bar (mobile) ───────────────────────────── */
.sticky-bar {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 100;
  background: #fff;
  border-top: 1px solid #dde4e4;
  padding: 0.6rem 1rem;
  gap: 0.75rem;
}
.sticky-bar__btn {
  flex: 1;
  text-align: center;
  padding: 0.7rem 0.5rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
}
.sticky-bar__btn--call    { background: var(--lv-navy); color: #fff; }
.sticky-bar__btn--contact { background: var(--lv-gold); color: var(--lv-text); }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .specs-strip__inner { grid-template-columns: repeat(3, 1fr); }
  .ostuvoimalused-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .proj-hero { height: 60vh; min-height: 360px; }
  .proj-hero__content h1 { font-size: 1.5rem; }
  .proj-hero__content { padding: 1.25rem 1rem; }
  .specs-strip__inner { grid-template-columns: repeat(2, 1fr); }
  .gallery-placeholder { grid-template-columns: 1fr; }
  .sticky-bar { display: flex; }
  body { padding-bottom: 70px; }
  .proj-map { height: 240px; }
}
