/*
Theme Name: CUPT Press Room
Theme URI: https://cupt.gov.pl
Author: WSK CUPT
Description: Press room dla dziennikarzy.
Version: 1.1
Text Domain: cupt-press
*/

@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap');

/* ==============================================================
   1. ZMIENNE (VARIABLES)
============================================================== */
:root {
    --cupt-blue: #243880;
    --cupt-gray: #E5E4E2;
    --cupt-white: #ffffff;
    --cupt-ok-blue: #2B4E6C;
    --cupt-ok-green: #9DC124;
}

/* ==============================================================
   2. USTAWIENIA GLOBALNE I TYPOGRAFIA
============================================================== */
body {
    background-color: #f5f6f8;
    color: var(--cupt-blue);
    font-family: 'Open Sans', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
}

html { scroll-behavior: smooth; scroll-padding-top: 120px; }

h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 700; letter-spacing: -0.01em; }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 600; }
h4 { font-size: clamp(1.25rem, 2vw, 1.75rem); font-weight: 600; }

.content h1, .content h2, .content h3, .content h4 { margin-top: 2rem; margin-bottom: 1rem; color: var(--cupt-blue); }
.material-symbols-outlined { vertical-align: middle; line-height: 1; }

mark.cupt-highlight { background-color: rgba(36, 56, 128, 0.08); color: var(--cupt-blue); padding: 0.1rem 0.3rem; border-radius: 0.25rem; font-weight: 800; }

/* FIX: Globalne zabezpieczenie przed rozbijaniem widoku */
.post-content img, .content img, .post-content iframe, .content iframe { max-width: 100% !important; height: auto !important; }

/* ZAAWANSOWANE STYLOWANIE TABEL */
.post-content table, .content table {
    width: 100%; max-width: 100% !important; border-collapse: collapse; margin-bottom: 2.5rem;
    background-color: var(--cupt-white); border-radius: 0.25rem; box-shadow: 0 4px 16px rgba(36, 56, 128, 0.04);
    border: 1px solid rgba(36, 56, 128, 0.08); overflow: hidden;
}
.post-content table th, .content table th, .post-content table td, .content table td {
    padding: 1rem 1.25rem; border-bottom: 1px solid rgba(36, 56, 128, 0.06); vertical-align: middle; color: #4a5568; line-height: 1.5;
}
.post-content table th, .content table th { background-color: rgba(36, 56, 128, 0.03); color: var(--cupt-blue); font-weight: 700; text-align: left; border-bottom: 2px solid rgba(36, 56, 128, 0.08); }
.post-content table tr:hover, .content table tr:hover { background-color: rgba(36, 56, 128, 0.015); }
.post-content table tr:last-child th, .post-content table tr:last-child td { border-bottom: none; }

/* FIX PRO: Zaawansowane łamanie tekstu (Wdowy i Bękarty) */
p, li, .text-muted {
    text-wrap: pretty; /* Zapobiega pojedynczym, "osieroconym" wyrazom w ostatniej linii akapitu */
}

h1, h2, h3, h4, h5, h6, .card-title, .modal-title {
    text-wrap: balance; /* Optycznie równoważy długość wierszy w nagłówkach */
}

.glass-panel h1, .glass-panel h2, .glass-panel h3, .glass-panel p, .glass-panel a:not(.btn) {
    color: var(--cupt-blue) !important;
}

.text-cupt-blue {
    color: var(--cupt-blue) !important;
}

/* ==============================================================
   3. NAWIGACJA I HEADER (GLASSMORPHISM)
============================================================== */
header.glass-panel {
    background: rgba(255, 255, 255, 0.85) !important; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid rgba(36, 56, 128, 0.08);
}
#primaryMenu .menu-item a { color: var(--cupt-blue) !important; font-weight: 600; font-size: 0.95rem; padding: 0.5rem 1rem; border-radius: 0.25rem; transition: all 0.3s ease; text-decoration: none !important; display: block; }
#primaryMenu .menu-item a:hover, #primaryMenu .menu-item a:focus { background-color: rgba(36, 56, 128, 0.05); transform: translateY(-1px); }
.navbar-brand, .navbar-brand:focus, .navbar-brand:active, .navbar-brand * { outline: none !important; box-shadow: none !important; text-decoration: none !important; }

.animated-toggler { width: 44px; height: 44px; padding: 0; display: flex; align-items: center; justify-content: center; color: var(--cupt-blue); background: rgba(36, 56, 128, 0.05); border-radius: 0.25rem; transition: background-color 0.3s ease; }
.animated-toggler:hover, .animated-toggler:focus { background: rgba(36, 56, 128, 0.1); color: var(--cupt-blue); outline: none; box-shadow: none; }
.toggler-icon-wrapper { width: 24px; height: 24px; position: relative; }
.animated-toggler .icon-menu, .animated-toggler .icon-close { position: absolute; top: 50%; left: 50%; transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55); }
.animated-toggler .icon-menu { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0) !important; }
.animated-toggler .icon-close { opacity: 0; transform: translate(-50%, -50%) scale(0.2) rotate(-45deg) !important; }
.animated-toggler[aria-expanded="true"] .icon-menu { opacity: 0; transform: translate(-50%, -50%) scale(0.2) rotate(45deg) !important; }
.animated-toggler[aria-expanded="true"] .icon-close { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0) !important; }

