/**
 * verysimple-home.css — VerySimple homepage styles
 *
 * FILE LOCATION: wp-content/themes/verysimple-theme/verysimple-home.css
 * Enqueued from functions.php on the front page only (is_front_page()).
 * All rules are scoped under .vs-home so they never affect other pages.
 * Plain CSS only: no images, no icon fonts, no external libraries.
 * Font: Inter, loaded from Google Fonts in functions.php.
 */

/* Base: homepage only, scoped under .vs-home. */
.vs-home {
    --vs-accent: #4f46e5;
    --vs-accent-dark: #4338ca;
    --vs-accent-tint: #eef2ff;
    --vs-text: #0f172a;
    --vs-muted: #475569;
    --vs-border: #e2e8f0;
    --vs-section-bg: #f8fafc;
    background: #fff;
    color: var(--vs-text);
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
}

.vs-home a {
    color: var(--vs-accent);
    text-decoration: none;
}

.vs-home a:hover {
    text-decoration: underline;
}

/* Visible keyboard focus state, on every interactive element. */
.vs-home a:focus-visible,
.vs-home button:focus-visible,
.vs-home input:focus-visible,
.vs-home summary:focus-visible {
    outline: 3px solid var(--vs-accent);
    outline-offset: 2px;
}

/* Content width: max 1120px, centred, 24px side padding. */
.vs-container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Section spacing and headings. */
.vs-section {
    padding: 56px 0;
}

.vs-section-title {
    margin: 0 0 8px;
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.25;
    text-align: center;
}

