/* =========================================================
   ZMIENNE KOLORÓW
   ========================================================= */
:root {
    --primary: #2C5F2E;
    --primary-light: #3d7a40;
    --accent: #FFD700;
    --accent-dark: #e6c200;
    --light: #F5F0E8;
    --dark: #1a1a2e;
    --card-bg: #ffffff;
    --shadow: 0 4px 24px rgba(0,0,0,0.10);
    --shadow-hover: 0 8px 40px rgba(0,0,0,0.18);
    --radius: 1rem;
}

/* =========================================================
   RESET / BASE
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Lato', sans-serif;
    color: #333;
    background: #fff;
    margin: 0;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
}

/* =========================================================
   UTILITIES
   ========================================================= */
.bg-accent { background-color: var(--accent) !important; }
.btn-accent {
    background-color: var(--accent);
    color: #1a1a2e;
    border: none;
    font-weight: 700;
    transition: all .25s;
}
.btn-accent:hover, .btn-accent:focus {
    background-color: var(--accent-dark);
    color: #1a1a2e;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255,215,0,.4);
}

.section-light { background-color: var(--light); }

/* =========================================================
   ANIMACJA FADE-IN
   ========================================================= */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity .6s ease, transform .6s ease;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}
.animate-fade {
    opacity: 0;
    animation: fadeUp .8s ease forwards;
}
.animate-fade:nth-child(1) { animation-delay: .2s; }
.animate-fade:nth-child(2) { animation-delay: .35s; }
.animate-fade:nth-child(3) { animation-delay: .5s; }
.animate-fade:nth-child(4) { animation-delay: .65s; }
.animate-fade:nth-child(5) { animation-delay: .8s; }
.animate-fade:nth-child(6) { animation-delay: .95s; }

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

/* =========================================================
   NAVBAR
   ========================================================= */
#mainNav {
    transition: background-color .3s, box-shadow .3s;
    box-shadow: 0 2px 12px rgba(0,0,0,.3);
}
#mainNav .nav-link {
    font-weight: 600;
    letter-spacing: .03em;
    padding: .5rem 1rem;
    transition: color .2s;
}
#mainNav .nav-link:hover { color: var(--accent) !important; }
#mainNav .btn-accent { border-radius: 2rem; }

/* =========================================================
   HERO
   ========================================================= */
.hero-section {
    --hero-bg: url('https://upload.wikimedia.org/wikipedia/commons/thumb/e/e3/Aerial_view_of_fields.jpg/1280px-Aerial_view_of_fields.jpg');
    min-height: 100vh;
    position: relative;
    background: linear-gradient(160deg, rgba(26,26,46,.78) 0%, rgba(44,95,46,.70) 100%);
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--hero-bg) center/cover no-repeat;
    filter: brightness(0.55) saturate(0.5);
    z-index: 0;
}
.hero-overlay {
    position: absolute; inset: 0; z-index: 1;
    background: radial-gradient(ellipse at 70% 50%, rgba(44,95,46,.3) 0%, transparent 70%);
}
.hero-section .z-1 { z-index: 2; }

.hero-subtitle {
    font-size: 1.2rem;
    color: rgba(255,255,255,.85);
    letter-spacing: .06em;
}
.hero-price-box {
    display: inline-block;
    background: rgba(255,215,0,.12);
    border: 2px solid var(--accent);
    border-radius: 1.5rem;
    padding: 1rem 2.5rem;
    backdrop-filter: blur(4px);
}
.hero-price {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
}
.hero-price-sub {
    display: block;
    font-size: .9rem;
    color: rgba(255,255,255,.75);
    margin-top: .3rem;
    letter-spacing: .05em;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
}
.scroll-dot {
    width: 30px; height: 50px;
    border: 2px solid rgba(255,255,255,.5);
    border-radius: 15px;
    position: relative;
}
.scroll-dot::after {
    content: '';
    position: absolute;
    top: 6px; left: 50%;
    transform: translateX(-50%);
    width: 6px; height: 6px;
    background: #fff;
    border-radius: 50%;
    animation: scrollBounce 2s infinite;
}
@keyframes scrollBounce {
    0%, 100% { top: 6px; opacity: 1; }
    50% { top: 28px; opacity: .4; }
}

