/* === Home (front-page) === */
/* Use global .container (centering) and small horizontal gutters */
.container { max-width: 1200px; margin: 0 auto; padding: 0 10px; }
.muted { color:#6b7280; }

/* HERO */
.kg-hero {
  position: relative;
  color: #fff;
  min-height: 60vh;
  display: flex;
  align-items: flex-start; /* move content to top of hero */
  justify-content: center;
  background-image: var(--hero-bg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
  padding: 40px 0 80px; /* reduced top padding so content sits higher */
}

/* Subtle overlay: reduce opacity so image is visible but text remains legible */
.kg-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.20) 0%, rgba(0,0,0,0.45) 100%);
  z-index: 1;
  pointer-events: none;
}

/* Hero content sits above overlay */
.kg-hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 820px;
  width: 100%;
  padding: 0 10px;
  margin-top: 8px; /* small nudge to fine-tune vertical position */
  font-family: var(--font-family);
}

.kg-hero__title {
  font-size: clamp(28px, 4.5vw, 48px);
  font-weight: 800;
  margin: 20px 0 12px; /* add 20px space above the title */
  color: #ffffff; /* strong contrast on image */
  line-height: 1.05;
  text-shadow: 0 8px 30px rgba(0,0,0,0.55);
}

.kg-hero__subtitle {
  font-size: clamp(15px, 1.6vw, 18px);
  margin: 0 0 20px;
  color: rgba(255,255,255,0.92);
  font-weight: 600;
}

/* Accent for small elements matching site green */
.kg-hero__accent {
  color: var(--green-300);
  font-weight: 700;
}

/* Search/form within hero -> use site button styles but slightly larger */
.kg-hero__search {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
  margin-top: 8px;
}
.kg-hero__search input[type="search"] {
  min-width: 260px;
  max-width: 520px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 2px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.08);
  color: #fff;
  outline: none;
}
.kg-hero__search input::placeholder { color: rgba(255,255,255,0.8); }
.kg-hero__search .btn {
  padding: 12px 20px;
  border-radius: 10px;
  font-weight: 700;
}

/* Make sure buttons use brand colors */
.kg-hero__search .btn-primary {
  background: var(--green-900);
  border-color: var(--green-900);
  color: #fff;
}
.kg-hero__search .btn-primary:hover {
  background: var(--green-300);
  color: #fff;
}

/* Responsive adjustments */
@media (max-width: 820px) {
  .kg-hero { padding: 48px 0; min-height: 50vh; }
  .kg-hero { align-items: center; } /* keep mobile centered */
  .kg-hero__title { font-size: clamp(24px, 7vw, 36px); }
  .kg-hero__subtitle { font-size: 15px; }
  .kg-hero__search { flex-direction: column; gap: 8px; }
  .kg-hero__search input[type="search"] { max-width: 100%; }
}

/* Optional: subtle vignette to focus center */
.kg-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0) 40%, rgba(0,0,0,0.25) 100%);
  z-index: 1;
}

/* Buttons */
.btn { display:inline-flex; align-items:center; gap:8px; padding:12px 20px; border-radius:8px; font-weight:600; cursor:pointer; text-decoration:none; }
.btn-primary { background:#025a1e; color:#fff; border:2px solid #05842d; }
.btn-primary:hover { background:#0f0d0e; border-color:#0f0d0e; }
.btn-outline { border:2px solid #088a26; color:#005501; }
.btn-outline:hover { background:#00580f; color:#fff; }

/* Latest properties */
.properties-grid { display:grid; grid-template-columns: repeat(auto-fill,minmax(280px,1fr)); gap:24px; justify-items: center; justify-content: center; grid-auto-rows: 1fr; }
.section-header { margin-bottom:20px; text-align:center; }
.section-footer { text-align:center; margin-top:20px; }

/* Services */
.kg-services .services-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(320px,1fr)); gap:24px; margin-top:10px; }
.kg-services .service-card { text-align:left; padding:1.75rem; }
.kg-services .service-card .service-content h3 { font-size:1.25rem; margin-bottom:0.35rem; }
.kg-services .service-card .service-content p { margin:0; font-size:0.95rem; line-height:1.5; }
.kg-services .service-card .service-icon { width:88px; height:88px; }
.kg-services .service-card .service-icon img { width:100%; height:auto; }
.kg-services .service-card .service-arrow { font-size:1.75rem; }

/* About */
.kg-about { background:#f9f9f9; border-top:1px solid #eee; }
.kg-about .about-content { max-width:800px; margin:0 auto; font-size:16px; line-height:1.6; color:#222; text-align:center; }
.kg-about .about-content strong { color:#177BFE; }

/* KUPGRUNTY FRONT-PAGE BLOG - improved layout */
.kg-blog {
  padding: 2.5rem 0;
  background: transparent;
}
.kg-blog .section-header { margin-bottom: 1rem; }
.kg-blog .section-header h2 { font-size: 1.6rem; color: var(--green-900); }

.kg-blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem 1.5rem;
  align-items: start;
  margin-top: 0.75rem;
}

.kg-blog-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 8px 24px rgba(12,18,12,0.06);
  border: 1px solid rgba(16,22,16,0.04);
  transition: transform .18s ease, box-shadow .18s ease;
  display: flex;
  flex-direction: column;
}
.kg-blog-card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(12,18,12,0.08); }

.kg-thumb { display:block; margin-bottom:0.75rem; }
.kg-thumb img { width:100%; height:160px; object-fit:cover; border-radius:8px; display:block; }

.kg-title { margin: 0 0 0.45rem; font-size:1.05rem; font-weight:700; color: var(--green-900); }
.kg-title a { color: inherit; text-decoration: none; }
.kg-title a:hover { text-decoration: underline; }

.kg-excerpt { margin: 0; color: #334; line-height:1.5; font-size:0.95rem; flex: 1 0 auto; }

.kg-blog-card .read-more {
  margin-top: 0.75rem;
  align-self: flex-start;
  text-decoration: none;
  color: var(--green-900);
  font-weight: 700;
}

@media (max-width: 900px) {
  .kg-blog-grid { grid-template-columns: 1fr; }
  .kg-thumb img { height: 180px; }
}

@media (max-width: 720px){
  .kg-hero { padding: 60px 0; }
  .kg-hero__title { font-size: 32px; }
}
