/* ==========================================================================
   1. ZMIENNE I KONFIGURACJA (Root)
   ========================================================================== */
:root {
    /* Kolory Brandingowe */
    --kolor-glowny: #0f86c2;      /* Głęboki niebieski */
    --kolor-akcent: #138dc7;      /* Hover, elementy interaktywne */
    --kolor-link: #2ebfe0;        /* Linki */
    --main-yellow: #ffc107;       /* Akcenty CTA i żółć na mapie */
    
    /* Kolory Neutralne */
    --main-dark: #212529;
    --kolor-bialy: #ffffff;
    --kolor-tlo-sekcji: #f8f9fa;
    --kolor-tekst-ciemny: #1a1a1a;
    --kolor-tekst-jasny: #6c757d;
    
    /* Cienie i Efekty */
    --cien-box: 0 0.5rem 1rem rgba(0, 0, 0, 0.08);
    --cien-box-hover: 0 1rem 3rem rgba(0,0,0,0.12);
    /* Mocny cień pod tekstem dla czytelności banerów */
    --cien-text: 0px 2px 15px rgba(0, 0, 0, 0.8), 0px 4px 5px rgba(0, 0, 0, 1);
    --transition: all 0.3s ease-in-out;
}

/* ==========================================================================
   2. STYLE GLOBALNE (Reset i Typografia)
   ========================================================================== */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--kolor-tekst-ciemny);
    background-color: var(--kolor-bialy);
    overflow-x: hidden;
}

a {
    color: var(--kolor-glowny);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--kolor-akcent);
}

.content-wrapper {
    padding-top: 0;
}

.text-shadow {
    text-shadow: var(--cien-text);
}

/* Przyciski globalne */
.btn-primary {
    background-color: var(--kolor-glowny);
    border-color: var(--kolor-glowny);
    transition: var(--transition);
}

.btn-primary:hover {
    background-color: var(--kolor-akcent);
    border-color: var(--kolor-akcent);
    transform: translateY(-2px);
}

/* ==========================================================================
   3. NAWIGACJA (NAVBAR) - Stałe dla całego serwisu
   ========================================================================== */
.navbar {
    background-color: rgba(0, 0, 0, 0.4) !important; 
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
    padding: 12px 0;
    z-index: 1050;
}

.navbar .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
}

.navbar .nav-link:hover {
    color: var(--main-yellow) !important;
}

/* Navbar po przewinięciu strony (Scrolled) */
.navbar.scrolled {
    background-color: var(--kolor-glowny) !important;
    backdrop-filter: none;
    padding: 8px 0;
    box-shadow: var(--cien-box);
    border-bottom: none;
}

.navbar.scrolled .nav-link {
    color: #ffffff !important;
}

/* ==========================================================================
   4. STRONA GŁÓWNA - Karuzela (Hero Video/Image)
   ========================================================================== */
.carousel-item {
    height: 700px;
    background-color: #000;
    position: relative;
}

.carousel-item img {
    object-fit: cover;
    height: 100%;
    width: 100%;
    transition: transform 5s ease;
}

.carousel-item.active img {
    transform: scale(1.05); /* Efekt Ken Burns */
}

.carousel-item::after {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 50%, rgba(0,0,0,0.5) 100%);
    pointer-events: none;
}

.carousel-caption {
    bottom: 12%;
    z-index: 10;
}

.display-3 {
    font-weight: 800;
    letter-spacing: -1px;
}

/* ==========================================================================
   5. STRONA GŁÓWNA - NAJNOWSI PRZEWOŹNICY
   ========================================================================== */
.card-firm-premium {
    border-radius: 16px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.card-firm-premium:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.12) !important;
}

.card-img-container {
    height: 220px;
    position: relative;
    overflow: hidden;
    background: #f0f0f0;
}

.card-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card-firm-premium:hover .card-img-container img {
    transform: scale(1.1);
}

