/* Plik: assets/css/single-tool.css */
/* Wersja 29.0 - Purple CTA & Clickable Badge */

:root {
    --c-gold: #F59E0B;
    --c-gold-light: #FEF3C7;
    --c-blue: #2563EB;
    --c-blue-light: #EFF6FF;
    --c-purple: #8B5CF6;       /* Fioletowy Brand Color */
    --c-purple-dark: #7C3AED;  /* Fioletowy Hover */
    --c-purple-light: #F3E8FF; 
    --c-dark: #0F172A; 
    --c-dark-bg: #0B0F19; 
    --c-gray: #64748B;
    --c-border: #E2E8F0;
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* --- 1. GLOBAL --- */
body.single-narzedzia #secondary, .widget-area, .ast-single-post-order .entry-header { display: none !important; }
body.single-narzedzia #primary { width: 100% !important; max-width: 100% !important; margin: 0 !important; }
body.single-narzedzia .site-footer, body.single-narzedzia .site-footer .widget-area { display: block !important; }

.tool-saas-page { background: #fff; color: var(--c-dark); font-family: inherit; line-height: 1.6; }
.saas-container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }

/* --- 2. DARK HEADER --- */
.tool-dark-header {
    background-color: var(--c-dark-bg); color: #fff; padding: 2.5rem 0 3.5rem 0;
    position: relative; overflow: hidden; margin-bottom: 2rem; box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
.tool-breadcrumbs { margin-bottom: 2rem; font-size: 13px; font-weight: 500; color: rgba(255, 255, 255, 0.5); position: relative; z-index: 5; }
.crumbs-desktop a { color: rgba(255, 255, 255, 0.6); text-decoration: none !important; transition: color 0.2s; }
.crumbs-desktop a:hover { color: #fff; }
.crumbs-desktop .sep { margin: 0 8px; opacity: 0.4; }
.crumbs-desktop .current { color: #fff; opacity: 0.9; cursor: default; }
.crumbs-mobile { display: none; }
.crumbs-mobile a { color: rgba(255, 255, 255, 0.8); text-decoration: none !important; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; background: rgba(255,255,255,0.1); padding: 6px 12px; border-radius: 20px; }

.header-inner { display: flex; align-items: center; gap: 2rem; position: relative; z-index: 2; }
.big-logo-box { width: 100px; height: 100px; background: #fff; border-radius: 16px; display: flex; align-items: center; justify-content: center; padding: 10px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.big-logo-box img { width: 100%; height: 100%; object-fit: contain; }
.header-text-col h1 { font-size: 2.5rem; font-weight: 800; color: #fff; margin: 0.5rem 0; line-height: 1.1; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* BADGES / SEALS */
.verified-seal {
    font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
    padding: 4px 10px; border-radius: 20px; display: inline-flex; align-items: center; gap: 6px; vertical-align: middle;
    cursor: default;
}
.verified-seal.gold { background: rgba(245, 158, 11, 0.2); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.4); }
.verified-seal.blue { background: rgba(37, 99, 235, 0.2); color: #60a5fa; border: 1px solid rgba(37, 99, 235, 0.4); }
.verified-seal.purple { background: rgba(139, 92, 246, 0.2); color: #A78BFA; border: 1px solid rgba(139, 92, 246, 0.4); }

/* Clickable Badge Styles */
a.verified-seal { text-decoration: none !important; transition: all 0.2s ease; }
a.verified-seal.purple:hover { background: rgba(139, 92, 246, 0.3); border-color: rgba(139, 92, 246, 0.6); transform: translateY(-1px); }

.header-pitch { font-size: 1.1rem; color: #94a3b8; margin: 0; max-width: 700px; line-height: 1.5; }

/* --- SIATKA W TLE --- */
.header-bg-pattern {
    --grid-color: rgba(255, 255, 255, 0.05); 
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-image: 
        repeating-linear-gradient(45deg, var(--grid-color) 0, var(--grid-color) 1px, transparent 1px, transparent 40px),
        repeating-linear-gradient(-45deg, var(--grid-color) 0, var(--grid-color) 1px, transparent 1px, transparent 40px);
    -webkit-mask-image: linear-gradient(to bottom, black 30%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 30%, transparent 100%);
    z-index: 1; pointer-events: none;
}

/* --- 3. LAYOUT --- */
.main-body-container { padding-bottom: 4rem; }
.saas-grid-layout { display: grid; grid-template-columns: 1fr 300px; gap: 3rem; align-items: start; }

/* --- 4. CONTENT --- */
.section-label { font-size: 0.85rem; text-transform: uppercase; color: var(--c-gray); font-weight: 700; margin-bottom: 1rem; letter-spacing: 0.5px; border-bottom: 1px solid var(--c-border); padding-bottom: 0.5rem; }
.intro-card { background: #F8FAFC; border: 1px solid var(--c-border); border-left: 4px solid var(--c-blue); padding: 1.5rem; border-radius: 6px; margin-bottom: 3rem; }
.tier-strategic .intro-card { border-left-color: var(--c-gold); }
.verdict-header-inline { display: flex; align-items: center; gap: 10px; margin-bottom: 0.75rem; }
.v-icon { width: 32px; height: 32px; color: var(--c-blue); } 
.tier-strategic .v-icon { color: var(--c-gold); }
.verdict-header-inline h3 { margin: 0; font-size: 1.1em; color: var(--c-dark); font-weight: 700; }
.verdict-body { color: var(--c-dark); font-size: 1.05em; line-height: 1.6; }

.saas-gallery { margin-bottom: 3rem; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; }
.gallery-item { height: 160px; border-radius: 8px; overflow: hidden; border: 1px solid var(--c-border); position: relative; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 0.3s; }
.gallery-item:hover img { transform: scale(1.05); }
.lightbox-trigger { display: block; height: 100%; }
.zoom-icon { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background: rgba(0,0,0,0.6); color: #fff; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; opacity: 0; transition: 0.2s; }
.gallery-item:hover .zoom-icon { opacity: 1; }

.perspectives-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 3rem; }
.perspective-card { border: 1px solid var(--c-border); border-radius: 6px; padding: 1.25rem; }
.p-header { display: flex; align-items: center; gap: 8px; margin-bottom: 0.75rem; }
.p-icon { color: var(--c-blue); }
.p-header h4 { margin: 0; font-size: 0.95em; font-weight: 600; color: var(--c-dark); }

/* WIDEO SECTION */
.tool-video { margin-bottom: 3rem; }
.video-embed-container { position: relative; padding-bottom: 56.25%; /* 16:9 aspect ratio */ height: 0; overflow: hidden; border-radius: 8px; border: 1px solid var(--c-border); background: #000; }
.video-embed-container iframe, .video-embed-container object, .video-embed-container embed { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

.technical-content ul { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; padding: 0; list-style: none !important; margin: 1rem 0; }
.technical-content ul li { background: #fff; border: 1px solid var(--c-border); border-radius: 6px; padding: 1rem; margin: 0; position: relative; font-size: 0.9em; }
.technical-content ul li::before { display: none !important; }
.technical-content ul li strong { display: flex; align-items: center; gap: 8px; font-size: 1em; color: var(--c-dark); margin-bottom: 4px; }
.technical-content ul li strong::before { content: ''; display: block; width: 16px; height: 16px; flex-shrink: 0; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232563EB' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E"); background-size: contain; background-repeat: no-repeat; }

.ecosystem-section { margin-top: 4rem; border-top: 1px solid var(--c-border); padding-top: 2rem; }
.eco-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.eco-card { display: flex; align-items: center; gap: 1rem; background: #fff; border: 1px solid var(--c-border); border-radius: 8px; padding: 1rem; text-decoration: none !important; transition: all 0.2s; }
.eco-card:hover { border-color: var(--c-blue); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.eco-logo-box { width: 48px; height: 48px; background: #F8FAFC; border-radius: 8px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--c-border); flex-shrink: 0; }
.eco-logo-box img { width: 32px; height: 32px; object-fit: contain; }
.eco-content h4 { margin: 0; font-size: 1em; font-weight: 700; color: var(--c-dark); }
.eco-content span { font-size: 0.85em; color: var(--c-gray); }

/* --- 5. SIDEBAR --- */
.saas-sidebar-col { position: sticky; top: 130px; z-index: 80; }
.tool-sticky-card { background: #fff; border: 1px solid var(--c-border); border-radius: 8px; padding: 1.5rem; box-shadow: var(--shadow-lg); }
.tier-strategic .tool-sticky-card { border-top: 4px solid var(--c-gold); }

.sidebar-mini-id { display: flex; align-items: center; gap: 12px; margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--c-border); }
.mini-logo { width: 36px; height: 36px; object-fit: contain; } 
.mini-title { font-weight: 700; font-size: 1.25rem; color: var(--c-dark); line-height: 1.2; display: flex; align-items: center; gap: 8px; }
.mini-verified-badge svg { width: 24px; height: 24px; display: block; color: var(--c-blue); filter: drop-shadow(0 2px 4px rgba(37, 99, 235, 0.2)); }

.sidebar-info-block { margin-bottom: 1.5rem; display: flex; flex-direction: column; gap: 10px; }
.info-row { display: flex; flex-direction: column; gap: 4px; }
.info-label { font-size: 11px; text-transform: uppercase; color: #94A3B8; font-weight: 700; }
.info-value { display: flex; flex-wrap: wrap; gap: 6px; }

.sidebar-pill { font-size: 12px; font-weight: 600; background: #F1F5F9; color: var(--c-gray); padding: 4px 10px; border-radius: 4px; }
.sidebar-pill.price { background: #eff6ff; color: #1d4ed8; }
.sidebar-pill.audience { background: #f0fdf4; color: #15803d; }

.card-actions { display: flex; flex-direction: column; gap: 10px; }
.btn-main-cta, .btn-outline-cta, .btn-purple-cta { display: block; padding: 12px; font-size: 0.95em; font-weight: 600; text-decoration: none !important; border-radius: 6px; text-align: center; transition: all 0.2s; }

.btn-main-cta { background: var(--c-dark); color: #fff !important; }
.btn-main-cta:hover { background: #334155; transform: translateY(-1px); }
.tier-strategic .btn-main-cta { background: var(--c-gold); color: #000 !important; }

.btn-outline-cta { background: transparent; color: var(--c-gray) !important; border: 1px solid var(--c-border); }
.btn-outline-cta:hover { border-color: var(--c-dark); color: var(--c-dark) !important; }

/* NOWY PRZYCISK: FIOLETOWY */
.btn-purple-cta { 
    background: transparent; 
    color: var(--c-purple) !important; 
    border: 1px solid var(--c-purple); 
    font-weight: 600;
}

.btn-purple-cta:hover { 
    background: var(--c-purple-light); /* Bardzo jasne tło po najechaniu */
    color: var(--c-purple-dark) !important;
    border-color: var(--c-purple-dark);
    transform: translateY(-1px); 
}

@media (max-width: 991px) {
    .saas-grid-layout { display: flex; flex-direction: column; }
    .saas-sidebar-col { order: -1; width: 100%; position: static; margin-bottom: 2rem; }
    .tool-sticky-card { display: flex; flex-direction: column; text-align: left; }
    .sidebar-mini-id { display: none; }
    .card-actions { width: 100%; }
    .tool-dark-header { padding: 2rem 0; text-align: center; }
    .header-inner { flex-direction: column; gap: 1rem; }
    .big-logo-box { width: 80px; height: 80px; }
    .header-text-col h1 { justify-content: center; }
    .crumbs-desktop { display: none; }
    .crumbs-mobile { display: block; text-align: center; }
    .technical-content ul { grid-template-columns: 1fr; }
    .perspectives-grid { grid-template-columns: 1fr; }
    .eco-grid { grid-template-columns: 1fr; }
}

/* Lightbox (Bez zmian) */
.tool-lightbox { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 9999; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: 0.3s; pointer-events: none; }
.tool-lightbox.active { opacity: 1; visibility: visible; pointer-events: auto; }
.lightbox-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15, 23, 42, 0.95); }
.lightbox-content { position: relative; z-index: 10000; max-width: 90vw; max-height: 90vh; display: flex; align-items: center; justify-content: center; }
.lightbox-content img { max-width: 100%; max-height: 85vh; border-radius: 4px; box-shadow: 0 20px 50px rgba(0,0,0,0.5); }
.lightbox-close { position: absolute; top: -40px; right: -40px; background: transparent; border: none; color: #fff; font-size: 3rem; cursor: pointer; line-height: 1; transition: 0.2s; }
.lightbox-close:hover { color: var(--c-gold); }
.lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.1); color: #fff; border: none; font-size: 2.5rem; padding: 0 15px; cursor: pointer; transition: 0.2s; border-radius: 4px; user-select: none; }
.lightbox-nav:hover { background: rgba(255,255,255,0.3); }
.lightbox-prev { left: -60px; }
.lightbox-next { right: -60px; }
@media (max-width: 768px) { .lightbox-nav { display: none; } .lightbox-close { top: -40px; right: 0; } }
/* === AKTUALNOŚCI na stronie narzędzia — nadpisania v4 === */

body.single-narzedzia .tool-related-news {
    margin-top: 2rem;
    padding-top: 0;
}

body.single-narzedzia .firm-section {
    margin-bottom: 0;
    padding-top: 0;
    margin-top: 0;
}

/* Tło całej sekcji */
body.single-narzedzia #aktualnosci {
    background: #F8FAFC;
    border: 1px solid var(--c-border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 0;
    border-top: none;
}

/* Nagłówek */
body.single-narzedzia .firm-section h2 {
    font-size: 0.85rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--c-gray);
    border-bottom: 1px solid var(--c-border);
    padding-bottom: 0.5rem;
    margin-bottom: 1.25rem;
}

body.single-narzedzia .firm-section h2 .section-icon {
    color: var(--c-blue);
    width: 18px;
    height: 18px;
}

/* Lista */
body.single-narzedzia .related-news-list {
    gap: 0;
}

/* Item — 3 kolumny, badge jest wewnątrz .related-news-meta */
body.single-narzedzia .related-news-item {
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "meta title arrow";
    gap: 0 0.75rem;
    padding: 0.65rem 0.5rem;
    border-radius: 6px;
    border-bottom: none;
    background: transparent;
    transition: background-color 0.15s ease;
    align-items: center;
}

body.single-narzedzia .related-news-item:hover {
    background-color: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}

body.single-narzedzia .related-news-item:hover .related-news-title {
    color: var(--c-blue);
}

/* Meta (data + badge razem) */
body.single-narzedzia .related-news-meta {
    grid-area: meta;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

/* Data */
body.single-narzedzia .related-news-date {
    font-size: 0.8em;
    color: var(--c-gray);
    font-weight: 500;
    white-space: nowrap;
}

/* Badge */
body.single-narzedzia .related-news-badge {
    display: inline-block;
    font-size: 0.75em;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
    background: #E2E8F0;
    color: var(--c-gray);
}

body.single-narzedzia .related-news-badge.news-type--promocja {
    background: #DCFCE7;
    color: #15803d;
}

body.single-narzedzia .related-news-badge.news-type--zmianazasad {
    background: #FEF3C7;
    color: #92400E;
}

/* Tytuł */
body.single-narzedzia .related-news-title {
    grid-area: title;
    font-size: 0.92em;
    font-weight: 600;
    color: var(--c-dark);
    margin: 0;
    line-height: 1.4;
    transition: color 0.15s ease;
}

/* Strzałka */
body.single-narzedzia .related-news-arrow {
    grid-area: arrow;
    font-size: 1rem;
    color: #CBD5E1;
    transition: transform 0.15s ease, color 0.15s ease;
}

body.single-narzedzia .related-news-item:hover .related-news-arrow {
    transform: translateX(4px);
    color: var(--c-blue);
}

/* Footer */
body.single-narzedzia .related-news-footer {
    margin-top: 1.25rem;
    text-align: left;
}

body.single-narzedzia .related-news-footer .button-link {
    background: #fff;
    border: 1px solid var(--c-border);
    color: var(--c-blue);
    font-size: 0.82rem;
    padding: 8px 18px;
    border-radius: 4px;
}

body.single-narzedzia .related-news-footer .button-link:hover {
    background: var(--c-blue-light);
    border-color: var(--c-blue);
}

/* Mobile */
@media (max-width: 768px) {
    body.single-narzedzia .related-news-item {
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "title arrow"
            "meta  .";
        gap: 0.15rem 0.75rem;
        padding: 0.75rem 0.25rem;
        align-items: start;
    }

    body.single-narzedzia .related-news-arrow {
        align-self: center;
    }
}
