.footer {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
    color: #fff;
    padding: 40px 0 20px !important;
    position: relative;
    overflow: hidden !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    z-index: 1 !important;
    min-height: 400px !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    width: 100% !important;
    box-sizing: border-box !important;
}
/* Stała wysokość stopki na desktopie – jednakowy rozmiar na wszystkich stronach */
/* Jednolita wysokość stopki na desktopie – bez skakania między stronami */
@media (min-width: 992px) {
    .footer { height: 600px !important; }
    .footer > .container { height: 100%; }
    .footer-content { overflow: hidden; }
}

/* Ustawienie układu kolumnowego, aby stopka-dół był zawsze przyklejony do dołu */
.footer > .container { display: flex; flex-direction: column; min-height: 100%; }
.footer-content { flex: 1 0 auto; }
.footer-bottom { margin-top: auto; }

/* Wymuszenie spójnych fontów jak na stronie Umów wizytę - ale NIE dla ikon Font Awesome */
.footer, .footer * { font-family: 'Montserrat', Arial, sans-serif; box-sizing: border-box; }
/* Wyjątek dla ikon Font Awesome - muszą używać fontów ikon */
.footer i, .footer .fas, .footer .fab, .footer .fa, .footer [class*="fa-"] {
    font-family: "Font Awesome 6 Free", "Font Awesome 7 Free", "Font Awesome 6 Pro", "Font Awesome 5 Free", "FontAwesome" !important;
}
.footer p, .footer a, .footer li { margin: 0; padding: 0; line-height: 1.6; letter-spacing: .2px; }

.footer::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.03) 0%, transparent 70%);
    pointer-events: none;
}

.footer::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        conic-gradient(from 0deg at 50% 50%, transparent 0deg, rgba(255, 255, 255, 0.05) 60deg, transparent 120deg),
        conic-gradient(from 180deg at 50% 50%, transparent 0deg, rgba(255, 255, 255, 0.03) 60deg, transparent 120deg);
    animation: none; /* wyłączenie animacji zapobiega skakaniu scrollbara */
    pointer-events: none;
    opacity: 0.3;
    /* Zapobiegaj wykraczaniu poza stopkę */
    max-width: 100%;
    max-height: 100%;
    overflow: hidden;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: clamp(1.5rem, 4vw, 2rem);
    margin-bottom: clamp(1.5rem, 4vw, 2rem);
    align-items: start;
    max-width: min(1200px, 100%);
    margin-left: auto;
    margin-right: auto;
    padding: clamp(1.5rem, 4vw, 2rem) clamp(1rem, 3vw, 1.5rem) 0;
    min-height: clamp(250px, 30vw, 300px);
    position: relative;
    z-index: 2;
}
/* Reset górnych marginesów wewnątrz, aby tekst zaczynał się równo na każdej stronie */
.footer-content > * { margin-top: 0 !important; }
.footer h4 { margin-top: 0 !important; }

.footer-logo { text-align: center; position: relative; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; }
.footer-logo img { 
    height: clamp(150px, 15vw, 210px); 
    width: auto; 
    max-width: min(480px, 90vw); 
    margin-top: 0 !important; 
    margin-bottom: clamp(-2.5rem, -5vw, -2rem) !important; 
    filter: drop-shadow(0 4px 8px rgba(0,0,0,.2)); 
    transition: all .3s ease;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}
