/* Podstawowe style i reset */

/* Dostępność: jednolity focus dla przycisków */
[class*="btn"]:focus-visible,
[class*="button"]:focus-visible,
button:focus-visible,
input[type="button"]:focus-visible,
input[type="submit"]:focus-visible {
    outline: 2px solid #003d82;
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(0, 61, 130, 0.25);
}

.hm-btn {
    padding: 0.625rem 2rem;
    min-height: 48px;
    box-sizing: border-box;
    border-radius: 6px;
    font-size: 1rem;
    line-height: 1.2;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    white-space: nowrap;
}

.hm-btn-primary {
    background: #003153;
    color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hm-btn-primary:hover {
    background: #0B4A73;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    -webkit-transform: translateY(-1px);
    -ms-transform: translateY(-1px);
    transform: translateY(-1px);
}

.hm-btn-primary:active {
    -webkit-transform: translateY(0);
    -ms-transform: translateY(0);
    transform: translateY(0);
}

.hm-btn-secondary {
    background: #fff;
    color: #666;
    border: 1px solid #d1d5db;
}

.hm-btn-secondary:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.hm-btn:disabled,
.hm-btn.disabled {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    cursor: not-allowed;
    opacity: 0.6;
    transform: none !important;
}

.hm-btn:disabled:hover,
.hm-btn.disabled:hover {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    transform: none;
}

html {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f7f6;
    color: #213445;
    line-height: 2;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-size: 16px;
    max-width: 100%;
    overflow-x: hidden;
}

/* Responsywność - zobacz sekcję media queries na końcu pliku */

/* Podstawowe kontenery strony */
.container {
    width: 80%;
    margin: 0 auto;
    padding: 0rem;
    box-sizing: border-box;
    /* Dodane dla lepszej kontroli */
}

.header-container {
    width: 80%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
}

.main-container {
    min-height: calc(100vh - 100px);
    display: block;
    margin: 0;
    padding: 0;
    border: none;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-sizing: border-box;
}

/* Elementy pomocnicze */
.small-text {
    font-size: 12px;
    text-align: center;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -0.0625rem;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.hidden {
    display: none !important;
}

/* .form-section.hidden - zbędne, globalny .hidden wystarczy */

/* Header i nawigacja */
header {
    background-color: #003153;
    color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

 .access-expired-banner,
 .access-warning-banner {
     color: #fff;
     padding: 0.25rem 0.75rem;
     text-align: center;
     font-size: 14px;
     line-height: 1.25;
     box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
     display: flex;
     align-items: center;
     justify-content: center;
     gap: 10px;
     flex-wrap: wrap;
 }

 .access-expired-banner {
     background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
 }

 .access-warning-banner {
     background: linear-gradient(135deg, #ffa726 0%, #ff9800 100%);
 }

 .access-banner-text {
     font-weight: 600;
 }

 .access-banner-note {
     font-weight: 500;
 }

 .access-banner-action {
     background: #fff;
     padding: 0.375rem 0.875rem;
     border-radius: 6px;
     text-decoration: none;
     font-weight: 600;
     display: inline-flex;
     align-items: center;
     justify-content: center;
     line-height: 1.1;
     box-sizing: border-box;
 }

 .access-expired-banner .access-banner-action {
     color: #ff6b6b;
 }

 .access-warning-banner .access-banner-action {
     color: #ff9800;
 }

 .access-banner-action:hover,
 .access-banner-action:focus {
     background: #f8fafc;
     text-decoration: none;
     box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
 }

header .logo .logo-svg {
    height: 54px;
    width: auto;
    max-width: 220px;
    display: block;
}

.logo-link {
    text-decoration: none;
    color: inherit;
}

.logo-link:hover,
.logo-link:focus {
    color: inherit;
}

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

header nav ul li {
    margin-left: 1.25rem;
}

header nav ul li a,
header nav ul li .dropbtn {
    position: relative;
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    font-size: 1.1em;
    cursor: pointer;
}

/* Dodajemy transition dla płynnego obrotu strzałki */
header nav .arrow-icon {
    transition: transform 0.3s ease;
}

/* Domyślne zachowanie (desktop) - obrót przy hover */
header nav .dropbtn:hover .arrow-icon {
    transform: rotate(180deg);
}

/* Dynamiczne białe podkreślenie przy hover - dla linków nawigacji */
header nav ul li a[href="/ogloszenia"]::after,
header nav ul li a[href="/raporty"]::after,
header nav ul li a#raportsProLink::after,
header nav ul li a#loginLink::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #ffffff;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

header nav ul li a[href="/ogloszenia"]:hover::after,
header nav ul li a[href="/ogloszenia"]:focus::after,
header nav ul li a[href="/raporty"]:hover::after,
header nav ul li a[href="/raporty"]:focus::after,
header nav ul li a#raportsProLink:hover::after,
header nav ul li a#raportsProLink:focus::after,
header nav ul li a#loginLink:hover::after,
header nav ul li a#loginLink:focus::after {
    transform: scaleX(1);
}

/* Przycisk w headerze: biały kontur, transparentne tło */
header .add-listing-btn {
    background-color: transparent !important;
    color: #ffffff !important;
    border: 2.5px solid #ffffff !important;
    border-radius: 8px;
}

header .add-listing-btn:hover,
header .add-listing-btn:focus {
    background-color: #F39C12 !important;
    color: #ffffff !important;
    border-color: #F39C12 !important;
}

header .nav-toggle {
    display: none;
    background: transparent;
    border: 2px solid transparent;
    color: #fff;
    padding: 0.5rem;
    border-radius: 10px;
    color: #fff;
    cursor: pointer;
    line-height: 0;
}

header .nav-toggle:hover {
    border-color: rgba(255, 255, 255, 0.9);
}

header .nav-toggle-icon {
    display: inline-block;
    width: 28px;
    height: 16px;
    background:
        linear-gradient(currentColor, currentColor) 0 0 / 100% 2.25px no-repeat,
        linear-gradient(currentColor, currentColor) 0 50% / 100% 2.25px no-repeat,
        linear-gradient(currentColor, currentColor) 0 100% / 100% 2.25px no-repeat;
}

/* ==================== HERO SECTION (STRONA GŁÓWNA) ==================== */
/* Strona główna - Nowoczesny design */

.hero {
    text-align: center;
    /* Fallback dla starszych przeglądarek */
    background-image: url('../images/hero-background.jpg');
    background-size: cover;
    background-position: top;
    background-repeat: no-repeat;
    color: #fff;
    padding: 8.125rem 0 3.125rem 0;
    margin-bottom: 0rem;
    margin-top: 0rem;
    position: relative;
}

/* WebP dla nowoczesnych przeglądarek (obrazy 80% mniejsze!) */
/* Tylko przeglądarki obsługujące WebP nadpiszą background-image */
.webp .hero {
    background-image: url('../images/hero-background.webp');
}

.hero h2,
.hero .hero-title {
    margin-top: 3.875rem; /* 62px */
    margin-bottom: 0rem;
    font-size: 2.0313em; /* 32,5px */
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero p {
    margin-top: -0.3125rem;
    margin-bottom: 1.875rem;
    font-weight: 500;
    font-size: 1.1rem;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* ==================== HERO SEARCH FORM ==================== */
/* Kontener "karty" formularza nad bannerem hero.
 * Pozostałe reguły (grid, inputy, submit, responsywność) są w advanced-filters.css,
 * który stosuje selektory z ID (#heroFilterForm / #filterForm) — wspólne dla strony
 * głównej i /ogloszenia. Unikamy duplikacji reguł z nadpisującą specificity. */
.hero .advanced-filters {
    max-width: 1100px;
    margin: 0 auto;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    padding: 2rem;
}

/* Przycisk "Szukaj" — bazowe style wizualne (kolor/hover).
 * Wymiary, pozycja i białe spacje są w advanced-filters.css
 * (#filterForm .filter-row-inputs .btn-search / #heroFilterForm ...). */
.btn-search {
    background: #003153;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-search:hover {
    background: #0B4A73;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 49, 83, 0.3);
}

/* Główna sekcja z treścią */
main {
    flex: 1;
}

h1 {
    color: #213445;
    font-size: 2.25em;
    line-height: 1.2;
}

h2 {
    color: #213445;
    font-size: 2em;
    line-height: 1.25;
}

h3 {
    color: #333;
    font-size: 1.4em;
    line-height: 1.3;
}

section>.container>h2:first-child {
    margin-top: 1.25rem;
    margin-bottom: 1.25rem;
}

section {
    display: block;
}

section.active {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}

/* System autoryzacji */
[data-requires-auth] {
    display: none !important;
}

.guest-only {
    display: inline;
}

body.is-authenticated .guest-only {
    display: none !important;
}

body.is-authenticated nav [data-requires-auth] {
    display: inline !important;
}

section[data-requires-auth] {
    display: none !important;
}

body.is-authenticated section[data-requires-auth].active {
    display: block !important;
}

body.is-authenticated section[data-requires-auth]:not(.active) {
    display: none !important;
}

/* Elementy dropdown widoczne tylko dla kandydatów */
.auth-candidate-only {
    display: none !important;
}

body.is-authenticated.account-candidate .auth-candidate-only {
    display: block !important;
}

/* Elementy tylko dla rekruterów */
.recruiter-only {
    display: none !important;
}

body.account-recruiter .recruiter-only {
    display: revert !important;
}

body.account-recruiter nav li.recruiter-only {
    display: list-item !important;
}

.notification-item.recruiter-only .switch,
.notification-item.recruiter-pro-only .switch {
    margin-top: 0.75rem;
}

.team-only {
    display: none !important;
}

body.account-team .team-only:not(.settings-tab):not(.settings-nav-item) {
    display: revert !important;
}

body.account-team nav li.team-only {
    display: list-item !important;
}

.candidate-only {
    display: none !important;
}

body.account-candidate .candidate-only {
    display: revert !important;
}

body.account-candidate nav li.candidate-only {
    display: list-item !important;
}

/* Footer */
.footer {
    color: #003153;
    padding: 1.5rem 0 1rem;
    border-top: 1px solid rgba(0, 49, 83, 0.08);
    background: #ffffff;
}

.footer .footer-container {
    display: flex !important;
    justify-content: flex-start !important;
    align-items: stretch !important;
    flex-direction: column !important;
    gap: 14px;
}

.footer-city-panel {
    background: #f3f4f6;
    border: 1px solid #e6eaf0;
    border-radius: 16px;
    padding: 1.5rem 2rem;
}

.footer-city-title {
    margin: 0 0 1rem;
    color: #111827;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
}

.footer-city-nav {
    column-count: 6;
    column-gap: 1.5rem;
}

.footer a {
    color: #0B4A73;
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
}

.footer-city-nav a {
    color: #1f2937;
    display: block;
    font-size: 0.78rem;
    line-height: 1.45;
    margin-bottom: 0.45rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    break-inside: avoid;
}

.footer-main-panel {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr) auto;
    align-items: center;
    gap: 1.25rem;
    background: #ffffff;
    border: 1px solid #edf0f3;
    border-radius: 16px;
    padding: 1.25rem 2rem;
}

.footer-logo-link {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    width: fit-content;
}

.footer-logo {
    display: block;
    width: 160px;
    height: auto;
}

.footer-main-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
}

.footer-main-nav a,
.footer-legal-line a {
    color: #1f2937;
    font-size: 0.8rem;
    line-height: 1.4;
}

.footer-socials {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
}

.footer-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    color: #0B4A73;
    transition: color 0.2s ease, transform 0.2s ease;
}

.footer-social-link svg {
    display: block;
    width: 100%;
    height: 100%;
}

.footer-legal-line {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    padding-top: 0.875rem;
    border-top: 1px solid #edf0f3;
    color: #4b5563;
    font-size: 0.78rem;
    line-height: 1.4;
}

.footer a:hover,
.footer a:focus {
    color: #003153;
    text-decoration: underline;
}

.footer-social-link:hover,
.footer-social-link:focus {
    color: #003153;
    text-decoration: none;
    transform: translateY(-1px);
}

.legal-content {
    background: #fff;
    padding: 1.875rem;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.legal-content h1 {
    font-size: 2em;
    color: #213445;
    margin-bottom: 1em;
}

.legal-content h2 {
    font-size: 1.5em;
    color: #213445;
    margin: 1em 0;
}

.legal-content h3 {
    font-size: 1.2em;
    color: #333;
    margin: 1.5em 0 1em;
}

.legal-content p {
    line-height: 1.6;
    color: #444;
    margin-bottom: 1em;
}

.legal-content ul,
.legal-content ol {
    margin: 1em 0;
    padding-left: 2em;
}

.legal-content li {
    margin-bottom: 0.5em;
    color: #444;
    line-height: 1.6;
}

.legal-content strong {
    color: #213445;
}

.legal-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.25em 0;
    font-size: 0.9em;
    table-layout: fixed;
}

.legal-content thead tr {
    border-bottom: 2px solid #213445;
}

.legal-content th {
    padding: 0.625rem 0.75rem;
    text-align: left;
    color: #213445;
    font-weight: 600;
    vertical-align: top;
}

.legal-content td {
    padding: 0.625rem 0.75rem;
    color: #444;
    vertical-align: top;
    line-height: 1.5;
}

.legal-content tbody tr {
    border-bottom: 1px solid #e5e7eb;
}

.legal-content tbody tr:last-child {
    border-bottom: none;
}

/* Linki wewnętrzne i elementy nawigacyjne */
.internal-link {
    color: #656565;
    text-decoration: none;
    transition: color 0.3s;
    display: inline-block;
}

.internal-link:hover,
.internal-link:focus {
    color: #0B4A73;
    text-decoration: underline;
}

.back-nav {
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
}

.back-link {
    color: #555;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.375rem 0.75rem 0.375rem 0.5rem;
    border-radius: 8px;
    transition: color 0.2s, background-color 0.2s;
}

.back-link:hover {
    color: #0B4A73;
    background-color: rgba(11, 74, 115, 0.07);
}

.back-link svg {
    flex-shrink: 0;
    stroke: currentColor;
    transition: transform 0.2s;
}

.back-link:hover svg {
    transform: translateX(-2px);
}

/* Elementy z animacjami */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.25rem;
    min-height: 200px;
}

/* Wariant z boxem dla listings */
.loading-container.boxed {
    text-align: center;
    padding: 3rem 2rem;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin: 1.5rem 0;
}

.loading-container p {
    color: #666;
    font-size: 16px;
    margin: 0;
}

.loading-container.boxed p {
    color: #6b7280;
    font-size: 15px;
}

.user-listing {
    animation: slideUp 0.3s ease;
}

.stat-box {
    animation: fadeIn 0.5s ease;
}

/* --- BLOG (Profesjonalny Design) --- */
.blog-container {
    width: 80%;
    margin: 0 auto;
    padding: 2.5rem 1.25rem;
    background: linear-gradient(135deg, #f8f9fb 0%, #ffffff 100%);
    min-height: 70vh;
}
  
  .blog-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin: 0 0 24px;
    color: #22313f;
    text-align: center;
    letter-spacing: -0.02em;
    line-height: 1.15;
    text-shadow: none;
  }
  
  .blog-subtitle {
    color: #6b7c93;
    font-size: 1.25rem;
    line-height: 1.65;
    text-align: center;
    max-width: 880px;
    margin: 0.5rem auto 48px;
    font-weight: 400;
    line-height: 1.6;
  }

  .blog-category-nav {
    max-width: 980px;
    margin: 0 auto 2.5rem;
  }

  .blog-category-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }

  .blog-category-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.625rem 1rem;
    border-radius: 999px;
    background: rgba(11, 74, 115, 0.08);
    border: 1px solid rgba(11, 74, 115, 0.14);
    color: #22313f;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  }

  .blog-category-chip:hover,
  .blog-category-chip:focus,
  .blog-category-chip.is-active {
    background: linear-gradient(135deg, #0B4A73 0%, #00263f 100%);
    border-color: transparent;
    color: #ffffff;
    transform: translateY(-1px);
  }

  .blog-category-chip-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    height: 1.5rem;
    padding: 0 0.375rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    font-size: 0.8rem;
    font-weight: 700;
  }

  .blog-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    margin-top: 3rem;
    align-items: stretch;
  }

