* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f7fa;
    color: #2c3e50;
    line-height: 1.6;
}

/* ── Nav ── */
.nav {
    background: #1a1f36;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}
.nav-logo {
    font-weight: 700;
    font-size: 1.05rem;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}
.nav-logo:hover { color: #a5b4fc; }
.nav-links { display: flex; gap: 28px; }
.nav-links a { color: #cbd5e1; text-decoration: none; font-size: 0.9rem; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: white; }
@media (max-width: 500px) { .nav-links { gap: 16px; } .nav-links a { font-size: 0.82rem; } }

/* ── Hero ── */
.hero {
    background: linear-gradient(140deg, #1a1f36 0%, #2d3561 55%, #667eea 100%);
    color: white;
    padding: 72px 20px 60px;
    text-align: center;
}
.hero-inner { max-width: 720px; margin: 0 auto; }
.hero h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1px;
    margin-bottom: 16px;
}
.hero h1 span { color: #a5b4fc; }
.hero-sub {
    font-size: 1.1rem;
    opacity: 0.85;
    max-width: 560px;
    margin: 0 auto 36px;
    line-height: 1.6;
}

/* ── Search ── */
.search-wrap { position: relative; max-width: 580px; margin: 0 auto 28px; }
.search-box {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 14px;
    padding: 4px 4px 4px 18px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.25);
}
.search-icon { font-size: 1.1rem; color: #94a3b8; margin-right: 10px; flex-shrink: 0; }
.search-box input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1rem;
    color: #1e293b;
    background: transparent;
    padding: 12px 0;
}
.search-box input::placeholder { color: #94a3b8; }
.search-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 12px 22px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.search-results {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0; right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    overflow: hidden;
    z-index: 200;
    text-align: left;
}
.search-results.open { display: block; }
.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    text-decoration: none;
    color: #1e293b;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s;
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: #f8faff; }
.sri-icon { font-size: 1.4rem; flex-shrink: 0; }
.sri-text { display: flex; flex-direction: column; }
.sri-q { font-weight: 600; font-size: 0.9rem; }
.sri-cat { font-size: 0.78rem; color: #64748b; }
.no-results { padding: 16px 18px; color: #64748b; font-size: 0.9rem; }

/* ── Popular Chips ── */
.popular-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    max-width: 620px;
    margin: 0 auto;
}
.chips-label { font-size: 0.8rem; opacity: 0.65; width: 100%; text-align: center; margin-bottom: -2px; }
.chip {
    background: rgba(255,255,255,0.12);
    color: white;
    text-decoration: none;
    padding: 7px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(255,255,255,0.22);
    transition: background 0.2s, border-color 0.2s;
}
.chip:hover { background: rgba(255,255,255,0.22); border-color: rgba(255,255,255,0.4); }

/* ── Ad Space ── */
.ad-space { max-width: 860px; margin: 28px auto; padding: 0 20px; min-height: 90px; }

/* ── Main ── */
.main { max-width: 1100px; margin: 0 auto; padding: 48px 20px; }

/* ── Situation Sections ── */
.situation-section { margin-bottom: 56px; }
.situation-header { margin-bottom: 28px; }
.situation-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 10px;
}
.situation-sub { font-size: 0.9rem; color: #64748b; margin-top: 4px; }
.question-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
@media (max-width: 760px) { .question-grid { grid-template-columns: 1fr; } }
.q-card {
    background: white;
    border-radius: 12px;
    padding: 22px 24px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 1px 8px rgba(0,0,0,0.06);
    border: 1.5px solid #e8edf5;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.q-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 20px rgba(102,126,234,0.15);
    transform: translateY(-2px);
}
.q-text {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.35;
}
.q-answer {
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.5;
    flex-grow: 1;
}
.q-link {
    font-size: 0.83rem;
    font-weight: 600;
    color: #667eea;
    margin-top: 6px;
}

/* ── Guides Section ── */
.guides-section { margin-bottom: 56px; }
.section-heading {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 6px;
}
.section-sub { font-size: 0.9rem; color: #64748b; margin-bottom: 28px; }
.guides-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
@media (max-width: 860px) { .guides-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 540px) { .guides-grid { grid-template-columns: 1fr; } }
.guide-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    text-decoration: none;
    color: inherit;
    border: 1.5px solid #e8edf5;
    box-shadow: 0 1px 8px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.guide-card:hover { border-color: #667eea; box-shadow: 0 4px 20px rgba(102,126,234,0.15); }
.guide-tag {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #667eea;
}
.guide-title { font-size: 0.98rem; font-weight: 700; color: #1e293b; line-height: 1.35; }
.guide-desc { font-size: 0.83rem; color: #64748b; line-height: 1.5; flex-grow: 1; }
.guide-read { font-size: 0.82rem; font-weight: 600; color: #667eea; }

/* ── All Tools (directory) ── */
.all-tools-section { margin-bottom: 40px; }
.tools-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 18px 24px;
    background: white;
    border-radius: 12px;
    border: 1.5px solid #e8edf5;
    box-shadow: 0 1px 6px rgba(0,0,0,0.05);
    user-select: none;
}
.tools-toggle-title { font-size: 1rem; font-weight: 700; color: #1e293b; }
.tools-toggle-sub { font-size: 0.82rem; color: #64748b; }
.toggle-arrow { font-size: 0.9rem; color: #64748b; transition: transform 0.25s; }
.toggle-arrow.open { transform: rotate(180deg); }
.tools-directory { display: none; margin-top: 16px; }
.tools-directory.open { display: block; }
.dir-section { margin-bottom: 28px; }
.dir-title { font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: #94a3b8; margin-bottom: 12px; }
.dir-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
@media (max-width: 860px) { .dir-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 520px) { .dir-grid { grid-template-columns: 1fr; } }
.dir-card {
    background: white;
    border-radius: 10px;
    padding: 14px 16px;
    text-decoration: none;
    color: inherit;
    border: 1.5px solid #e8edf5;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #1e293b;
    transition: border-color 0.2s, background 0.2s;
}
.dir-card:hover { border-color: #667eea; background: #f8faff; }
.dir-icon { font-size: 1.2rem; flex-shrink: 0; }

/* ── About strip ── */
.about-strip {
    background: linear-gradient(135deg, #1a1f36, #2d3561);
    color: white;
    border-radius: 14px;
    padding: 40px 48px;
    margin-bottom: 48px;
    display: flex;
    gap: 40px;
    align-items: center;
}
@media (max-width: 700px) { .about-strip { flex-direction: column; padding: 32px 24px; gap: 20px; } }
.about-strip-text { flex: 1; }
.about-strip h2 { font-size: 1.3rem; font-weight: 700; margin-bottom: 10px; }
.about-strip p { font-size: 0.9rem; opacity: 0.8; line-height: 1.65; }
.about-strip-link a {
    display: inline-block;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.25);
    color: white;
    text-decoration: none;
    padding: 11px 24px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.2s;
}
.about-strip-link a:hover { background: rgba(255,255,255,0.22); }

/* ── Footer ── */
.footer { background: #1a1f36; color: white; padding: 36px 20px; text-align: center; }
.footer-inner { max-width: 700px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.footer-logo { font-size: 1rem; font-weight: 700; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; justify-content: center; }
.footer-links a { color: #94a3b8; text-decoration: none; font-size: 0.88rem; transition: color 0.2s; }
.footer-links a:hover { color: white; }
.footer-copy { font-size: 0.8rem; color: #475569; }

/* ── Page: About / Contact / Guides ── */
.page-hero {
    background: linear-gradient(140deg, #1a1f36 0%, #2d3561 60%, #667eea 100%);
    color: white;
    padding: 60px 20px 52px;
    text-align: center;
}
.page-hero h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 800; margin-bottom: 12px; }
.page-hero p { font-size: 1rem; opacity: 0.8; max-width: 520px; margin: 0 auto; }
.page-body { max-width: 760px; margin: 0 auto; padding: 48px 20px 80px; }
.page-body h2 { font-size: 1.25rem; font-weight: 700; color: #1e293b; margin: 32px 0 10px; }
.page-body h2:first-child { margin-top: 0; }
.page-body p { color: #475569; line-height: 1.75; margin-bottom: 14px; font-size: 0.97rem; }
.page-body ul { padding-left: 20px; margin-bottom: 14px; }
.page-body ul li { color: #475569; line-height: 1.7; font-size: 0.97rem; margin-bottom: 4px; }

/* contact form */
.contact-form { background: white; border-radius: 14px; padding: 36px; border: 1.5px solid #e8edf5; box-shadow: 0 2px 12px rgba(0,0,0,0.06); margin-top: 24px; }
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }
.form-group label { font-size: 0.875rem; font-weight: 600; color: #1e293b; }
.form-group input, .form-group select, .form-group textarea {
    padding: 11px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #1e293b;
    font-family: inherit;
    transition: border-color 0.2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: #667eea; }
.form-group textarea { min-height: 130px; resize: vertical; }
.form-submit {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s;
}
.form-submit:hover { opacity: 0.9; }
.form-success { display: none; background: #f0fdf4; border: 1.5px solid #86efac; border-radius: 10px; padding: 20px; text-align: center; color: #166534; font-weight: 600; }

@media (max-width: 600px) {
    .hero { padding: 52px 20px 44px; }
    .main { padding: 32px 16px; }
    .tools-grid { grid-template-columns: 1fr; }
    .about-strip { padding: 28px 20px; }
}
