/* * MasterPUR Stylesheet 4.2 (Button Fix + Conversion Logic)
 * Design: Aggressive Lime (#DFFF00) & Deep Dark (#121212)
 * Typography: Montserrat (Weights: 300, 400, 600, 700, 900)
 */

/* --- 1. ZMIENNE I KONFIGURACJA --- */
:root {
    /* Nowa paleta kolorów */
    --lime: #DFFF00; 
    --lime-dark: #b8d600;
    --dark: #121212;
    --dark-grey: #1e1e1e;
    --light: #f4f4f4;
    --white: #ffffff;
    --text-main: #333;
    --text-light: #888;
    --shadow: 0 10px 30px rgba(0,0,0,0.1);

    /* Mapowanie zmiennych CMS */
    --brand-lime: var(--lime);
    --brand-lime-hover: var(--lime-dark);
    --brand-dark: var(--dark);
    --brand-gray: var(--text-main);
    --bg-light: var(--light);
    --bg-dark: var(--dark);
}

/* --- MOBILE SAFE GUARD (Naprawa szerokości) --- */
* { margin: 0; padding: 0; box-sizing: border-box; outline: none; }

html, body {
    width: 100%;
    overflow-x: hidden; /* Kluczowe: Ucina wszystko co wystaje poza szerokość ekranu */
    scroll-behavior: smooth;
    position: relative;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--text-main);
    background-color: var(--white);
    line-height: 1.6;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; padding: 0; margin: 0; }
img { max-width: 100%; height: auto; display: block; } /* Zapobiega wyjeżdżaniu zdjęć */

/* --- 2. KOMPONENTY UI --- */

.container { 
    max-width: 1200px; 
    width: 100%;
    margin: 0 auto; 
    padding: 0 20px; 
}

/* Typografia Responsywna */
h1, h2, h3, h4, .big-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    text-transform: uppercase;
    color: var(--dark);
    line-height: 1.1;
    word-wrap: break-word; /* Zapobiega rozpychaniu przez długie słowa */
}

.section-title { text-align: center; margin-bottom: 50px; }
.section-title h2 { font-size: clamp(1.8rem, 5vw, 2.5rem); margin-bottom: 10px; } /* Skalowalna czcionka */
.section-title span, .text-lime { color: var(--lime-dark); }
.section-padding { padding: 80px 0; }

/* Buttony */
.btn, .btn-premium {
    display: inline-block;
    padding: 15px 35px;
    background: var(--lime);
    color: var(--dark) !important;
    font-weight: 800;
    text-transform: uppercase;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    box-shadow: 0 5px 15px rgba(223, 255, 0, 0.4);
    transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
    text-decoration: none;
    text-align: center;
}

.btn:hover, .btn-premium:hover { 
    transform: translateY(-3px); 
    background: var(--lime-dark); 
    color: var(--dark) !important;
}

/* --- FIX: POPRAWIONY BUTTON CZARNY --- */
.btn-black { 
    background: var(--dark); 
    color: var(--white) !important; /* Domyślnie biały tekst */
    box-shadow: 0 5px 15px rgba(0,0,0,0.3); 
    padding: 15px 35px;
    border-radius: 5px;
    font-weight: 800;
    text-transform: uppercase;
    border: 2px solid var(--dark);
    text-align: center;
    transition: all 0.3s ease; /* Płynne przejście wszystkich atrybutów */
}

.btn-black:hover { 
    background: #000; /* Głęboka czerń */
    color: var(--lime) !important; /* TEKST ZMIENIA SIĘ NA LIMONKOWY */
    border-color: var(--lime); /* RAMKA ZMIENIA SIĘ NA LIMONKOWĄ */
    transform: translateY(-3px); 
    box-shadow: 0 8px 25px rgba(223, 255, 0, 0.25); /* Limonkowa poświata */
}
/* ------------------------------------ */

.btn-outline-dark {
    color: var(--dark);
    border: 2px solid var(--dark);
    background: transparent;
    padding: 10px 20px;
    font-weight: 700;
    text-transform: uppercase;
    transition: 0.3s;
}
.btn-outline-dark:hover { background: var(--dark); color: var(--white); }

