/* ============================================================
   PAGE: home — strona główna ee-dobrydom.pl
   Style specyficzne dla index.html (hero, sekcje liczb, mapa zasięgu).
   Komponenty wielokrotnego użytku siedzą w components.css — tu tylko
   to, czego nie ma w innych podstronach.
   ============================================================ */


/* ===== HERO — slideshow 90vh + glassmorphism content ============ */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #1e2a18;
}
/* Slider 5 slajdów — 35s loop, 7s na slajd, fade + lekki zoom (Ken Burns) */
.hero-slideshow {
  position: absolute; inset: 0; overflow: hidden; z-index: 0;
}
.hero-slide {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  animation: heroSlide 24s infinite;
  will-change: opacity, transform;
}
.hero-slide:nth-child(1) { animation-delay: 0s;  }
.hero-slide:nth-child(2) { animation-delay: 8s;  }
.hero-slide:nth-child(3) { animation-delay: 16s; }

@keyframes heroSlide {
  /* 3 slajdy × 8s = 24s. Slajd widoczny od 4% do 33% (= 1s fade-in, 6s hold, 1s fade-out). */
  0%   { opacity: 0; transform: scale(1.02); }
  4%   { opacity: 1; }
  29%  { opacity: 1; transform: scale(1.10); }
  33%  { opacity: 0; transform: scale(1.12); }
  100% { opacity: 0; transform: scale(1.02); }
}

.hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(135deg, rgba(30, 42, 24, 0.65) 0%, rgba(45, 58, 34, 0.45) 100%);
}

.hero-content {
  position: relative; z-index: 2;
  color: #ffffff;
  padding: 140px 24px 90px;
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 10px;
  background: transparent;
  padding: 0;
  border: none;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 24px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
  opacity: 0;
  animation: fadeInUp 0.8s 0.2s forwards;
}
.hero-badge i { color: var(--green-light); }

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  margin-bottom: 24px;
  max-width: 920px;
  font-weight: 800;
  color: #ffffff;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
  opacity: 0;
  animation: fadeInUp 0.8s 0.4s forwards;
}
.hero h1 .accent { color: var(--green-light); font-weight: 700; }

.hero p.lead {
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  max-width: 640px;
  margin-bottom: 36px;
  color: rgba(255, 255, 255, 0.95);
  font-weight: 500;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
  opacity: 0;
  animation: fadeInUp 0.8s 0.6s forwards;
}

.hero-ctas {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeInUp 0.8s 0.8s forwards;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* ===== STATS SECTION (ciemne zielone tło) ===== */
.stats-section {
  background: linear-gradient(135deg, #1e2a18 0%, var(--green-dark) 100%);
  color: #ffffff;
  padding: var(--section-padding) 0;
}
.stats-section .tag {
  color: var(--green-light);
}
.stats-section .section-title {
  color: #ffffff;
}
.stats-section .section-title .accent {
  color: var(--green-light);
}
.stats-section .section-subtitle {
  color: rgba(255, 255, 255, 0.85);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 40px;
}
.stats-section .stat-tile {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.stats-section .stat-tile:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--green-light);
}
.stats-section .stat-tile .stat-num {
  color: var(--green-light);
}
.stats-section .stat-tile .stat-label {
  color: rgba(255, 255, 255, 0.92);
}


/* ===== INVESTMENTS GRID — single column dla 1 inwestycji ===== */
.investments-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-top: 16px;
}
.investments-grid .investment-card .inv-card-img {
  min-height: 420px;
}
.investments-grid .investment-card .inv-card-body {
  padding: 56px 48px;
}
.investments-grid .investment-card .inv-card-body h3 {
  font-size: clamp(1.6rem, 2.4vw, 2.2rem);
  margin-bottom: 14px;
}

/* Status pill — nałożony absolute na zdjęcie kafelka */
.investment-card .inv-card-img { position: relative; }
.inv-status {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  width: auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.inv-status.status-selling { background: var(--green); }
.inv-status.status-progress { background: #d4a017; }
.inv-status.status-selling::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.3);
  animation: statusPulse 2s ease-in-out infinite;
}
@keyframes statusPulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.3); }
  50%      { box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.1); }
}

.inv-feature-list {
  list-style: none;
  margin: 8px 0 28px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 24px;
}
.inv-feature-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-dark);
  font-weight: 600;
  font-size: 0.97rem;
  line-height: 1.4;
}
.inv-feature-list li i {
  color: var(--green);
  background: var(--green-bg);
  width: 28px; height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
}


/* ===== DEV TILES — zig-zag (image-text) ===== */
.dev-stack {
  display: grid;
  gap: 24px;
}


/* ===== TECHNOLOGIA — 4×2 grid feature-card ===== */
.tech-section {
  background: linear-gradient(to bottom, #ffffff 0%, var(--gray-bg) 100%);
}
.tech-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 16px;
}


