/*
Theme Name: ZPRS Custom Theme
Theme URI: http://zprs-local.local/
Author: AI & WFurg
Author URI: http://zprs-local.local/
Description: Niestandardowy, autorski motyw stworzony od podstaw.
Version: 1.0.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: zprs-custom
*/

/* --- Reset i zmienne CSS --- */
:root {
    --primary-color: #2b2b2b;
    --secondary-color: #ff5722;
    --bg-color: #ffffff;
    --text-color: #333333;
    --font-main: 'Inter', sans-serif;

    /* Kolory gradientu dla nagłówka (Niebieskie w stylu ZPRS) */
    --gradient-color-1: #185a9d;
    --gradient-color-2: #2b6cb0;
    --gradient-color-3: #4a90e2;
    --gradient-color-4: #87ceeb;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body,
html {
    margin: 0 !important;
    padding: 0;
    font-family: var(--font-main);
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
    max-width: 100% !important;
    overflow-x: hidden;
    min-height: 100%;
}

html.premium-mode {
    background: #000f2d !important;
    overflow-y: auto !important;
}

body.premium-mode {
    overflow: visible !important;
    background: #000f2d !important;
    /* Dark background to match footer and hide gaps */
    position: relative;
}

/* Usunięcie marginesu pod stopką wywołanego przez niektóre wtyczki */
body>.accessibility-bar,
body>div:last-child {
    margin-bottom: 0 !important;
}

/* Nadpisanie domyślnych blokad szerokości WordPressa (wtyczki/bloki wp-site-blocks) */
.wp-site-blocks {
    max-width: 100% !important;
    overflow-x: hidden;
    min-height: 100%;
}

/* Usunięcie marginesu pod stopką wywołanego przez niektóre wtyczki */
body>.accessibility-bar,
body>div:last-child,
#sitelinx-black-screen {
    margin-bottom: 0 !important;
    display: none !important;
}

.wp-dark-mode-active #sitelinx-black-screen {
    display: none !important;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
}

/* Podstawowa struktura */
.site-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    /* usunięto górny padding */
}