/* Responsywność - zobacz sekcję media queries na końcu pliku */

  .blog-card {
    background: #fff;
    border: none;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    transform: translateY(0);
    display: flex;
    flex-direction: column;
    height: 100%;
  }

  .blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
  }

.blog-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #0B4A73 0%, #00263f 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.blog-card:hover::before {
    opacity: 1;
}

.blog-card > a {
    display: block;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 20px 20px 0 0;
}

.blog-card > a picture {
    display: block;
    overflow: hidden;
    border-radius: 20px 20px 0 0;
}

.blog-card-content {
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

.blog-card-category {
    margin: 0 0 12px;
}

.blog-card-category-link,
.blog-article-category {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    background: rgba(11, 74, 115, 0.1);
    color: #0B4A73;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    transition: background 0.2s ease, color 0.2s ease;
}

.blog-card-category-link:hover,
.blog-card-category-link:focus,
.blog-article-category:hover,
.blog-article-category:focus {
    background: rgba(11, 74, 115, 0.16);
    color: #00263f;
}

.blog-card-title {
    margin: 0 0 12px;
    font-size: 1.4rem;
    font-weight: 600;
    line-height: 1.4;
    color: #22313f;
}

.blog-card-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-card-link:hover {
    color: #0B4A73;
}

.blog-card-meta {
    color: #8b9dc3;
    font-size: 0.9rem;
    margin: 0 0 16px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.blog-card-meta time::before {
    content: '📅';
    margin-right: 0.25rem;
}

.blog-card-desc {
    margin: 0 0 20px;
    color: #6b7c93;
    line-height: 1.6;
    font-size: 0.95rem;
}

.blog-card-actions {
    margin-top: auto;
    padding-top: 0.5rem;
}

.blog-card-actions .btn {
    width: 100%;
    text-align: center;
    font-weight: 600;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #0B4A73 0%, #00263f 100%);
    border: none;
    box-shadow: 0 2px 8px rgba(0, 49, 83, 0.3);
}

.blog-card-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 49, 83, 0.35);
}

