/* --- Zmienne i Reset --- */
:root {
    --primary-color: #8B5A2B; /* Brąz drewna */
    --secondary-color: #2C3E50; /* Ciemny grafit/granat */
    --accent-color: #D35400; /* Akcent */
    --light-bg: #f9f9f9;
    --dark-bg: #222;
    --white: #ffffff;
    --text-color: #333;
    
    --nav-height: 100px;
    
    --transition-speed: 0.3s;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }

/* --- Preloader --- */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    background-color: #111;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#preloader img {
    max-width: 80%;
    max-height: 50%;
    height: auto;
    animation: preloader-pulse 1.5s ease-in-out infinite;
}

@keyframes preloader-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(0.98); }
}

#preloader.loaded {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* --- Custom Scrollbar (Premium) --- */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: #f0f0f0;
}
::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* --- Brand Selection --- */
::selection {
    background: var(--primary-color);
    color: var(--white);
}
::-moz-selection {
    background: var(--primary-color);
    color: var(--white);
}
body {
    font-family: 'Open Sans', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}
h1, h2, h3, h4 { font-family: 'Montserrat', sans-serif; font-weight: 700; }
a { text-decoration: none; color: inherit; transition: var(--transition-speed); }
ul { list-style: none; }

/* --- Scroll Fix (Oprócz Usług) --- */
#why-us, #gallery, #pricing, #contact {
    scroll-margin-top: 110px; /* Odstęp od góry po kliknięciu */
}

/* --- Utility Classes --- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.container-fluid { max-width: 100%; padding: 0; }
.section-padding { padding: 80px 0; }
.bg-light { background-color: var(--light-bg); }
.bg-dark { background-color: var(--dark-bg); }
.text-white { color: var(--white); }
.text-center { text-align: center; }

.section-title {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 50px;
    position: relative;
    color: var(--secondary-color);
    text-transform: uppercase;
}
.section-title.text-white { color: var(--white); }
.section-title::after {
    content: ''; display: block; width: 60px; height: 3px;
    background: var(--primary-color); margin: 15px auto 0;
}

/* --- Sticky Navigation (Tło Drewniane) --- */
.navbar {
    position: fixed; top: 0; left: 0; width: 100%;
    height: var(--nav-height);
    background-image: url('images/logo-tla-pasek-nawig..._imresizer.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 1000;
    transition: height 0.3s;
}

.navbar::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.05); 
    z-index: -1;
}

.nav-container {
    max-width: 1200px; margin: 0 auto; padding: 0 20px;
    height: 100%; display: flex; justify-content: space-between; align-items: center;
}

/* --- LOGO W MENU --- */
.text-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    height: 100%;
    flex: 0 0 auto;
    margin-left: 0;
    color: #1a1a1a; 
}

.logo-icon { 
    width: 110px; 
    height: 70px; 
    margin-right: 25px; 
    display: flex; 
    align-items: center; 
    justify-content: flex-start;
    flex-shrink: 0;
}

.nav-icon-img { 
    height: 100%; 
    width: 100%; 
    object-fit: contain; 
    display: block;
}

.logo-text { display: flex; flex-direction: column; justify-content: center; line-height: 1.1; position: relative; z-index: 2; }

.brand-name { 
    font-family: 'Montserrat', sans-serif; 
    font-weight: 800; 
    font-size: 2.1rem; 
    letter-spacing: -1px; 
    color: #1a1a1a; 
    white-space: nowrap;
}

.brand-tagline { 
    font-family: 'Open Sans', sans-serif; 
    font-weight: 600; 
    font-size: 0.9rem; 
    text-transform: uppercase; 
    letter-spacing: 0.5px; 
    opacity: 1;
    color: #ffffff; 
    text-shadow: 0 1px 3px rgba(0,0,0,0.9);
    white-space: nowrap;
}

.text-logo:hover .logo-icon { transform: scale(1.05); transition: transform 0.3s ease; }

