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

:root {
    --primary-color: #0d4b3f; /* Główny kolor - butelkowa zieleń */
    --primary-color-dark: #0a3a31;
    --secondary-color: #f7a440; /* Kolor akcentu - ciepły żółty/pomarańczowy */
    --background-color: #f8f9fa;
    --text-color: #333;
    --card-bg: #ffffff;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    line-height: 1.6;
    overflow-x: hidden; /* Fix na biały pasek */
}

/* ... reszta styli ... */

/* Responsive - Header Text Change */
@media (max-width: 768px) {
    /* Ukrywamy oryginalny tekst */
    .header-title span.desktop-text {
        display: none !important; /* Wymuszenie ukrycia */
    }
    
    /* Pokazujemy wersję mobilną */
    .header-title::after {
        content: "Katalog Sprawdzonych Firm Budowlanych";
        display: block;
        font-size: 32px; /* Powiększam font, bo tekst jest krótszy */
        line-height: 1.2;
    }
    
    .header-title {
        font-size: unset; /* Resetujemy font-size rodzica */
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.app-header {
    background-color: var(--primary-color);
    color: white;
    padding: 40px 0;
    position: relative;
    text-align: center;
}

.header-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3)), url('https://www.wprost.pl/_thumb/f5/66/e3e079730a3a789182d8c7921356.jpeg');
    background-size: cover;
    background-position: center;
    opacity: 0.3;
    z-index: 1;
}

.app-header > .container {
    position: relative;
    z-index: 2;
}