.cupt-search-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(255, 255, 255, 0.98); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); z-index: 1050; opacity: 0; visibility: hidden; transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s; }
.cupt-search-overlay.is-active { opacity: 1; visibility: visible; display: flex !important; }
.cupt-search-close { position: absolute; top: 2rem; right: 2rem; background: var(--cupt-white); border: 1px solid rgba(36, 56, 128, 0.1); color: var(--cupt-blue); width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 4px 15px rgba(0,0,0,0.05); transition: transform 0.3s ease, background-color 0.3s ease; }
.cupt-search-close:hover { transform: rotate(90deg) scale(1.1); background-color: #f8f9fa; }
#cuptSearchInput:focus, #cuptSearchInput:active { box-shadow: none !important; outline: none !important; background-color: transparent !important; }

/* ==============================================================
   4. UI COMPONENTS (PRZYCISKI, BADGES, IKONY)
============================================================== */
.btn { text-decoration: none !important; font-weight: 600; letter-spacing: 0.02em; }
button:focus, input:focus, a:focus, .btn:focus { outline: none !important; box-shadow: 0 0 0 3px rgba(36, 56, 128, 0.15) !important; }

.btn-cupt { background-color: var(--cupt-blue) !important; color: var(--cupt-white) !important; border: none; transition: all 0.3s ease; }
.btn-cupt:hover, .btn-cupt:focus { background-color: #1a2a60 !important; box-shadow: 0 6px 16px rgba(36, 56, 128, 0.3) !important; outline: none !important; }

.btn-outline-cupt { color: var(--cupt-blue) !important; border: 2px solid rgba(36, 56, 128, 0.2) !important; background-color: transparent !important; transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); font-weight: 600; }
.btn-outline-cupt:hover, .btn-outline-cupt:focus { background-color: rgba(36, 56, 128, 0.04) !important; border-color: var(--cupt-blue) !important; box-shadow: 0 6px 16px rgba(36, 56, 128, 0.12) !important; transform: translateY(-2px); outline: none !important; }

.btn-read-more { padding: 0.5rem 1rem !important; font-size: 0.8rem !important; border-radius: 0.25rem; }

.filter-btn { border-radius: 0.25rem !important; padding: 0.4rem 1.2rem; font-size: 0.85rem; background-color: var(--cupt-white); color: var(--cupt-blue); border: 1px solid rgba(36, 56, 128, 0.2); transition: all 0.3s ease; white-space: nowrap; }
.filter-btn:hover { background-color: rgba(36, 56, 128, 0.05); }
.filter-btn.active { background-color: var(--cupt-blue); color: var(--cupt-white); border-color: var(--cupt-blue); box-shadow: 0 4px 10px rgba(36, 56, 128, 0.2); }
.filter-btn.active.filter-ok { background-color: var(--cupt-ok-blue); border-color: var(--cupt-ok-blue); box-shadow: 0 4px 10px rgba(43, 78, 108, 0.3); }

.badge-cupt { background-color: var(--cupt-blue); color: var(--cupt-white); }
.badge-ok { background-color: var(--cupt-ok-blue); color: var(--cupt-white); border-bottom: 2px solid var(--cupt-ok-green); }

.cupt-icon-box { background-color: var(--cupt-white); border: 1px solid rgba(36, 56, 128, 0.12); box-shadow: 0 4px 12px rgba(36, 56, 128, 0.06); display: inline-flex; align-items: center; justify-content: center; color: var(--cupt-blue); flex-shrink: 0 !important; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.cupt-icon-box:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(36, 56, 128, 0.1); }
.cupt-icon-box-sm { width: 40px; height: 40px; border-radius: 0.25rem; }
.cupt-icon-box-sm .material-symbols-outlined { font-size: 20px; line-height: 1; }
.cupt-icon-box-md { width: 56px; height: 56px; border-radius: 0.25rem; }
.cupt-icon-box-md .material-symbols-outlined { font-size: 28px; line-height: 1; }
.cupt-icon-box-lg { width: 64px; height: 64px; border-radius: 0.25rem; }
.cupt-icon-box-lg .material-symbols-outlined { font-size: 32px; line-height: 1; }
.cupt-icon-box-xl { width: 80px; height: 80px; border-radius: .25rem; }
.cupt-icon-box-xl .material-symbols-outlined { font-size: 40px; line-height: 1; }

.btn-color-blue { background-color: var(--cupt-blue); color: var(--cupt-white); }
.btn-color-blue:hover { background-color: #1a2a60; color: var(--cupt-white); }
.btn-color-ok-blue { background-color: var(--cupt-ok-blue); color: var(--cupt-white); }
.btn-color-ok-blue:hover { background-color: #1f3950; color: var(--cupt-white); }
.btn-color-ok-green { background-color: var(--cupt-ok-green); color: var(--cupt-blue); }
.btn-color-ok-green:hover { background-color: #8ab01d; color: var(--cupt-blue); }

/* ==============================================================
   5. LAYOUT (KARTY, KAFELKI, BRIEFING PRO)
============================================================== */
.cupt-card-hover { transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease; will-change: transform; }
.cupt-card-hover:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(36, 56, 128, 0.1) !important; background-color: var(--cupt-white) !important; }
.btn-card-action { font-weight: 700; transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease; border: none; }
.cupt-card-hover:hover .btn-card-action { box-shadow: 0 6px 16px rgba(0,0,0,0.15); }

.card.bg-white { transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease; will-change: transform; }
.card.bg-white:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(36, 56, 128, 0.08) !important; }
.card.bg-white:hover .btn-read-more { background-color: var(--cupt-blue); color: var(--cupt-white); box-shadow: 0 4px 12px rgba(36, 56, 128, 0.2); }
.card.bg-white:hover .card-img-top { transform: scale(1.03); }
.card.bg-white .position-relative { overflow: hidden; }
.card-img-top { transition: transform 0.4s ease; will-change: transform; }

.cupt-sm-card-wrapper { transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease; }
.cupt-sm-card-wrapper:hover { transform: translateY(-4px); box-shadow: 0 10px 20px rgba(36, 56, 128, 0.12) !important; }

/* BRIEFING / BREAKING NEWS (PRO DESIGN) */
.cupt-briefing-card {
    background: var(--cupt-white); border-radius: 0.25rem; padding: 1.25rem; box-shadow: 0 4px 20px rgba(36, 56, 128, 0.06);
    border: 1px solid rgba(36, 56, 128, 0.08); display: flex; flex-direction: column; gap: 1.25rem;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease;
}
.cupt-briefing-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(36, 56, 128, 0.1) !important; }
.briefing-content-wrapper { display: flex; flex-direction: column; align-items: flex-start; gap: 0.75rem; }
.briefing-badge {
    background-color: var(--cupt-blue); color: var(--cupt-white); font-size: 0.7rem; font-weight: 800;
    text-transform: uppercase; padding: 0.4rem 0.8rem; border-radius: .25rem; display: inline-flex; align-items: center; gap: 0.5rem;
    box-shadow: 0 4px 10px rgba(36, 56, 128, 0.15);
}
.briefing-badge .pulse-dot { width: 10px; height: 10px; background-color: #8c9eff; border-radius: 50%; animation: briefingPulse 2s infinite; flex-shrink: 0; }
@keyframes briefingPulse { 0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(140, 158, 255, 0.7); } 70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(140, 158, 255, 0); } 100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(140, 158, 255, 0); } }
.briefing-text { font-size: 0.95rem; font-weight: 600; color: #1a202c; line-height: 1.45; margin-top: 0.15rem; }
.briefing-btn { border-radius: 0.25rem; padding: 0.75rem 1.5rem; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 0.5rem; width: 100%; font-size: 0.95rem; }

@media (min-width: 768px) {
    .cupt-briefing-card { flex-direction: row; align-items: center; padding: 1.25rem 1.5rem; gap: 2rem; }
    .briefing-content-wrapper { flex-direction: row; align-items: center; gap: 1.25rem; }
    .briefing-text { margin-top: 0; }
    .briefing-btn { width: auto; margin-left: auto; flex-shrink: 0; }

    .search-modal-esc,
    .search-esc-text,
    .search-hint-esc {
        display: none !important;
    }
}

.cupt-breadcrumbs { font-size: 0.85rem; font-weight: 600; color: #8795a1; display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem; }
.cupt-breadcrumbs a { color: var(--cupt-blue); text-decoration: none; transition: color 0.2s ease, transform 0.2s ease; display: inline-flex; align-items: center; gap: 0.25rem; }
.cupt-breadcrumbs a:hover { color: var(--cupt-ok-blue); transform: translateX(2px); }
.cupt-breadcrumbs .separator { color: #cbd5e0; font-size: 1.2rem; line-height: 1; }
.cupt-breadcrumbs .current { color: #a0aec0; cursor: default; }

.cupt-date-badge { display: flex; align-items: center; gap: 0.75rem; }
.cupt-date-badge .day { font-size: 2.2rem; font-weight: 800; color: var(--cupt-blue); line-height: 1; padding-right: 0.75rem; border-right: 2px solid rgba(36, 56, 128, 0.2); }
.cupt-date-badge .month-year { display: flex; flex-direction: column; line-height: 1.2; font-size: 0.8rem; font-weight: 700; color: #6c757d; }
.cupt-date-badge .month { text-transform: uppercase; color: var(--cupt-blue); }

.card-date-badge { background-color: var(--cupt-white) !important; padding: 0.5rem 0.8rem; border-radius: 0.25rem; z-index: 10; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important; }
.card-date-badge .day { font-size: 1.6rem; padding-right: 0.5rem; border-right: 2px solid rgba(36, 56, 128, 0.2); }
.card-date-badge .month-year { font-size: 0.7rem; }

.pro-date-box { background: var(--cupt-blue) !important; color: var(--cupt-white) !important; border-radius: 0.25rem !important; padding: 0 !important; text-align: center; box-shadow: 0 4px 15px rgba(36, 56, 128, 0.12) !important; display: flex !important; flex-direction: column; justify-content: center; align-items: center; width: 85px; height: 85px; flex-shrink: 0; }
.pro-date-box::before { display: none !important; }
.pro-date-box .day { font-size: 1.8rem !important; font-weight: 800; line-height: 1 !important; margin-bottom: 0.15rem; }
.pro-date-box .month { font-size: 0.75rem !important; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: rgba(255,255,255,0.9) !important; line-height: 1 !important; }
.pro-date-box .year { font-size: 0.7rem !important; font-weight: 600; color: rgba(255,255,255,0.6) !important; line-height: 1 !important; margin-top: 0.2rem; }

.pro-page-header { display: flex; align-items: center; gap: 1.5rem; margin-bottom: 2.5rem; }
.pro-header-icon { display: flex; align-items: center; justify-content: center; width: 72px; height: 72px; background: var(--cupt-white); border: 1px solid rgba(36, 56, 128, 0.08); border-radius:.25rem; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05); color: var(--cupt-blue); flex-shrink: 0; }
.pro-header-icon .material-symbols-outlined { font-size: 36px; }
h1.pro-title { font-weight: 800; letter-spacing: -0.02em; color: var(--cupt-blue); margin: 0; }

/* ==============================================================
   6. KOMPONENTY ACF I WPISY
============================================================== */
.post-content a { color: var(--cupt-blue); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; transition: all 0.3s ease; font-weight: 600; }
.post-content a:hover { color: var(--cupt-blue); text-decoration-color: var(--cupt-blue); background-color: var(--cupt-gray); border-radius: 4px; padding: 0 10px;}

.cupt-toc { background: rgba(255, 255, 255, 0.65); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.cupt-toc .toc-link { color: var(--cupt-blue); transition: all 0.25s ease; }
.cupt-toc .toc-link:hover { color: var(--cupt-blue); transform: translateX(8px); }

.cupt-quote { background: rgba(255, 255, 255, 0.6); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-left: 4px solid var(--cupt-blue); border-radius: 0 .25rem .25rem 0; padding: 2.5rem 2rem 2rem 3rem; margin: 3rem 0; box-shadow: 0 10px 30px rgba(36, 56, 128, 0.05); position: relative; border: 1px solid rgba(255, 255, 255, 0.8); }
.cupt-quote-icon { 
    position: absolute; 
    top: -24px; 
    left: 1.25rem; /* Przesunięcie ikony do wewnątrz chroni przed ucinaniem przez overflow-hidden kontenera nadrzędnego */
    background: var(--cupt-blue); 
    color: var(--cupt-white); 
    width: 48px; 
    height: 48px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    border-radius: 50%; 
    box-shadow: 0 6px 16px rgba(36, 56, 128, 0.2); 
}
.cupt-quote-content { font-size: 1.15rem; font-style: italic; color: var(--cupt-blue); margin-bottom: 1.5rem; }
.cupt-quote-author { display: flex; align-items: center; gap: 1rem; border-top: 1px solid rgba(36, 56, 128, 0.1); padding-top: 1rem; }
.cupt-quote-author img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 3px solid var(--cupt-white); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }

/* Przeczytaj również (Nowoczesne Animacje) */
.cupt-read-more-modern { transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); border: 1px solid rgba(36, 56, 128, 0.08); position: relative; overflow: hidden; }
.cupt-read-more-modern::before { content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%; background-color: var(--cupt-blue); transform: scaleY(0); transition: transform 0.3s ease; transform-origin: bottom; }
.cupt-read-more-modern:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(36, 56, 128, 0.1) !important; border-color: rgba(36, 56, 128, 0.15) !important; }
.cupt-read-more-modern:hover::before { transform: scaleY(1); }
.cupt-read-more-modern .cupt-hover-arrow { transition: transform 0.3s ease, color 0.3s ease; }
.cupt-read-more-modern:hover .cupt-hover-arrow { transform: translateX(6px); }
.cupt-read-more-modern:hover .cupt-hover-arrow .material-symbols-outlined { color: var(--cupt-ok-green) !important; }

.cupt-agenda-item:last-child { border-bottom: none !important; }
.cupt-steps::before { content: ''; position: absolute; top: 0; bottom: 20px; left: 25px; width: 2px; background-color: rgba(36, 56, 128, 0.1); z-index: 1; }

/* ==============================================================
   7. SLIDERY I GALERIE (LIGHTBOX PRO)
============================================================== */
.hero-slide { height: 450px; background-size: cover; background-position: center; position: relative; }
.hero-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: linear-gradient(to top, rgba(36, 56, 128, 0.6) 0%, rgba(0, 0, 0, 0.2) 100%); }
.cupt-carousel-btn { width: 10%; opacity: 0.9; transition: opacity 0.3s ease; z-index: 10; }
.cupt-carousel-btn:hover { opacity: 1; }
.glass-arrow { font-size: 2rem; color: var(--cupt-blue); width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease; background: var(--cupt-white); border: 1px solid rgba(36, 56, 128, 0.1); }
.cupt-carousel-btn:hover .glass-arrow { transform: scale(1.15); box-shadow: 0 8px 16px rgba(0,0,0,0.15) !important; }
.carousel-indicators [data-bs-target] { background-color: var(--cupt-white); height: 6px; border-radius: 4px; border: none; opacity: 0.5; }
.carousel-indicators .active { background-color: var(--cupt-blue); opacity: 1; }
.shuffle-item { transition: opacity 250ms ease, transform 250ms ease; padding-bottom: 25px; }

/* Lightbox ACF (Zupełnie nowa, stabilna architektura) */
.cupt-lightbox {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: 10000;
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s;
    display: flex; align-items: center; justify-content: center;
}
.cupt-lightbox.is-active { opacity: 1; visibility: visible; pointer-events: auto; }
.cupt-lightbox-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; cursor: pointer;
    background: rgba(36, 56, 128, 0.95); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); z-index: 1;
}
.cupt-lightbox-content {
    position: relative; z-index: 2; max-width: 90vw; max-height: 85vh; outline: none;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.cupt-lightbox-content img { max-width: 100%; max-height: 80vh; object-fit: contain; border-radius: 0.25rem; box-shadow: 0 10px 40px rgba(0,0,0,0.4); }
.cupt-lightbox-loader { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: var(--cupt-white); z-index: 1; display: none; }
.cupt-spin { animation: cuptSpin 1s linear infinite; }
@keyframes cuptSpin { 100% { transform: rotate(360deg); } }
#cuptLbCaption { color: var(--cupt-white); margin-top: 1rem; font-size: 1.1rem; font-weight: 600; text-align: center; }

.cupt-lightbox-toolbar {
    position: absolute; top: 0; left: 0; width: 100%; padding: 1.5rem; z-index: 3; pointer-events: none;
    display: flex; justify-content: space-between; align-items: flex-start;
}
#cuptLbCounter { color: var(--cupt-white); font-weight: 700; font-size: 1rem; background: rgba(0,0,0,0.5); padding: 0.4rem 1rem; border-radius: .25rem; pointer-events: auto; backdrop-filter: blur(4px); }
#cuptLbClose {
    background: var(--cupt-white); color: var(--cupt-blue); width: 50px; height: 50px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; cursor: pointer; border: none; box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.2s ease; pointer-events: auto;
}
#cuptLbClose:hover { transform: rotate(90deg) scale(1.1); background-color: #f8f9fa; }

