/**
 * Tools Hub — three feature cards.
 * Cards are <div> + stretched link overlay (no link-wrapped headings).
 */

.wp-block-flavor-crypto-tools-hub {
    margin: var(--fc-spacing-xl) 0 var(--fc-spacing-2xl);
    padding-left: 0;
    padding-right: 0;
}

.fc-tools-hub {
    width: 100%;
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
}

.fc-tools-hub ul.fc-tools-hub__grid,
.fc-page-content ul.fc-tools-hub__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: stretch;
    gap: var(--fc-spacing-lg, 1.25rem);
    margin: 0;
    padding: 0;
    list-style: none;
    width: 100%;
}

.fc-page-content ul.fc-tools-hub__grid {
    padding-left: 0;
    margin-bottom: 0;
}

.fc-tools-hub__cell {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
}

.fc-tools-hub__cell .fc-tools-hub-card {
    flex: 1 1 auto;
    width: 100%;
    min-height: 300px;
}

@media (max-width: 1180px) {
    .fc-tools-hub ul.fc-tools-hub__grid,
    .fc-page-content ul.fc-tools-hub__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 540px) {
    .fc-tools-hub ul.fc-tools-hub__grid,
    .fc-page-content ul.fc-tools-hub__grid {
        grid-template-columns: 1fr;
        max-width: 460px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Card shell */
.fc-tools-hub-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
    padding: 1.6rem 1.6rem 1.4rem;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: linear-gradient(180deg, rgba(28, 28, 50, 0.55) 0%, rgba(18, 18, 35, 0.55) 100%);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    cursor: pointer;
    transition:
        transform var(--fc-transition-normal),
        box-shadow var(--fc-transition-normal),
        border-color var(--fc-transition-normal);
}

.fc-tools-hub-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.12);
}

.fc-tools-hub-card:focus-within {
    outline: 2px solid var(--fc-accent-blue);
    outline-offset: 3px;
}

/* Stretched link */
.fc-tools-hub-card__overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    border-radius: inherit;
    background: transparent;
}

.fc-tools-hub-card__overlay:focus { outline: none; }
.fc-tools-hub-card__overlay:focus-visible {
    outline: 2px solid var(--fc-accent-blue);
    outline-offset: -2px;
}

/* Content sits above decor; clicks go to overlay only */
.fc-tools-hub-card > *:not(.fc-tools-hub-card__overlay):not(.fc-tools-hub-card__decor) {
    position: relative;
    z-index: 2;
    pointer-events: none;
}

/* ============================================================
   DECORATIVE ILLUSTRATION (top-right)
   ============================================================ */
.fc-tools-hub-card__decor {
    position: absolute;
    top: 0;
    right: 0;
    width: 56%;
    max-width: 240px;
    aspect-ratio: 220 / 160;
    z-index: 0;
    pointer-events: none;
    opacity: 0.9;
}

.fc-tools-hub-card__decor svg {
    width: 100%;
    height: 100%;
    display: block;
}

.fc-tools-hub-card__decor--profit    { color: rgba(192, 132, 252, 0.55); }
.fc-tools-hub-card__decor--converter { color: rgba(96, 165, 250, 0.55); }
.fc-tools-hub-card__decor--mining    { color: rgba(74, 222, 128, 0.55); }
.fc-tools-hub-card__decor--tax       { color: rgba(251, 191, 36, 0.55); }

/* ============================================================
   ICON BADGE (top-left, square, translucent tint)
   ============================================================ */
.fc-tools-hub-card__icon {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 76px;
    border-radius: 16px;
    flex-shrink: 0;
    margin-bottom: 0.4rem;
    transition:
        transform var(--fc-transition-fast),
        background-color var(--fc-transition-fast),
        border-color var(--fc-transition-fast);
}

.fc-tools-hub-card:hover .fc-tools-hub-card__icon {
    transform: translateY(-2px);
}

.fc-tools-hub-card__icon--profit {
    background-color: rgba(157, 78, 221, 0.16);
    border: 1px solid rgba(192, 132, 252, 0.32);
    color: #c084fc;
}

.fc-tools-hub-card__icon--converter {
    background-color: rgba(56, 189, 248, 0.14);
    border: 1px solid rgba(96, 165, 250, 0.32);
    color: #60a5fa;
}

.fc-tools-hub-card__icon--mining {
    background-color: rgba(34, 197, 94, 0.14);
    border: 1px solid rgba(74, 222, 128, 0.32);
    color: #4ade80;
}

.fc-tools-hub-card__icon--tax {
    background-color: rgba(245, 158, 11, 0.16);
    border: 1px solid rgba(251, 191, 36, 0.34);
    color: #fbbf24;
}