.btn-outline-light {
    color: var(--white);
    border: 2px solid var(--white);
    background: transparent;
    padding: 10px 20px;
    font-weight: 700;
    text-transform: uppercase;
    transition: 0.3s;
}
.btn-outline-light:hover { background: var(--white); color: var(--dark); }

/* --- 3. LAYOUT STRUKTURALNY --- */

/* Top Bar */
.top-bar {
    background: var(--dark);
    color: var(--white);
    padding: 10px 0;
    font-size: 0.85rem;
    font-weight: 600;
}
.top-bar .container { display: flex; justify-content: space-between; align-items: center; }
.top-bar a { color: var(--lime); }
.top-bar i { color: var(--lime); margin-right: 5px; }

/* Header & Nav */
header {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}
.nav-container { display: flex; justify-content: space-between; align-items: center; }
.logo img { height: 50px; width: auto; }

.nav-menu { display: flex; gap: 25px; align-items: center; }
.nav-link { font-weight: 700; font-size: 0.9rem; text-transform: uppercase; color: var(--dark) !important; position: relative; }
.nav-link:hover { color: var(--lime-dark) !important; }
.nav-link::after {
    content: ''; position: absolute; bottom: -5px; left: 0; width: 0%; height: 2px;
    background: var(--lime); transition: 0.3s;
}
.nav-link:hover::after { width: 100%; }

.hamburger { display: none; font-size: 1.5rem; cursor: pointer; color: var(--dark); }

/* Hero Section */
.hero {
    position: relative;
    height: 90vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.6)), url('../../img/ocieplenie-piana-na-poddaszu.webp') center/cover no-repeat;
    color: var(--white);
    background-attachment: scroll; /* Fix dla mobile (parallax czasem tnie) */
}
.hero-content { max-width: 800px; position: relative; z-index: 2; padding-top: 60px; }
.hero h1 {
    font-size: clamp(2.5rem, 6vw, 3.5rem); /* Responsive font size */
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 20px;
    text-transform: uppercase;
    color: var(--white);
}
.hero h1 span { color: var(--lime); }
.hero p { font-size: 1.2rem; margin-bottom: 30px; font-weight: 400; max-width: 600px; }
.hero-badges { display: flex; gap: 15px; margin-bottom: 30px; flex-wrap: wrap; }
.badge { 
    background: rgba(255,255,255,0.1); 
    padding: 8px 15px; 
    border-radius: 4px; 
    font-size: 0.85rem; 
    font-weight: 700; 
    border: 1px solid var(--lime); 
    color: var(--lime); 
    text-transform: uppercase;
    backdrop-filter: blur(5px);
}

/* Calculator Section */
.calculator-section { background: var(--light); position: relative; margin-top: -100px; z-index: 10; padding-bottom: 60px; }
.calc-box {
    background: var(--white);
    padding: 40px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    border-top: 5px solid var(--lime);
    max-width: 100%; /* Fix width overflow */
}
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.calc-input label { display: block; margin-bottom: 10px; font-weight: 700; text-transform: uppercase; font-size: 0.9rem; }
.calc-input input, .calc-input select {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    margin-bottom: 20px;
    background: #f9f9f9;
    font-family: inherit;
    transition: 0.3s;
    appearance: none; /* Remove default browser styles */
}
.calc-input input:focus, .calc-input select:focus {
    border-color: var(--lime-dark);
    background: #fff;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
}