.badge-city {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    color: #333;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.badge-verified {
    position: absolute;
    top: 15px;
    right: 15px;
    background: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.rating-stars-gold {
    color: #ffc107;
    font-size: 0.85rem;
}

.card-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-body .mt-auto {
    margin-top: auto !important;
}

.transition-link {
    transition: color 0.2s ease;
}

.card-firm-premium:hover .transition-link {
    color: var(--bs-primary) !important;
}

@media (max-width: 576px) {
    .card-img-container {
        height: 200px;
    }
}

/* ==========================================================================
   6. STRONA GŁÓWNA - Sekcja Miast i Mapa
   ========================================================================== */
.section-cities {
    background-color: #fcfcfc;
}

.city-link-modern {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    color: var(--kolor-tekst-ciemny) !important;
    font-size: 0.85rem;
    font-weight: 500;
    height: 100%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.city-link-modern:hover {
    background: var(--kolor-glowny);
    color: #ffffff !important;
    border-color: var(--kolor-glowny);
    transform: translateY(-3px);
    box-shadow: var(--cien-box);
}

.poland-map path {
    fill: #0f86c2;
    stroke: #fff;
    stroke-width: 2px;
    transition: var(--transition);
    cursor: pointer;
}

.poland-map path:hover {
    fill: var(--main-yellow) !important;
}

/* ==========================================================================
   7. STRONA GŁÓWNA - Sekcja Parallax (Góry)
   ========================================================================== */
.parallax-section {
    min-height: 600px;
    background-image: url('/images/banery/parallaks-autokary-tatry.jpg');
    background-attachment: fixed;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--kolor-bialy);
    position: relative;
    overflow: hidden;
}

.parallax-section::after {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.6));
    z-index: 1;
}

.parallax-section h2, .parallax-section p {
    position: relative;
    z-index: 10;
    text-shadow: var(--cien-text); 
}

/* ==========================================================================
   8. GLOBALNA SEKCJA HERO (Dla podstron)
   ========================================================================== */
.page-hero-section {
    position: relative;
    background-color: #333;
    background-image: url('/images/banery/parallaks-autokary-tatry.jpg');
    background-size: cover;
    background-position: center bottom;
    background-repeat: no-repeat;
    background-attachment: fixed; 
    overflow: hidden;
    min-height: 450px;
    display: flex; 
    align-items: center; 
    justify-content: center;
}

.hero-bg-container img {
    transition: transform 10s ease-out; /* Kinowy efekt powolnego przybliżania */
}

.page-hero-section:hover .hero-bg-container img {
    transform: scale(1.1);
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.8));
    pointer-events: none;
}

/* ==========================================================================
    9. LISTOWANIE FIRM (firmy-lista.php)
   ========================================================================== */
.card-description-box {
    background: #ffffff;
    border-left: 4px solid var(--kolor-glowny) !important;
    position: relative;
    transition: var(--transition);
}

.description-content {
    color: #4a4a4a;
}

.description-content p {
    margin-bottom: 1.4rem;
    text-align: justify;
}

.description-content h2, 
.description-content h3 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1.2rem;
    color: var(--kolor-tekst-ciemny);
}

.description-content a {
    color: var(--kolor-glowny);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid rgba(var(--kolor-glowny-rgb), 0.2);
    transition: var(--transition);
}

.description-content a:hover {
    background: rgba(var(--kolor-glowny-rgb), 0.05);
    border-bottom-color: var(--kolor-glowny);
}

.seo-divider {
    height: 1px;
    width: 60px;
    background: var(--kolor-glowny);
    opacity: 0.3;
}

/* KARTA FIRMY (POPRAWIONA WYSOKOŚĆ) */
.card-company-horizontal {
    transition: var(--transition);
    border: 1px solid #eee !important;
    height: 100%; /* Wymusza pełną wysokość karty */
}

.card-company-horizontal:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.08) !important;
    border-color: var(--kolor-glowny) !important;
}

/* Sztywne ramy dla obrazka */
.card-company-horizontal .img-wrapper {
    position: relative;
    overflow: hidden;
    background: #f8f9fa;
    height: 220px; /* Sztywna wysokość dla małych ekranów (mobile/tablet) */
}

@media (min-width: 768px) {
    .card-company-horizontal .img-wrapper {
        height: 100%; /* Na desktopie wypełnia kolumnę */
        min-height: 220px; /* Zabezpieczenie przed "zapłaceniem" się przy małej ilości tekstu */
    }
}

.card-company-horizontal .img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Gwarantuje ucięcie obrazka bez zniekształceń */
    object-position: center; /* Centruje obrazek */
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.card-company-horizontal:hover .img-wrapper img {
    transform: scale(1.08);
}

.v-badge-custom {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 5;
}

/* Wypychanie dolnego paska na sam dół karty */
.card-company-horizontal .card-body {
    display: flex;
    flex-direction: column;
}
.card-company-horizontal .footer-action {
    margin-top: auto; 
}

