@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap');

:root {
    --color-bg: #f4f4f4; /* Softer gray background */
    --color-text: #1a1a1a;
    --color-text-muted: #5a5a5a;
    --color-accent: #000000;
    --color-card-bg: #ffffff;
    --color-border: #e0e0e0;
    --font-main: 'Montserrat', -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-main);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}


/* Typography */
h1, h2, h3 { font-weight: 500; letter-spacing: -0.02em; }
h1 { font-size: 4.5rem; line-height: 1.1; }
h2 { font-size: 3rem; line-height: 1.2; margin-bottom: 1rem; }
h3 { font-size: 1.5rem; margin-bottom: 0.5rem; font-weight: 600; }
.subtitle { font-size: 1.2rem; color: var(--color-text-muted); font-weight: 400; }
.text-center { text-align: center; }
.mb-4 { margin-bottom: 3rem; }
.section-pad { padding: 5rem 2rem; max-width: 1200px; margin: 0 auto; flex: 1; width: 100%; }

/* Navbar */
.navbar {
    position: fixed;
    top: 0; width: 100%;
    display: flex; justify-content: space-between; align-items: center;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 100;
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}
.logo { font-family: 'Montserrat', sans-serif; font-size: 1.2rem; font-weight: 600; letter-spacing: 2px; display: flex; align-items: center; color: var(--color-text); text-decoration: none; }
.logo span { font-weight: 300; }
.logo img { height: 75px; margin-right: 20px; filter: none; transition: height 0.3s; } /* Original logo color */
.nav-links { display: flex; list-style: none; gap: 2.5rem; flex-wrap: wrap; justify-content: center; }
.nav-links a { text-decoration: none; color: var(--color-text); font-size: 0.85rem; font-weight: 500; text-transform: uppercase; letter-spacing: 1px; transition: color 0.3s ease; }
.nav-links a:hover { color: #888; }
.btn-nav { background: var(--color-text); color: #fff; text-decoration: none; padding: 0.8rem 1.5rem; font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; transition: all 0.3s; border-radius: 4px; white-space: nowrap; }
.btn-nav:hover { background: #444; }

/* Hero */
.hero-minimal {
    min-height: 95vh;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center;
    padding: 0 2rem;
    background-image: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.5)), url('hero.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: #fff;
}
.hero-minimal h1 { margin-bottom: 1.5rem; color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,0.3); }
.hero-minimal p { font-size: 1.6rem; color: #f0f0f0; font-weight: 400; margin-bottom: 3.5rem; max-width: 800px; text-shadow: 0 2px 8px rgba(0,0,0,0.3); }
.hero-minimal .btn-secondary { color: #fff; border-color: #fff; background: rgba(255,255,255,0.1); backdrop-filter: blur(4px); }
.hero-minimal .btn-secondary:hover { background: rgba(255,255,255,0.3); }
.hero-minimal .btn-primary { background: #fff; color: #000; }
.hero-minimal .btn-primary:hover { background: #ddd; }

/* Subpage Hero Banners */
.sub-hero {
    height: 45vh;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    margin-top: 75px; /* offset for navbar */
    position: relative;
}
.sub-hero::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.6));
}
.sub-hero h1 { position: relative; z-index: 1; font-size: 4rem; text-align: center; text-shadow: 0 2px 15px rgba(0,0,0,0.5); }

/* Buttons */
.btn-primary, .btn-secondary {
    display: inline-block; padding: 1.2rem 3rem; font-size: 0.9rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; border: none; cursor: pointer; text-decoration: none; transition: all 0.3s; border-radius: 4px;
}
.btn-primary { background: var(--color-text); color: #fff; }
.btn-primary:hover { background: #333; transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
.btn-secondary { background: transparent; color: var(--color-text); border: 1px solid var(--color-text); }
.btn-secondary:hover { background: rgba(0,0,0,0.05); transform: translateY(-2px); }
.btn-text { color: var(--color-text); text-decoration: none; font-weight: 600; font-size: 0.9rem; border-bottom: 1px solid var(--color-text); padding-bottom: 2px; transition: opacity 0.3s;}
.btn-text:hover { opacity: 0.6; }

/* Grid Layouts */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }

/* Cards / Minimal Blocks */
.minimal-block { padding: 3.5rem 2.5rem; background: var(--color-card-bg); border-radius: 12px; border: 1px solid var(--color-border); transition: transform 0.3s ease, box-shadow 0.3s ease; height: 100%; box-shadow: 0 4px 20px rgba(0,0,0,0.02); }
.minimal-block:hover { transform: translateY(-5px); box-shadow: 0 15px 40px rgba(0,0,0,0.08); }
.minimal-block .step-num { font-size: 0.9rem; font-weight: 600; margin-bottom: 1.5rem; display: block; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 2px; }
.minimal-block h3 { margin-bottom: 1rem; }
.minimal-block p { color: var(--color-text-muted); font-size: 1.05rem; line-height: 1.7; }

/* Models */
.model-block { background: var(--color-card-bg); display: flex; flex-direction: column; border-radius: 12px; overflow: hidden; border: 1px solid var(--color-border); transition: transform 0.3s ease, box-shadow 0.3s ease; box-shadow: 0 4px 20px rgba(0,0,0,0.02); }
.model-block:hover { transform: translateY(-8px); box-shadow: 0 20px 40px rgba(0,0,0,0.08); }
.model-img { height: 350px; background-size: cover; background-position: center; transition: transform 0.6s ease; }
.model-block:hover .model-img { transform: scale(1.05); }
.model-info { padding: 2.5rem; background: var(--color-card-bg); position: relative; z-index: 2; }
.model-info h3 { margin-bottom: 0.5rem; }
.model-info .specs { color: var(--color-text-muted); margin-bottom: 1.5rem; font-size: 1rem; }
.model-info .price { font-size: 1.25rem; font-weight: 600; margin-bottom: 1.5rem; }

/* Contact Form */
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; color: var(--color-text); }
.form-group input, .form-group textarea {
    width: 100%; padding: 1.2rem; border: 1px solid var(--color-border); border-radius: 8px;
    background: #fafafa; color: var(--color-text); font-family: var(--font-main); font-size: 1rem; outline: none; transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--color-text); background: #fff; box-shadow: 0 0 0 2px rgba(0,0,0,0.05); }
.contact-details h3 { margin-top: 2.5rem; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; color: var(--color-text-muted); }
.contact-details p { font-size: 1.2rem; font-weight: 500; margin-top: 0.5rem; }

/* Footer */
.site-footer {
    background: #ffffff;
    color: #333;
    padding: 4rem 2rem 2rem 2rem;
    margin-top: auto;
    text-align: center;
    border-top: 1px solid var(--color-border);
}
.site-footer p {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}
.site-footer a {
    color: #333;
    text-decoration: none;
    transition: opacity 0.3s;
    font-weight: 500;
}
.site-footer a:hover {
    opacity: 0.6;
}
.site-footer .footer-contact {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    margin-top: 2rem;
    font-size: 0.95rem;
}

/* Configurator */
.config-container { display: flex; flex: 1; padding-top: 80px; }
.config-sidebar { width: 320px; padding: 3rem 2.5rem; border-right: 1px solid var(--color-border); height: calc(100vh - 80px); position: sticky; top: 80px; background: #fff; overflow-y: auto; }
.config-content { flex: 1; padding: 4rem; max-width: 900px; }
.steps-list { list-style: none; margin-top: 2rem; }
.steps-list li { padding: 1.2rem 0; font-size: 1.05rem; color: var(--color-text-muted); border-bottom: 1px solid var(--color-border); transition: color 0.3s; }
.steps-list li.active { color: var(--color-text); font-weight: 600; border-color: var(--color-text); }
.options-grid { display: flex; flex-direction: column; gap: 1rem; margin-top: 2rem; }
.option-row, .option-card { 
    display: flex; padding: 2rem; border: 1px solid var(--color-border); border-radius: 12px;
    cursor: pointer; transition: all 0.3s; align-items: center; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}
.option-row:hover, .option-card:hover { border-color: #aaa; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.06); }
.option-row.active, .option-card.active { border-color: var(--color-text); box-shadow: 0 0 0 1px var(--color-text); background: #fafafa; }
.option-row input, .option-card input { display: none; }
.option-title { font-size: 1.2rem; font-weight: 600; display: block; margin-bottom: 0.5rem; color: var(--color-text); }
.option-desc { font-size: 1rem; color: var(--color-text-muted); display: block; line-height: 1.6; }
.config-actions-bottom { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--color-border); }

/* AI Advisor Chat Widget */
.ai-chat-widget { position: fixed; bottom: 30px; right: 30px; z-index: 1000; font-family: var(--font-main); }
.ai-toggle { 
    width: 60px; height: 60px; border-radius: 50%; background: var(--color-text); color: #fff; 
    border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; 
    box-shadow: 0 5px 20px rgba(0,0,0,0.2); transition: transform 0.3s ease;
}
.ai-toggle:hover { transform: scale(1.05); }
.ai-chat-window { 
    position: absolute; bottom: 80px; right: 0; width: 360px; background: #fff; 
    border: 1px solid var(--color-border); border-radius: 16px; display: none; flex-direction: column; 
    overflow: hidden; box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}
.ai-chat-window.open { display: flex; animation: slideUp 0.3s ease forwards; }
@keyframes slideUp { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }
.chat-header { padding: 1.2rem; background: #fafafa; border-bottom: 1px solid var(--color-border); display: flex; justify-content: space-between; align-items: center; }
.chat-header strong { font-weight: 600; font-size: 1rem; }
.chat-header .status { font-size: 0.85rem; color: #10b981; display: flex; align-items: center; gap: 0.5rem; }
.chat-header .status::before { content: ''; display: block; width: 8px; height: 8px; background: #10b981; border-radius: 50%; }
.chat-messages { padding: 1.5rem; height: 350px; overflow-y: auto; display: flex; flex-direction: column; gap: 1rem; }
.message { padding: 0.8rem 1.2rem; border-radius: 10px; max-width: 85%; line-height: 1.5; font-size: 0.95rem; }
.message.bot { background: #f0f0f0; align-self: flex-start; border-bottom-left-radius: 2px; }
.message.user { background: var(--color-text); color: #fff; align-self: flex-end; border-bottom-right-radius: 2px; }
.chat-input-area { display: flex; padding: 1rem; border-top: 1px solid var(--color-border); background: #fff; }
.chat-input-area input { flex: 1; background: transparent; border: none; color: var(--color-text); outline: none; padding: 0.5rem; font-size: 0.95rem; }
.chat-input-area input::placeholder { color: #aaa; }
.chat-input-area button { background: transparent; border: none; color: var(--color-text); cursor: pointer; padding: 0.5rem; display: flex; align-items: center; justify-content: center; transition: opacity 0.3s; }
.chat-input-area button:hover { opacity: 0.6; }

@media (max-width: 900px) {
    /* Layout */
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .section-pad { padding: 4rem 1.5rem; }
    
    /* Typography */
    h1 { font-size: 2.2rem; }
    .hero-minimal h1 { font-size: 2.2rem; }
    .hero-minimal p { font-size: 1.1rem; }
    .sub-hero h1 { font-size: 2.2rem; }
    
    /* Navbar */
    .navbar { position: absolute; flex-direction: column; padding: 1rem; align-items: center; gap: 15px; }
    .logo img { height: 50px; margin-right: 10px; } /* Mniejsze logo na telefonie */
    .nav-links { gap: 15px; text-align: center; justify-content: center; font-size: 0.75rem; }
    .btn-nav { padding: 0.6rem 1.2rem; font-size: 0.75rem; }
    
    /* Pages offset due to taller stacked navbar */
    .sub-hero { margin-top: 0; padding-top: 150px; height: 35vh; }
    
    /* Configurator Layout */
    .config-container { flex-direction: column; }
    .config-sidebar { width: 100%; height: auto; position: relative; top: 0; padding: 2rem; border-right: none; border-bottom: 1px solid var(--color-border); }
    .config-content { padding: 2rem; width: 100%; margin-left: 0; }
    .config-premium-wrapper { margin-top: 180px; padding: 0 10px; }
    .form-group-row { flex-direction: column; gap: 15px; }
    .option-row, .option-card { padding: 1.2rem; }
    
    /* Gallery */
    .gallery-grid { padding: 0 1rem 3rem 1rem; grid-template-columns: 1fr; }
    
    /* AI Chat */
    .ai-chat-window { width: calc(100vw - 40px); right: -15px; bottom: 70px; }
}

/* Realizacje Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 0 2rem 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}
.gallery-img-square {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}
.gallery-img-square:hover {
    transform: translateY(-5px);
    cursor: pointer;
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.lightbox.active {
    opacity: 1;
    pointer-events: auto;
}
.lightbox img {
    max-width: 90%;
    max-height: 90vh;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    border-radius: 8px;
}
.lightbox-close {
    position: absolute;
    top: 30px; right: 40px;
    color: #fff;
    font-size: 3rem;
    cursor: pointer;
    line-height: 1;
    transition: opacity 0.3s;
}
.lightbox-close:hover {
    opacity: 0.7;
}

/* PREMIUM CONFIGURATOR STYLES */
.config-premium-wrapper {
    max-width: 900px;
    margin: 120px auto 60px;
    padding: 0 20px;
}
.progress-container {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    margin-bottom: 40px;
    border-radius: 2px;
    overflow: hidden;
}
.progress-bar {
    height: 100%;
    background: var(--color-accent);
    width: 0%;
    transition: width 0.4s ease;
}
.config-intro {
    animation: fadeIn 0.8s ease forwards;
}
.config-step {
    display: none;
    animation: slideUpFade 0.5s ease forwards;
}
.config-step.active {
    display: block;
}
.step-label {
    display: block;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 2rem;
}
.config-step h3 {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    color: var(--color-text);
}
.checkbox-grid .option-card {
    /* Style differently if needed, currently shares radio styles */
}
.additional-notes {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid #aaa;
    color: var(--color-text);
    padding: 10px 0;
    margin-top: 15px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s;
}
.additional-notes:focus {
    outline: none;
    border-bottom-color: var(--color-text);
}
.file-upload {
    display: block;
    width: 100%;
    padding: 20px;
    background: #ffffff;
    border: 2px dashed #aaa;
    color: var(--color-text);
    cursor: pointer;
    margin-top: 15px;
    text-align: center;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s;
}
.file-upload:hover {
    border-color: var(--color-text);
    background: #fafafa;
}
.form-group-row {
    display: flex;
    gap: 20px;
}
.form-group-row input {
    flex: 1;
    background: #ffffff;
    border: 1px solid var(--color-border);
    color: var(--color-text);
    padding: 15px;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
}
.form-group-row input:focus {
    border-color: var(--color-text);
}
.form-group-col {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.form-group-col input {
    background: #ffffff;
    border: 1px solid var(--color-border);
    color: var(--color-text);
    padding: 15px;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
}
.form-group-col input:focus {
    border-color: var(--color-text);
}
.config-nav-controls {
    display: flex;
    justify-content: space-between;
    margin-top: 50px;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 30px;
}
.text-sm {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}
@keyframes slideUpFade {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
#roof-details-section {
    display: none;
}

.config-premium-wrapper input[type="text"],
.config-premium-wrapper input[type="email"],
.config-premium-wrapper input[type="tel"],
.config-premium-wrapper textarea {
    color: var(--color-text) !important;
    font-size: 1.05rem;
}

.form-group-col input.premium-input {
    color: var(--color-text);
    font-size: 1.1rem;
}
.additional-notes {
    color: var(--color-text);
}
.file-list {
    margin-top: 10px;
    background: rgba(0,0,0,0.05);
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--color-border);
}
