/*
Theme Name: Radny Theme "Buda"
Author: Piotr Buda
Description: A high-tech, ultra-modern theme for a City Councillor.
Version: 1.0.99
Text Domain: buda
*/

/* -------------------------------------------------------------------------- */
/*	0. Reset & Variables
/* -------------------------------------------------------------------------- */
:root {
    /* Colors - Dark Luxe */
    --color-bg: #050511;
    /* Almost black, deep midnight */
    --color-bg-secondary: #0a0a1a;

    --color-text-main: #f0f4f8;
    --color-text-muted: #94a3b8;

    /* Neons & Accents */
    --color-primary: #3b82f6;
    /* Electric Blue */
    --color-accent: #8b5cf6;
    /* Violet */
    --gradient-main: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-blur: blur(20px);

    /* Typography */
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Outfit', sans-serif;
    --font-elegant: 'Playfair Display', serif;
    --font-tech: 'Orbitron', sans-serif;
    /* Hyper Modern */
    /* New Elegant Font */

    /* Spacing */
    --spacing-md: 1.5rem;
    --spacing-xl: 5rem;
    --container-width: 1400px;
}

/* ANTI-COPY UTILITY */
.no-copy {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text-main);
    font-family: var(--font-body);
    overflow-x: hidden;
    line-height: 1.7;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    color: var(--color-white);
    line-height: 1.1;
    font-weight: 700;
}