/* Sidebar i Reszta */
.sidebar .card {
    border: 1px solid #eee !important;
}

.sidebar .input-group {
    background: #fff;
    border: 1px solid #dee2e6;
    transition: var(--transition);
}

.sidebar .input-group:focus-within {
    border-color: var(--kolor-glowny);
    box-shadow: 0 0 0 0.25rem rgba(var(--kolor-glowny-rgb), 0.1);
}

.pagination .page-item .page-link {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--kolor-tekst-ciemny);
    font-weight: 600;
    transition: var(--transition);
}

.pagination .page-item.active .page-link {
    background-color: var(--kolor-glowny);
    border-color: var(--kolor-glowny);
    color: #fff;
    box-shadow: 0 4px 10px rgba(var(--kolor-glowny-rgb), 0.3);
}

.pagination .page-link:hover:not(.active) {
    background-color: #f8f9fa;
    color: var(--kolor-glowny);
}

.letter-spacing-1 { letter-spacing: 1px; }
.hover-primary:hover { color: var(--kolor-glowny) !important; }
.bg-warning-subtle { background-color: rgba(255, 193, 7, 0.15) !important; }

@media (max-width: 768px) {
    .description-content {
        padding: 1.5rem !important;
        text-align: left;
    }
    .description-content p {
        text-align: left;
    }
}

/* ==========================================================================
   10. WIZYTÓWKA FIRMY
   ========================================================================== */
.premium-company-card {
    border: none;
    border-radius: 1.25rem;
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.06);
    overflow: hidden;
    background: #fff;
}

.premium-company-card .img-wrapper {
    position: relative;
    height: 240px;
    overflow: hidden;
}

.premium-company-card .img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.badge-verified-float {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(25, 135, 84, 0.95);
    backdrop-filter: blur(4px);
    color: #fff;
    padding: 0.4rem 1rem;
    border-radius: 50rem;
    font-size: 0.8rem;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    z-index: 2;
}

.contact-list {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    transition: transform 0.2s ease;
}

.contact-item:hover {
    transform: translateX(5px);
}

.contact-icon-box {
    width: 42px;
    height: 42px;
    min-width: 42px;
    background-color: #f1f6ff;
    color: #0d6efd;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    margin-right: 1rem;
}

.border-end-md {
    border-right: 1px solid #f1f1f1;
}

.object-fit-cover {
    object-fit: cover;
}

.card-news-hover {
    transition: transform 0.3s ease;
}

.card-news-hover:hover {
    transform: translateY(-5px);
}

@media (max-width: 767px) {
    .border-end-md {
        border-right: none;
        border-bottom: 1px solid #f1f1f1;
        padding-bottom: 20px;
    }
}

/* ==========================================================================
   11. BLOG - FEED NA STRONIE GŁÓWNEJ (Kafelki 2+4)
   ========================================================================== */
.news-img-container {
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.news-img-container img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.5s ease;
}

.card-news-hover:hover .news-img-container img {
    transform: scale(1.1);
}

.news-date-badge {
    position: absolute;
    bottom: 10px; right: 10px;
    background: rgba(15, 134, 194, 0.9);
    color: #fff; padding: 5px 12px; border-radius: 8px;
    font-size: 0.75rem; font-weight: 700; backdrop-filter: blur(4px);
}

.card-news-hover h3 {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; min-height: 3rem;
}

/* ==========================================================================
   BLOG / AKTUALNOŚCI LISTOWANIE (.aktualnosci)
   ========================================================================== */
.aktualnosci .card-news {
    transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    border-radius: 1rem;
    overflow: hidden;
}

.aktualnosci .card-news:hover {
    transform: translateY(-8px);
    box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.12) !important;
}

.aktualnosci .news-img-wrapper {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background-color: #f8f9fa;
    display: block; /* Gwarantuje prawidłowe zachowanie kontenera */
}

.aktualnosci .news-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block; /* Zapobiega powstawaniu pustych marginesów pod zdjęciem */
    transition: transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.aktualnosci .card-news:hover .news-img-wrapper img {
    transform: scale(1.08);
}

