/* Reset i podstawowe style */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --granatowy: #2c3e50;
    --granatowy-sredni: #3a526a;
    --granatowy-jasny: #4a6580;
    --niebieski-stalowy: #5d7a9c;
    --niebieski-jasny: #7a96b5;
    --stalowy: #8a9eb3;
    --stalowy-jasny: #a8b8c9;
    --tlo: #f5f7fa;
    --tekst: #1a1a1a;
    --tekst-jasny: #4d4d4d;
    --bialy: #ffffff;
    --ramka: #d1d9e6;
    /* NOWY KOLOR AKCENTOWY - złoty */
    --zloto: #c5a059;
    --zloto-ciemny: #a88645;
    --zloto-jasny: #d4b67a;
}

/* FONT MERRIWEATHER - LOKALNY, latin_latin-ext */
@font-face {
  font-display: swap;
  font-family: 'Merriweather';
  font-style: normal;
  font-weight: 400;
  src: url('/fonts/merriweather-v33-latin-regular.woff2') format('woff2');
}

@font-face {
  font-display: swap;
  font-family: 'Merriweather';
  font-style: normal;
  font-weight: 700;
  src: url('/fonts/merriweather-v33-latin-700.woff2') format('woff2');
}

/* Italic nie są preloadowane, ale dostępne jeśli potrzebne */
@font-face {
  font-display: swap;
  font-family: 'Merriweather';
  font-style: italic;
  font-weight: 700;
  src: url('/fonts/merriweather-v33-latin_latin-ext-600italic.woff2') format('woff2');
}

@font-face {
  font-display: swap;
  font-family: 'Merriweather';
  font-style: italic;
  font-weight: 700;
  src: url('/fonts/merriweather-v33-latin_latin-ext-700italic.woff2') format('woff2');
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Merriweather', serif;
    font-weight: 400;
    line-height: 1.6;
    color: var(--tekst);
    background-color: var(--tlo);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ZWIĘKSZENIE CZYTELNOŚCI - desktop ≥ 992px */
@media (min-width: 992px) {
    body {
        font-size: 17px;
        line-height: 1.65;
    }
    
    .lista li {
        font-size: 17px;
    }
    
    .lead {
        font-size: 1.125rem;
    }
}

/* Nagłówek */
header {
    background-color: var(--granatowy);
    color: var(--bialy);
    padding: 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

.header-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    text-decoration: none;
    color: var(--bialy);
}

.logo-symbol {
    font-size: 3rem;
    font-weight: 700;
    background-color: var(--granatowy-sredni);
    width: 4rem;
    height: 4rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-nazwa {
    font-size: 1.5rem;
    font-weight: 700;
}

.logo-tagline {
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--stalowy-jasny);
}

.kontakt-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 0.5rem;
}