h1 {
    font-size: 5rem;
    letter-spacing: -2px;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

img {
    max-width: 100%;
    display: inline-block;
    width: auto;
    height: auto;
    /* Removed object-fit: cover from global to prevent distortion of logos/icons */
}

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* CARD STYLING - UPDATED v2.8 (Double Border Fix) */
/* CARD STYLING - UPDATED v2.9 (Neutralize Artifacts) */
.glass-card {
    /* CHANGED: Use dark background instead of glass-bg (white) to prevent light corner artifacts */
    background: #000000;
    border: none;
    position: relative;
    overflow: hidden;
    /* Strict clipping */
    display: flex;
    flex-direction: column;
    border-radius: 16px;

    /* DOUBLE BORDER: 2px outside, 2px inside. 
       Color: "Dark Blue Elegant" (#1e3a8a - roughly Blue 900) */
    box-shadow:
        0 0 0 2px rgba(30, 58, 138, 0.6),
        /* Outside */
        inset 0 0 0 2px rgba(30, 58, 138, 0.6);
    /* Inside */

    transform: translateZ(0);
    will-change: transform;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    /* On hover: brighten the borders to Electric Blue and add glow */
    box-shadow:
        0 0 0 2px var(--color-primary),
        /* Outside Bright */
        inset 0 0 0 2px var(--color-primary),
        /* Inside Bright */
        0 10px 40px rgba(59, 130, 246, 0.2),
        0 0 20px rgba(59, 130, 246, 0.1);
}

/* Image Holder */
.card-img-holder {
    position: absolute;
    /* BLEED IMAGE slightly (1px) to prevent ANY sub-pixel gaps between image and border */
    top: -1px;
    left: -1px;
    width: calc(100% + 2px);
    height: calc(100% + 2px);
    z-index: 0;
    /* Parent clips corners */
}

.card-img-holder img {
    transition: transform 0.5s ease;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.glass-card:hover .card-img-holder img {
    transform: scale(1.05);
}

/* Content & Gradient Overlay */
.card-content {
    position: absolute;
    /* BLEED IT to prevent bottom line gap */
    bottom: -2px;
    left: -2px;
    width: calc(100% + 4px);
    z-index: 2;
    /* Adjusted padding */
    padding: 15px 25px 15px 25px;

    /* FIXED HEIGHT for uniform alignment across all cards */
    height: 140px;

    /* Ensure content corners match parent radius */
    border-radius: 0 0 16px 16px;

    /* SOLID DARK ELEGANT LAYER (90% Opacity) */
    background: linear-gradient(to bottom,
            rgba(2, 6, 23, 0.9) 0%,
            rgba(2, 6, 23, 1) 100%);

    /* Decoration: Top subtle border */
    border-top: 1px solid rgba(255, 255, 255, 0.05);

    display: flex;
    flex-direction: column;
    /* Center text vertically if shorter than max lines */
    justify-content: center;
}

/* Title Styling - Max 4 lines - MODERN TECH TYPOGRAPHY */
.glass-card h3,
.glass-card h4 {
    margin: 0;
    color: white;
    font-family: var(--font-body);
    /* Outfit - Clean & Modern */
    font-size: 1.15rem;
    /* Increased from 1.05rem */
    /* Slightly larger */
    font-weight: 500;
    /* Legible Medium weight */
    line-height: 1.25;
    /* Tighter line height for compact look */
    letter-spacing: 0.2px;

    /* Multi-line truncation (max 4 lines) */
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    /* Standard */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;

    /* Text Shadow for pop */
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.bento-main h3 {
    font-size: 2.2rem;
    /* Larger for main card */
}

/* Bento/Magazine Grid Layout */
/* Bento Grid (Main Layout) */
.bento-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 20px;
    /* Removed fixed height to allow infinite articles */
    min-height: 600px;
    height: auto;
    margin-bottom: 20px;
}

.bento-main {
    height: 580px;
    /* Fixed height for Desktop to match 2 sub-items (280*2 + 20) */
    border-radius: 20px;
}

.bento-sub {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* Strict 2 rows of 280px to match Main Card (580px total height = 280 + 20 gap + 280) */
    grid-template-rows: 280px 280px;
    gap: 20px;
    height: 580px;
    /* Match Main Card */
}

@media (max-width: 1024px) {
    .bento-grid {
        grid-template-columns: 1fr;
        height: auto;
    }

    .bento-main {
        height: 400px;
    }

    .bento-sub {
        height: auto;
        grid-template-rows: auto;
        /* Reset fixed rows */
        grid-auto-rows: minmax(280px, auto);
        /* Restore flexible rows */
    }
}

@media (max-width: 768px) {
    .bento-sub {
        grid-template-columns: 1fr;
        height: auto;
    }
}

/* Bottom Grid (Items 6+) */
.bento-rows {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-top: 20px;
}

@media (max-width: 1024px) {
    .bento-rows {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .bento-rows {
        grid-template-columns: 1fr;
        /* Stack on mobile */
    }
}

/* Specific adjustment for Bento Sub-grid items (Right column) 
   User Request: Reduce background height by 30% for these 4 items only. */
.bento-sub .card-content {
    height: 80px;
    /* Reduced from 110px */
}

/* Archive Grid (6 cols) */
.archive-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
}

/* Responsive Archive */
@media (max-width: 1600px) {
    .archive-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 1300px) {
    .archive-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1024px) {
    .archive-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .archive-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .archive-grid {
        grid-template-columns: 1fr;
    }
}

.archive-card {
    height: 300px;
    /* Uniform height */
}

/* Helpers */
.btn-glow {
    position: relative;
    padding: 16px 48px;
    background: var(--gradient-main);
    border-radius: 50px;
    font-weight: 700;
    color: white;
    font-size: 1rem;
    border: none;
    cursor: pointer;
}

/* Back Button */
.tech-back-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--color-text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    transition: 0.3s;
}

.tech-back-btn:hover {
    color: var(--color-primary);
    transform: translateX(-5px);
}

.tech-toolbar-container {
    display: flex;
    justify-content: flex-end;
    /* Default fallback */
    align-items: center;
    padding-top: 60px;
    padding-bottom: 30px;
}

.tech-toolbar {
    display: flex;
    gap: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 20px;
    border-radius: 50px;
    backdrop-filter: blur(10px);
}

.tech-tool-item {
    font-size: 0.8rem;
    color: #94a3b8;
    text-transform: uppercase;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
}

.tech-tool-item.active {
    color: white;
}

/* Contact Modern */
.contact-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.social-dock {
    margin-top: 20px;
}

.social-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--color-text-muted);
    font-size: 1.5rem;
    transition: 0.3s;
}

.social-icon:hover {
    background: var(--color-primary);
    color: white;
    box-shadow: 0 0 15px var(--color-primary);
    transform: translateY(-3px);
}

.modern-input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 20px 0;
    color: white;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    transition: 0.3s;
}

.modern-input:focus {
    outline: none;
    border-bottom-color: var(--color-primary);
}

/* Fix "More Articles" link alignment */
.more-link-wrapper {
    text-align: right;
    margin-bottom: 50px;
}

.btn-more-link {
    color: var(--color-accent);
    text-transform: uppercase;
    font-weight: 700;
    font-size: 0.9rem;
}

/* Floating Nav */
.floating-nav {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(10, 10, 26, 0.8);
    backdrop-filter: blur(15px);
    padding: 15px 40px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    display: flex;
    gap: 40px;
}