.aktualnosci .news-date-badge {
    position: absolute !important;
    top: 15px !important;
    left: 15px !important;
    bottom: auto !important; /* Blokuje rozciąganie w dół */
    right: auto !important;
    width: max-content !important; /* Dopasowuje szerokość do tekstu */
    height: auto !important; /* Dopasowuje wysokość do tekstu */
    display: inline-block !important; /* Zdejmuje właściwości Flexboxa, które mogły go psuć */
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 6px 14px !important;
    border-radius: 20px !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    line-height: normal !important; /* Wymusza standardową wysokość tekstu */
    color: var(--kolor-glowny, #0f86c2) !important;
    z-index: 10 !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1) !important;
    pointer-events: none;
}

.aktualnosci .post-title {
    font-weight: 800;
    line-height: 1.4;
    color: var(--kolor-tekst-ciemny, #1a1a1a);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.aktualnosci .card-news:hover .post-title {
    color: var(--kolor-glowny, #0f86c2);
}

.aktualnosci .post-snippet {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.9rem;
    color: #6c757d;
    line-height: 1.6;
}

.aktualnosci .card-description-box {
    border-left: 4px solid var(--kolor-glowny, #0f86c2) !important;
}

.aktualnosci .description-content h2, 
.aktualnosci .description-content h3 {
    font-weight: 700;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    color: var(--kolor-tekst-ciemny, #1a1a1a);
}

/* Sidebar Utilities */
.aktualnosci .transition-hover {
    transition: all 0.2s ease;
}

.aktualnosci .transition-hover:hover {
    background-color: #f8f9fa;
}

.aktualnosci .hover-primary:hover {
    color: var(--kolor-glowny, #0f86c2) !important;
}

/* Paginacja (upewnienie się, że zachowuje kształt kółek) */
.aktualnosci .pagination .page-item .page-link {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--kolor-tekst-ciemny, #1a1a1a);
    font-weight: 600;
    transition: all 0.3s ease;
}

.aktualnosci .pagination .page-item.active .page-link {
    background-color: var(--kolor-glowny, #0f86c2);
    border-color: var(--kolor-glowny, #0f86c2);
    color: #fff;
    box-shadow: 0 4px 10px rgba(15, 134, 194, 0.3);
}

.aktualnosci .pagination .page-link:hover:not(.active) {
    background-color: #f8f9fa;
    color: var(--kolor-glowny, #0f86c2);
}

/* ==========================================================================
   12. PODSTRONA ARTYKUŁU (aktualnosci-pokaz.php)
   ========================================================================== */
.post-content p { margin-bottom: 1.8rem; }
.post-content h2, .post-content h3 { 
    font-weight: 700; color: #212529; margin-top: 2.5rem; margin-bottom: 1.2rem; 
}

.post-content blockquote {
    border-left: 5px solid var(--kolor-glowny);
    padding: 1rem 2rem; font-style: italic; background: #f8f9fa; margin: 2rem 0;
}

.sidebar .transition-hover:hover { background-color: #f1f8fc; }
.border-bottom-light { border-bottom: 1px solid #f1f1f1; }

/* ==========================================================================
   13. STOPKA (FOOTER) - WERSJA PREMIUM
   ========================================================================== */
.footer-site {
    background-color: #0b6ea0; 
    color: #ffffff;
    border-top: 4px solid var(--main-yellow);
}

.footer-title {
    color: var(--main-yellow);
    font-size: 1rem; font-weight: 700; text-transform: uppercase;
    margin-bottom: 25px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8) !important;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--main-yellow) !important;
    transform: translateX(5px);
}

.footer-icon-box {
    width: 40px; height: 40px; background: rgba(255, 255, 255, 0.1);
    border-radius: 10px; display: flex; align-items: center; justify-content: center;
    color: var(--main-yellow);
}

.footer-socials a {
    width: 35px; height: 35px; background: rgba(255, 255, 255, 0.1);
    color: white; display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%; margin-right: 10px; transition: var(--transition);
}

.footer-socials a:hover {
    background: var(--main-yellow); color: var(--main-dark); transform: translateY(-3px);
}

.footer-bottom {
    background: rgba(0, 0, 0, 0.15);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* ==========================================================================
   14. RWD (Responsywność)
   ========================================================================= */
@media (min-width: 992px) {
    .col-lg-2 { width: 16.666667%; }
}

@media (max-width: 991px) {
    .footer-site { text-align: center; }
    .footer-links { margin-bottom: 30px; }
}

@media (max-width: 576px) {
    .carousel-item { height: 500px; }
    .city-link-modern { font-size: 0.8rem; padding: 10px; }
}