/*
 * 一般公開ページ（TOP・専門家検索・専門家詳細）専用のデザインシステム。
 * assets/style.css を上書きしない前提で、これら3ページにのみ読み込む。
 * 管理画面・会員専用ページには影響しない。
 */

:root {
    --navy: #0e1b33;
    --navy-soft: #1c2f52;
    --ink: #1b2233;
    --ink-soft: #5b6578;
    --gold: #b8923f;
    --gold-bright: #d4af5a;
    --gold-soft: #f3e9cd;
    /* 白・淡色背景上の文字色として使う濃いゴールド。WCAG AA（4.5:1以上）を満たす（--goldはAA未達のため文字色には使わない） */
    --gold-ink: #7a5e18;
    --bg: #faf8f3;
    --paper: #ffffff;
    --line: #e8e2d2;
    --shadow-sm: 0 1px 3px rgba(14, 27, 51, 0.06);
    --shadow-md: 0 10px 30px rgba(14, 27, 51, 0.08);
    --shadow-lg: 0 24px 60px rgba(14, 27, 51, 0.16);
    --radius-sm: 10px;
    --radius-md: 18px;
    --radius-lg: 28px;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --serif: "Shippori Mincho", "Hiragino Mincho ProN", serif;
}

body {
    background: var(--bg);
    color: var(--ink);
    font-family: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* ---------- header ---------- */

header.brand {
    background: rgba(14, 27, 51, 0.92);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 40;
    padding: 18px 28px;
    border-bottom: 1px solid rgba(212, 175, 90, 0.18);
}

header.brand .logo {
    width: 150px;
    height: 36px;
}

header.brand a {
    position: relative;
    font-size: 0.92rem;
    opacity: 0.9;
    transition: opacity 0.2s var(--ease);
}

header.brand a:hover { opacity: 1; }

header.brand a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 1px;
    background: var(--gold-bright);
    transition: width 0.25s var(--ease);
}

header.brand a:hover::after { width: 100%; }

/* ---------- motion / reveal ---------- */

.reveal {
    opacity: 1;
    transform: none;
}

.js .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.js .reveal.is-visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 28px;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
    width: auto;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold-bright), var(--gold));
    color: #241a04;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
}

.btn-secondary:hover {
    border-color: #fff;
    transform: translateY(-2px);
}

.btn-outline {
    background: var(--paper);
    color: var(--navy);
    border-color: var(--line);
}

.btn-outline:hover {
    border-color: var(--gold);
    color: var(--navy);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* ---------- hero ---------- */

.hero {
    position: relative;
    overflow: hidden;
    padding: 96px 24px 110px;
    text-align: center;
    background: radial-gradient(ellipse 900px 500px at 15% -10%, rgba(212, 175, 90, 0.22), transparent 60%),
                radial-gradient(ellipse 700px 500px at 110% 10%, rgba(255, 255, 255, 0.08), transparent 55%),
                linear-gradient(170deg, var(--navy) 0%, #0a1526 100%);
    color: #fff;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 20%, #000 10%, transparent 75%);
    pointer-events: none;
}

.hero-eyebrow {
    display: inline-block;
    font-size: 0.78rem;
    letter-spacing: 0.22em;
    color: var(--gold-bright);
    border: 1px solid rgba(212, 175, 90, 0.4);
    border-radius: 999px;
    padding: 6px 18px;
    margin-bottom: 28px;
    position: relative;
}

.hero h1 {
    position: relative;
    margin: 0 0 22px;
    font-family: var(--serif);
    font-size: clamp(2rem, 4.4vw, 3.1rem);
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.4;
}

.hero p {
    position: relative;
    max-width: 640px;
    margin: 0 auto;
    line-height: 2;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.98rem;
}

.hero-actions {
    position: relative;
    margin-top: 40px;
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ---------- section rhythm ---------- */

.section { max-width: 1040px; margin: 0 auto; padding: 72px 24px; }
.section-alt { background: var(--paper); }

.section-head { text-align: center; margin-bottom: 44px; }

.section-eyebrow {
    display: block;
    font-size: 0.76rem;
    letter-spacing: 0.2em;
    color: var(--gold-ink);
    font-weight: 700;
    margin-bottom: 10px;
}

.section h2 {
    border-left: none;
    padding-left: 0;
    margin: 0;
    font-family: var(--serif);
    font-size: clamp(1.4rem, 2.4vw, 1.9rem);
    font-weight: 600;
    color: var(--navy);
}

.section-lead {
    max-width: 680px;
    margin: 14px auto 0;
    color: var(--ink-soft);
    line-height: 1.9;
    font-size: 0.92rem;
}

/* ---------- qualification grid ---------- */

.qual-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 16px;
}

.qual-card {
    position: relative;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 26px 18px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

.qual-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--gold-soft);
    color: var(--gold-ink);
    font-family: var(--serif);
    font-weight: 700;
    margin-bottom: 14px;
}

.qual-card.is-open {
    cursor: pointer;
}

.qual-card.is-open:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(184, 146, 63, 0.4);
}

.qual-card a {
    color: var(--navy);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.98rem;
}