.floating-nav a {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.floating-nav a:hover,
.floating-nav a.active {
    color: white;
}

.bg-abstract {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 0;
    background: radial-gradient(circle at 10% 20%, rgba(59, 130, 246, 0.15), transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(139, 92, 246, 0.15), transparent 40%);
    pointer-events: none;
}

/* =========================================
   SINGLE ARTICLE STYLES
   ========================================= */

/* Glass Nav custom for article */
.glass-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    background: linear-gradient(to bottom, rgba(5, 5, 17, 0.95), transparent);
    transition: background 0.3s;
}

.glass-nav .nav-content {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -1px;
    color: white;
}

.logo .highlight {
    color: var(--color-primary);
}

/* Single Hero */
.single-hero {
    position: relative;
    width: 100%;
    height: 80vh;
    display: flex;
    align-items: flex-end;
    padding-bottom: 80px;
}

.single-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.single-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
            rgba(5, 5, 17, 0.3) 0%,
            rgba(5, 5, 17, 0.8) 60%,
            var(--color-bg) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    /* Narrower focus */
}

.post-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.meta-tag {
    color: var(--color-primary);
    font-weight: 700;
}

.post-title {
    font-size: 3.5rem;
    /* Big impact */
    line-height: 1.1;
    margin-bottom: 30px;
    background: none;
    -webkit-text-fill-color: initial;
    color: white;
}

.post-author {
    display: flex;
    align-items: center;
    gap: 15px;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--color-text-muted);
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--color-primary);
}

/* Article Content */
.article-section {
    position: relative;
    z-index: 2;
    margin-top: -60px;
    /* Pull up into hero slight overlap if design allows, or 0 */
}

.container-narrow {
    max-width: 900px;
}

.glass-panel {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 60px;
}

/* =========================================
   ENHANCED ARTICLE CONTENT TYPOGRAPHY
   ========================================= */

.article-content {
    /* Ensure content doesn't break layout */
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;

    /* Better Font Rendering */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Paragraphs */
.article-content p {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #cbd5e1;
    margin-bottom: 1.5em;
    /* Standardize spacing */
}

/* Lead Paragraph (optional usage) */
.article-content .lead {
    font-size: 1.4rem;
    font-weight: 300;
    color: white;
    margin-bottom: 2em;
    border-left: 4px solid var(--color-primary);
    padding-left: 20px;
    line-height: 1.6;
}

/* Headings */
/* Shared Heading Styles */
.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    color: white;
    font-family: var(--font-heading);
    margin-top: 2em;
    margin-bottom: 0.8em;
    line-height: 1.2;
    font-weight: 700;
}

.article-content h2 {
    font-size: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

.article-content h3 {
    font-size: 1.6rem;
}

.article-content h4 {
    font-size: 1.35rem;
}

/* Links */
.article-content a {
    color: var(--color-primary);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
    transition: all 0.2s ease;
}

.article-content a:hover {
    color: var(--color-accent);
    text-decoration-thickness: 2px;
}

/* Blockquotes */
.article-content blockquote {
    background: rgba(59, 130, 246, 0.08);
    border-left: 4px solid var(--color-primary);
    margin: 2.5em 0;
    padding: 30px;
    font-family: var(--font-elegant);
    font-size: 1.4rem;
    font-style: italic;
    color: #e2e8f0;
    border-radius: 0 12px 12px 0;
    position: relative;
}

/* Lists */
.article-content ul,
.article-content ol {
    margin-bottom: 1.5em;
    padding-left: 1.5em;
    color: #cbd5e1;
}

.article-content ul {
    list-style-type: disc;
}

.article-content ol {
    list-style-type: decimal;
}

.article-content li {
    margin-bottom: 0.5em;
    font-size: 1.15rem;
    line-height: 1.6;
    padding-left: 0.5em;
}

/* Nested Lists */
.article-content ul ul,
.article-content ol ul,
.article-content ul ol,
.article-content ol ol {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
    font-size: 1rem;
}

/* Inline Code */
.article-content code {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.2em 0.4em;
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
    color: #a5b4fc;
    /* Light Indigo */
}

/* Preformatted Blocks */
.article-content pre {
    background: #020617;
    /* Very Dark Blue/Black */
    padding: 1.5em;
    border-radius: 12px;
    overflow-x: auto;
    margin-bottom: 2em;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.3);
}

.article-content pre code {
    background: none;
    padding: 0;
    color: #e2e8f0;
    font-size: 0.95em;
    white-space: pre;
}