/* =========================================================
   SEKCJA HEADER
   ========================================================= */
.section-badge {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .15em;
    text-transform: uppercase;
    padding: .35rem 1.2rem;
    border-radius: 2rem;
    margin-bottom: 1rem;
}
.section-title {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    color: var(--dark);
    margin-bottom: .75rem;
}
.section-desc {
    color: #666;
    font-size: 1.05rem;
    max-width: 600px;
    margin: 0 auto;
}

/* =========================================================
   KARTY DZIAŁEK
   ========================================================= */
.dzialka-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: transform .3s, box-shadow .3s;
    border: 2px solid transparent;
}
.dzialka-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}
.dzialka-featured {
    border-color: var(--primary);
    background: linear-gradient(135deg, #fff 80%, rgba(44,95,46,.05) 100%);
}
.dzialka-number {
    display: inline-block;
    background: #e8f5e9;
    color: var(--primary);
    font-family: 'Inter', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    padding: .5rem 1.2rem;
    border-radius: .75rem;
    margin-bottom: 1rem;
}
.dzialka-number.featured {
    background: var(--primary);
    color: #fff;
}
.dzialka-title {
    font-size: 1.5rem;
    color: var(--dark);
}
.badge-pozwolenie {
    display: inline-block;
    background: linear-gradient(90deg, #2C5F2E, #4CAF50);
    color: #fff;
    font-size: .8rem;
    font-weight: 700;
    padding: .4rem 1rem;
    border-radius: 2rem;
    letter-spacing: .03em;
}
.dzialka-features {
    list-style: none;
    padding: 0;
    margin: 0;
}
.dzialka-features li {
    display: flex;
    align-items: flex-start;
    gap: .9rem;
    padding: .7rem 0;
    border-bottom: 1px solid #f0f0f0;
}
.dzialka-features li:last-child { border-bottom: none; }
.dzialka-features li i { font-size: 1.3rem; flex-shrink: 0; margin-top: .15rem; }
.dzialka-features li strong { display: block; color: var(--dark); font-size: .9rem; }
.dzialka-features li span { color: #666; font-size: .88rem; }

.cena-box {
    background: linear-gradient(135deg, var(--dark) 0%, #2c3e50 100%);
    border-radius: var(--radius);
    padding: 2rem 2.5rem;
    color: #fff;
}
.cena-glowna {
    font-family: 'Inter', sans-serif;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    color: var(--accent);
    line-height: 1.1;
}

/* =========================================================
   KARTY MEDIÓW
   ========================================================= */
.media-card {
    text-align: center;
    padding: 1.8rem 1rem;
    border-radius: var(--radius);
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.1);
    transition: transform .3s, background .3s;
    height: 100%;
}
.media-card:hover {
    transform: translateY(-6px);
    background: rgba(255,255,255,.12);
}
.media-card h5 { font-size: .95rem; color: #fff; margin: .75rem 0 .4rem; }
.media-card p { font-size: .8rem; color: #aaa; margin: 0; }
.media-icon {
    width: 64px; height: 64px;
    border-radius: 50%;
    background: rgba(255,215,0,.15);
    color: var(--accent);
    font-size: 1.8rem;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto;
    border: 2px solid rgba(255,215,0,.3);
}
.media-icon.water { background: rgba(33,150,243,.15); color: #64b5f6; border-color: rgba(33,150,243,.3); }
.media-icon.gas   { background: rgba(255,87,34,.15); color: #ff8a65; border-color: rgba(255,87,34,.3); }
.media-icon.sewer { background: rgba(103,58,183,.15); color: #b39ddb; border-color: rgba(103,58,183,.3); }
.media-icon.fiber { background: rgba(0,188,212,.15); color: #80deea; border-color: rgba(0,188,212,.3); }

/* =========================================================
   PROJEKT DOMU
   ========================================================= */
.projekt-img-wrap { position: relative; }
.projekt-badge-wrap {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
}
.projekt-symbol {
    background: var(--primary);
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: .85rem;
    padding: .5rem 1rem;
    border-radius: .5rem;
    letter-spacing: .05em;
}
.projekt-table td { padding: .6rem .75rem; vertical-align: middle; }
.projekt-table td:first-child { color: #555; width: 55%; }
.projekt-table td:last-child { font-weight: 600; }

/* =========================================================
   KARTY LOKALIZACJI
   ========================================================= */
.location-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.8rem 1.5rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform .3s, box-shadow .3s;
    border: 2px solid transparent;
}
.location-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary);
}
.location-card-primary { border-color: var(--accent); }
.location-icon { font-size: 3rem; margin-bottom: .75rem; }
.location-card h5 { font-size: 1.05rem; color: var(--dark); margin-bottom: .25rem; }
.location-distance {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
    font-family: 'Inter', sans-serif;
    margin: .5rem 0 .25rem;
}
.location-time { font-size: .85rem; color: #666; }

/* =========================================================
   MAPA LEAFLET
   ========================================================= */
.map-container {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
#map {
    height: 500px;
    width: 100%;
}
.map-fullscreen-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 999;
    border-radius: .5rem !important;
    padding: .5rem .75rem;
}
.map-legend {
    background: #fff;
    border: 1px solid #ddd;
    font-size: .9rem;
}
.legend-rect {
    width: 32px; height: 18px;
    background: rgba(255,215,0,.5);
    border: 2px solid #FFD700;
    border-radius: 3px;
    flex-shrink: 0;
}
#map.map-fullscreen {
    position: fixed !important;
    inset: 0 !important;
    z-index: 9999 !important;
    height: 100vh !important;
    border-radius: 0 !important;
}

/* =========================================================
   ATUTY
   ========================================================= */
.atuty-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.atuty-list li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.1rem 0;
    border-bottom: 1px solid #e8e4da;
}
.atuty-list li:last-child { border-bottom: none; }
.atuty-list li i { flex-shrink: 0; margin-top: .15rem; }
.atuty-list li strong { display: block; color: var(--dark); margin-bottom: .2rem; }
.atuty-list li span { font-size: .88rem; color: #555; }

/* =========================================================
   GALERIA
   ========================================================= */
.photo-thumb {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    aspect-ratio: 4/3;
    cursor: pointer;
}
.photo-thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .4s;
}
.photo-thumb:hover img { transform: scale(1.07); }
.photo-overlay {
    position: absolute; inset: 0;
    background: rgba(44,95,46,.5);
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    opacity: 0;
    transition: opacity .3s;
}
.photo-thumb:hover .photo-overlay { opacity: 1; }
.photo-placeholder {
    aspect-ratio: 4/3;
    background: #f0ede5;
    border: 2px dashed #ccc;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem;
}

/* =========================================================
   KONTAKT
   ========================================================= */
.contact-info-box {
    padding: 2rem;
    background: rgba(255,255,255,.06);
    border-radius: var(--radius);
    border: 1px solid rgba(255,255,255,.1);
    height: 100%;
}
.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.3rem;
}
.contact-item i {
    font-size: 1.3rem;
    color: var(--accent);
    flex-shrink: 0;
    margin-top: .1rem;
}
.contact-item small { display: block; color: #aaa; font-size: .8rem; }
.contact-item strong { display: block; color: #fff; font-size: 1rem; }
.contact-item a { text-decoration: none; }
.contact-item a:hover { text-decoration: underline; }

.kontakt-form .form-control {
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.2);
    color: #fff;
    border-radius: .75rem;
}
.kontakt-form .form-control::placeholder { color: rgba(255,255,255,.4); }
.kontakt-form .form-control:focus {
    background: rgba(255,255,255,.12);
    border-color: var(--accent);
    color: #fff;
    box-shadow: 0 0 0 .2rem rgba(255,215,0,.25);
}
.kontakt-form .form-label { color: rgba(255,255,255,.85); font-weight: 600; font-size: .9rem; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 768px) {
    .hero-price { font-size: 2.5rem; }
    #map { height: 350px; }
    .dzialka-card { padding: 1.5rem; }
    .cena-box { padding: 1.5rem; }
}

@media (max-width: 576px) {
    .hero-price { font-size: 2rem; }
    .section-title { font-size: 1.6rem; }
    .location-distance { font-size: 1.1rem; }
}