#cuptLbPrev, #cuptLbNext {
    position: absolute; top: 50%; transform: translateY(-50%); background: var(--cupt-white); color: var(--cupt-blue);
    width: 50px; height: 50px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; border: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2); transition: all 0.2s ease; z-index: 3;
}
#cuptLbPrev { left: 1.5rem; }
#cuptLbNext { right: 1.5rem; }
#cuptLbPrev:hover, #cuptLbNext:hover { transform: translateY(-50%) scale(1.1); background-color: var(--cupt-blue); color: var(--cupt-white); }

/* Styl kafelka galerii */
.cupt-gallery-overlay { opacity: 0; background: rgba(36, 56, 128, 0.4); backdrop-filter: blur(2px); transition: all 0.3s ease; }
.cupt-gallery-item:hover .cupt-gallery-overlay { opacity: 1; }


.swipeable-ribbon, #category-filters, #expertTabs { display: flex !important; flex-wrap: nowrap !important; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 0.75rem; gap: 0.5rem; scrollbar-width: none; mask-image: linear-gradient(to right, black 90%, transparent 100%); -webkit-mask-image: linear-gradient(to right, black 90%, transparent 100%); }
.swipeable-ribbon::-webkit-scrollbar, #category-filters::-webkit-scrollbar, #expertTabs::-webkit-scrollbar { display: none; }