/* Tables */
.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2em;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    /* Note: border-radius on table requires overflow hidden on wrapper often, but simple border works */
    overflow: hidden;
}

.article-content th,
.article-content td {
    padding: 1em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-align: left;
    vertical-align: top;
}

.article-content th {
    background: rgba(255, 255, 255, 0.05);
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.article-content tr:last-child td {
    border-bottom: none;
}

/* Misc formatting elements */
.article-content strong,
.article-content b {
    font-weight: 700;
    color: white;
}

.article-content em,
.article-content i {
    font-style: italic;
    color: #f1f5f9;
}

.article-content hr {
    border: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    margin: 3em 0;
}

.article-content iframe {
    max-width: 100%;
    border-radius: 12px;
}

/* =========================================
   ARTICLE MULTIMEDIA STYLES
   ========================================= */

/* Images */
/* Images */
.article-content img {
    border-radius: 8px;
    /* Slightly reduced radius for small icons */
    box-shadow: none;
    /* Removed shadow by default for cleaner inline look */
    margin: 0 0.2em;
    /* Small horizontal spacing, no vertical spacing */
    max-width: 100%;
    width: auto;
    height: auto;
    border: none;
    /* Removed border by default */
    display: inline-block;
    vertical-align: middle;
    /* Align with text */
}

/* Ensure images intended to be full width are still full width with proper spacing */
.article-content img.aligncenter,
.article-content img.size-full,
.article-content img.size-large,
.article-content figure img {
    display: block;
    margin: 30px auto;
    /* Restore vertical spacing for large images */
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* FIX: Prevent Emojis from becoming giant images */
.article-content img.emoji,
.article-content img.wp-smiley {
    display: inline !important;
    border: none !important;
    box-shadow: none !important;
    height: 1em !important;
    width: 1em !important;
    margin: 0 0.07em !important;
    vertical-align: -0.1em !important;
    background: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
}

.article-content figure {
    margin: 40px 0;
}

.article-content figcaption {
    text-align: center;
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-top: 10px;
    font-style: italic;
    border-left: 3px solid var(--color-primary);
    padding-left: 10px;
    display: inline-block;
}

/* Videos / Embeds */
.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    /* 16:9 Aspect Ratio */
    height: 0;
    margin: 40px 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.video-container iframe,
.video-container embed,
.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Modern Gallery (WordPress specific & Generic) */
.wp-block-gallery,
.modern-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin: 50px 0;
}

.wp-block-gallery img,
.modern-gallery img {
    width: 100%;
    height: 250px;
    /* Uniform height for grid */
    object-fit: cover;
    margin: 0;
    /* Override generic img margin */
    border-radius: 12px;
    transition: transform 0.3s ease, filter 0.3s ease;
    cursor: pointer;
}

.wp-block-gallery img:hover,
.modern-gallery img:hover {
    transform: scale(1.03);
    filter: brightness(1.1);
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
}

/* Footer / Share */
.article-footer {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.share-icons {
    display: flex;
    gap: 20px;
}

.share-icons a {
    font-size: 1.5rem;
    color: var(--color-text-muted);
}

.share-icons a:hover {
    color: var(--color-primary);
}

/* Read Next */
.read-next {
    padding: 60px 0;
}

.read-next .section-title {
    font-size: 1.5rem;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-text-muted);
}

/* =========================================
   WP THEME ADDITIONS
   ========================================= */

/* Hero Sphere Animation (moved from inline) */
.hero-sphere {
    position: absolute;
    right: -10%;
    top: 20%;
    width: 800px;
    height: 800px;
    background: linear-gradient(45deg, var(--color-primary), var(--color-accent));
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
    animation: float 10s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-30px);
    }
}