/* --- NAGŁÓWEK Z PŁYWAJĄCYM GRADIENTEM --- */
.site-header {
    width: 100%;
    position: relative;
    top: 0;
    left: 0;
    margin-top: 0;
    z-index: 1000;
    background: linear-gradient(135deg, #185a9d 0%, #3076D6 100%);
    background-size: 800% 800%;
    animation: flowGradient 60s ease infinite;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease-in-out;
}

.site-header .site-container {
    max-width: 95%;
    padding: 0 2.5%;
}

/* Animacja keyframes dla pływającego gradientu */
@keyframes slideInFromTop {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.site-header.animate-once {
    animation: slideInFromTop 0.8s ease-out forwards;
}

.site-header .header-inner {
    display: flex;
    flex-direction: column;
    /* Domyślnie w kolumnie (logo nad menu) */
    align-items: center;
    gap: 15px;
    /* Odstęp między logo a menu */
    padding: 30px 0 10px;
    /* Padding dla dużego nagłówka */
    transition: padding 0.3s ease-in-out, gap 0.3s ease-in-out;
}

.site-branding {
    max-width: 380px;
    text-align: center;
    transition: all 0.4s ease-in-out;
    opacity: 1;
    max-height: 200px;
    /* Zapas miejsca na pełne logo */
    transform: translateY(0);
}

.custom-logo {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0px 2px 4px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

.custom-logo:hover {
    transform: scale(1.02);
}

/* --- STICKY HEADER --- */
.site-header.is-sticky {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    background: linear-gradient(135deg, #124a80 0%, #2056a6 100%);
}

.site-header .site-branding {
    transition: all 0.3s ease-in-out;
    max-height: 250px;
    opacity: 1;
}

.site-header.is-sticky .header-inner {
    padding: 0;
    height: 60px;
    gap: 0;
    /* Usuwamy przerwę, bo logo i tak znika */
    flex-direction: row;
    /* Zmieniamy na pojedynczy poziomy pasek */
    justify-content: center;
    align-items: center;
}

.site-header.is-sticky .site-branding {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    margin: 0;
    padding: 0;
    pointer-events: none;
}

.mini-logo-sticky {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%) translateX(-20px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease-in-out;
}

.mini-logo-img {
    height: 40px;
    width: auto;
    display: block;
}

.site-header.is-sticky .mini-logo-sticky {
    transform: translateY(-50%) translateX(0);
    opacity: 1;
    visibility: visible;
}

/* Ukrywamy mini logo na ekranach mniejszych niż 1150px aby nie nachodziło na nawigację */
@media (max-width: 1150px) {
    .site-header.is-sticky .mini-logo-sticky {
        display: none !important;
    }
}

.site-header.is-sticky .main-navigation {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Menu w nagłówku */
.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.main-navigation li {
    position: relative;
}

.main-navigation a {
    color: #ffffff;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.8px;
    padding: 6px 10px;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: block;
    text-decoration: none;
    position: relative;
    background: transparent;
    border: none;
}

.main-navigation a::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 15px;
    right: 15px;
    height: 2px;
    background: #ffffff;
    transform: scaleX(0);
    transition: transform 0.3s ease;
    transform-origin: center;
}

.main-navigation a:hover::after,
.main-navigation li:hover>a::after,
.main-navigation .current-menu-item>a::after {
    transform: scaleX(1);
}

.main-navigation a:hover,
.main-navigation li:hover>a,
.main-navigation .current-menu-item>a {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    /* Bardzo delikatne tło po najechaniu, ale już bez mocnych linii i rozmycia */
}

/* --- SUBMENU (Rozwijane pozycje) --- */
.main-navigation ul ul {
    display: none;
    /* Domyślnie chowane wg. WP fallback menu -> .sub-menu */
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: #3076D6;
    /* zmieniono z soczystego bordowego na niebieski użytkownika */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    border-radius: 0 0 5px 5px;
    padding: 5px 0;
    margin: 0;
    z-index: 99999;
    gap: 0;
}

/* Unikalne kolory dla konkretnych pod-kategorii rozwijanych */
.main-navigation .menu-item-rodzice ul.sub-menu {
    background: #3076D6;
}

.main-navigation .menu-item-kadra ul.sub-menu {
    background: #3076D6;
}

.main-navigation li:hover>ul {
    display: flex;
    /* pokazuj na hoverze */
}

.main-navigation ul ul li {
    width: 100%;
}

.main-navigation ul ul a {
    padding: 6px 15px;
    font-size: 14px;
    text-transform: none;
    line-height: 1.2;
    border-radius: 0;
    /* brak border-radius w srodku submenu */
    background: transparent;
    display: block;
}

.main-navigation ul ul a:hover {
    background: rgba(255, 255, 255, 0.15);
    /* light rozjasnienie na hover w sub menu */
}

.main-navigation ul ul a::after {
    display: none;
    /* brak podkreslenia w rozwijanym */
}

/* Strzałka dla submenu */
.main-navigation li.menu-item-has-children>a::after {
    content: ' \25BC';
    font-size: 10px;
    margin-left: 6px;
    display: inline-block;
    vertical-align: middle;
}

/* --- GŁÓWNA ZAWARTOŚĆ --- */
.site-main {
    width: 95%;
    max-width: 1200px;
    position: relative;
    background: transparent;
    padding: 0;
    margin: 40px auto;
}

/* Siatka artykułów (Nowy blok aktualności) */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.post-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

.post-thumbnail {
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.post-card:hover .post-thumbnail img {
    transform: scale(1.05);
}

.post-content-wrap {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.entry-meta {
    font-size: 13px;
    color: #888;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.byline {
    opacity: 0.8;
}

/* Wyróżniony pierwszy wpis (1 kolumna) */
.articles-grid .featured-post {
    grid-column: 1 / -1;
}

@media (min-width: 768px) {
    .articles-grid .featured-post {
        flex-direction: row;
        align-items: stretch;
    }

    .articles-grid .featured-post .post-thumbnail {
        width: 50%;
        height: auto;
        min-height: 300px;
    }

    .articles-grid .featured-post .post-content-wrap {
        width: 50%;
        justify-content: center;
        padding: 40px;
    }

    .articles-grid .featured-post .entry-title {
        font-size: 28px;
    }
}

.entry-title {
    margin: 0 0 15px 0;
    font-size: 22px;
    line-height: 1.3;
}

.entry-title a {
    color: #333333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.entry-title a:hover {
    color: var(--gradient-color-3);
    /* Nawiązanie do niebieskiego */
}

.entry-content {
    font-size: 15px;
    color: #555555;
    line-height: 1.6;
    margin-bottom: 15px;
    flex-grow: 1;
}

.entry-content p:last-child {
    margin-bottom: 0;
}

/* Paginacja */
.pagination-wrap {
    text-align: center;
    margin-top: 20px;
}

/* --- STOPKA --- */
.site-footer {
    background: #1a3026;
    /* Ciemnozielony z zrzutu ekranu */
    color: #e0e0e0;
    padding: 0;
    text-align: left;
    font-size: 14px;
    line-height: 1.6;
}

.site-footer .footer-content {
    padding: 50px 2.5%;
}

.site-footer .footer-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.site-footer .footer-column {
    display: flex;
    flex-direction: column;
}

.site-footer .footer-heading {
    color: #ffffff;
    font-size: 18px;
    margin-bottom: 20px;
    font-weight: 600;
    border-bottom: 2px solid var(--gradient-color-3);
    /* Niebieski akcent */
    padding-bottom: 10px;
    display: inline-block;
}

.site-footer p {
    margin-bottom: 15px;
}

.site-footer a {
    color: rgb(199, 232, 159);
    /* Jasnozielone linki */
    text-decoration: none;
    transition: color 0.3s ease;
}

.site-footer a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.site-footer .footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.site-footer .footer-links li {
    margin-bottom: 10px;
}

.site-footer .footer-bottom {
    background: rgba(20, 20, 20, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 20px 2.5%;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 13px;
}

.site-footer .footer-bottom p {
    margin-bottom: 5px;
}

.site-footer .copyright {
    color: #888888;
    margin-top: 10px;
}


/* --- PRE-FOOTER AREA (NEW) --- */
.pre-footer-area {
    background-color: #ffffff;
    padding: 60px 0;
    margin-top: 40px;
    border-top: 1px solid #eeeeee;
}

/* --- DYNAMIC FOOTER WIDGETS --- */
.footer-widgets-dynamic {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    align-items: start;
}

.footer-widgets-dynamic .widget {
    margin-bottom: 20px;
}

.footer-widgets-dynamic .widget-title {
    color: #333333;
    /* Darker title for white bg */
    font-size: 18px;
    margin-bottom: 20px;
    font-weight: 600;
    border-bottom: 2px solid var(--gradient-color-3);
    padding-bottom: 10px;
}

.footer-widgets-dynamic img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.footer-widgets-dynamic ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-widgets-dynamic li {
    margin-bottom: 12px;
}

.footer-widgets-dynamic a {
    color: #0066cc;
    /* Blue links for white bg */
    transition: all 0.3s ease;
}

.footer-widgets-dynamic a:hover {
    color: #000000;
    padding-left: 5px;
}

.footer-widgets-dynamic .widget_media_image {
    text-align: center;
}

/* --- PRZEŁĄCZNIK MENU MOBILNEGO (HAMBURGER) --- */
.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    padding: 10px;
    cursor: pointer;
    z-index: 1001;
    align-items: center;
    gap: 10px;
}

.menu-label {
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

@media (max-width: 992px) {
    .menu-toggle {
        display: flex;
    }
}

.hamburger-box {
    width: 30px;
    height: 24px;
    display: inline-block;
    position: relative;
}

.hamburger-inner {
    display: block;
    top: 50%;
    margin-top: -1.5px;
}

.hamburger-inner,
.hamburger-inner::before,
.hamburger-inner::after {
    width: 30px;
    height: 3px;
    background-color: #ffffff;
    position: absolute;
    border-radius: 4px;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.hamburger-inner::before,
.hamburger-inner::after {
    content: "";
    display: block;
}

.hamburger-inner::before {
    top: -10px;
}

.hamburger-inner::after {
    bottom: -10px;
}

/* Animacje otwarcia hamburgera */
.menu-toggle[aria-expanded="true"] .hamburger-inner {
    transform: rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .hamburger-inner::before {
    top: 0;
    opacity: 0;
}

.menu-toggle[aria-expanded="true"] .hamburger-inner::after {
    bottom: 0;
    transform: rotate(-90deg);
}

/* --- MEDIA QUERIES (WIDOK MOBILNY I TABLET) --- */
@media (max-width: 992px) {
    .menu-toggle {
        display: block;
        position: relative;
        transition: all 0.3s ease;
    }

    /* Przeniesienie krzyżyka poza panel menu po jego otwarciu */
    .main-navigation.toggled .menu-toggle {
        position: fixed;
        top: 20px;
        right: calc(min(85vw, 400px) + 20px);
        /* Ustawienie go po lewej stronie panelu */
        z-index: 1002;
        background: rgba(18, 74, 128, 0.9);
        /* Drobne tło, by był czytelny na stronie */
        border-radius: 50%;
        width: 50px;
        height: 50px;
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 0;
    }

    .main-navigation.toggled .menu-label {
        display: none;
        /* Ukryj napis MENU gdy jest to tylko krzyżyk */
    }

    .main-navigation ul {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 400px;
        /* Szersze dla uniknięcia łamania wierszy */
        height: 100%;
        /* Zmiana z 100vh dla stabilności */
        background: rgba(24, 90, 157, 0.95);
        /* Mocniejsze tło */
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        box-shadow: -5px 0 25px rgba(0, 0, 0, 0.3);
        padding: 60px 20px 20px;
        /* Mniejszy padding góry */
        transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
        z-index: 1000;
        overflow-y: auto !important;
        /* Włączenie scrolla dla długich list menu */
        -webkit-overflow-scrolling: touch;
    }

    .main-navigation ul::-webkit-scrollbar {
        display: none;
        /* Ukrycie paska przewijania w Chrome/Safari */
    }

    /* Klasa dodawana przez JS w celu wysunięcia menu */
    .main-navigation.toggled ul,
    .main-navigation.toggled .menu-container,
    .main-navigation.toggled .menu-primary-container {
        right: 0 !important;
    }

    .main-navigation li {
        width: 100%;
    }

    .main-navigation a {
        padding: 18px 25px;
        font-size: 16px;
        /* Powiększenie fontu w mobile */
        font-weight: 500;
        text-transform: none;
        letter-spacing: 0.3px;
        color: #ffffff;
        background: transparent;
        border: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 0;
        transition: background-color 0.3s ease, padding-left 0.3s ease;
    }

    .main-navigation ul ul a {
        font-size: 15px;
        text-transform: none;
        padding-left: 35px;
        padding-top: 12px;
        padding-bottom: 12px;
        letter-spacing: 0.5px;
    }

    .main-navigation a:hover,
    .main-navigation li:hover>a,
    .main-navigation .current-menu-item>a {
        background: rgba(255, 255, 255, 0.1);
        padding-left: 25px;
        /* Delikatny efekt przesunięcia w bok na mobile */
        box-shadow: none;
        transform: none;
    }

    .main-navigation ul ul {
        position: static;
        background: rgba(0, 0, 0, 0.05);
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        /* JS kontroluje wyświetlanie */
        padding: 0;
        margin: 0;
        min-width: 100%;
        backdrop-filter: none;
    }

    /* Wyłączamy całkowicie rozwijanie po najechaniu (hover) zdefiniowane w wersji desktopowej */
    .main-navigation li:hover>ul {
        display: none;
    }

    .main-navigation li.menu-item-has-children>a::after {
        float: right;
        margin-top: 5px;
    }

    .site-main {
        width: 95%;
        /* Na urządzeniach mobilnych zajmujemy max miejsca */
    }

    /* Zmniejszamy siatkę artykułów */
    .articles-grid {
        grid-template-columns: 1fr;
    }

    /* --- STYLE ZAREJESTROWANE DLA BLOKU TABELI (GUTENBERG) --- */
    .wp-block-table.is-style-zprs-table-striped {
        border-collapse: collapse;
        width: 100%;
    }

    .wp-block-table.is-style-zprs-table-striped tbody tr:nth-child(odd) {
        background-color: #f7fcff;
        /* błękit nawiązujący do kolorytu strony */
    }

    .wp-block-table.is-style-zprs-table-striped th,
    .wp-block-table.is-style-zprs-table-striped td {
        padding: 12px 15px;
        border: 1px solid #e0e0e0;
    }

    .wp-block-table.is-style-zprs-table-highlight-header {
        border-collapse: collapse;
        width: 100%;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
        border-radius: 8px;
        overflow: hidden;
    }

    .wp-block-table.is-style-zprs-table-highlight-header thead th {
        background: linear-gradient(135deg, #185a9d 0%, #3076D6 100%);
        color: #ffffff;
        font-weight: 600;
        text-align: left;
        padding: 15px;
        border: none;
    }

    .wp-block-table.is-style-zprs-table-highlight-header th,
    .wp-block-table.is-style-zprs-table-highlight-header td {
        border-bottom: 1px solid #eaeaea;
        padding: 12px 15px;
    }
}

/* --- BLOKI WIDEO --- */
.wp-block-video {
    position: relative;
    max-width: 100%;
    margin: 30px auto;
    overflow: hidden;
    border-radius: 8px;
    background: #000;
}

.wp-block-video video {
    width: 100%;
    max-height: 75vh;
    object-fit: contain;
    display: block;
}

/* Niestandardowy przycisk Play na okładce */
.zprs-video-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 10;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.zprs-video-play-overlay:before {
    content: '';
    display: block;
    width: 80px;
    height: 80px;
    background-color: rgba(48, 118, 214, 0.9);
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.zprs-video-play-overlay:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-35%, -50%);
    border-style: solid;
    border-width: 15px 0 15px 24px;
    border-color: transparent transparent transparent #ffffff;
}

.zprs-video-play-overlay:hover:before {
    background-color: #1a5ca6;
    transform: scale(1.1);
}

.wp-block-video.is-playing .zprs-video-play-overlay {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* --- ZAJAWKI (LEAD) W ARTYKUŁACH --- */

/* Zajawka na liście pobierana z excerpts */
.articles-grid .post-card .entry-content p {
    font-size: 16px;
    line-height: 1.6;
    color: #444;
}

/* Duży pierwszy akapit (lead) wyświetlany po otwarciu całego artykułu */
.entry-content-single p:first-of-type {
    font-size: 20px !important;
    line-height: 1.7 !important;
    font-weight: 500 !important;
    color: #3076D6 !important;
    /* Wyróżniający niebieski podchodzący pod motyw placowki */
    margin-bottom: 30px !important;
}

/* Wymuszenie czyszczenia "oblewania" dla tekstu zaraz po zajawce */
.entry-content-single p:nth-of-type(2),
.entry-content-single h2:first-of-type,
.entry-content-single h3:first-of-type {
    clear: both;
    display: block;
}

/* --- OBRAZEK HERO W ARTYKULE --- */
.post-hero-image-single {
    float: left;
    width: 45%;
    /* Zajmuje mniej więcej połowę szerokości kontenera pod desktop */
    margin: 0 35px 25px 0;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    /* Lekkie cieniowanie dziedziczone ze starszych elementow */
    overflow: hidden;
    position: relative;
    z-index: 10;
}

.post-hero-image-single img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    border-radius: 12px;
    /* Domyślne zaokraglenie wewnwtrznego obrazka */
}

/* Na mniejszych ekranach (tablet i telefony) przełamujemy float na pełną szerokość tzn powrot do ustawien domyslnych */
@media (max-width: 992px) {
    .post-hero-image-single {
        float: none;
        width: 100%;
        margin: 0 0 30px 0;
    }
}

/* --- PRZYCISK ZOBACZ WIECEJ NA LISTACH POSTOW --- */
.articles-grid .post-card .entry-content .read-more-link {
    display: inline-block;
    width: 100%;
    /* Wymusza przelamanie wewnatrz p-tagu zajawki */
    margin-top: 15px;
    color: #3076D6;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 0.5px;
    transition: color 0.2s ease, transform 0.2s ease;
}

.articles-grid .post-card .entry-content .read-more-link:hover {
    color: #185a9d;
    text-decoration: none;
    transform: translateX(3px);
    /* Subtelne pchniecie strzalki i napisu w prawo */
}

/* --- FILTR ROCZNIKOWY ARCHIWUM --- */
.zprs-archive-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    background: #fdfdfd;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin: 0 auto 40px;
    /* Margines oddzielający od postów */
    border-left: 4px solid #3076D6;
    /* Akcent tematyczny */
}

.zprs-archive-label {
    font-weight: 600;
    color: #444;
    margin-right: 15px;
    font-size: 16px;
}

.zprs-archive-years {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    /* Odstęp między kafelkami dat */
}

.zprs-archive-years li {
    margin: 0;
}

.zprs-archive-years li a {
    display: block;
    padding: 6px 14px;
    background-color: #f1f5fb;
    color: #3076D6;
    border-radius: 20px;
    /* Zaokraglone ksztalty "pills" */
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.zprs-archive-years li a:hover {
    background-color: #3076D6;
    color: #ffffff;
}

/* --- LOAD MORE BUTTON (AJAX) --- */
.zprs-load-more-wrap {
    text-align: center;
    margin: 40px 0 60px;
    width: 100%;
    clear: both;
}

#zprs-load-more-btn {
    background-color: #3076D6;
    color: #fff;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(48, 118, 214, 0.3);
}

#zprs-load-more-btn:hover {
    background-color: #185a9d;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(48, 118, 214, 0.4);
}

#zprs-load-more-btn i {
    margin-left: 8px;
    transition: transform 0.2s ease;
}

#zprs-load-more-btn:hover i {
    transform: translateY(3px);
}

/* Wektorowa ikona ładowania AJAX (Niezależna od zewnętrznych plików i Domeny) */
.zprs-spinner {
    animation: zprs-rotate 2s linear infinite;
    width: 16px;
    height: 16px;
    margin-left: 8px;
    vertical-align: middle;
}

.zprs-spinner .path {
    stroke: currentColor;
    stroke-linecap: round;
    animation: zprs-dash 1.5s ease-in-out infinite;
}

@keyframes zprs-rotate {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes zprs-dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }

    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }

    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

/* --- NAPRAWA COOKIE NOTICE (Rozwiązanie Subagenta) --- */
/* Wymuszone ukrycie banera w przypadku akceptacji i AJAXowych wścieklizn */
body.cookies-accepted #cookie-notice {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* ==========================================================
   WZORCE DOKUMENTÓW ZPRS (Auto-Ikony, Bloki Plików, Opisy)
   ========================================================== */

/* 1. Automatyczne wykrywanie linków i renderowanie Masek SVG (Technologia Kuloodporna na wtyczki) */
.entry-content a[href$=".pdf"]::before,
.wp-block-button.zprs-file-pdf .wp-block-button__link::before,
a.zprs-file-pdf::before,
.entry-content a[href$=".doc"]::before,
.entry-content a[href$=".docx"]::before,
.wp-block-button.zprs-file-doc .wp-block-button__link::before,
a.zprs-file-doc::before,
.entry-content a[href$=".xls"]::before,
.entry-content a[href$=".xlsx"]::before,
.wp-block-button.zprs-file-sheet .wp-block-button__link::before,
a.zprs-file-sheet::before,
.entry-content a[href$=".zip"]::before,
.entry-content a[href$=".rar"]::before,
.wp-block-button.zprs-file-zip .wp-block-button__link::before,
a.zprs-file-zip::before,
.wp-block-button.zprs-file-img .wp-block-button__link::before,
a.zprs-file-img::before {
    content: "" !important;
    display: inline-block !important;
    width: 17px !important;
    height: 17px !important;
    margin-right: 8px !important;
    vertical-align: text-bottom !important;
    background-color: currentColor;
    -webkit-mask-size: contain !important;
    mask-size: contain !important;
    -webkit-mask-repeat: no-repeat !important;
    mask-repeat: no-repeat !important;
    -webkit-mask-position: center !important;
    mask-position: center !important;
    transition: transform 0.2s ease !important;
}

/* Definicja SVG, Koloru i Kształtów (Feather Icons DataURI) */
.entry-content a[href$=".pdf"]::before,
.wp-block-button.zprs-file-pdf .wp-block-button__link::before,
a.zprs-file-pdf::before {
    background-color: #e2574c !important;
    -webkit-mask-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3e%3cpath d='M14 2v6h6'/%3e%3cpath d='M16 13H8'/%3e%3cpath d='M16 17H8'/%3e%3cpath d='M10 9H8'/%3e%3c/svg%3e") !important;
    mask-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3e%3cpath d='M14 2v6h6'/%3e%3cpath d='M16 13H8'/%3e%3cpath d='M16 17H8'/%3e%3cpath d='M10 9H8'/%3e%3c/svg%3e") !important;
}

.entry-content a[href$=".doc"]::before,
.entry-content a[href$=".docx"]::before,
.wp-block-button.zprs-file-doc .wp-block-button__link::before,
a.zprs-file-doc::before {
    background-color: #2b579a !important;
    -webkit-mask-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3e%3cpath d='M14 2v6h6'/%3e%3cpath d='M16 13H8'/%3e%3cpath d='M16 17H8'/%3e%3cpath d='M10 9H8'/%3e%3c/svg%3e") !important;
    mask-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3e%3cpath d='M14 2v6h6'/%3e%3cpath d='M16 13H8'/%3e%3cpath d='M16 17H8'/%3e%3cpath d='M10 9H8'/%3e%3c/svg%3e") !important;
}

.entry-content a[href$=".xls"]::before,
.entry-content a[href$=".xlsx"]::before,
.wp-block-button.zprs-file-sheet .wp-block-button__link::before,
a.zprs-file-sheet::before {
    background-color: #217346 !important;
    -webkit-mask-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3e%3cpath d='M14 2v6h6'/%3e%3cpath d='M8 13h2'/%3e%3cpath d='M8 17h2'/%3e%3cpath d='M14 13h2'/%3e%3cpath d='M14 17h2'/%3e%3c/svg%3e") !important;
    mask-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3e%3cpath d='M14 2v6h6'/%3e%3cpath d='M8 13h2'/%3e%3cpath d='M8 17h2'/%3e%3cpath d='M14 13h2'/%3e%3cpath d='M14 17h2'/%3e%3c/svg%3e") !important;
}

.entry-content a[href$=".zip"]::before,
.entry-content a[href$=".rar"]::before,
.wp-block-button.zprs-file-zip .wp-block-button__link::before,
a.zprs-file-zip::before {
    background-color: #7f8c8d !important;
    -webkit-mask-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='21 8 21 21 3 21 3 8'/%3e%3crect x='1' y='3' width='22' height='5'/%3e%3cline x1='10' y1='12' x2='14' y2='12'/%3e%3c/svg%3e") !important;
    mask-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='21 8 21 21 3 21 3 8'/%3e%3crect x='1' y='3' width='22' height='5'/%3e%3cline x1='10' y1='12' x2='14' y2='12'/%3e%3c/svg%3e") !important;
}

.wp-block-button.zprs-file-img .wp-block-button__link::before,
a.zprs-file-img::before {
    background-color: #8e44ad !important;
    -webkit-mask-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3crect x='3' y='3' width='18' height='18' rx='2' ry='2'/%3e%3ccircle cx='8.5' cy='8.5' r='1.5'/%3e%3cpolyline points='21 15 16 10 5 21'/%3e%3c/svg%3e") !important;
    mask-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3crect x='3' y='3' width='18' height='18' rx='2' ry='2'/%3e%3ccircle cx='8.5' cy='8.5' r='1.5'/%3e%3cpolyline points='21 15 16 10 5 21'/%3e%3c/svg%3e") !important;
}

/* 2. Dedykowany, piękny podłużny styl "Karta dokumentu ZPRS" dla z domyślnego bloku wp-block-file */
.wp-block-file.is-style-zprs-document-card {
    background: #f8fbff;
    border: 1px solid #e1ebf5;
    border-radius: 12px;
    padding: 20px 25px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 15px rgba(48, 118, 214, 0.05);
    margin: 20px 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.wp-block-file.is-style-zprs-document-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(48, 118, 214, 0.12);
    border-color: #c4d7ec;
}

/* Nazwa pliku z ikoną z lewej storny karty */
.wp-block-file.is-style-zprs-document-card a:not(.wp-block-file__button) {
    font-size: 17px;
    font-weight: 600;
    color: #124a80;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Customowy przycisk Pobierz wrzucony przez blok Pliku wewnątrz naszej nowej Karty */
.wp-block-file.is-style-zprs-document-card .wp-block-file__button {
    background: linear-gradient(135deg, #185a9d 0%, #3076D6 100%);
    color: #fff;
    border: none;
    padding: 10px 26px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(48, 118, 214, 0.2);
}

.wp-block-file.is-style-zprs-document-card .wp-block-file__button:hover {
    box-shadow: 0 6px 18px rgba(48, 118, 214, 0.4);
    transform: translateY(-2px);
    background: linear-gradient(135deg, #124a80 0%, #2056a6 100%);
}

/* 3. Pomocnicza klasa dla panelu edytora (Opcje zaawansowane bloku -> Klasy). Ozdobne, szare akapity. */
p.zprs-doc-desc {
    font-size: 15px;
    color: #555;
    background-color: #f1f5fb;
    border-left: 4px solid #3076D6;
    padding: 15px 20px;
    border-radius: 0 10px 10px 0;
    margin-top: -10px;
    margin-bottom: 25px;
    line-height: 1.6;
}

/* ==========================================================
   SELEKTOR ILOŚCI WPISÓW NA STRONIE
   ========================================================== */

.zprs-per-page-selector {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-bottom: 30px;
    font-size: 15px;
    color: #4a5d73;
    font-weight: 600;
}

.zprs-select {
    padding: 8px 35px 8px 16px;
    border: 1px solid #c4d7ec;
    border-radius: 6px;
    background-color: #f8fbff;
    color: #124a80;
    font-weight: 700;
    font-size: 15px;
    outline: none;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23124a80' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3cpolyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px;
    box-shadow: 0 2px 6px rgba(48, 118, 214, 0.05);
}

.zprs-select:hover,
.zprs-select:focus {
    border-color: #3076D6;
    box-shadow: 0 0 0 3px rgba(48, 118, 214, 0.15);
}

/* ==========================================================
   PRZYCISKI SZKŁO I ALUMINIUM ORAZ RĘCZNE KLASY Z IKONAMI
   ========================================================== */

/* Główna klasa przycisku Glassmorphism & Aluminum */
.wp-block-button.zprs-btn-glass-alu .wp-block-button__link,
a.zprs-btn-glass-alu {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.7) 0%, rgba(220, 226, 232, 0.45) 100%) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.8) !important;
    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.05),
        inset 0 1px 1px rgba(255, 255, 255, 0.9),
        inset 0 -1px 2px rgba(0, 0, 0, 0.04) !important;
    color: #334155 !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) !important;
    transition: all 0.3s ease !important;
    padding: 12px 28px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
}

.wp-block-button.zprs-btn-glass-alu .wp-block-button__link:hover,
a.zprs-btn-glass-alu:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(230, 235, 242, 0.6) 100%) !important;
    box-shadow:
        0 6px 20px rgba(0, 0, 0, 0.08),
        inset 0 1px 1px rgba(255, 255, 255, 1),
        inset 0 -1px 2px rgba(0, 0, 0, 0.04) !important;
    transform: translateY(-2px) !important;
    color: #1e293b !important;
}

/* USUNIĘTE Z POWODU MIGRACJI DO MASEK CSS NA LINIACH WYŻEJ (Zoptymalizowano do 1 bloku) */

/* ==========================================================
   TURBOCHARGE RELOCATED BUTTON (Bottom-Right Circular)
   ========================================================== */

.tc-button-wrap {
    position: fixed;
    bottom: 80px;
    /* Consistently raised */
    right: 30px;
    z-index: 999999;
}

/* Standard Scrollbar and TC Comet Effect */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #000f2d;
}

