* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
} 

:root {
    --bg-color: #f8f9fa;
    --text-color: #212529;
    --card-bg: #ffffff;
    --footer-bg: #f1f3f5;

    /* WYRAŹNIEJSZE ZŁOTE OBRAMOWANIA W TRYBIE DZIENNYM */
    --border-color: rgba(214, 158, 46, 0.45); 

    /* GŁĘBOKI, CIEMNY BRĄZ / CZEKOLADA W TRYBIE DZIENNYM */
    --nav-bg: rgba(74, 55, 40, 0.95);
    --nav-text: #fdfbf7; 

    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --accent-gold: #d69e2e;
    --gold-gradient: linear-gradient(135deg, #bf953f 0%, #fcf6ba 25%, #b38728 50%, #fbf5b7 75%, #aa771c 100%);
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
} 

body.dark-mode {
    --bg-color: #0f1115;
    --text-color: #e0e0e0;
    --card-bg: #181a20;
    --footer-bg: #121418;

    /* MOCNE, WYRAŹNE ZŁOTO W TRYBIE NOCNYM */
    --border-color: rgba(214, 158, 46, 0.7); 

    /* CIEMNY GRANAT W TRYBIE NOCNYM */
    --nav-bg: rgba(15, 23, 42, 0.96);
    --nav-text: #f8fafc;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
} 

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: var(--transition);
    line-height: 1.6;
} 

/* GLOBALNE REGULACJE TEKSTU I LINKÓW DLA ZAWARTOŚCI PODSTRON */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-color);
} 

a {
    color: var(--accent-gold);
    transition: var(--transition);
} 

a:hover {
    filter: brightness(1.2);
} 

p, li, span, td, th {
    color: var(--text-color);
} 

/* NAWIGACJA Z MENU (NAPIS NA GÓRZE, KAFELKI W RZĘDZIE) */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
} 

nav {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    flex-direction: column; /* Napis wyśrodkowany na górze, kafelki pod spodem */
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 1.5rem;
} 

/* LOGO NA DESKTOP */
.logo {
    font-weight: 800;
    font-size: 1.35rem;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-decoration: none;
    text-align: center;
    white-space: nowrap;
    filter: drop-shadow(0px 1px 2px rgba(15, 23, 42, 0.4));
    display: inline-block;
} 

.nav-links {
    display: flex;
    list-style: none;
    gap: 0.5rem; /* Odstęp między kafelkami */
    align-items: center;
    justify-content: center;
    flex-wrap: wrap; /* Bezpieczeństwo na mniejszych ekranach */
} 

.nav-links a {
    color: #ffffff !important; /* Czysta biel dla maksymalnej czytelności */
    text-decoration: none;
    font-weight: 600;
    font-size: 1.20rem;
    padding: 0.4rem 0.9rem;
    background: rgba(255, 255, 255, 0.14); /* Wyraźniejsze tło kafelka */
    border: 1px solid rgba(255, 255, 255, 0.3); /* Wyraźniejsza ramka */
    border-radius: 6px;
    transition: var(--transition);
    display: block;
    text-align: center;
    white-space: nowrap;
} 

/* Wymuszenie białego koloru na tekście wewnątrz kafelków na komputerze */
.nav-links a span {
    color: #ffffff !important;
}

/* Usunięcie podkreślenia na rzecz efektu kafelka */
.nav-links a::after {
    display: none;
} 

.nav-links a:hover,
.nav-links a.active {
    background: var(--accent-gold);
    color: #ffffff !important;
    border-color: var(--accent-gold);
    transform: translateY(-2px);
} 

.theme-toggle {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    padding: 0.4rem 1rem;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: var(--transition);
} 

.theme-toggle:hover {
    background: var(--accent-gold);
    border-color: var(--accent-gold);
    color: #ffffff;
    transform: translateY(-2px);
} 

/* KOMPAKTOWY SLAJDER I NAKŁADKA */
.slider-section {
    position: relative;
    max-width: 1100px;
    margin: 0.8rem auto 0.5rem;
    padding: 0 1rem;
    width: 100%;
} 

.slider-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    width: 100%;
} 

.slider-container {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    gap: 15px;
} 

.slide {
    height: 350px;
    width: auto;
    min-width: 0;
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    opacity: 0.55;
    transform: scale(0.96);
    transition: var(--transition);
    box-shadow: var(--shadow);
    flex-shrink: 0;
    background: #000;
} 

.slide img {
    height: 100%;
    width: auto;
    display: block;
    object-fit: contain;
} 

.slide.active {
    opacity: 1;
    transform: scale(1);
} 

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 60%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding: 0.3rem 0.8rem 0.5rem;
    text-align: center;
    color: white;
} 

.gold-text {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 1.05rem;
    font-weight: bold;
    display: inline-block;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(1px 1px 3px rgba(0, 0, 0, 0.9));
    margin-bottom: 0.1rem;
    line-height: 1.2;
} 

.hero-subtitle {
    font-size: 0.75rem;
    font-weight: 300;
    letter-spacing: 0.5px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.9);
    opacity: 0.95;
    color: #ffffff;
} 