@media (min-width: 992px) {
  .footer-logo { padding-top: 0px; } /* spójny pionowy offset logo */
}
.footer-logo p { color: #ffffff; font-size: 1rem; line-height: 1.6; font-weight: 700; margin-top: 12px; }

.footer-links, .footer-contact, .footer-social { text-align: center; position: relative; z-index: 3; }
.footer-links h4, .footer-social h4, .footer-contact h4 { font-size: 1.3rem; margin-bottom: 20px; color: #fff; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.footer-links h4::after, .footer-social h4::after, .footer-contact h4::after { content: ''; display: block; width: 40px; height: 2px; background: rgba(255,255,255,.5); margin: 12px auto; border-radius: 1px; }

.footer-links ul { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 12px; }
.footer-links a { color: rgba(255,255,255,.9); text-decoration: none; transition: all .3s ease; font-size: 1rem; display: block; padding: 6px 0; font-weight: 400; position: relative; }
.footer a::after { content: none !important; display: none !important; }
.footer-links a::before { content: ''; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: 0; height: 1px; background: rgba(255,255,255,.7); transition: width .3s ease; }
.footer-links a:hover::before { width: 20px; }

.footer-contact p, .footer-contact li { color: rgba(255,255,255,.95); margin: 14px 0; font-size: 1.05rem; line-height: 1.8; display: flex; align-items: center; justify-content: center; gap: 8px; list-style: none; }
.footer-contact ul { padding: 0; margin: 0; }
.footer-contact i,
.footer-contact .fas,
.footer-contact .fa,
.footer-contact p i,
.footer-contact a i,
.footer-contact p .fas,
.footer-contact a .fas,
.footer-contact p .fa,
.footer-contact a .fa {
    display: inline-block !important;
    color: rgba(255,255,255,.9) !important;
    font-size: 1.1rem !important;
    width: 20px !important;
    min-width: 20px !important;
    text-align: center !important;
    margin-right: 8px !important;
    vertical-align: middle !important;
    font-family: "Font Awesome 6 Free", "Font Awesome 7 Free", "Font Awesome 6 Pro", "Font Awesome 5 Free", "FontAwesome" !important;
    font-style: normal !important;
    font-weight: 900 !important; /* Solid icons - fas - MUSI być 900 dla wypełnionych ikon */
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    text-rendering: auto !important;
    speak: none !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    word-wrap: normal !important;
    white-space: nowrap !important;
    direction: ltr !important;
    /* Upewniamy się że ikony są widoczne */
    opacity: 1 !important;
    visibility: visible !important;
    /* Zapobiegamy problemom z renderowaniem */
    line-height: 1 !important;
    /* Wymuszamy użycie Font Awesome */
    font-variant: normal !important;
    text-decoration: none !important;
}
.footer-contact a { 
    color: rgba(255,255,255,.95); 
    text-decoration: none; 
    font-weight: 500; 
    transition: opacity .3s ease; 
}
.footer-contact a i,
.footer-contact a .fas,
.footer-contact a .fa {
    font-weight: 900 !important; /* Zapewnij, że ikony w linkach są wypełnione */
}
.footer-contact a:hover { opacity: .9; }
/* Zapobiegaj zawijaniu wierszy kontaktu na desktopie, co wpływało na różne wysokości stopki */
@media (min-width: 992px) {
    .footer-contact p, .footer-contact a { white-space: nowrap; }
}

.social-icons { display: flex; gap: 15px; flex-wrap: wrap; justify-content: center; }
@media (min-width: 992px) {
    .social-icons { flex-wrap: nowrap; }
}
.social-icons a { display: inline-flex !important; align-items: center !important; justify-content: center !important; width: 45px !important; height: 45px !important; background: rgba(255,255,255,.1) !important; color: #fff !important; border-radius: 50% !important; text-decoration: none !important; transition: all .3s ease !important; font-size: 1.2rem !important; border: 1px solid rgba(255,255,255,.2) !important; }
.social-icons a:hover { background: rgba(255,255,255,.2) !important; transform: translateY(-2px) !important; box-shadow: 0 4px 12px rgba(0,0,0,.3) !important; }
.social-icons a i,
.social-icons a .fab,
.social-icons a .fa { 
    display: inline-block !important; 
    font-size: 1.2rem !important; 
    color: #fff !important;
    font-family: "Font Awesome 7 Brands", "Font Awesome 5 Brands", "FontAwesome" !important;
    font-style: normal !important;
    font-weight: 400 !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    text-rendering: auto !important;
}
.footer-social {
    position: relative !important;
    z-index: 3 !important;
    text-align: center !important;
}

.footer-bottom { text-align: center; padding-top: 25px; border-top: 1px solid rgba(255,255,255,.2); margin-top: 2rem; }
.footer-bottom p { color: rgba(255,255,255,.8); font-size: .9rem; margin: 8px 0; }
.footer-links-bottom { display: flex; gap: 16px; align-items: center; justify-content: center; margin-top: 8px; }
.footer-links-bottom a { color: rgba(255,255,255,.8); text-decoration: none; font-size: .95rem; font-weight: 500; transition: color .3s ease; }

/* ===== RESPONSIVE FOOTER - Ustandaryzowane breakpointy ===== */

/* Tablets and smaller (do 991px) */
@media (max-width: 61.9375em) { /* 991px */
    .footer-content { 
        grid-template-columns: 1fr; 
        gap: clamp(1.5rem, 4vw, 2rem); 
        padding: clamp(1.5rem, 4vw, 2rem) clamp(1rem, 3vw, 1.5rem) 0; 
    } 
    .footer-logo img { 
        height: clamp(100px, 15vw, 120px); 
        max-width: min(300px, 90vw); 
    } 
}

/* Small phones (480px - 767px) */
@media (max-width: 47.9375em) { /* 767px */
    .footer { 
        padding: clamp(2rem, 6vw, 2.5rem) 0 clamp(1rem, 3vw, 1.25rem); 
    } 
    .footer-logo img { 
        height: clamp(90px, 12vw, 105px); 
        max-width: min(280px, 85vw); 
    }
    .footer-content {
        padding: clamp(1.25rem, 4vw, 1.5rem) clamp(0.875rem, 3vw, 1.25rem) 0;
    }
    .footer-links h4, 
    .footer-social h4, 
    .footer-contact h4 {
        font-size: clamp(1.1rem, 4vw, 1.3rem);
    }
}

/* Very small phones (320px - 479px) */
@media (max-width: 29.9375em) { /* 479px */
    .footer { 
        padding: clamp(1.5rem, 5vw, 2rem) 0 clamp(0.75rem, 2.5vw, 1rem); 
    } 
    .footer-logo img { 
        height: clamp(80px, 18vw, 95px); 
        max-width: min(250px, 80vw); 
    }
    .footer-content {
        gap: clamp(1.25rem, 5vw, 1.5rem);
        padding: clamp(1rem, 4vw, 1.25rem) clamp(0.75rem, 3vw, 1rem) 0;
    }
    .footer-links a,
    .footer-contact p {
        font-size: clamp(0.875rem, 3vw, 1rem);
    }
    .social-icons {
        gap: clamp(0.75rem, 3vw, 1rem);
    }
    .social-icons a {
        width: clamp(40px, 10vw, 45px) !important;
        height: clamp(40px, 10vw, 45px) !important;
        font-size: clamp(1rem, 4vw, 1.2rem) !important;
    }
    .footer-bottom {
        padding-top: clamp(1rem, 4vw, 1.5rem);
        margin-top: clamp(1rem, 4vw, 1.5rem);
    }
}

/* Large screens (1440px+) */
@media (min-width: 90em) { /* 1440px+ */
    .footer-content {
        max-width: min(1320px, 100%);
    }
}

/* 4K / Ultrawide (1920px+) */
@media (min-width: 120em) { /* 1920px+ */
    .footer-content {
        max-width: min(1600px, 100%);
        padding: clamp(2rem, 4vw, 2.5rem) clamp(2rem, 5vw, 4rem) 0;
    }
    .footer-logo img {
        height: clamp(210px, 12vw, 240px);
        max-width: min(520px, 90vw);
    }
}

@keyframes rotate { 0% { transform: rotate(0deg);} 100% { transform: rotate(360deg);} }