.fc-tools-hub-card:hover .fc-tools-hub-card__icon--profit    { background-color: rgba(157, 78, 221, 0.22); }
.fc-tools-hub-card:hover .fc-tools-hub-card__icon--converter { background-color: rgba(56, 189, 248, 0.20); }
.fc-tools-hub-card:hover .fc-tools-hub-card__icon--mining    { background-color: rgba(34, 197, 94, 0.20); }
.fc-tools-hub-card:hover .fc-tools-hub-card__icon--tax       { background-color: rgba(245, 158, 11, 0.24); }

/* ============================================================
   TEXT
   ============================================================ */
.fc-tools-hub-card__title {
    margin: 0;
    padding: 0;
    border: 0;
    font-family: var(--fc-font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--fc-text-primary, #f5f5f7);
}

.fc-tools-hub-card__desc {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--fc-text-secondary, #c1c2cc);
    flex-grow: 1;
}

/* ============================================================
   CTA (bottom row)
   ============================================================ */
.fc-tools-hub-card__cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 0.5rem;
    width: 100%;
    box-sizing: border-box;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: color var(--fc-transition-fast);
}

.fc-tools-hub-card__cta-label {
    flex: 1;
    min-width: 0;
}

.fc-tools-hub-card__cta-arrow {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    transition:
        transform var(--fc-transition-fast),
        background-color var(--fc-transition-fast);
}

.fc-tools-hub-card:hover .fc-tools-hub-card__cta-arrow {
    transform: translateX(3px);
}

/* Accent colors per card */
.fc-tools-hub-card--profit    .fc-tools-hub-card__cta { color: #c084fc; }
.fc-tools-hub-card--converter .fc-tools-hub-card__cta { color: #60a5fa; }
.fc-tools-hub-card--mining    .fc-tools-hub-card__cta { color: #4ade80; }
.fc-tools-hub-card--tax       .fc-tools-hub-card__cta { color: #fbbf24; }

.fc-tools-hub-card--profit:hover    .fc-tools-hub-card__cta-arrow { background-color: rgba(157, 78, 221, 0.18); }
.fc-tools-hub-card--converter:hover .fc-tools-hub-card__cta-arrow { background-color: rgba(56, 189, 248, 0.18); }
.fc-tools-hub-card--mining:hover    .fc-tools-hub-card__cta-arrow { background-color: rgba(34, 197, 94, 0.18); }
.fc-tools-hub-card--tax:hover       .fc-tools-hub-card__cta-arrow { background-color: rgba(245, 158, 11, 0.20); }

/* ============================================================
   FOOTER NOTE
   ============================================================ */
.fc-tools-hub__note {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 2.25rem auto 0;
    padding: 0;
    max-width: 52rem;
    font-size: 0.92rem;
    color: var(--fc-text-muted, #a3a3b3);
    line-height: 1.5;
    text-align: center;
}

.fc-tools-hub__note-icon {
    flex-shrink: 0;
    color: #a78bfa;
    opacity: 0.9;
}

/* ============================================================
   LIGHT THEME
   ============================================================ */
html[data-theme="light"] .fc-tools-hub-card {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}

html[data-theme="light"] .fc-tools-hub-card:hover {
    border-color: rgba(15, 23, 42, 0.14);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
}

html[data-theme="light"] .fc-tools-hub-card__title {
    color: #0f172a;
}

html[data-theme="light"] .fc-tools-hub-card__desc {
    color: #4b5563;
}

html[data-theme="light"] .fc-tools-hub-card__icon--profit {
    background-color: rgba(157, 78, 221, 0.10);
    border-color: rgba(157, 78, 221, 0.25);
    color: #7c3aed;
}

html[data-theme="light"] .fc-tools-hub-card__icon--converter {
    background-color: rgba(11, 112, 243, 0.10);
    border-color: rgba(11, 112, 243, 0.25);
    color: #0b70f3;
}

html[data-theme="light"] .fc-tools-hub-card__icon--mining {
    background-color: rgba(22, 163, 74, 0.10);
    border-color: rgba(22, 163, 74, 0.25);
    color: #16a34a;
}

html[data-theme="light"] .fc-tools-hub-card__icon--tax {
    background-color: rgba(217, 119, 6, 0.10);
    border-color: rgba(217, 119, 6, 0.25);
    color: #d97706;
}

html[data-theme="light"] .fc-tools-hub-card--profit    .fc-tools-hub-card__cta { color: #7c3aed; }
html[data-theme="light"] .fc-tools-hub-card--converter .fc-tools-hub-card__cta { color: #0b70f3; }
html[data-theme="light"] .fc-tools-hub-card--mining    .fc-tools-hub-card__cta { color: #16a34a; }
html[data-theme="light"] .fc-tools-hub-card--tax       .fc-tools-hub-card__cta { color: #d97706; }
