/*
Theme Name: Własny motyw 2026 - Global Core
Author: Dawid
Version: 3.1
*/

/* ==========================================================================
   1. SYSTEM ZMIENNYCH (DESIGN TOKENS)
   ========================================================================== */
:root {
    /* Kolory Bazowe */
    --bg-color: #0a0a0a;
    --glass-bg: rgba(20, 20, 20, 0.7);
    --text-color: #ffffff;
    --muted-text: #cccccc;
    --border-color: rgba(255, 255, 255, 0.1);
    
    /* Kolory Akcentowe (Dynamiczne) */
    --primary-color: #a370ff; /* Nadpisane przez functions.php */
    --primary-hover: color-mix(in srgb, var(--primary-color), #ffffff 20%);
    
    /* Błędy (404 / Ostrzeżenia) - Magenta Edition */
    --error-color: #e62065;
    
    /* Mixy kolorystyczne dla HUD (przezroczystości) */
    --primary-alpha-10: color-mix(in srgb, var(--primary-color), transparent 90%);
    --primary-alpha-15: color-mix(in srgb, var(--primary-color), transparent 85%);
    --primary-alpha-20: color-mix(in srgb, var(--primary-color), transparent 80%);
    --primary-alpha-30: color-mix(in srgb, var(--primary-color), transparent 70%);
    --primary-alpha-40: color-mix(in srgb, var(--primary-color), transparent 60%);
    --primary-alpha-60: color-mix(in srgb, var(--primary-color), transparent 40%);
    
    /* Typografia i Layout */
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
    --font-base-size: 1rem;
    
    --h1-size: 3rem;
    --h2-size: 2.25rem;
    --h3-size: 1.75rem;
    --h4-size: 1.5rem;
    --h5-size: 1.25rem;
    
    /* Ujednolicone szerokości kontenerów */
    --container-width: 100%;
    --container-max: 1300px; /* Jedna, ujednolicona szerokość dla wszystkich typów stron */
    --header-width: 1800px;
    --radius: 0.75rem;
    --space-unit: 1rem;
    --header-spacing: 6rem;
}

/* ==========================================================================
   2. RESET I USTAWIENIA BAZOWE
   ========================================================================== */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: var(--font-base-size); scroll-behavior: smooth; }

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 2rem;
    margin-top: var(--header-spacing);
}

img { max-width: 100%; height: auto; border-radius: var(--radius); display: block; }

/* ==========================================================================
   3. TYPOGRAFIA I LINKI GLOBALNE
   ========================================================================== */
h1, h2, h3, h4, h5 {
    color: var(--text-color);
    line-height: 1.2;
    margin-bottom: calc(var(--space-unit) * 1.5);
    font-weight: 800;
}

h1 { font-size: var(--h1-size); letter-spacing: -0.02em; }
h2 { font-size: var(--h2-size); letter-spacing: -0.01em; }

p { margin-bottom: var(--space-unit); font-size: 1.1rem; color: var(--muted-text); }

a { color: var(--primary-color); text-decoration: none; transition: 0.3s ease; }
a:hover { color: var(--primary-hover); }

/* ==========================================================================
   4. GLOBALNE PRZYCISKI (HUD / CYBER-TECH STYLE)
   ========================================================================== */

.btn-primary, 
button, 
input[type="submit"], 
.wp-block-button__link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1.2rem 2.5rem;
    background-color: var(--glass-bg); 
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    color: var(--text-color);
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-decoration: none;
    border: 1px solid var(--primary-color);
    
    /* Zmiana krytyczna: ścięte rogi zamiast zaokrągleń */
    clip-path: polygon(15px 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%, 0 15px);
    transition: all 0.3s ease;
    cursor: pointer;
    z-index: 1;
}

/* --- EFEKT PRZELATUJĄCEGO ŚWIATŁA (SKANERA) --- */
/* Zoptymalizowane pod GPU: używamy transformacji zamiast zmiany właściwości 'left' */
.btn-primary::after, 
button::after, 
input[type="submit"]::after, 
.wp-block-button__link::after {
    content: '';
    position: absolute;
    top: 0; 
    left: 0;
    width: 150%; 
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transform: skewX(-45deg) translateX(-150%);
    transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1);
    z-index: -1;
    pointer-events: none;
}

/* --- INTERAKCJE HOVER --- */
body .btn-primary:hover, 
body button:hover, 
body input[type="submit"]:hover, 
body .wp-block-button__link:hover {
    background-color: var(--primary-alpha-15); 
    color: var(--text-color);
    /* Ramka zostaje w kolorze primary, ale dostaje neonowy glow */
    border-color: var(--primary-color);
    box-shadow: 
        inset 0 0 20px var(--primary-alpha-60), /* blask wewnątrz */
        0 0 15px var(--primary-alpha-40);      /* blask na zewnątrz */
    text-shadow: 0 0 8px var(--primary-color);
    transform: translateY(-5px);
}


/* ==========================================================================
    5. NAWIGACJA (SITE HEADER)
    ========================================================================== */
.site-header {
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--primary-color);
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 9999;
}

.header-container {
    max-width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    background-color: var(--glass-bg);
}

.logo { padding-left: 2rem; }
.logo img { display: block; max-height: 50px; width: auto; border-radius: var(--radius); }

/* --- STYLIZACJA PLACEHODERA LOGO --- */
.hud-brand {
    text-decoration: none;
    display: flex;
    align-items: baseline;
    gap: 6px;
    position: relative;
    white-space: nowrap;
}

.brand-main {
    font-family: var(--font-main);
    font-size: 2rem;
    font-weight: 900;
    color: var(--text-color);
    line-height: 1;
    letter-spacing: -1.5px;
}

.brand-sub {
    font-family: var(--font-main);
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 3px;
}

.brand-line {
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 35px;
    height: 2px;
    background: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-color);
    transition: width 0.4s ease;
}

.hud-brand:hover .brand-line {
    width: 100%;
}
/* --- KONIEC STYLIZACJI PLACEHODERA --- */

/* Desktop Navigation */
.main-navigation { flex-grow: 0; display: flex; justify-content: flex-end; }
.main-navigation ul {
    list-style: none;
    display: flex;
    flex-direction: row;
    margin: 0;
    padding: 0;
    border-left: 1px solid var(--primary-color);
}
.main-navigation li { border-right: 1px solid var(--primary-color); }

.main-navigation a {
    display: flex;
    align-items: center;
    justify-content: center;
    /* DYNAMIKA: Pionowy padding stały, poziomy z suwaka Customizera */
    padding: 1.5rem calc(var(--menu-spacing) / 2); 
    /* DYNAMIKA: Wielkość czcionki z suwaka Customizera */
    font-size: var(--menu-font-size);
    color: var(--text-color);
    font-weight: 600;
    text-transform: uppercase;
    transition: all 0.3s ease;
    white-space: nowrap;
    position: relative;
}

/* --- WARIANTY HOVER DLA MENU (STEROWANE Z CUSTOMIZERA) --- */

/* WARIANT 1: Skaner (Domyślny) */
body.hud-menu-hover-default .main-navigation a:hover { background-color: var(--primary-alpha-15); color: var(--text-color); border-color: var(--primary-color); box-shadow: inset 0 0 20px var(--primary-alpha-60), 0 0 15px var(--primary-alpha-40); text-shadow: 0 0 8px var(--primary-color); }
body.hud-menu-hover-default .main-navigation a::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 2px; background: var(--primary-color); box-shadow: 0 0 15px var(--primary-color); opacity: 0; pointer-events: none; }
body.hud-menu-hover-default .main-navigation a:hover::before { animation: hud-scan 2s linear infinite; opacity: 1; }

/* WARIANT 2: Podkreślenie taktyczne */
body.hud-menu-hover-underline .main-navigation a::after { content: ''; position: absolute; bottom: 0; left: 50%; width: 0; height: 3px; background: var(--primary-color); transition: 0.3s ease; transform: translateX(-50%); box-shadow: 0 0 10px var(--primary-color); }
body.hud-menu-hover-underline .main-navigation a:hover::after { width: 100%; }
body.hud-menu-hover-underline .main-navigation a:hover { color: var(--text-color); text-shadow: 0 0 10px var(--primary-color); background-color: var(--primary-alpha-10); }

/* WARIANT 3: Nawiasy celownicze */
body.hud-menu-hover-brackets .main-navigation a::before, body.hud-menu-hover-brackets .main-navigation a::after { position: absolute; opacity: 0; color: var(--primary-color); transition: 0.3s ease; font-weight: 900; font-size: 1.2em; top: 50%; transform: translateY(-50%); }
body.hud-menu-hover-brackets .main-navigation a::before { content: '['; left: 0; }
body.hud-menu-hover-brackets .main-navigation a::after { content: ']'; right: 0; }
body.hud-menu-hover-brackets .main-navigation a:hover::before { left: 15px; opacity: 1; text-shadow: 0 0 10px var(--primary-color); }
body.hud-menu-hover-brackets .main-navigation a:hover::after { right: 15px; opacity: 1; text-shadow: 0 0 10px var(--primary-color); }
body.hud-menu-hover-brackets .main-navigation a:hover { color: var(--text-color); background-color: transparent; }

/* WARIANT 4: Pełny neon (Agresywny) */
body.hud-menu-hover-neon .main-navigation a:hover { background-color: var(--primary-color); color: var(--bg-color); box-shadow: 0 0 20px var(--primary-color); border-color: var(--primary-color); }

/* WARIANT 5: Duch (Kontur tekstu) */
body.hud-menu-hover-ghost .main-navigation a:hover { color: transparent; -webkit-text-stroke: 1px var(--primary-color); text-shadow: 0 0 15px var(--primary-alpha-40); background-color: rgba(255,255,255,0.02); }

.site-header .main-navigation .current-menu-item a,
.site-header .main-navigation .current_page_item a {
    background-color: var(--primary-alpha-20); 
    color: var(--text-color);
    border-top: 1px solid var(--primary-color);
    border-bottom: 1px solid var(--primary-color);
}

/* Mobile Helpers */
.bottom-bar-mobile, 
.mobile-menu-overlay { display: none; }