.nav-menu { display: flex; gap: 30px; }
.nav-menu li a { font-weight: 700; text-transform: uppercase; color: #ffffff; font-size: 0.95rem; padding: 10px; text-shadow: 0 2px 4px rgba(0,0,0,0.9); }
.nav-menu li a:hover { color: #ffcc00; text-shadow: 0 0 10px rgba(255, 204, 0, 0.8); }

.hamburger { display: none; cursor: pointer; }
.bar { display: block; width: 25px; height: 3px; margin: 5px auto; background-color: #ffffff; box-shadow: 0 1px 3px rgba(0,0,0,0.8); transition: 0.3s; }

/* --- Hero Section --- */
.hero-section {
    position: relative;
    height: 80vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    overflow: hidden;
    margin-top: var(--nav-height);
}
.video-container { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; background-color: #000000; }
.hero-video { width: 100%; height: 100%; object-fit: cover; }
.hero-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.6); }
.hero-content { position: relative; z-index: 2; text-align: center; max-width: 900px; padding: 20px; }

.hero-brand-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.hero-outline-text {
    font-family: Arial, Helvetica, sans-serif; 
    font-weight: 900; 
    font-size: 5rem; 
    text-transform: none; 
    line-height: 1;
    margin: 0;
    color: transparent; 
    -webkit-text-stroke: 2px #ffffff;
}

.hero-title {
    font-size: 2.5rem;
    margin-bottom: 30px;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.7);
    border-bottom: 4px solid var(--primary-color);
    display: inline-block; padding-bottom: 10px;
}
.hero-text-box {
    background: rgba(0, 0, 0, 0.6);
    padding: 30px; border-radius: 8px;
    backdrop-filter: blur(5px);
    border-left: 5px solid var(--primary-color);
}
.hero-text-box h3 { font-size: 1.5rem; color: var(--primary-color); margin-bottom: 15px; }
.hero-text-box p { font-size: 1rem; line-height: 1.7; margin-bottom: 20px; }
.btn-hero {
    display: inline-block; padding: 12px 30px;
    background: var(--primary-color); color: white;
    font-weight: 600; text-transform: uppercase;
    border-radius: 4px; border: 2px solid var(--primary-color);
    transition: all 0.3s ease;
}
.btn-hero:hover { 
    background: transparent; 
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(139, 90, 43, 0.35);
}

/* --- Services (FLEXBOX) --- */
.services-grid, .why-us-grid { 
    display: flex;
    flex-wrap: wrap;
    justify-content: center; 
    gap: 30px;
}

.testimonials-grid, .pricing-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px;
}

/* Styl Boksów */
.service-box, .why-box, .testimonial-box {
    background-color: #ffffff; 
    padding: 30px; 
    border-radius: 8px; 
    text-align: center; 
    border: 1px solid rgba(0, 0, 0, 0.08); 
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    
    flex: 1 1 300px; 
    max-width: 400px;
}

/* --- Pricing Card Flexbox (Wyśrodkowanie) --- */
.pricing-card {
    background-color: #ffffff; 
    padding: 40px; 
    border-radius: 8px; 
    text-align: center; 
    border: 1px solid rgba(0, 0, 0, 0.08); 
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.service-box:hover, .why-box:hover, .testimonial-box:hover, .pricing-card:hover { 
    transform: translateY(-8px); 
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1); 
}
.icon-wrapper, .quote-icon, .why-box i { font-size: 2.5rem; color: var(--primary-color); margin-bottom: 20px; }
.service-box h3, .why-box h3, .testimonial-box h4 { margin-bottom: 15px; font-size: 1.3rem; color: var(--secondary-color); }
.testimonial-box { border-left: 5px solid var(--primary-color); }
.testimonial-box h4 { text-align: right; font-size: 1rem; font-weight: 700; }
.testimonial-box p { font-style: italic; }

.pricing-card:hover { border-color: var(--primary-color); }
.card-header { margin-bottom: 20px; }
.card-header i { font-size: 2.5rem; color: var(--primary-color); }
.card-body {
    flex-grow: 1;
    display: flex;
    align-items: center;
    margin-bottom: 25px;
}

.btn-primary { 
    display: inline-block; padding: 10px 25px; 
    background: var(--primary-color); color: white; 
    border-radius: 4px; font-weight: 600; 
    transition: all 0.3s ease;
}
.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(139, 90, 43, 0.35);
    background: var(--secondary-color);
}
.btn-outline { 
    display: inline-block; padding: 10px 25px; 
    border: 2px solid var(--primary-color); color: var(--primary-color); 
    border-radius: 4px; font-weight: 600; 
    transition: all 0.3s ease;
}
.btn-outline:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(139, 90, 43, 0.25);
    background: var(--primary-color);
    color: white;
}