::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.premium-mode ::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #00ffcc 0%, #0055cc 100%);
    /* Removed heavy box-shadow for performance */
    border: none;
}

.tc-circular-btn {
    width: 45px;
    height: 45px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15), inset 0 -3px 0 rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    position: relative;
    padding: 0;
}

.tc-btn-icon {
    font-size: 20px;
    z-index: 2;
    transition: transform 0.3s ease;
}

.tc-btn-glow {
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, #ff0000, #ff8c00, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 1;
    filter: blur(10px);
}

.tc-circular-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.tc-circular-btn:active {
    transform: translateY(3px) scale(0.96);
    /* "Pressed" physical feel */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1), inset 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* Premium Mode State for Button */
.premium-mode .tc-circular-btn {
    background: #1d1d1f;
    border-color: #ffcc00;
    box-shadow: 0 0 25px rgba(255, 204, 0, 0.4), inset 0 -3px 0 rgba(255, 255, 255, 0.1);
}

.premium-mode .tc-circular-btn .tc-btn-icon {
    transform: scale(1.2) rotate(10deg);
}

.premium-mode .tc-circular-btn .tc-btn-glow {
    opacity: 0.6;
    animation: rotateGlow 5s linear infinite;
}

/* Hide rainbow glow specifically for the rocket toggle in TC */
.premium-mode #turbocharge-toggle .tc-btn-glow {
    display: none !important;
}