/* Mobile Navigation Media Query */
@media (max-width: 992px) {
    .logo {
        width: 100%;
        display: flex;
        justify-content: center;
        margin-top: 10px;   
        margin-bottom: 10px; 
        padding-left: 0;
    }
    
    /* Wyśrodkowanie placeholderu na mobile */
    .logo .hud-brand { justify-content: center; }

    .main-navigation { display: none; }
    .header-container { flex-direction: column; }

    .bottom-bar-mobile {
        display: flex;
        justify-content: center;
        align-items: center;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 65px;
        background-color: var(--glass-bg); 
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        /* DYNAMIKA: Kolor obramowania na bazie primary-color */
        border-top: 1px solid var(--primary-alpha-40);
        z-index: 10001;
        box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.3);
    }

    .triangle-icon {
        display: block;
        width: 0; height: 0;
        border-left: 14px solid transparent;
        border-right: 14px solid transparent;
        border-bottom: 18px solid var(--text-color);
        position: relative;
        transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        filter: drop-shadow(0 0 5px var(--primary-color));
    }
    .triangle-icon::after {
        content: '';
        position: absolute;
        top: 8px; left: -14px;
        border-left: 14px solid transparent;
        border-right: 14px solid transparent;
        border-bottom: 10px solid var(--glass-bg);
    }

    .mobile-menu-toggle { background: none; border: none; cursor: pointer; padding: 15px; }
    .mobile-menu-toggle.active .triangle-icon { transform: rotate(180deg); }

    .mobile-menu-overlay {
        display: flex; 
        visibility: hidden;
        opacity: 0;
        position: fixed;
        top: 0; left: 0;
        width: 100%;
        height: 100svh; 
        background-color: var(--glass-bg);
        backdrop-filter: blur(10px);
        z-index: 10000;
        transform: translateY(100%);
        transition: transform 0.5s cubic-bezier(0.77, 0, 0.175, 1), opacity 0.4s ease;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 80px;
    }
    .mobile-menu-overlay.active {
        visibility: visible;
        opacity: 1;
        transform: translateY(0);
    }

    .mobile-nav-menu {
        list-style: none;
        width: 100%; 
        text-align: center;
        padding: 0; margin: 0;
    }
    .mobile-nav-menu li { display: block; width: 100%; margin-bottom: 10px; }
    
    .mobile-nav-menu li a {
        display: inline-block;
        padding: 1rem 2.5rem;
        color: var(--text-color);
        /* DYNAMIKA: Wielkość czcionki mobilnej reaguje na skalę z functions.php */
        font-size: calc(var(--menu-font-size) * 1.5); 
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 1px;
        transition: all 0.3s ease;
        border: 1px solid transparent;
        border-radius: var(--radius);
    }
    
    .mobile-nav-menu .current-menu-item > a,
    .mobile-nav-menu .current_page_item > a {
        display: block; 
        width: 100vw; 
        background-color: var(--primary-alpha-15); 
        border-top: 1px solid var(--primary-alpha-40);
        border-bottom: 1px solid var(--primary-alpha-40);
        border-left: none; border-right: none;
        border-radius: 0; 
        color: var(--text-color);
        box-shadow: 0 0 20px var(--primary-alpha-10);
    }
}

/* ==========================================================================
   6. SEKCJA HERO (STRONA GŁÓWNA)
   ========================================================================== */
.hero-section.homepage-hero {
    position: relative;
    width: 100%;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Neonowa poświata Hero używająca koloru primary z domieszką czerni */
    background: radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--primary-color), #000 60%) 0%, var(--bg-color) 100%);
    overflow: hidden;
    border-bottom: 1px solid var(--primary-color);
    padding: 120px 0;
}

.hero-bg-visuals {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0;
    pointer-events: none;
}

.tech-dot-pattern {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: radial-gradient(var(--primary-alpha-15) 2px, transparent 2px);
    background-size: 30px 30px;
    z-index: 1;
}

.mesh-blob { position: absolute; border-radius: 50%; filter: blur(120px); z-index: 0; }
/* Podeszliśmy dynamicznie do blobów, używając odcieni systemowych */
.mesh-1 { top: -30%; left: -10%; width: 800px; height: 800px; background: color-mix(in srgb, var(--bg-color), transparent 30%); }
.mesh-2 { top: 50%; right: -10%; transform: translateY(-50%); width: 600px; height: 600px; background: var(--primary-alpha-40); }
.mesh-3 { bottom: -20%; left: 30%; width: 500px; height: 500px; background: color-mix(in srgb, var(--bg-color), transparent 40%); }

.hero-section.homepage-hero .hero-container {
    position: relative;
    width: 100%;
    text-align: center;
    z-index: 2;
}

body .hero-section.homepage-hero .hero-container .hero-title.cohesive-title {
    font-size: 4.5rem;
    color: var(--text-color);
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 2.5rem;
    letter-spacing: 2px;
    text-shadow: 0 10px 30px var(--primary-alpha-30);
}

.hero-description-box {
    max-width: 800px;
    margin: 0 auto 3.5rem auto;
    padding: 30px 45px;
    background: var(--glass-bg);
    border: 1px solid var(--primary-alpha-15);
    border-radius: 12px;
    backdrop-filter: blur(15px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.5);
    position: relative;
}
.hero-description-box::before {
    content: '';
    position: absolute;
    top: 15%; left: -1px;
    width: 3px; height: 70%;
    background: var(--primary-color);
    box-shadow: 0 0 15px var(--primary-color);
    border-radius: 4px;
}
.hero-description-box p { 
    font-size: 1.15rem; 
    color: var(--text-color); /* Zmieniono z hardkodowanego #d0d0d0 na systemowy */
    margin: 0; 
    font-weight: 300;
    line-height: 1.8;
}

@media (max-width: 992px) {
    .hero-section.homepage-hero { min-height: 60vh; padding: 100px 0; }
    body .hero-section.homepage-hero .hero-container .hero-title.cohesive-title { font-size: 2.8rem; margin-bottom: 1.5rem; }
    .hero-description-box { padding: 20px 25px; margin-bottom: 2.5rem; }
    .hero-description-box p { font-size: 1rem; }
    .mesh-blob { filter: blur(60px); opacity: 0.6; }
}

/* ==========================================================================
   7. LISTA WPISÓW I SIATKA (GRID) - NEON ACCENT EDITION
   ========================================================================== */
.latest-posts-manual { padding: 80px 0; width: 100%; }

.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
}

.post-card {
    background-color: var(--glass-bg); /* Szklane tło */
    border: 1px solid var(--primary-alpha-10); /* Bardzo subtelna ramka */
    /* Fioletowy akcent u góry każdej karty */
    border-top: 3px solid var(--primary-color); 
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.post-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-alpha-40);
    /* Neonowa poświata całej karty na hoverze */
    box-shadow: 0 15px 40px var(--primary-alpha-30);
}

/* Stylizacja zdjęcia z fioletowym overlayem */
.post-thumbnail {
    position: relative;
    overflow: hidden;
}

.post-thumbnail::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(45deg, var(--primary-alpha-40), transparent);
    opacity: 0; /* Ukryty domyślnie */
    transition: opacity 0.3s ease;
}

.post-card:hover .post-thumbnail::after {
    opacity: 1;
}

.post-thumbnail .post-img { 
    width: 100%; 
    height: 250px; 
    object-fit: cover; 
    display: block;
    transition: transform 0.5s ease;
    border-radius: 0; /* Unikamy promienia na zdjęciu wewnątrz karty */
}

.post-card:hover .post-img {
    transform: scale(1.05); /* Delikatny zoom zdjęcia */
}

/* Treść wpisu */
.post-content { padding: 30px; display: flex; flex-direction: column; flex-grow: 1; }

/* STYLIZACJA TYTUŁU Z PODKREŚLNIKIEM */
.post-title {
    position: relative;
    margin-bottom: 20px;
}

.post-title a {
    color: var(--text-color);
    font-size: 1.4rem;
    display: inline-block; /* Ważne dla pozycjonowania pseudo-elementu */
    font-weight: 700;
    margin-bottom: 10px;
    transition: color 0.3s ease;
}

/* Fioletowy podkreślnik (Neon Line) */
.post-title::after {
    content: '';
    display: block;
    width: 40px; /* Startowa długość */
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
    box-shadow: 0 0 10px var(--primary-alpha-60); /* Delikatny glow */
    transition: width 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Efekt hover dla podkreślnika */
.post-card:hover .post-title::after {
    width: 80px; /* Wydłużenie linii po najechaniu na kartę */
    background: var(--primary-hover);
}


.post-title a:hover { 
    color: var(--primary-hover);
    /* Subtelny blask tekstu na hoverze */
    text-shadow: 0 0 10px var(--primary-alpha-50); 
}

.post-excerpt {
    font-size: 1rem;
    color: var(--muted-text);
    margin-bottom: 25px;
    line-height: 1.6;
    flex-grow: 1;
}

/* Przycisk wewnątrz karty - spójność z globalnymi buttonami */
.post-card .btn-primary { 
    align-self: flex-start; 
    padding: 1rem 2rem; 
    font-size: 0.9rem;
}

/* --- RWD --- */
@media (max-width: 992px) {
    .posts-grid { grid-template-columns: repeat(2, 1fr); padding: 0 20px; }
}

@media (max-width: 768px) {
    .posts-grid { grid-template-columns: 1fr; gap: 40px; }
    .post-content { text-align: center; align-items: center; }
    .post-card .btn-primary { align-self: center; }
    .post-title a { font-size: 1.6rem; }
}

/* ==========================================================================
   8. MODUŁY FUNKCYJNE (HOME - HUD STYLE)
   ========================================================================== */

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin: 60px 0;
}

.feature-module,
.wp-block-motyw-hud-tactical-module {
    position: relative;
    padding: 40px;
    background-color: var(--glass-bg);
    border: 1px solid var(--primary-alpha-10);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center; /* Zmiana z center na lewo */
    text-align: left;
}

