/* Каталог воинских мемориалов — публичные стили (v1) */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: Georgia, 'Times New Roman', serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

/* ---------- шапка ---------- */
.site-header { background: var(--header-bg); color: #fff; padding: 34px 0 0; border-bottom: 4px solid var(--accent); }
.site-header.small { padding: 14px 0 0; }
.header-inner { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.site-header h1 { font-size: 30px; font-weight: 700; letter-spacing: .2px; }
.site-header.small h1 { font-size: 22px; }
.subtitle { opacity: .85; margin-top: 8px; font-size: 15px; max-width: 860px; }
.crumbs { font-size: 14px; opacity: .8; margin-bottom: 6px; }
.crumbs a { color: #fff; }

.stats { display: flex; flex-wrap: wrap; gap: 34px; margin: 22px 0 6px; }
.stat b { display: block; font-size: 30px; color: var(--accent); }
.stat span { font-size: 13px; opacity: .8; }

.top-nav { display: flex; gap: 22px; margin-top: 18px; padding-bottom: 12px; }
.top-nav a { color: #fff; text-decoration: none; font-size: 15px; opacity: .85; border-bottom: 2px solid transparent; padding-bottom: 4px; }
.top-nav a.active, .top-nav a:hover { opacity: 1; border-color: var(--accent); }

/* ---------- контент ---------- */
.container { max-width: 1240px; margin: 0 auto; padding: 26px 20px 60px; }

.search-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; background: var(--card-bg); padding: 16px; border-radius: var(--radius); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.search-form input[type=search] { flex: 2 1 260px; padding: 11px 14px; font-size: 16px; border: 1px solid #ccc8ba; border-radius: 8px; font-family: inherit; }
.search-form select { flex: 1 1 180px; padding: 11px 10px; font-size: 15px; border: 1px solid #ccc8ba; border-radius: 8px; background: #fff; font-family: inherit; }
.search-form button { padding: 11px 26px; font-size: 15px; background: var(--primary); color: #fff; border: 0; border-radius: 8px; cursor: pointer; font-family: inherit; }
.search-form button:hover { filter: brightness(1.15); }
.search-form .reset { font-size: 14px; color: var(--primary); text-decoration: underline; }

.empty-state { text-align: center; padding: 90px 20px; }
.empty-icon { font-size: 46px; margin-bottom: 14px; }
.empty-state h2 { font-size: 26px; margin-bottom: 12px; color: var(--primary); }
.empty-state p { font-size: 17px; max-width: 640px; margin: 0 auto 10px; color: #555; }
.empty-state a { color: var(--primary); }

.results-info { margin: 20px 4px 14px; font-size: 15px; color: #555; }

/* ---------- сетка 3 колонки ---------- */
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .grid3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid3 { grid-template-columns: 1fr; } }

.card { display: flex; flex-direction: column; background: var(--card-bg); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.09); transition: transform .15s, box-shadow .15s; border: 1px solid rgba(0,0,0,.05); }
.card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.14); }
.card-photo { height: 180px; overflow: hidden; background: #e8e4da; }
.card-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-body { padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.card h3 { font-size: 17px; line-height: 1.35; color: var(--primary); }
.card .loc { font-size: 13.5px; color: #6b675e; }
.card .year { font-size: 13px; color: var(--accent); font-weight: bold; }

.cat-badge { align-self: flex-start; font-size: 11.5px; font-family: Arial, sans-serif; letter-spacing: .4px; padding: 3px 10px; border-radius: 20px; color: #fff; }
.cat-b { background: #33608c; }
.cat-m { background: #9c3d2e; }

/* ---------- пагинация ---------- */
.pagination { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 30px; }
.pagination a { padding: 8px 14px; background: var(--card-bg); border: 1px solid #d8d4c8; border-radius: 8px; text-decoration: none; color: var(--primary); font-size: 15px; }
.pagination a.cur { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---------- карта ---------- */
.map-container { padding-top: 20px; }
#map { width: 100%; height: 72vh; min-height: 480px; border-radius: var(--radius); overflow: hidden; box-shadow: 0 1px 5px rgba(0,0,0,.15); }
.map-legend { margin: 14px 4px 4px; font-size: 14px; color: #555; }
.lg { display: inline-block; width: 12px; height: 12px; border-radius: 50%; }
.lg-b { background: #33608c; }
.lg-m { background: #9c3d2e; }
.map-note { font-size: 13.5px; color: #777; margin: 6px 4px; }

/* ---------- страница объекта ---------- */
.object-container { max-width: 980px; }
.object-card { background: var(--card-bg); border-radius: var(--radius); padding: 34px 38px; box-shadow: 0 1px 5px rgba(0,0,0,.1); }
.object-card h1 { font-size: 26px; color: var(--primary); margin: 12px 0 20px; line-height: 1.3; }
.object-card .cat-badge { margin-bottom: 4px; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-bottom: 26px; }
.gallery .main { grid-column: 1 / -1; }
.gal-item img { width: 100%; border-radius: 10px; display: block; }
.gal-item figcaption { font-size: 12.5px; color: #777; margin-top: 5px; }

.obj-table { width: 100%; border-collapse: collapse; margin: 8px 0 20px; font-size: 15px; }
.obj-table th { text-align: left; width: 200px; padding: 9px 12px 9px 0; vertical-align: top; color: #6b675e; font-weight: normal; border-bottom: 1px solid #eee9dd; }
.obj-table td { padding: 9px 0; border-bottom: 1px solid #eee9dd; }

.note h2, .docs h2, .sources h2 { font-size: 19px; color: var(--primary); margin: 22px 0 10px; }
.note p { font-size: 15px; white-space: pre-line; }
.docs ul, .sources ul { margin: 0 0 10px 20px; font-size: 15px; }
.docs a, .sources a { color: var(--primary); }
.map-link { margin: 18px 0; }
.btn { display: inline-block; background: var(--primary); color: #fff; padding: 11px 24px; border-radius: 8px; text-decoration: none; font-size: 15px; }
.btn:hover { filter: brightness(1.15); }

/* ---------- подвал ---------- */
.site-footer { border-top: 1px solid #ddd8ca; padding: 22px 20px 34px; text-align: center; color: #777; font-size: 13.5px; }
.site-footer a { color: var(--primary); }

/* ---------- форма загрузки фото гостем ---------- */
.guest-upload { margin-top: 30px; padding: 22px; background: rgba(31,58,95,.06); border: 1px dashed var(--primary); border-radius: var(--radius); }
.guest-upload h2 { font-size: 19px; color: var(--primary); margin-bottom: 12px; }
.gu-form { display: flex; flex-direction: column; gap: 12px; max-width: 560px; }
.gu-form label { display: flex; flex-direction: column; gap: 5px; font-size: 14px; color: #555; }
.gu-form input[type=text] { padding: 10px 12px; border: 1px solid #c9c4b8; border-radius: 8px; font-family: inherit; font-size: 15px; }
.gu-form input[type=file] { padding: 8px; border: 1px solid #c9c4b8; border-radius: 8px; background: #fff; font-family: inherit; }
.gu-form .btn { align-self: flex-start; border: 0; cursor: pointer; font-family: inherit; }
.gu-hint { font-size: 13px; color: #777; }
.ok-msg { background: #e2f4e6; color: #1e6b34; padding: 10px 14px; border-radius: 8px; margin-bottom: 12px; }
.err-msg { background: #fbe4e2; color: #8f2a20; padding: 10px 14px; border-radius: 8px; margin-bottom: 12px; }
.mod-note { background: #fdeed6; color: #946200; padding: 10px 14px; border-radius: 8px; margin: 14px 0; font-size: 14.5px; }
.hp-field { position: absolute; left: -9999px; }
.admin-link-row { margin-top: 8px; }
.admin-link-row a { font-size: 12.5px; color: #a0a0a0; text-decoration: none; }
.admin-link-row a:hover { color: var(--primary); text-decoration: underline; }