/* PRZYCISKI SLAJDERA */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    transition: var(--transition);
} 

.slider-btn:hover {
    background: var(--accent-gold);
    border-color: var(--accent-gold);
    transform: translateY(-50%) scale(1.08);
} 

.prev-btn { left: 15px; }
.next-btn { right: 15px; } 

.dots-container {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 1rem;
} 

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(214, 158, 46, 0.3);
    cursor: pointer;
    transition: var(--transition);
} 

.dot.active {
    background: var(--accent-gold);
    width: 24px;
    border-radius: 8px;
} 

/* UKŁAD STRONY GŁÓWNEJ I PODSTRON */
main {
    max-width: 1100px;
    margin: 1rem auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 1.5rem;
} 

/* Układ jednokolumnowy dla prostych podstron (jeśli brak sidebar) */
main.single-column {
    display: block;
} 

.main-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
} 

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
} 

/* KARTY I ELEMENTY PODSTRON (OGŁOSZENIA, INTENCJE, KANCELARIA) */
.card,
details.announcement-card,
.content-box {
    background: var(--card-bg);
    color: var(--text-color);
    padding: 1.8rem;
    border-radius: 14px;
    box-shadow: var(--shadow);
    border: 1.5px solid var(--border-color); /* Pogrubiona ramka kart */
    transition: var(--transition);
    position: relative;
    overflow: hidden;
} 

.card::before,
details.announcement-card::before,
.content-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gold-gradient);
} 

.card:hover,
details.announcement-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.2);
} 

.card-icon {
    font-size: 1.8rem;
    margin-bottom: 0.6rem;
    display: inline-block;
} 

.card h2,
.content-box h2 {
    color: var(--accent-gold);
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    font-family: 'Georgia', serif;
} 

.card p,
.content-box p {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
} 

.location-group {
    margin-top: 0.8rem;
    padding-top: 0.8rem;
    border-top: 1px dashed var(--border-color);
} 

.location-group:first-of-type {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
} 

.location-title {
    font-weight: 700;
    color: var(--accent-gold);
    margin-bottom: 0.3rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
} 

/* TABELE DOMYŚLNE */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    background: var(--card-bg);
    color: var(--text-color);
} 

th, td {
    padding: 0.75rem 1rem;
    border-bottom: 1.5px solid var(--border-color); /* Pogrubiona linia pozioma */
    text-align: left;
} 

th {
    color: var(--accent-gold);
    font-family: 'Georgia', serif;
    font-weight: 700;
} 

tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.03);
} 

/* AKORDEONY I ELEMENTY EXPANDABLE (<details> / <summary>) */
summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--accent-gold);
    outline: none;
    padding: 0.5rem 0;
} 

.announcement-body {
    margin-top: 1rem;
    color: var(--text-color);
    line-height: 1.7;
} 

/* STOPKA GENEROWANA Z NAV.JS */
footer {
    background: var(--footer-bg);
    border-top: 1.5px solid var(--border-color);
    margin-top: 2rem;
    padding: 2.5rem 1rem 1rem;
    font-size: 0.9rem;
    transition: var(--transition);
    position: relative;
} 

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gold-gradient);
    opacity: 0.8;
} 

.footer-container {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
} 

.footer-col h3 {
    color: var(--accent-gold);
    font-family: 'Georgia', serif;
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
} 

.footer-col p {
    margin-bottom: 0.4rem;
    opacity: 0.9;
} 

.footer-col a {
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
} 

.footer-col a:hover {
    color: var(--accent-gold);
} 

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px dashed var(--border-color);
    opacity: 0.75;
    font-size: 0.85rem;
} 

/* OKIENKO COOKIES (RODO) */
.cookie-banner,
#cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 650px;
    background: var(--card-bg);
    color: var(--text-color);
    border: 1.5px solid var(--accent-gold);
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: var(--shadow);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    backdrop-filter: blur(8px);
} 

.cookie-text {
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0;
} 

.cookie-btn,
#accept-cookies-btn {
    background: var(--accent-gold);
    color: #ffffff;
    border: none;
    padding: 9px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
} 

.cookie-btn:hover,
#accept-cookies-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
} 

.no-image {
    width: 100%;
    height: 100%;
    min-height: 200px;
    background-color: var(--card-bg);
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    border: 1px dashed var(--border-color);
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
} 

/* RESPONSYWNOŚĆ */
@media (max-width: 992px) {
    main { grid-template-columns: 1fr; }
    .slide { min-width: 85%; height: 320px; }
    .gold-text { font-size: 1.15rem; }
} 