/* 1. Hero: centred, soft indigo-tinted gradient behind it. */
.vs-hero {
    background: linear-gradient(180deg, #eef2ff 0%, #f8faff 60%, #fff 100%);
    padding: 72px 0 64px;
    text-align: center;
}

.vs-badge {
    display: inline-block;
    margin: 0 0 20px;
    padding: 8px 16px;
    border: 1px solid #c7d2fe;
    border-radius: 999px;
    background: #fff;
    color: var(--vs-accent-dark);
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.4;
}

.vs-hero-title {
    margin: 0 0 16px;
    font-size: 2.75rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.vs-hero-text {
    max-width: 640px;
    margin: 0 auto 32px;
    color: var(--vs-muted);
    font-size: 1.125rem;
    line-height: 1.6;
}

/* Hero search: large form, input + indigo button, min 44px tall. */
.vs-search {
    display: flex;
    gap: 8px;
    max-width: 600px;
    margin: 0 auto 24px;
}

.vs-search-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.vs-search-input {
    flex: 1;
    min-width: 0;
    min-height: 52px;
    padding: 12px 16px;
    border: 1px solid var(--vs-border);
    border-radius: 10px;
    background: #fff;
    color: var(--vs-text);
    font-family: inherit;
    font-size: 1rem;
}

.vs-search-input:focus {
    border-color: var(--vs-accent);
    outline: 3px solid #c7d2fe;
    outline-offset: 0;
}

.vs-search-button {
    min-width: 96px;
    min-height: 52px;
    padding: 12px 24px;
    border: 0;
    border-radius: 10px;
    background: var(--vs-accent);
    color: #fff;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
}

.vs-search-button:hover {
    background: var(--vs-accent-dark);
}

/* Hero category chips. */
.vs-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.vs-chip {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 18px;
    border: 1px solid var(--vs-border);
    border-radius: 999px;
    background: #fff;
    color: var(--vs-text);
    font-size: 0.9375rem;
    font-weight: 600;
}

.vs-chip:hover {
    border-color: var(--vs-accent);
    color: var(--vs-accent);
    text-decoration: none;
}

/* 2. Most used tools: 3-column responsive grid. */
.vs-tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.vs-tool-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 44px;
    padding: 24px;
    border: 1px solid var(--vs-border);
    border-radius: 14px;
    background: #fff;
    color: var(--vs-text);
}

.vs-tool-card:hover {
    border-color: var(--vs-accent);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    text-decoration: none;
}

/* PDFAid-style icons: saturated solid colour, white glyph, one colour
   per tool/category so the grid is colour-coded at a glance. Flat, no
   gradient, no shadow on the icon itself. */
.vs-tool-icon,
.vs-category-icon {
    color: #fff;
}

.vs-icon-blue { background: #2563eb; }
.vs-icon-green { background: #22c55e; }
.vs-icon-orange { background: #f97316; }
.vs-icon-violet { background: #8b5cf6; }
.vs-icon-indigo { background: #4f46e5; }
.vs-icon-red { background: #ef4444; }
.vs-icon-teal { background: #0d9488; }

.vs-tool-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
}

.vs-tool-icon svg {
    width: 24px;
    height: 24px;
}

.vs-tool-name {
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.vs-tool-desc {
    color: var(--vs-muted);
    font-size: 0.9375rem;
    line-height: 1.55;
}

/* 3. Ad placeholder: kept in the markup for a future AdSense unit,
   but collapsed to zero height so there is no empty gap on the page.
   To use it later, give it a min-height again when the ad code goes in. */
.vs-ad {
    min-height: 0;
    height: 0;
    margin: 0 auto;
    border: 0;
    background: transparent;
}

/* Tighten the space around the (collapsed) ad slot so "Most used tools"
   flows straight into "Browse by category". */
.vs-section[aria-labelledby="vs-most-used"] {
    padding-bottom: 32px;
}
.vs-section#all-tools {
    padding-top: 32px;
}

/* 4. Browse by category: 4 cards in a responsive grid. */
.vs-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.vs-category-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 44px;
    padding: 24px;
    border: 1px solid var(--vs-border);
    border-radius: 14px;
    background: #fff;
    color: var(--vs-text);
}

.vs-category-card:hover {
    border-color: var(--vs-accent);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    text-decoration: none;
}

.vs-category-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
}

.vs-category-icon svg {
    width: 24px;
    height: 24px;
}

.vs-category-name {
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.vs-category-desc {
    color: var(--vs-muted);
    font-size: 0.9375rem;
    line-height: 1.55;
}

.vs-category-count {
    margin-top: auto;
    color: var(--vs-accent);
    font-size: 0.875rem;
    font-weight: 700;
}

/* 5. Why VerySimple: light gray background, 4 columns. */
.vs-why {
    background: var(--vs-section-bg);
}

.vs-why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.vs-why-title {
    margin: 0 0 8px;
    font-size: 1.0625rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    text-align: center;
}

.vs-why-text {
    margin: 0;
    color: var(--vs-muted);
    font-size: 0.9375rem;
    line-height: 1.55;
    text-align: center;
}

/* 6. FAQ: native details/summary as bordered cards, PDFAid-style —
   white card, light border, bold question with a grey chevron on the
   right that flips up when open. Each card opens on its own. */
.vs-faq-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 24px;
}

.vs-faq {
    border: 1px solid var(--vs-border);
    border-radius: 14px;
    background: #fff;
}

.vs-faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    min-height: 60px;
    padding: 18px 20px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1.06rem;
    line-height: 1.4;
    list-style: none;
}

.vs-faq-question::-webkit-details-marker {
    display: none;
}

.vs-faq-question::after {
    content: "";
    width: 10px;
    height: 10px;
    flex-shrink: 0;
    border-right: 2px solid #94a3b8;
    border-bottom: 2px solid #94a3b8;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
}

.vs-faq[open] .vs-faq-question::after {
    transform: rotate(-135deg);
}

.vs-faq-answer {
    margin: 0;
    padding: 0 20px 20px;
    color: var(--vs-muted);
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* 2. PDF tools tabs: centred heading, pill tab bar, 4-column card grid.
   Own design in the site's indigo: active tab is indigo, cards are light
   grey with a solid-colour icon square and the tool name only. */
.vs-centre {
    text-align: center;
}

.vs-section-sub {
    text-align: center;
    color: var(--vs-muted);
    font-size: 1.05rem;
    margin: 0 0 28px;
}

.vs-tabs {
    display: flex;
    justify-content: center;
    gap: 4px;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto 32px;
    padding: 6px;
    background: #f1f5f9;
    border-radius: 999px;
}

.vs-tab {
    border: 0;
    background: transparent;
    padding: 10px 22px;
    border-radius: 999px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    cursor: pointer;
    white-space: nowrap;
}

.vs-tab.is-active {
    background: #4f46e5;
    color: #fff;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.35);
}

.vs-tab-panel {
    display: none;
}

.vs-tab-panel.is-active {
    display: block;
}

.vs-pdf-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.vs-pdf-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    background: #f8fafc;
    border: 1px solid transparent;
    border-radius: 16px;
    padding: 22px;
    text-decoration: none;
}

.vs-pdf-card:hover {
    border-color: #c7d2fe;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
    text-decoration: none;
}

.vs-pdf-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}

.vs-pdf-icon svg {
    width: 20px;
    height: 20px;
}

.vs-pdf-name {
    font-weight: 800;
    font-size: 1.05rem;
    color: #0f172a;
    line-height: 1.3;
}

/* Responsive: phones from 360px up. */
@media (max-width: 640px) {
    .vs-hero {
        padding: 48px 0;
    }

    .vs-hero-title {
        font-size: 2rem;
    }

    .vs-hero-text {
        font-size: 1rem;
    }

    .vs-section {
        padding: 40px 0;
    }

    .vs-pdf-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .vs-pdf-card {
        padding: 16px;
    }

    .vs-tabs {
        flex-wrap: wrap;
        border-radius: 16px;
    }

    .vs-tab {
        padding: 8px 14px;
        font-size: 0.9rem;
    }

    .vs-section-title {
        font-size: 1.5rem;
    }

    .vs-search {
        flex-direction: column;
    }

    .vs-search-button {
        width: 100%;
    }
}