.blog-article {
    background: #fff;
    border: none;
    border-radius: 24px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin: 1.25rem 0;
    position: relative;
}

.blog-article::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(135deg, #0B4A73 0%, #00263f 100%);
}

.blog-article-header {
    padding: 2.5rem 2.5rem 1.25rem 2.5rem;
    background: linear-gradient(135deg, #f8f9fb 0%, #ffffff 100%);
}

.blog-article-category-wrap {
    margin: 0 0 1rem;
}

/* Hero image for article */
.blog-article-hero { 
    margin: 0;
    overflow: hidden;
}
.blog-article-hero picture { 
    display: block; 
}
.blog-article-hero img { 
    display: block; 
    width: 100%;
    height: auto;
    max-height: 340px;
    object-fit: cover;
    object-position: left center;
}

.blog-article-title {
    margin: 0 0 16px;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: #22313f;
    letter-spacing: -0.01em;
}

.blog-article-meta {
    color: #8b9dc3;
    margin: 0 0 20px;
    font-size: 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.blog-article-meta time::before {
    content: '📅';
    margin-right: 0.375rem;
}

.blog-article-desc {
    margin: 0 0 20px;
    font-size: 1.1rem;
    color: #6b7c93;
    line-height: 1.6;
    font-style: italic;
    padding: 1.25rem;
    background: rgba(0, 49, 83, 0.05);
    border-left: 4px solid #003153;
    border-radius: 8px;
}

.blog-article-content {
    padding: 1.25rem 2.5rem 2.5rem 2.5rem;
    font-size: 1.05rem;
    line-height: 1.7;
}

.blog-article-content h2 { 
    margin-top: 2.5rem; 
    margin-bottom: 1rem;
    font-size: 1.8rem;
    font-weight: 600;
    color: #22313f;
    border-bottom: 2px solid #f0f3f7;
    padding-bottom: 0.5rem;
}

.blog-article-content h3 {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    font-size: 1.4rem;
    font-weight: 600;
    color: #22313f;
}

.blog-article-content p { 
    line-height: 1.7; 
    margin: 1rem 0; 
    color: #4a5568;
}

.blog-article-content ul { 
    padding-left: 1.5rem; 
    margin: 1rem 0;
}

.blog-article-content li { 
    margin: 0.5rem 0; 
    line-height: 1.6;
    color: #4a5568;
}

.blog-article-content a {
    color: #0B4A73;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s ease;
}

.blog-article-content a:hover,
.blog-article-content a:focus {
    color: #00263f;
}

.blog-article-content blockquote {
    margin: 1.5rem 0;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, #f8f9fb 0%, #ffffff 100%);
    border-left: 4px solid #003153;
    border-radius: 8px;
    font-style: italic;
    color: #22313f;
}

.blog-article-content code {
    background: #f1f5f9;
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #e53e3e;
}

.blog-article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.95rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 8px rgba(0, 38, 63, 0.08);
}

.blog-article-content table th {
    background: #0B4A73;
    color: #fff;
    font-weight: 600;
    padding: 0.75rem 1.1rem;
    text-align: left;
    white-space: nowrap;
}

.blog-article-content table td {
    padding: 0.65rem 1.1rem;
    border-bottom: 1px solid #e6ebf1;
    color: #4a5568;
    vertical-align: top;
}

.blog-article-content table tr:last-child td {
    border-bottom: none;
}

.blog-article-content table tbody tr:nth-child(even) {
    background: #f8f9fb;
}

.blog-article-content table tbody tr:hover {
    background: #eef4fb;
    transition: background 0.15s ease;
}

.blog-article-footer {
    padding: 1.25rem 2.5rem 2.5rem 2.5rem;
    background: #f8f9fb;
    border-top: 1px solid #e6ebf1;
}

/* --- BLOG (Rozszerzenia UI) --- */
/* Miniatury kart na liście i w sekcji powiązanych artykułów */
.blog-card-thumb {
    width: 100%;
    height: auto;
    aspect-ratio: 1200 / 630;
    object-fit: cover;
    display: block;
    border-radius: 20px 20px 0 0;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-card-thumb {
    transform: scale(1.05);
}

/* Breadcrumbs na stronie artykułu */
.blog-breadcrumbs {
    font-size: 0.95rem;
    color: #8b9dc3;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.75rem 1.25rem;
    background: rgba(0, 49, 83, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(0, 49, 83, 0.1);
}
.blog-breadcrumbs a { 
    color: #22313f; 
    text-decoration: none; 
    font-weight: 500;
    transition: color 0.3s ease;
}
.blog-breadcrumbs a:hover { 
    color: #0B4A73;
}
.blog-breadcrumbs .current { 
    color: #003153; 
    font-weight: 600; 
}

.blog-breadcrumbs-listing {
    margin: 0 auto 1.5rem;
    max-width: 980px;
}

.blog-contextual-links {
    margin: 1.75rem 0;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(11, 74, 115, 0.08) 0%, rgba(255, 255, 255, 1) 100%);
    border: 1px solid rgba(11, 74, 115, 0.12);
    border-radius: 18px;
    box-shadow: 0 6px 20px rgba(0, 38, 63, 0.06);
}

.blog-contextual-links-title {
    font-size: 1rem;
    font-weight: 700;
    color: #22313f;
    margin-bottom: 1rem;
}

.blog-contextual-links-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.875rem;
}

.blog-contextual-link-item {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.blog-contextual-link-badge {
    display: inline-flex;
    align-self: flex-start;
    align-items: center;
    padding: 0.3rem 0.6rem;
    border-radius: 999px;
    background: rgba(11, 74, 115, 0.12);
    color: #0B4A73;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.blog-contextual-link {
    color: #22313f;
    font-weight: 700;
    text-decoration: none;
}

.blog-contextual-link:hover,
.blog-contextual-link:focus {
    color: #0B4A73;
    text-decoration: underline;
}

.blog-contextual-link-desc {
    color: #5f7085;
    font-size: 0.95rem;
    line-height: 1.55;
}

.blog-eeat-box {
    margin: 2rem 0 0;
    padding: 1.75rem;
    background: linear-gradient(135deg, #f8f9fb 0%, #ffffff 100%);
    border: 1px solid #e6ebf1;
    border-left: 4px solid #0B4A73;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(0, 38, 63, 0.05);
}

.blog-eeat-box-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.blog-eeat-box-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #22313f;
}

.blog-eeat-hub-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #0B4A73;
    text-decoration: none;
    font-weight: 700;
}

.blog-eeat-hub-link:hover,
.blog-eeat-hub-link:focus {
    color: #00263f;
    text-decoration: underline;
}

.blog-eeat-summary {
    margin: 0 0 1rem;
    color: #5f7085;
    line-height: 1.65;
}

.blog-eeat-list {
    margin: 0;
    padding-left: 1.25rem;
    color: #4a5568;
}

.blog-eeat-list li {
    margin-bottom: 0.65rem;
    line-height: 1.6;
}

.blog-eeat-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1.25rem;
}

