/*
 * FullSwing AI editorial blog hub
 *
 * Hub-only layout loaded after the shared article system.
 */

.blog-hub-page {
    background:
        radial-gradient(circle at 85% 7%, rgba(136, 119, 244, 0.09), transparent 29rem),
        radial-gradient(circle at 12% 10%, rgba(33, 194, 209, 0.07), transparent 27rem),
        var(--bg-color);
}

.blog-hub-page main {
    padding-top: var(--nav-height);
}

.hub-hero,
.hub-section,
.hub-cta {
    width: min(100% - 48px, 1280px);
    margin-right: auto;
    margin-left: auto;
}

.hub-hero {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: minmax(430px, 0.86fr) minmax(520px, 1.14fr);
    gap: clamp(30px, 3vw, 52px);
    align-items: center;
    min-height: 650px;
    padding: 62px 0 72px;
}

.hub-hero::before {
    position: absolute;
    z-index: -1;
    inset: 7% -6% 4% 42%;
    border-radius: 60px;
    background:
        linear-gradient(rgba(90, 113, 150, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(90, 113, 150, 0.05) 1px, transparent 1px);
    background-size: 30px 30px;
    content: "";
    -webkit-mask-image: radial-gradient(ellipse, #000 18%, transparent 72%);
    mask-image: radial-gradient(ellipse, #000 18%, transparent 72%);
}

.hub-hero-copy {
    position: relative;
    z-index: 2;
    padding-left: 4px;
}

.hub-eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--primary-color);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.hub-eyebrow {
    margin-bottom: 24px;
}

.hub-eyebrow::before,
.section-kicker::before {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent-cyan);
    box-shadow: 12px 0 0 rgba(136, 119, 244, 0.52);
    content: "";
}

.hub-hero h1 {
    max-width: 12.5ch;
    margin: 0 0 26px;
    color: var(--text-color);
    font-size: clamp(3.6rem, 5.65vw, 5.4rem);
    font-weight: 790;
    letter-spacing: -0.065em;
    line-height: 0.96;
    text-wrap: balance;
}

.hub-hero h1 span {
    display: block;
    background: linear-gradient(100deg, #087c8b 4%, #117f94 42%, #6f5ce5 88%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-family: Georgia, "Times New Roman", serif;
    font-style: italic;
    font-weight: 500;
    letter-spacing: -0.055em;
    -webkit-text-fill-color: transparent;
}

.hub-hero-copy > p {
    max-width: 52ch;
    margin: 0 0 30px;
    color: var(--text-secondary);
    font-size: 18px;
    line-height: 1.72;
}

.hub-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 30px;
}

.hub-button {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    gap: 11px;
    padding: 11px 20px;
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 750;
    text-decoration: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.hub-button--primary {
    border-color: #066a78;
    background: linear-gradient(135deg, #066a78, #087c8b);
    color: #ffffff;
    box-shadow: 0 13px 28px rgba(8, 124, 139, 0.18);
}

.hub-button--secondary {
    border-color: var(--border-color);
    background: rgba(255, 255, 255, 0.78);
    color: var(--text-color);
    box-shadow: var(--shadow-sm);
}

.hub-button:hover {
    transform: translateY(-2px);
}

.hub-button--primary:hover {
    color: #ffffff;
    box-shadow: 0 16px 34px rgba(8, 124, 139, 0.26);
}

.hub-button--secondary:hover {
    border-color: var(--primary-border);
    color: var(--primary-color);
}

.hub-trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 650;
}

.hub-trust-row span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.hub-trust-row i {
    color: var(--primary-color);
}

.hub-hero-visual {
    position: relative;
    min-width: 0;
}

.hub-hero-visual::after {
    position: absolute;
    right: 8%;
    bottom: 3%;
    left: 8%;
    height: 18%;
    border-radius: 50%;
    background: rgba(92, 117, 169, 0.14);
    content: "";
    filter: blur(32px);
}

.hub-hero-visual picture,
.hub-hero-visual img {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
}

.hub-hero-visual img {
    height: auto;
    object-fit: contain;
    filter: saturate(0.95) contrast(0.98);
    mix-blend-mode: multiply;
}

.hub-section {
    padding: 66px 0 26px;
}

.section-heading {
    display: flex;
    gap: 28px;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 28px;
}

.section-heading h2 {
    margin: 8px 0 0;
    color: var(--text-color);
    font-size: clamp(2rem, 3.5vw, 3rem);
    font-weight: 760;
    letter-spacing: -0.045em;
    line-height: 1.06;
}

.section-heading p {
    max-width: 55ch;
    margin: 12px 0 0;
    color: var(--text-secondary);
    font-size: 15px;
}

.section-link {
    flex: 0 0 auto;
    padding: 8px 0;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 750;
    text-decoration: none;
}

.section-link:hover {
    color: var(--primary-color);
}

.section-heading--stack {
    align-items: flex-start;
    flex-direction: column;
}

.featured-grid,
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.blog-card {
    --card-accent: var(--accent-cyan);
    --card-accent-alt: var(--accent-lilac);
    display: flex;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.86);
    color: inherit;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.featured-grid .blog-card {
    flex-direction: column;
}

.blog-grid .blog-card {
    flex-direction: column;
}

.blog-card[data-card-tone="trading-psychology"],
.blog-card[data-card-tone="trading-strategies"] {
    --card-accent: #8877f4;
    --card-accent-alt: #21c2d1;
}

.blog-card[data-card-tone="crypto-security"],
.blog-card[data-card-tone="risk-management"] {
    --card-accent: #08a5ad;
    --card-accent-alt: #68d7dd;
}

.blog-card[data-card-tone="market-analysis"] {
    --card-accent: #4f98e8;
    --card-accent-alt: #8877f4;
}

.blog-card:hover {
    border-color: rgba(8, 124, 139, 0.24);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.blog-card-visual {
    position: relative;
    isolation: isolate;
    display: grid;
    min-height: 172px;
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(145deg, var(--accent-cyan-soft), var(--accent-lilac-soft));
    background:
        radial-gradient(circle at 28% 24%, color-mix(in srgb, var(--card-accent) 21%, transparent), transparent 36%),
        radial-gradient(circle at 77% 73%, color-mix(in srgb, var(--card-accent-alt) 24%, transparent), transparent 40%),
        linear-gradient(145deg, #f7fdff, #f5f2ff);
    place-items: center;
}

.blog-card-grid {
    position: absolute;
    z-index: -1;
    inset: 0;
    background-image:
        linear-gradient(rgba(85, 105, 137, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(85, 105, 137, 0.07) 1px, transparent 1px);
    background-size: 25px 25px;
    -webkit-mask-image: radial-gradient(circle, #000, transparent 74%);
    mask-image: radial-gradient(circle, #000, transparent 74%);
}

.blog-card-orbit {
    position: absolute;
    width: 178px;
    height: 82px;
    border: 1px solid rgba(8, 124, 139, 0.24);
    border: 1px solid color-mix(in srgb, var(--card-accent) 34%, transparent);
    border-radius: 50%;
    box-shadow: 0 0 28px color-mix(in srgb, var(--card-accent) 13%, transparent);
    transform: rotate(-18deg);
}

.blog-card-icon {
    position: relative;
    display: grid;
    width: 76px;
    height: 76px;
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 23px;
    background: rgba(255, 255, 255, 0.82);
    color: var(--primary-color);
    color: color-mix(in srgb, var(--card-accent) 76%, #193043);
    font-size: 30px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.96),
        0 16px 35px rgba(49, 65, 102, 0.14);
    transform: rotate(2deg);
    place-items: center;
}

.blog-content {
    display: flex;
    flex: 1;
    align-items: flex-start;
    flex-direction: column;
    padding: 23px;
}

.blog-category {
    margin-bottom: 10px;
    color: var(--primary-color);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.blog-title {
    margin: 0 0 11px;
    color: var(--text-color);
    font-size: 19px;
    font-weight: 740;
    letter-spacing: -0.025em;
    line-height: 1.32;
    text-wrap: balance;
}

.blog-excerpt {
    display: -webkit-box;
    margin: 0 0 18px;
    overflow: hidden;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.62;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.blog-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin-top: auto;
    margin-bottom: 14px;
    color: var(--text-muted);
    font-size: 11.5px;
    font-weight: 600;
}

.blog-date,
.blog-read-time {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.blog-meta i {
    color: var(--primary-color);
}

.blog-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 18px;
}

.blog-tag {
    padding: 4px 9px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--card-header-bg);
    color: var(--text-secondary);
    font-size: 10.5px;
    font-weight: 700;
}

.blog-card-link {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    color: var(--text-color);
    font-size: 12px;
    font-weight: 800;
}

.blog-card:hover .blog-card-link {
    color: var(--primary-color);
}

.blog-card--featured .blog-card-visual {
    min-height: 198px;
}

.blog-card--featured .blog-title {
    font-size: 21px;
}

.blog-card--tool {
    grid-column: 1 / -1;
    flex-direction: row;
}

.blog-grid .blog-card--tool {
    flex-direction: row;
}

.blog-card--tool .blog-card-visual {
    flex: 0 0 31%;
    min-height: 238px;
    border-right: 1px solid var(--border-color);
    border-bottom: 0;
}

.blog-card--tool .blog-content {
    justify-content: center;
    padding: 32px;
}

.blog-card--tool .blog-title {
    font-size: 24px;
}

.blog-card--tool .blog-excerpt {
    max-width: 62ch;
}

.hub-latest {
    padding-top: 92px;
}

.categories-section {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-tag {
    min-height: 36px;
    padding: 7px 13px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 11.5px;
    font-weight: 750;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.category-tag:hover {
    border-color: var(--primary-border);
    color: var(--primary-color);
}

.category-tag.active {
    border-color: #087c8b;
    background: #087c8b;
    color: #ffffff;
}

.blog-card[hidden] {
    display: none;
}

.hub-playbooks {
    padding-top: 104px;
}

.playbook-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.playbook-card {
    position: relative;
    display: flex;
    min-height: 230px;
    align-items: flex-start;
    flex-direction: column;
    padding: 28px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background:
        radial-gradient(circle at 90% 10%, rgba(136, 119, 244, 0.1), transparent 36%),
        var(--card-bg);
    color: inherit;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.playbook-card:nth-child(2) {
    background:
        radial-gradient(circle at 90% 10%, rgba(33, 194, 209, 0.13), transparent 36%),
        var(--card-bg);
}

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

.playbook-icon {
    display: grid;
    width: 46px;
    height: 46px;
    margin-bottom: 34px;
    border: 1px solid var(--primary-border);
    border-radius: 14px;
    background: var(--primary-soft);
    color: var(--primary-color);
    place-items: center;
}

.playbook-label {
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.playbook-card h3 {
    max-width: 24ch;
    margin: 0 0 20px;
    color: var(--text-color);
    font-size: 19px;
    line-height: 1.35;
}

.playbook-link {
    margin-top: auto;
    color: var(--primary-color);
    font-size: 12px;
    font-weight: 800;
}

.hub-cta {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 24px;
    align-items: center;
    margin-top: 112px;
    margin-bottom: 80px;
    padding: 34px 38px;
    border: 1px solid var(--border-color);
    border-radius: 22px;
    background:
        radial-gradient(circle at 13% 35%, rgba(33, 194, 209, 0.13), transparent 25%),
        radial-gradient(circle at 86% 70%, rgba(136, 119, 244, 0.13), transparent 28%),
        rgba(255, 255, 255, 0.82);
    box-shadow: var(--shadow-md);
}

.hub-cta-icon {
    display: grid;
    width: 58px;
    height: 58px;
    border: 1px solid rgba(136, 119, 244, 0.25);
    border-radius: 17px;
    background: var(--accent-lilac-soft);
    color: var(--accent-lilac);
    font-size: 22px;
    place-items: center;
}

.hub-cta h2 {
    margin: 7px 0 5px;
    color: var(--text-color);
    font-size: clamp(1.35rem, 2.5vw, 2rem);
    letter-spacing: -0.035em;
    line-height: 1.15;
}

.hub-cta p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.blog-hub-page .footer {
    margin-top: 0;
}

[data-theme="dark"] .hub-hero h1 span {
    background: linear-gradient(100deg, #63dce5 4%, #62cbdc 44%, #a99dfb 88%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

[data-theme="dark"] .hub-hero-visual img {
    filter: invert(1) hue-rotate(180deg) brightness(0.58) saturate(1.3) contrast(1.08);
    -webkit-mask-image: radial-gradient(ellipse 82% 78% at 56% 50%, #000 52%, transparent 100%);
    mask-image: radial-gradient(ellipse 82% 78% at 56% 50%, #000 52%, transparent 100%);
    mix-blend-mode: screen;
    opacity: 0.9;
}

[data-theme="dark"] .hub-button--secondary,
[data-theme="dark"] .category-tag {
    background: rgba(12, 23, 34, 0.76);
}

[data-theme="dark"] .blog-card,
[data-theme="dark"] .hub-cta {
    background-color: rgba(12, 23, 34, 0.88);
}

[data-theme="dark"] .blog-card-visual {
    background: linear-gradient(145deg, #102631, #211f3d);
    background:
        radial-gradient(circle at 28% 24%, color-mix(in srgb, var(--card-accent) 22%, transparent), transparent 36%),
        radial-gradient(circle at 77% 73%, color-mix(in srgb, var(--card-accent-alt) 25%, transparent), transparent 40%),
        linear-gradient(145deg, #102631, #211f3d);
}

[data-theme="dark"] .blog-card-icon {
    border-color: rgba(99, 220, 229, 0.16);
    background: rgba(14, 30, 43, 0.82);
    color: var(--card-accent);
}

@media (max-width: 1080px) {
    .hub-hero {
        grid-template-columns: minmax(370px, 0.86fr) minmax(430px, 1.14fr);
        min-height: 590px;
    }

    .featured-grid,
    .blog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .featured-grid .blog-card:last-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 900px) {
    .hub-hero {
        grid-template-columns: 1fr;
        padding-top: 76px;
        text-align: center;
    }

    .hub-hero-copy {
        display: flex;
        align-items: center;
        flex-direction: column;
    }

    .hub-hero h1 {
        max-width: 13ch;
    }

    .hub-hero-visual {
        width: min(100%, 720px);
        margin: -28px auto 0;
    }

    .hub-trust-row {
        justify-content: center;
    }

    .hub-cta {
        grid-template-columns: auto 1fr;
    }

    .hub-cta .hub-button {
        grid-column: 1 / -1;
    }
}

@media (max-width: 720px) {
    .hub-hero,
    .hub-section,
    .hub-cta {
        width: min(100% - 32px, 1280px);
    }

    .hub-hero {
        min-height: 0;
        padding: 64px 0 34px;
    }

    .hub-hero::before {
        inset: 18% 0 4%;
    }

    .hub-hero h1 {
        font-size: clamp(3rem, 14vw, 4.15rem);
    }

    .hub-hero-copy > p {
        font-size: 16px;
    }

    .hub-hero-visual {
        margin-top: -8px;
    }

    .hub-section {
        padding-top: 70px;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .featured-grid,
    .blog-grid,
    .playbook-grid {
        grid-template-columns: 1fr;
    }

    .blog-grid .blog-card--tool {
        flex-direction: column;
    }

    .blog-card--tool .blog-card-visual {
        width: 100%;
        min-height: 172px;
        border-right: 0;
        border-bottom: 1px solid var(--border-color);
    }

    .blog-card--tool .blog-content {
        padding: 22px;
    }

    .featured-grid .blog-card:last-child {
        grid-column: auto;
    }

    .categories-section {
        flex-wrap: nowrap;
        width: 100%;
        padding: 2px 1px 8px;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .categories-section::-webkit-scrollbar {
        display: none;
    }

    .category-tag {
        flex: 0 0 auto;
    }

    .hub-cta {
        grid-template-columns: 1fr;
        margin-top: 76px;
        padding: 28px;
    }

    .hub-cta .hub-button {
        grid-column: auto;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .hub-hero-actions,
    .hub-hero-actions .hub-button {
        width: 100%;
    }

    .hub-trust-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        text-align: left;
    }

    .hub-hero-visual {
        margin-top: 8px;
    }

    .blog-card-visual {
        min-height: 150px;
    }

    .blog-card--featured .blog-card-visual {
        min-height: 172px;
    }

    .blog-content {
        padding: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .blog-card,
    .playbook-card,
    .hub-button {
        transition: none;
    }
}
