/* ===== ZMIENNE ===== */
:root {
    --primary:        #96e86e;   /* żywa zieleń leśna */
    --primary-dark:   #78cc50;   /* ciemniejsza, hover */
    --accent:         #f8c856;   /* złocisty amber */
    --bg:             #196329;   /* jaśniejszy las */
    --bg-card:        #314a34;   /* nieco jaśniejszy */
    --bg-placeholder: #3c5840;   /* placeholdery */
    --text:           #f5f3e8;   /* jasne, ciepłe białe */
    --text-muted:     #c0d8a8;   /* jasna szałwia */
    --radius:         8px;
    --transition:     0.3s ease;
}

/* ===== RESET ===== */
*, *::before, *::after {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    color: var(--text);
    list-style: none;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    overflow-x: hidden;
    scrollbar-gutter: stable;
}

body {
    background: var(--bg);
    font-family: 'Open Sans', system-ui, sans-serif;
    line-height: 1.6;
}

p, h1, h2, h3, li, a, span {
    overflow-wrap: break-word;
    word-break: break-word;
}

h1, h2, h3 {
    font-family: 'Bree Serif', serif;
    line-height: 1.2;
}

img {
    max-width: 100%;
    display: block;
}

/* ===== HEADER ===== */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px 10px 20px;
    background: rgba(32, 52, 34, 0.93);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(125, 207, 85, 0.2);
    transition: transform 0.35s ease;
}

header.header-hidden {
    transform: translateY(-100%);
}

.header-logo {
    height: 44px;
    width: auto;
    object-fit: contain;
}

/* ===== BURGER ===== */
.burger-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: none;
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
    margin-right: 8px;
}

.burger-btn span {
    position: absolute;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
    transition: transform var(--transition), opacity var(--transition);
}

.burger-btn span:nth-of-type(1) { top: 8px; }
.burger-btn span:nth-of-type(2) { top: 18px; }
.burger-btn span:nth-of-type(3) { top: 28px; }

.burger-btn.active span:nth-of-type(1) { transform: translateY(10px) rotate(45deg); }
.burger-btn.active span:nth-of-type(2) { opacity: 0; }
.burger-btn.active span:nth-of-type(3) { transform: translateY(-10px) rotate(-45deg); }

/* ===== NAV ===== */
nav {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    z-index: 99;
    background: rgba(32, 52, 34, 0.98);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    overflow: hidden;
    height: 0;
    opacity: 0;
    pointer-events: none;
    transition: height var(--transition), opacity var(--transition);
}

nav.active {
    opacity: 1;
    pointer-events: auto;
    /* height ustawiane przez JS via scrollHeight */
}

nav ul {
    display: flex;
    flex-direction: column;
    padding: 8px 0 16px;
}

nav li {
    border-bottom: 1px solid rgba(125, 207, 85, 0.14);
}

nav li:last-child {
    border-bottom: none;
}

nav a {
    display: block;
    padding: 14px 24px;
    font-size: 1.1rem;
    font-family: 'Bree Serif', serif;
    text-decoration: none;
    transition: color var(--transition), background var(--transition);
}

nav a:hover,
nav a:active {
    color: var(--primary);
    background: rgba(125, 207, 85, 0.1);
}

/* ===== SEKCJE — wspólne ===== */
.section-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 60px 16px;
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 8px;
    color: var(--primary);
}

.section-sub {
    color: var(--text-muted);
    margin-bottom: 36px;
    font-size: 0.95rem;
}

/* ===== HERO ===== */
.hero {
    position: relative;
    min-height: 100svh;
    min-height: 100vh;
    background: url('./domek.png') center center / cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(18, 38, 18, 0.60) 0%,    /* ciemniej na górze — czytelność headera */
        rgba(12, 30, 12, 0.18) 45%,   /* jasno w środku — widać dom */
        rgba(12, 30, 12, 0.55) 100%   /* ciemniej na dole — czytelność tekstu CTA */
    );
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 80px 24px 40px;
    max-width: 600px;
}

