/* 华年养老地图 - 设施档案页 */
:root {
    --brand: #E5533D;
    --brand-dark: #cf4632;
    --text: #222;
    --muted: #7a8290;
    --line: #e8eaef;
    --bg: #f5f6f8;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.doc-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 20px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 10;
}

.doc-brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.doc-brand:hover { text-decoration: none; }
.doc-brand img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; display: block; }
.doc-brand span { font-size: 18px; font-weight: 700; letter-spacing: .5px; }

.doc-nav { display: flex; gap: 16px; font-size: 14px; }
.doc-nav a { color: #555; }
.doc-nav a:hover { color: var(--brand); text-decoration: none; }

.doc-main { max-width: 960px; margin: 0 auto; padding: 18px 16px 40px; }

.doc-crumbs {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.doc-crumbs a { color: var(--muted); }
.doc-crumbs a:hover { color: var(--brand); }
.doc-crumbs .sep { color: #c3c8d0; }

.doc-hero {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 14px;
    background: linear-gradient(135deg, #fce9e4, #f7d3c9);
    margin-bottom: 0;
}
.doc-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }

.doc-head {
    background: #fff;
    border-radius: 14px;
    padding: 20px 22px;
    margin: -34px 12px 16px;
    position: relative;
    box-shadow: 0 8px 24px rgba(20, 30, 50, .08);
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
    justify-content: space-between;
}

.doc-head-main { min-width: 240px; flex: 1; }
.doc-head.no-hero { margin-top: 0; }
.doc-head h1 { margin: 0 0 8px; font-size: 26px; line-height: 1.35; font-weight: 700; }

.doc-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.doc-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--brand);
    color: #fff;
    font-size: 12px;
    line-height: 20px;
}
.doc-badge.light { background: #fdeeea; color: var(--brand); }
.doc-badge.ok { background: #e8f7ee; color: #1a7f45; border: 1px solid #b7e4c7; }

.doc-head-addr { margin: 0; color: var(--muted); font-size: 14px; }

.doc-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.doc-btn {
    display: inline-block;
    padding: 9px 18px;
    border-radius: 10px;
    border: 1px solid var(--brand);
    color: var(--brand);
    background: #fff;
    font-size: 14px;
    line-height: 1.4;
    cursor: pointer;
    text-align: center;
}
.doc-btn:hover { background: #fdeeea; text-decoration: none; }
.doc-btn.primary { background: var(--brand); color: #fff; }
.doc-btn.primary:hover { background: var(--brand-dark); }

.doc-card {
    background: #fff;
    border-radius: 14px;
    padding: 18px 22px;
    margin-bottom: 16px;
    box-shadow: 0 2px 10px rgba(20, 30, 50, .05);
}
.doc-card h2 {
    margin: 0 0 12px;
    font-size: 17px;
    font-weight: 700;
    padding-left: 10px;
    border-left: 4px solid var(--brand);
    line-height: 1.2;
}
.doc-card h2 + .doc-text { margin-top: 0; }

.doc-info { margin: 0; }
.doc-info-row {
    display: flex;
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
}
.doc-info-row:last-child { border-bottom: none; }
.doc-info-row dt {
    flex: 0 0 96px;
    color: var(--muted);
    font-size: 14px;
}
.doc-info-row dd { margin: 0; flex: 1; font-size: 14px; word-break: break-all; }

.doc-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.doc-tag {
    padding: 4px 12px;
    background: #f5f6f8;
    border-radius: 999px;
    font-size: 13px;
    color: #4b5563;
}

.doc-text { margin: 0 0 10px; font-size: 14px; color: #333; word-break: break-word; }
.doc-text.muted, .muted { color: var(--muted); font-size: 13px; }
.doc-card h2 ~ h2 { margin-top: 18px; }

.doc-gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}
.doc-gallery a { display: block; border-radius: 10px; overflow: hidden; aspect-ratio: 4 / 3; background: #f0f1f4; }
.doc-gallery img { width: 100%; height: 100%; object-fit: cover; display: block; }

.doc-nearby { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.doc-nearby-card {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--text);
    background: #fff;
    min-width: 0;
    overflow: hidden;
}
.doc-nearby-card:hover { border-color: var(--brand); text-decoration: none; }
.doc-nearby-card img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; flex-shrink: 0; background: #f0f1f4; }
.doc-nearby-ph {
    width: 64px;
    height: 64px;
    border-radius: 10px;
    background: #fdeeea;
    color: var(--brand);
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.doc-nearby-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.doc-nearby-body b { font-size: 14px; font-weight: 600; line-height: 1.4; }
.doc-nearby-body em {
    font-style: normal;
    font-size: 12px;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.doc-alert { padding: 10px 14px; border-radius: 10px; font-size: 14px; margin-bottom: 14px; }
.doc-alert.ok { background: #eaf7ee; color: #1f7a3d; border: 1px solid #c9ebd4; }
.doc-alert.err { background: #fdeceb; color: #b3261e; border: 1px solid #f6ccc8; }

.doc-correct details summary {
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: var(--brand);
    padding: 4px 0;
}
.doc-correct details[open] summary { margin-bottom: 10px; }

.doc-form {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 16px;
    margin-top: 8px;
}
.doc-form label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    color: #4b5563;
}
.doc-form label.full { grid-column: 1 / -1; }
.doc-form input,
.doc-form textarea {
    border: 1px solid #d7dbe2;
    border-radius: 9px;
    padding: 8px 10px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text);
    background: #fff;
    width: 100%;
    min-width: 0;
}
.doc-form input:focus,
.doc-form textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(229, 83, 61, .12); }
.doc-form textarea { resize: vertical; }
.doc-form .doc-btn { width: auto; }
.doc-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.doc-notice {
    background: #fff;
    border-radius: 14px;
    padding: 40px 24px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(20, 30, 50, .05);
}
.doc-notice h1 { margin: 0 0 10px; font-size: 22px; }
.doc-notice p { color: var(--muted); margin: 0 0 18px; }

.doc-footer {
    max-width: 960px;
    margin: 0 auto;
    padding: 8px 16px 32px;
    color: var(--muted);
    font-size: 12px;
    text-align: center;
    line-height: 1.9;
}
.doc-footer p { margin: 4px 0; }
.doc-footer a { color: var(--muted); }
.doc-footer a:hover { color: var(--brand); }
.doc-footer-muted { color: #a5abb5; }

@media (max-width: 720px) {
    .doc-main { padding: 12px 12px 28px; }
    .doc-head { margin: -24px 6px 12px; padding: 16px; }
    .doc-head h1 { font-size: 21px; }
    .doc-card { padding: 16px; }
    .doc-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .doc-nearby { grid-template-columns: minmax(0, 1fr); }
    .doc-form { grid-template-columns: minmax(0, 1fr); }
    .doc-info-row dt { flex-basis: 84px; }
    .doc-brand span { font-size: 16px; }
    .doc-brand img { width: 38px; height: 38px; }
}