@keyframes rotateGlow {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Multi-Color Madness: Alternating Card Themes (Toned Down & Readable) */
/* 1st Theme - Navy */
.premium-mode .post-card:nth-child(4n+1) {
    border-color: #001f3f !important;
    background: linear-gradient(rgba(240, 245, 255, 0.98), rgba(240, 245, 255, 0.98)) !important;
    /* Tinted White */
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3) !important;
}

.premium-mode .post-card:nth-child(4n+1) .entry-title a {
    color: #001f3f !important;
}

/* 2nd Theme - Toned Pink */
.premium-mode .post-card:nth-child(4n+2) {
    border-color: #d10068 !important;
    background: linear-gradient(rgba(255, 245, 250, 0.98), rgba(255, 245, 250, 0.98)) !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3) !important;
}

.premium-mode .post-card:nth-child(4n+2) .entry-title a {
    color: #d10068 !important;
}

/* 3rd Theme - Toned Purple */
.premium-mode .post-card:nth-child(4n+3) {
    border-color: #8a1bc2 !important;
    background: linear-gradient(rgba(250, 245, 255, 0.98), rgba(250, 245, 255, 0.98)) !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3) !important;
}

.premium-mode .post-card:nth-child(4n+3) .entry-title a {
    color: #8a1bc2 !important;
}