/* ===== PORTFOLIO CAROUSEL — 3 kafelki widoczne, auto-scroll ===== */
.portfolio-carousel {
  position: relative;
  margin-top: 48px;
}
.carousel-viewport {
  overflow: hidden;
  margin: 0 60px;
}
.carousel-track {
  display: flex;
  gap: 24px;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}
.carousel-track .portfolio-card {
  flex: 0 0 calc((100% - 48px) / 3);
  max-width: calc((100% - 48px) / 3);
  background: var(--gray-card);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s, box-shadow 0.3s;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}
.carousel-track .portfolio-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.carousel-track .portfolio-img {
  height: 240px;
  background-size: cover;
  background-position: center;
}
.carousel-track .portfolio-body { padding: 24px; }
.carousel-track .portfolio-loc {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--green-dark);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 700;
  margin-bottom: 6px;
}
.carousel-track .portfolio-card h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}
.carousel-track .portfolio-card p {
  color: var(--text-medium);
  font-size: 0.9rem;
  margin: 0;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--green-dark);
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  z-index: 10;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.carousel-arrow:hover {
  background: var(--green);
  color: #ffffff;
  border-color: var(--green);
}
.carousel-arrow-prev { left: 0; }
.carousel-arrow-next { right: 0; }

.portfolio-cta-wrap {
  display: flex;
  justify-content: center;
  margin-top: 48px;
}


/* ===== REACH (mapa zasięgu) — split 60/40, wyrównane wysokości ===== */
#zasieg { background: #ffffff; }
.reach-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: stretch;
}
.reach-map {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  background: var(--green-bg);
  min-height: 400px;
}
.reach-map #reach-map {
  height: 100%;
  min-height: 400px;
}
.reach-map .leaflet-container {
  height: 100%;
  width: 100%;
  border-radius: 20px;
}
.reach-text { display: flex; flex-direction: column; justify-content: center; }
.reach-text h2 {
  font-size: clamp(1.9rem, 3.2vw, 2.6rem);
  margin-bottom: 18px;
}
.reach-text > p {
  color: var(--text-medium);
  font-size: 1.0625rem;
  line-height: 1.7;
  margin-bottom: 24px;
  font-weight: 500;
}
.reach-list {
  list-style: none;
  display: grid;
  gap: 10px;
}
.reach-list li {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  padding: 12px 16px;
  background: var(--gray-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  transition: background 0.2s, border-color 0.2s;
}
.reach-list li:hover {
  background: var(--green-bg);
  border-color: var(--green-light);
}
.reach-list .reach-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--green);
  color: #ffffff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.95rem;
}
.reach-list strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  color: var(--text-dark);
  margin-bottom: 2px;
}
.reach-list span {
  color: var(--text-medium);
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.4;
}

/* Custom marker (zielona pinezka SVG) */
.reach-pin {
  background: transparent;
  border: none;
}


/* ===== CTA STRIP — ostatnia sekcja przed stopką ===== */
.cta-strip {
  background: linear-gradient(135deg, #3d6b2e 0%, #5a9142 100%);
  color: #ffffff;
  padding: 80px 0;
  text-align: center;
}
.cta-strip h2 {
  color: #ffffff;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  margin-bottom: 16px;
}
.cta-strip p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.15rem;
  margin-bottom: 32px;
}
.cta-strip-btn {
  background: #ffffff;
  color: var(--green-dark);
  padding: 16px 32px;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}
.cta-strip-btn:hover {
  background: var(--gray-bg);
  color: var(--green-dark);
  transform: translateY(-2px);
}


/* ============================================================
   RESPONSIVE — home page
   ============================================================ */
@media (max-width: 1024px) {
  .hero { min-height: auto; padding: 0; }
  .hero-content { padding: 110px 24px 70px; }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .investments-grid .investment-card { grid-template-columns: 1fr; }
  .investments-grid .investment-card .inv-card-img { min-height: 280px; }
  .investments-grid .investment-card .inv-card-body { padding: 36px 28px; }

  .tech-grid { grid-template-columns: repeat(2, 1fr); }

  .carousel-track .portfolio-card {
    flex: 0 0 calc((100% - 24px) / 2);
    max-width: calc((100% - 24px) / 2);
  }
  .carousel-viewport { margin: 0 50px; }

  .reach-grid {
    grid-template-columns: 1fr;
    gap: 32px;
    align-items: start;
  }
  .reach-map { height: 360px; min-height: 360px; }
}

@media (max-width: 640px) {
  .hero-content { padding: 100px 20px 56px; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .tech-grid { grid-template-columns: 1fr; }
  .carousel-track .portfolio-card {
    flex: 0 0 100%;
    max-width: 100%;
  }
  .carousel-viewport { margin: 0 40px; }
  .carousel-arrow { width: 36px; height: 36px; font-size: 1rem; }
  .inv-feature-list { grid-template-columns: 1fr; }
  .cta-strip { padding: 56px 0; }
}