/* --- Slider --- */
.gallery-section { overflow: hidden; }
.slider-container { width: 100%; overflow: hidden; position: relative; padding: 20px 0; }
.slider-track { display: flex; }
.slide { min-width: 300px; height: 250px; margin: 0 10px; border-radius: 8px; overflow: hidden; flex-shrink: 0; cursor: pointer; }
.slide img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease, filter 0.5s ease; }
.slide:hover img { transform: scale(1.08); filter: brightness(1.1); }

/* --- Lightbox --- */
.lightbox {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.95);
    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-content { position: relative; max-width: 85%; max-height: 85%; }
.lightbox-img { width: 100%; height: 100%; object-fit: contain; box-shadow: 0 0 20px rgba(255,255,255,0.1); }
.lightbox-close { position: absolute; top: 20px; right: 30px; font-size: 3rem; color: #fff; cursor: pointer; transition: 0.3s; z-index: 2001; }
.lightbox-close:hover { color: var(--primary-color); }
.lightbox-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    font-size: 3rem; color: rgba(255, 255, 255, 0.6);
    cursor: pointer; padding: 20px;
    transition: 0.3s; z-index: 2001;
}
.lightbox-nav:hover { color: #fff; background: rgba(0,0,0,0.3); }
.lightbox-nav.prev { left: 20px; }
.lightbox-nav.next { right: 20px; }

/* --- Contact & FB --- */
.contact-content { display: flex; flex-wrap: wrap; justify-content: center; gap: 40px; margin-bottom: 40px; text-align: center; }
.contact-item { flex: 1; min-width: 250px; }
.contact-item i { font-size: 2rem; color: var(--primary-color); margin-bottom: 15px; }
.email-link { font-weight: bold; text-decoration: underline; color: var(--white); }

/* ZMIANA: Niebieska ikona FB zawsze */
.fb-link { 
    display: inline-block; 
    font-size: 4rem; 
    color: #1877F2; /* Niebieski na stałe */
    transition: transform 0.3s; 
}
.fb-link:hover { 
    transform: scale(1.1); 
}

/* FAQ */
.faq-section { max-width: 800px; margin: 0 auto; background: rgba(255,255,255,0.05); padding: 30px; border-radius: 8px; }
.faq-item { border-bottom: 1px solid rgba(255,255,255,0.1); margin-bottom: 15px; }
.faq-question { padding: 15px; cursor: pointer; font-weight: 600; display: flex; justify-content: space-between; align-items: center; transition: 0.3s; }
.faq-question:hover { color: var(--primary-color); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.4s ease-out; padding: 0 15px; color: #ccc; }
.faq-item.active .faq-answer { max-height: 150px; padding-bottom: 15px; }
.faq-item.active .toggle-icon { transform: rotate(45deg); }

/* --- Smooth Focus (Premium) --- */
a:focus, button:focus, input:focus, textarea:focus, select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(139, 90, 43, 0.3);
}
a:focus-visible, button:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    box-shadow: none;
}
.btn-hero:focus, .btn-primary:focus, .btn-outline:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(139, 90, 43, 0.35);
}

/* Footer & Animation */
footer { background: #111; color: #777; padding: 30px 0; text-align: center; font-size: 0.9rem; }
.fade-in, .slide-up, .slide-left, .slide-right, .zoom-in { opacity: 0; transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.slide-up { transform: translateY(50px); }
.slide-left { transform: translateX(-50px); }
.slide-right { transform: translateX(50px); }
.zoom-in { transform: scale(0.9); }
.visible { opacity: 1; transform: translate(0) scale(1); }
.delay-200 { transition-delay: 0.2s; }
.delay-400 { transition-delay: 0.4s; }

/* --- Floating Phone Button --- */
.floating-phone {
    position: fixed;
    bottom: 110px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
    z-index: 9998;
    transition: all 0.3s ease;
    animation: pulse-phone 2s infinite;
}

.floating-phone i {
    color: #fff;
    font-size: 1.3rem;
}

.floating-phone:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(40, 167, 69, 0.5);
}

@keyframes pulse-phone {
    0%, 100% { 
        box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4); 
    }
    50% { 
        box-shadow: 0 4px 25px rgba(40, 167, 69, 0.6), 0 0 0 8px rgba(40, 167, 69, 0.15); 
    }
}

/* --- Chatbot Widget --- */
.chatbot-widget {
    position: fixed;
    bottom: 25px;
    right: 30px;
    left: auto;
    z-index: 9999;
    font-family: 'Open Sans', sans-serif;
}

