/* ============================================
   TOPIC CLUSTER PAGES – CSS
   ============================================ */

/* ── Cluster Individual Page ── */
.cluster-page {
    padding: 36px 0 60px;
}

.cluster-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    margin-top: 28px;
    align-items: start;
}

@media (max-width: 900px) {
    .cluster-layout {
        grid-template-columns: 1fr;
    }
    .cluster-sidebar { display: none; }
}

.cluster-main h1 {
    font-size: 2rem;
    font-weight: 800;
    color: #1a1a2e;
    margin-bottom: 18px;
    line-height: 1.25;
}

.cluster-intro {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #374151;
    background: #f8f9ff;
    border-left: 4px solid #4f46e5;
    padding: 18px 22px;
    border-radius: 0 10px 10px 0;
    margin-bottom: 36px;
}

/* ── Calculator Card Grid ── */
.cluster-calc-section {
    margin-bottom: 36px;
}

.cluster-calc-section h2,
.cluster-internal-links h2,
.cluster-blog-section h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ede9fe;
}

.cluster-calc-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cluster-calc-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px 20px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.cluster-calc-card:hover {
    border-color: #4f46e5;
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.12);
    transform: translateX(4px);
}

.cluster-calc-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.cluster-calc-name {
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a2e;
}

.cluster-calc-card:hover .cluster-calc-name {
    color: #4f46e5;
}

.cluster-calc-desc {
    font-size: 0.82rem;
    color: #6b7280;
    line-height: 1.4;
}

.cluster-calc-cta {
    color: #4f46e5;
    font-size: 0.88rem;
    font-weight: 700;
    white-space: nowrap;
    margin-left: 16px;
    flex-shrink: 0;
}

/* ── Quick Links List ── */
.cluster-internal-links {
    margin-bottom: 36px;
    background: #f8fafc;
    border-radius: 14px;
    padding: 24px;
    border: 1px solid #e5e7eb;
}

.cluster-link-list {
    list-style: disc;
    padding-left: 20px;
    margin: 0;
}

.cluster-link-list li {
    padding: 5px 0;
    font-size: 0.9rem;
    color: #4b5563;
    line-height: 1.5;
}

.cluster-link-list a {
    color: #4f46e5;
    font-weight: 600;
    text-decoration: none;
}

.cluster-link-list a:hover {
    text-decoration: underline;
}

/* ── Related Blogs ── */
.cluster-blog-section {
    margin-bottom: 36px;
}

.cluster-blog-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cluster-blog-link {
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px 18px;
    text-decoration: none;
    color: #1a1a2e;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.cluster-blog-link:hover {
    background: #ede9fe;
    border-color: #4f46e5;
    color: #4f46e5;
}

.blog-link-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.cluster-blog-link .cluster-calc-cta {
    margin-left: auto;
}

/* ── Cluster Sidebar ── */
.cluster-sidebar {
    position: sticky;
    top: 90px;
}

/* ── Cluster Index Hub Page ── */
.cluster-index-page {
    padding: 36px 0 60px;
}

.cluster-index-page h1 {
    font-size: 2.2rem;
    font-weight: 800;
    color: #1a1a2e;
    margin-bottom: 12px;
}

.cluster-index-subtitle {
    font-size: 1.05rem;
    color: #6b7280;
    margin-bottom: 40px;
    line-height: 1.6;
}

.cluster-index-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
    margin-bottom: 60px;
}

.cluster-index-card {
    display: flex;
    align-items: center;
    gap: 18px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 24px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.cluster-index-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(79,70,229,0.15);
    border-color: #4f46e5;
}

.cluster-index-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    flex-shrink: 0;
    color: white;
    font-weight: 700;
}

.cluster-index-info {
    flex: 1;
}

.cluster-index-info h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 6px;
}

.cluster-index-card:hover .cluster-index-info h2 {
    color: #4f46e5;
}

.cluster-index-info p {
    font-size: 0.82rem;
    color: #6b7280;
    line-height: 1.5;
    margin-bottom: 8px;
}

.cluster-count {
    display: inline-block;
    background: #ede9fe;
    color: #5b21b6;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 99px;
}

.cluster-arrow {
    color: #4f46e5;
    font-size: 1.3rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* Cluster "All Calculators" CTA */
.cluster-all-cta {
    text-align: center;
    padding: 40px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    border-radius: 20px;
    color: white;
}

.cluster-all-cta h2 {
    font-size: 1.5rem;
    color: white;
    margin-bottom: 10px;
}

.cluster-all-cta p {
    color: rgba(255,255,255,0.85);
    font-size: 1rem;
    margin-bottom: 20px;
}

.btn-large {
    padding: 14px 32px;
    font-size: 1rem;
}

@media (max-width: 600px) {
    .cluster-index-grid {
        grid-template-columns: 1fr;
    }
    .cluster-main h1 {
        font-size: 1.5rem;
    }
    .cluster-index-card {
        flex-wrap: wrap;
    }
}