/* Floating Nav - WP Menu Compatibility */
.floating-nav {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 12px 30px;
    border-radius: 50px;
    display: flex;
    gap: 30px;
    z-index: 100;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.floating-nav ul {
    display: flex;
    gap: 30px;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.floating-nav a,
.floating-nav ul li a {
    color: var(--color-text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    transition: 0.3s;
    text-decoration: none;
}

.floating-nav a:hover,
.floating-nav ul li a:hover,
.floating-nav ul li.current-menu-item a {
    color: white;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Fix for WP Admin Bar overlapping fixed nav */
body.admin-bar .floating-nav {
    top: 52px;
}

/* Single Post Styles (Refactored from inline) */
.single-hero-title {
    max-width: 1000px;
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 20px;
}

.glass-content {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 60px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

/* =========================================
   MOBILE RESPONSIVENESS
   ========================================= */
@media (max-width: 768px) {

    /* Single Article Improvements */
    .container {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 0;
        padding-right: 0;
    }

    .single-hero-title {
        font-size: 1.8rem;
        line-height: 1.2;
    }

    .glass-content {
        width: 100%;
        padding: 1.5%;
        /* Text takes ~97-98% */
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .article-content {
        font-size: 0.95rem;
    }

    /* Reduce paragraph spacing */
    .article-content p {
        margin-bottom: 0.8em;
    }

    /* Thumbnail / Card Title Size Reductions */
    .card-content h3 {
        font-size: 1.2rem;
    }

    .card-content h4 {
        font-size: 1rem;
    }

    /* Hero Padding Adjustment for Mobile */
    .hero-tech {
        padding-bottom: 60px !important;
    }
}

/* =========================================
   HERO & BENTO CUSTOMIZATIONS (Added v1.0.18)
   ========================================= */

.hero-tech-container {
    padding-top: 40px;
    padding-bottom: 20px;
}

/* Desktop Flex for Hero (Title + Socials) */
@media (min-width: 1025px) {
    .hero-tech-container {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
    }

    .hero-social {
        display: flex;
        gap: 15px;
        margin-top: 10px;
        /* Align slightly with text top */
    }

    .hero-social .social-icon {
        width: 60px;
        height: 60px;
        font-size: 1.8rem;
        background: rgba(255, 255, 255, 0.05);
        /* Subtle glass */
        border: 1px solid rgba(255, 255, 255, 0.1);
        color: white;
        transition: all 0.3s ease;
        /* Ensure transition is present */
    }

    .hero-social .social-icon:hover {
        background: var(--color-primary);
        border-color: var(--color-primary);
        transform: translateY(-3px);
    }

    /* Hero Pulse Animations (Added in v1.0.84) */
    .hero-social a[href*="instagram"] {
        animation: pulse-instagram 3s infinite;
    }

    .hero-social a[href*="facebook"] {
        animation: pulse-facebook 3s infinite;
        animation-delay: 1.5s;
    }

    .hero-social a[href*="instagram"]:hover {
        background: #C13584;
        border-color: #C13584;
    }

    .hero-social a[href*="facebook"]:hover {
        background: #1877F2;
        border-color: #1877F2;
    }

    .hero-title {
        font-size: 2.7rem;
        /* Reduced by 10% from 3rem only on Desktop */
    }
}

/* Hide Hero Socials on Mobile/Tablet */
@media (max-width: 1024px) {
    .hero-social {
        display: none;
    }
}

.hero-title {
    font-family: 'Inter', sans-serif;
    font-size: 3rem;
    /* Restored base to 3rem, desktop overrides to 2.7rem */
    font-weight: 400;
    color: #fff;
    margin-bottom: 0;
    line-height: 1.1;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.hero-subtitle {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    color: #94a3b8;
    font-weight: 400;
    display: block;
    margin-top: 5px;
    letter-spacing: 2px;
}

.hero-subtitle-highlight {
    color: var(--color-primary);
}

/* 6th Article Visibility Logic */
.mobile-only-article {
    display: none !important;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .hero-tech {
        /* OVERRIDE: Remove the large gap from previous settings */
        padding-bottom: 5px !important;
    }

    .hero-tech-container {
        /* User Request: Odsuń nieco napis "PIOTR BUDA" od menu */
        padding-top: 85px;
        /* Increased from 80px as requested */
        /* User Request: Zmniejsz odległość między tekstem ".informacje" a oknem pierwszego artykułu */
        padding-bottom: 5px;
    }

    .hero-title {
        /* User Request: Zmniejsz napis "PIOTR BUDA" */
        font-size: 2.2rem;
        /* User Request: Odsuń o 6px od krawędzi */
        padding-left: 6px;
    }

    /* Centering the hero sphere element */
    .hero-sphere {
        left: 50% !important;
        transform: translateX(-50%) !important;
    }

    /* Show the 6th article on mobile */
    .mobile-only-article {
        display: flex !important;
    }

    /* FIX: Cards need explicit height on mobile because content is absolute */
    /* FIX: Cards need explicit height on mobile because content is absolute */
    .bento-sub .glass-card {
        height: 300px;
        margin-bottom: 0 !important;
        /* FIXED v1.0.94: Remove margin, rely on gap */
    }

    /* Standardize Gaps v1.0.94 (Uniform 20px) */
    .bento-grid {
        gap: 20px !important;
        margin-bottom: 20px !important;
    }

    .bento-rows {
        margin-top: 0 !important;
        gap: 20px !important;
    }
}

/* =========================================
   STRICT MOBILE CONTAINMENT (Fix requested v1.0.39)
   ========================================= */
html,
body {
    max-width: 100vw;
    overflow-x: hidden;
    position: relative;
}

/* Ensure Hero doesn't bleed */
.hero-tech {
    position: relative;
    overflow: hidden;
    width: 100%;
}

/* Restrict Menu Width on Mobile */
@media (max-width: 768px) {
    .floating-nav {
        width: 90%;
        /* Never wider than screen - 10% margin */
        max-width: 400px;
        /* Cap width */
        padding: 10px 15px;
        /* Reduced padding */
        gap: 15px;
        /* Reduced gap */
        justify-content: center;
        /* Center items */
        flex-wrap: nowrap;
        /* Keep on one line if possible */
    }

    .floating-nav ul {
        gap: 15px;
        /* Reduced gap */
        width: 100%;
        justify-content: space-around;
        /* Distribute evenly */
    }

    .floating-nav a,
    .floating-nav ul li a {
        font-size: 0.8rem;
        /* Smaller font */
    }

    /* Tighter container padding */
    .container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}

/* =========================================
   INTERPELACJE ARCHIVE STYLES
   ========================================= */

.interpelacje-container {
    padding-top: 50px;
    padding-bottom: 100px;
}

.big-title {
    margin-bottom: 60px;
    text-align: center;
}

/* Headings Row */
.interpelacje-grid-header {
    display: grid;
    grid-template-columns: 80px 3fr 1fr 1fr;
    gap: 20px;
    padding: 20px 30px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px 12px 0 0;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.header-cell {
    font-family: var(--font-heading);
    color: var(--color-text-muted);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

/* Rows */
.interpelacje-grid-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.interpelacje-row {
    display: grid;
    grid-template-columns: 80px 3fr 1fr 1fr;
    gap: 20px;
    padding: 25px 30px;
    align-items: center;
    background: rgba(10, 10, 26, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.interpelacje-row:hover {
    background: rgba(59, 130, 246, 0.05);
    border-color: var(--color-primary);
    transform: translateX(5px);
}

/* Cells */
.numer-badge {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    font-weight: 700;
    font-family: var(--font-tech);
}

.interpelacja-title {
    font-size: 1.1rem;
    color: white;
    margin: 0;
    font-weight: 500;
    line-height: 1.4;
}

/* Buttons */
.btn-interpelacja {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    transition: 0.3s;
    border: 1px solid transparent;
}

.btn-pdf {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    /* Red for PDF */
    border-color: rgba(239, 68, 68, 0.2);
}

.btn-pdf:hover {
    background: #ef4444;
    color: white;
}

.btn-ans {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    /* Green for Answer */
    border-color: rgba(16, 185, 129, 0.2);
}

.btn-ans:hover {
    background: #10b981;
    color: white;
}

/* Statuses */
.status-waiting {
    display: inline-block;
    color: var(--color-text-muted);
    font-size: 0.85rem;
    font-style: italic;
    opacity: 0.7;
}

.status-missing {
    color: var(--color-text-muted);
    opacity: 0.3;
}

/* Responsive */
@media (max-width: 1024px) {

    .interpelacje-grid-header,
    .interpelacje-row {
        grid-template-columns: 60px 2fr 120px 120px;
        padding: 20px;
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .interpelacje-grid-header {
        display: none;
        /* Hide header on mobile */
    }

    .interpelacje-row {
        grid-template-columns: 1fr;
        padding: 25px;
        gap: 20px;
    }

    .cell-numer {
        margin-bottom: 5px;
    }

    .interpelacja-title {
        font-size: 1.2rem;
        margin-bottom: 15px;
    }

    .cell-doc,
    .cell-ans {
        display: flex;
        justify-content: flex-start;
    }

    .btn-interpelacja {
        width: 100%;
        justify-content: center;
    }
}

/* Wrapper */
.interpelacja-item-wrapper {
    display: block;
    margin-bottom: 10px;
    /* Space between items */
}

/* Councilor Comment */
.interpelacja-comment-row {
    background: rgba(139, 92, 246, 0.05);
    /* Subtle Violet Tint */
    border-left: 3px solid var(--color-accent);
    padding: 20px;
    margin: 0;
    /* Removed negative margin */
    border-radius: 0 0 12px 12px;
    /* margin-top: -15px; Removed for clean toggle */
    position: relative;
    z-index: 1;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.comment-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    margin-bottom: 8px;
    font-weight: 600;
}

.comment-content {
    font-size: 0.95rem;
    line-height: 1.6;
    font-style: italic;
    color: var(--color-text-light);
}

/* Toggle Button */
.btn-toggle-comment {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #cbd5e1;
    /* Elegant light grey */
    padding: 6px 14px;
    border-radius: 4px;
    /* Less rounded for minimalist look */
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: var(--font-tech);
    /* Keep font consistent */
}

.btn-toggle-comment:hover {
    background: rgba(255, 255, 255, 0.05);
    /* Very subtle hover bg */
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: none;
}

/* Active state */
.btn-toggle-comment.active {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
}

.btn-toggle-comment i {
    font-size: 0.9em;
}

/* Mobile Typography Adjustments */
@media (max-width: 768px) {
    h1.page-title.big-title {
        font-size: 1.8rem !important;
        /* Significantly smaller */
        line-height: 1.2;
        margin-bottom: 20px;
    }
}

/* =========================================
   CONTACT FORM REDESIGN (v1.0.80)
   ========================================= */

/* =========================================
   CONTACT REDESIGN REFINED (v1.0.82)
   ========================================= */

/* =========================================
   CONTACT REDESIGN COMPACT (v1.0.84)
   ========================================= */

.contact-container {
    /* Dimensions handled inline for specificity in PHP, but refined here */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.contact-header {
    width: 100%;
}

/* Image container removed in v1.0.85 */

/* --- Social Icons Pulse & Size --- */
.social-dock .social-icon {
    /* Increased by another 40% from 52px -> ~73px */
    width: 73px;
    height: 73px;
    font-size: 2.2rem;
    /* Scaled font size */
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
}

/* Pulse Animations */
@keyframes pulse-instagram {
    0% {
        box-shadow: 0 0 0 0 rgba(193, 53, 132, 0.4);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(193, 53, 132, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(193, 53, 132, 0);
    }
}

@keyframes pulse-facebook {
    0% {
        box-shadow: 0 0 0 0 rgba(24, 119, 242, 0.4);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(24, 119, 242, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(24, 119, 242, 0);
    }
}

@keyframes pulse-email {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
        /* Emerald Green/Tech */
    }

    70% {
        box-shadow: 0 0 0 15px rgba(16, 185, 129, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.social-pulse-instagram:hover {
    background: #C13584;
    border-color: #C13584;
}

.social-pulse-facebook:hover {
    background: #1877F2;
    border-color: #1877F2;
}

.social-pulse-email:hover {
    background: #10b981;
    border-color: #10b981;
}

/* Continuous Pulse Animation */
.social-pulse-instagram {
    animation: pulse-instagram 3s infinite;
}

.social-pulse-facebook {
    animation: pulse-facebook 3s infinite;
    animation-delay: 1s;
}

.social-pulse-email {
    animation: pulse-email 3s infinite;
    animation-delay: 2s;
}

/* --- Internal Popup Styles --- */
.contact-popup-overlay {
    position: fixed;
    /* Fixed to viewport */
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    /* Slightly lighter blackout so blur is visible */
    backdrop-filter: blur(15px);
    /* Strong blur of background content */
    z-index: 99999;
    /* Ensure on top of everything */
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s ease;
}

.contact-popup-window {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid var(--color-primary);
    box-shadow: 0 0 50px rgba(59, 130, 246, 0.3);
    padding: 30px 40px;
    /* Reduced top padding v1.0.90 */
    border-radius: 24px;
    position: relative;
    text-align: center;
    max-width: 90%;
    width: 600px;
    animation: popupScale 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popupScale {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes pulse-blue-bg {
    0% {
        box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
        background-position: 0% 50%;
    }

    100% {
        box-shadow: 0 0 30px rgba(59, 130, 246, 0.6);
        background-position: 100% 50%;
    }
}

.popup-close-btn {
    position: absolute;
    top: 25px;
    right: 25px;
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    font-size: 2.5rem;
    /* Bigger X */
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s;
}

.popup-close-btn:hover {
    color: white;
}

.popup-name {
    /* Fixed Size (Refined v1.0.91 - Mobile One Line) */
    font-size: clamp(1.6rem, 6vw, 4rem) !important;
    font-weight: 800;
    text-transform: uppercase;
    margin: 10px 0 15px 0;
    line-height: 1;
    white-space: nowrap;
    /* Force one line */
    width: 100%;
    display: block;
    background: linear-gradient(45deg, #fff, #cbd5e1);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

.popup-title {
    font-size: 1.5rem;
    /* Slightly bigger title to match scale */
    text-transform: uppercase;
    color: var(--color-primary);
    letter-spacing: 4px;
    margin-bottom: 50px;
}

.popup-email-container {
    /* Static Elegant Blue Background (No Pulse, No Border) v1.0.87 */
    background: linear-gradient(270deg, #0f172a, #1e40af);
    padding: 20px;
    border-radius: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 40px;
    user-select: none;
    /* Prevent selection */
}

/* Canvas Responsive Fix v1.0.91 */
#email-canvas {
    max-width: 100%;
    height: auto;
}

.popup-footer {
    font-size: 1.3rem;
    /* "trochę większy" */
    color: var(--color-text-muted);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 6px;
    transition: color 0.3s;
}

.popup-footer:hover {
    color: white;
}

/* Mobile Fixes (Refined v1.0.94) */
@media (max-width: 768px) {
    .contact-container {
        padding: 30px !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-top: 20px !important;
        /* Unified 20px Gap */
    }

    .social-dock .social-icon {
        width: 60px;
        height: 60px;
        font-size: 1.8rem;
    }

    .contact-image-container {
        opacity: 0.2;
    }
}

/* =========================================
   SHARE SECTION REDESIGN (v1.0.96)
   ========================================= */

.article-share-container {
    display: flex;
    justify-content: flex-end;
    /* Right Align Desktop */
    align-items: center;
    gap: 30px;
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-wrap: wrap;
    width: 100%;
}

.share-label {
    font-family: 'Inter', sans-serif;
    /* Requested Font v1.0.97 */
    font-size: 1.3rem;
    /* Slightly smaller */
    font-weight: 700;
    text-transform: uppercase;
    color: white;
    letter-spacing: 1px;
}

.share-icons-row {
    display: flex;
    gap: 15px;
}

/* Force Big Icons v1.0.96 */
.social-icon-share {
    display: inline-flex !important;
    justify-content: center;
    align-items: center;
    width: 60px !important;
    /* Fixed Size Desktop */
    height: 60px !important;
    font-size: 1.8rem !important;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none !important;
}

/* Specific Hover & Pulse Colors */
.social-pulse-facebook:hover {
    background: #1877F2;
    border-color: #1877F2;
    box-shadow: 0 0 20px rgba(24, 119, 242, 0.5);
}

.social-pulse-whatsapp:hover {
    background: #25D366;
    border-color: #25D366;
    box-shadow: 0 0 20px rgba(37, 211, 102, 0.5);
}

.social-pulse-instagram:hover {
    background: #C13584;
    border-color: #C13584;
    box-shadow: 0 0 20px rgba(193, 53, 132, 0.5);
}

.social-pulse-x:hover {
    background: #000000;
    border-color: #ffffff;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.social-pulse-threads:hover {
    background: #000000;
    border-color: #ffffff;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

/* Pulse Generic */
@keyframes pulse-generic {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.2);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

.social-pulse-whatsapp {
    animation: pulse-generic 3s infinite;
    animation-delay: 0.5s;
}

.social-pulse-x {
    animation: pulse-generic 3s infinite;
    animation-delay: 1s;
}

.social-pulse-threads {
    animation: pulse-generic 3s infinite;
    animation-delay: 1.5s;
}

/* Mobile Share Adjustments */
@media (max-width: 768px) {
    .article-share-container {
        flex-direction: column;
        align-items: flex-end;
        gap: 20px;
    }

    .share-label {
        font-size: 1.5rem;
        width: 100%;
        text-align: right;
    }

    .share-icons-row {
        width: 100%;
        justify-content: space-between;
    }

    .social-icon-share {
        width: 14vw !important;
        /* Smaller to fit 5 icons */
        height: auto !important;
        /* Let aspect-ratio handle height */
        aspect-ratio: 1 / 1 !important;
        /* PREVENT SQUASHING v1.0.97 */
        flex-shrink: 0 !important;
        /* Prevent squashing */
        max-width: 60px;
        max-height: 60px;
        font-size: 1.4rem !important;
        border-radius: 50% !important;
        /* Perfect circle */
    }
}