/* 4th Theme - Toned Green */
.premium-mode .post-card:nth-child(4n+4) {
    border-color: #28a428 !important;
    background: linear-gradient(rgba(245, 255, 245, 0.98), rgba(245, 255, 245, 0.98)) !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3) !important;
}

.premium-mode .post-card:nth-child(4n+4) .entry-title a {
    color: #28a428 !important;
}

/* Override for the very first one (Pulsing Navy) */
.premium-mode .post-card:first-of-type {
    border: 3px solid #001f3f !important;
    background: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 0 50px rgba(0, 31, 63, 0.5) !important;
    animation: neonPulse 3s ease-in-out infinite alternate !important;
}

@keyframes neonPulse {
    from {
        box-shadow: 0 0 20px rgba(26, 42, 108, 0.4);
    }

    to {
        box-shadow: 0 0 60px rgba(26, 42, 108, 0.8);
    }
}

/* ==========================================================
   PREMIUM MODE (TURBOCHARGE) REFINEMENTS
   ========================================================== */

/* Light Blue Body Background for TC Mode */
body.premium-mode {
    background: #f0f7ff !important;
    /* Soft light blue */
    transition: background 0.5s ease-in-out !important;
}

@keyframes flowGradient {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Glowing smudge/strip at the top */
.premium-mode::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, transparent, #fff, transparent);
    background-size: 200% 100%;
    animation: glowingStrip 3s linear infinite;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.8), 0 0 40px rgba(255, 255, 255, 0.4);
    z-index: 9999;
}