/* ==============================================================
   8. FORMULARZE (CF7, NEWSLETTER)
============================================================== */
.wpcf7 form label { font-weight: 700; font-size: 0.8rem; color: var(--cupt-blue); margin-bottom: 0.4rem; display: block; text-transform: none;}
.wpcf7-form-control.wpcf7-text, .wpcf7-form-control.wpcf7-textarea { background-color: #f4f6f9; border: 2px solid transparent; border-bottom: 2px solid rgba(36, 56, 128, 0.1); border-radius: 0.25rem; padding: 0.9rem 1.2rem; font-size: 1rem; color: var(--cupt-blue); transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); box-shadow: inset 0 2px 4px rgba(0,0,0,0.02); width: 100%; display: block; }
.wpcf7-form-control.wpcf7-text:hover, .wpcf7-form-control.wpcf7-textarea:hover { background-color: #eef1f6; }
.wpcf7-form-control.wpcf7-text:focus, .wpcf7-form-control.wpcf7-textarea:focus { background-color: var(--cupt-white); border-color: rgba(36, 56, 128, 0.1); border-bottom-color: var(--cupt-blue); box-shadow: 0 8px 25px rgba(36, 56, 128, 0.08); outline: none; transform: translateY(-2px); }
.wpcf7-form-control.wpcf7-textarea { resize: vertical; min-height: 120px; }

.wpcf7-acceptance .wpcf7-list-item { margin: 0; display: block; }
.wpcf7-acceptance label { display: flex !important; gap: 1rem; align-items: flex-start; cursor: pointer; text-transform: none; letter-spacing: normal; font-weight: normal; padding: 1.25rem; background: rgba(36, 56, 128, 0.02); border-radius: 0.25rem; border: 1px solid rgba(36, 56, 128, 0.06); transition: all 0.3s ease; margin-top: 1rem; }
.wpcf7-acceptance label:hover { background: rgba(36, 56, 128, 0.05); border-color: rgba(36, 56, 128, 0.15); transform: translateY(-1px); }
.cupt-cf7-acceptance input[type="checkbox"], .wpcf7-acceptance input[type="checkbox"] { appearance: none; -webkit-appearance: none; width: 1.5rem !important; height: 1.5rem !important; border: 2px solid rgba(36, 56, 128, 0.3) !important; border-radius: 0.25rem !important; outline: none !important; cursor: pointer; position: relative; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important; flex-shrink: 0; margin-top: 0.15rem; background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.cupt-cf7-acceptance input[type="checkbox"]:checked, .wpcf7-acceptance input[type="checkbox"]:checked { background-color: var(--cupt-blue) !important; border-color: var(--cupt-blue) !important; transform: scale(1.05); box-shadow: 0 4px 10px rgba(36, 56, 128, 0.2); }
.cupt-cf7-acceptance input[type="checkbox"]:checked::after, .wpcf7-acceptance input[type="checkbox"]:checked::after { content: ''; position: absolute; top: 40%; left: 50%; width: 6px; height: 12px; border: solid white; border-width: 0 2px 2px 0; transform: translate(-50%, -50%) rotate(45deg) scale(0); animation: checkmark-in 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; }
@keyframes checkmark-in { 0% { opacity: 0; transform: translate(-50%, -50%) rotate(45deg) scale(0); } 100% { opacity: 1; transform: translate(-50%, -50%) rotate(45deg) scale(1); } }
.wpcf7-list-item-label { font-size: 0.9rem; color: #6c757d; line-height: 1.6; padding-top: 0.1rem; }
.wpcf7-spinner { background-color: var(--cupt-blue) !important; }
.cf7-pro-submit-wrapper { transition: transform 0.3s ease, box-shadow 0.3s ease; }
.cf7-pro-submit-wrapper:hover { transform: translateY(-2px); }

/* ==============================================================
   9. FOOTER I WIDGETY
============================================================== */
.floating-widget { position: fixed; bottom: 30px; z-index: 1050; display: flex; flex-direction: column; gap: 12px; opacity: 0; pointer-events: none; transition: opacity 0.4s ease, transform 0.4s ease; transform: translateY(20px); }
.floating-widget.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.floating-socials { left: 20px; }
.floating-back-top { right: 20px; }
.btn-float { width: 42px; height: 42px; border-radius: 50%; background-color: var(--cupt-blue); color: var(--cupt-white) !important; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 10px rgba(36, 56, 128, 0.25); transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); text-decoration: none !important; border: none; }
.btn-float:hover { transform: scale(1.1) translateY(-3px); background-color: #1a2a60; box-shadow: 0 6px 15px rgba(36, 56, 128, 0.35); }
.btn-float svg { width: 18px; height: 18px; fill: currentColor; }
.cupt-footer-link { color: #6c757d; transition: color 0.2s ease, transform 0.2s ease; text-decoration: none; }
.cupt-footer-link:hover { color: var(--cupt-blue) !important; transform: translateY(-1px); }

/* ==============================================================
   10. UTILITIES I ANIMACJE
============================================================== */
.text-truncate-multiline { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; }
.hover-lift { transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease; }
.hover-lift:hover { transform: translateY(-4px); box-shadow: 0 10px 20px rgba(36, 56, 128, 0.12) !important; }

.small.fw-semibold > span.bg-light { background-color: var(--cupt-white) !important; box-shadow: 0 2px 6px rgba(36, 56, 128, 0.06) !important; color: var(--cupt-blue) !important; border: 1px solid rgba(36, 56, 128, 0.08) !important; transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease; cursor: default; }
.small.fw-semibold > span.bg-light:hover { transform: translateY(-3px); box-shadow: 0 8px 16px rgba(36, 56, 128, 0.12) !important; }

.icon-pulse-wrapper { position: relative; display: inline-flex; align-items: center; justify-content: center; }
.icon-pulse-wrapper::after { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; border-radius: 50% !important; background-color: var(--cupt-white); animation: icon-ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite; z-index: 1; opacity: 0.5; }
.icon-pulse-wrapper .material-symbols-outlined { position: relative; z-index: 2; }
@keyframes icon-ping { 75%, 100% { transform: scale(2.5); opacity: 0; } }

/* ==============================================================
   11. MEDIA QUERIES (MOBILE)
============================================================== */
@media (max-width: 991.98px) {
    .cupt-mobile-nav { background-color: rgba(255, 255, 255, 0.95); border-radius: 0.25rem; padding: 0.75rem; box-shadow: 0 4px 15px rgba(36, 56, 128, 0.08); border: 1px solid rgba(36, 56, 128, 0.1); margin-bottom: 1.5rem; }
    .cupt-mobile-nav .menu-item a { background-color: var(--cupt-white); border: 1px solid rgba(36, 56, 128, 0.08); margin-bottom: 0.5rem; padding: 0.85rem !important; border-radius: 0.25rem !important; color: var(--cupt-blue) !important; font-weight: 700; box-shadow: 0 2px 4px rgba(0,0,0,0.02); transition: all 0.3s ease; }
    .cupt-mobile-nav .menu-item:last-child a { margin-bottom: 0; }
    .cupt-mobile-nav .menu-item a:active { transform: scale(0.98); background-color: rgba(36, 56, 128, 0.05); }
}

@media (max-width: 768px) {
    .cupt-carousel-btn { display: none !important; }
    .hero-slide { height: 480px; }
    .cupt-steps::before { display: none; }
    .post-content table, .content table { display: block; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
}

@media (max-width: 576px) {
    /* Poprawki mobilne Lightboxa PRO */
    #cuptLbPrev, #cuptLbNext {
        top: 50% !important;
        bottom: auto !important;
        transform: translateY(-50%) !important;
        width: 44px !important;
        height: 44px !important;
        position: fixed !important;
    }
    #cuptLbPrev { left: 0.5rem !important; }
    #cuptLbNext { right: 0.5rem !important; }
    #cuptLbClose { width: 40px; height: 40px; }
    #cuptLbCounter { font-size: 0.85rem; padding: 0.3rem 0.8rem; }
    .cupt-lightbox-content img { max-height: 70vh; }
    
    .cupt-quote { padding: 2rem 1.5rem 1.5rem 1.5rem; } 
    .cupt-related-shortcode { flex-direction: column !important; text-align: center; gap: 1rem; } 
    .cupt-related-shortcode img { width: 80px !important; height: 80px !important; margin: 0 auto; } 
    .cupt-related-link { flex-direction: column !important; align-items: flex-start !important; gap: 1.25rem !important; }
    .cupt-related-link .cupt-related-icon { align-self: flex-end !important; }
}

@media (prefers-reduced-motion: reduce) {
    *, ::before, ::after { animation: none !important; transition: none !important; transform: none !important; scroll-behavior: auto !important; }
}

/* ==============================================================
   12. GENERATOR PDF W LOCIE (MEDIA PRINT)
============================================================== */
@media print {
    @page {
        size: A4 portrait;
        margin: 1.5cm;
    }
    /* Wymuszenie ukrycia bannera cookies oraz jego kontenera na wydrukach i w PDF */
    #cuptCookieBanner,
    .cookie-notice,
    [id*="cookie" i],
    [class*="cookie" i] {
        display: none !important;
    }

    /* UKRYWANIE ELEMENTÓW INTERFEJSU I WTYCZEK (COOKIES itp.) */
    header.sticky-top, footer, nav, aside, iframe, .btn, .cupt-breadcrumbs,
    .cupt-icon-box, section[aria-labelledby="media-section-title"],
    .cupt-category-ribbon, .cupt-related-posts, .newsletter-section,
    .floating-widget, #wpadminbar, .cupt-meta-section, .cupt-lightbox,
    [id*="cookie"], [class*="cookie"], [id*="cli-"], [class*="cli-"], 
    .cc-window, .cookie-notice, #onesignal-slidedown-container, 
    .pro-date-box, .badge, .cupt-briefing-card, .carousel, .filter-btn, 
    .search-modal-esc, .cupt-card-hover, .d-print-none {
        display: none !important;
    }

    /* RESETOWANIE TŁA I SZEROKOŚCI */
    body { background: #fff !important; color: #000 !important; font-size: 11pt !important; padding: 0 !important; margin: 0 !important; font-family: 'Open Sans', system-ui, sans-serif !important; }
    .container, main { max-width: 100% !important; margin: 0 !important; padding: 0 !important; width: 100% !important; }
    article, .bg-white, .glass-panel { box-shadow: none !important; border: none !important; background: transparent !important; padding: 0 !important; margin: 0 !important; }
    .border-print-0 { border: none !important; }
    .p-print-0 { padding: 0 !important; }
    .mb-print-0 { margin-bottom: 0 !important; }
    
    /* ZDJĘCIA W TREŚCI */
    img { max-width: 100% !important; height: auto !important; page-break-inside: avoid; border-radius: 0 !important; }
    figure { margin: 0 0 1cm 0 !important; page-break-inside: avoid; }
    
    /* TREŚĆ */
    .post-content { font-size: 11pt !important; line-height: 1.6 !important; }
    p, li { text-align: left !important; orphans: 3; widows: 3; color: #000 !important; }
    h1, h2, h3, h4 { color: #000 !important; text-align: left !important; page-break-after: avoid; }
    .post-content h2, .post-content h3 { margin-top: 1cm !important; margin-bottom: 0.3cm !important; }
    
    /* FIX PRO: TABELE W DRUKU - Zawijanie tekstu i usuwanie pasków przewijania */
    .cupt-table-wrapper {
        overflow: visible !important;
        display: block !important;
    }

    .post-content table, .content table { 
        display: table !important; 
        width: 100% !important; 
        max-width: 100% !important;
        overflow: visible !important; 
        page-break-inside: auto !important; 
    }

    .post-content table tr, .content table tr { 
        page-break-inside: avoid !important; /* Zapobiega ucinaniu wiersza w połowie na przełamaniu strony */
        page-break-after: auto !important; 
    }

    .post-content table th, .post-content table td, .content table th, .content table td { 
        white-space: normal !important; 
        word-break: break-word !important; 
        overflow-wrap: break-word !important; 
    }
    
    .cupt-toc { 
        margin-bottom: 1.5cm !important; /* Nadpisuje reset marginesów z .glass-panel */
    }

    .cupt-quote-icon { 
        display: none !important; /* Ukrywa lewitującą ikonę w druku */
    }

    .cupt-quote { 
        padding: 1rem 1rem 1rem 1.5rem !important; /* Zmniejsza gigantyczne wcięcia po usuniętej ikonie */
        margin: 1cm 0 !important;
    }
    
    a { text-decoration: none !important; color: #000 !important; }
    
    /* FIX PRO: Czysty wydruk z Kreatora Treści (B&W, brak teł, cieni i ukrytych treści) */
    .cupt-kreator-tresci * {
        background: transparent !important;
        color: #000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
        filter: none !important;
    }
    
    /* Wymuszenie drukowania kolorów dla flagowanych modułów (Wykresy, Progress Bar) */
    .cupt-keep-colors, .cupt-keep-colors * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    .cupt-kreator-tresci *:not(.cupt-keep-colors, .cupt-keep-colors *) {
        background: transparent !important;
        color: #000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
        filter: none !important;
    }

    .cupt-kreator-tresci .bg-light,
    .cupt-kreator-tresci .bg-white,
    .cupt-kreator-tresci .border-light {
        border: 1px solid #ccc !important; /* Subtelna ramka zachowująca czytelność bloków */
        padding: 15px !important;
        margin-bottom: 20px !important;
        page-break-inside: avoid !important;
    }

    /* Wymuszenie otwarcia wszystkich paneli FAQ w PDF */
    .cupt-kreator-tresci .accordion-collapse {
        display: block !important;
        height: auto !important;
        visibility: visible !important;
    }
    .cupt-kreator-tresci .accordion-button::after {
        display: none !important;
    }

    /* Wyłączenie animacji w druku (zapobiega pustym/rozmazanym polom na kartce) */
    .cupt-kreator-tresci .animate-on-scroll,
    .cupt-kreator-tresci .cupt-value-reveal {
        opacity: 1 !important;
        transform: none !important;
        filter: blur(0) !important;
        transition: none !important;
        animation: none !important;
    }
    
    .post-content *,
    .content *,
    .cupt-quote *,
    .cupt-read-more-modern * {
        color: #000 !important;
        text-shadow: none !important;
    }

    .cupt-quote {
        border-left: 3px solid #ccc !important; /* Zamienia granatowy pasek na neutralny szary */
        background: transparent !important;
        box-shadow: none !important;
    }

    /* ==============================================================
    FIX PRO: STATYSTYKI, WYKRESY I PASKI W DRUKU
    ============================================================== */

    .progress {
        background-color: transparent !important; 
        border: 1px solid #dcdcdc !important;
        overflow: hidden !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .cupt-progress-bar {
        width: var(--cupt-print-width) !important;
        background-color: var(--cupt-print-color) !important;
        border: 5px solid var(--cupt-print-color) !important; 
        box-sizing: border-box !important;
        border-radius: 50rem !important;
        transition: none !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .cupt-counter {
        font-size: 0 !important; 
    }
    .cupt-counter::after {
        content: attr(data-target);
        font-size: 2.5rem;
    }

    .chart-container,
    .cupt-observe-chart div.position-relative {
        width: 100% !important;
        max-width: 100% !important;
        page-break-inside: avoid !important;
    }

    canvas#cuptChart, 
    canvas[id^="cuptChart-"] {
        max-width: 100% !important;
        height: auto !important;
        object-fit: contain !important;
        page-break-inside: avoid !important;
    }

    .cupt-keep-colors .progress,
    .cupt-keep-colors .progress-bar,
    .cupt-observe-progress .progress,
    .cupt-observe-progress .progress-bar {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .cupt-svg-stroke-path {
        stroke-dashoffset: 0 !important;
    }

    .cupt-svg-animated-icon-wrap {
        background-color: transparent !important;
        border: 1px solid #ccc !important;
        color: #000 !important; /* Dzięki PHP currentColor samo zmieni się na czarne w druku! */
    }

    .cupt-draw-stat-box {
        background: transparent !important;
        border: 1px solid #ccc !important;
        page-break-inside: avoid !important;
    }

    .cupt-draw-amount {
        color: #000 !important;
    }
}

/* ==============================================================
   14. WSPARCIE DLA NATYWNEGO WYRÓWNYWANIA WORDPRESSA W EDYTORZE
============================================================== */
.post-content .aligncenter {
    clear: both;
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1.5rem;
    margin-top: 1.5rem;
}

.post-content .alignleft {
    display: inline;
    float: left;
    margin-right: 1.5rem;
    margin-bottom: 1.5rem;
    margin-top: 0.5rem;
}

.post-content .alignright {
    display: inline;
    float: right;
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
    margin-top: 0.5rem;
}

/* Zabezpieczenie dla elementów opływających po obrazkach */
.post-content::after {
    content: "";
    clear: both;
    display: table;
}

/* Wygładzenie natywnych podpisów pod zdjęciami (Gutenberg / Classic) */
.post-content .wp-caption {
    max-width: 100%;
    margin-bottom: 1.5rem;
}

.post-content .wp-caption-text {
    font-size: 0.85rem;
    color: var(--cupt-blue);
    opacity: 0.8;
    text-align: center;
    margin-top: 0.5rem;
    padding: 0;
}

/* ==============================================================
   PANEL UDOSTĘPNIANIA (SOCIAL SHARE) - PRO UI (Bez zielonego!)
============================================================== */

.btn-share {
    background-color: #ffffff;
    color: var(--cupt-blue);
    border: 1px solid #d1d5db; /* Neutralny, estetyczny szary border */
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    font-size: 0.95rem;
}

/* Ujednolicony efekt Hover - wszystko w firmowy granat */
.btn-share:hover, 
.btn-share:focus {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(36, 56, 128, 0.15) !important;
    background-color: var(--cupt-blue) !important;
    border-color: var(--cupt-blue) !important;
    color: #ffffff !important;
    outline: none;
}

/* UX: Stan po udanym skopiowaniu linku (Granatowy sukces) */
.btn-share-copy.is-copied {
    background-color: var(--cupt-blue) !important;
    border-color: var(--cupt-blue) !important;
    color: #ffffff !important;
    transform: scale(0.96); /* Efekt lekkiego "wciśnięcia" */
    box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.15) !important;
    pointer-events: none; /* Zapobiega podwójnym kliknięciom w trakcie animacji */
}

/* ==============================================================
NAWIGACJA WPISÓW (POST NAVIGATION)
============================================================== */
.post-navigation .nav-links {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    align-items: stretch; /* To zapewnia wyrównanie wysokości */
}

@media (min-width: 768px) {
    .post-navigation .nav-links {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.post-navigation a {
    text-decoration: none !important;
    display: flex; /* Zmieniamy z block na flex */
    flex-direction: column;
    height: 100%; /* Wymuszenie pełnej wysokości linku */
}

.post-navigation a > div {
    flex-grow: 1; /* Wewnętrzny box wypełnia przestrzeń linku */
    display: flex;
    flex-direction: column;
    justify-content: center; /* Opcjonalnie: wyśrodkowanie tekstu w pionie */
}

/* ==============================================================
   PRO FIX: NEWSLETTER MAILERLITE (CUPT)
============================================================== */
/* Animacja obracającego się loadera wysyłki */
.cupt-spin { 
    animation: cuptSpin 1s linear infinite; 
}
@keyframes cuptSpin { 
    100% { transform: rotate(360deg); } 
}

/* Ukrywanie i pokazywanie odpowiedniego przycisku podczas wysyłania (Ajax w backgroundzie) */
.cupt-ajax-form.is-submitting .cupt-btn-submit {
    display: none !important;
}
.cupt-ajax-form.is-submitting .cupt-btn-loading {
    display: flex !important;
}

/* ==============================================================
NOWY MODUŁ: KLUCZOWE DANE PROJEKTU (ANIMACJE I UTILITY)
============================================================== */
/* Klasa użytkowa dla koloru korporacyjnego CUPT */
.text-cupt-blue {
    color: var(--cupt-blue) !important;
}

/* Stan początkowy kafelków przed uruchomieniem animacji */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Klasa aktywowana przez IntersectionObserver po przewinięciu ekranu */
.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Subtelny efekt podniesienia kafelka przy najechaniu kursem */
.hover-lift {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 15px rgba(36, 56, 128, 0.05) !important;
}

/* ==============================================================
EFEKTY WIZUALNE: KLUCZOWE DANE PROJEKTU
============================================================== */
/* Lewitująca ikona (nienachalny, ciągły ruch) */
.cupt-float-subtle {
    animation: cuptFloat 4s ease-in-out infinite;
}
@keyframes cuptFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* Pulsowanie głównej ikony sekcji */
.cupt-pulse-subtle {
    animation: cuptPulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes cuptPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.7; }
}

/* Stan początkowy dla wyłaniających się wartości (Blur Reveal) */
.cupt-value-reveal {
    opacity: 0;
    filter: blur(8px);
    transform: scale(0.95);
    transition: opacity 0.8s ease-out, filter 0.8s ease-out, transform 0.8s ease-out;
}

/* Aktywacja efektu przez JS (Złapanie ostrości) */
.animate-on-scroll.is-visible .cupt-value-reveal {
    opacity: 1;
    filter: blur(0);
    transform: scale(1);
    transition-delay: 0.3s; /* Odpala się ułamek sekundy po wejściu kafelka */
}

/* Balansowanie długich opisów zapobiegające "sierotom" typograficznym */
.text-balance {
    text-wrap: balance;
}
/* ==============================================================
   15. PAGINACJA WPISÓW (PRO UI)
============================================================== */
/* Ukrycie domyślnego nagłówka "Nawigacja wpisów" dla czytników ekranu (WCAG) */
.screen-reader-text {
    border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal !important;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    align-items: center;
    padding: 0;
    margin: 0;
}

/* Główne kafelki stronicowania */
.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 0.5rem;
    background-color: var(--cupt-white);
    color: var(--cupt-blue) !important;
    border: 1px solid rgba(36, 56, 128, 0.15);
    border-radius: 0.25rem;
    font-weight: 600;
    text-decoration: none !important;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease, background-color 0.3s ease;
    box-shadow: 0 2px 4px rgba(36, 56, 128, 0.05);
}

/* Efekt najechania wyłącznie na klikalne linki */
a.page-numbers:hover,
a.page-numbers:focus {
    background-color: rgba(36, 56, 128, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(36, 56, 128, 0.1);
    outline: none;
    color: var(--cupt-blue) !important;
}

/* Aktywna, bieżąca strona */
span.page-numbers.current {
    background-color: var(--cupt-blue) !important;
    color: var(--cupt-white) !important;
    border-color: var(--cupt-blue);
    box-shadow: 0 4px 12px rgba(36, 56, 128, 0.2);
    cursor: default;
    transform: none;
}

/* Wielokropki (...) */
.page-numbers.dots {
    border: none;
    background: transparent;
    box-shadow: none;
    pointer-events: none;
    color: var(--cupt-blue) !important;
}

/* ==============================================================
STYLE GLOBALNE DLA STATYSTYK RYSOWANYCH (ZAAWANSOWANY SVG ENGINE)
============================================================== */
.cupt-svg-animated-icon-wrap svg {
    width: 44px; /* Zwiększony czytelny rozmiar ikony */
    height: 44px;
    display: block;
}

/* Szanujemy projekt z Illustratora (nie narzucamy grubości ani przezroczystości)
Gwarantujemy tylko zaokrąglone końcówki rysowanych linii */
.cupt-svg-stroke-path {
    stroke-linecap: round;
    stroke-linejoin: round;
}
/* Klasy dla animacji i paginacji frontendowej kafelków ekspertów */
.cupt-expert-module { 
    display: none; 
    opacity: 0; 
    transform: translateY(20px); 
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1); 
}
.cupt-expert-module.is-visible-module { 
    display: flex !important; /* Wymuszamy flex, by kolumny Bootstrapa d-flex działały prawidłowo */
    opacity: 1; 
    transform: translateY(0); 
}

/* ==============================================================
16. FIX PRO: ONESIGNAL MASTER REFURBISH (OSTATECZNE STARCIE)
============================================================== */
/* Reset Box-Sizing dla całego okna OneSignal, by padding nie rozsadzał układu */
#onesignal-slidedown-container * {
    box-sizing: border-box !important;
}

/* Główny kontener - powiększony oddech i solidne centrowanie */
#onesignal-slidedown-container #onesignal-slidedown-dialog {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    margin: 0 !important;
    width: 90% !important;
    max-width: 520px !important; /* Szersze okno na desktopie = brak ścisku */
    padding: 32px !important; /* Potężny oddech od krawędzi */
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.8) !important;
    border-radius: 0.5rem !important; /* Zgodność z rounded-2/3 */
    box-shadow: 0 24px 48px rgba(36, 56, 128, 0.15), 0 12px 24px rgba(36, 56, 128, 0.10) !important;
    z-index: 9999999 !important;
    display: block !important;
}

/* Sekcja górna: Ikona + Tekst */
#onesignal-slidedown-container .slidedown-body {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 24px !important; /* Duży dystans między ikoną a tekstem */
    margin: 0 0 24px 0 !important; /* Twardy margines oddzielający przyciski! */
    padding: 0 !important;
}

/* Ikona - Dzwonek (Mniejsza, wyśrodkowana z precyzją Pixel Perfect) */
#onesignal-slidedown-container .slidedown-body-icon {
    width: 56px !important; /* Nieco mniejszy, zgrabniejszy kontener */
    height: 56px !important;
    background: rgba(36, 56, 128, 0.06) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    animation: cuptBellPulse 3s infinite ease-in-out !important;
    position: relative !important;
}

/* FIX: Zgniecenie natywnego pozycjonowania OneSignal blokującego środek */
#onesignal-slidedown-container .slidedown-body-icon * {
    margin: 0 !important;
    padding: 0 !important;
    position: static !important; /* Wyłącza twarde 'absolute' i oddaje władzę Flexboxowi */
    transform: none !important;
}

#onesignal-slidedown-container .slidedown-body-icon svg {
    width: 24px !important; /* Zmniejszenie do standardu czytelności UI */
    height: 24px !important;
    fill: var(--cupt-blue) !important;
    display: block !important;
}

/* Tekst komunikatu */
#onesignal-slidedown-container .slidedown-body-message {
    color: var(--cupt-blue) !important;
    font-family: 'Open Sans', system-ui, sans-serif !important;
    font-size: 1.05rem !important;
    font-weight: 600 !important;
    line-height: 1.6 !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: left !important;
    flex-grow: 1 !important;
}

/* Sekcja dolna: Przyciski */
#onesignal-slidedown-container .slidedown-footer {
    display: flex !important;
    flex-direction: row !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: 16px !important;
    margin: 0 !important;
    padding: 0 !important;
    clear: both !important;
}

/* Przyciski wspólne zasady (wymuszenie proporcji i flexboxa w środku przycisku) */
#onesignal-slidedown-container #onesignal-slidedown-allow-button,
#onesignal-slidedown-container #onesignal-slidedown-cancel-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 44px !important;
    font-family: 'Open Sans', sans-serif !important;
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    border-radius: 0.25rem !important;
    padding: 0.5rem 1.5rem !important;
    margin: 0 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    float: none !important;
}

/* Zapisz się */
#onesignal-slidedown-container #onesignal-slidedown-allow-button {
    background-color: var(--cupt-blue) !important;
    color: var(--cupt-white) !important;
    border: 2px solid var(--cupt-blue) !important;
    box-shadow: 0 4px 12px rgba(36, 56, 128, 0.15) !important;
}
#onesignal-slidedown-container #onesignal-slidedown-allow-button:hover {
    background-color: #1a2a60 !important;
    border-color: #1a2a60 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(36, 56, 128, 0.25) !important;
}

