/*
Theme Name: DZBM by plik.info
Author: plik.info 
Description: Jasny motyw WordPress z paskiem kontaktowym i dostępnością WCAG 2.2
Version: 1.11
*/

/* ===== WCAG 2.2 - Skip Link ===== */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #b8bcc7;
    color: #fff;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 10000;
    font-weight: bold;
}

.skip-link:focus {
    top: 0;
}

/* ===== Screen reader only ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ===== Focus Visible - WCAG 2.4.7 ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid #0066cc;
    outline-offset: 2px;
}

/* ===== Scroll padding - WCAG 2.2 ===== */
html {
    scroll-padding-top: 100px;
    scroll-behavior: smooth;
    font-size: 16px;
}

/* ===== Body ===== */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #b8bcc7;
    color: #333;
    font-size: 1rem;
    line-height: 1.6;
}

/* ===== Typografia - rem dla skalowania ===== */
h1 { font-size: 2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p, li, a, span, div {
    font-size: inherit;
}

/* ===== Top Bar ===== */
.top-bar {
   
    background-color: #b8bcc7;
    padding: 10px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: #333333;
}

.contact-info {
    margin-left: 100px;
    display: flex;
    gap: 30px; 
}

.contact-item {
    display: flex;
    align-items: center;
}

.contact-item i {
    font-size: 1.25rem;
    margin-right: 8px;
    color: #333333;
}

.contact-text strong {
    display: block;
    font-weight: bold;
}

.contact-text a {
    color: #333333;
    text-decoration: none;
}

.contact-text a:hover {
    text-decoration: underline;
}

/* ===== Dynamiczne telefony ===== */
.phone-note {
    display: block;
    font-size: 0.9rem; /* ZWIĘKSZONE z 0.75rem */
    color: #666;
    font-style: italic;
    margin-top: 2px;
}

.phone-office,
.phone-after-hours {
    color: #333333;
    text-decoration: none;
}

.phone-office:hover,
.phone-after-hours:hover {
    text-decoration: underline;
}

.phone-closed {
    color: #333333;
    font-style: italic;
    font-size: 0.9rem; /* ZWIĘKSZONE z 0.875rem */
}

/* ===== Accessibility buttons ===== */
.accessibility-tools {
    display: flex;
    margin-right: 100px;
    gap: 6px;
    align-items: center;
    position: relative;
}

.accessibility-tools button {
    background-color: #ffffff;
    border: 2px solid #333333;
    color: #333333;
    padding: 8px 10px;
    cursor: pointer;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border-radius: 6px;
    min-width: 40px;
    height: 40px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
}

.accessibility-tools button:hover {
    background: #333333;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 3px 6px rgba(0,0,0,0.2);
}

.accessibility-tools button:focus-visible {
    outline: 3px solid #0066cc;
    outline-offset: 2px;
}

.accessibility-tools button[aria-pressed="true"] {
    background-color: #333333;
    color: #ffffff;
    border-color: #333333;
}

.accessibility-tools button i {
    pointer-events: none;
}

.accessibility-tools button::after {
    content: attr(title); /* Używamy title, bo sr-only jest w środku */
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.accessibility-tools button:hover::after {
    opacity: 1;
}

/* ===== Header and nav ===== */
header {
    background-color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
}

header .logo img {
    height: 60px;
}

nav {
    background-color: #ffffff;
    padding: 10px 30px;
}

nav ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

nav li {
    margin-right: 20px;
}

nav a {
    font-weight: bold;
}

/* ===== MENU POD PASKIEM ===== */
.main-menu {
    background-color: #b8bcc7;
    padding: 0;
    margin: 0;
    position: sticky;
    top: 0;    
    box-shadow: none !important;
    z-index: 999;  
}

.main-menu.sticky {
    padding: 0;
    background-color: transparent;
    box-shadow: none !important;
    z-index: 1000;
}

.main-menu.sticky .menu-inner {
    background-color: #ffffff;
    z-index: 1001;
}

.menu-inner {
    width: calc(100% - 200px);
    margin: 0 auto;
    background-color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 30px;
    box-sizing: border-box;
}

.menu-inner .logo img {
    height: 80px;
}

/* Hamburger - ukryty na desktop */
.mobile-menu-toggle {
    display: none;
}

.mobile-menu-close {
    display: none;
}

.menu-overlay {
    display: none;
}

.main-nav ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.main-nav li {
    margin-left: 30px;
    position: relative;
}

.main-nav a {
    text-decoration: none;
    color: #000;
    font-weight: 500;
    padding: 5px 0;
    position: relative;
    display: inline-block;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.main-nav a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -3px;
    width: 0;
    height: 2px;
    background-color: #000;
    transition: width 0.3s ease;
}

.main-nav a:hover::after {
    width: 100%;
}

/* ===== MENU ROZWIJANE ===== */
.main-nav li ul {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #ffffff;
    padding: 0;
    list-style: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 999;
    min-width: 180px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.4s ease;
}

.main-nav li:hover > ul {
    max-height: 500px;
    opacity: 1;
}

.main-nav li ul li {
    margin: 0;
}

.main-nav li ul li a {
    display: block;
    padding: 8px 15px;
    color: #000;
    font-weight: 400;
    white-space: nowrap;
}

.main-nav li ul li a:hover {
    background-color: #f1f1f1;
    color: #000;
}

.main-nav li ul li a::after {
    display: none;
}

/* ===== HERO / POWITANIE - pełny obraz + overlap ===== */
.hero {
    position: relative;
    width: 100%;
    min-height: 650px;
    margin: 0;
    padding: 0 0 100px 0;
    background-image: url('images/dzbm.png'); 
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; 
    align-items: flex-start;
    z-index: 1;
}

.hero-inner {
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-box,
.hero-links {
    z-index: 10;
}

.hero-box {
    position: absolute;
    top: 10px;
    left: 100px;
    display: inline-block;
    background-color: rgba(128, 0, 0, 0.8);
    color: #fff;
    padding: 5px 10px;
    font-size: 1.25rem;
    line-height: 1.2;
    box-sizing: border-box;
    z-index: 2;
}

.hero-links {
    position: absolute;
    top: 205px;
    right: 100px;
    display: flex;
    gap: 10px;
    z-index: 2;
}

.hero-link {
    display: inline-block;
    background-color: rgba(255, 255, 255, 1);
    padding: 5px;
    border-radius: 4px;
    box-sizing: border-box;
    transition: transform 0.3s ease;
}

.hero-link:hover {
    transform: scale(1.05);
}

.hero-link:focus-visible {
    outline: 3px solid #0066cc;
    outline-offset: 3px;
}

.hero-link img {
    display: block;
    width: 100px;
    height: 100px;
    border: 3px solid #fff;
    box-sizing: border-box;
}

/* ===== Main content - zachodzi na hero BEZ szarego paska ===== */
main {
    background-color: transparent;
    padding: 0;
    margin: -400px 0 0 0; /* Twoja idealna wartość margin-top */
    position: relative;
    z-index: 10;
}

.home-inner {
    width: calc(100% - 200px);
    margin: 0 auto 50px auto; /* Wyśrodkowanie poziome */
    background-color: #ffffff;
    padding: 20px 30px 30px 30px; /* Zmniejszony padding-top */
    border-radius: 10px;
    box-sizing: border-box;
    display: block;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.15);
}

.home-inner::after {
    content: "";
    display: block;
    clear: both;
}

.home-inner-just {
    width: calc(100% - 200px);
    margin: 0 auto;
    background-color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px;
    box-sizing: border-box;
    border-radius: 10px;
    text-align: justify;
    text-justify: inter-word;
}

/* ===== AKTUALNOŚCI – GRID 3 KOLUMNY ===== */
.section-title {
    font-size: 2rem;
    margin-top: 0; /* Usunięcie domyślnego margin-top */
    margin-bottom: 20px; /* Zmniejszony margin-bottom */
    text-align: left; /* Wyrównanie tytułu do lewej */
    color: #333;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.news-card {
    background-color: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.news-card-link { /* Nowy styl dla całego linku karty */
    display: flex;
    flex-direction: column;
    height: 100%; /* Upewnij się, że link wypełnia całą kartę */
    text-decoration: none; /* Usuń podkreślenie */
    color: inherit; /* Dziedzicz kolor tekstu */
}

.news-card:hover .news-card-link { /* Hover na karcie, dotyczy linku */
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}


.news-card-image {
    width: 100%;
    height: 200px; /* Stała wysokość jak na hotelosir.pl */
    position: relative;
    overflow: hidden;
    background-color: #f5f5f5;
}

/* Obrazek wewnątrz linku */
.news-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Wypełnia całe pole, może przyciąć (jak hotelosir.pl) */
    transition: transform 0.3s ease;
}

.news-card-link:hover .news-card-image img { /* Hover na linku, dotyczy obrazka */
    transform: scale(1.05);
}

/* Placeholder dla postów bez obrazka (ZMIENIONE) */
.news-card-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.news-card-placeholder a { /* Stylizuj link bezpośrednio */
    display: flex;
    flex-direction: column; /* Aby ikona i tekst byli w kolumnie */
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit; /* Dziedzicz kolor tekstu */
}

.news-card-placeholder a i { /* Stylizuj ikonę bezpośrednio */
    font-size: 4rem;
    color: rgba(255,255,255,0.5);
    margin-bottom: 10px; /* Odstęp między ikoną a tekstem sr-only */
}

.news-card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-card-title {
    font-size: 1.25rem;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.news-card-title a { /* Tytuł jest teraz wewnątrz news-card-link */
    text-decoration: none;
    color: #333;
    transition: color 0.3s ease;
}

.news-card-link:hover .news-card-title { /* Hover na linku, dotyczy tytułu */
    color: #800000;
}

.news-card-meta {
    font-size: 0.9rem; /* ZWIĘKSZONE z 0.85rem */
    color: #666;
    margin-bottom: 15px;
}

.news-card-meta i {
    margin-right: 5px;
}

.news-card-excerpt {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #555;
    margin-bottom: 20px;
    flex-grow: 1;
}

/* ===== PRZYCISK „CZYTAJ WIĘCEJ" (KOLORY PRZYWRÓCONE) ===== */
.news-card-button { /* Jest to teraz SPAN wewnątrz linku */
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background-color: #ffffff; /* PRZYWRÓCONE: białe tło */
    color: #333333; /* PRZYWRÓCONE: czarny tekst */
    border: 1px solid #ccc; /* PRZYWRÓCONE: szara ramka */
    text-decoration: none; /* To jest span, więc nie ma domyślnego */
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    align-self: flex-start;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.news-card-link:hover .news-card-button { /* Hover na linku, dotyczy span */
    background-color: #f1f1f1; /* PRZYWRÓCONE: jasnoszare tło na hover */
    color: #000000; /* PRZYWRÓCONE: czarny tekst na hover */
    border-color: #999; /* PRZYWRÓCONE: ciemnoszara ramka */
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.news-card-link:focus-visible .news-card-button { /* Focus na karcie-linku */
    outline: 3px solid #0066cc;
    outline-offset: 2px;
}

.news-card-button i {
    font-size: 0.8rem;
}

/* ===== Wpis – obrazek wyróżniający ===== */
.single .wp-post-image,
.single .post-thumbnail img,
.wp-block-post-featured-image {
    float: left;
    margin: 0 20px 15px 0;
    max-width: 300px;
    height: auto;
    border-radius: 6px;
}

.single .entry-content::after {
    content: "";
    display: block;
    clear: both;
}

/* ===== Powrót do aktualności ===== */
.post-back {
    margin-top: 30px;
    text-align: right;
    clear: both;
}

.post-back .back-link {
    display: inline-block;
    padding: 8px 16px;
    background-color: #ffffff;
    color: #333333;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.post-back .back-link:hover {
    background-color: #f1f1f1;
    border-color: #999;
    color: #000000;
}

.post-back .back-link:focus-visible {
    outline: 3px solid #0066cc;
    outline-offset: 3px;
}

/* ===== Tabele WordPress ===== */
.home-inner figure.wp-block-table {
    display: block;
    margin: 20px auto;
    width: max-content;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    border-radius: 10px;
    overflow: hidden;
}

.home-inner figure.wp-block-table table {
    margin: 0;
    border-collapse: collapse;
}

.home-inner figure.wp-block-table td,
.home-inner figure.wp-block-table th {
    text-align: left;      
    padding: 8px 12px;
    border: 1px solid #ddd;
}

.home-inner figure.wp-block-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.home-inner figure.wp-block-table tr:hover {
    background-color: #f1f1f1;
}

/* ===== Bloki plików ===== */
.wp-block-file a {
    display: inline-block;
    color: #333333;
    background-color: #ffffff;
    padding: 8px 12px;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.wp-block-file a:hover {
    background-color: #f1f1f1;
    color: #000000;
}

.wp-block-file a:focus-visible {
    outline: 3px solid #0066cc;
    outline-offset: 2px;
}

.wp-block-file__button.wp-element-button {
    background-color: #ffffff;
    color: #333333;
    border: 1px solid #ccc;
    padding: 8px 16px;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.wp-block-file__button.wp-element-button:hover {
    background-color: #f1f1f1;
    color: #000000;
    border-color: #999;
}

.wp-block-file__button.wp-element-button:focus-visible {
    outline: 3px solid #0066cc;
    outline-offset: 2px;
}

/* ===== Scroll to top ===== */
#scrollToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: none;
    background-color: #800000;
    color: #ffffff;
    border: none;
    width: 50px;
    height: 50px;
    line-height: 50px;
    text-align: center;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    z-index: 9999;
    text-decoration: none;
    display: flex; /* ZMIENIONE: Flexbox dla centrowania ikony i tekstu sr-only */
    align-items: center;
    justify-content: center;
}

#scrollToTop:hover {
    background-color: #a00000;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

#scrollToTop:focus-visible {
    outline: 3px solid #fff;
    outline-offset: -5px;
}

/* ===== Paginacja (KOLORY PRZYWRÓCONE) ===== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
}

.pagination li {
    margin: 0;
    padding: 0;
    display: inline-block;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    min-width: 42px;
    height: 42px;
    background-color: #ffffff; /* PRZYWRÓCONE: białe tło */
    color: #333333; /* PRZYWRÓCONE: czarny tekst */
    border: 1px solid #999; /* PRZYWRÓCONE: szara ramka */
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9375rem;
    text-align: center;
    box-sizing: border-box;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.pagination a span,
.pagination span span {
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    display: inline;
    min-width: auto !important;
    height: auto !important;
}

.pagination a:hover {
    background-color: #f1f1f1; /* PRZYWRÓCONE: jasnoszare tło na hover */
    color: #000; /* PRZYWRÓCONE: czarny tekst na hover */
    border-color: #666; /* PRZYWRÓCONE: ciemnoszara ramka */
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.pagination a:focus-visible {
    outline: 3px solid #0066cc;
    outline-offset: 2px;
}

.pagination .current {
    background-color: #333333; /* PRZYWRÓCONE: ciemne tło (aktywna strona) */
    color: #ffffff; /* PRZYWRÓCONE: biały tekst */
    border-color: #333333; /* PRZYWRÓCONE: ciemna ramka */
    cursor: default;
}

.pagination .dots {
    border: none;
    background: transparent;
    color: #666;
    cursor: default;
    min-width: 30px;
}

/* ===== WYSOKI KONTRAST – GLOBALNIE ===== */
body.contrast-high,
body.contrast-high * {
    background-color: #000 !important;
    color: #ff0 !important;
    border-color: #ff0 !important;
}

body.contrast-high a {
    color: #ff0 !important;
}

body.contrast-high i {
    color: #ff0 !important;
}

body.contrast-high .menu-inner {
    background-color: #000 !important;
}

body.contrast-high .hero {
    background-color: #000 !important;
    background-image: url('images/dzbmbw.png') !important;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 650px !important;
    padding: 0 0 100px 0 !important;
}

body.contrast-high .hero-box {
    background-color: #000 !important;
    border: 2px solid #ff0;
}

body.contrast-high .hero-link {
    background-color: #000 !important;
    border: 2px solid #ff0;
}

body.contrast-high img {
    filter: grayscale(100%) contrast(120%);
}

body.contrast-high main {
    background-color: transparent !important;
    padding: 0 !important;
    margin: -350px 0 0 0 !important; /* Twoja idealna wartość margin-top */
}

body.contrast-high .home-inner {
    background-color: #000 !important;
    box-shadow: 0 -5px 20px rgba(255,255,0,0.3) !important;
}

/* Wysoki kontrast dla aktualności grid */
body.contrast-high .news-card {
    background-color: #000 !important;
    border: 2px solid #ff0 !important;
    box-shadow: 0 2px 10px rgba(255,255,0,0.3) !important;
}

body.contrast-high .news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(255,255,0,0.5) !important;
}

body.contrast-high .news-card-image {
    background-color: #000 !important;
}

body.contrast-high .news-card-image img {
    filter: grayscale(100%) contrast(120%);
}

body.contrast-high .news-card-title {
    color: #ff0 !important;
}

body.contrast-high .news-card-link:hover .news-card-title { /* Hover na linku, dotyczy tytułu */
    color: #fff !important;
}

body.contrast-high .news-card-meta {
    color: #ff0 !important;
}

body.contrast-high .news-card-excerpt {
    color: #ff0 !important;
}

body.contrast-high .news-card-button {
    background-color: #000 !important; /* PRZYWRÓCONE: czarne tło */
    color: #ff0 !important; /* PRZYWRÓCONE: żółty tekst */
    border: 2px solid #ff0 !important; /* PRZYWRÓCONE: żółta ramka */
    box-shadow: 0 2px 5px rgba(255,255,0,0.3) !important;
}

body.contrast-high .news-card-link:hover .news-card-button { /* Hover na linku, dotyczy span */
    background-color: #ff0 !important; /* PRZYWRÓCONE: żółte tło na hover */
    color: #000 !important; /* PRZYWRÓCONE: czarny tekst na hover */
    border-color: #ff0 !important;
}

body.contrast-high .news-card-placeholder {
    background: #000 !important;
    border-bottom: 2px solid #ff0 !important;
}

body.contrast-high .news-card-placeholder a i {
    color: rgba(255,255,0,0.5) !important;
}

body.contrast-high .pagination a,
body.contrast-high .pagination span {
    background-color: #000 !important; /* PRZYWRÓCONE: czarne tło */
    border-color: #ff0 !important; /* PRZYWRÓCONE: żółta ramka */
    color: #ff0 !important; /* PRZYWRÓCONE: żółty tekst */
    box-shadow: 0 2px 5px rgba(255,255,0,0.3) !important;
}

body.contrast-high .pagination a:hover {
    background-color: #ff0 !important; /* PRZYWRÓCONE: żółte tło na hover */
    color: #000 !important; /* PRZYWRÓCONE: czarny tekst na hover */
    border-color: #ff0 !important;
}

body.contrast-high .pagination .current {
    background-color: #ff0 !important; /* PRZYWRÓCONE: żółte tło */
    color: #000 !important; /* PRZYWRÓCONE: czarny tekst */
    border-color: #ff0 !important;
}

body.contrast-high .accessibility-tools button {
    background-color: #000 !important;
    border-color: #ff0 !important;
    color: #ff0 !important;
}

body.contrast-high .accessibility-tools button:hover {
    background-color: #ff0 !important;
    color: #000 !important;
    border-color: #ff0 !important;
}

body.contrast-high .accessibility-tools button[aria-pressed="true"] {
    background-color: #ff0 !important;
    color: #000 !important;
    border-color: #ff0 !important;
}

body.contrast-high .phone-note {
    color: #ff0 !important;
}

body.contrast-high .phone-closed {
    color: #ff0 !important;
}

/* ===== Footer ===== */
footer {
    background-color: #000000 !important;
    color: #ffffff;
    text-align: center;
    padding: 20px 30px;
    font-size: 0.875rem;
    box-sizing: border-box;
}

/* ===== Footer Widgets ===== */
.footer-widgets-grid {
    max-width: calc(100% - 50px);
    margin: 0 auto;
    padding: 40px 0 30px;
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    box-sizing: border-box;
    background-color: #000000;
}

.footer-col {
    box-sizing: border-box;
    text-align: left;
    color: #fff;
}

.footer-col aside {
    width: auto !important;
    max-width: 100% !important;
}

.footer-col h4 {
    font-size: 1rem;
    margin-bottom: 12px;
    color: #ffffff;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.3);
    text-align: center;
    padding: 15px 30px;
    color: #ffffff;
    background-color: #000000;
    font-size: 0.9rem; /* ZWIĘKSZONE z 0.8rem */
}

/* ===== Poprawki dla Twojego Iframe Google Maps (bez dodatkowego HTML) ===== */

/* Kontener mapy - dostosuj jeśli masz nadrzędny div */
.contact-map-container {
    max-width: 1000px;
    margin: 0 auto 50px auto; /* Wyśrodkowanie */
    padding: 20px;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.contact-map-container h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #333;
    text-align: left;
}

.contact-map-container p {
    margin-bottom: 15px;
    line-height: 1.6;
}

/* Targetowanie iframe Google Maps na stronie kontaktowej */
iframe[src*="google.com/maps/embed"] {
    width: 100% !important; /* Wymuś 100% szerokości */
    height: 450px !important; /* Utrzymaj stałą wysokość */
    border: 1px solid #ddd !important; /* Domyślna ramka */
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    display: block;
    margin: 20px auto; /* Wyśrodkuj i dodaj margines */
    transition: all 0.3s ease; /* Dodaj płynne przejście dla filtra */
}

/* Wysoki kontrast dla iframe Google Maps */
body.contrast-high iframe[src*="google.com/maps/embed"] {
    border: 2px solid #ff0 !important; /* Żółta ramka w trybie kontrastu */
    box-shadow: 0 4px 10px rgba(255,255,0,0.3) !important; /* Żółty cień */
    filter: grayscale(100%) !important; /* Zastosuj filtr czarno-biały */
}

/* === Cookie Consent Banner === */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #333;
    color: #fff;
    padding: 20px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
    z-index: 10000;
    transform: translateY(100%);
    transition: transform 0.5s ease-out;
}

.cookie-banner.active {
    transform: translateY(0);
}

.cookie-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.cookie-banner-content p {
    margin: 0;
    flex: 1;
    min-width: 300px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.cookie-banner-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.cookie-button {
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.cookie-button.primary-button {
    background-color: #800000;
    color: #fff;
    border-color: #800000;
}

.cookie-button.primary-button:hover {
    background-color: #a00000;
    border-color: #a00000;
}

.cookie-button.secondary-button {
    background-color: #fff;
    color: #333;
    border-color: #ccc;
}

.cookie-button.secondary-button:hover {
    background-color: #f1f1f1;
    border-color: #999;
}

.cookie-button.tertiary-button {
    background-color: transparent;
    color: #fff;
    border-color: #fff;
}

.cookie-button.tertiary-button:hover {
    background-color: rgba(255,255,255,0.1);
}

/* === Cookie Settings Modal === */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cookie-modal.active {
    opacity: 1;
    visibility: visible;
}

.cookie-modal-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    position: relative;
}

.cookie-modal-content h2 {
    margin-top: 0;
    color: #333;
    font-size: 1.75rem;
    border-bottom: 2px solid #800000;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.cookie-modal-content p {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.cookie-categories {
    margin-bottom: 20px;
}

.cookie-category {
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 15px;
    padding: 15px;
    background-color: #f9f9f9;
}

.cookie-category .category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.cookie-category input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
    cursor: pointer;
}

.cookie-category input[type="checkbox"]:disabled + label {
    cursor: not-allowed;
    opacity: 0.7;
}

.cookie-category .toggle-description {
    background: none;
    border: none;
    color: #800000;
    font-size: 1rem;
    cursor: pointer;
    padding: 5px;
    transition: transform 0.3s ease;
}

.cookie-category .toggle-description[aria-expanded="true"] i {
    transform: rotate(180deg);
}

.cookie-category .category-description {
    font-size: 0.9rem; /* ZWIĘKSZONE z 0.85rem */
    color: #555;
    margin-top: 10px;
    padding-left: 5px;
    border-left: 3px solid #eee;
}

.cookie-modal-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    border-top: 1px solid #eee;
    padding-top: 20px;
    margin-top: 20px;
}

/* === Manage Cookies Link === */
.manage-cookies-link {
    background: none;
    border: none;
    color: #ffffff; /* ZMIENIONE: Biały tekst dla kontrastu na czarnym tle */
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.95rem; /* ZWIĘKSZONE z 0.9rem */
    margin: 0 0 0 15px; /* ZMIENIONE: Usunięto margin-top, dodano margin-left dla odstępu */
    display: inline-block; /* ZMIENIONE: Będą w jednej linii */
    text-align: center;
    transition: color 0.3s ease;
    vertical-align: middle;
}

.manage-cookies-link:hover {
    color: #b8bcc7; /* ZMIENIONE: Jasnoszary tekst na hover dla kontrastu */
}

/* === Accessibility: High Contrast Mode === */
body.contrast-high .cookie-banner {
    background-color: #000 !important;
    color: #ff0 !important;
    border-top: 2px solid #ff0 !important;
    box-shadow: 0 -2px 10px rgba(255,255,0,0.5) !important;
}

body.contrast-high .cookie-banner-content p {
    color: #ff0 !important;
}

body.contrast-high .cookie-button.primary-button {
    background-color: #ff0 !important;
    color: #000 !important;
    border-color: #ff0 !important;
}

body.contrast-high .cookie-button.primary-button:hover {
    background-color: #fff !important;
    color: #000 !important;
    border-color: #fff !important;
}

body.contrast-high .cookie-button.secondary-button {
    background-color: #000 !important;
    color: #ff0 !important;
    border-color: #ff0 !important;
}

body.contrast-high .cookie-button.secondary-button:hover {
    background-color: #ff0 !important;
    color: #000 !important;
    border-color: #ff0 !important;
}

body.contrast-high .cookie-button.tertiary-button {
    background-color: transparent !important;
    color: #ff0 !important;
    border-color: #ff0 !important;
}

body.contrast-high .cookie-button.tertiary-button:hover {
    background-color: rgba(255,255,0,0.1) !important;
}

body.contrast-high .cookie-modal-content {
    background-color: #000 !important;
    border: 2px solid #ff0 !important;
    box-shadow: 0 5px 20px rgba(255,255,0,0.5) !important;
}

body.contrast-high .cookie-modal-content h2,
body.contrast-high .cookie-modal-content p {
    color: #ff0 !important;
}

body.contrast-high .cookie-modal-content h2 {
    border-bottom-color: #ff0 !important;
}

body.contrast-high .cookie-category {
    background-color: #333 !important;
    border-color: #ff0 !important;
}

body.contrast-high .cookie-category .category-header {
    color: #ff0 !important;
}

body.contrast-high .cookie-category input[type="checkbox"] {
    border-color: #ff0 !important;
    background-color: #000 !important;
}
body.contrast-high .cookie-category input[type="checkbox"]:checked {
    background-color: #ff0 !important;
}

body.contrast-high .cookie-category input[type="checkbox"]:disabled + label {
    color: #ff0 !important;
    opacity: 0.5 !important;
}

body.contrast-high .cookie-category .toggle-description {
    color: #ff0 !important;
}

body.contrast-high .cookie-category .category-description {
    color: #ff0 !important;
    border-left-color: #ff0 !important;
}

body.contrast-high .cookie-modal-buttons {
    border-top-color: #ff0 !important;
}

body.contrast-high .manage-cookies-link {
    color: #ff0 !important; /* ZMIENIONE: Żółty tekst dla kontrastu na czarnym tle */
}

body.contrast-high .manage-cookies-link:hover {
    color: #fff !important; /* ZMIENIONE: Biały tekst na hover */
}

/* Wysoki kontrast dla iframe Google Maps */
body.contrast-high iframe[src*="google.com/maps/embed"] {
    border: 2px solid #ff0 !important; /* Żółta ramka w trybie kontrastu */
    box-shadow: 0 4px 10px rgba(255,255,0,0.3) !important; /* Żółty cień */
    filter: grayscale(100%) !important; /* Zastosuj filtr czarno-biały */
}

/* ===== RESPONSYWNOŚĆ - MOBILE ===== */
@media (max-width: 900px) {
    .footer-widgets-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .menu-inner {
        width: calc(100% - 60px);
    }
    
    .home-inner {
        width: calc(100% - 60px);
    }

    .news-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 kolumny na tabletach */
        gap: 25px;
    }

    /* Cookies Responsywność */
    .cookie-banner-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .cookie-banner-content p {
        min-width: unset;
        width: 100%;
    }
    
    .cookie-banner-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .cookie-button {
        width: 100%;
        box-sizing: border-box;
    }

    .cookie-modal-content {
        padding: 20px;
        width: 95%;
    }

    .cookie-modal-content h2 {
        font-size: 1.5rem;
    }

    .cookie-category .category-header {
        font-size: 1rem;
    }

    .cookie-modal-buttons {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    /* Top Bar */
    .top-bar {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
        align-items: stretch;
    }
    
    .contact-info {
        margin-left: 0px !important;
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }
    
    .contact-item {
        justify-content: flex-start;
        padding: 10px;
        background-color: rgba(255, 255, 255, 0.3);
        border-radius: 6px;
    }
    
    .contact-item i {
        font-size: 1.5rem;
        margin-right: 12px;
    }
    
    /* UKRYJ przyciski dostępności na mobile */
    .accessibility-tools {
        display: none !important;
    }
    
    /* Menu - hamburger */
    .menu-inner {
        width: 100%;
        padding: 10px 15px;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .menu-inner .logo {
        flex-shrink: 0;
    }
    
    .menu-inner .logo img {
        height: 50px;
    }
    
    .mobile-menu-toggle {
        display: block;
        background: none;
        border: 2px solid #333;
        color: #333;
        padding: 8px 12px;
        cursor: pointer;
        font-size: 1.5rem;
        border-radius: 5px;
        transition: all 0.3s ease;
    }
    
    .mobile-menu-toggle:hover {
        background-color: #333;
        color: #fff;
    }
    
    .main-nav {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background-color: #ffffff;
        box-shadow: 2px 0 10px rgba(0,0,0,0.3);
        transition: left 0.3s ease;
        overflow-y: auto;
        z-index: 9999;
        padding: 20px 0;
    }
    
    .main-nav.active {
        left: 0;
    }
    
    .menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 9998;
    }
    
    .menu-overlay.active {
        display: block;
    }
    
    .mobile-menu-close {
        display: block;
        position: absolute;
        top: 15px;
        right: 15px;
        background: none;
        border: none;
        font-size: 2rem;
        color: #333;
        cursor: pointer;
        padding: 5px;
        line-height: 1;
    }
    
    .main-nav ul {
        flex-direction: column;
        width: 100%;
        padding: 0;
    }
    
    .main-nav li {
        margin: 0;
        width: 100%;
        border-bottom: 1px solid #eee;
    }
    
    .main-nav li:last-child {
        border-bottom: none;
    }
    
    .main-nav a {
        display: block;
        padding: 15px 20px;
        width: 100%;
        box-sizing: border-box;
        font-size: 1rem;
    }
    
    .main-nav a::after {
        display: none;
    }
    
    .main-nav li ul {
        position: static;
        box-shadow: none;
        background-color: #f9f9f9;
        width: 100%;
        max-height: 0;
        overflow: hidden;
    }
    
    .main-nav li.submenu-open > ul {
        max-height: 1000px;
    }
    
    .main-nav li ul li a {
        padding-left: 40px;
        background-color: #f9f9f9;
        font-size: 0.9rem;
    }
    
    .main-nav li.menu-item-has-children > a::before {
        content: '▶';
        float: right;
        transition: transform 0.3s ease;
    }
    
    .main-nav li.submenu-open > a::before {
        transform: rotate(90deg);
    }
    
      .hero {
        display: flex !important;
        flex-direction: column !important;
        height: auto !important;
        min-height: unset !important;
        padding: 20px 15px !important;
        background-position: center !important;
    }

    /* Napis: Dzierżoniowski Zarząd Budynków Mieszkalnych */
    .hero-box {
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        margin-bottom: 20px !important;
        box-sizing: border-box !important;
    }

    /* Linki: eBOK i BIP */
    .hero-links {
        position: relative !important;
        top: 0 !important;
        right: 0 !important;
        display: flex !important;
        justify-content: center !important;
        gap: 15px !important;
        margin-bottom: 30px !important; /* Odstęp od aktualności */
    }

    .hero-link img {
        width: 100px !important; /* Zmniejszamy nieco ikony na telefonie */
        height: 100px !important;
    }

    
    /* Main Content */
    main {
        padding: 20px 0;
        margin-top: 0 !important; /* Resetuje ujemny margines z wersji desktopowej */
    }
    
    .home-inner {
        width: calc(100% - 30px);
        padding: 20px;
        margin: 0 auto 30px auto; /* Usunięto ujemny margines, dodano standardowy odstęp */
    }
    
    /* Aktualności Grid na mobile (1 kolumna) */
    .news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .section-title {
        font-size: 1.5rem;
        text-align: left; /* Wyrównanie tytułu do lewej na mobile */
    }
    
    /* Ogólne style dla mobile (dostosowane do news-card) */
    .news-card-title {
        font-size: 1.2rem;
    }
    
    .news-card-meta {
        font-size: 0.8rem;
    }
    
    .news-card-excerpt {
        font-size: 0.9rem;
    }
    
    .news-card-button {
        float: none;
        display: block;
        text-align: center;
        margin: 15px auto 0;
        width: 100%;
        max-width: 200px;
        padding: 10px 20px;
    }
    
    /* Obrazki w postach */
    .single .wp-post-image,
    .single .post-thumbnail img,
    .wp-block-post-featured-image {
        float: none;
        display: block;
        margin: 0 auto 20px;
        max-width: 100%;
    }
    
    /* Tabele */
    .home-inner figure.wp-block-table {
        width: 100%;
        overflow-x: auto;
    }
    
    .home-inner figure.wp-block-table table {
        font-size: 0.85rem;
    }
    
    .home-inner figure.wp-block-table td,
    .home-inner figure.wp-block-table th {
        padding: 6px 8px;
    }
    
    /* Paginacja */
    .pagination {
        gap: 5px;
        margin-top: 25px;
    }
    
    .pagination a,
    .pagination span {
        min-width: 36px;
        height: 36px;
        padding: 6px 8px;
        font-size: 0.85rem;
    }
    
    /* Scroll to top */
    #scrollToTop {
        width: 50px;
        height: 50px;
        line-height: 50px;
        font-size: 1.3rem;
        bottom: 15px;
        right: 15px;
    }
    
    /* Footer */
    .footer-widgets-grid {
        width: calc(100% - 30px);
        padding: 30px 15px;
    }
    
    .footer-bottom {
        font-size: 0.8rem;
        padding: 15px;
    }
    
    /* Post back link */
    .post-back {
        text-align: center;
    }

    /* Cookies Responsywność */
    .cookie-banner-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .cookie-banner-content p {
        min-width: unset;
        width: 100%;
    }
    
    .cookie-banner-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .cookie-button {
        width: 100%;
        box-sizing: border-box;
    }

    .cookie-modal-content {
        padding: 20px;
        width: 95%;
    }

    .cookie-modal-content h2 {
        font-size: 1.5rem;
    }

    .cookie-category .category-header {
        font-size: 1rem;
    }

    .cookie-modal-buttons {
        flex-direction: column;
    }
}

 body.contrast-high main {
        margin-top: 0 !important;
        padding-top: 20px !important;
    }


@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    
    .contact-item {
        font-size: 0.85rem;
    }
    
    .menu-inner .logo img {
        height: 40px;
    }
    
    .hero {
        min-height: 300px;
        margin-bottom: -30px;
    }
    
    .hero-box {
        font-size: 0.8rem;
    }
    
    .hero-links {
        top: 150px;
    }
    
    .hero-link img {
        width: 100px;
        height: 100px;
    }
    
    .news-title {
        font-size: 1.1rem;
    }
    
    .news-card-title {
        font-size: 1.1rem;
    }

    #scrollToTop {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
    
    .main-nav {
        width: 90%;
        max-width: 280px;
    }
    
    .home-inner {
        width: calc(100% - 20px);
        padding: 15px;
        margin: 0 auto 50px auto; /* Wyśrodkowanie poziome na bardzo małych ekranach */
    }
}

/* Ukryj hamburger na desktop */
@media (min-width: 769px) {
    .mobile-menu-toggle,
    .mobile-menu-close,
    .menu-overlay {
        display: none !important;
    }
}
/* Styling dla linków w Deklaracji Dostępności (FINALNA POPRAWKA) */
.accessibility-declaration a {
    color: #333333; /* Ciemny kolor tekstu (kontrast 21:1 na białym tle) */
    text-decoration: underline; /* Zawsze podkreślone dla rozpoznawalności */
    text-decoration-color: #333333; /* Kolor podkreślenia taki sam jak tekst */
    transition: color 0.3s ease, text-decoration-color 0.3s ease;
}

.accessibility-declaration a:hover,
.accessibility-declaration a:focus-visible {
    color: #800000; /* Bordowy kolor na hover/focus */
    text-decoration-color: #800000; /* Podkreślenie też bordowe na hover/focus */
    outline: 3px solid #0066cc; /* Standardowy outline dla fokusu */
    outline-offset: 2px;
}

/* Wysoki kontrast dla linków w deklaracji */
body.contrast-high .accessibility-declaration a {
    color: #ff0 !important; /* Żółty tekst */
    text-decoration: underline !important;
    text-decoration-color: #ff0 !important; /* Żółte podkreślenie */
}

body.contrast-high .accessibility-declaration a:hover,
body.contrast-high .accessibility-declaration a:focus-visible {
    color: #fff !important; /* Biały tekst na hover/focus */
    text-decoration-color: #fff !important; /* Białe podkreślenie */
    outline: 3px solid #fff !important; /* Biały outline dla kontrastu */
}