@keyframes glowingStrip {
    from {
        background-position: -200% 0;
    }

    to {
        background-position: 200% 0;
    }
}

/* Reactive Rocket Button */
#turbocharge-toggle {
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: grayscale(1) opacity(0.6);
}

.premium-mode #turbocharge-toggle {
    filter: grayscale(0) opacity(1) !important;
    transform: scale(1.2);
    /* Pulse removed to eliminate blur */
}

@keyframes rocketPulse {

    0%,
    100% {
        transform: scale(1.2) rotate(0deg);
    }

    50% {
        transform: scale(1.3) rotate(5deg);
        box-shadow: 0 0 20px rgba(255, 204, 0, 0.6);
    }
}

/* Seamless Header Gradient Loop */
/* Restrict Animated Gradient to Site Header only */
.premium-mode .site-header {
    background: linear-gradient(90deg, #001f3f, #c31432, #6a11cb, #24fe41, #001f3f) !important;
    background-size: 200% 100% !important;
    animation: flowBannerLoop 10s linear infinite !important;
    /* Linear for constant flow */
    position: relative !important;
    z-index: 100 !important;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.5) !important;
}

@keyframes flowBannerLoop {
    0% {
        background-position: 0% 0%;
    }

    100% {
        background-position: -200% 0%;
    }
}