/* Może później (Neutralny WCAG - Ostateczne zgniecenie koloru OneSignal) */
#onesignal-slidedown-container #onesignal-slidedown-dialog button#onesignal-slidedown-cancel-button.slidedown-button.secondary,
#onesignal-slidedown-container #onesignal-slidedown-dialog button#onesignal-slidedown-cancel-button.slidedown-button.secondary * {
    background-color: transparent !important;
    border: 2px solid #dee2e6 !important;
    box-shadow: none !important;
    color: #4a5568 !important; /* Bezpieczny, głęboki szary (WCAG) */
    -webkit-text-fill-color: #4a5568 !important; /* Blokada nadpisywania przez silniki WebKit/Blink */
}

#onesignal-slidedown-container #onesignal-slidedown-dialog button#onesignal-slidedown-cancel-button.slidedown-button.secondary:hover,
#onesignal-slidedown-container #onesignal-slidedown-dialog button#onesignal-slidedown-cancel-button.slidedown-button.secondary:hover * {
    background-color: rgba(36, 56, 128, 0.05) !important;
    border-color: rgba(36, 56, 128, 0.2) !important;
    color: var(--cupt-blue) !important;
    -webkit-text-fill-color: var(--cupt-blue) !important;
}
@keyframes cuptBellPulse {
    0% { transform: scale(1) rotate(0deg); box-shadow: 0 0 0 0 rgba(36, 56, 128, 0.15); }
    10% { transform: scale(1.05) rotate(-8deg); }
    20% { transform: scale(1.05) rotate(8deg); }
    30% { transform: scale(1.05) rotate(-8deg); }
    40% { transform: scale(1.05) rotate(0deg); box-shadow: 0 0 0 16px rgba(36, 56, 128, 0); }
    100% { transform: scale(1) rotate(0deg); box-shadow: 0 0 0 0 rgba(36, 56, 128, 0); }
}