.kontakt-item {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

.kontakt-ikona {
    margin-right: 0.5rem;
    color: var(--stalowy-jasny);
}

/* Nawigacja */
nav {
    background-color: var(--granatowy-sredni);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    justify-content: center;
    flex-wrap: wrap;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: block;
    padding: 1rem 1.25rem;
    color: var(--bialy);
    text-decoration: none;
    font-weight: 700;
    transition: background-color 0.3s;
    font-variant: small-caps;
    font-size: 1.05rem;
}

.nav-link:hover,
.nav-link.active {
    background-color: var(--granatowy);
}

/* ULEPSZONE BREADCRUMBS - pełna szerokość, wyrównane z zawartością */
.breadcrumbs {
    background-color: var(--bialy);
    border-bottom: 1px solid var(--ramka);
    padding: 0.75rem 0;
    width: 100%;
}

.breadcrumbs-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.breadcrumbs-list {
    display: flex;
    list-style: none;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
}

.breadcrumbs-item {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
}

.breadcrumbs-item:not(:last-child)::after {
    content: "/";
    margin: 0 0.5rem;
    color: var(--stalowy);
}

.breadcrumbs-link {
    color: var(--granatowy-sredni);
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumbs-link:hover {
    text-decoration: underline;
    color: var(--granatowy);
}

.breadcrumbs-current {
    color: var(--tekst-jasny);
    font-weight: 500;
}

/* Główna zawartość */
main {
    display: flex;
    max-width: 1200px;
    margin: 1.5rem auto;
    width: 100%;
    padding: 0 1rem;
    flex: 1;
}

/* Sidebar z menu usług - TYLKO dla stron usług */
.sidebar {
    width: 280px;
    flex-shrink: 0;
    margin-right: 2rem;
}

/* Sticky sidebar tylko na desktopach ≥ 1200px */
@media (min-width: 1200px) {
    .sidebar {
        position: sticky;
        top: 100px;
        align-self: flex-start;
    }
}

/* Zawartość główna - z sidebarem */
.content {
    flex: 1;
    background-color: var(--bialy);
    border-radius: 6px;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Zawartość główna - BEZ sidebara (fullwidth) */
.content.fullwidth {
    flex: 0 0 100%;
    max-width: 100%;
}

.menu-uslug {
    background-color: var(--bialy);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.menu-tytul {
    background-color: var(--granatowy);
    color: var(--bialy);
    padding: 1rem 1.25rem;
    font-weight: 700;
    font-size: 1.125rem;
}

.menu-lista {
    list-style: none;
}

.menu-item {
    border-bottom: 1px solid var(--ramka);
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-link {
    display: block;
    padding: 1rem 1.25rem;
    color: var(--tekst);
    text-decoration: none;
    transition: all 0.3s;
    position: relative;
    font-weight: 700;
    border: none;
    background: none;
    text-align: left;
    width: 100%;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
}

.menu-link:hover,
.menu-link.active {
    background-color: #f0f4f9;
    color: var(--granatowy-sredni);
}

/* WZMOCNIENIE AKTYWNEGO LINKU W SIDEBARZE */
.menu-link.active {
    border-left: 5px solid var(--granatowy-sredni);
    padding-left: calc(1.25rem - 5px);
    background-color: #f0f4f9;
}

/* WZMOCNIENIE AKTYWNEJ CAŁEJ GAŁĘZI */
.menu-item.active-parent {
    background-color: #f0f4f9;
    border-left: 3px solid var(--granatowy-sredni);
}

.submenu {
    display: none;
    background-color: #f8fafc;
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.submenu.show {
    display: block;
}

.submenu .menu-link {
    padding-left: 2.5rem;
    font-weight: 400;
    font-size: 0.95rem;
}

.submenu .menu-link.active {
    padding-left: calc(2.5rem - 5px);
    background-color: #e8edf5;
    color: var(--granatowy-sredni);
    font-weight: 700;
    border-left: 5px solid var(--zloto);
}

.kontakt-sidebar {
    background-color: var(--bialy);
    border-radius: 6px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.kontakt-sidebar h3 {
    color: var(--granatowy);
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.kontakt-sidebar p {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--tekst-jasny);
}

/* Typografia */
h1, h2, h3, h4, h5, h6 {
    color: var(--granatowy);
    line-height: 1.3;
    margin-bottom: 1rem;
    font-weight: 700;
}

h1 {
    font-size: 2rem;
    margin-top: 0.5rem;
    border-bottom: 2px solid var(--ramka);
    padding-bottom: 0.5rem;
}

h2 {
    font-size: 1.5rem;
    margin-top: 2rem;
}

h3 {
    font-size: 1.25rem;
    margin-top: 1.5rem;
}

h4 {
    font-size: 1.125rem;
}

h5 {
    font-size: 1rem;
}

h6 {
    font-size: 0.875rem;
}

p {
    margin-bottom: 1rem;
}

.lead {
    font-size: 1.125rem;
    color: var(--tekst-jasny);
    margin-bottom: 1.5rem;
}

/* Inne elementy typografii */
blockquote {
    border-left: 4px solid var(--granatowy-sredni);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--tekst-jasny);
}

.cytat-zrodlo {
    display: block;
    margin-top: 0.5rem;
    text-align: right;
    font-size: 0.875rem;
    color: var(--stalowy);
}

.kod {
    background-color: #f5f7fa;
    border: 1px solid var(--ramka);
    border-left: 4px solid var(--stalowy);
    border-radius: 4px;
    padding: 1rem;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    margin: 1rem 0;
    overflow-x: auto;
}

.zrodlo-prawa {
    background-color: #f8f9fa;
    border: 1px solid var(--ramka);
    border-left: 4px solid var(--stalowy);
    padding: 1rem;
    margin: 1.5rem 0;
}

.zrodlo-tytul {
    font-weight: 700;
    color: var(--stalowy);
    margin-bottom: 0.5rem;
}

.lista {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.lista li {
    margin-bottom: 0.5rem;
}

hr {
    border: none;
    border-top: 1px solid var(--ramka);
    margin: 2rem 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

table th, table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--ramka);
}

table th {
    background-color: #f9fafb;
    font-weight: 700;
    color: var(--granatowy);
}

/* HIERARCHIA CTA - PRIMARY vs SECONDARY */
.przycisk {
    display: inline-block;
    background-color: var(--zloto);
    color: var(--granatowy);
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(197, 160, 89, 0.2);
}

.przycisk:hover {
    background-color: var(--zloto-ciemny);
    color: var(--granatowy);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(197, 160, 89, 0.3);
}

.przycisk-secondary {
    background-color: transparent;
    border: 2px solid var(--zloto);
    color: var(--zloto);
    box-shadow: none;
}

.przycisk-secondary:hover {
    background-color: var(--zloto);
    color: var(--bialy);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(197, 160, 89, 0.3);
}

.przycisk:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(197, 160, 89, 0.2);
}

/* Stopka - 3 kolumny 40/30/30 */
footer {
    background-color: var(--granatowy);
    color: var(--bialy);
    padding: 2.5rem 1rem 1.5rem;
    margin-top: 3rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 40% 30% 30%;
    gap: 2.5rem;
    align-items: start;
}

.footer-col-opis {
    padding-right: 1.5rem;
}

.footer-col-opis p {
    margin-bottom: 1rem;
    color: var(--stalowy-jasny);
    line-height: 1.5;
    font-size: 0.95rem;
}

.footer-dane {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-dane p {
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.footer-dane strong {
    color: var(--bialy);
    font-weight: 700;
}

.footer-kontakt-mini {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-kontakt-mini p {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Kolumny z linkami */
.footer-col-uslugi ul,
.footer-col-informacje ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col-uslugi li,
.footer-col-informacje li {
    margin-bottom: 0.75rem;
}

.footer-col-uslugi a,
.footer-col-informacje a {
    color: var(--stalowy-jasny);
    text-decoration: none;
    transition: color 0.3s, padding-left 0.3s;
    display: block;
    padding: 0.25rem 0;
    font-size: 0.95rem;
    line-height: 1.4;
}

.footer-col-uslugi a:hover,
.footer-col-informacje a:hover {
    color: var(--bialy);
    padding-left: 0.5rem;
}

.copyright {
    background-color: #1a2530;
    color: var(--stalowy-jasny);
    text-align: center;
    padding: 1rem;
    font-size: 0.875rem;
}

/* Responsywność */
@media (max-width: 1200px) {
    main {
        max-width: 100%;
    }
}

@media (max-width: 992px) {
    main {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        margin-right: 0;
        margin-bottom: 1.5rem;
    }
    
    .menu-uslug {
        margin-bottom: 1rem;
    }
    
    .content.fullwidth {
        flex: 1;
    }
    
    .footer-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .footer-col-opis {
        grid-column: span 2;
        padding-right: 0;
    }
    
    body {
        font-size: 16px;
    }
    
    .lista li {
        font-size: 16px;
    }
}

@media (max-width: 768px) {
    header {
        padding: 1rem;
    }
    
    .header-container {
        flex-direction: column;
        text-align: center;
    }
    
    .kontakt-header {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    
    .nav-container {
        padding: 0;
    }
    
    .nav-menu {
        flex-direction: column;
        display: none;
    }
    
    .nav-menu.show {
        display: flex;
    }
    
    .nav-link {
        padding: 0.75rem 1rem;
        text-align: center;
    }
    
    .content {
        padding: 1.5rem;
    }
    
    .content.fullwidth {
        padding: 1.5rem;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-col-opis {
        grid-column: span 1;
    }
    
    .przycisk {
        padding: 0.65rem 1.25rem;
        font-size: 0.95rem;
    }
}

/* Elementy dla wydajności */
img {
    max-width: 100%;
    height: auto;
}

.lazy-load {
    opacity: 0;
    transition: opacity 0.3s;
}

.lazy-loaded {
    opacity: 1;
}

/* Przykładowe elementy wizualne */
.hero {
    background-color: #f0f4f9;
    border-radius: 6px;
    padding: 2rem;
    margin-bottom: 2rem;
    border-left: 4px solid var(--granatowy-sredni);
}

.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.alert-info {
    background-color: #e8edf5;
    border-left: 4px solid var(--granatowy-sredni);
    color: var(--granatowy);
}

.tag {
    display: inline-block;
    background-color: #e5e7eb;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.875rem;
    color: var(--tekst-jasny);
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.usluga-item {
    padding: 1.5rem;
    border-bottom: 1px solid var(--ramka);
}

.usluga-item:last-child {
    border-bottom: none;
}


.page-layout {
    display: block;
}

.page-layout.has-sidebar {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
}

.page-layout.fullwidth {
    max-width: 100%;
}

.sidebar {
    background: #f6f6f6;
    padding: 1.5rem;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-label {
    font-weight: 700;
    margin-bottom: .5rem;
    display: block;
}

.submenu {
    display: none;
    padding-left: 1rem;
}

.submenu.show {
    display: block;
}

.submenu a {
    display: block;
    padding: .25rem 0;
    text-decoration: none;
}

.submenu a.active {
    font-weight: 700;
    text-decoration: underline;
}

@media (max-width: 900px) {
    .page-layout.has-sidebar {
        grid-template-columns: 1fr;
    }
}