.logo-area {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.logo-icon {
    width: 50px;
    height: 50px;
    background-color: var(--secondary-color);
    color: var(--primary-color-dark);
    font-size: 28px;
    font-weight: 700;
    display: grid;
    place-items: center;
    border-radius: 12px;
    margin-right: 15px;
}

.logo-text {
    font-size: 24px;
    font-weight: 500;
}

.header-title {
    font-size: 48px;
    font-weight: 700;
    margin: 20px 0 10px;
    /* NOWY AKCENT */
    text-shadow: 0 0 15px rgba(247, 164, 64, 0.4);
}

.header-subtitle {
    font-size: 20px;
    font-weight: 300;
    opacity: 0.9;
}

/* Sections */
.main-content {
    padding: 60px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 36px;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.section-header p {
    font-size: 18px;
    color: #666;
}

/* Categories Filter */
.categories-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.category-filter-card {
    background-color: var(--card-bg);
    padding: 20px 25px;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 15px;
}

.category-filter-card:hover, .category-filter-card.active {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(13, 75, 63, 0.2);
}

.category-filter-card i {
    font-size: 24px;
    color: var(--secondary-color);
    transition: color 0.3s ease;
}

/* ZMIANA - ikona pozostaje żółta po najechaniu */
.category-filter-card:hover i, .category-filter-card.active i {
    color: var(--secondary-color);
}

.category-filter-card h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
}

/* Companies Grid */
.companies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.company-card {
    background-color: var(--card-bg);
    border-radius: 15px;
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.company-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.company-card-header {
    padding: 25px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #f0f0f0;
}

.company-logo {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    margin-right: 20px;
    object-fit: cover;
    background-color: #f0f0f0;
}

.company-name-location h3 {
    margin: 0 0 5px 0;
    font-size: 20px;
    color: var(--primary-color-dark);
}

.company-name-location p {
    margin: 0;
    color: #777;
    font-size: 14px;
}

.company-card-body {
    padding: 25px;
    flex-grow: 1;
}

.company-card-body p {
    margin: 0 0 20px 0;
}

.company-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    /* ZMIANA - nowy kolor tła tagów */
    background-color: #fff8e1; 
    color: #b1791a;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.company-card-footer {
    padding: 20px 25px;
    background-color: #fcfcfc;
}

/* Styl przycisku outline */
.company-link {
    display: inline-block;
    background-color: transparent;
    color: var(--primary-color);
    padding: 10px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    border: 2px solid var(--primary-color);
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
}

/* ZMIANA - Przycisk po najechaniu staje się żółty */
.company-link:hover {
    background-color: var(--secondary-color);
    color: var(--primary-color-dark);
    border-color: var(--secondary-color); /* Zmiana ramki na żółtą */
}

/* Footer */
.app-footer {
    background-color: var(--primary-color-dark);
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    padding: 30px 20px;
    margin-top: 60px;
}

/* Responsive */
@media (max-width: 768px) {
    /* Header Fixes */
    .nav-wrapper {
        flex-direction: column;
        gap: 15px;
        padding-top: 20px;
        align-items: center;
        width: 100%; /* Zapewnia pełną szerokość */
    }

    .logo-area {
        margin-bottom: 5px;
    }

    .logo-text {
        font-size: 24px;
    }

    .header-content {
        padding: 30px 15px 40px 15px; /* Większy padding */
    }

    .header-title { 
        font-size: 24px; /* Zmniejszono z 28px - agresywna redukcja dla długich słów */
        line-height: 1.3;
        word-wrap: break-word; /* Bezpiecznik: jeśli słowo nadal za długie, złam je */
        hyphens: auto; /* Automatyczne dzielenie słów jeśli przeglądarka wspiera */
        padding: 0 5px;
    }
    
    .header-subtitle { 
        font-size: 16px; 
        padding: 0 5px;
        line-height: 1.6;
        margin-top: 15px;
    }

    /* Układ przycisków w nagłówku mobilnym */
    .nav-wrapper > div:last-child {
        display: flex;
        flex-direction: column;
        align-items: center; /* Centrowanie w poziomie */
        justify-content: center;
        gap: 15px;
        width: 100%;
        padding: 0 20px;
        box-sizing: border-box;
    }

    .cta-header-button {
        display: flex; /* Zmieniono z inline-flex dla pewności */
        width: 100%; 
        max-width: 280px; 
        justify-content: center;
        text-align: center;
        margin: 0 auto !important; /* Wymuszenie centrowania */
    }

    /* Wskaźnik przewijania dla kategorii */
    .categories-filter-section {
        position: relative;
    }

    .categories-filter-section::after {
        content: "\f0a4"; /* Ikona palca z FontAwesome */
        font-family: "Font Awesome 6 Free";
        font-weight: 900;
        position: absolute;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
        background: var(--secondary-color);
        color: var(--primary-color-dark);
        width: 40px;
        height: 40px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 10px rgba(0,0,0,0.2);
        animation: hintScroll 2s infinite;
        pointer-events: none; /* Nie przeszkadza w klikaniu */
        z-index: 10;
    }

    @keyframes hintScroll {
        0% { transform: translate(0, -50%) scale(1); opacity: 0.8; }
        50% { transform: translate(-20px, -50%) scale(1.1); opacity: 1; }
        100% { transform: translate(0, -50%) scale(1); opacity: 0.8; }
    }

    /* Ukrywamy ikonę po pierwszym scrollu użytkownika (opcjonalnie w JS, tu zostaje na stałe dla uproszczenia) */

    /* Fix dla banera kalkulatora */
    .calculator-banner-card {
        padding: 20px 15px;
        display: flex;
        flex-direction: column;
        align-items: center; /* Centrowanie w osi poziomej */
        text-align: center;
    }

    .banner-action {
        width: 100%;
        display: flex;
        justify-content: center; /* Centrowanie przycisku */
        margin-top: 10px;
    }

    .calculator-banner-card .cta-header-button {
         width: auto; /* Przycisk kalkulatora dopasowany do treści */
         min-width: 200px;
    }

    /* Companies Grid */
    .companies-grid { 
        grid-template-columns: 1fr; 
        padding: 0 10px;
    }
    
    /* Horizontal Scroll dla kategorii na mobilu */
    .categories-grid { 
        flex-wrap: nowrap; 
        overflow-x: auto; 
        justify-content: flex-start;
        padding: 10px 5px 20px 5px;
        -webkit-overflow-scrolling: touch;
        gap: 10px;
        scroll-snap-type: x mandatory;
    }

    .category-filter-card {
        flex: 0 0 auto;
        padding: 10px 15px;
        gap: 8px;
        scroll-snap-align: start;
        border: 1px solid #ddd;
    }
}

/* Style dla okna modalnego */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    background-color: white;
    padding: 40px;
    border-radius: 15px;
    z-index: 1001;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active,
.modal-content.active {
    opacity: 1;
    visibility: visible;
}

.modal-content.active {
    transform: translate(-50%, -50%) scale(1);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f0f0f0;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #e0e0e0;
    transform: rotate(90deg);
}

.modal-header {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.modal-logo {
    width: 70px;
    height: 70px;
    border-radius: 12px;
    margin-right: 20px;
    object-fit: cover;
}

.modal-title h2 {
    margin: 0 0 5px 0;
    font-size: 28px;
    color: var(--primary-color-dark);
}

.modal-title p {
    margin: 0;
    color: #777;
    font-size: 16px;
}

.modal-section {
    margin-bottom: 25px;
}

.modal-section h3 {
    font-size: 20px;
    color: var(--primary-color);
    margin-bottom: 15px;
    border-left: 3px solid var(--secondary-color);
    padding-left: 10px;
}

.modal-section p {
    line-height: 1.7;
}

.modal-specializacje li {
    list-style-type: none;
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
}

.modal-specializacje i {
    color: var(--secondary-color);
    margin-right: 10px;
}

.modal-realizacje a {
    display: block;
    padding: 10px;
    margin-bottom: 8px;
    background-color: #f8f9fa;
    border-radius: 8px;
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 500;
    transition: all 0.2s ease;
}

.modal-realizacje a:hover {
    background-color: #e8f5e9;
    transform: translateX(5px);
}

.modal-footer {
    text-align: center;
    margin-top: 30px;
}
/* =================================
   STYLE DLA KARTY PREMIUM
   ================================= */

.premium-card {
    border: 3px solid var(--secondary-color);
    box-shadow: 0 8px 30px rgba(247, 164, 64, 0.3);
    position: relative;
    overflow: hidden; /* Ważne dla działania wstążki */
}

/* Wstążka "PREMIUM" w rogu */
.premium-card::before {
    content: "PREMIUM";
    position: absolute;
    top: 18px;
    right: -34px;
    background-color: var(--secondary-color);
    color: var(--primary-color-dark);
    padding: 5px 35px;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    transform: rotate(45deg);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
/* =================================
   STYLE DLA CERTYFIKATU WERYFIKACJI
   ================================= */

.verified-badge {
    display: inline-block;
    background-color: #e8f5e9;
    color: var(--primary-color-dark);
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    margin-left: 10px;
    vertical-align: middle;
}

.verified-badge .fa-check-circle {
    color: var(--primary-color);
}

.modal-verification {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #eee;
}

.verification-checklist {
    list-style-type: none;
    padding: 0;
    margin: 15px 0;
}

.verification-checklist li {
    padding: 5px 0;
}

.verification-checklist .fa-check {
    color: var(--primary-color);
    margin-right: 10px;
}

.author-quote {
    background-color: #e8f5e9;
    border-left: 4px solid var(--primary-color);
    padding: 15px;
    margin-top: 20px;
    border-radius: 0 8px 8px 0;
}

.author-quote strong {
    color: var(--primary-color-dark);
}

.author-quote p {
    margin: 5px 0 0 0;
    font-style: italic;
    color: #333;
}

/* =================================
   STYLE DLA SEKCJI PROCESU WERYFIKACJI
   ================================= */

.verification-process-section {
    padding: 80px 0;
    background-color: #ffffff; /* Czyste, białe tło dla wyróżnienia */
    border-top: 1px solid #f0f0f0;
}

.verification-steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.verification-step-card {
    text-align: center;
    padding: 20px;
}

.verification-step-card .step-icon {
    font-size: 40px;
    color: var(--primary-color);
    margin-bottom: 20px;
    display: inline-block;
    line-height: 1;
}

.verification-step-card h3 {
    font-size: 20px;
    color: var(--primary-color-dark);
    margin-bottom: 10px;
}

.verification-step-card p {
    color: #666;
    font-size: 15px;
    line-height: 1.7;
}

.verification-summary {
    text-align: center;
    margin-top: 60px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #eee;
}

.verification-summary p {
    font-size: 18px;
    font-weight: 500;
    color: var(--primary-color-dark);
    margin: 0;
}

/* =================================
   STYL DLA LINKU DO PROCESU WERYFIKACJI
   ================================= */

.verification-link {
    display: block;
    margin-top: 10px;
    font-size: 16px;
    font-weight: 500;
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.verification-link:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.verification-link .fa-arrow-right {
    transition: transform 0.3s ease;
    display: inline-block; /* Potrzebne do animacji */
}

.verification-link:hover .fa-arrow-right {
    transform: translateX(5px); /* Lekko przesuwa strzałkę w prawo po najechaniu */
}
/* =================================
   STYL DLA SEKCJI ZAPROSZENIA FIRM
   ================================= */

.join-us-section {
    background-color: var(--primary-color-dark);
    color: white;
    text-align: center;
    padding: 60px 20px;
    margin-top: 60px;
}

.join-us-section h2 {
    font-size: 32px;
    margin-bottom: 15px;
}

.join-us-section p {
    font-size: 18px;
    max-width: 700px;
    margin: 0 auto 30px auto;
    opacity: 0.9;
    line-height: 1.7;
}

.cta-button {
    background-color: var(--secondary-color);
    color: var(--primary-color-dark);
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 18px;
    display: inline-block;
    transition: all 0.3s ease;
    border: 2px solid var(--secondary-color);
}

.cta-button:hover {
    background-color: transparent;
    color: var(--secondary-color);
    transform: scale(1.05);
}
//* =================================
   NOWE STYLE DLA PASKA NAWIGACYJNEGO I PRZYCISKU
   ================================= */

/* Fix dla paska nawigacji */
.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0 40px 0;
    text-align: left;
}

.logo-area {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 0; /* Usunięto margines spychający przycisk */
}

.logo-icon {
    width: 45px;
    height: 45px;
    background-color: var(--secondary-color);
    color: var(--primary-color-dark);
    font-size: 24px;
    font-weight: 700;
    display: grid;
    place-items: center;
    border-radius: 10px;
    margin-right: 12px;
}

.logo-text {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* Nowy styl przycisku CTA w nagłówku */
.cta-header-button {
    background-color: var(--secondary-color);
    color: var(--primary-color-dark) !important;
    padding: 12px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    display: inline-flex;
    align-items: flex;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(247, 164, 64, 0.4);
    white-space: nowrap;
    border: none;
}

.cta-header-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(247, 164, 64, 0.6);
    background-color: #ffffff;
}

.header-title {
    font-size: 48px;
    font-weight: 700;
    margin: 20px 0 10px;
    text-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.header-subtitle {
    font-size: 20px;
    font-weight: 300;
    opacity: 0.9;
    max-width: 800px;
    margin: 0 auto;
}

/* =================================
   STYLE DLA PRZYCISKU I NUMERU TELEFONU W MODALU
   ================================= */

/* Ustawia przyciski w jednej linii i dodaje odstęp */
.modal-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap; /* Zapewnia responsywność */
}

/* Styl dla drugiego przycisku ("Pokaż numer") */
.company-link-secondary {
    display: inline-block;
    background-color: var(--primary-color-dark);
    color: white;
    padding: 10px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    border: 2px solid var(--primary-color-dark);
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
}

.company-link-secondary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Klasa, która ukrywa element */
.phone-number-hidden {
    display: none;
}

/* Styl dla widocznego numeru telefonu (wygląda jak przycisk) */
.phone-number-visible {
    display: inline-block;
    background-color: #e8f5e9; /* Jasne zielone tło */
    color: var(--primary-color-dark);
    padding: 10px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    border: 2px solid #e8f5e9;
    font-size: 16px;
    text-align: center;
}

/* Kompaktowy baner kalkulatora */
.calculator-promo-section {
    padding: 40px 0; /* Zmniejszono z 80px */
    background-color: #ffffff;
}

.calculator-banner-card {
    max-width: 850px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;       /* Zmniejszono odstępy */
    padding: 25px;   /* Zmniejszono z 40px */
    background-color: #f9f9f9;
    border-radius: 15px;
    border: 1px solid #eee;
}

.banner-icon {
    font-size: 32px; /* Zmniejszono z 40px */
    color: var(--secondary-color);
    margin-bottom: 5px;
}

.banner-text-wrapper h2 {
    color: var(--primary-color-dark);
    font-size: 24px; /* Zmniejszono z 32px */
    margin-bottom: 8px;
}

.banner-text-wrapper p {
    color: #555;
    font-size: 16px; /* Zmniejszono z 18px */
    line-height: 1.4;
    margin-bottom: 15px;
}

.calculator-banner-card .cta-button {
    padding: 10px 30px; /* Mniejszy przycisk */
    font-size: 16px;
    display: inline-block;
}

/* --- STYL ARTYKUŁÓW (POPRAWIONY KOLOR) --- */

.article-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 20px;
}

.article-title {
    font-size: 36px;
    line-height: 1.2;
    /* ZMIANA: Teraz pobierze kolor z Twoich ustawień głównych (zielony) */
    color: var(--primary-color); 
    margin-bottom: 20px;
    font-weight: 800;
}

.article-meta {
    font-size: 14px;
    color: #666;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.article-content {
    font-size: 18px;
    line-height: 1.8;
    color: #333;
}

.article-content h2, 
.article-content h3 {
    /* ZMIANA: Nagłówki też będą teraz pasować do tytułu */
    color: var(--primary-color);
    margin-top: 40px;
    margin-bottom: 20px;
}

.article-content ul, 
.article-content ol {
    margin-bottom: 30px;
    padding-left: 20px;
}

.article-content li {
    margin-bottom: 10px;
}

/* --- AWATARY LITEROWE (Zamiast brakującego logo) --- */
.company-logo-placeholder {
    width: 60px;
    height: 60px;
    min-width: 60px; /* Zapobiega zgniataniu */
    background-color: var(--primary-color); /* Twój zielony kolor */
    color: white;
    border-radius: 12px;
    margin-right: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Wersja dla Modala (musi być nieco większa) */
.modal-logo-placeholder {
    width: 70px;
    height: 70px;
    min-width: 70px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 12px;
    margin-right: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 700;
    text-transform: uppercase;
}