.blog-eeat-topic {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: rgba(0, 49, 83, 0.06);
    color: #22313f;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Spis treści (TOC) */
.blog-toc {
    background: linear-gradient(135deg, #f8f9fb 0%, #ffffff 100%);
    border: 1px solid #e6ebf1;
    border-left: 4px solid #003153;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}
.blog-toc-title { 
    font-weight: 700; 
    margin-bottom: 1rem; 
    color: #22313f; 
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.blog-toc-title::before {
    content: '📋';
    font-size: 1.2rem;
}
.blog-toc ul { 
    list-style: none; 
    margin: 0; 
    padding-left: 0; 
}
.blog-toc li { 
    margin: 0.625rem 0; 
    padding: 0.25rem 0;
}
.blog-toc li.level-3 { 
    padding-left: 1.25rem; 
    opacity: 0.8; 
    font-size: 0.9rem;
}
.blog-toc a { 
    color: #4a5568; 
    text-decoration: none; 
    transition: all 0.3s ease;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    display: inline-block;
}
.blog-toc a:hover { 
    color: #0B4A73;
    background: rgba(11, 74, 115, 0.1);
}

/* Nawigacja między postami */
.post-nav { 
    margin: 2rem 0; 
    padding: 1.5rem; 
    background: linear-gradient(135deg, #f8f9fb 0%, #ffffff 100%);
    border-radius: 16px;
    border: 1px solid #e6ebf1;
    display: flex; 
    justify-content: space-between; 
    gap: 24px; 
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}
.post-nav a { 
    color: #22313f; 
    text-decoration: none; 
    flex: 1; 
    padding: 1rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}
.post-nav a:hover { 
    color: #0B4A73;
    background: rgba(11, 74, 115, 0.05);
    border-color: rgba(11, 74, 115, 0.2);
}
.post-nav .prev { text-align: left; }
.post-nav .next { text-align: right; }
.post-nav span { 
    display: block; 
    font-weight: 600; 
    margin-top: 0.5rem; 
    font-size: 1.05rem;
}

/* Powiązane artykuły */
.related-posts { 
    margin: 2.5rem 0; 
    padding: 2rem; 
    background: linear-gradient(135deg, #f8f9fb 0%, #ffffff 100%);
    border-radius: 20px;
    border: 1px solid #e6ebf1;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
}
.related-posts h2 { 
    margin: 0 0 24px; 
    font-size: 1.8rem; 
    font-weight: 700;
    color: #22313f;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.related-grid { 
    display: grid; 
    grid-template-columns: 1fr; 
    gap: 24px; 
}
/* Responsywność - zobacz sekcję media queries na końcu pliku */
.related-posts .blog-card { 
    overflow: hidden; 
    transform: scale(0.95);
    transition: transform 0.3s ease;
}
.related-posts .blog-card:hover {
    transform: scale(1);
}
.related-posts .blog-card-thumb {
    width: 100%;
    height: auto;
    aspect-ratio: 1200 / 630;
    object-fit: cover;
    border-radius: 16px 16px 0 0;
}

/* Responsywność - zobacz sekcję media queries na końcu pliku */

/* ============================================
   GLOBAL ANIMATIONS & UTILITIES
   ============================================ */

/* Keyframe Animations */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(30px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInFade {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes loading {
    from {
        background-position: 200% 0;
    }
    to {
        background-position: -200% 0;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -0.625rem 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #003153;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Spinner - standalone */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #003153;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Spinner dla przycisków admin (mniejszy, biały) */
.spinner.small,
.btn .spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-top-color: transparent;
    animation: spin 0.6s linear infinite;
}

/* ============================================
   GLOBALNY LINK INFORMACYJNY
   Używany dla linków typu "Jak działa...", "Dowiedz się więcej"
   ============================================ */
.info-link {
    color: #0B4A73;
    text-decoration: none;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease, text-decoration 0.2s ease;
}

.info-link:hover,
.info-link:focus {
    text-decoration: underline;
    color: #0d4670;
}

.info-link svg {
    flex-shrink: 0;
}

/* Google reCAPTCHA badge - globalne style dla wszystkich stron */
.grecaptcha-badge {
    z-index: 9999;
    position: fixed !important;
}

.grecaptcha-badge:hover {
    right: 0 !important;
}

.recaptcha-notice {
    display: none;
    font-size: 10.5px;
    color: #888;
    text-align: center;
    margin-top: 12px;
    line-height: 1.4;
}

/* Komunikat dla użytkowników, u których skrypt reCAPTCHA został zablokowany przez
   bloker/antytracking/firewall. Monitor pokazuje go tylko wtedy, gdy wykryje awarię. */
.recaptcha-load-notice {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 10000;
    max-width: 360px;
    padding: 14px 40px 14px 16px;
    background: #fff8ec;
    color: #5a3b00;
    border: 1px solid #f0c88b;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
    font-size: 14px;
    line-height: 1.45;
}

.recaptcha-load-notice-title {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
}

.recaptcha-load-notice-description {
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
}

.recaptcha-load-notice-link {
    color: #8a4a00;
    text-decoration: underline;
}

.recaptcha-load-notice-close {
    position: absolute;
    top: 6px;
    right: 8px;
    width: 28px;
    height: 28px;
    padding: 0;
    line-height: 1;
    font-size: 20px;
    background: transparent;
    border: 0;
    color: #8a4a00;
    cursor: pointer;
    border-radius: 50%;
}

.recaptcha-load-notice-close:hover,
.recaptcha-load-notice-close:focus-visible {
    background: rgba(138, 74, 0, 0.12);
    outline: none;
}

.recaptcha-notice a {
    color: #555;
    text-decoration: underline;
}

/* ============================================
   PORTAL STATS SECTION
   ============================================ */
.portal-stats-section {
    display: block; /* Sekcja aktywna. Progi dotyczą treści statystyk, nie widoczności sekcji. */
    position: relative;
    background: linear-gradient(135deg, #001e33 0%, #003153 50%, #00263f 100%);
    padding: 2rem 0;
    overflow: hidden;
    margin-top: 0;
}

.portal-stats-bg-pattern {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 15% 50%, rgba(255,255,255,0.03) 0%, transparent 50%),
        radial-gradient(circle at 85% 20%, rgba(243,156,18,0.06) 0%, transparent 45%),
        radial-gradient(circle at 50% 90%, rgba(11, 74, 115,0.15) 0%, transparent 55%);
    pointer-events: none;
}

.portal-stats-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.portal-stats-title {
    font-size: 2rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 0.625rem;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.portal-stats-subtitle {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.6);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.6;
}

.portal-stats-grid {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 0;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    overflow: hidden;
    max-width: 900px;
    margin: 0 auto 1.5rem;
}

.portal-stat-card {
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.625rem 1.5rem;
    transition: background 0.25s ease;
}

.portal-stat-card:hover {
    background: rgba(255,255,255,0.05);
}

.portal-stats-divider {
    width: 1px;
    background: rgba(255,255,255,0.1);
    align-self: stretch;
    margin: 1rem 0;
    flex-shrink: 0;
}

.portal-stat-icon-wrap {
    flex-shrink: 0;
    width: 54px;
    height: 54px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(243,156,18,0.18) 0%, rgba(243,156,18,0.08) 100%);
    border: 1px solid rgba(243,156,18,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #F39C12;
    transition: transform 0.25s ease, background 0.25s ease;
}

.portal-stat-card:hover .portal-stat-icon-wrap {
    transform: translateY(-3px);
    background: linear-gradient(135deg, rgba(243,156,18,0.28) 0%, rgba(243,156,18,0.14) 100%);
}

.portal-stat-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    text-align: center;
}

.portal-stat-number {
    font-size: 2.25rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    min-width: 3ch;
    display: block;
}

.portal-stat-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
    line-height: 1.3;
    display: block;
}

.portal-stat-note {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.45);
    display: block;
    line-height: 1.3;
}

.portal-stats-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.portal-stats-cta-lead {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.55);
    margin: 0;
    letter-spacing: 0.01em;
}

.portal-stats-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #F39C12;
    color: #001e33;
    font-weight: 700;
    font-size: 0.9375rem;
    padding: 0.625rem 6rem;
    border-radius: 10px;
    text-decoration: none;
    transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 8px rgba(243,156,18,0.2);
    letter-spacing: 0.01em;
}

.portal-stats-cta-btn:hover {
    background: #e08c0e;
    color: #001e33;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(243,156,18,0.3);
    text-decoration: none;
}

/* ============================================
   MEDIA QUERIES - ZOPTYMALIZOWANE I UPORZĄDKOWANE
   ============================================ */

/* 1200px - Desktop large */
@media (max-width: 1200px) {
    .container {
        width: 90%;
    }

    .header-container {
        width: 90%;
    }

    .stats-panel {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero .form-border {
        max-width: 90%;
    }
}

@media (min-width: 1024px) {
    .blog-list {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .related-grid { 
        grid-template-columns: repeat(3, 1fr); 
    }
}

/* 992px - Tablet landscape (połączono z 1024px) */
@media (max-width: 992px) {
    .hero .advanced-filters {
        padding: 1.25rem;
    }

    /* Hero filters — grid/gap pierwszego i trzeciego rzędu jest zdefiniowany
     * w advanced-filters.css (#heroFilterForm media queries). Tu nie powielamy. */

    /* Navigation - z 992px */
    header nav ul {
        gap: 15px;
    }

    header nav ul li {
        margin-left: 0;
    }

    .hero {
        padding: 2.1875rem 0;
        background-size: cover;
        background-position: center 25%;
        min-height: auto;
    }

    .hero h2,
    .hero p {
        display: none;
    }

    .hero .hero-title {
        font-size: 1.75rem;
        margin-top: 1.25rem;
        margin-bottom: 0.5rem;
    }

    .hero .form-row:first-child {
        flex-direction: row;
        margin-bottom: 0.9375rem;
    }

    .hero .form-row:first-child .form-group {
        flex: 1;
        min-width: 150px;
        margin-bottom: 0;
    }

    .hero .form-row:last-child {
        flex-direction: column;
    }

    .hero .form-row:last-child .form-group {
        width: 100%;
        margin-bottom: 0.625rem;
    }

    .hero .form-section {
        padding: 0.9375rem;
    }

    .hero .form-group input[type="text"],
    .hero .form-group input[type="email"],
    .hero .form-group input[type="password"],
    .hero .form-group input[type="number"],
    .hero .form-group select,
    .hero .form-group textarea {
        font-size: 16px;
    }

    .footer {
        padding: 1.25rem 0 0.875rem;
    }

    .footer .footer-container {
        text-align: center;
        gap: 12px;
    }

    .footer-city-panel,
    .footer-main-panel {
        padding: 1.25rem 1.5rem;
    }

    .footer-city-nav {
        column-count: 4;
        text-align: left;
    }

    .footer-main-panel {
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 1rem;
    }

    .footer-logo-link,
    .footer-socials,
    .footer-legal-line {
        justify-content: center;
    }

    .footer-main-nav {
        max-width: 720px;
    }

    .footer-legal-line {
        text-align: center;
    }

    .footer-social-link {
        width: 1.125rem;
        height: 1.125rem;
    }

    header nav .dropdown-content {
        top: calc(100% + 12px);
        left: 50%;
        transform: translateX(-50%);
        width: auto;
    }
}

/* 798px - Luka responsywności dla nav-list */
@media (max-width: 798px) {
    header nav ul {
        gap: 8px;
    }
    
    header nav ul li a,
    header nav ul li .dropbtn,
    header .add-listing-btn {
        font-size: 1em;
        padding: 0.375rem 0.625rem;
    }
}

/* 992px-577px: grid/flex pierwszego i trzeciego rzędu hero search
 * jest zdefiniowany w advanced-filters.css — unikamy duplikacji. */

/* 768px - Tablet portrait */
@media (max-width: 768px) {
    .portal-stats-section {
        padding: 1.5rem 0;
    }

    .portal-stats-title {
        font-size: 1.5625rem;
    }

    .portal-stats-grid {
        flex-direction: column;
        border-radius: 12px;
        max-width: 480px;
    }

    .portal-stat-card {
        padding: 1.25rem 1.25rem;
    }

    .portal-stats-divider {
        width: auto;
        height: 1px;
        margin: 0 1.25rem;
        align-self: auto;
    }

    .portal-stat-number {
        font-size: 2rem;
    }

    /* Body overflow */
    body {
        overflow-x: hidden;
    }

    /* Hero form refinements (z usuniętego 850px) */

    .hero .form-row:nth-child(1) .form-group,
    .hero .form-row:nth-child(2) .form-group {
        flex-basis: calc(50% - 10px);
        min-width: 0;
    }

    .hero .form-row:nth-child(2) .form-group:last-child {
        flex-basis: 100%;
    }

    .hero .filter-row-inputs {
        margin-bottom: 0;
    }

    .hero .form-group input[type="text"],
    .hero .form-group input[type="email"],
    .hero .form-group input[type="password"],
    .hero .form-group input[type="number"],
    .hero .form-group select,
    .hero .form-group textarea {
        font-size: 16px;
        padding: 0.5rem 0.375rem;
    }

    .hero #heroFilterRegion,
    .hero #heroFilterCategory {
        padding-right: 1.5625rem;
    }

    .hero .form-row:nth-child(2) {
        margin-top: 0.9375rem;
    }

    .hero .hero-title {
        font-size: 1.5rem;
        margin-top: 0.875rem;
    }
    
    /* Footer */
    .footer {
        margin-top: 1rem;
        padding: 1rem 0 0.75rem;
    }

    .footer .footer-container {
        gap: 8px;
    }

    .footer-city-panel,
    .footer-main-panel {
        border-radius: 14px;
        padding: 1.125rem;
    }

    .footer-city-title {
        margin-bottom: 0.875rem;
        font-size: 0.95rem;
    }

    .footer-city-nav {
        column-count: 3;
        column-gap: 1rem;
    }

    /* Header */
    .header-container {
        flex-direction: column;
    }

    header .header-top-row {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    header .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    #user-settings .container {
        width: 90%;
        padding: 0 15px;
    }

    header nav ul {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
        width: 100%;
        margin-top: 0;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transform: translateY(-6px);
        pointer-events: none;
        transition: max-height 0.25s ease, opacity 0.2s ease, transform 0.2s ease, margin-top 0.2s ease;
    }

    header nav ul.nav-list.is-open {
        padding: 0.625rem 0 10px 0;
        max-height: 70vh;
        overflow: auto;
        opacity: 1;
        transform: none;
        pointer-events: auto;
    }

    header nav ul li {
        width: 100%;
        text-align: center;
    }
    
    /* W mobile view: usunięcie border-u z przycisku dla równych odstępów */
    header .add-listing-btn {
        border: none !important;
        background-color: transparent !important;
        color: #ffffff !important;
        padding: 0.5rem 1rem !important;
    }
    
    header .add-listing-btn:hover,
    header .add-listing-btn:focus {
        background-color: #F39C12 !important;
        color: #ffffff !important;
    }

    header nav .dropdown {
        width: 100%;
        display: block;
        text-align: center;
    }

    header nav .dropbtn {
        display: inline-block;
        width: auto;
        padding: 0.375rem 0.9375rem;
    }

    header nav .dropbtn:focus {
        outline: none;
    }

    header nav .dropbtn:hover .arrow-icon {
        transform: none;
    }

    header nav .dropdown.active .arrow-icon {
        transform: rotate(180deg);
    }

    header nav .dropdown-content {
        display: none;
        width: calc(100% - 24px);
        margin: auto;
        box-sizing: border-box;
        background-color: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.15);
        border-radius: 8px;
        text-align: left;
        position: static;
        transform: none;
        box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
        min-width: auto;
        max-width: none;
        opacity: 0;
        visibility: hidden;
        transition: none;
    }

    header nav .dropdown.active .dropdown-content {
        display: block;
        opacity: 1;
        visibility: visible;
    }

    header nav .dropdown-content a {
        color: rgba(255, 255, 255, 0.9) !important;
        padding: 0.625rem 1.25rem;
        font-size: 0.95em;
        font-weight: 500;
        text-align: center;
        display: block;
        text-decoration: none;
        border-radius: 4px;
        transition: background-color 0.15s ease, color 0.15s ease;
    }

    header nav .dropdown-content a:hover,
    header nav .dropdown-content a:focus {
        background-color: rgba(255, 255, 255, 0.12);
        color: #fff !important;
    }

    header nav .dropdown-content a.logout-option {
        color: #ff8a80 !important;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 0 0 4px 4px;
    }

    header nav .dropdown-content a.logout-option:hover,
    header nav .dropdown-content a.logout-option:focus {
        background-color: rgba(255, 138, 128, 0.12);
        color: #ff5252 !important;
    }

    header .logo .logo-svg {
        height: 49px;
        max-width: 186px;
        margin-bottom: 0;
    }

    header nav ul li .dropbtn {
        padding: 0.375rem 0.625rem;
    }

    /* Hero */
    .hero {
        padding: 1.25rem 0;
    }

    .hero .form-border {
        max-width: 95%;
        padding: 0.9375rem;
    }

    .hero .form-section {
        padding: 0.9375rem 0.625rem;
    }

    .hero .form-row {
        flex-direction: column;
        gap: 12px;
    }

    .hero .form-group {
        width: 100%;
        max-width: none;
        margin-bottom: 0;
    }

    .hero .form-row:nth-child(2) .form-group {
        flex-basis: 100%;
    }

    .hero .form-row,
    .hero .form-row:first-child {
        flex-direction: column;
        gap: 12px;
    }

    .hero .form-row .form-group {
        width: 100%;
        margin-bottom: 0;
    }

    /* Main content */
    main {
        padding-top: 1.25rem;
        padding-bottom: 1.25rem;
    }

    .form-section {
        padding: 0.9375rem;
    }

    .form-group label {
        margin-bottom: 0.5rem;
    }

    .listing {
        padding: 0.75rem 0.75rem 0.5rem 0.75rem;
    }

    .listing-header {
        padding: 0;
    }

    /* Blog */
    .blog-container {
        width: 92%;
    }

    .blog-title {
        font-size: 2.5rem;
    }
    
    .blog-article-title {
        font-size: 2rem;
    }
    
    .blog-article-header,
    .blog-article-content,
    .blog-article-footer {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .blog-category-nav {
        margin-bottom: 2rem;
    }

    .blog-category-list {
        justify-content: flex-start;
    }

    .blog-breadcrumbs {
        flex-wrap: wrap;
    }

    .blog-contextual-links,
    .blog-eeat-box {
        padding: 1.25rem;
    }

    .blog-eeat-box-header h2 {
        font-size: 1.35rem;
    }

    .blog-article-content table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        font-size: 0.875rem;
    }

    .blog-article-content table th,
    .blog-article-content table td {
        padding: 0.5rem 0.75rem;
    }
    
    .post-nav {
        flex-direction: column;
        gap: 16px;
    }

    .hm-btn-secondary {
        border-width: 2px;
    }

    .legal-content table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* 576px - Mobile landscape (połączono z 640px) */
@media (max-width: 576px) {
    .hero .hero-title {
        font-size: 1.375rem;
        margin-top: 0.75rem;
    }

    .hero .advanced-filters--with-hero-title .hero-title {
        margin-top: 0;
        margin-bottom: 0.875rem;
        font-size: 1.25rem;
        line-height: 1.25;
        color: #003153;
        text-shadow: none;
        background-color: #fff;
        text-align: center;
    }
 
    .portal-stats-section {
        padding: 1.25rem 0;
    }

    .portal-stats-header {
        margin-bottom: 1rem;
    }

    .portal-stats-title {
        font-size: 1.25rem;
    }

    .portal-stats-grid {
        max-width: 100%;
        border-radius: 10px;
    }

    .portal-stat-card {
        padding: 1rem 1rem;
        gap: 0.875rem;
    }

    .portal-stat-icon-wrap {
        width: 46px;
        height: 46px;
        border-radius: 10px;
    }

    .portal-stat-icon-wrap svg {
        width: 26px;
        height: 26px;
    }

    .portal-stat-number {
        font-size: 1.75rem;
    }

    .blog-container {
        width: 96%;
        padding: 2rem 1rem;
    }

    .blog-category-list {
        gap: 8px;
    }

    .blog-category-chip {
        font-size: 0.875rem;
        padding: 0.55rem 0.875rem;
    }

    .blog-contextual-links-title,
    .blog-eeat-box-header h2 {
        font-size: 1.15rem;
    }

    .blog-contextual-link-desc,
    .blog-eeat-summary,
    .blog-eeat-list li {
        font-size: 0.95rem;
    }

    .grecaptcha-badge {
        visibility: hidden;
    }

    .recaptcha-notice {
        display: block;
    }

    .recaptcha-load-notice {
        left: 12px;
        right: 12px;
        bottom: 12px;
        max-width: none;
        font-size: 13px;
    }

    .recaptcha-load-notice-description {
        font-size: 12.5px;
    }


    .hm-btn {
        padding: 0.625rem 1.25rem;
        white-space: normal;
    }

    h1 {
        font-size: 1.6em;
    }

    h2 {
        font-size: 1.35em;
    }

    h3 {
        font-size: 1.15em;
    }
 
    /* Hero advanced filters (z usuniętego 640px) */
    .hero .advanced-filters {
        padding: 1rem;
    }
     
    .hero .filter-row-inputs {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .hero input.location-input,
    .hero select#heroFilterDistance {
        font-size: 16px;
        min-height: 44px;
    }

    .hero .multi-select-trigger {
        font-size: 16px;
        min-height: 44px !important;
        max-height: 44px;
    }

    .small-text {
        font-size: 14px;
    }
    
    .hero .filter-row-buttons {
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
        margin-bottom: 0;
        align-items: center;
        justify-content: flex-start;
    }
    
    .hero .filter-row-buttons .filter-group {
        flex: 1 1 140px;
        min-width: 0;
    }

    .footer {
        padding: 0.875rem 0 0.625rem;
    }

    .footer .footer-container {
        gap: 6px;
    }

    header {
        padding: 0;
    }

    .header-container {
        padding: 0.625rem 0;
    }

    .access-expired-banner,
    .access-warning-banner {
        padding: 0.375rem 0.75rem;
        font-size: 14px;
    }

    .access-banner-action {
        width: 100%;
        max-width: 320px;
        padding: 0.625rem 0.875rem;
        box-sizing: border-box;
    }

    header .logo .logo-svg {
        height: 47px;
        max-width: 178px;
    }

    .container {
        width: 95%;
        padding: 0 10px;
    }

    .hero {
        padding: 0.9375rem 0;
    }

    .hero .form-border {
        max-width: 100%;
        margin: 0 10px;
    }

    .hero .form-section {
        padding: 0.625rem 0.5rem;
    }

    .hero .form-row {
        gap: 10px;
    }

    .hero .btn {
        padding: 0.5rem;
        font-size: 16px;
    }

    .stats-panel {
        grid-template-columns: 1fr;
    }

    .footer-city-panel,
    .footer-main-panel {
        padding: 1rem 0.875rem;
    }

    .footer-city-nav {
        column-count: 2;
    }

    .footer-city-nav a,
    .footer-main-nav a,
    .footer-legal-line,
    .footer-legal-line a {
        font-size: 0.82rem;
    }

    .footer-main-nav {
        gap: 0.4rem 0.75rem;
    }

    .footer-logo {
        width: 145px;
    }

    .footer-legal-line {
        gap: 0.375rem 0.75rem;
    }

    .legal-content th,
    .legal-content td {
        padding: 0.5rem;
        font-size: 0.82em;
    }

    .blog-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
    }

    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 480px - Mobile portrait (połączono z 420px) */
@media (max-width: 480px) {
    .hero .hero-title {
        font-size: 1.219rem; /* 19,5px */
        margin-top: 0.625rem;
    }

    .blog-container {
        width: 100%;
        padding: 1.5rem 0.75rem;
    }

    .blog-category-chip {
        width: 100%;
        justify-content: space-between;
    }

    .blog-contextual-links,
    .blog-eeat-box {
        padding: 1rem;
        border-radius: 16px;
    }

    .blog-eeat-box-header {
        align-items: flex-start;
    }

    .footer {
        padding: 0.75rem 0.5rem 0.5rem;
    }

    .footer .footer-container {
        gap: 5px;
    }

    h1 {
        font-size: 1.45em;
    }

    h2 {
        font-size: 1.25em;
    }

    h3 {
        font-size: 1.1em;
    }

    .container {
        width: 100%;
        padding: 0 5px;
    }

    header .logo .logo-svg {
        height: 41px;
        max-width: 157px;
    }

    header .nav-toggle:focus {
    outline: 2px solid rgba(255, 255, 255, 0.9);
    outline-offset: 2px;
    }

    .hero p {
        font-size: 0.875em;
    }

    .btn {
        padding: 0.625rem 1rem;
        font-size: 14px;
        min-height: 44px;
        box-sizing: border-box;
    }

    .hero .form-section {
        padding: 0.5rem;
    }

    .hero .form-row {
        gap: 8px;
    }

    .hero input.location-input,
    .hero select#heroFilterDistance {
        font-size: 16px;
        min-height: 44px;
    }

    .hero .multi-select-trigger {
        font-size: 16px;
        min-height: 44px !important;
        max-height: 44px;
    }

    .footer-city-panel,
    .footer-main-panel {
        border-radius: 12px;
        padding: 0.875rem 0.75rem;
    }

    .footer-city-title {
        font-size: 0.9rem;
        text-align: left;
    }

    .footer-city-nav a,
    .footer-main-nav a,
    .footer-legal-line a {
        min-height: 24px;
        display: inline-flex;
        align-items: center;
    }

    .footer-city-nav a {
        width: 100%;
        min-width: 0;
        white-space: normal;
        overflow-wrap: anywhere;
        box-sizing: border-box;
    }

    .footer-main-nav {
        align-items: stretch;
    }

    .footer-legal-line {
        flex-direction: column;
        text-align: center;
        gap: 0.25rem;
    }
    
    #login .container,
    #register .container,
    #contact-us .container,
    #forgottenPassword .container,
    #user-settings .container {
        width: 100% !important;
        padding: 0 8px !important;
    }

    .hero .form-border {
        margin: 0 8px;
        max-width: 95%;
    }

    .hero .form-section {
        padding: 0.5rem 0.375rem;
    }

    .hero .btn {
        padding: 0.4375rem 0.75rem;
    }
}

/* ==================== ERROR PAGES ==================== */
.error-page {
    text-align: center;
    padding: 4rem 2rem;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.error-code {
    font-size: 6rem;
    font-weight: bold;
    color: #003153;
    margin: 0;
}

.error-code--danger {
    color: #dc3545;
}

.error-message {
    font-size: 1.5rem;
    margin: 1rem 0;
    color: #333;
}

.error-description {
    color: #666;
    margin-bottom: 2rem;
    max-width: 600px;
}

.btn-home {
    background: #F39C12;
    color: white;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 6px;
    display: inline-block;
    transition: background 0.3s;
    margin-right: 0.625rem;
}

.btn-home:hover {
    background: #e08c0e;
    color: white;
}

.btn-secondary {
    background: #f1f5f9;
    color: #374151;
    border: 1px solid #d1d5db;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 6px;
    display: inline-block;
    transition: background 0.3s, border-color 0.3s;
}

.btn-secondary:hover {
    background: #e2e8f0;
    border-color: #9ca3af;
    color: #374151;
}

/* Print styles */
@media print {
    .header,
    .footer,
    .nav-list,
    .form-border,
    .btn,
    .action-btn,
    .filter-buttons,
    .sorting-options {
        display: none !important;
    }

    .container {
        width: 100%;
        margin: 0;
        padding: 0;
    }
}