/* ============================================================
   Elements Hub Page — front-elements.css
   ============================================================
   Styles for the /elements hub page.
   Uses design tokens from main.css (:root variables).
   ============================================================ */


/* ── Intent routing cards (hero) ── */

.el-intent-paths {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
    margin-top: var(--space-xl);
}

.el-intent-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: var(--space-md) var(--space-lg);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--color-text);
    min-width: 180px;
    transition: all var(--duration) var(--ease);
}

.el-intent-card:hover {
    border-color: var(--color-accent);
    background: var(--color-bg-card-hover);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.el-intent-icon {
    font-size: 1.6rem;
}

.el-intent-card strong {
    color: var(--color-text-heading);
    font-family: var(--font-display);
    font-size: 1rem;
}

.el-intent-desc {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}


/* ── Calculator section ── */

.el-calculator-section {
    text-align: center;
}

.el-calc-wrapper {
    max-width: 600px;
    margin: var(--space-lg) auto;
}

.el-quick-ref {
    margin-top: var(--space-lg);
}

.el-quick-ref-label {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-sm);
}

.el-quick-ref-links {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
    flex-wrap: wrap;
}

.el-quick-ref-links a {
    padding: 0.3rem 0.7rem;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-accent);
    text-decoration: none;
    transition: all var(--duration) var(--ease);
}

.el-quick-ref-links a:hover {
    border-color: var(--color-accent);
    background: var(--color-bg-card-hover);
    transform: translateY(-1px);
}


/* ── Journey cards ── */

.el-journey-section {
    text-align: center;
}

.el-journey-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--space-md);
    margin-top: var(--space-md);
}

.el-journey-card {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--color-text);
    text-align: left;
    transition: all var(--duration) var(--ease);
}

.el-journey-card:hover {
    border-color: var(--color-accent);
    background: var(--color-bg-card-hover);
    transform: translateY(-2px);
}

.el-journey-emoji {
    font-size: 1.4rem;
    flex-shrink: 0;
}

.el-journey-text {
    font-size: 0.9rem;
    line-height: 1.4;
    font-weight: 500;
}


/* ── Personality cards ── */

.el-personalities {
    max-width: var(--max-width);
    margin: 0 auto;
}

.el-personality-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
    transition: border-color var(--duration) var(--ease);
}

.el-personality-card:hover {
    border-color: var(--el-accent, var(--color-border-hover));
}

.el-personality-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.el-personality-chinese {
    font-size: 2.5rem;
    line-height: 1;
    color: var(--el-accent, var(--color-accent));
}

.el-personality-header h3 {
    margin-bottom: 0;
    color: var(--el-accent, var(--color-text-heading));
}

.el-personality-years {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.el-personality-desc {
    color: var(--color-text-muted);
    line-height: 1.7;
}

.el-personality-traits {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
    margin: var(--space-md) 0;
}

.el-trait-col {
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    line-height: 1.6;
}

.el-trait-strengths {
    background: rgba(74, 124, 89, 0.1);
    border-left: 3px solid var(--color-wood);
}

.el-trait-challenges {
    background: rgba(192, 57, 43, 0.1);
    border-left: 3px solid var(--color-fire);
}

.el-trait-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    margin-bottom: 0.2rem;
}

.el-personality-link {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-accent);
}


/* ── Overview grid cards (condensed element summaries) ── */

.el-overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

.el-overview-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: var(--space-md);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    text-align: center;
    transition: all var(--duration) var(--ease);
}

.el-overview-card:hover {
    border-color: var(--el-accent, var(--color-accent));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.el-overview-chinese {
    font-size: 2rem;
    color: var(--el-accent, var(--color-accent));
}

.el-overview-card h3 {
    margin-bottom: 0;
    font-size: 1.05rem;
    color: var(--color-text-heading);
}

.el-overview-keywords {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    line-height: 1.4;
}

.el-overview-link {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-accent);
    margin-top: 0.2rem;
}


/* ── Featured combos ── */

.el-featured-combos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.el-featured-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: var(--space-md);
    border-radius: var(--radius-md);
    text-decoration: none;
    text-align: center;
    transition: all var(--duration) var(--ease);
}

.el-featured-card:hover {
    transform: translateY(-2px);
    filter: brightness(1.2);
}

.el-featured-emoji {
    font-size: 1.6rem;
}

.el-featured-card strong {
    font-size: 0.85rem;
    color: var(--color-text-heading);
}

.el-featured-card span:last-child {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    font-style: italic;
}

.el-combos-full-heading {
    font-size: 1rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-md);
    font-weight: 500;
}


/* ── Element + Animal combos grid ── */

.el-combos {
    max-width: var(--max-width);
    margin: 0 auto;
}

.el-combos-grid {
    margin-top: var(--space-md);
}

.el-combo-row {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--color-border);
}

.el-combo-row:last-child {
    border-bottom: none;
}

.el-combo-animal {
    font-weight: 600;
    min-width: 80px;
    color: var(--color-text-heading);
    font-size: 0.9rem;
}

.el-combo-links {
    display: flex;
    gap: var(--space-xs);
    flex-wrap: wrap;
}