/* --- IKONA I EFEKT SKANOWANIA (Inline SVG) --- */
.feature-module .module-icon-wrap,
.wp-block-motyw-hud-tactical-module .module-icon-wrap {
    position: relative;
    width: 60px;
    height: 60px;
    margin-bottom: 25px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-module .module-icon-wrap svg,
.wp-block-motyw-hud-tactical-module .module-icon-wrap svg {
    width: 100%;
    height: 100%;
    stroke: var(--primary-color);
    fill: none;
    filter: drop-shadow(0 0 5px color-mix(in srgb, var(--primary-color), transparent 20%));
    transition: transform 0.3s ease;
}

.feature-module:hover .module-icon-wrap svg,
.wp-block-motyw-hud-tactical-module:hover .module-icon-wrap svg {
    transform: scale(1.1);
}

.feature-module .icon-scan-line,
.wp-block-motyw-hud-tactical-module .icon-scan-line {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 2px;
    background: var(--primary-color);
    box-shadow: 0 0 15px var(--primary-color);
    opacity: 0;
    pointer-events: none;
}

.feature-module:hover .icon-scan-line,
.wp-block-motyw-hud-tactical-module:hover .icon-scan-line {
    animation: hud-scan 2s linear infinite;
    opacity: 1;
}

/* --- TYPOGRAFIA --- */
.module-title {
    font-size: 1.4rem;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    font-weight: 800;
}

.module-desc {
    font-size: 0.95rem;
    color: var(--muted-text);
    line-height: 1.6;
    margin: 0;
}

/* --- NAROŻNIKI HUD --- */
.feature-module .hud-corner,
.wp-block-motyw-hud-tactical-module .hud-corner {
    position: absolute;
    width: 15px;
    height: 15px;
    border: 2px solid var(--primary-color);
    opacity: 0.2;
    transition: all 0.3s ease;
}

.top-left { top: -2px; left: -2px; border-right: none; border-bottom: none; }
.bottom-right { bottom: -2px; right: -2px; border-left: none; border-top: none; }

/* --- INTERAKCJE (HOVER) --- */
.feature-module:hover,
.wp-block-motyw-hud-tactical-module:hover {
    background: var(--primary-alpha-10);
    border-color: var(--primary-alpha-40);
    transform: translateY(-10px);
}

.feature-module:hover .hud-corner,
.wp-block-motyw-hud-tactical-module:hover .hud-corner {
    opacity: 1;
    width: 25px;
    height: 25px;
    box-shadow: 0 0 10px var(--primary-color);
}

.feature-module:hover .icon-scan-line,
.wp-block-motyw-hud-tactical-module:hover .icon-scan-line {
    animation: hud-scan 2s linear infinite;
    opacity: 1;
}

.feature-module:hover svg,
.wp-block-motyw-hud-tactical-module:hover svg {
    transform: scale(1.1);
}

@keyframes hud-scan {
    0% { top: 0%; opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

/* RWD */
@media (max-width: 992px) {
    .features-grid { grid-template-columns: 1fr; gap: 30px; }
}

/* ==========================================================================
   9. STRONA WPISU (SINGLE.PHP)
   ========================================================================== */

.post-hero.dynamic-hero {
    position: relative;
    padding: 100px 0;
    background-color: var(--bg-color);
    overflow: hidden;
    text-align: center;
    border-bottom: 1px solid var(--primary-color);
}

/* --- TŁO I GEOMETRIA HERO --- */
.hero-shapes-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0; overflow: hidden;
}

.grid-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: 1;
}

.shape-blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.6; }
.shape-1 { top: -20%; left: -10%; width: 600px; height: 600px; background: color-mix(in srgb, var(--primary-color), transparent 55%); }
.shape-2 { bottom: -10%; right: -5%; width: 400px; height: 400px; background: color-mix(in srgb, var(--primary-hover), transparent 75%); }

/* --- TŁO I GEOMETRIA HERO --- */
.hero-shapes-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0; overflow: hidden;
}

.grid-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: 1;
}

.shape-blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.6; }
.shape-1 { top: -20%; left: -10%; width: 600px; height: 600px; background: color-mix(in srgb, var(--primary-color), transparent 55%); }
.shape-2 { bottom: -10%; right: -5%; width: 400px; height: 400px; background: color-mix(in srgb, var(--primary-hover), transparent 75%); }

.dynamic-hero .hero-container { position: relative; z-index: 2; max-width: var(--container-max); margin: 0 auto; }

/* --- TYTUŁ I BREADCRUMBS --- */
.title-wrapper { position: relative; display: block; width: 100%; margin-bottom: 2.5rem; }
.post-hero-title { font-size: 3.8rem; line-height: 1.15; color: var(--text-color); margin: 0; text-shadow: 0 5px 20px rgba(0, 0, 0, 0.6); }

.title-wrapper::after {
    content: ''; display: block; width: 80px; height: 4px;
    background: var(--primary-color); margin: 30px auto 0 auto;
    border-radius: 2px; box-shadow: 0 0 15px var(--primary-color);
}

.post-breadcrumbs {
    display: inline-flex;
    align-items: center;
    background: var(--glass-bg); /* Poprawiono z hardkodowanego rgba(42, 42, 42, 0.6) */
    padding: 8px 24px;
    border-radius: 30px;
    border: 1px solid var(--primary-alpha-20);
    font-size: 0.85rem;
    color: var(--muted-text);
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    backdrop-filter: blur(10px);
}
.post-breadcrumbs a { color: var(--text-color); font-weight: 600; }
.post-breadcrumbs .separator { 
    margin: 0 10px; 
    color: var(--primary-color); 
    display: flex;
    align-items: center;
}

.post-hero-excerpt { font-size: 1.25rem; color: var(--text-color); /* Poprawiono z hardkodowanego #e0e0e0 */ line-height: 1.6; font-weight: 300; margin-bottom: 2.5rem; }

.post-metadata { 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    flex-wrap: wrap; 
    gap: 25px; 
    font-size: 0.95rem; 
    color: var(--muted-text); /* Poprawiono z hardkodowanego #cccccc */
}
.post-metadata span { display: flex; align-items: center; gap: 8px; }
/* Ikony meta-danych Single Post używają systemowego hover dla odróżnienia */
.post-metadata svg { color: var(--primary-hover); }

/* --- TREŚĆ WPISU (SZEROKOŚĆ 1000PX) --- */
.post-content-container { margin-top: 4rem; }

.single-post-article .entry-content { 
    width: var(--container-width);
    max-width: var(--container-max);
    margin: 0 auto; 
    font-size: 1.2rem; 
    line-height: 1.8; 
}

/* Stopka wpisu i tagi */
.post-footer { 
    width: var(--container-width);
    max-width: var(--container-max);
    margin: 40px auto; 
    padding-top: 20px; 
    border-top: 1px solid var(--border-color); 
}
.post-tags span { color: var(--primary-hover); font-weight: 800; font-size: 0.8rem; text-transform: uppercase; margin-right: 10px; }
.post-tags a {
    display: inline-block;
    padding: 5px 15px;
    background: var(--primary-alpha-10);
    border: 1px solid var(--primary-alpha-20);
    border-radius: 4px;
    color: var(--text-color);
    font-size: 0.85rem;
    margin-right: 8px;
    margin-bottom: 8px;
}
.post-tags a:hover { background: var(--primary-color); border-color: var(--primary-color); color: var(--text-color); }

/* ==========================================================================
   9.1 NAWIGACJA WE WPISIE (HUD STYLE - 1000PX)
   ========================================================================== */
.post-navigation-hud {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 80px auto;
    width: var(--container-width);
    max-width: var(--container-max);
}

.nav-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 30px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--primary-alpha-10);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    text-decoration: none;
}

.nav-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--primary-hover);
    margin-bottom: 10px;
    font-weight: 800;
}

.nav-title { font-size: 1.1rem; color: var(--text-color); font-weight: 700; line-height: 1.4; }

.nav-card:hover {
    background: color-mix(in srgb, var(--primary-alpha-10), transparent 50%);
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--primary-alpha-20);
}

.next .nav-card { text-align: right; }

/* ==========================================================================
   9.2 KOMENTARZE (HUD TECH STYLE - 1000PX)
   ========================================================================== */
.post-comments-area {
    width: var(--container-width);
    max-width: var(--container-max);
    margin: 60px auto;
    padding: 40px;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

/* Ukrywanie zbędnego tekstu systemowego */
#respond .comment-notes, 
#respond .logged-in-as, 
#respond .comment-form-cookies-consent { 
    display: none; 
}

.comment-reply-title { 
    font-size: 1.8rem; 
    margin-bottom: 30px; 
    text-transform: uppercase; 
    color: var(--text-color);
}

/* Układ Imię + Email (2 kolumny) */
.comment-form-flex {
    display: flex;
    gap: 20px;
    margin-bottom: 5px;
}

.comment-form-flex p { flex: 1; }

/* Pola formularza */
#commentform input[type="text"], 
#commentform input[type="email"], 
#commentform textarea {
    width: 100%;
    background: rgba(30, 30, 30, 0.6);
    backdrop-filter: blur(5px);
    border: 1px solid var(--primary-alpha-20);
    padding: 15px 20px;
    color: var(--text-color);
    font-family: var(--font-main);
    border-radius: 4px;
    transition: all 0.3s ease;
}

#commentform input:focus, 
#commentform textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    background: color-mix(in srgb, var(--primary-alpha-10), transparent 50%);
    box-shadow: 0 0 15px var(--primary-alpha-20);
}

/* Przycisk Submit */
#commentform #submit {
    padding: 1rem 2.5rem;
    background-color: var(--primary-alpha-20);
    border: 1px solid var(--primary-color);
    color: var(--text-color);
    text-transform: uppercase;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
}

#commentform #submit:hover {
    background-color: var(--primary-alpha-15); 
    color: var(--text-color);
    /* Ramka zostaje w kolorze primary, ale dostaje neonowy glow */
    border-color: var(--primary-color);
    box-shadow: 
        inset 0 0 20px var(--primary-alpha-60), /* blask wewnątrz */
        0 0 15px var(--primary-alpha-40);      /* blask na zewnątrz */
    text-shadow: 0 0 8px var(--primary-color);
    transform: translateY(-5px);
}

/* --- MEDIA QUERIES --- */
@media (max-width: 992px) {
    .post-hero-title { font-size: 2.8rem; }
    .post-navigation-hud { gap: 20px; padding: 0 20px; }
}

@media (max-width: 768px) {
    .post-hero.dynamic-hero { padding: 60px 0; }
    .post-hero-title { font-size: 2.2rem; }
    .comment-form-flex { flex-direction: column; gap: 0; }
    .post-navigation-hud { grid-template-columns: 1fr; }
    .single-post-article .entry-content, 
    .post-comments-area { padding: 20px; width: 95%; }
}

/* ==========================================================================
   10. ELEMENTY UŻYTKOWE (SCROLL TOP)
   ========================================================================== */
body #globalScrollTopBtn.scroll-top-btn {
    position: fixed;
    bottom: 40px; right: 40px; left: auto;
    width: 60px; height: 60px;
    padding: 0;
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--primary-alpha-30);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 999999; 
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
}