.qual-card.is-pending { opacity: 0.55; }
.qual-card.is-pending .qual-mark { background: #eef0f2; color: #9aa3b0; }
.qual-card .qual-pending-label { font-size: 0.72rem; color: var(--ink-soft); display: block; margin-top: 4px; }

/* ---------- partner / result cards ---------- */

.partner-grid, .prof-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 760px) {
    .partner-grid, .prof-grid { grid-template-columns: 1fr; }
}

.partner-card, .prof-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 22px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
    text-align: left;
}

.partner-card { text-align: center; }

.partner-card:hover, .prof-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.badge-recommend {
    position: absolute;
    top: 14px;
    right: 14px;
    background: linear-gradient(135deg, var(--gold-bright), var(--gold));
    color: #241a04;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 4px 10px;
    border-radius: 999px;
}

.partner-logo {
    display: block;
    width: 100%;
    max-width: none;
    height: 120px;
    margin: 4px auto 18px;
    object-fit: contain;
}

.partner-card h3, .prof-card h3 {
    margin: 4px 0 6px;
    font-family: var(--serif);
    font-size: 1.1rem;
    color: var(--navy);
}

.partner-card p, .prof-card p {
    margin: 0 0 6px;
    font-size: 0.86rem;
    color: var(--ink-soft);
    line-height: 1.7;
}

.prof-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--gold-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--serif);
    font-size: 1.3rem;
    color: var(--gold-ink);
    margin-bottom: 14px;
}

.prof-logo-wrap {
    height: 110px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.prof-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }

.chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.74rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--gold-soft);
    color: #7a5e18;
}

.chip-fc { background: #fff1b8; color: #7a5a00; }

.stars { color: var(--gold-ink); letter-spacing: 1px; font-size: 0.95rem; }
.stars .dim { color: #d8d8d8; }

.prof-card-footer { margin-top: auto; padding-top: 14px; }

/* ---------- timeline / event list ---------- */

.event-timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }

.event-timeline li {
    display: flex;
    gap: 18px;
    align-items: baseline;
    padding: 16px 18px;
    border-radius: var(--radius-sm);
    transition: background 0.2s var(--ease);
}

.event-timeline li:hover { background: var(--paper); }

.event-date {
    flex: 0 0 auto;
    font-family: var(--serif);
    color: var(--gold-ink);
    font-weight: 700;
    font-size: 0.92rem;
    min-width: 128px;
}

.event-title { color: var(--ink); font-size: 0.95rem; }

.table-wrap {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 8px 20px;
    box-shadow: var(--shadow-sm);
}

.table-wrap table { margin: 0; }
.table-wrap th { color: var(--ink-soft); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.03em; border-bottom: 1px solid var(--line); }
.table-wrap td { border-bottom: 1px solid var(--line); font-size: 0.9rem; }
.table-wrap tr:last-child td { border-bottom: none; }
.table-wrap tr:hover td { background: rgba(184, 146, 63, 0.04); }

/* ---------- closing CTA ---------- */

.cta-panel {
    position: relative;
    overflow: hidden;
    text-align: center;
    border-radius: var(--radius-lg);
    padding: 64px 32px;
    background: radial-gradient(ellipse 700px 400px at 85% 0%, rgba(212, 175, 90, 0.2), transparent 60%),
                linear-gradient(165deg, var(--navy), #0a1526);
    color: #fff;
}

.cta-panel h2 { color: #fff; }
.cta-panel .section-lead { color: rgba(255, 255, 255, 0.78); }

.cta-buttons { margin-top: 28px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- search / filter panel (professionals.php) ---------- */

.search-panel {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 24px 24px 20px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 36px;
}

.filter-bar { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; }
.filter-bar .field { margin-bottom: 0; min-width: 170px; flex: 1; }

.filter-bar select, .filter-bar input[type="text"] {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
    background: #fff;
    transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.filter-bar select:focus, .filter-bar input[type="text"]:focus {
    outline: none;
    border-color: var(--gold-ink);
    box-shadow: 0 0 0 3px rgba(122, 94, 24, 0.35);
}

.filter-bar label { color: var(--ink-soft); font-size: 0.8rem; font-weight: 600; }

.page-intro { text-align: center; margin: 40px auto 36px; max-width: 640px; }
.page-intro h1 { font-family: var(--serif); font-size: clamp(1.6rem, 3vw, 2.1rem); color: var(--navy); margin-bottom: 10px; }
.page-intro p { color: var(--ink-soft); line-height: 1.8; font-size: 0.92rem; }

.empty-state {
    text-align: center;
    padding: 56px 24px;
    background: var(--paper);
    border: 1px dashed var(--line);
    border-radius: var(--radius-md);
    color: var(--ink-soft);
}

/* ---------- professional.php refinements ---------- */

.professional-profile .profile-name { font-family: var(--serif); color: var(--navy); }
.professional-profile .profile-section h2 { font-family: var(--serif); color: var(--navy); font-weight: 600; }
.professional-profile .profile-hero,
.professional-profile .profile-section {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s var(--ease);
}
.professional-profile .endorsement-card,
.professional-profile .profile-tag { transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease); }
.professional-profile .endorsement-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-sm); }