.calc-result {
    background: var(--dark);
    color: var(--white);
    padding: 30px;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.calc-result::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 5px; background: var(--lime);
}
.price-tag { font-size: clamp(2rem, 5vw, 3rem); font-weight: 900; color: var(--lime); margin: 10px 0; line-height: 1; }
.calc-note { font-size: 0.8rem; color: #888; margin-top: 15px; font-style: italic; }

/* Features Section */
.features { background: var(--dark); color: var(--white); }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; }
.feature-card { 
    text-align: center; 
    padding: 40px 30px; 
    border: 1px solid rgba(255,255,255,0.1); 
    transition: 0.3s; 
    background: rgba(255,255,255,0.02);
    border-radius: 5px;
}
.feature-card:hover { 
    background: rgba(255,255,255,0.05); 
    border-color: var(--lime); 
    transform: translateY(-5px);
}
.feature-icon { font-size: 3rem; color: var(--lime); margin-bottom: 20px; }
.feature-card h3 { margin-bottom: 15px; font-size: 1.3rem; color: var(--white); }
.feature-card p { font-size: 0.95rem; color: #ccc; line-height: 1.6; }

/* About Section */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.about-img { position: relative; }
.about-img img { border-radius: 10px; box-shadow: var(--shadow); width: 100%; }

/* FIX: Element dekoracyjny, który często powoduje poziomy scroll na mobile */
.about-img::before {
    content: ''; position: absolute; top: -20px; left: -20px;
    width: 150px; height: 150px; 
    border-top: 10px solid var(--lime); 
    border-left: 10px solid var(--lime);
    z-index: -1;
}

.about-text h3 { font-size: clamp(2rem, 5vw, 2.5rem); font-weight: 900; margin-bottom: 25px; line-height: 1.2; }
.check-list li { margin-bottom: 15px; display: flex; align-items: flex-start; gap: 15px; font-weight: 600; font-size: 1.05rem; }
.check-list i { color: var(--lime-dark); font-size: 1.2rem; margin-top: 4px; flex-shrink: 0; }

/* Gallery Section */
.gallery { background: var(--light); }
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); /* Better mobile wrap */
    gap: 20px;
}
.gallery-item {
    position: relative;
    height: 300px;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}
.gallery-item img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.5s;
}
.gallery-item:hover img { transform: scale(1.1); }
.gallery-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6); opacity: 0; transition: 0.3s;
    display: flex; justify-content: center; align-items: center; 
    color: var(--lime); font-weight: 900; text-transform: uppercase; letter-spacing: 2px;
}
.gallery-overlay i { font-size: 2rem; margin-bottom: 10px; display: block; }
.gallery-item:hover .gallery-overlay { opacity: 1; }

/* Contact Section */
.contact { background: var(--white); }
.contact-wrapper { 
    display: grid; 
    grid-template-columns: 1fr 1.5fr; 
    gap: 0; 
    box-shadow: var(--shadow); 
    border-radius: 15px; 
    overflow: hidden; 
}
.contact-info {
    background: var(--dark); color: var(--white);
    padding: 50px; display: flex; flex-direction: column; justify-content: center;
}
.contact-info h3 { font-size: 2rem; margin-bottom: 30px; color: var(--lime); border-bottom: 2px solid rgba(255,255,255,0.1); padding-bottom: 15px; }
.c-item { margin-bottom: 25px; display: flex; align-items: flex-start; gap: 20px; }
.c-item i { font-size: 1.5rem; color: var(--lime); margin-top: 5px; min-width: 30px; text-align: center; }
.c-item div { font-size: 1rem; color: #ccc; word-break: break-word; } /* break long emails */
.c-item strong { color: var(--white); display: block; margin-bottom: 5px; }

.contact-form { padding: 50px; background: var(--white); }
.form-group { margin-bottom: 20px; }
.form-control {
    width: 100%; padding: 15px; 
    border: 1px solid #eee; 
    background: #f9f9f9;
    border-radius: 5px;
    font-family: inherit; font-size: 1rem;
    transition: 0.3s;
}
.form-control:focus { border-color: var(--lime-dark); background: #fff; box-shadow: 0 0 10px rgba(0,0,0,0.05); }

/* Sticky CTA Footer */
.sticky-cta {
    position: fixed; bottom: 0; left: 0; width: 100%;
    background: var(--white); border-top: 3px solid var(--lime);
    padding: 15px; z-index: 9999;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.15);
    display: flex; justify-content: center; align-items: center; gap: 20px;
}
.sticky-cta-text { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--dark); }
.sticky-cta-text i { color: var(--lime-dark); font-size: 1.5rem; animation: pulse 2s infinite; }

/* --- 4. MODUŁY CMS (KOMPATYBILNOŚĆ) --- */