.el-combo-chip {
    padding: 0.2rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: all var(--duration) var(--ease);
}

.el-combo-chip:hover {
    transform: translateY(-1px);
    filter: brightness(1.3);
}

.el-combo-wood {
    background: rgba(74, 124, 89, 0.15);
    color: #7dcea0;
}

.el-combo-fire {
    background: rgba(192, 57, 43, 0.15);
    color: #f1948a;
}

.el-combo-earth {
    background: rgba(184, 134, 11, 0.15);
    color: #f0d58c;
}

.el-combo-metal {
    background: rgba(127, 140, 141, 0.2);
    color: #bdc3c7;
}

.el-combo-water {
    background: rgba(41, 128, 185, 0.15);
    color: #85c1e9;
}


/* ── Cycle diagram ── */

.el-cycles {
    max-width: var(--max-width);
    margin: 0 auto;
}

.el-cycle-diagram {
    text-align: center;
    margin: var(--space-lg) auto;
    max-width: 420px;
}

.el-cycle-svg {
    width: 100%;
    height: auto;
}

.el-cycle-svg .el-node:hover circle {
    filter: drop-shadow(0 0 8px currentColor);
}

.el-cycle-hint {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-top: var(--space-sm);
    font-style: italic;
}

.el-cycle-info {
    display: none;
    margin-top: var(--space-md);
}

.el-cycle-info-inner {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm) var(--space-md);
    justify-content: center;
    align-items: center;
    padding: var(--space-md);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
}

.el-cycle-info-inner strong {
    font-size: 1.1rem;
    margin-right: var(--space-sm);
}

.el-cycle-rel {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.el-cycle-rel-type {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 2px 6px;
    border-radius: 3px;
}

.el-cycle-rel-type.el-gen {
    background: rgba(201, 168, 76, 0.15);
    color: var(--color-accent);
}

.el-cycle-rel-type.el-ctrl {
    background: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
}


/* ── 2026 Spotlight ── */

.el-spotlight {
    max-width: var(--max-width);
    margin: 0 auto;
}

.el-spotlight-inner {
    background: linear-gradient(135deg, rgba(192,57,43,0.08) 0%, rgba(201,168,76,0.06) 100%);
    border: 1px solid rgba(192, 57, 43, 0.2);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    text-align: center;
}

.el-spotlight-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: rgba(192, 57, 43, 0.2);
    color: #e74c3c;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-radius: 999px;
    margin-bottom: var(--space-md);
}

.el-spotlight-inner h2 {
    color: var(--color-text-heading);
}

.el-spotlight-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--space-sm);
    margin: var(--space-lg) 0;
    text-align: left;
}

.el-spotlight-item {
    padding: var(--space-md);
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--color-text-muted);
}

.el-spotlight-item strong {
    display: block;
    margin-bottom: 0.2rem;
}

.el-spotlight-inner .btn {
    margin-top: var(--space-sm);
}


/* ── FAQ Section ── */

.el-faq {
    max-width: var(--max-width);
    margin: 0 auto;
}

.el-faq-item {
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--color-border);
}

.el-faq-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.el-faq-item h3 {
    color: var(--color-text-heading);
    margin-bottom: var(--space-sm);
    font-size: 1.15rem;
}

.el-faq-item p {
    color: var(--color-text-muted);
    line-height: 1.7;
    margin-bottom: 0;
}

.el-faq-item a {
    color: var(--color-accent);
    font-weight: 600;
}


/* ── Existing styles (kept from original) ── */

.elements-hero-sub {
    max-width: 700px;
    margin: var(--space-md) auto 0;
    color: var(--color-text-muted);
    font-size: 1rem;
    line-height: 1.7;
    text-align: center;
}

.elements-hero-sub a {
    color: var(--color-accent);
    font-weight: 600;
}

.elements-explore,
.element-animals-section {
    text-align: center;
    padding: var(--space-xl) var(--space-lg);
    max-width: var(--max-width);
    margin: 0 auto;
}

.elements-explore p,
.element-animals-section p {
    color: var(--color-text-muted);
    max-width: 700px;
    margin: 0 auto var(--space-md);
}

.elements-animal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: var(--space-sm);
    max-width: 700px;
    margin: var(--space-md) auto 0;
}

.elements-animal-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    padding: var(--space-sm);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--color-text);
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.elements-animal-card span:first-child {
    font-size: 1.5rem;
}

.elements-animal-card:hover {
    border-color: var(--color-border-hover);
    background: var(--color-bg-card-hover);
    transform: translateY(-2px);
}


/* ── Mobile responsive ── */

@media (max-width: 640px) {
    .el-intent-paths {
        flex-direction: column;
        align-items: center;
    }

    .el-intent-card {
        min-width: 0;
        width: 100%;
        max-width: 300px;
    }

    .el-personality-traits {
        grid-template-columns: 1fr;
    }

    .el-cycle-info-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .el-combo-row {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-xs);
    }

    .el-spotlight-inner {
        padding: var(--space-lg);
    }

    .el-journey-grid {
        grid-template-columns: 1fr;
    }

    .el-overview-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    }

    .el-featured-combos {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    }

    .el-quick-ref-links {
        justify-content: center;
    }
}