body #globalScrollTopBtn.scroll-top-btn svg.scroll-icon {
    display: block;
    color: var(--text-color); stroke: var(--text-color); 
    width: 24px; height: 24px;
    transition: transform 0.3s ease;
}

body #globalScrollTopBtn.scroll-top-btn.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }

@media (hover: hover) {
    body #globalScrollTopBtn.scroll-top-btn:hover {
        background: var(--primary-alpha-40);
        border-color: var(--primary-color);
        transform: translateY(-5px);
        box-shadow: 0 0 20px var(--primary-alpha-60);
    }
    body #globalScrollTopBtn.scroll-top-btn:hover svg.scroll-icon { transform: translateY(-3px); }
}

@media (hover: none) {
    body #globalScrollTopBtn.scroll-top-btn:active {
        background: var(--primary-alpha-30);
        transform: scale(0.9);
        transition: 0.1s;
    }
}

@media (max-width: 768px) {
    body #globalScrollTopBtn.scroll-top-btn { bottom: 90px; right: 20px; width: 60px; height: 60px; }
    body #globalScrollTopBtn.scroll-top-btn svg.scroll-icon { width: 28px; height: 28px; }
}

/* ==========================================================================
   11. STOPKA (SITE FOOTER)
   ========================================================================== */
.site-footer {
    background-color: var(--glass-bg);
    color: var(--text-color);
    padding: 3rem 0;
    margin-top: 5rem;
    border-top: 1px solid var(--primary-color);
}

.footer-container {
    margin-top: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
}

.footer-info p { font-size: 0.9rem; color: var(--text-color); /* Poprawiono z hardkodowanego #e0e0e0 */ margin-bottom: 0; }
.footer-links { list-style: none; display: flex; gap: 2rem; padding: 0; }
.footer-links a { color: var(--text-color); font-size: 0.9rem; opacity: 0.8; }
.footer-links a:hover { opacity: 1; color: var(--primary-hover); }

/* ==========================================================================
   12. SZABLON BLOGA (ARCHIWUM - 2 KOLUMNY HUD STYLE)
   ========================================================================== */

.blog-archive-section {
    padding: 100px 0;
    background-color: transparent;
    background-image: radial-gradient(circle at 10% 10%, var(--primary-alpha-10) 0%, transparent 40%);
}

.blog-archive-section {
    padding: 100px 0;
    background-color: transparent;
    /* Subtelna poświata tła archiwum, zintegrowana z systemem kolorów */
    background-image: radial-gradient(circle at 10% 10%, var(--primary-alpha-10) 0%, transparent 40%);
}

.archive-header { margin-bottom: 70px; text-align: left; }
.archive-title { font-size: 3.5rem; text-transform: uppercase; margin-bottom: 15px; }
.archive-line { width: 100px; height: 4px; background: var(--primary-color); box-shadow: 0 0 15px var(--primary-color); margin-bottom: 30px;}

.archive-intro-text {
    width: 100%;
    max-width: 100%;
    font-size: 1.2rem;
    color: var(--muted-text);
    line-height: 1.8;
}

/* SIATKA POSTÓW */
.blog-posts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 50px 40px;
}

/* SIATKA POSTÓW ALT - 3 KOLUMNY (Dla nowego Bloku ACF) */
.blog-posts-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.blog-card-alt {
    position: relative;
    background-color: var(--glass-bg);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    border-radius: 0; /* Karty archiwum bloga są ostre */
}

.card-inner { border: 1px solid var(--border-color); height: 100%; z-index: 1; display: flex; flex-direction: column; }
.card-image-wrap { position: relative; overflow: hidden; height: 280px; }
.card-image-wrap img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s ease; filter: saturate(0.8); border-radius: 0; }

.card-category {
    position: absolute; top: 20px; right: 20px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid var(--primary-color);
    padding: 5px 12px;
    font-size: 0.75rem; text-transform: uppercase; font-weight: 700; z-index: 2;
}
.card-category a { color: var(--text-color); }

.card-body-alt { padding: 35px; display: flex; flex-direction: column; flex-grow: 1; }
.card-meta-wrap { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; }
.card-meta-date, .card-meta-author { font-size: 0.75rem; color: var(--primary-hover); text-transform: uppercase; letter-spacing: 2px; font-weight: 700; }
.card-meta-separator { color: color-mix(in srgb, var(--primary-color), transparent 60%); font-weight: 300; }

.card-title-alt { margin-bottom: 15px; display: flex; align-items: center; gap: 10px; }
.card-title-alt a { color: var(--text-color); font-size: 1.8rem; line-height: 1.2; font-weight: 800; }
.card-excerpt-alt { font-size: 1rem; color: var(--muted-text); margin-bottom: 30px; line-height: 1.7; }

/* PRZYCISK CZYTAJ + POWIĘKSZONY TRÓJKĄT */
.card-read-more {
    font-size: 0.85rem; font-weight: 800; margin-top: auto;
    text-transform: uppercase; letter-spacing: 1px;
    color: var(--text-color); display: inline-flex; align-items: center; gap: 10px;
}

.hud-arrow-triangle {
    color: var(--primary-color);
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.blog-card-alt:hover .hud-arrow-triangle {
    transform: translateX(6px) scale(1.15);
    filter: drop-shadow(0 0 8px var(--primary-color));
}

/* NAROŻNIKI HUD */
.hud-corner {
    position: absolute; width: 20px; height: 20px;
    border: 2px solid var(--primary-color); z-index: 2;
    pointer-events: none; transition: 0.3s ease;
}
.top-left { top: -5px; left: -5px; border-right: none; border-bottom: none; }
.bottom-right { bottom: -5px; right: -5px; border-left: none; border-top: none; }

.blog-card-alt:hover { transform: translateY(-5px); background: rgba(45, 45, 45, 0.5); }
.blog-card-alt:hover .hud-corner { width: 40px; height: 40px; box-shadow: 0 0 15px var(--primary-color); }

/* ==========================================================================
   13. PAGINACJA: STYL "GLASS SCROLL TOP"
   ========================================================================== */
.pagination-wrap {
    margin-top: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

/* Styl bazowy identyczny z przyciskiem Scroll Top */
.pagination-wrap .page-numbers {
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--primary-alpha-20);
    border-radius: 12px; /* Kwadratowy z zaokrąglonymi rogami */
    color: var(--text-color);
    font-weight: 800;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* Ikony trójkątów wewnątrz paginacji */
.pagination-wrap .page-numbers .pag-icon {
    width: 18px;
    height: 18px;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

/* Stan aktywnej strony (Neon Glow) */
.pagination-wrap .page-numbers.current {
    background: var(--primary-alpha-30);
    border-color: var(--primary-color);
    color: var(--text-color);
    box-shadow: 0 0 20px var(--primary-alpha-40);
    transform: scale(1.1);
}

/* Hover na elementach paginacji */
.pagination-wrap .page-numbers:not(.current):hover {
    background: var(--primary-alpha-20);
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px var(--primary-alpha-20);
}

.pagination-wrap .page-numbers.next:hover .pag-icon { transform: translateX(3px); }
.pagination-wrap .page-numbers.prev:hover .pag-icon { transform: translateX(-3px); }

/* RWD */
@media (max-width: 992px) {
    .blog-posts-grid { grid-template-columns: 1fr; gap: 40px; }
    .blog-posts-grid-3 { grid-template-columns: repeat(2, 1fr); }
    .pagination-wrap { gap: 8px; }
    .pagination-wrap .page-numbers { width: 45px; height: 45px; font-size: 0.9rem; }
}
@media (max-width: 768px) {
    .blog-posts-grid-3 { grid-template-columns: 1fr; gap: 30px; }
}
/* ==========================================================================
   14. ARCHIWUM / LISTA WPISÓW (INDEX.PHP)
   ========================================================================== */

.archive-hero { padding: 80px 0 40px 0; border-bottom: 1px solid var(--primary-alpha-20); background-color: transparent; }
.archive-content-container { margin: 60px auto; width: 100%; max-width: var(--container-max); }

.hud-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 40px;
}

.hud-post-card {
    position: relative;
    background-color: var(--glass-bg);
    border: 1px solid var(--primary-alpha-15);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    border-radius: 0;
}

.hud-post-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--primary-alpha-15);
}

.post-card-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid var(--primary-alpha-20);
    filter: grayscale(80%) contrast(1.2);
    transition: filter 0.3s ease;
    border-radius: 0;
}

.hud-post-card:hover .post-card-image img { filter: grayscale(0%); }

.post-card-body { padding: 30px; flex-grow: 1; display: flex; flex-direction: column; }

.post-meta-hud {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary-color);
    margin-bottom: 15px;
    border-bottom: 1px dashed color-mix(in srgb, var(--primary-color), transparent 70%);
    padding-bottom: 10px;
}

.post-meta-hud a { color: var(--primary-color); }

.post-title { font-size: 1.4rem; line-height: 1.4; margin-bottom: 15px; display: flex; align-items: center; gap: 10px; }
.post-title a { color: var(--text-color); text-decoration: none; }
.post-title a:hover { color: var(--primary-hover); }

.entry-summary { font-size: 0.95rem; color: var(--muted-text); line-height: 1.6; margin-bottom: 25px; flex-grow: 1; }

