/* --- CZCIONKI LOKALNE --- */
@font-face {
    font-family: 'Lato';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('fonts/lato-300.woff2') format('woff2');
}
@font-face {
    font-family: 'Lato';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/lato-regular.woff2') format('woff2');
}
@font-face {
    font-family: 'Lato';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('fonts/lato-700.woff2') format('woff2');
}
@font-face {
    font-family: 'Playfair Display';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/playfair-regular.woff2') format('woff2');
}
@font-face {
    font-family: 'Playfair Display';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('fonts/playfair-600.woff2') format('woff2');
}

:root {
    --color-gold: #c3935b;
    --color-text: #e5dfd8;
    --color-bg-dark: #140f0a;
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Lato', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--color-bg-dark);
    color: var(--color-text);
    font-family: var(--font-sans);
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

/* --- GŁÓWNY UKŁAD STRONY (LAYOUT) --- */
.page-wrapper {
    position: relative;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    padding: 8vh 8vw;
}

/* Dedykowane tła dla podstron */
.bg-home { background-image: linear-gradient(to right, rgba(20, 15, 10, 0.8) 10%, rgba(20, 15, 10, 0) 80%), url('Photos/1.webp'); }
.bg-nieruchomosci { background-image: linear-gradient(to right, rgba(20, 15, 10, 0.9) 0%, rgba(20, 15, 10, 0.6) 40%, rgba(20, 15, 10, 0) 80%), url('Photos/2.webp'); }
.bg-transakcje { background-image: linear-gradient(to right, rgba(20, 15, 10, 0.95) 0%, rgba(20, 15, 10, 0.6) 45%, rgba(20, 15, 10, 0) 80%), url('Photos/3.webp'); }
.bg-zabytki { background-image: linear-gradient(to right, rgba(20, 15, 10, 0.95) 0%, rgba(20, 15, 10, 0.7) 40%, rgba(20, 15, 10, 0) 80%), url('Photos/4.webp'); }
.bg-okancelarii { background-image: linear-gradient(to right, rgba(20, 15, 10, 0.95) 0%, rgba(20, 15, 10, 0.85) 35%, rgba(20, 15, 10, 0) 70%), url('Photos/5.webp'); }
.bg-miedzynarodowe { background-image: linear-gradient(to right, rgba(20, 15, 10, 0.9) 0%, rgba(20, 15, 10, 0.6) 40%, rgba(20, 15, 10, 0) 80%), url('Photos/6.webp'); }
.bg-polityka { background-image: linear-gradient(to right, rgba(20, 15, 10, 0.98) 0%, rgba(20, 15, 10, 0.9) 100%), url('Photos/1.webp'); } /* Ciemne tło dla czytelności tekstu */

/* --- NAGŁÓWEK (HEADER) --- */
.header {
    display: flex;
    align-items: center;
    gap: 30px;
    flex-shrink: 0;
    margin-bottom: 2vh;
}

.logo {
    font-family: var(--font-serif);
    font-size: 3.5rem;
    font-weight: 600;
    color: var(--color-gold);
    letter-spacing: 0.05em;
    line-height: 0.8;
    text-decoration: none;
}

.header-divider {
    width: 1px;
    height: 60px;
    background-color: rgba(195, 147, 91, 0.3);
}

.header-info {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.35em;
    color: rgba(229, 223, 216, 0.6);
    line-height: 1.8;
}

/* --- GŁÓWNA TREŚĆ STRONY (MAIN CONTENT) --- */
.content {
    margin-top: auto;
    margin-bottom: auto;
    overflow-y: auto;
    padding-right: 15px;
    scrollbar-width: thin;
    scrollbar-color: rgba(195, 147, 91, 0.5) transparent;
    scrollbar-color: #c3935b rgba(195, 147, 91, 0.1);
    min-height: 0; 
}

.content::-webkit-scrollbar { width: 4px; }
.content::-webkit-scrollbar-track { background: transparent; }
.content::-webkit-scrollbar-thumb { background-color: rgba(195, 147, 91, 0.5); border-radius: 4px; }
.content::-webkit-scrollbar { width: 6px; } /* Poszerzenie suwaka z 4px na 6px */
.content::-webkit-scrollbar-track { background: rgba(195, 147, 91, 0.1); border-radius: 4px; } 
.content::-webkit-scrollbar-thumb { background-color: #c3935b; border-radius: 4px; } 

/* Dedykowane modyfikatory szerokości i układu */
.content-home { max-width: 900px; }
.content-nieruchomosci { max-width: 600px; }
.content-transakcje { max-width: 650px; }
.content-zabytki { max-width: 750px; }
.content-miedzynarodowe { max-width: 650px; }
.content-okancelarii {
    max-width: 550px;
    margin-bottom: 4vh;
    min-height: 0;
    padding-right: 20px;
    padding-bottom: 2vh;
}
.content-polityka {
    max-width: 800px;
    margin-bottom: 4vh;
    min-height: 0;
    padding-right: 20px;
    padding-bottom: 2vh;
}

/* --- TYPOGRAFIA (NAGŁÓWKI I TEKST) --- */
.page-title {
    font-family: var(--font-serif);
    font-size: clamp(3rem, 5vw, 4.8rem);
    font-weight: 400;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--color-text);
}

.main-title {
    font-family: var(--font-serif);
    font-size: clamp(3.2rem, 6vw, 5.5rem);
    font-weight: 400;
    line-height: 1.1;
    margin-bottom: 2rem;
    color: var(--color-text);
}

.sub-tagline {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.45em;
    color: var(--color-gold);
    font-weight: 400;
}

.subtitle {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 3vw, 2.5rem);
    font-weight: 400;
    line-height: 1.2;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    color: var(--color-text);
}