/* Przycisk otwierający */
.chatbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(139, 90, 43, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    animation: chatbot-pulse 2s infinite;
}

.chatbot-toggle i {
    font-size: 1.6rem;
    color: #fff;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(139, 90, 43, 0.5);
}

.chatbot-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 18px;
    height: 18px;
    background: var(--accent-color);
    border-radius: 50%;
    display: none;
    animation: badge-bounce 0.5s ease;
}

@keyframes chatbot-pulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(139, 90, 43, 0.4); }
    50% { box-shadow: 0 4px 30px rgba(139, 90, 43, 0.6), 0 0 0 10px rgba(139, 90, 43, 0.1); }
}

@keyframes badge-bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* Okienko czatu */
.chatbot-window {
    position: absolute;
    bottom: 75px;
    right: 0;
    left: auto;
    width: 360px;
    height: 480px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.chatbot-window.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Nagłówek czatu */
.chatbot-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #fff;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chatbot-avatar {
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatbot-avatar i {
    font-size: 1.3rem;
    color: #fff;
}

.chatbot-header-text h4 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
}

.chatbot-status {
    font-size: 0.75rem;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 5px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    animation: status-pulse 1.5s infinite;
}

@keyframes status-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.chatbot-close {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.chatbot-close i {
    color: #fff;
    font-size: 1rem;
}

.chatbot-close:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Obszar wiadomości */
.chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chatbot-message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 0.9rem;
    line-height: 1.5;
    animation: message-appear 0.3s ease;
}

@keyframes message-appear {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.chatbot-message.bot {
    background: #e9ecef;
    color: var(--text-color);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.chatbot-message.user {
    background: var(--primary-color);
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chatbot-message a {
    color: inherit;
    text-decoration: underline;
    font-weight: 600;
}

.chatbot-message.bot a {
    color: var(--primary-color);
}

/* Typing indicator */
.chatbot-typing {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: #e9ecef;
    border-radius: 16px;
    border-bottom-left-radius: 4px;
    align-self: flex-start;
    max-width: 60px;
}

.chatbot-typing span {
    width: 8px;
    height: 8px;
    background: #adb5bd;
    border-radius: 50%;
    animation: typing-bounce 1.4s infinite ease-in-out;
}

.chatbot-typing span:nth-child(1) { animation-delay: 0s; }
.chatbot-typing span:nth-child(2) { animation-delay: 0.2s; }
.chatbot-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing-bounce {
    0%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-6px); }
}

/* Pole do wpisywania */
.chatbot-input-area {
    padding: 15px;
    background: #fff;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 10px;
}

.chatbot-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #dee2e6;
    border-radius: 25px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.chatbot-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(139, 90, 43, 0.15);
}

.chatbot-send {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--primary-color);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.chatbot-send i {
    color: #fff;
    font-size: 1rem;
}

.chatbot-send:hover {
    background: var(--secondary-color);
    transform: scale(1.05);
}

/* --- Responsiveness --- */
@media (max-width: 768px) {
    .container { padding-left: 15px; padding-right: 15px; }
    .nav-menu { display: none; position: absolute; top: var(--nav-height); left: 0; width: 100%; background: #222; flex-direction: column; padding: 20px; box-shadow: 0 5px 10px rgba(0,0,0,0.1); }
    .nav-menu.active { display: flex; }
    .hamburger { display: block; }
    .brand-name { font-size: 1.5rem; }
    .brand-tagline { font-size: 0.7rem; }
    .logo-icon { width: 80px; height: 50px; margin-right: 10px; } 
    .hero-title { font-size: 1.5rem; }
    .hero-outline-text { font-size: 2.5rem; -webkit-text-stroke: 1.5px #ffffff; }
    .hero-section { height: auto; padding: 100px 0; }
    .slide { min-width: 80%; }
    .lightbox-nav { font-size: 2rem; padding: 10px; }
    
    /* Chatbot mobile */
    .chatbot-widget { bottom: 15px; right: 15px; left: auto; }
    .chatbot-toggle { width: 55px; height: 55px; }
    .chatbot-window { 
        width: calc(100vw - 30px); 
        height: 70vh;
        max-height: 500px;
        bottom: 70px;
        right: 0;
        left: auto;
    }
    
    /* Floating phone mobile */
    .floating-phone { bottom: 90px; right: 15px; width: 45px; height: 45px; }
    .floating-phone i { font-size: 1.1rem; }
}