/* ============================================================
   EC CATEGORY UI — v2.0
   Wymaga: ec-tokens.css, ec-base.css
   ============================================================ */

/* ------------------------------------------------------------
   BASE LAYOUT
------------------------------------------------------------ */
.ec-category-wrap { overflow: visible; }

/* ------------------------------------------------------------
   HERO SECTION
------------------------------------------------------------ */
.ec-cat-hero {
    background: var(--ec-bg);
    border-bottom: 1px solid var(--ec-border);
    padding: 40px 0 20px;
}

.ec-hero-wrap {
    display: flex;
    align-items: center;
    gap: 32px;
}

.ec-hero-icon img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.ec-hero-title {
    font-size: clamp(28px, 5vw, 40px);
    font-weight: 800;
    margin: 0 0 12px;
    line-height: 1.1;
    color: var(--ec-black);
}

.ec-hero-sub {
    font-size: 18px;
    color: var(--ec-soft);
    margin-bottom: 12px;
    font-weight: 500;
}

.ec-hero-intro {
    font-size: var(--ec-font-xl);
    margin: 0 0 10px;
    color: var(--ec-muted);
    max-width: 800px;
    line-height: 1.6;
}

.ec-hero-intro p:last-child { margin-bottom: 0; }

/* ------------------------------------------------------------
   CALCULATOR CARDS (Grid & Items)
------------------------------------------------------------ */
.ec-featured { margin-top: 10px; }

.ec-calc-grid-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

/* Fix dla pustych elementów generowanych przez WordPress */
.ec-calc-grid-cards > p,
.ec-calc-grid-cards > br {
    display: none !important;
}

.ec-card {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 24px;
    background: var(--ec-bg);
    border: 1px solid var(--ec-border);
    border-radius: var(--ec-radius-lg);
    text-decoration: none;
    color: inherit;
    transition: all .25s cubic-bezier(0.4, 0, 0.2, 1);
}

.ec-card:hover {
    border-color: var(--ec-red);
    box-shadow: var(--ec-shadow-md);
    transform: translateY(-3px);
}

.ec-card-left {
    width: 32px;
    height: 32px;
    border-radius: var(--ec-radius-md);
    background: var(--ec-bg-panel);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ec-black);
    flex-shrink: 0;
}

.ec-card-left svg {
    width: 80px;
    height: 80px;
    display: block;
}

.ec-card-mini-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.ec-card-body { flex: 1; }

.ec-card-title {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--ec-black);
}

.ec-card-desc {
    font-size: var(--ec-font-lg);
    color: var(--ec-soft);
    line-height: 1.5;
}

.ec-card-arrow {
    align-self: center;
    font-size: 18px;
    color: var(--ec-border-strong);
    transition: all .2s ease;
}

.ec-card:hover .ec-card-arrow {
    color: var(--ec-red);
    transform: translateX(5px);
}

/* ------------------------------------------------------------
   CENTERED BUTTON (View All Categories)
------------------------------------------------------------ */
.ec-back-btn-center {
    display: flex;
    justify-content: center;
    margin: 20px 0 60px;
}

/* ------------------------------------------------------------
   USEFUL TOOLS SECTION
------------------------------------------------------------ */
.ec-useful-tools { margin: 60px 0; }

.ec-tools-wrap {
    background: var(--ec-bg);
    border: 1px solid var(--ec-border);
    border-radius: var(--ec-radius-3xl);
    padding: 32px;
    box-shadow: var(--ec-shadow-sm);
}

.ec-tools-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.ec-tool-card {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: var(--ec-bg);
    border: 1px solid var(--ec-border-light);
    border-radius: var(--ec-radius-lg);
    text-decoration: none;
    color: inherit;
    transition: all .2s ease;
}

.ec-tool-card:hover {
    border-color: var(--ec-red);
    box-shadow: var(--ec-shadow-sm);
    transform: translateY(-2px);
}

.ec-tool-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.ec-tool-icon img,
.ec-tool-icon svg {
    width: 20px;
    height: 20px;
    fill: var(--ec-red);
    object-fit: contain;
}

.ec-tool-title {
    font-weight: 700;
    font-size: var(--ec-font-lg);
    margin-bottom: 4px;
    color: var(--ec-black);
}

.ec-tool-desc {
    font-size: var(--ec-font-md);
    color: var(--ec-soft);
    line-height: 1.4;
}

/* ------------------------------------------------------------
   FAQ — używa shared .ec-acc-* z ec-base.css
------------------------------------------------------------ */
.ec-cat-faq {
    margin: 60px 0;
    max-width: 900px;
}

/* ------------------------------------------------------------
   RESPONSIVE
------------------------------------------------------------ */
@media (max-width: 1024px) {
    .ec-tools-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .ec-calc-grid-cards { grid-template-columns: 1fr !important; }

    .ec-hero-wrap {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .ec-tools-wrap { padding: 20px; }

    .ec-btn-black {
        width: 100% !important;
        justify-content: center !important;
    }
}

@media (max-width: 480px) {
    .ec-tools-grid { grid-template-columns: 1fr; }
}