.title-separator {
    width: 60px;
    height: 1px;
    background-color: rgba(195, 147, 91, 0.6);
    margin-bottom: 2rem;
}

.description {
    font-size: 0.95rem;
    line-height: 1.9;
    color: rgba(229, 223, 216, 0.85);
    font-weight: 300;
}

.description p {
    margin-bottom: 1.5rem;
    text-align: justify;
    hyphens: auto;
}

.description-okancelarii {
    font-size: 0.85rem;
}

.policy-heading {
    font-family: var(--font-sans);
    font-size: 1rem;
    color: var(--color-gold);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* --- NAWIGACJA DOLNA (FOOTER NAV) --- */
.footer-nav {
    display: flex;
    align-items: stretch;
    gap: 0;
    margin-top: auto;
    margin-bottom: 5vh;
}

.nav-item {
    padding: 0 35px;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: rgba(229, 223, 216, 0.6);
    text-decoration: none;
    line-height: 1.6;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    min-width: max-content;
}

.nav-item:not(:first-child) {
    border-left: 1px solid rgba(195, 147, 91, 0.4);
}

.nav-item:first-child {
    padding-left: 0;
}

.nav-item:hover,
.nav-item.active {
    color: var(--color-gold);
}

/* --- STOPKA (SITE FOOTER) --- */
.site-footer {
    position: absolute;
    bottom: 2vh;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 0.55rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(229, 223, 216, 0.3);
}

.site-footer a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.site-footer a:hover {
    color: var(--color-gold);
}

/* Dodatkowe style dla danych kontaktowych w stopce */
.footer-contact {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 12px;
    margin-bottom: 6px;
    color: rgba(229, 223, 216, 0.55);
}

.footer-contact .separator {
    color: rgba(195, 147, 91, 0.4);
}

.footer-contact .highlight {
    color: var(--color-gold);
}

/* --- WERSJE RESPONSYWNE (MEDIA QUERIES) --- */
@media (max-width: 1024px) {
    .footer-nav {
        flex-wrap: wrap;
        gap: 20px;
        padding-bottom: 0;
    }
    .nav-item:not(:first-child) {
        border-left: none;
    }
    .nav-item {
        padding: 0 10px;
        min-width: auto;
    }
}

@media (max-width: 768px) {
    .page-wrapper {
        padding: 5vh 6vw;
        background-position: right top;
    }

    /* Zmodyfikowane mobilne gradienty/tła dla czytelności */
    .bg-home { 
        background-image: linear-gradient(to right, rgba(20, 15, 10, 0.8) 0%, rgba(20, 15, 10, 0.2) 100%), url('Photos/1-tel.webp'); 
    }
    .bg-nieruchomosci { background-image: linear-gradient(to right, rgba(20, 15, 10, 0.85) 0%, rgba(20, 15, 10, 0.4) 100%), url('Photos/2.webp'); }
    .bg-transakcje { background-image: linear-gradient(to right, rgba(20, 15, 10, 0.85) 0%, rgba(20, 15, 10, 0.4) 100%), url('Photos/3.webp'); }
    .bg-zabytki { background-image: linear-gradient(to right, rgba(20, 15, 10, 0.85) 0%, rgba(20, 15, 10, 0.5) 100%), url('Photos/4.webp'); }
    .bg-okancelarii { 
        background-image: linear-gradient(to bottom, rgba(20, 15, 10, 0.85) 0%, rgba(20, 15, 10, 0.5) 100%), url('Photos/5.webp'); 
        background-position: 75% top; /* Przesunięcie kadru tła w lewo */
    }
    .bg-miedzynarodowe { 
        background-image: linear-gradient(to right, rgba(20, 15, 10, 0.85) 0%, rgba(20, 15, 10, 0.4) 100%), url('Photos/6.webp'); 
        background-position: 65% top; /* Kadr cofnięty nieco bardziej do środka */
    }
    .bg-polityka { background-image: linear-gradient(to bottom, rgba(20, 15, 10, 0.9) 0%, rgba(20, 15, 10, 0.6) 100%), url('Photos/1-tel.webp'); }

    .header-divider {
        height: 40px;
    }

    .header-info {
        font-size: 0.55rem;
        letter-spacing: 0.2em;
    }
    
    .header {
        margin-bottom: 3vh;
        gap: 15px;
    }
    
    .logo {
        font-size: 2.4rem; /* Zmniejszenie logo na telefonach, by zmieścić napis obok */
    }

    .main-title {
        font-size: clamp(2.5rem, 10vw, 3.2rem); /* Dynamiczna wielkość dla bardzo wąskich ekranów */
    }
    
    .sub-tagline {
        font-size: 0.7rem;
        letter-spacing: 0.3em;
        line-height: 1.5;
    }

    .page-title {
        font-size: clamp(2.2rem, 9vw, 3rem); /* Zabezpiecza długie wyrazy przed połamaniem linii */
        margin-bottom: 1.5rem;
    }

    .content {
        padding-bottom: 5vh;
        max-height: 55vh; /* Wymuszenie mniejszego boxu z tekstem na ekranach smartfonów */
        max-height: 55dvh; /* Użycie dynamicznych jednostek dla nowszych telefonów */
    }

    .content-home {
        margin-bottom: 3rem;
        padding-bottom: 0;
    }

    .content-okancelarii {
        max-width: 100%;
        padding-right: 10px;
    }
    .content-polityka {
        max-width: 100%;
        padding-right: 10px;
    }

    .footer-nav {
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        justify-content: flex-start;
        margin-bottom: 4vh; 
        -webkit-overflow-scrolling: touch; 
        scrollbar-width: none; 
        
        /* Wizualna wskazówka (zanikanie krawędzi), sugerująca możliwość swipe'owania */
        -webkit-mask-image: linear-gradient(to right, black 75%, transparent 100%);
        mask-image: linear-gradient(to right, black 75%, transparent 100%);
    }
    .footer-nav::-webkit-scrollbar {
        display: none;
    }
    
    /* Niewidzialny blok na końcu, pozwalający ostatniemu elementowi na wyjechanie z cienia */
    .footer-nav::after {
        content: "";
        min-width: 15vw;
        display: block;
    }

    .nav-item {
        padding: 0 15px;
        font-size: 0.7rem;
        white-space: nowrap; /* Zabezpiecza przed łamaniem tekstu na wiele linii w linkach */
    }

    .nav-item:not(:first-child) {
        border-left: 1px solid rgba(195, 147, 91, 0.4);
    }

    .nav-item br {
        display: none;
    }

    .site-footer {
        font-size: 0.5rem;
        bottom: 1.5vh;
    }

    .footer-contact {
        flex-direction: column;
        gap: 3px;
        margin-bottom: 6px;
    }

    .footer-contact .separator {
        display: none;
    }
}