/* MOBILNE MENU: TYLKO DLA EKRANÓW WĄSKICH DO 550px */
@media (max-width: 550px) {
    nav { 
        flex-direction: column; 
        gap: 0.3rem; 
        padding: 0.4rem 0.5rem; 
        width: 100%;
        box-sizing: border-box;
    }
    
    /* GÓRNY NAPIS (LOGO) W DWÓCH RZĘDACH, WYŚRODKOWANY, NIERUCHOMY */
    .logo {
        display: block;
        width: 100%;
        white-space: normal !important; /* Pozwala na zawijanie wierszy w 2 rzędy */
        font-size: 1.15rem !important; /* Optymalny rozmiar dla czytelności w 2 liniach */
        font-weight: 800;
        text-align: center !important;
        box-sizing: border-box;
        padding: 0.2rem 0.5rem;
        letter-spacing: 0.5px;
        line-height: 1.25;
    }

    .logo span {
        display: inline !important;
        white-space: normal !important;
        animation: none !important; /* Wyłączenie ruchu/animacji */
        transform: none !important;
        background: var(--gold-gradient);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }

    /* Układ 4 kolumn (4 kafelki w rzędzie x 2 rzędy = 8 kafelków) */
    .nav-links { 
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 4px; 
        width: 100%;
        padding: 0;
        margin: 0;
        list-style: none;
        box-sizing: border-box;
    }

    .nav-links li {
        width: 100%;
        min-width: 0;
    }

    .nav-links a {
        font-size: 0.76rem !important;
        font-weight: 700;
        padding: 0.4rem 0.1rem !important;
        background: rgba(255, 255, 255, 0.12);
        border: 1px solid rgba(255, 255, 255, 0.22);
        border-radius: 5px;
        text-align: center;
        white-space: normal !important; /* Dopuszcza łamanie wierszy */
        word-break: break-word;
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 44px; /* Równa wysokość kafelków */
        width: 100%;
        box-sizing: border-box;
        color: #ffffff !important;
        text-decoration: none;
        line-height: 1.15;
    }

    /* Wyłączenie animacji przewijania tekstu dla kafelków */
    .nav-links a span {
        display: block;
        color: #ffffff !important;
        font-weight: 700;
        width: 100%;
        animation: none !important;
        transform: none !important;
    }

    .theme-toggle {
        padding: 0.2rem 0.7rem;
        font-size: 0.75rem;
        align-self: center;
        margin-top: 0.15rem;
    }

    .slide { min-width: 100%; height: 240px; }
    
    .gold-text { font-size: 1.05rem; }
    .hero-subtitle { font-size: 0.75rem; }
    
    .footer-container {
        text-align: center;
        gap: 1.5rem;
    }
    .cookie-banner,
    #cookie-banner {
        flex-direction: column;
        text-align: center;
        bottom: 10px;
        padding: 14px;
    }
    .cookie-btn,
    #accept-cookies-btn {
        width: 100%;
    }
} 

/* PRZEWIJANIE NAGŁÓWKÓW I KOTWIC (#ID) POD PRZYKLEJONE MENU NAWIGACJI */
html {
    scroll-padding-top: 150px;
    scroll-behavior: smooth;
} 

[id], .card, section {
    scroll-margin-top: 150px;
} 

/* WYGLĄD RAMKI INFORMACYJNEJ O ŹRÓDLE TEKSTÓW */
.source-box {
    background: rgba(214, 158, 46, 0.08);
    border-left: 4px solid var(--accent-gold);
    padding: 1rem 1.2rem;
    margin: 1.5rem 0;
    border-radius: 8px;
    font-size: 0.92rem;
    color: var(--text-color);
    line-height: 1.6;
} 

/* STYL DLA TABELI INTENCJI MSZALNYCH (ZINTEGROWANY Z MOTYWEM I DARK-MODE) */
.intencje-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 0.95rem;
    background: var(--card-bg);
    border: 1.5px solid var(--border-color); /* Pogrubione zewnętrzne obramowanie tabeli */
    border-radius: 10px;
    overflow: hidden;
} 

.intencje-table th {
    background-color: var(--nav-bg);
    color: var(--accent-gold);
    padding: 12px 10px;
    text-align: left;
    font-family: 'Georgia', serif;
    font-weight: 700;
    border-bottom: 2px solid var(--accent-gold);
} 

.intencje-table td {
    padding: 10px;
    border-bottom: 1.5px solid var(--border-color); /* Wyraźne poziome kreski między dniami */
    color: var(--text-color);
    vertical-align: top;
} 

.intencje-table tbody tr:nth-child(even) {
    background-color: rgba(214, 158, 46, 0.04);
} 

@media (max-width: 600px) {
    .intencje-table th, .intencje-table td {
        padding: 8px 6px;
        font-size: 0.85rem;
    }
} 

/* GWARANCJA POPRAWNEGO WYŚWIETLANIA NUMERÓW TELEFONÓW (RWD) */
a[href^="tel:"] {
    white-space: nowrap;
    color: inherit;
    text-decoration: none;
    font-weight: 600;
} 

a[href^="tel:"]:hover {
    color: var(--accent-gold);
    text-decoration: underline;
} 

/* POMOCNICZA KLASA DLA LIST KONTAKTOWYCH */
.contact-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.4rem 0;
    border-bottom: 1px dashed var(--border-color);
} 

@media (max-width: 600px) {
    .contact-list li {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.2rem;
    }
}
