/* メールJP.com ヘルプ / FAQ — contact.css ベースデザイン */
:root {
    --bg-gray: #f6f7f9;
    --border: #e5e7eb;
    --text-main: #111827;
    --text-muted: #6b7280;
    --text-sub: #374151;
    --blue-btn: #2563eb;
    --blue-hover: #1d4ed8;
    --blue-light: rgba(37, 99, 235, 0.08);
    --surface: #ffffff;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 14px;
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.08);
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Hiragino Sans', 'Noto Sans JP', sans-serif;
}

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

body {
    font-family: var(--font);
    background: var(--bg-gray);
    color: var(--text-main);
    line-height: 1.7;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

/* ===== Page Layout ===== */
.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.page-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 32px 24px 24px;
    text-align: center;
}

.brand-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.01em;
}

.page-subtitle {
    font-size: 16px;
    color: var(--text-muted);
    margin-top: 4px;
}

.container {
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    padding: 24px 20px 48px;
    flex: 1;
}

/* ===== Search ===== */
.search-section {
    margin-bottom: 20px;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 14px;
    font-size: 16px;
    pointer-events: none;
    opacity: 0.5;
}

.search-input {
    width: 100%;
    padding: 12px 40px 12px 42px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 15px;
    font-family: var(--font);
    color: var(--text-main);
    background: var(--surface);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--blue-btn);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-input::placeholder {
    color: #9ca3af;
}

.search-clear {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    font-size: 16px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: color var(--transition);
}

.search-clear:hover {
    color: var(--text-main);
}

.search-count {
    font-size: 15px;
    color: var(--text-muted);
    margin-top: 8px;
    padding-left: 4px;
}

/* ===== Category Navigation ===== */
.category-nav {
    margin-bottom: 24px;
}

.category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pill {
    padding: 7px 16px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text-muted);
    font-size: 15px;
    font-weight: 500;
    font-family: var(--font);
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

.pill:hover {
    border-color: var(--blue-btn);
    color: var(--blue-btn);
    background: var(--blue-light);
}

.pill.active {
    background: var(--blue-btn);
    color: #fff;
    border-color: var(--blue-btn);
}

/* ===== FAQ Sections ===== */
.faq-sections {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.faq-section.hidden {
    display: none;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 12px;
    padding-left: 2px;
}

/* ===== FAQ Items ===== */
.faq-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 8px;
    transition: box-shadow var(--transition);
}

.faq-item:hover {
    box-shadow: var(--shadow-card);
}

.faq-item.hidden {
    display: none;
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    background: none;
    border: none;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
    text-align: left;
    cursor: pointer;
    font-family: var(--font);
    line-height: 1.5;
    transition: background var(--transition);
}

.faq-question:hover {
    background: var(--bg-gray);
}

.faq-q-text {
    flex: 1;
}

.faq-arrow {
    font-size: 10px;
    color: var(--text-muted);
    transition: transform var(--transition);
    flex-shrink: 0;
}

.faq-item.open .faq-arrow {
    transform: rotate(180deg);
}

/* ===== FAQ Answer ===== */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-answer-inner {
    padding: 0 18px 16px;
}

.faq-item.open .faq-answer {
    /* max-height is set by JS */
}

.faq-answer p,
.faq-answer ul,
.faq-answer ol {
    font-size: 16px;
    color: var(--text-sub);
    line-height: 1.8;
    margin-bottom: 10px;
}

.faq-answer p:last-child,
.faq-answer ul:last-child,
.faq-answer ol:last-child {
    margin-bottom: 0;
}

.faq-answer ul,
.faq-answer ol {
    padding-left: 20px;
}

.faq-answer li {
    margin-bottom: 4px;
}

.faq-answer li:last-child {
    margin-bottom: 0;
}

.faq-answer a {
    color: var(--blue-btn);
    text-decoration: none;
}

.faq-answer a:hover {
    text-decoration: underline;
}

.faq-answer code {
    background: var(--bg-gray);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 15px;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

.faq-answer strong {
    font-weight: 600;
    color: var(--text-main);
}

/* ===== No Results ===== */
.no-results {
    text-align: center;
    padding: 48px 20px;
}

.no-results-text {
    font-size: 17px;
    color: var(--text-main);
    font-weight: 600;
    margin-bottom: 8px;
}

.no-results-sub {
    font-size: 15px;
    color: var(--text-muted);
}

.no-results-sub a {
    color: var(--blue-btn);
    text-decoration: none;
}

.no-results-sub a:hover {
    text-decoration: underline;
}

/* ===== Footer ===== */
.page-footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 24px 20px;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.footer-links a {
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition);
}

.footer-links a:hover {
    color: var(--blue-btn);
}

.footer-copy {
    font-size: 12px;
    color: #9ca3af;
}

/* ===== Highlight (search match) ===== */
mark {
    background: #fef08a;
    color: inherit;
    padding: 0 1px;
    border-radius: 2px;
}

/* ===== Contact Form ===== */
.contact-section {
    margin-top: 40px;
    scroll-margin-top: 24px;
}

.contact-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
}

.contact-lead {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.contact-notice {
    background: #fef3c7;
    border: 1px solid #fbbf24;
    padding: 14px;
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
    font-size: 13px;
    color: #92400e;
    line-height: 1.6;
}

.contact-section .form-group {
    margin-bottom: 18px;
}

.contact-section label {
    display: block;
    margin-bottom: 6px;
    font-weight: 700;
    font-size: 14px;
    color: var(--text-sub);
}

.required {
    color: #ef4444;
}

.contact-section input,
.contact-section textarea {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 15px;
    font-family: var(--font);
    color: var(--text-main);
    background: #f9fafb;
    transition: border-color var(--transition), background var(--transition);
}

.contact-section input:focus,
.contact-section textarea:focus {
    outline: none;
    border-color: var(--blue-btn);
    background: var(--surface);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.contact-section textarea {
    min-height: 180px;
    resize: vertical;
}

.contact-submit {
    width: 100%;
    padding: 14px 24px;
    background: var(--blue-btn);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 700;
    font-family: var(--font);
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.contact-submit:hover:not(:disabled) {
    background: var(--blue-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.contact-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
    .page-header {
        padding: 24px 16px 20px;
    }

    .brand-title {
        font-size: 22px;
    }

    .container {
        padding: 16px 12px 40px;
    }

    .search-input {
        font-size: 16px; /* prevent iOS zoom */
    }

    .pill {
        padding: 6px 12px;
        font-size: 14px;
    }

    .faq-question {
        padding: 14px 14px;
        font-size: 15px;
    }

    .faq-answer p,
    .faq-answer ul,
    .faq-answer ol {
        font-size: 15px;
    }

    .footer-links {
        gap: 14px;
    }
}
