/* =========================================================
   KUSTAA.CSS — Kustaanmiekan terassin omat tyylit
   Käyttö: <link rel="stylesheet" href="shared.css">
            <link rel="stylesheet" href="kustaa.css">
   ========================================================= */

/* =========================================================
   SIVUN TAUSTAKUVA — trooppinen gradientti
   ========================================================= */

body {
  background:
    radial-gradient(1200px 600px at 10% 0%, rgba(0, 200, 180, 0.10), transparent 60%),
    radial-gradient(900px 500px at 90% 10%, rgba(255, 196, 0, 0.12), transparent 55%),
    linear-gradient(180deg, rgba(255,255,255,1), rgba(245,255,250,1));
}

/* =========================================================
   LOGO — ei ympyrää eikä varjoa
   ========================================================= */

.site-header .logo img {
  height: 64px;
  width: auto;
  border-radius: 0;
  border: none;
  box-shadow: none;
  background: transparent;
}

@media (max-width: 860px) {
  .site-header .logo img {
    height: 54px;
  }
}

/* =========================================================
   HERO — KUSTAAN TAUSTAKUVA + TROOPPINEN HEHKU
   ========================================================= */

.site-hero.hero--kustaa::before {
  background:
    linear-gradient(180deg, rgba(0,0,0,0.35), rgba(0,0,0,0.08)),
    url("images/kustaaMAISEMA3.png");
  background-size: cover;
  background-position: center;
}

/* Trooppinen värisäteily hero-taustan päälle */
.site-hero.hero--kustaa::after {
  content: "";
  position: absolute;
  inset: -60px;
  background:
    radial-gradient(600px 300px at 20% 10%, rgba(0, 220, 200, 0.35), transparent 60%),
    radial-gradient(500px 260px at 80% 20%, rgba(255, 210, 70, 0.35), transparent 60%);
  z-index: 0;
  pointer-events: none;
}

/* =========================================================
   HERO — KUSTAAN OMAT NAPIT
   ========================================================= */

.button.kustaa-primary {
  background: linear-gradient(135deg, rgba(0, 210, 190, 1), rgba(0, 150, 255, 1));
  border: 0;
  color: #fff;
}

.button.kustaa-primary:hover {
  filter: brightness(1.03);
  transform: translateY(-1px);
  opacity: 1;
}

.button.kustaa-outline {
  background: rgba(255,255,255,0.14);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.35);
}

.button.kustaa-outline:hover {
  background: rgba(255,255,255,0.18);
  transform: translateY(-1px);
  opacity: 1;
}

/* =========================================================
   HERO — BADGET
   ========================================================= */

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.badge {
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.22);
  color: rgba(255,255,255,0.95);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
  backdrop-filter: blur(6px);
}

/* =========================================================
   KUSTAA-KORTIT — 3 kolonnan sisältökortti
   ========================================================= */

.kustaa-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 14px;
}

.kustaa-card {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 14px;
}

.kustaa-card h3 {
  margin-top: 0;
  margin-bottom: 8px;
}

.kustaa-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

/* =========================================================
   HIGHLIGHT STRIP
   ========================================================= */

.highlight {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 16px;
  display: grid;
  gap: 10px;
  align-items: center;
}

/* =========================================================
   SÄÄHUOMIO
   ========================================================= */

.weather-note {
  border: 1px dashed rgba(0,0,0,0.18);
  background: rgba(255,255,255,0.55);
  border-radius: 18px;
  padding: 12px;
  color: var(--muted);
  font-size: 13px;
}

/* =========================================================
   KUVAGALLERIA
   ========================================================= */

.kustaa-gallery {
  padding: 64px 0 80px;
}

.gallery-title {
  text-align: center;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 36px;
  color: var(--text, #111);
}

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr 2.5fr;
  grid-template-rows: 280px 360px;
  gap: 10px;
  .gallery-item--wide {
    grid-column: span 2; /* ← tämä tekee sen */
  }


}
.gallery-item {
  margin: 0;
  overflow: hidden;
  border-radius: 18px;
  cursor: pointer;
  position: relative;
  background: #e5ede8;
}

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(0,210,190,0) 60%, rgba(0,150,255,0.18));
  opacity: 0;
  transition: opacity 0.35s ease;
  border-radius: inherit;
}

.gallery-item:hover::after,
.gallery-item:focus::after {
  opacity: 1;
}

.gallery-item:focus {
  outline: 3px solid rgba(0, 210, 190, 0.7);
  outline-offset: 2px;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1),
              filter 0.35s ease;
  filter: saturate(0.95);
}

.gallery-item:hover img,
.gallery-item:focus img {
  transform: scale(1.055);
  filter: saturate(1.08);
}

/* Leveys/korkeus variaatiot */
.gallery-item--wide {
  grid-column: span 2;
}

.gallery-item--tall {
  grid-row: span 2;
  grid-template-rows: auto;
}

/* Mobile — 2 saraketta */
@media (max-width: 720px) {
  .gallery-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }

  .gallery-item--wide,
  .gallery-item--tall {
    grid-column: span 1;
    grid-row: span 1;
  }

  .gallery-item {
    aspect-ratio: 4/3;
  }
}

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

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox.is-open {
  opacity: 1;
  pointer-events: all;
}

.lightbox-img-wrap {
  max-width: min(90vw, 1100px);
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-img-wrap img {
  max-width: 100%;
  max-height: 85vh;
  border-radius: 14px;
  object-fit: contain;
  box-shadow: 0 24px 80px rgba(0,0,0,0.55);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: fixed;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  backdrop-filter: blur(8px);
  line-height: 1;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(0, 210, 190, 0.3);
  transform: scale(1.08);
}

.lightbox-close {
  top: 20px;
  right: 24px;
  font-size: 28px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  font-size: 36px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

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

.lightbox-prev:hover,
.lightbox-next:hover {
  transform: translateY(-50%) scale(1.08);
}

/* =========================================================
   KARTTA — pienempi desktopilla
   ========================================================= */

.card.map-card {
  padding-bottom: 0;
  overflow: hidden;
}

.map-card .map-embed {
  width: calc(100% + 0px);
  overflow: hidden;
  border-radius: 0 0 22px 22px;
  line-height: 0;
}

.map-card .map-embed iframe {
  width: 100%;
  height: 280px;
  border: 0;
  display: block;
}

@media (min-width: 960px) {
  .card.map-card {
    max-width: 540px;
    margin: 0 auto 48px;
    padding-bottom: 0;
  }

  .map-card .map-embed iframe {
    height: 240px;
  }
}


@media (min-width: 960px) {
  .kustaa-cards {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .highlight {
    grid-template-columns: 1.2fr 1fr;
  }

  .highlight .hero-cta {
    justify-content: flex-end;
    margin-top: 0;
  }
}