/* ==========================================================================
           1. ZMIENNE CSS (Zaktualizowana, elegancka paleta)
           ========================================================================== */
:root {
    --white: #FFFFFF;
    --dark-graphite: #0c0c0c;
    /* Głębszy, bardziej luksusowy grafit */
    
    --green-hover: #927000;
    /* Jeszcze ciemniejsza na hover */

    --primary: #ecb500;
    /*main color*/

    --bg-light: #F9F9F9;
    /* Delikatna szarość */
    --bg-warm: #F5F5F0;
    /* Bardzo jasny, elegancki, ciepły beż */
    --mid-grey: #D1D5DB;

    --body-text: #4B5563;
    /* Miękki grafit dla czytelności tekstu */

    --font-headings: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --header-height: 80px;
}

/* ==========================================================================
           2. RESET I PODSTAWY
           ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    border-radius: 0 !important;
    /* Sztywny, kanciasty styl */
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

body {
    font-family: var(--font-body);
    color: var(--body-text);
    background-color: var(--white);
    line-height: 1.7;
    font-size: 16px;
    font-weight: 400;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-headings);
    color: var(--dark-graphite);
    line-height: 1.2;
}

h1 {
    font-size: 52px;
    font-weight: 700;
    margin-bottom: 24px;
    letter-spacing: -1px;
}

h2 {
    font-size: 40px;
    font-weight: 600;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 16px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Sekcje i tła */
section {
    padding: 100px 0;
}

.bg-warm {
    background-color: var(--bg-warm);
}

.bg-dark {
    background-color: var(--dark-graphite);
    color: var(--white);
}

.bg-dark h2,
.bg-dark p.subtitle {
    color: var(--white);
}

/* Przyciski */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary);
    color: var(--white);
    font-family: var(--font-headings);
    font-size: 16px;
    font-weight: 600;
    padding: 16px 36px;
    border: 2px solid var(--primary);
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    /* Gwarantuje tekst w jednej linijce */
}

.btn:hover,
.btn:focus-visible {
    background-color: var(--green-hover);
    border-color: var(--green-hover);
    color: var(--white);
}

.btn-outline {
    background-color: transparent;
    color: var(--dark-graphite);
    border: 2px solid var(--dark-graphite);
}

.btn-outline:hover,
.btn-outline:focus-visible {
    background-color: var(--dark-graphite);
    color: var(--white);
}

/* ==========================================================================
           3. NAWIGACJA
           ========================================================================== */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: var(--dark-graphite);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 1000;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    color: var(--white);
}

.logo {
    font-family: var(--font-headings);
    font-size: 26px;
    font-weight: 700;
    color: var(--dark-graphite);
    letter-spacing: -0.5px;
}

.logo-naglowek{
    width: auto;
    height: 70px;
}

.logo-stopka{
    width: auto;
    height: 85px;
    margin-bottom: 20px;
}

.logo span {
    color: var(--primary);
}

 /* Kontener całej nawigacji */
        .nav-menu {
            display: flex;
            align-items: center;
        }

        /* Lista elementów (ul) */
        .nav-list {
            display: flex;
            list-style: none;
            gap: 40px;
            align-items: center;
            margin: 0;
            padding: 0;
        }

        .nav-link {
            font-weight: 500;
            color: var(--white);
            font-size: 15px;
            position: relative;
            padding: 8px 0;
            display: block;
        }

        @media only screen and (max-width: 860px){
            .nav-link {
                color: var(--dark-graphite);
            }
            .nav-list{
                margin: auto;
            }
        }

        .nav-link::after {
            content: '';
            position: absolute;
            width: 0;
            height: 2px;
            bottom: 0;
            left: 0;
            background-color: var(--primary);
            transition: var(--transition);
        }

        .nav-link:hover::after, .nav-link:focus-visible::after {
            width: 100%;
        }

        .nav-link.btn {
            padding: 12px 24px;
            color: var(--white);
        }
        
        .nav-link.btn::after { display: none; }

        /* Hamburger */
        .hamburger {
            display: none;
            background: none;
            border: none;
            cursor: pointer;
            padding: 10px;
            z-index: 1001; /* Zawsze klikalny, ponad wysuwanym menu */
            position: relative;
        }
        .hamburger-box { width: 30px; height: 24px; display: inline-block; position: relative; }
        .hamburger-inner, .hamburger-inner::before, .hamburger-inner::after {
            width: 100%; height: 2px; background-color: var(--white); position: absolute; transition: var(--transition);
        }
        .hamburger-inner { top: 50%; transform: translateY(-50%); }
        .hamburger-inner::before { content: ''; top: -8px; left: 0; }
        .hamburger-inner::after { content: ''; top: 8px; left: 0; }
        .hamburger.active .hamburger-inner { background-color: transparent; }
        .hamburger.active .hamburger-inner::before { transform: translateY(8px) rotate(45deg); }
        .hamburger.active .hamburger-inner::after { transform: translateY(-8px) rotate(-45deg); }