/* SEO Tags */
.city-tag {
    background: var(--white);
    border: 1px solid #e0e0e0;
    border-radius: 30px;
    padding: 8px 18px;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-block;
    margin: 5px;
    transition: 0.3s;
    color: var(--text-main);
}
.city-tag:hover {
    background: var(--lime);
    color: var(--dark);
    border-color: var(--lime);
    transform: translateY(-2px);
}

.object-fit-cover { object-fit: cover; }
.card { border: none !important; }

/* Wizard Step Animation */
.wizard-step { animation: fadeInStep 0.5s ease-out; }
@keyframes fadeInStep { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Focus Mode Backdrop (Use % instead of vw to fix horizontal scroll) */
.wizard-focus-backdrop {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85); backdrop-filter: blur(5px);
    z-index: 1040; opacity: 0; pointer-events: none; transition: opacity 0.4s ease;
}
body.focus-mode-active .wizard-focus-backdrop { opacity: 1; pointer-events: auto; }
body.focus-mode-active #wizard-container { position: relative; z-index: 1050; box-shadow: 0 0 50px rgba(223, 255, 0, 0.3) !important; }

.badge-pur {
    background: var(--dark);
    color: var(--lime);
    padding: 5px 15px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.85rem;
    display: inline-block;
    text-transform: uppercase;
}

@keyframes pulse { 0% { opacity: 1; transform: scale(1); } 50% { opacity: 0.8; transform: scale(1.1); } 100% { opacity: 1; transform: scale(1); } }

.text-lime { color: var(--lime-dark) !important; }
.bg-dark { background-color: var(--dark) !important; }
.bg-light { background-color: var(--light) !important; }
.bg-white { background-color: var(--white) !important; }
.fw-black { font-weight: 900 !important; }

/* --- 5. RESPONSIVE BREAKPOINTS (MOBILE OPTIMIZATION) --- */

@media (max-width: 992px) {
    /* 1. Reset nawigacji */
    .nav-menu {
        position: fixed; top: 60px; left: -100%; width: 100%; height: calc(100vh - 60px);
        background: var(--dark); flex-direction: column; justify-content: center; transition: 0.3s;
        border-top: 2px solid var(--lime);
        z-index: 999;
        overflow-y: auto; /* Allow scroll inside menu if content is tall */
    }
    .nav-menu.active { left: 0; }
    .nav-link { color: var(--white) !important; font-size: 1.5rem; margin: 10px 0; }
    .hamburger { display: block; }
    
    /* 2. Hero Section */
    .hero { height: auto; padding: 120px 0 100px 0; }
    
    /* 3. Layout Grid Reset to Single Column */
    .calc-grid, .about-grid, .contact-wrapper, .features-grid { 
        grid-template-columns: 1fr; 
        gap: 30px; 
    }
    
    /* 4. Calculator Fixes */
    .calculator-section { margin-top: -50px; padding-bottom: 40px; }
    .calc-box { padding: 25px 20px; }
    .calc-result { margin-top: 20px; }
    
    /* 5. About Image Fix */
    .about-img { order: -1; margin-bottom: 20px; }
    /* Schowaj element dekoracyjny na mobile jeśli powoduje problemy, lub zmniejsz go */
    .about-img::before {
        width: 80px; height: 80px; top: -10px; left: -10px;
        border-width: 5px;
    }
    
    /* 6. Contact Form Padding */
    .contact-info, .contact-form { padding: 30px 20px; }
    
    /* 7. Sticky CTA Mobile Layout */
    .sticky-cta { flex-direction: column; text-align: center; padding: 10px; }
    .sticky-cta-text { font-size: 0.9rem; margin-bottom: 10px; }
    .sticky-cta .btn { width: 100%; flex: 1; padding: 12px; }
    
    /* 8. Fix Section Titles */
    .section-padding { padding: 50px 0; }
    .section-title { margin-bottom: 30px; }
}

@media (max-width: 576px) {
    /* Ultra-small devices fixes */
    .container { padding: 0 15px; }
    .hero h1 { font-size: 2.2rem; }
    .btn, .btn-black, .btn-premium { width: 100%; margin-bottom: 10px; }
    .hero-badges { justify-content: center; }
}