/* Mobile First - Pełna responsywność i ergonomia */
@media (max-width: 576px) {
    #onesignal-slidedown-container #onesignal-slidedown-dialog {
        padding: 24px !important;
        width: 92% !important;
    }
    #onesignal-slidedown-container .slidedown-body {
        flex-direction: column !important;
        text-align: center !important;
        gap: 16px !important;
        margin-bottom: 24px !important;
    }
    #onesignal-slidedown-container .slidedown-body-icon {
        margin: 0 auto !important;
    }
    #onesignal-slidedown-container .slidedown-body-message {
        text-align: center !important;
        font-size: 0.95rem !important;
    }
    #onesignal-slidedown-container .slidedown-footer {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
    }
    #onesignal-slidedown-container #onesignal-slidedown-allow-button,
    #onesignal-slidedown-container #onesignal-slidedown-cancel-button {
        width: 100% !important;
        padding: 0.75rem !important;
        font-size: 1rem !important;
    }
}

/* ==============================================================
17. FIX PRO: UKRYCIE PLAKIETKI RECAPTCHA V3
============================================================== */
.grecaptcha-badge {
    visibility: hidden !important;
}

/* ==============================================================
18. FIX PRO: CONTACT FORM 7 UI (ALERTY, SPINNER, WALIDACJA)
============================================================== */