/* ==========================================================================
           4. SEKCJE GŁÓWNE
           ========================================================================== */

/* Obrazki z kanciastym offsetem (Geometryczny styl) */
.img-sharp-offset {
    position: relative;
    z-index: 1;
}

.img-sharp-offset::before {
    content: '';
    position: absolute;
    top: 30px;
    left: -30px;
    width: 100%;
    height: 100%;
    border: 2px solid var(--primary);
    z-index: -1;
}

.img-sharp-offset img {
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Hero */
.hero {
    display: flex;
    align-items: center;
    min-height: 100vh;
    padding-top: var(--header-height);
    background-color: var(--white);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.hero-img-col {
    order: 1;
}

.hero-text-col {
    order: 2;
}

.hero-img-col .img-sharp-offset img {
    aspect-ratio: 4/5;
}

.hero-text-col p {
    font-size: 18px;
    margin-bottom: 40px;
    color: var(--body-text);
}

.hero-actions {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

/* O Mnie */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 80px;
    align-items: center;
}

.about-text h3 {
    color: var(--primary);
    font-size: 20px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 24px;
}

.about-img-wrapper .img-sharp-offset::before {
    background-color: var(--primary);
    border: none;
    top: 20px;
    left: 20px;
    /* Zmiana kierunku przesunięcia */
}

.about-img-wrapper img {
    aspect-ratio: 1/1;
}

/* Kredyty (Boxy równej wysokości) */
.section-header {
    text-align: center;
    margin-bottom: 70px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.section-header h2 {
    display: inline-block;
    position: relative;
    padding-bottom: 15px;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--primary);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    align-items: stretch;
    /* Równa wysokość boxów */
}

.service-box {
    background-color: var(--white);
    padding: 50px 40px;
    border: 1px solid var(--mid-grey);
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    position: relative;
    z-index: 1;
}

.service-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-warm);
    z-index: -1;
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.4s ease;
}

.service-box:hover {
    border-color: var(--dark-graphite);
}

.service-box:hover::before {
    transform: scaleY(1);
}

.service-icon {
    font-size: 48px;
    color: var(--primary);
    margin-bottom: 30px;
}

.service-box h3 {
    font-size: 22px;
}

.service-box p {
    flex-grow: 1;
    /* Pcha zawartość, wyrównując wizualnie boxy */
    margin: 0;
}

/* Ubezpieczenia (Ciemny motyw + Foldery) */
.tabs-container {
    max-width: 1000px;
    margin: 0 auto;
}

.tab-list {
    display: flex;
    gap: 2px;
    /* Kanciaste przerwy */
}

.tab-button {
    flex: 1;
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--mid-grey);
    font-family: var(--font-headings);
    font-weight: 600;
    font-size: 18px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: none;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    top: 1px;
}

.tab-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.tab-button[aria-selected="true"] {
    background-color: var(--white);
    color: var(--dark-graphite);
    border-color: var(--white);
    border-top: 4px solid var(--primary);
    z-index: 2;
}

.tab-panel {
    display: none;
    padding: 60px;
    background-color: var(--white);
    color: var(--body-text);
    /* Powrót do ciemnego tekstu wewnątrz białego boxa */
    animation: fadeIn 0.4s ease;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.tab-panel.active {
    display: block;
}

.tab-content-flex {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.tab-text h3 {
    color: var(--dark-graphite);
    font-size: 32px;
    margin-bottom: 20px;
}

.tab-list-ul {
    list-style: none;
    margin: 20px 0 30px 0;
}

.tab-list-ul li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 12px;
    font-weight: 500;
    color: var(--dark-graphite);
}

.tab-list-ul li::before {
    content: '■';
    color: var(--primary);
    position: absolute;
    left: 0;
    top: 0;
    font-size: 12px;
}

.tab-image img {
    aspect-ratio: 4/3;
    border: 1px solid var(--mid-grey);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* FAQ (Ostre krawędzie, grube obramowania) */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 20px;
    background-color: var(--white);
    border: 1px solid var(--mid-grey);
    border-left: 4px solid var(--primary);
    transition: var(--transition);
}

.faq-item:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    border-color: var(--dark-graphite);
}