.premium-mode .post-card {
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 2px solid rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4) !important;
    border-radius: 40px !important;
    transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    overflow: hidden !important;
}

/* Featured Article: Horizontal Layout Restore */
.premium-mode .post-card.featured-post,
.premium-mode .post-card:first-of-type {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
}

.premium-mode .post-card:first-of-type .post-thumbnail {
    flex: 0 0 50% !important;
    max-width: 50% !important;
    margin: 0 !important;
    border-radius: 40px 0 0 40px !important;
}

.premium-mode .post-card:first-of-type .post-thumbnail img {
    height: 100% !important;
    object-fit: cover !important;
}

.premium-mode .post-card .post-content-wrap {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 25px !important;
}

/* Mobile featured stack */
@media (max-width: 991px) {

    .premium-mode .post-card.featured-post,
    .premium-mode .post-card:first-of-type {
        flex-direction: column !important;
    }

    .premium-mode .post-card:first-of-type .post-thumbnail {
        max-width: 100% !important;
        border-radius: 40px 40px 0 0 !important;
        margin: 15px !important;
    }
}

/* Artistic Image Effects in TC */
.premium-mode .post-card .post-thumbnail {
    overflow: hidden;
    position: relative;
    border-radius: 20px;
    margin: 15px;
}

/* Natural Images in TC - Effects only on hover */
.premium-mode .post-card .post-thumbnail img {
    transition: all 0.8s cubic-bezier(0.2, 1, 0.3, 1);
    filter: none;
    /* Removed default grayscale/brightness */
}

.premium-mode .post-card:hover .post-thumbnail img {
    filter: brightness(1.1) saturate(1.3) contrast(1.1) hue-rotate(-5deg);
    transform: scale(1.1) rotate(1deg);
}

.premium-mode .post-card .post-thumbnail::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.4) 100%);
    opacity: 0.6;
    transition: opacity 0.6s ease;
}

.premium-mode .post-card:hover .post-thumbnail::after {
    opacity: 0;
}

/* High Contrast DARK Titles in TC Light Mode */
.premium-mode .entry-title a {
    color: #1d1d1f !important;
    text-shadow: none !important;
    font-weight: 900 !important;
    font-size: 1.4rem !important;
}

.premium-mode .entry-content,
.premium-mode label,
.premium-mode .entry-meta {
    color: #434343 !important;
    font-weight: 500 !important;
}

/* Vertical Content Alignment within Cards */
.premium-mode .post-card .post-header,
.premium-mode .post-card .entry-header {
    min-height: 100px !important;
}

.premium-mode .post-card .post-content-wrap p:last-of-type {
    margin-top: auto !important;
}

.premium-mode .read-more-link {
    display: inline-block !important;
    margin-top: 10px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
}

/* Youthful Accents: Neon Borders & Glitchy Hover */
.premium-mode .post-card:hover {
    border-color: #ff00ff !important;
    transform: translateY(-10px) rotate(-1deg) !important;
}

.premium-mode .zprs-select {
    background: #1d1d1f !important;
    color: #fff !important;
    border: 2px solid #00ffcc !important;
    border-radius: 12px !important;
    box-shadow: 0 0 10px rgba(0, 255, 204, 0.3) !important;
}

/* Cursor aura in TC: System Arrow + Following Glow */
.premium-mode {
    cursor: auto !important;
}

/* USSR Enterprise Logo Animation in TC */
.premium-mode .custom-logo {
    animation: tc-ussr-enterprise 6s infinite ease-in-out;
    filter: drop-shadow(0 0 10px rgba(0, 255, 204, 0.4)) drop-shadow(-5px 1px 15px rgba(0, 255, 204, 0.2)) drop-shadow(-15px 3px 25px rgba(0, 255, 204, 0.1));
    position: relative;
    z-index: 10;
    will-change: transform, filter;
}

@keyframes tc-ussr-enterprise {
    0% {
        transform: translate(0, 0) rotate(0deg) scale(1);
        filter: drop-shadow(0 0 10px rgba(0, 255, 204, 0.4));
    }

    33% {
        transform: translate(2px, -1px) rotate(0.2deg) scale(1.02);
        filter: drop-shadow(-10px 0 15px rgba(0, 255, 204, 0.6));
    }

    66% {
        transform: translate(-1px, 2px) rotate(-0.2deg) scale(1.01);
        filter: drop-shadow(-20px 0 25px rgba(0, 255, 204, 0.4));
    }

    100% {
        transform: translate(0, 0) rotate(0deg) scale(1);
        filter: drop-shadow(0 0 10px rgba(0, 255, 204, 0.4));
    }
}

/* Dynamic Engine Burst for Logo in TC (Periodic Burst) */
.premium-mode .site-branding::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 105%;
    width: 0;
    height: 2px;
    background: linear-gradient(-90deg, rgba(0, 255, 204, 0.9), transparent);
    pointer-events: none;
    z-index: 5;
    filter: blur(1px);
    animation: tc-logo-trail-burst 8s infinite ease-in-out;
}

@keyframes tc-logo-trail-burst {

    0%,
    15% {
        width: 0;
        opacity: 0;
        transform: translateX(0);
    }

    18% {
        width: 300px;
        opacity: 1;
        transform: translateX(-10px);
    }

    25% {
        width: 150px;
        opacity: 0.5;
        transform: translateX(-50px);
    }

    35% {
        width: 0;
        opacity: 0;
        transform: translateX(-100px);
    }

    100% {
        width: 0;
        opacity: 0;
    }
}

/* Header Stability on Desktop */
@media (min-width: 769px) {
    .premium-mode .site-header {
        height: auto !important;
        padding: 20px 0 !important;
    }
}

