/* ======================================
   PODSTAWOWE STYLE GLOBALNE
====================================== */
html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}


/* ======================================
   PRZYCISKI I STANY INTERAKCJI
====================================== */
.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}


/* ======================================
   WALIDACJA FORMULARZY
====================================== */
.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}


/* ======================================
   STRUKTURA STRONY / GŁÓWNY LAYOUT
====================================== */
.content {
    padding-top: 1.1rem;
}

.main-layout-content {
    padding-bottom: 180px; /* Miejsce na cookie-banner */
}


/* ======================================
   STRONA: MAINLAYOUT
====================================== */

/* Cały layout strony */
.page-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #202A36;
}

/* Główna zawartość (między headerem a footerem) */
.main-layout-content {
    flex: 1;
    padding: 1rem 1rem 2rem 1rem;
    box-sizing: border-box;
}

/* Kontener treści strony */
.content {
    max-width: 1200px;
    margin: 0 auto;
    color: #fff;
}



/* ======================================
   STRONA: HEADER
====================================== */

/* Kontener całego nagłówka */
.header-container {
    background-color: #181F27;
    border-bottom: 1px solid #D5B169;
    padding: 0.5rem 1rem;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    z-index: 1001;
}

/* Wewnętrzna siatka nagłówka */
.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Logo */
.header-logo .logo-img {
    max-height: 48px;
    width: auto;
    object-fit: contain;
}

/* Nawigacja na desktopie */
.nav-desktop {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: #D5B169;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    transition: color 0.3s ease;
    border-radius: 6px;
}

    .nav-link.active {
        border-bottom: 2px solid #D5B169;
        box-shadow: 0 2px 4px rgba(213, 177, 105, 0.4);
    }

    .nav-link:hover {
        color: #1b6ec2;
    }

/* Przycisk hamburger (widoczny tylko mobilnie) */
.hamburger-button {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #D5B169;
}


/* Menu mobilne (dynamicznie wstawiane przez Blazor) */
.nav-mobile {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* Responsywność */
@media (max-width: 768px) {
    .nav-desktop {
        display: none;
    }

    .hamburger-button {
        display: block;
    }
}

/* ======================================
   STRONA: FOOTER
====================================== */

.footer-clean {
    background-color: #181F27;
    color: #D5B169;
    border-top: 1px solid #D5B169;
    padding: 1.5rem 1rem 0.5rem 1rem;
    font-size: 0.9rem;
    box-sizing: border-box;
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto;
}

.footer-column {
    flex: 1 1 150px;
    max-width: 160px;
}

.footer-logo-column {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 140px;
}

.footer-logo {
    max-height: 100px;
    width: auto;
    object-fit: contain;
}

.footer-column h4 {
    margin-bottom: 0.5rem;
    font-size: 1rem;
    color: #f1d28c;
    font-weight: bold; /* pogrubienie */
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column li {
    margin: 0.3rem 0;
}

.footer-link {
    color: #D5B169;
    text-decoration: none;
    transition: color 0.3s ease;
}

    .footer-link:hover {
        color: #1b6ec2;
    }

.footer-bottom-row {
    border-top: 1px solid #D5B169;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    color: #D5B169;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.footer-left,
.footer-right {
    flex: 1 1 auto;
}

.footer-right {
    text-align: right;
}

/* Responsywność */
@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-column {
        width: 100%;
        max-width: 100%;
    }

    .footer-right {
        text-align: center;
    }
}



/* ======================================
   COOKIE BANNER
====================================== */
.cookie-banner {
    position: fixed;
    bottom: 0;
    width: 100%;
    background: #202A36;
    color: #D5B169;
    padding: 1rem;
    z-index: 10000;
    box-shadow: 0 -2px 6px rgba(0,0,0,0.2);
    text-align: center;
}

.cookie-consent-options label {
    display: block;
    margin: 0.5rem 0;
}

.cookie-buttons {
    margin-top: 1rem;
}

    .cookie-buttons button {
        margin: 0 0.5rem;
        padding: 0.5rem 1rem;
        background: #D5B169;
        border: none;
        color: #202A36;
        border-radius: 5px;
        font-weight: bold;
        cursor: pointer;
    }

.cookie-link {
    color: #D5B169;
    font-weight: bold;
    text-decoration: underline;
}

    .cookie-link:hover {
        color: #f1d28c;
    }

.cookie-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    pointer-events: all; /* blokuje kliknięcia, ale nie scroll */
}


/* ======================================
   STRONA: POLITYKA PRYWATNOŚCI
====================================== */
.policy-wrapper {
    background-color: #202A36;
    color: #D5B169;
    padding: 2rem;
    max-width: 960px;
    margin: 0 auto;
    line-height: 1.7;
    font-size: 1.05rem;
}

    .policy-wrapper h1,
    .policy-wrapper h2,
    .policy-wrapper h3 {
        color: #f1d28c;
        margin-top: 2rem;
    }

    .policy-wrapper a {
        color: #f1d28c;
        font-weight: bold;
        text-decoration: underline;
    }

        .policy-wrapper a:hover {
            color: #ffffff;
        }


/* ======================================
   KOMPONENT BŁĘDU BLAZORA
====================================== */
#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,... /* skrócone */ ) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred.";
    }


/* ======================================
   WSKAŹNIK ŁADOWANIA (LOADER)
====================================== */
.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }


/* ======================================
   INNE
====================================== */
code {
    color: #c02d76;
}

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* ======================================
   STRUKTURA: TREŚĆ PODSTRON
====================================== */

.page-text-wrapper {
    max-width: 720px;
    margin: 0 auto;
    padding: 2rem 1rem;
    color: #ffffff;
    font-size: 1.1rem;
    line-height: 1.7;
    text-align: left;
    box-sizing: border-box;
}

    /* Element obrazka nad nagłówkiem */
    .page-text-wrapper .page-image {
        display: block;
        margin: 0 auto 1.5rem auto;
        max-height: 150px;
        width: auto;
        object-fit: contain;
    }

    /* Nagłówki */
    .page-text-wrapper h1 {
        color: #D5B169; /* taki sam kolor jak w header */
        font-weight: bold;
        margin-top: 0.5rem;
        margin-bottom: 1rem;
        line-height: 1.2;
        text-align: center;
    }

    .page-text-wrapper h2 {
        color: #D5B169; /* taki sam kolor jak w header */
        margin-top: 1.5rem;
        margin-bottom: 1rem;
        line-height: 1.2;
        text-align: center;
    }

    /* Tekst akapitowy */
    .page-text-wrapper p {
        color: #ffffff;
        margin-bottom: 1rem;
        text-align: center;
    }

    /* Linki */
    .page-text-wrapper a {
        color: #f1d28c;
        font-weight: bold;
        text-decoration: underline;
    }

        .page-text-wrapper a:hover {
            color: #ffffff;
        }

.cta-button {
    display: inline-block;
    margin-top: 2rem;
    margin-bottom: 0.5rem;
    align-self: center;
    background-color: #D5B169;
    color: #202A36;
    font-weight: bold;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    transition: background-color 0.3s ease;
    cursor: pointer;
    font-size: 1.1rem;
}

    .cta-button:hover {
        background-color: #f1d28c;
    }

/* Grid kafelkowy sekcji usług – rozszerzenie page-text-wrapper */
.uslugi-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* domyślnie 3 kolumny */
    gap: 1.5rem;
    margin-top: 2rem;
    justify-items: center; /* wyśrodkowanie elementów w komórkach */
}

@media (max-width: 1024px) {
    .uslugi-grid {
        grid-template-columns: repeat(2, 1fr); /* tablety */
    }
}

@media (max-width: 600px) {
    .uslugi-grid {
        grid-template-columns: 1fr; /* telefony */
    }
}


.uslugi-box {
    width: 100%;
    max-width: 280px; /* delikatnie zmniejszona szerokość */
    aspect-ratio: 1 / 1; /* zbliżona proporcja do kwadratu */
    background-color: #181F27;
    padding: 1rem; /* mniej pionowego paddingu */
    border-radius: 8px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #D5B169;
    box-shadow: 0 0 4px rgba(213, 177, 105, 0.15); /* delikatna poświata */
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}

.page-text-wrapper .uslugi-box {
    color: inherit !important;
    font-weight: normal !important;
    text-decoration: none !important;
}

    .page-text-wrapper .uslugi-box h2,
    .page-text-wrapper .uslugi-box p {
        font-weight: normal !important;
        text-decoration: none !important;
    }


    .uslugi-box:hover {
        transform: scale(1.04);
        background-color: #1f2b39; /* delikatnie jaśniejsze tło */
        box-shadow: 0 0 12px rgba(213, 177, 105, 0.4); /* intensywniejsza poświata */
        border-color: #f1d28c; /* jaśniejszy wariant koloru headera */
    }

    .uslugi-box h2 {
        font-size: 1.1rem;
        margin: 0 0 0.5rem 0; 
        line-height: 1.3;
    }


    .uslugi-box p {
        font-size: 0.95rem;
        line-height: 1.4;
        margin: 0;
    }

/* ======================================
   KOMPONENT: CTA CENTERED
====================================== */
.cta-center {
    display: block;
    margin: 2rem auto 0 auto;
}

/* ======================================
   SEKCJA: FAQ (Rozwijane pytania)
====================================== */
.faq-item {
    margin-bottom: 1rem;
    border-bottom: 1px solid #ddd;
    padding-bottom: 0.5rem;
}

.faq-toggle {
    display: none;
}

.faq-question {
    display: block;
    font-weight: bold;
    cursor: pointer;
    padding: 0.5rem 0;
    transition: color 0.2s ease;
}

    .faq-question:hover {
        color: #0071c1;
    }

.faq-answer {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    padding-left: 0.5rem;
}

.faq-toggle:checked + .faq-question + .faq-answer {
    max-height: 1000px;
    opacity: 1;
    margin-top: 0.5rem;
}

/* ======================================
   STRONA: KONTAKT
====================================== */

.contact-wrapper {
    max-width: 720px;
    margin: 0 auto;
    padding: 2rem 1rem;
    color: #ffffff;
    font-size: 1.1rem;
    line-height: 1.7;
    box-sizing: border-box;
    text-align: center;
}

    .contact-wrapper h1 {
        color: #D5B169;
        font-weight: bold;
        margin-bottom: 1rem;
    }

    .contact-wrapper p {
        margin-bottom: 1.5rem;
    }

.contact-info {
    margin-top: 1.5rem;
}

    .contact-info p {
        margin-bottom: 1rem;
    }

    .contact-info a {
        color: #f1d28c;
        font-weight: bold;
        text-decoration: underline;
    }

        .contact-info a:hover {
            color: #ffffff;
        }
