/* topo-karta.ru - Antique Cartography & Historical Books */
:root {
  --bg-parchment: #fcfaf5;
  --bg-card: #ffffff;
  --panel-antique: #f4eedd;
  --border-antique: #d8cbb5;
  --border-dark: #8c7355;
  --text-primary: #2d1e12;
  --text-muted: #6b5847;
  --accent-gold: #9e6f21;
  --accent-gold-hover: #7d5414;
  --accent-burgundy: #7a1d1d;
  --shadow-antique: 0 4px 10px rgba(45, 30, 18, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background-color: var(--bg-parchment);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.65;
  font-size: 16px;
}

h1, h2, h3, .antique-title {
  font-family: "Georgia", "Palatino Linotype", "Times New Roman", serif;
  color: var(--text-primary);
  font-weight: normal;
  letter-spacing: 0.3px;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

header {
  background: #ffffff;
  border-bottom: 2px solid var(--border-antique);
  padding: 15px 0;
  box-shadow: 0 2px 5px rgba(0,0,0,0.04);
}

.header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 15px;
}
.logo-img {
  max-height: 70px;
  width: auto;
}
.logo-text h1 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent-burgundy);
  margin-bottom: 3px;
}
.logo-text p {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
}

.contacts-box {
  text-align: right;
  font-size: 0.9rem;
}
.contacts-box .email {
  font-weight: 700;
  color: var(--accent-gold);
  text-decoration: none;
  font-size: 1.05rem;
  display: block;
}
.contacts-box .subtext {
  color: var(--text-muted);
  font-size: 0.8rem;
}

nav {
  background: var(--text-primary);
  border-bottom: 3px solid var(--accent-gold);
}
.nav-list {
  display: flex;
  list-style: none;
  flex-wrap: wrap;
}
.nav-list a {
  display: block;
  padding: 12px 18px;
  color: #f7eedb;
  text-decoration: none;
  font-size: 0.95rem;
  font-family: "Georgia", serif;
  transition: all 0.2s;
}
.nav-list a:hover {
  background: var(--accent-gold);
  color: #ffffff;
}

.banner-section {
  padding: 25px 0 15px;
}
.main-banner-img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  border: 1px solid var(--border-antique);
  box-shadow: var(--shadow-antique);
  display: block;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin: 35px 0 25px;
}

.cat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-antique);
  border-radius: 6px;
  padding: 18px 15px;
  text-align: center;
  box-shadow: var(--shadow-antique);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.cat-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-gold);
  box-shadow: 0 8px 16px rgba(45, 30, 18, 0.12);
}
.cat-card img {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--panel-antique);
  margin: 0 auto 15px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.cat-card h3 {
  font-size: 1.15rem;
  color: var(--text-primary);
  font-weight: 700;
  margin-bottom: 8px;
}
.cat-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 15px;
  flex-grow: 1;
}

.antique-btn {
  display: inline-block;
  background: var(--accent-gold);
  color: #ffffff;
  padding: 7px 15px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.85rem;
  font-family: "Georgia", serif;
  transition: background 0.2s;
}
.antique-btn:hover {
  background: var(--accent-gold-hover);
}

.section-title {
  font-size: 1.7rem;
  color: var(--accent-burgundy);
  margin: 40px 0 20px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-antique);
  position: relative;
}
.section-title::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 80px;
  height: 2px;
  background: var(--accent-gold);
}

.antique-table-box {
  width: 100%;
  overflow-x: auto;
  background: #ffffff;
  border: 1px solid var(--border-antique);
  border-radius: 6px;
  margin-bottom: 30px;
  box-shadow: var(--shadow-antique);
}
table {
  width: 100%;
  border-collapse: collapse;
}
th, td {
  padding: 11px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-antique);
}
th {
  background: var(--panel-antique);
  color: var(--text-primary);
  font-family: "Georgia", serif;
  font-size: 0.95rem;
}
tr:hover td { background: #faf7f0; }

.info-card {
  background: #ffffff;
  border: 1px solid var(--border-antique);
  border-left: 4px solid var(--accent-gold);
  border-radius: 4px;
  padding: 20px;
  margin-bottom: 25px;
  box-shadow: var(--shadow-antique);
}
.info-card h3 {
  color: var(--accent-burgundy);
  font-size: 1.25rem;
  margin-bottom: 10px;
}

footer {
  background: var(--text-primary);
  color: #d1c2b0;
  border-top: 3px solid var(--accent-gold);
  padding: 35px 0 25px;
  font-size: 0.88rem;
  margin-top: 50px;
}
footer a { color: #f7eedb; text-decoration: none; }
footer a:hover { color: var(--accent-gold); }