/* Glow-Following Aura REMOVED completely */
.premium-mode #tc-cursor,
.premium-mode .tc-cursor-trail {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Custom SVG Cursor Coloring (System Arrow style) */
.premium-mode {
    cursor: url("data:image/svg+xml,%3Csvg width='32' height='32' viewBox='0 0 32 32' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 5l16.2 16.2-7.1.1 4.7 9.8-3.4 1.7-4.7-9.8-5.7 5.7V5z' fill='%2300BFFF' stroke='white' stroke-width='1'/%3E%3C/svg%3E") 10 5, auto !important;
}

.premium-mode .tc-hover,
.premium-mode a,
.premium-mode button,
.premium-mode input[type="submit"],
.premium-mode .menu-toggle {
    cursor: url("data:image/svg+xml,%3Csvg width='32' height='32' viewBox='0 0 32 32' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 5l16.2 16.2-7.1.1 4.7 9.8-3.4 1.7-4.7-9.8-5.7 5.7V5z' fill='%23FF0000' stroke='white' stroke-width='1'/%3E%3C/svg%3E") 10 5, pointer !important;
}

.premium-mode #tc-cursor::before {
    display: none !important;
}

/* Hover Effect: Red Glow Aura REMOVED */
.tc-hover #tc-cursor {
    display: none !important;
}

/* No scale keyframes or transforms here to prevent JS conflicts */

/* Article Header Shadow (Canva Lift Effect) */
.premium-mode .post-card .entry-title a {
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    transition: all 0.3s ease;
}

.premium-mode .post-card:hover .entry-title a {
    text-shadow: 0 8px 15px rgba(0, 0, 0, 0.6);
    transform: translateY(-2px);
}

/* Horizontal Warp Speed Effect (Subtle Streaks) */
.premium-mode .site-header {
    position: relative;
    overflow: visible !important;
    /* Fix for dropdowns/menu visibility */
    z-index: 999999 !important;
}

.premium-mode .main-navigation {
    z-index: 1000000 !important;
}

.premium-mode .site-header::before,
.premium-mode .site-header::after,
.premium-mode .header-inner::before {
    content: "";
    position: absolute;
    left: -100%;
    width: 60%;
    height: 1px;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.05) 30%,
            rgba(255, 255, 255, 0.3) 50%,
            rgba(255, 255, 255, 0.05) 70%,
            transparent 100%);
    pointer-events: none;
    z-index: 1;
    opacity: 0;
}

.premium-mode .site-header::before {
    top: 30%;
    animation: tc-warp-subtle 12s linear infinite;
}

.premium-mode .site-header::after {
    top: 70%;
    animation: tc-warp-subtle 15s linear infinite;
    animation-delay: 4s;
}

.premium-mode .header-inner::before {
    bottom: 20%;
    animation: tc-warp-subtle 10s linear infinite;
    animation-delay: 8s;
}

@keyframes tc-warp-subtle {
    0% {
        left: -100%;
        opacity: 0;
    }

    5% {
        opacity: 0.6;
    }

    15% {
        opacity: 0.6;
    }

    25% {
        left: 150%;
        opacity: 0;
    }

    100% {
        left: 150%;
        opacity: 0;
    }

    /* Long silent gap */
}


/* ==========================================================
   NATIVE MOBILE MENU TC REFINEMENTS
   ========================================================== */

/* Full Restoration to standard menu styles in TC (Fixing visibility) */
.premium-mode .main-navigation.toggled {
    z-index: 99999999 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100vh !important;
    background: #001f3f !important;
    /* Force standard navy */
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    overflow-y: auto !important;
}

.premium-mode .main-navigation.toggled ul:not(.sub-menu) {
    background: transparent !important;
    display: block !important;
    padding-top: 60px !important;
    /* Reduced from 100px */
    position: relative !important;
}

/* Ensure submenus stay collapsed in TC mobile menu */
.premium-mode .main-navigation.toggled .sub-menu {
    display: none;
    /* Let the JS toggle it */
}

.premium-mode .main-navigation.toggled .sub-menu.toggledOn {
    display: block !important;
}

.premium-mode .main-navigation.toggled li {
    display: block !important;
    text-align: center !important;
    padding: 15px !important;
}

.premium-mode .main-navigation.toggled a {
    color: #ffffff !important;
    font-size: 1.2rem !important;
}

.premium-mode .menu-toggle {
    z-index: 100000000 !important;
    position: fixed !important;
    top: 20px !important;
    right: 30px !important;
    background: rgba(0, 255, 204, 0.2) !important;
    border: 1px solid #00ffcc !important;
    border-radius: 50% !important;
    width: 60px !important;
    height: 60px !important;
    display: none !important;
    /* Hide on Desktop by default in TC */
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    transform: none !important;
    /* Prevent displacement from parent transforms */
}

@media (max-width: 992px) {
    .premium-mode .menu-toggle {
        display: flex !important;
        /* Only show on mobile/tablet */
    }
}

.premium-mode .menu-toggle .menu-label {
    display: none !important;
    /* Keep it clean and circular */
}

.premium-mode .hamburger-inner,
.premium-mode .hamburger-inner::before,
.premium-mode .hamburger-inner::after {
    background-color: #00ffcc !important;
    /* Neon cyan for TC */
}

.premium-mode .menu-toggle[aria-expanded="true"] {
    background: rgba(255, 0, 0, 0.2) !important;
    border-color: #ff0000 !important;
}

.premium-mode .menu-toggle[aria-expanded="true"] .hamburger-inner,
.premium-mode .menu-toggle[aria-expanded="true"] .hamburger-inner::before,
.premium-mode .menu-toggle[aria-expanded="true"] .hamburger-inner::after {
    background-color: #ff0000 !important;
}

.premium-mode .menu-toggle[aria-expanded="true"] i {
    background-color: transparent !important;
    color: #ff0000 !important;
    /* For FontAwesome icons */
}

/* TC-Only Menu Item Visibility */
.tc-only-item {
    display: none !important;
}

.premium-mode .tc-only-item {
    display: block !important;
}

/* TC Cursor Trail Removed */
.tc-cursor-trail {
    display: none !important;
}

/* Shimmer Animation */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.premium-mode .site-branding img {
    filter: drop-shadow(0 0 10px rgba(0, 113, 227, 0.2));
}

@media (max-width: 768px) {
    .magic-toolbar-container {
        margin: 10px 0;
        justify-content: center;
        width: 100%;
    }

    .header-inner {
        flex-direction: column !important;
        gap: 10px !important;
    }
}