.read-more-hud {
    display: inline-block;
    align-self: flex-start;
    padding: 8px 15px;
    background: var(--primary-alpha-10);
    border: 1px solid var(--primary-color);
    color: var(--text-color);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.read-more-hud:hover { background: var(--primary-color); color: var(--text-color); }

.hud-post-card .hud-corner {
    position: absolute; width: 15px; height: 15px; border: 2px solid var(--primary-color); opacity: 0.5;
}
.hud-post-card .top-left { top: -2px; left: -2px; border-right: none; border-bottom: none; }
.hud-post-card .bottom-right { bottom: -2px; right: -2px; border-left: none; border-top: none; }

/* Paginacja Archiwum/Index */
.pagination-hud { margin-top: 60px; text-align: center; }
.pagination-hud .nav-links { display: inline-flex; gap: 10px; }
.pagination-hud .page-numbers {
    padding: 10px 15px; background: rgba(30,30,30,0.5); border: 1px solid var(--primary-alpha-20);
    color: var(--text-color); text-decoration: none; transition: 0.3s;
    border-radius: var(--radius);
}
.pagination-hud .page-numbers.current, .pagination-hud .page-numbers:hover {
    background: var(--primary-color); border-color: var(--primary-color); color: var(--text-color);
}

/* ==========================================================================
   15. BŁĄD 404 (SYSTEM FAILURE - MAGENTA ACCENT)
   ========================================================================== */

/* Zachowaliśmy specyficzny kolor błędu Magenty dla strony 404 */
.error-404-section {
    min-height: calc(100vh - 200px); /* Precyzyjne wypełnienie miejsca między nagłówkiem a stopką */
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid color-mix(in srgb, var(--error-color), transparent 70%);
    position: relative;
    overflow: hidden;
}

/* --- TŁO I ZAKŁÓCENIA --- */
/* Bloby 404 używają koloru błędu */
.hero-shapes-bg .error-blob-1 { 
    background: color-mix(in srgb, var(--error-color), transparent 80%); 
    position: absolute; border-radius: 50%; filter: blur(90px); 
}
.hero-shapes-bg .error-blob-2 { 
    background: color-mix(in srgb, var(--error-color), transparent 88%); 
    position: absolute; border-radius: 50%; filter: blur(90px); 
}

/* Zastępstwo dla kratki - delikatne linie skanujące CRT błędu */
.error-scanlines-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        color-mix(in srgb, var(--error-color), transparent 97%) 2px,
        color-mix(in srgb, var(--error-color), transparent 97%) 4px
    );
    pointer-events: none;
    z-index: 1;
}

/* --- KONTENER HUD --- */
.error-hud-box {
    position: relative;
    padding: 60px 80px;
    background: rgba(20, 5, 10, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid color-mix(in srgb, var(--error-color), transparent 70%);
    display: inline-block;
    text-align: center;
    margin: 0 auto;
    box-shadow: 0 0 40px color-mix(in srgb, var(--error-color), transparent 85%);
    z-index: 5;
    border-radius: 0; /* Ostre rogi dla 404 HUD */
}

.error-hud-box .error-corner { 
    border-color: var(--error-color); 
    position: absolute; 
    width: 15px; height: 15px; 
    border: 2px solid; 
    opacity: 0.5; 
}

/* --- ORYGINALNY EFEKT GLITCH (Z KOLOREM BŁĘDU) --- */
.error-code.glitch-text {
    position: relative;
    font-size: 8rem;
    color: var(--error-color);
    margin: 0;
    line-height: 1;
    font-weight: 900;
    letter-spacing: 5px;
    text-shadow: 0 0 20px color-mix(in srgb, var(--error-color), transparent 50%);
}

.error-code.glitch-text::before,
.error-code.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: transparent;
}

.error-code.glitch-text::before {
    left: 4px;
    text-shadow: -2px 0 #00ffff;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

/* Użyliśmy systemowego primary dla drugiego cienia glitch, dla spójności */
.error-code.glitch-text::after {
    left: -4px;
    text-shadow: -2px 0 var(--primary-color);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% { clip: rect(84px, 9999px, 83px, 0); }
    5% { clip: rect(13px, 9999px, 84px, 0); }
    10% { clip: rect(51px, 9999px, 86px, 0); }
    15% { clip: rect(61px, 9999px, 92px, 0); }
    20% { clip: rect(93px, 9999px, 9px, 0); }
    25% { clip: rect(89px, 9999px, 53px, 0); }
    30% { clip: rect(32px, 9999px, 8px, 0); }
    100% { clip: rect(67px, 9999px, 98px, 0); }
}

@keyframes glitch-anim2 {
    0% { clip: rect(65px, 9999px, 100px, 0); }
    5% { clip: rect(52px, 9999px, 74px, 0); }
    10% { clip: rect(79px, 9999px, 85px, 0); }
    15% { clip: rect(75px, 9999px, 5px, 0); }
    20% { clip: rect(67px, 9999px, 61px, 0); }
    25% { clip: rect(14px, 9999px, 79px, 0); }
    30% { clip: rect(1px, 9999px, 46px, 0); }
    100% { clip: rect(89px, 9999px, 59px, 0); }
}

/* --- TEKSTY I PRZYCISK BŁĘDU --- */
.error-status {
    font-size: 1.5rem;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 20px 0;
}

.error-description {
    color: var(--muted-text);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 40px;
}

.btn-error-reboot {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    background: color-mix(in srgb, var(--error-color), transparent 90%);
    border: 1px solid var(--error-color);
    color: var(--text-color);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 0;
}

.btn-error-reboot:hover {
    background: var(--error-color);
    color: var(--text-color);
    box-shadow: 0 0 20px color-mix(in srgb, var(--error-color), transparent 50%);
}

.reboot-icon { transition: transform 0.3s ease; }
.btn-error-reboot:hover .reboot-icon { transform: rotate(180deg); }

/* RWD 404 */
@media (max-width: 768px) {
    .error-hud-box { padding: 40px 20px; border-left: none; border-right: none; }
    .error-code.glitch-text { font-size: 5rem; }
}

/* ==========================================================================
   16. DYNAMICZNE BLOBY (HOME HERO ANIMATION)
   ========================================================================== */
.mesh-blob {
    /* Używamy głównej zmiennej systemowej dla gradientów */
    background: radial-gradient(circle, var(--primary-color) 0%, transparent 70%);
}

/* Zachowaliśmy animacje */
.mesh-1 { top: -10%; left: -10%; animation: float-blob 20s infinite alternate; }
.mesh-2 { top: 20%; right: -5%; animation: float-blob 25s infinite alternate-reverse; }
.mesh-3 { bottom: -10%; left: 30%; animation: float-blob 18s infinite alternate; }

@keyframes float-blob {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 30px) scale(1.1); }
}

/* ==========================================================================
   2.1 GLOBALNE ANIMOWANE TŁO (HUD TECH BACKGROUND)
   ========================================================================== */
.global-animated-bg {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: -1; /* Prawdziwe tło - za treścią */
    pointer-events: none;
    overflow: hidden;
    mix-blend-mode: screen; /* Zachowuje się jak projekcja świetlna z HUD */
}

/* --- 1. RADAR (OBRACAJĄCE SIĘ KROPKI) --- */
.bg-type-radar::before,
.bg-type-radar::after {
    content: '';
    position: absolute;
    width: 200vw; height: 200vh;
    top: -50vh; left: -50vw;
    background-image: radial-gradient(var(--primary-alpha-30) 2px, transparent 2px);
    background-size: 60px 60px;
    transform-origin: center;
    animation: hud-bg-rotate 60s linear infinite;
}

.bg-type-radar::after {
    background-image: radial-gradient(var(--primary-alpha-20) 2px, transparent 2px);
    background-size: 100px 100px;
    animation: hud-bg-rotate 40s linear infinite reverse;
}

@keyframes hud-bg-rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- 2. SIATKA TAKTYCZNA (PŁYNNY PRZESUW) --- */
.bg-type-grid::before {
    content: '';
    position: absolute;
    width: 200vw; height: 200vh;
    top: -50vh; left: -50vw;
    background-image: 
        linear-gradient(var(--primary-alpha-10) 1px, transparent 1px),
        linear-gradient(90deg, var(--primary-alpha-10) 1px, transparent 1px);
    background-size: 50px 50px;
    /* Płynne przesunięcie w nieskończoność na dystansie jednego oczka siatki */
    animation: hud-grid-pan 10s linear infinite;
}

@keyframes hud-grid-pan {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* --- 3. SKANER 360 (PŁYNNY OBRÓT) --- */
.bg-type-sweep::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 200vw; height: 200vw;
    margin-top: -100vw; margin-left: -100vw;
    background: conic-gradient(from 0deg, transparent 70%, var(--primary-alpha-20) 100%);
    border-radius: 50%;
    animation: hud-sweep-rotate 8s linear infinite;
}

@keyframes hud-sweep-rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- 4. REAKTOR (PULSUJĄCE GEOMETRYCZNE OKRĘGI) --- */
.bg-type-pulse::before {
    content: '';
    position: absolute;
    /* Centrujemy na środku viewportu */
    top: 50%; left: 50%; width: 200vw; height: 200vw;
    margin-top: -100vw; margin-left: -100vw;
    background: repeating-radial-gradient(circle, transparent, transparent 80px, var(--primary-alpha-10) 82px, transparent 84px);
    animation: hud-pulse-expand 8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes hud-pulse-expand {
    0% { transform: scale(0.8); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: scale(1.5); opacity: 0; }
}

/* --- 5. PRZEPŁYW DANYCH (KROPKI DIAGONALNE) --- */
.bg-type-dots-flow::before {
    content: '';
    position: absolute;
    width: 200vw; height: 200vh;
    top: -50vh; left: -50vw;
    background-image: radial-gradient(var(--primary-alpha-30) 2px, transparent 2px);
    background-size: 40px 40px;
    animation: hud-flow-diag 10s linear infinite;
}

@keyframes hud-flow-diag {
    0% { transform: translate(0, 0); }
    100% { transform: translate(40px, 40px); }
}

/* --- 6. AKTYWNE WĘZŁY (KROPKI PULSUJĄCE) --- */
.bg-type-dots-twinkle::before,
.bg-type-dots-twinkle::after {
    content: '';
    position: absolute;
    width: 100vw; height: 100vh;
    top: 0; left: 0;
    background-image: radial-gradient(var(--primary-alpha-40) 2px, transparent 2px);
    background-size: 60px 60px;
    animation: hud-twinkle 4s ease-in-out infinite alternate;
}

.bg-type-dots-twinkle::after {
    background-size: 90px 90px;
    background-position: 30px 30px;
    animation-delay: -2s;
}

@keyframes hud-twinkle {
    0% { opacity: 0.1; }
    100% { opacity: 0.8; }
}

/* --- 7. ECHOLOKACJA (POJEDYNCZY PULS) --- */
.bg-type-pulse-sonar::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%; width: 150vw; height: 150vw;
    margin-top: -75vw; margin-left: -75vw;
    border: 3px solid var(--primary-alpha-40);
    border-radius: 50%;
    animation: hud-sonar 4s ease-out infinite;
}

@keyframes hud-sonar {
    0% { transform: scale(0.1); opacity: 1; }
    100% { transform: scale(1.2); opacity: 0; }
}

/* --- 8. ZAKŁÓCENIA (FALE PRZESTRZENNE) --- */
.bg-type-pulse-ripple::before,
.bg-type-pulse-ripple::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%; width: 150vw; height: 150vw;
    margin-top: -75vw; margin-left: -75vw;
    box-shadow: inset 0 0 50px var(--primary-alpha-30);
    border-radius: 50%;
    animation: hud-ripple 6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.bg-type-pulse-ripple::after {
    animation-delay: -3s;
}