/* 1. Reset i modernizacja głównych komunikatów (Zabijamy domyślne style CF7) */
.wpcf7 form .wpcf7-response-output {
    margin: 1.5rem 0 0 0 !important;
    padding: 1.2rem 1.5rem !important;
    border-radius: 0.25rem !important;
    border: none !important;
    font-family: 'Open Sans', system-ui, sans-serif !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    line-height: 1.5 !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05) !important;
    text-align: left !important;
    transition: all 0.3s ease !important;
}

/* KOMUNIKAT: Sukces (Wysłano) - Świeży, nienachalny zielony */
.wpcf7 form.sent .wpcf7-response-output {
    background-color: #f0fdf4 !important; 
    color: #166534 !important; 
    border-left: 4px solid #22c55e !important;
}

/* KOMUNIKAT: Błąd walidacji (Brakuje danych w polach) - Ostrzegawczy żółty/pomarańcz */
.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.unaccepted .wpcf7-response-output {
    background-color: #fffbeb !important; 
    color: #b45309 !important; 
    border-left: 4px solid #f59e0b !important;
}

/* KOMUNIKAT: Krytyczny Błąd Serwera / Odcięcie przez reCAPTCHA (Spam) - Czerwony */
.wpcf7 form.failed .wpcf7-response-output,
.wpcf7 form.aborted .wpcf7-response-output,
.wpcf7 form.spam .wpcf7-response-output {
    background-color: #fef2f2 !important;
    color: #991b1b !important;
    border-left: 4px solid #ef4444 !important;
}

/* 2. Błędy pod pojedynczymi polami formularza (Dymki walidacyjne) */
.wpcf7-not-valid-tip {
    color: #dc3545 !important;
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    margin-top: 0.4rem !important;
    display: inline-block !important;
    background: rgba(220, 53, 69, 0.08) !important;
    padding: 0.25rem 0.6rem !important;
    border-radius: 0.25rem !important;
}

/* Oznaczanie ramki samego pola, w którym wystąpił błąd */
.wpcf7-form-control.wpcf7-not-valid {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1) !important;
}

/* 3. Naprawa uciętego i rozjechanego spinnera ładującego */
/* Selektor :has chroni przed załamywaniem linii, jeśli przycisk jest na 100% szerokości */
.wpcf7-form p:has(.wpcf7-submit),
.wpcf7-form div:has(.wpcf7-submit) {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 16px !important;
}

.wpcf7-spinner {
    width: 24px !important;
    height: 24px !important;
    margin: 0 !important;
    vertical-align: middle !important;
    background: transparent !important;
    border: 3px solid rgba(36, 56, 128, 0.1) !important;
    border-top-color: var(--cupt-blue) !important;
    border-radius: 50% !important;
    animation: cuptSpin 1s linear infinite !important;
    display: inline-block !important;
    visibility: hidden;
    flex-shrink: 0 !important; /* Blokuje zgniatanie spinnera przez przycisk */
}

/* Pokazanie spinnera tylko w trakcie akcji wysyłania */
.wpcf7-submitting .wpcf7-spinner {
    visibility: visible;
}

/* Stan przycisku "w trakcie wysyłania" (zapobiega nerwowemu klikaniu) */
.wpcf7-submitting .wpcf7-submit {
    opacity: 0.7 !important;
    pointer-events: none !important;
}

/* ==============================================================
19. FIX PRO: STYLOWANIE SELECT W CONTACT FORM 7
============================================================== */
.wpcf7-form-control.wpcf7-select {
    background-color: #f4f6f9 !important;
    border: 2px solid transparent !important;
    border-bottom: 2px solid rgba(36, 56, 128, 0.1) !important;
    border-radius: 0.25rem !important;
    padding: 0.9rem 1.2rem !important;
    font-size: 1rem !important;
    color: var(--cupt-blue) !important;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02) !important;
    width: 100% !important;
    cursor: pointer !important;
}

.wpcf7-form-control.wpcf7-select:focus,
.wpcf7-form-control.wpcf7-select:hover {
    background-color: var(--cupt-white) !important;
    border-color: rgba(36, 56, 128, 0.1) !important;
    border-bottom-color: var(--cupt-blue) !important;
    box-shadow: 0 8px 25px rgba(36, 56, 128, 0.08) !important;
    outline: none !important;
    transform: translateY(-2px) !important;
}

/* ==============================================================
20. FIX PRO: CF7 GRID UNBOXING (DEZAKTYWACJA UKRYTYCH ZNACZNIKÓW)
============================================================== */
/* Zmusza przeglądarkę do ignorowania fizycznej obecności znaczników <p>,
pozwalając kolumnom Bootstrapa (.col-md-6) ułożyć się płynnie w rzędzie (.row) */
.wpcf7 form p {
    display: contents !important;
}

/* Całkowicie blokuje twarde łamanie linii wstrzykiwane przez rdzeń WP */
.wpcf7 form br {
    display: none !important;
}

/* Gwarantuje, że ukryty kontener (span) generowany przez CF7 
zawsze zajmuje pełną dostępną szerokość rodzica (.col-md-6) */
.wpcf7 form .wpcf7-form-control-wrap {
    display: block !important;
    width: 100% !important;
}

/* ==============================================================
21. FIX PRO: NIEZNISZCZALNY GRID (CSS GRID) DLA CF7
============================================================== */
/* Dezaktywacja natywnego Flexboxa Bootstrapa na rzecz pancernego Grida, 
który jest w 100% odporny na ukryte znaczniki <br> i <p> */
.wpcf7 form .row {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important; /* Optyczny oddech między polami */
    margin: 0 !important;
    width: 100% !important;
}

