/* =========================================
   KEJSIKI CORE - GLOBALNY ARKUSZ STYLÓW
   (Header, Footer, Szuflada, Sidebar, Modale)
   ========================================= */

/* --- ZMIENNE GLOBALNE --- */
:root {
    --bg-white: #FFFFFF;
    --text-dark: #1A1A1A;
    --brand-red: #D62828;
    --brand-yellow: #FFC300;
    --light-gray: #F8F9FA;
}

/* --- BAZA --- */
html { scroll-behavior: smooth; }
body { margin: 0; font-family: 'Inter', sans-serif; background-color: var(--bg-white); color: var(--text-dark); -webkit-font-smoothing: antialiased; }
main { padding-top: 80px; min-height: 100vh; } /* Zabezpieczenie przed wjeżdżaniem pod fixed header */

/* --- REVEAL ANIMACJE (Wspólne dla wszystkich podstron) --- */
.reveal { opacity: 0; transform: translateY(40px); transition: all 1.2s cubic-bezier(.2,.8,.2,1); }
.reveal.active { opacity: 1; transform: translateY(0); }

/* =========================================
   1. NAGŁÓWEK I NAWIGACJA (DESKTOP)
   ========================================= */
.main-header { position: fixed; top: 0; width: 100%; z-index: 1000; display: flex; justify-content: space-between; align-items: center; padding: 0 5%; height: 80px; box-sizing: border-box; background: var(--bg-white); box-shadow: 0 4px 20px rgba(0,0,0,.05); transition: all .3s ease; }
.logo { font-size: 24px; font-weight: 800; color: var(--text-dark); text-decoration: none; letter-spacing: -.5px; }
.logo span { color: var(--brand-red); }
.header-right { display: flex; align-items: center; gap: 20px; }
.hamburger-btn { display: none; background: none; border: none; cursor: pointer; color: #333; padding: 5px; }
.main-nav { display: flex; gap: 25px; align-items: center; }
.nav-link { text-decoration: none; color: #555; font-weight: 600; font-size: 15px; transition: color 0.2s; }
.nav-link:hover { color: var(--brand-red); }
.call-btn { display: flex; align-items: center; gap: 8px; background: var(--brand-red); color: var(--bg-white); text-decoration: none; padding: 10px 24px; border-radius: 50px; font-weight: 600; box-shadow: 0 4px 15px rgba(214,40,40,.3); transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); max-width: 200px; white-space: nowrap; overflow: hidden; }
.call-btn:hover { background: #B31B1B; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(214,40,40,.4); }
.call-number { opacity: 1; transition: opacity 0.3s ease; }

/* MENU ROZWIJANE (Cennik - Desktop) */
.nav-dropdown { position: relative; display: inline-flex; align-items: center; height: 100%; }
.dropdown-content { visibility: hidden; opacity: 0; position: absolute; top: 100%; left: 50%; transform: translateX(-50%) translateY(15px); background-color: var(--bg-white); min-width: 180px; box-shadow: 0 10px 30px rgba(0,0,0,0.08); border-radius: 12px; padding: 10px 0; z-index: 1000; transition: all 0.3s ease; border: 1px solid #EAEAEA; margin-top: 10px; }
@media (min-width: 993px) { .nav-dropdown:hover .dropdown-content { visibility: visible; opacity: 1; transform: translateX(-50%) translateY(0); } }
.dropdown-content a { color: var(--text-dark); padding: 10px 20px; text-decoration: none; display: block; font-size: 14px; font-weight: 600; transition: background 0.2s, color 0.2s; }
.dropdown-content a:hover { background-color: var(--light-gray); color: var(--brand-red); }

/* =========================================
   2. PŁYWAJĄCE PRZYCISKI (SIDEBAR)
   ========================================= */
.floating-sidebar { position: fixed; right: 0; top: 50%; transform: translateY(-50%); background-color: var(--bg-white); box-shadow: -5px 0 30px rgba(0,0,0,.08); border-radius: 16px 0 0 16px; z-index: 1100; display: flex; flex-direction: column; overflow: hidden; border: 1px solid #F0F0F0; border-right: none; }
.fs-item { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 15px 10px; text-decoration: none; color: var(--text-dark); border-bottom: 1px solid #F0F0F0; transition: all .3s ease; min-width: 85px; }
.fs-item:last-child { border-bottom: none; }
.fs-icon { width: 24px; height: 24px; margin-bottom: 8px; color: var(--brand-red); transition: transform .3s ease; }
.fs-icon svg { width: 100%; height: 100%; stroke-width: 2; }
.fs-text { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; text-align: center; line-height: 1.3; }
.fs-item:hover { background-color: var(--light-gray); }
.fs-item:hover .fs-icon { transform: scale(1.15); }
.fb-btn:hover .fs-icon, .fb-btn:hover .fs-text { color: #0084FF; }
.quote-btn:hover .fs-icon, .quote-btn:hover .fs-text { color: var(--text-dark); }
.wa-btn:hover .fs-icon, .wa-btn:hover .fs-text { color: #25D366; }

/* =========================================
   3. STOPKA
   ========================================= */
.site-footer { background-color: #111; color: var(--bg-white); padding: 60px 5% 20px; }
.footer-top { display: flex; gap: 40px; margin-bottom: 40px; justify-content: space-between; flex-wrap: wrap; max-width: 1200px; margin: 0 auto 40px; }
.footer-col { flex: 1; min-width: 250px; }
.footer-logo { font-size: 28px; font-weight: 800; color: var(--bg-white); text-decoration: none; display: inline-block; margin-bottom: 20px; letter-spacing: -.5px; }
.footer-logo span { color: var(--brand-red); }
.footer-desc { color: #999; font-size: 15px; line-height: 1.6; margin-bottom: 20px; }
.footer-heading { font-size: 18px; font-weight: 700; margin-bottom: 20px; color: var(--bg-white); }
.footer-contact-list { list-style: none; padding: 0; margin: 0; color: #CCC; font-size: 15px; }
.footer-contact-list li { margin-bottom: 15px; display: flex; align-items: flex-start; gap: 12px; }
.footer-contact-list svg { color: var(--brand-red); flex-shrink: 0; margin-top: 2px; }
/* Mapa - opcjonalna, ukrywana na podstronach przez brak tej sekcji w HTML */
.footer-map iframe { width: 100%; height: 200px; border-radius: 12px; border: none; opacity: .9; transition: opacity .3s ease; }
.footer-map iframe:hover { opacity: 1; }
.footer-bottom { border-top: 1px solid #222; padding-top: 20px; display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #999; max-width: 1200px; margin: 0 auto; flex-wrap: wrap; gap: 15px; }
.footer-links a { color: #CCC; text-decoration: none; margin-left: 20px; transition: color .3s ease; }
.footer-links a:hover { color: var(--brand-red); }

/* =========================================
   4. MODALE I CIASTECZKA
   ========================================= */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,.6); backdrop-filter: blur(4px); z-index: 2000; display: none; justify-content: center; align-items: center; opacity: 0; transition: opacity .3s ease; }
.modal-overlay.active { display: flex; opacity: 1; }
.modal-content { background-color: var(--bg-white); width: 90%; max-width: 800px; max-height: 85vh; border-radius: 16px; padding: 40px; overflow-y: auto; position: relative; box-shadow: 0 25px 50px rgba(0,0,0,.2); transform: translateY(20px); transition: transform .3s ease; }
.modal-overlay.active .modal-content { transform: translateY(0); }
.modal-close { position: absolute; top: 20px; right: 20px; background: 0 0; border: none; font-size: 28px; color: #555; cursor: pointer; transition: color .3s ease; }
.modal-close:hover { color: var(--brand-red); }
.modal-content h2 { margin-top: 0; color: var(--text-dark); }
.modal-text { font-size: 14px; line-height: 1.7; color: #555; }
.modal-text h3 { color: var(--text-dark); margin-top: 25px; margin-bottom: 10px; }

/* Ciasteczka */
.cookie-bubble { position: fixed; bottom: 30px; left: 30px; max-width: 320px; background-color: var(--bg-white); padding: 20px; border-radius: 16px; box-shadow: 0 10px 40px rgba(0,0,0,.15); z-index: 1500; display: none; }
.cookie-bubble p { margin: 0 0 15px; font-size: 13px; line-height: 1.5; color: #555; }
.cookie-buttons { display: flex; gap: 10px; }
.cookie-btn { padding: 8px 16px; border: none; border-radius: 6px; font-size: 13px; font-weight: 600; cursor: pointer; transition: all .2s ease; }
.cookie-accept { background-color: var(--brand-red); color: var(--bg-white); flex: 1; }
.cookie-accept:hover { background-color: #B31B1B; }
.cookie-decline { background-color: #F0F0F0; color: #555; }
.cookie-decline:hover { background-color: #E0E0E0; }
.cookie-modal-content { max-width: 700px; padding: 40px; }
.cookie-modal-content h2 { font-size: 24px; font-weight: 800; margin-bottom: 15px; letter-spacing: -.5px; }
.cookie-category { border-bottom: 1px solid #EAEAEA; padding: 20px 0; }
.cookie-category:last-of-type { border-bottom: none; margin-bottom: 20px; }
.cookie-cat-header { display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
.cookie-cat-title { font-weight: 700; font-size: 16px; display: flex; align-items: center; gap: 10px; color: var(--text-dark); }
.cookie-cat-title svg { width: 16px; height: 16px; transition: transform .3s ease; }
.always-active { color: #2E7D32; font-weight: 700; font-size: 14px; }
.cookie-cat-desc { font-size: 14px; color: #666; line-height: 1.6; margin-top: 15px; display: none; }
.cookie-category.expanded .cookie-cat-desc { display: block; }
.cookie-category.expanded .cookie-cat-title svg { transform: rotate(90deg); }
.toggle-switch { position: relative; display: inline-block; width: 46px; height: 24px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #CCC; transition: .4s; border-radius: 24px; }
.toggle-slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background-color: #fff; transition: .4s; border-radius: 50%; }
input:checked + .toggle-slider { background-color: var(--text-dark); }
input:checked + .toggle-slider:before { transform: translateX(22px); }
.cookie-modal-actions { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 15px; margin-top: 20px; padding-top: 20px; border-top: 1px solid #EAEAEA; }
.cookie-modal-actions button { padding: 12px; font-size: 14px; width: 100%; border-radius: 6px; cursor: pointer; border: none; transition: .3s; font-weight: 600; }
.cookie-modal-actions .btn-primary { background: var(--brand-red); color: #fff; }
.cookie-modal-actions .btn-secondary { background: #EAEAEA; color: var(--text-dark); }
.cookie-modal-actions .btn-primary:hover { background: #B31B1B; }
.cookie-modal-actions .btn-secondary:hover { background: #D0D0D0; }
.floating-cookie-btn { position: fixed; bottom: 30px; left: 30px; width: 48px; height: 48px; border-radius: 50%; background-color: var(--bg-white); border: 1px solid #EAEAEA; box-shadow: 0 4px 15px rgba(0,0,0,.1); color: var(--text-dark); z-index: 990; display: none; align-items: center; justify-content: center; cursor: pointer; transition: all .3s ease; }
.floating-cookie-btn:hover { transform: scale(1.1); color: var(--brand-red); border-color: var(--brand-red); }
.floating-cookie-btn svg { width: 24px; height: 24px; }

/* =========================================
   5. RESPONSIVE MOBILE (Wspólne media queries)
   ========================================= */
@media (max-width: 992px) {
    .hamburger-btn { display: block; z-index: 2005; position: relative; }
    
    /* PEŁNOEKRANOWE MENU BOCZNE (SZUFLADA) */
    .main-nav { 
        position: fixed; top: 0; right: -370px; width: 300px; max-width: 85vw; height: 100vh; 
        background: var(--bg-white); flex-direction: column; gap: 0; 
        padding: 50px 10px 30px; box-shadow: -5px 0 25px rgba(0,0,0,0.15); 
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1); 
        z-index: 2000; overflow-y: auto; pointer-events: auto;
        clip-path: none !important; opacity: 1 !important; visibility: visible !important; transform: none !important;
    }
    .main-nav.open { right: 0; }
    
    .main-nav .nav-link {
        font-size: 16px; font-weight: 700; width: 100%; padding: 16px 10px;
        border-bottom: 1px solid #F0F0F0; display: flex; justify-content: space-between; align-items: center;
        box-sizing: border-box; color: var(--text-dark);
    }

    /* Akordeon Cennika na Mobile */
    .nav-dropdown { width: 100%; display: flex; flex-direction: column; }
    .dropdown-content { 
        position: static; transform: none !important; width: 100%; box-shadow: none; 
        border: none; background: #F8F9FA; display: none; padding: 5px 0; border-radius: 12px;
        margin-top: 5px; opacity: 1; visibility: visible;
    }
    .dropdown-content.active { display: flex; flex-direction: column; }
    .dropdown-content a { padding: 12px 20px; font-size: 14px; border-bottom: 1px solid #EEE; color: #555; font-weight: 600; }
    .dropdown-content a:last-child { border-bottom: none; }
    .cta-nav-btn { width: 100%; text-align: center; margin-top: 15px; } 
    
    /* Zwijany telefon */
    .call-btn { max-width: 42px; padding: 10px 11px; justify-content: flex-start; transition: max-width 0.3s ease, padding 0.3s ease; overflow: hidden; }
    .call-btn.active { max-width: 160px; padding: 10px 18px; }
    .call-number { opacity: 0; transition: opacity 0.2s; }
    .call-btn.active .call-number { opacity: 1; transition-delay: 0.1s; }
}

@media (max-width: 768px) {
    /* Pływający sidebar na dole ekranu */
    .floating-sidebar { top: auto; bottom: 0; right: 0; left: 0; transform: none; flex-direction: row; border-radius: 20px 20px 0 0; box-shadow: 0 -5px 25px rgba(0,0,0,.1); border: none; border-top: 1px solid #F0F0F0; justify-content: space-around; }
    .fs-item { border-bottom: none; border-right: 1px solid #F0F0F0; padding: 12px 5px; flex: 1; }
    .fs-item:last-child { border-right: none; }
    .fs-icon { margin-bottom: 4px; }
    body { padding-bottom: 75px; } /* Zapas na sidebar */
    
    /* Ustawienia Cookies */
    .cookie-bubble { bottom: 90px; }
    .floating-cookie-btn { bottom: 95px; left: 20px; }
    
    /* Footer */
    .footer-top { flex-direction: column; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .footer-links a { margin: 0 10px; }
}

@media (max-width: 600px) {
    .cookie-bubble { bottom: 15px; left: 15px; right: 15px; max-width: none; }
    .cookie-modal-content { padding: 25px 20px; width: 95%; }
    .cookie-modal-actions { grid-template-columns: 1fr; gap: 10px; }
}