@keyframes hud-ripple {
    0% { transform: scale(0.1); opacity: 1; }
    100% { transform: scale(1); opacity: 0; }
}

/* ==========================================================================
    17. INTERFEJS STRON STATYCZNYCH (TACTICAL HUD)
   ========================================================================== */

/* --- PAGE HERO --- */
.page-hero-hud {
    position: relative;
    padding: 80px 0 40px 0;
    overflow: hidden;
}

.page-hero-container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

/* --- WARIANTY TŁA PAGE HERO (Wygląd -> Dostosuj) --- */
/* 1. Wyraźne Szkło */
.hero-style-glass {
    background-color: rgba(15, 15, 15, 0.65);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--primary-alpha-20);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
/* 2. Cyber Gradient */
.hero-style-gradient {
    background: linear-gradient(135deg, var(--primary-alpha-20) 0%, transparent 100%);
    border-bottom: 1px solid var(--primary-alpha-30);
}
/* 3. Hologram (Dolna poświata) */
.hero-style-glow {
    background-color: transparent;
    background-image: radial-gradient(ellipse at 50% 100%, var(--primary-alpha-20) 0%, transparent 70%);
    border-bottom: 1px solid var(--primary-alpha-60);
}
/* 4. Strefa Taktyczna (Pasy skośne) */
.hero-style-stripes {
    background-color: rgba(10, 10, 10, 0.9);
    border-bottom: 1px solid var(--primary-color);
}
/* 5. Struktura Węglowa (Hex) */
.hero-style-hex {
    background-color: rgba(12, 12, 12, 0.9);
    border-bottom: 2px dashed var(--primary-alpha-40);
}
.hero-style-hex::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-image: radial-gradient(var(--primary-alpha-20) 2px, transparent 2px),
                      radial-gradient(var(--primary-alpha-20) 2px, transparent 2px);
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
    pointer-events: none; z-index: -1;
}
/* 6. Matryca 3D (Perspektywa) */
.hero-style-3dgrid {
    background-color: rgba(5, 5, 5, 0.9);
    border-bottom: 2px solid var(--primary-color);
    perspective: 1000px;
}
.hero-style-3dgrid::before {
    content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background-image: linear-gradient(var(--primary-alpha-20) 1px, transparent 1px),
                      linear-gradient(90deg, var(--primary-alpha-20) 1px, transparent 1px);
    background-size: 40px 40px;
    transform-origin: center 80%;
    pointer-events: none; z-index: -1;
    animation: hud-hero-3d 10s linear infinite;
}
@keyframes hud-hero-3d {
    0% { transform: rotateX(60deg) translateY(0); }
    100% { transform: rotateX(60deg) translateY(40px); }
}
/* 7. Skaner Danych (Kod kreskowy) */
.hero-style-barcode {
    background-color: rgba(10, 10, 10, 0.85);
    border-bottom: 1px solid var(--primary-color);
}
.hero-style-barcode::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: repeating-linear-gradient(90deg, transparent, transparent 10px, var(--primary-alpha-10) 10px, var(--primary-alpha-10) 12px, transparent 12px, transparent 30px, var(--primary-alpha-20) 30px, var(--primary-alpha-20) 32px);
    pointer-events: none; z-index: -1;
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}
/* 8. Topografia (Pierścienie Sonaru) */
.hero-style-sonar {
    background-color: rgba(5, 5, 10, 0.85);
    border-bottom: 1px solid var(--primary-alpha-30);
}
.hero-style-sonar::before {
    content: ''; position: absolute; top: 50%; left: 50%; width: 100vw; height: 100vw;
    transform: translate(-50%, -50%);
    background: repeating-radial-gradient(circle, transparent, transparent 40px, var(--primary-alpha-10) 41px, var(--primary-alpha-10) 42px);
    pointer-events: none; z-index: -1;
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 50%, transparent);
    mask-image: linear-gradient(to bottom, transparent, black 50%, transparent);
}
.hero-style-stripes::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: repeating-linear-gradient(-45deg, transparent, transparent 15px, var(--primary-alpha-10) 15px, var(--primary-alpha-10) 30px);
    pointer-events: none; z-index: -1;
}

/* Narożniki dla pełnej szerokości */
.page-hero-hud .hud-corner {
    width: 30px; height: 30px; border-width: 2px; z-index: 5;
}
.page-hero-hud .top-left { top: -2px; left: -2px; }
.page-hero-hud .bottom-right { bottom: -2px; right: -2px; }

/* --- CLEAN TECH INTERFACE --- */
.page-interface-clean {
    padding: 60px 0 80px;
    background-color: transparent;
}


/* Zwykły kontener na tekst bez ramki */
.plain-content-container {
    width: var(--container-width);
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 2rem;
}

/* --- NAGŁÓWEK H1 --- */
.ui-header-clean {
    margin-bottom: 0;
}

.ui-title-box {
    display: inline-block;
    position: relative;
    cursor: default;
}

.entry-title-clean {
    font-size: 3rem;
    font-weight: 900;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: -1px;
    margin: 0;
    line-height: 1;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    z-index: 2;
}

/* Precyzyjna linia pod tytułem */
.ui-title-underline {
    height: 4px;
    width: 60px;
    background: var(--primary-color);
    margin-top: 15px;
    box-shadow: 0 0 15px var(--primary-color);
    transition: width 0.5s cubic-bezier(0.77, 0, 0.175, 1), box-shadow 0.3s ease;
}

/* --- TREŚĆ --- */
.entry-content-clean {
    color: var(--muted-text);
    font-size: 1.15rem;
    line-height: 1.8;
}

/* Delikatne akcenty fioletowe wewnątrz treści */
.entry-content-clean h2, .entry-content h2,
.entry-content-clean h3, .entry-content h3,
.entry-content-clean h4, .entry-content h4,
.entry-content-clean h5, .entry-content h5,
.entry-content-clean h6, .entry-content h6,
.entry-content-clean .wp-block-heading, 
.entry-content .wp-block-heading {
    color: var(--text-color);
    text-transform: uppercase;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    font-weight: 800;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Domyślnie ukryte, reaguje na body_class */
body.hud-indicator-disabled :is(.entry-content, .entry-content-clean) :is(h2, h3, h4, h5, h6, .wp-block-heading)::before {
    display: none;
}

body:not(.hud-indicator-disabled) :is(.entry-content, .entry-content-clean) :is(h2, h3, h4, h5, h6, .wp-block-heading)::before {
    content: "";
    display: inline-block;
    box-shadow: 0 0 10px var(--primary-alpha-40);
    flex-shrink: 0;
    color: var(--primary-color);
}

/* --- WARIANTY WSKAŹNIKÓW --- */
body.hud-indicator-line :is(.entry-content, .entry-content-clean) :is(h2, h3, h4, h5, h6, .wp-block-heading)::before {
    width: 4px; height: 1.2em; background: var(--primary-color);
}
body.hud-indicator-square :is(.entry-content, .entry-content-clean) :is(h2, h3, h4, h5, h6, .wp-block-heading)::before {
    width: 12px; height: 12px; background: var(--primary-color);
}
body.hud-indicator-diamond :is(.entry-content, .entry-content-clean) :is(h2, h3, h4, h5, h6, .wp-block-heading)::before {
    width: 10px; height: 10px; border: 2px solid var(--primary-color); transform: rotate(45deg); background: transparent;
}
body.hud-indicator-bracket :is(.entry-content, .entry-content-clean) :is(h2, h3, h4, h5, h6, .wp-block-heading)::before {
    content: ">"; background: none; box-shadow: none; text-shadow: 0 0 10px var(--primary-alpha-40);
    font-family: var(--font-main); font-size: 1.2em; line-height: 1; margin-right: 5px;
}
body.hud-indicator-slash :is(.entry-content, .entry-content-clean) :is(h2, h3, h4, h5, h6, .wp-block-heading)::before {
    content: "//"; background: none; box-shadow: none; text-shadow: 0 0 10px var(--primary-alpha-40);
    font-family: var(--font-main); font-size: 1.2em; line-height: 1; margin-right: 5px;
}

.entry-content-clean strong {
    color: var(--primary-color);
    font-weight: 700;
}

/* Formatowanie list we wpisach statycznych */
.entry-content-clean ul,
.entry-content-clean ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.entry-content-clean li {
    margin-bottom: 0.5rem;
    position: relative;
}

/* Customowe kropki listy w HUD */
.entry-content-clean ul {
    list-style: none;
}
.entry-content-clean ul li::before {
    content: '■';
    color: var(--primary-color);
    position: absolute;
    left: -1.5rem;
    top: -1px;
    font-size: 0.8rem;
}


/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .entry-title-clean { font-size: 2rem; }
    .page-hero-hud { padding: 40px 0 20px 0; }
}

/* --- EFEKTY HOVER --- */
/* 1. Rozszerzenie linii na pełną szerokość tytułu */
.ui-title-box:hover .ui-title-underline {
    width: 100%;
    box-shadow: 0 0 25px var(--primary-color), 0 0 10px var(--primary-color);
}

/* 2. Subtelny efekt przesunięcia tekstu i poświaty */
.ui-title-box:hover .entry-title-clean {
    color: #fff;
    text-shadow: 
        2px 0 10px var(--primary-alpha-40),
        -2px 0 10px rgba(0, 255, 255, 0.2); /* Delikatna aberracja chromatyczna */
    transform: translateX(5px);
}

/* ==========================================================================
   18. FORMULARZE (STYLIZACJA WTYCZEK NP. CONTACT FORM 7)
   ========================================================================== */
.hud-form-wrapper, .wpcf7 {
    background: var(--glass-bg);
    border: 1px solid var(--primary-alpha-20);
    padding: 50px 40px;
    position: relative;
    margin: 40px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.hud-form-wrapper .hud-corner, .wpcf7 .hud-corner {
    position: absolute; width: 25px; height: 25px;
    border: 2px solid var(--primary-color);
    opacity: 0.5; z-index: 2;
}

.hud-form-wrapper .top-left, .wpcf7 .top-left { top: -2px; left: -2px; border-right: none; border-bottom: none; }
.hud-form-wrapper .bottom-right, .wpcf7 .bottom-right { bottom: -2px; right: -2px; border-left: none; border-top: none; }

.hud-form-heading {
    font-size: 1.6rem;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid var(--primary-alpha-20);
    padding-bottom: 15px;
}

.hud-form-heading::before {
    content: ""; display: inline-block;
    width: 4px; height: 1.2em; background: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-alpha-40); flex-shrink: 0;
}