/* Wymuszenie 2 kolumn na desktopie (od 768px w górę) */
@media (min-width: 768px) {
    .wpcf7 form .row {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Pola md-6 zajmują zawsze 1 blok z 2 dostępnych (idealne 50%) */
.wpcf7 form .col-md-6 {
    grid-column: span 1 !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important; /* W Gridzie używamy 'gap', więc padding kolumn jest zbędny */
    margin: 0 !important;
}

/* Elementy pełnoszerokościowe (Temat, Treść, Checkbox, Przycisk) zajmują cały rząd */
.wpcf7 form .col-12 {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Eksterminacja śmieciowych znaczników niszczących spójność kodu */
.wpcf7 form .row > br,
.wpcf7 form .row > p:empty,
.wpcf7 form .row > span:empty {
    display: none !important;
    height: 0 !important;
    width: 0 !important;
}

/* ==============================================================
22. FIX PRO: PERFEKCYJNE WYRÓWNANIE KLAUZULI RODO (CF7)
============================================================== */
/* Neutralizacja zbędnego kontenera z HTML (likwidacja podwójnych ramek) */
.cupt-cf7-acceptance {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
}

/* Twardy układ Flexbox bezpośrednio na głównej etykiecie */
.wpcf7-acceptance label {
    display: flex !important;
    align-items: center !important; /* Bezwzględne środkowanie w osi Y */
    gap: 16px !important; /* Stały oddech między checkboxem a tekstem */
    padding: 1.25rem !important;
    background: #f8f9fa !important; /* Czyste, pastelowe tło z palety */
    border: 1px solid #E5E4E2 !important; /* Firmowa obwódka CUPT */
    border-radius: 0.25rem !important;
    margin: 0 !important;
    width: 100% !important;
}

/* Ochrona kwadratu przed zgniataniem */
.wpcf7-acceptance input[type="checkbox"] {
    flex-shrink: 0 !important; /* ZAKAZ pomniejszania kwadratu przez długi tekst */
    margin: 0 !important; 
}

/* Blok tekstowy - ujednolicenie interlinii i czyszczenie wymuszonych marginesów */
.wpcf7-acceptance .wpcf7-list-item-label {
    display: block !important;
    flex-grow: 1 !important;
    font-size: 0.85rem !important;
    line-height: 1.6 !important;
    color: #6c757d !important;
}

/* Likwidacja klasy ms-2 wstrzykniętej w HTML, która asymetrycznie odsuwała tekst */
.wpcf7-acceptance .wpcf7-list-item-label .ms-2 {
    margin-left: 0 !important;
}
/* Paginacja i liczniki */
.pagination-custom .page-numbers {
    padding: 0.5rem 1rem;
    background: var(--cupt-white);
    border: 1px solid var(--cupt-gray);
    color: var(--cupt-blue);
}
.pagination-custom .current {
    background: var(--cupt-blue) !important;
    color: var(--cupt-white) !important;
}

/* ==============================================================
23. FIX PRO: BAZA SETEK AUDIO (CUSTOM UI)
============================================================== */
.cupt-audio-player {
    background: linear-gradient(145deg, #ffffff 0%, rgba(36, 56, 128, 0.01) 100%);
}

.cupt-audio-progress {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    outline: none;
    transition: background 0.1s ease;
    cursor: pointer;
    margin: 0.5rem 0 0 0;
    background: var(--cupt-gray); /* Tło domyślne dla suwaka nadpisane w JS */
}

/* Ukrycie domyślnej kropki i stworzenie nowej (WebKit/Chrome) */
.cupt-audio-progress::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--cupt-white);
    border: 3px solid var(--cupt-blue);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(36, 56, 128, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cupt-audio-progress::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 10px rgba(36, 56, 128, 0.4);
}

/* Wersja dla Firefoxa (Moz) */
.cupt-audio-progress::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--cupt-white);
    border: 3px solid var(--cupt-blue);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(36, 56, 128, 0.3);
    transition: transform 0.2s ease;
}

.cupt-audio-progress::-moz-range-thumb:hover {
    transform: scale(1.2);
}

@media (min-width: 768px) {
    .border-start-md {
        border-left: 1px solid rgba(36, 56, 128, 0.1) !important;
    }
}

/* Responsywna szerokość przycisku pobierania MP3 */
.cupt-audio-dl {
    width: 100%;
}

@media (min-width: 768px) {
    .cupt-audio-dl {
        width: auto;
    }
}

/* ==============================================================
   MEDIA TILES (DYNAMICZNE BAZY)
============================================================== */
.cupt-media-tile {
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease, background 0.3s ease;
    overflow: hidden;
    position: relative;
}
.cupt-media-tile::before {
    content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%;
    background-color: var(--cupt-blue); transform: scaleY(0); transition: transform 0.3s ease; transform-origin: bottom;
}
.cupt-media-tile:hover {
    background-color: var(--cupt-white) !important;
}
.cupt-media-tile:hover::before {
    transform: scaleY(1);
}
.cupt-media-tile .cupt-hover-arrow {
    transition: transform 0.3s ease, color 0.3s ease;
}
.cupt-media-tile:hover .cupt-hover-arrow {
    transform: translateX(8px);
    color: var(--cupt-blue) !important;
}

/* Wersja panoramiczna (gdy dostępna jest tylko 1 baza) */
@media (min-width: 768px) {
    .panoramic-card .cupt-media-tile {
        padding: 3rem 4rem !important;
    }
    .panoramic-card p {
        font-size: 1rem !important;
    }
}

/* Mikrointerakcje dla kafelków i kart (Pixel-perfect UI) */
.cupt-card-hover {
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.cupt-card-hover:hover, 
.cupt-card-hover:focus-within {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(36, 56, 128, 0.1) !important; /* Cień bazujący na --cupt-blue */
}

/* Przycisk akcji: Otwarta Kolej */
.btn-ok {
 background-color: var(--cupt-ok-green) !important;
 color: #ffffff !important; /* Kontrast dla zielonego tła */
 border: none;
 transition: all 0.3s ease;
}

.btn-ok:hover, .btn-ok:focus {
 background-color: #8cb01f !important; /* Przyciemniony wariant zieleni dla interakcji */
 color: #ffffff !important;
 outline: 2px solid var(--cupt-ok-green);
 outline-offset: 2px;
}

/* PRO FIX: Optyczne zrównoważenie wierszy dla stanowisk na kartach ekspertów */
.cupt-expert-module .fw-semibold.mb-3 {
    text-wrap: balance;
}

/* ==============================================================
UI/UX: RESET DROPDOWNU TTS (USUNIĘCIE GRUBYCH OBRAMOWAŃ)
============================================================== */
#cupt-tts-widget .dropdown-item:active,
#cupt-tts-widget .dropdown-item:focus {
    background-color: var(--cupt-gray) !important;
    color: var(--cupt-blue) !important;
    outline: none !important;
    box-shadow: inset 0 0 0 1px var(--cupt-blue) !important; /* Estetyczny i cienki 1px zamiast grubych ramek systemowych */
}

#cupt-tts-widget .dropdown-menu {
    z-index: 1050 !important; /* Gwarancja wyświetlania nad wszystkimi elementami layoutu */
}

/* ==========================================================================
PRO FIX: Typografia, mikrointerakcje i reset mobile touch dla kart
========================================================================== */
/* Poprawa typografii na Open Sans (zgodnie z wymogami czytelności długich tekstów) */
body {
    font-family: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

/* Karta interaktywna - podniesienie elementu na hoverze (CWV & WCAG) */
.cupt-card-hover {
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease !important;
}

.cupt-card-hover:hover,
.cupt-card-hover:focus-within {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(36, 56, 128, 0.12) !important;
    border-color: var(--cupt-blue) !important;
}

/* Twardy reset ligatur Material Symbols - usuwa pasek przy nawigacji klawiaturą / touch */
.material-symbols-outlined {
    font-feature-settings: 'liga' 1;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    display: inline-block;
    overflow: hidden;
}

/* Twardy reset outline dla stretched-link - blokuje szary pasek z prawej strony */
.cupt-card-hover .stretched-link:focus,
.cupt-card-hover .stretched-link:focus-visible,
.cupt-card-hover:focus-within {
    outline: none !important;
}

/* Właściwy obrys WCAG przy nawigacji klawiaturą nakładany WYŁĄCZNIE na całą kartę */
.cupt-card-hover:focus-within {
    box-shadow: 0 0 0 3px rgba(36, 56, 128, 0.4) !important;
}

/* Całkowite wyłączenie niebieskiego paska (box-shadow/outline) na focus wewnątrz karty */
.cupt-card-hover a:focus,
.cupt-card-hover a:focus-visible,
.cupt-card-hover .stretched-link:focus,
.cupt-card-hover .stretched-link:focus-visible,
.cupt-card-hover .cupt-hover-arrow:focus,
.cupt-card-hover span:focus {
    box-shadow: none !important;
    outline: none !important;
}

/* Gwarancja WCAG 2.1 - wskaźnik fokusu z klawiatury obejmuje wyłącznie zewnętrzną ramkę karty */
.cupt-card-hover:focus-within {
    box-shadow: 0 0 0 3px rgba(36, 56, 128, 0.25) !important;
    border-color: var(--cupt-blue) !important;
}
/* Animacja WYZŁĄCZNIE dla strzałki w prawo (ikona auta zostaje na środku szarej otoczki) */
.cupt-card-hover:hover .cupt-hover-arrow,
.cupt-card-hover:focus-within .cupt-hover-arrow {
    transform: translateX(6px);
    color: var(--cupt-blue) !important;
}

/* Zablokowanie niepożądanego ruchu ikony auta po lewej stronie */
.cupt-card-hover .cupt-static-icon {
    transform: none !important;
    transition: none !important;
}