.faq-question {
    width: 100%;
    text-align: left;
    padding: 24px 30px;
    background: none;
    color: var(--dark-graphite);
    font-family: var(--font-headings);
    font-size: 18px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question i {
    transition: transform 0.3s ease;
    color: var(--primary);
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
    color: var(--dark-graphite);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.faq-answer-inner {
    padding: 0 30px 30px 30px;
    color: var(--body-text);
}

/* Kontakt */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: stretch;
}

.contact-info-card {
    background-color: var(--white);
    padding: 60px;
    border: 1px solid var(--mid-grey);
    border-top: 6px solid var(--dark-graphite);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@media only screen and (max-width: 640px){
    .contact-info-card {
        padding: 3.6rem 1.4rem;
    }
}

.contact-detail {
    display: flex;
    align-items: flex-start;
    margin-bottom: 35px;
}

.contact-detail:last-child {
    margin-bottom: 0;
}

.contact-detail i {
    font-size: 24px;
    color: var(--primary);
    width: 40px;
    margin-top: 3px;
}

.contact-detail strong {
    display: block;
    color: var(--dark-graphite);
    font-family: var(--font-headings);
    font-size: 18px;
    margin-bottom: 4px;
}

.map-container {
    width: 100%;
    height: 100%;
    min-height: 450px;
    border: 1px solid var(--mid-grey);
    position: relative;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    position: absolute;
    top: 0;
    left: 0;
    filter: grayscale(20%);
    /* Lekko stonowana mapa pasująca do eleganckiego stylu */
}

/* Stopka */
footer {
    background-color: var(--dark-graphite);
    color: var(--white);
    padding: 80px 0 30px;
    border-top: 5px solid var(--primary);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 60px;
}

.footer-about h3,
.footer-links h3,
.footer-contact h3 {
    color: var(--white);
    font-size: 22px;
    margin-bottom: 24px;
}

.footer-about p {
    color: rgba(255, 255, 255, 0.7);
    max-width: 400px;
}

.footer-links ul,
.footer-contact ul {
    list-style: none;
}

.footer-links li,
.footer-contact li {
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
}

/* ==========================================================================
           5. MEDIA QUERIES
           ========================================================================== */
@media (max-width: 1024px) {
    h1 {
        font-size: 44px;
    }

    h2 {
        font-size: 34px;
    }

    .hero-grid,
    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .hero-img-col {
        order: 2;
    }

    .hero-text-col {
        order: 1;
    }

    .hero-text-col {
        text-align: center;
    }

    .hero-actions {
        justify-content: center;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .tab-content-flex {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 36px;
    }

    section {
        padding: 70px 0;
    }

    .hamburger { display: block; }
            
    /* Prawidłowo nadpisane klasy wysuwanego menu */
    .nav-menu {
                position: fixed;
                top: var(--header-height);
                left: -100%;
                width: 100%;
                height: calc(100vh - var(--header-height));
                background-color: var(--white);
                transition: left 0.3s ease-in-out;
                border-top: 1px solid rgba(0,0,0,0.05);
                z-index: 1000;
                overflow-y: auto;
            }

    .nav-menu.active { 
                left: 0; 
            }

    .nav-list {
                display: flex;
                flex-direction: column;
                justify-content: center;
                min-height: 100%;
                gap: 30px;
                padding: 40px 20px;
            }

    .nav-link { font-size: 20px; text-align: center; }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .tab-list {
        flex-direction: column;
        gap: 0;
    }

    .tab-button {
        width: 100%;
        text-align: left;
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-bottom: none;
    }

    .tab-button:last-child {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .tab-button[aria-selected="true"] {
        border-left: 6px solid var(--primary);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .tab-panel {
        padding: 30px 20px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .img-sharp-offset::before {
        display: none;
    }

    .hero {
        margin-top: 40px;
    }

    /* Na mobile wyłączamy offsety dla czytelności i miejsca */
}