.hud-contact-form, .wpcf7-form {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
}

.hud-form-group, .wpcf7-form p {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-bottom: 0;
}

.hud-form-group.width-50 { width: calc(50% - 12.5px); }
.hud-form-group.width-100 { width: 100%; }

.hud-form-group label, .wpcf7-form label {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--primary-color);
    margin-bottom: 8px;
    font-weight: 700;
    letter-spacing: 1px;
}

.hud-form-group input[type="text"],
.hud-form-group input[type="email"],
.hud-form-group textarea,
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form textarea {
    width: 100%;
    background: rgba(10, 10, 10, 0.6);
    border: 1px solid var(--primary-alpha-20);
    border-left: 3px solid var(--primary-color);
    color: var(--text-color);
    padding: 15px 20px;
    font-family: var(--font-main);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.hud-form-group input[type="text"]:focus,
.hud-form-group input[type="email"]:focus,
.hud-form-group textarea:focus,
.wpcf7-form input[type="text"]:focus,
.wpcf7-form input[type="email"]:focus,
.wpcf7-form textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    background: rgba(10, 10, 10, 0.9);
    box-shadow: 0 0 15px var(--primary-alpha-10);
    transform: translateX(5px);
}

.wpcf7-submit { width: auto; align-self: flex-start; margin-top: 15px; }