.hero-content h1 {
    font-size: 2.2rem;
    margin-bottom: 16px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.hero-content p {
    font-size: 1.05rem;
    color: #dff0cc;
    margin-bottom: 32px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

/* ===== PRZYCISK ===== */
.btn-primary {
    display: inline-block;
    background: var(--primary);
    color: var(--bg);
    font-family: 'Bree Serif', serif;
    font-size: 1rem;
    padding: 14px 32px;
    border-radius: var(--radius);
    text-decoration: none;
    transition: background var(--transition), transform var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary:hover,
.btn-primary:active {
    background: var(--primary-dark);
    transform: translateY(-2px);
    color: var(--bg);
}

/* ===== USŁUGI ===== */
.services {
    background: var(--bg-card);
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.service-card {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 24px 20px;
    border: 1px solid rgba(125, 207, 85, 0.16);
    transition: border-color var(--transition), transform var(--transition);
}

.service-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.service-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 12px;
}

.service-card h3 {
    font-size: 1.05rem;
    margin-bottom: 8px;
    color: var(--primary);
}

.service-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ===== GALERIA ===== */
.gallery-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.gallery-item {
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: var(--bg-placeholder);
}

.gallery-placeholder,
.about-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--text-muted);
    font-size: 0.85rem;
    background: repeating-linear-gradient(
        45deg,
        var(--bg-placeholder),
        var(--bg-placeholder) 10px,
        #3a5840 10px,
        #3a5840 20px
    );
}

.gallery-icon {
    font-size: 2rem;
    opacity: 0.5;
}

/* ===== O NAS ===== */
.about {
    background: var(--bg-card);
}

.about-inner {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.about-image {
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: var(--bg-placeholder);
    min-height: 220px;
}

.about-placeholder {
    min-height: 220px;
}

.about-text h2 {
    margin-bottom: 16px;
}

.about-text p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 12px;
}

.about-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 24px;
}

.about-stats li {
    background: var(--bg);
    border: 1px solid rgba(125, 207, 85, 0.2);
    border-radius: var(--radius);
    padding: 12px 16px;
    font-size: 0.9rem;
    color: var(--text-muted);
    flex: 1;
    min-width: 100px;
    text-align: center;
}

.about-stats li strong {
    display: block;
    font-size: 1.4rem;
    color: var(--primary);
    font-family: 'Bree Serif', serif;
}

/* ===== KONTAKT ===== */
.contact-box {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 28px 24px;
    border: 1px solid rgba(125, 207, 85, 0.16);
}

.contact-phone,
.contact-email {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    font-size: 1.1rem;
    font-family: 'Bree Serif', serif;
    transition: color var(--transition);
}

.contact-phone {
    font-size: 1.4rem;
}

.contact-phone:hover,
.contact-email:hover {
    color: var(--primary);
}

.contact-location {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.contact-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
}

.btn-call {
    width: 100%;
    text-align: center;
    padding: 16px;
    font-size: 1.1rem;
    margin-top: 8px;
}

/* ===== FOOTER ===== */
footer {
    background: #1e2e20;
    border-top: 1px solid rgba(125, 207, 85, 0.15);
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
}

.footer-logo {
    height: 36px;
    width: auto;
    opacity: 0.7;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 20px;
    justify-content: center;
}

.footer-nav a {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition);
}

.footer-nav a:hover {
    color: var(--primary);
}

.footer-copy {
    font-size: 0.8rem;
    color: var(--text-muted);
    opacity: 0.6;
}

/* ===== SCROLL OFFSET dla fixed headera ===== */
.hero, .services, .gallery, .about, .contact {
    scroll-margin-top: 64px;
}

/* ===== ANIMACJE SCROLL ===== */
.anim-ready {
    transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}

.anim-from-bottom { opacity: 0; transform: translateY(36px); }
.anim-from-top    { opacity: 0; transform: translateY(-24px); }
.anim-from-left   { opacity: 0; transform: translateX(-32px); }
.anim-from-right  { opacity: 0; transform: translateX(32px); }
.anim-scale       { opacity: 0; transform: scale(0.9); }

.anim-visible {
    opacity: 1 !important;
    transform: none !important;
}

/* aktywny link w nav */
nav a.nav-active {
    color: var(--primary);
}

/* ===== MEDIA QUERIES ===== */
@media (min-width: 480px) {
    .services-grid {
        grid-template-columns: 1fr 1fr;
    }

    .gallery-grid {
        grid-template-columns: 1fr 1fr;
    }

    .hero-content h1 {
        font-size: 2.6rem;
    }
}

@media (min-width: 768px) {
    .section-inner {
        padding: 80px 32px;
    }

    h2 {
        font-size: 2.2rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .about-inner {
        flex-direction: row;
        align-items: center;
    }

    .about-image {
        flex: 1;
        min-height: 300px;
    }

    .about-text {
        flex: 1;
    }

    .hero-content h1 {
        font-size: 3rem;
    }

    .contact-box {
        max-width: 520px;
    }
}
