/* home.css — homepage-specific styles */

/* ── Intro section ── */
.intro {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 32px;
    text-align: center;
}
.intro h2 {
    font-size: 22px;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 12px;
}
.intro p {
    font-size: 15px;
    color: #64748b;
    line-height: 1.7;
    max-width: 680px;
    margin: 0 auto 24px;
}

/* ── Stats row (inside intro) ── */
.stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    margin-top: 8px;
}
.stat {
    text-align: center;
}
.stat-number {
    font-size: 32px;
    font-weight: 800;
    color: #667eea;
    line-height: 1.1;
}
.stat-label {
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-top: 4px;
}

/* ── Category block ── */
.category {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px 28px;
    margin-bottom: 24px;
}
.category-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid #f0f0f0;
}
.category-icon {
    font-size: 24px;
    line-height: 1;
}
.category-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a202c;
    margin: 0;
}

/* ── Tool grid inside category ── */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

/* ── Individual tool card link ── */
/* Override the .tool-card from page-common (which is a white box for the tool widget)
   Here .tool-card is used as a clickable link card in the grid */
.tool-grid .tool-card {
    background: #f8f9ff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px;
    text-decoration: none;
    color: #1a202c;
    display: block;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
    position: relative;
    margin-bottom: 0;
    box-shadow: none;
}
.tool-grid .tool-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}
.tool-name {
    font-size: 14px;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 6px;
    line-height: 1.3;
}
.tool-description {
    font-size: 12px;
    color: #64748b;
    line-height: 1.5;
}
.tool-badge {
    display: inline-block;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-top: 8px;
}

/* ── Homepage hero header ── */
.home-hero {
    text-align: center;
    padding: 40px 0 32px;
    margin-bottom: 8px;
}
.home-hero h1 {
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 800;
    color: #1a202c;
    line-height: 1.15;
    margin: 0 0 14px;
    letter-spacing: -0.4px;
}
.home-hero .subtitle {
    font-size: 16px;
    color: #64748b;
    line-height: 1.65;
    max-width: 600px;
    margin: 0 auto 20px;
}
.home-hero .hero-badges {
    justify-content: center;
}

/* ── Homepage article — full width, not 860px ── */
.home-article {
    max-width: 100%;
}

/* ── FAQ full-width override for homepage ── */
.page-wrap .faq-section {
    max-width: 100%;
}

/* ── Popular tools spotlight ── */
.popular-strip {
    margin-bottom: 28px;
}
.section-label {
    font-size: 13px;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin: 0 0 14px;
}
.popular-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
}
.popular-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px;
    text-decoration: none;
    color: #1a202c;
    transition: border-color 0.2s, box-shadow 0.15s, transform 0.15s;
}
.popular-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 14px rgba(102,126,234,0.14);
    transform: translateY(-2px);
}
.popular-icon {
    font-size: 18px;
    font-weight: 800;
    color: #667eea;
    font-family: 'Fira Code', 'Cascadia Code', 'Courier New', monospace;
    line-height: 1;
    margin-bottom: 6px;
}
.popular-name {
    font-size: 13px;
    font-weight: 700;
    color: #1a202c;
    line-height: 1.3;
}
.popular-desc {
    font-size: 11px;
    color: #888;
    line-height: 1.4;
}

/* ── Stats bar ── */
.home-stats-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px 32px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}
.home-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 32px;
}
.home-stat-num {
    font-size: 28px;
    font-weight: 800;
    color: #667eea;
    line-height: 1.1;
}
.home-stat-lbl {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-top: 4px;
}
.home-stat-divider {
    width: 1px;
    height: 36px;
    background: #e2e8f0;
    flex-shrink: 0;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .tool-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
    .category {
        padding: 18px 16px;
    }
    .intro {
        padding: 24px 18px;
    }
    .stats {
        gap: 24px;
    }
    .stat-number {
        font-size: 26px;
    }
    .home-stats-bar {
        gap: 16px;
        padding: 16px;
    }
    .home-stat {
        padding: 0 16px;
    }
    .home-stat-divider {
        display: none;
    }
    .popular-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}

@media (max-width: 480px) {
    .tool-grid {
        grid-template-columns: 1fr 1fr;
    }
}