.form-response, .wpcf7-response-output { margin-top: 15px !important; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; border: 1px solid var(--primary-color) !important; background: var(--glass-bg) !important; border-radius: 0 !important;}
.status-success, .wpcf7 form.sent .wpcf7-response-output { border-color: #00ffcc !important; color: #00ffcc; text-shadow: 0 0 10px rgba(0,255,204,0.4); }
.status-error, .wpcf7 form.invalid .wpcf7-response-output, .wpcf7 form.unaccepted .wpcf7-response-output { border-color: var(--error-color) !important; color: var(--error-color); text-shadow: 0 0 10px color-mix(in srgb, var(--error-color), transparent 50%); }

.wpcf7-not-valid-tip { font-size: 0.8rem; color: var(--error-color); margin-top: 5px; }

@media (max-width: 768px) {
    .hud-form-group.width-50 { width: 100%; }
}

/* ==========================================================================
   19. WYSZUKIWARKA (HUD SEARCH & WP SEARCH FORM)
   ========================================================================== */
.hud-search-form,
.search-form {
    display: flex;
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.hud-search-form .search-field,
.search-form .search-field {
    width: 100%;
    background: rgba(10, 10, 10, 0.8);
    border: 1px solid var(--primary-alpha-30);
    border-left: 3px solid var(--primary-color);
    color: var(--text-color);
    padding: 12px 90px 12px 20px; /* Zwiększony padding, żeby pomieścić tekst "Szukaj" w razie potrzeby */
    font-family: 'Fira Code', 'Roboto Mono', var(--font-main);
    font-size: 1rem;
    letter-spacing: 2px;
    outline: none;
    transition: all 0.3s ease;
    border-radius: 0;
    caret-color: var(--primary-color); /* Kursor wpisywania */
}

/* Usunięcie domyślnego "x" (clear) przeglądarki, by nie nachodził na ikonę lupy */
.hud-search-form .search-field::-webkit-search-decoration,
.hud-search-form .search-field::-webkit-search-cancel-button,
.hud-search-form .search-field::-webkit-search-results-button,
.hud-search-form .search-field::-webkit-search-results-decoration,
.search-form .search-field::-webkit-search-decoration,
.search-form .search-field::-webkit-search-cancel-button,
.search-form .search-field::-webkit-search-results-button,
.search-form .search-field::-webkit-search-results-decoration {
    -webkit-appearance: none;
    display: none;
}

.hud-search-form .search-field:focus,
.search-form .search-field:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 15px var(--primary-alpha-20), inset 0 0 10px var(--primary-alpha-10);
    background: rgba(0, 0, 0, 0.9);
}

.hud-search-form .search-field::placeholder,
.search-form .search-field::placeholder {
    color: var(--primary-alpha-40);
    text-transform: uppercase;
}

.hud-search-form .search-submit,
.search-form .search-submit {
    position: absolute; right: 0; top: 0; height: 100%;
    background: transparent; border: none; color: var(--primary-color);
    cursor: pointer; transition: all 0.3s ease; padding: 0; clip-path: none;
    display: flex; align-items: center; justify-content: center;
}

/* Przycisk z ikoną (Nasz natywny) */
.hud-search-form button.search-submit,
.search-form button.search-submit {
    width: 50px;
}

/* Przycisk tekstowy (Domyślny WordPressa "Szukaj" np. w widgetach) */
.hud-search-form input.search-submit,
.search-form input.search-submit {
    width: auto;
    padding: 0 20px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
    background: var(--primary-alpha-15);
    border-left: 1px solid var(--primary-alpha-30);
}

.hud-search-form button.search-submit:hover,
.search-form button.search-submit:hover { color: var(--text-color); background: var(--primary-alpha-20); box-shadow: none; transform: none; }

.hud-search-form input.search-submit:hover,
.search-form input.search-submit:hover { background: var(--primary-color); color: var(--text-color); }

.hud-search-form .search-submit::after,
.search-form .search-submit::after { display: none; } /* Usuwamy światło clip-path */

/* --- Pasek w nagłówku (Micro HUD) --- */
.header-search { display: flex; align-items: center; }
.header-search.desktop-only { margin-left: auto; padding-right: 1.5rem; padding-left: 1.5rem; border-right: 1px solid var(--primary-color); }
.header-search .hud-search-form { max-width: 250px; }
.header-search .search-field { padding: 8px 40px 8px 15px; font-size: 0.85rem; background: rgba(0,0,0,0.4); }

/* Warianty wizualne (Wybierane w Customizerze) */
.search-style-minimal .search-field { background: transparent; border: none; border-bottom: 2px solid var(--primary-alpha-40); padding-left: 5px; }
.search-style-minimal .search-field:focus { background: transparent; border-bottom-color: var(--primary-color); box-shadow: none; }

.search-style-ghost .search-field { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; backdrop-filter: blur(5px); border-left: 1px solid rgba(255,255,255,0.1); }
.search-style-ghost .search-field:focus { background: rgba(255,255,255,0.1); border-color: var(--primary-alpha-60); box-shadow: 0 0 10px var(--primary-alpha-20); border-left-color: var(--primary-alpha-60); }

.search-style-pill .search-field { background: rgba(0,0,0,0.5); border: 1px solid var(--primary-alpha-40); border-radius: 50px; padding-left: 20px; border-left: 1px solid var(--primary-alpha-40); }
.search-style-pill .search-field:focus { border-color: var(--primary-color); box-shadow: 0 0 15px var(--primary-alpha-20); background: rgba(0,0,0,0.8); border-left-color: var(--primary-color); }

.search-style-terminal .search-field { background: #000; border: 1px solid #333; border-left: 1px solid #333; color: #0f0; font-family: 'Courier New', monospace; caret-color: #0f0; }
.search-style-terminal .search-field:focus { border-color: #0f0; background: #050505; box-shadow: none; border-left-color: #0f0; }
.search-style-terminal .search-submit { color: #0f0; }
.search-style-terminal .search-submit:hover { color: #000; background: #0f0; }

@media (max-width: 992px) {
    .header-search.desktop-only { display: none; }
    .mobile-menu-overlay .header-search { padding: 0 2rem 2rem 2rem; width: 100%; border-left: none; margin-bottom: 2rem; border-bottom: 1px solid var(--primary-alpha-20); }
    .mobile-menu-overlay .hud-search-form { max-width: 100%; }
    .mobile-menu-overlay .search-field { padding: 15px 50px 15px 20px; font-size: 1.1rem; }
}

/* ==========================================================================
   9.3 KARTA AUTORA (AUTHOR BOX)
   ========================================================================== */
.hud-author-box {
    position: relative;
    display: flex;
    gap: 40px;
    margin: 60px auto;
    width: var(--container-width);
    max-width: var(--container-max);
    align-items: center;
    transition: all 0.4s ease;
}

/* Elementy dekoracyjne paska systemowego */
.author-box-decoration {
    position: absolute;
    top: 0; left: 0; width: 100%;
    padding: 8px 20px;
    background: rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid var(--primary-alpha-20);
    display: flex; align-items: center; gap: 8px;
}
.author-box-decoration .decor-dot { width: 6px; height: 6px; background: var(--primary-color); display: inline-block; }
.author-box-decoration .decor-dot:nth-child(2) { opacity: 0.5; }
.author-box-decoration .decor-text { font-family: 'Fira Code', 'Roboto Mono', monospace; font-size: 0.7rem; color: var(--primary-color); text-transform: uppercase; letter-spacing: 2px; margin-left: 10px; }

.hud-author-box .hud-corner {
    position: absolute; width: 20px; height: 20px; border: 2px solid var(--primary-color); opacity: 0.5;
}

.author-avatar-wrap {
    position: relative;
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--primary-alpha-40);
    box-shadow: 0 0 15px var(--primary-alpha-20);
}

.author-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) contrast(1.2);
    transition: all 0.3s ease;
}

.hud-author-box:hover .author-avatar { filter: grayscale(0%); }

.avatar-scanline {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 2px;
    background: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-color);
    animation: hud-scan 3s linear infinite;
    opacity: 0.7;
}

.author-info { flex-grow: 1; }
.author-name { font-size: 1.5rem; color: var(--text-color); margin-bottom: 10px; text-transform: uppercase; letter-spacing: 1px; }
.author-label { font-size: 0.8rem; color: var(--primary-color); display: block; margin-bottom: 5px; letter-spacing: 2px; }
.author-bio { font-size: 1rem; color: var(--muted-text); margin-bottom: 15px; line-height: 1.6; }

/* ==========================================================================
   9.4 WARIANTY KARTY AUTORA (CUSTOMIZER)
   ========================================================================== */

/* 1. STANDARDOWY HUD */
.author-style-default {
    padding: 70px 40px 40px 40px; background: var(--glass-bg);
    background-image: linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 20px 20px; border: 1px solid var(--primary-alpha-20); border-top: 3px solid var(--primary-color); box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* 2. HOLOGRAM (POŚWIATA) */
.author-style-hologram {
    padding: 70px 40px 40px 40px; background: radial-gradient(ellipse at 50% 100%, var(--primary-alpha-15) 0%, transparent 70%);
    border-bottom: 2px solid var(--primary-color); border-top: 1px solid var(--primary-alpha-10); box-shadow: 0 20px 50px var(--primary-alpha-10);
}
.author-style-hologram .author-box-decoration { background: transparent; border-bottom: 1px dashed var(--primary-alpha-40); }
.author-style-hologram .author-avatar { filter: none; opacity: 0.7; }
.author-style-hologram:hover .author-avatar { opacity: 1; filter: drop-shadow(0 0 15px var(--primary-color)); }

/* 3. CYBERPUNK (AGRESYWNY) */
.author-style-cyberpunk {
    padding: 70px 40px 40px 40px; background: rgba(15, 10, 20, 0.95); border: 2px solid var(--primary-color);
    clip-path: polygon(30px 0, 100% 0, 100% calc(100% - 30px), calc(100% - 30px) 100%, 0 100%, 0 30px);
}
.author-style-cyberpunk .hud-corner { display: none; }
.author-style-cyberpunk .author-box-decoration { background: var(--primary-color); border-bottom: none; }
.author-style-cyberpunk .author-box-decoration .decor-text { color: var(--bg-color); font-weight: 900; }
.author-style-cyberpunk .author-box-decoration .decor-dot { background: var(--bg-color); opacity: 1; }
.author-style-cyberpunk .author-avatar-wrap { border-radius: 0; clip-path: polygon(15px 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%, 0 15px); }

/* 4. MINIMALISTYCZNY (CZYSTY) */
.author-style-minimal {
    padding: 40px; background: transparent; border: none; border-left: 4px solid var(--primary-color); box-shadow: none;
}
.author-style-minimal .author-box-decoration { display: none; }
.author-style-minimal .hud-corner { display: none; }
.author-style-minimal .author-avatar-wrap { border: none; border-radius: 0; box-shadow: none; }
.author-style-minimal .avatar-scanline { display: none; }
.author-style-minimal .author-avatar { filter: grayscale(100%); }

/* 5. TERMINAL (KONSOLA) */
.author-style-terminal {
    padding: 50px 40px 40px 40px; background: #000; border: 1px solid #333; border-top: 15px solid #333; box-shadow: inset 0 0 20px rgba(0,255,0,0.05);
}
.author-style-terminal .author-name, .author-style-terminal .author-bio, .author-style-terminal .author-label { font-family: 'Fira Code', 'Roboto Mono', monospace; }
.author-style-terminal .author-box-decoration { top: -15px; background: transparent; border: none; padding: 0 10px; height: 15px; }
.author-style-terminal .author-box-decoration .decor-text { color: #888; font-size: 0.6rem; letter-spacing: 0; text-transform: lowercase; margin: 0; }
.author-style-terminal .author-box-decoration .decor-dot { display: none; }
.author-style-terminal .author-avatar { filter: grayscale(100%) contrast(1.5) sepia(100%) hue-rotate(80deg) saturate(3); } /* Efekt zielonego monitora */

@media (max-width: 768px) {
    .hud-author-box { flex-direction: column; text-align: center; padding: 30px 20px; }
}

/* --- Obszar Widżetów Blokowych (Stopka) --- */
.footer-widgets-area {
    width: 100%;
    text-align: left;
    border-bottom: 1px dashed var(--primary-alpha-20);
    padding-bottom: 3rem;
    margin-bottom: 1rem;
}

.footer-widgets-area .widget { margin-bottom: 2.5rem; }
.footer-widgets-area .widget:last-child { margin-bottom: 0; }

.footer-widgets-area .widget-title {
    color: var(--primary-color);
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
    font-weight: 800;
}

.footer-widgets-area .wp-block-columns { margin-bottom: 0; }

@media (max-width: 768px) {
    .footer-widgets-area { text-align: center; }
}

/* --- Obszar Widżetów Blokowych (Stopka) --- */
.footer-widgets-area {
    width: 100%;
    text-align: left;
    border-bottom: 1px dashed var(--primary-alpha-20);
    padding-bottom: 3rem;
    margin-bottom: 1rem;
}

.footer-widgets-area .widget { margin-bottom: 2.5rem; }
.footer-widgets-area .widget:last-child { margin-bottom: 0; }

.footer-widgets-area .widget-title {
    color: var(--primary-color);
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
    font-weight: 800;
}

.footer-widgets-area .wp-block-columns { margin-bottom: 0; }

@media (max-width: 768px) {
    .footer-widgets-area { text-align: center; }
}

/* ==========================================================================
   20. NATYWNY BLOK: PASEK POSTĘPU (PROGRESS BAR)
   ========================================================================== */
.hud-progress-block {
    margin-bottom: 30px;
    width: 100%;
}

/* --- WSPÓLNE DLA TEKSTU (NAGŁÓWEK I OPIS) --- */
.hud-progress-text-content { margin-bottom: 25px; }
.hud-progress-title {
    font-size: var(--h3-size);
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    font-weight: 800;
}
.hud-progress-desc {
    font-size: 0.95rem;
    color: var(--muted-text);
    margin: 0;
}

/* --- Wyrównanie i layout (Flexbox dla form SVG/Counter) --- */
.hud-progress-block.align-left { text-align: left; }
.hud-progress-block.align-center { text-align: center; }
.hud-progress-block.align-right { text-align: right; }

.hud-progress-visuals { display: flex; width: 100%; }
.hud-progress-block.align-left .hud-progress-visuals { justify-content: flex-start; }
.hud-progress-block.align-center .hud-progress-visuals { justify-content: center; }
.hud-progress-block.align-right .hud-progress-visuals { justify-content: flex-end; }

/* --- FORMA 1: PASEK (BAR) --- */
.hud-progress-wrapper-bar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%; /* Pasek zawsze wypełnia dostępną przestrzeń */
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: default;
}

.hud-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    font-family: var(--font-main);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hud-progress-label {
    font-size: 0.9rem;
    color: var(--text-color);
    font-weight: 700;
}

.hud-progress-value {
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: 900;
    font-family: 'Fira Code', 'Roboto Mono', monospace;
    text-shadow: 0 0 10px var(--primary-alpha-40);
}

.hud-progress-track {
    position: relative;
    width: 100%;
    height: 14px;
    background: rgba(10, 10, 10, 0.8);
    border: 1px solid var(--primary-alpha-30);
    overflow: hidden;
    clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
}

.hud-progress-fill {
    position: relative;
    height: 100%;
    background: var(--primary-color);
    box-shadow: 0 0 15px var(--primary-alpha-60);
    transform-origin: left;
    /* Animacja rozwijania od 0 zdefiniowana dla płynności */
    animation: hud-progress-load 1.5s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

.hud-progress-glow {
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: 40px;
    background: rgba(255, 255, 255, 0.6);
    filter: blur(8px);
    animation: hud-progress-scan 2.5s linear infinite;
}

@keyframes hud-progress-load {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

.hud-progress-wrapper-bar:hover { transform: scale(1.02); }
.hud-progress-wrapper-bar:hover .hud-progress-fill { box-shadow: 0 0 25px var(--primary-color); }
.hud-progress-wrapper-bar:hover .hud-progress-value { color: var(--text-color); text-shadow: 0 0 15px var(--primary-color); }


/* --- FORMA 2: OKRĄG (CIRCLE) --- */
.hud-progress-wrapper-circle {
    position: relative;
    width: 180px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: default;
}
.hud-circle-svg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    transform: rotate(-90deg); /* Start ładowania od góry (godz. 12:00) */
    overflow: visible; /* Eliminuje problem ucinania blasku w kwadrat */
}
.hud-circle-bg {
    fill: none;
    stroke: var(--primary-alpha-20);
    stroke-width: 6;
}
.hud-circle-fill {
    fill: none;
    stroke: var(--primary-color);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 282.74; /* Obwód okręgu (2 * pi * r) */
    transition: all 0.4s ease;
    animation: hud-circle-load 1.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    filter: drop-shadow(0 0 5px var(--primary-color)); /* Stały kolor bazy likwiduje zielony przebłysk w Webkit */
}
.hud-circle-content {
    display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 2;
    width: 75%; /* Ogranicza szerokość tekstu by nie nachodził na SVG */
    text-align: center;
}
.shape-circle .hud-progress-value { font-size: 2rem; line-height: 1; margin-bottom: 2px; }
.shape-circle .hud-progress-label { font-size: 0.75rem; color: var(--muted-text); margin-top: 5px; text-transform: uppercase; letter-spacing: 1px; }

.hud-progress-wrapper-circle:hover { transform: scale(1.05); }
.hud-progress-wrapper-circle:hover .hud-circle-fill { filter: drop-shadow(0 0 15px var(--primary-color)); stroke-width: 8; }
.hud-progress-wrapper-circle:hover .hud-progress-value { color: var(--text-color); text-shadow: 0 0 15px var(--primary-color); }

@keyframes hud-circle-load {
    from { stroke-dashoffset: 282.74; }
}

/* --- FORMA 3: LICZNIK (COUNTER) --- */
.hud-progress-wrapper-counter {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 50px;
    background: var(--glass-bg);
    border: 1px solid var(--primary-alpha-20);
    box-shadow: inset 0 0 20px var(--primary-alpha-10);
    clip-path: polygon(15px 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%, 0 15px);
    position: relative;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: default;
}
.hud-progress-wrapper-counter::before {
    content: ''; position: absolute; top: -2px; left: -2px; width: 15px; height: 15px; border: 2px solid var(--primary-color); border-right: none; border-bottom: none;
    transition: all 0.4s ease;
}
.shape-counter .hud-progress-value.large {
    font-size: 3.5rem;
    line-height: 1;
    margin-bottom: 5px;
    color: var(--primary-color);
    transition: all 0.4s ease;
    text-shadow: 0 0 15px var(--primary-alpha-60);
}

.hud-progress-wrapper-counter:hover {
    transform: translateY(-5px) scale(1.05);
    border-color: var(--primary-color);
    box-shadow: inset 0 0 30px var(--primary-alpha-20), 0 10px 30px var(--primary-alpha-10);
}
.hud-progress-wrapper-counter:hover .hud-progress-value.large { color: var(--text-color); }
.shape-counter .hud-progress-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-color);
}

@keyframes hud-progress-scan {
    0% { left: -40px; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { left: 100%; opacity: 0; }
}
