/* HaziAsztal Almanach - Classic Hungarian Editorial Almanac Stylesheet */
:root {
  --ha-paper: #FBF9F4;
  --ha-surface: #FFFFFF;
  --ha-cream: #F3EEE3;
  --ha-burgundy: #6B2737;
  --ha-burgundy-dark: #4D1A26;
  --ha-olive: #556B4D;
  --ha-ink: #241F1B;
  --ha-muted: #665D53;
  --ha-rule: #DDD4C4;
}

*, *::before, *::after { box-sizing: border-box; }

body.ha-almanach-body {
  margin: 0;
  background-color: var(--ha-paper);
  color: var(--ha-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16.5px;
  line-height: 1.74;
}

.ha-sans, .ha-nav, .ha-meta, .ha-btn, .ha-badge, .ha-table, .ha-footer, .ha-cookie-box, input, select, textarea, button {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

a {
  color: var(--ha-burgundy);
  text-decoration: none;
  transition: color 0.16s ease;
}
a:hover {
  color: var(--ha-olive);
  text-decoration: underline;
}

.ha-wrap {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.ha-eyebrow-bar {
  background: #2C241E;
  color: #E2DACB;
  font-size: 0.81rem;
  padding: 0.42rem 0;
}
.ha-eyebrow-flex {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}
.ha-eyebrow-bar a {
  color: #E2DACB;
  margin-left: 0.95rem;
}
.ha-eyebrow-bar a:hover { color: #FFFFFF; }

.ha-header {
  background: var(--ha-surface);
  border-bottom: 3px double var(--ha-rule);
}
.ha-masthead-center {
  text-align: center;
  padding: 1.65rem 0 1.25rem;
}
.ha-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  text-decoration: none !important;
}
.ha-brand-name {
  font-family: Georgia, serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--ha-ink);
  letter-spacing: 0.01em;
  display: block;
  line-height: 1.15;
}
.ha-brand-motto {
  display: block;
  font-size: 0.88rem;
  color: var(--ha-muted);
  margin-top: 0.25rem;
}

.ha-nav {
  border-top: 1px solid var(--ha-rule);
  background: #FDFCFA;
}
.ha-nav-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.4rem 0;
}
.ha-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
}
.ha-menu li a {
  display: block;
  padding: 0.55rem 0.85rem;
  font-size: 0.91rem;
  font-weight: 600;
  color: #362E28;
  border-radius: 5px;
  text-decoration: none;
}
.ha-menu li a:hover,
.ha-menu li a.is-selected {
  background: var(--ha-cream);
  color: var(--ha-burgundy);
}

.ha-search-inline {
  display: flex;
  gap: 0.35rem;
}
.ha-search-inline input {
  border: 1px solid var(--ha-rule);
  border-radius: 5px;
  padding: 0.4rem 0.7rem;
  font-size: 0.88rem;
  background: #FFFFFF;
}
.ha-btn {
  display: inline-block;
  background: var(--ha-burgundy);
  color: #FFFFFF !important;
  border: 1px solid var(--ha-burgundy);
  border-radius: 5px;
  padding: 0.46rem 1rem;
  font-size: 0.89rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none !important;
}
.ha-btn:hover {
  background: var(--ha-burgundy-dark);
}
.ha-btn-sec {
  background: var(--ha-cream);
  color: var(--ha-ink) !important;
  border-color: var(--ha-rule);
}

.ha-badge {
  display: inline-block;
  background: #F4E8EB;
  color: var(--ha-burgundy);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
  margin-bottom: 0.55rem;
}

/* Almanac Spotlight + 3-Column Magazine Grid */
.ha-Opening-feature {
  background: var(--ha-surface);
  border: 1px solid var(--ha-rule);
  border-radius: 10px;
  padding: 1.75rem;
  margin: 2rem 0 1.75rem;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 1.75rem;
  align-items: center;
}
.ha-grid-three {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.35rem;
  margin-bottom: 2rem;
}
.ha-card {
  background: var(--ha-surface);
  border: 1px solid var(--ha-rule);
  border-radius: 8px;
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.ha-card h2, .ha-card h3 {
  font-size: 1.18rem;
  line-height: 1.35;
  margin: 0.25rem 0 0.6rem;
}
.ha-meta {
  font-size: 0.81rem;
  color: var(--ha-muted);
  margin-bottom: 0.7rem;
}

.ha-tool-strip {
  background: var(--ha-cream);
  border: 1px solid var(--ha-rule);
  border-radius: 10px;
  padding: 1.35rem 1.6rem;
  margin-bottom: 2rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

/* Single Reading Column + Auxiliary Rail */
.ha-reader-layout {
  display: grid;
  grid-template-columns: 1fr 310px;
  gap: 2rem;
  margin: 2rem 0 3rem;
  align-items: start;
}
.ha-paper-sheet {
  background: var(--ha-surface);
  border: 1px solid var(--ha-rule);
  border-radius: 10px;
  padding: 2.1rem 2.25rem;
}
.ha-paper-sheet h1 {
  font-size: 1.95rem;
  line-height: 1.26;
  margin: 0.3rem 0 0.75rem;
  color: #1D1814;
}
.ha-prose h2 {
  font-size: 1.4rem;
  color: var(--ha-burgundy-dark);
  margin-top: 1.9rem;
  margin-bottom: 0.65rem;
  border-bottom: 1px solid var(--ha-cream);
  padding-bottom: 0.3rem;
}
.ha-prose h3 {
  font-size: 1.15rem;
  margin-top: 1.35rem;
  margin-bottom: 0.5rem;
}

.ha-illust {
  margin: 1.2rem 0 1.5rem;
  border: 1px solid var(--ha-rule);
  border-radius: 8px;
  overflow: hidden;
  background: #FAF7F0;
}
.ha-illust img {
  width: 100%;
  height: auto;
  display: block;
}
.ha-illust figcaption {
  padding: 0.5rem 0.9rem;
  font-size: 0.82rem;
  color: var(--ha-muted);
  border-top: 1px solid var(--ha-rule);
  font-family: sans-serif;
}

.ha-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.35rem 0;
  font-size: 0.92rem;
}
.ha-table th, .ha-table td {
  border: 1px solid var(--ha-rule);
  padding: 0.65rem 0.82rem;
  text-align: left;
}
.ha-table th {
  background: var(--ha-cream);
  color: #2B231D;
  font-weight: 700;
}

.ha-recipe-note {
  border-left: 4px solid var(--ha-olive);
  background: #F4F7F2;
  padding: 1rem 1.25rem;
  border-radius: 0 8px 8px 0;
  margin: 1.4rem 0;
}

.ha-side-box {
  background: var(--ha-surface);
  border: 1px solid var(--ha-rule);
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}
.ha-side-title {
  font-size: 1.04rem;
  margin: 0 0 0.8rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--ha-burgundy);
}
.ha-side-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: sans-serif;
  font-size: 0.9rem;
}
.ha-side-list li {
  padding: 0.45rem 0;
  border-bottom: 1px solid #F1ECE2;
}
.ha-side-list li:last-child { border-bottom: none; }

.ha-field-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}
.ha-control {
  width: 100%;
  padding: 0.56rem 0.75rem;
  border: 1px solid var(--ha-rule);
  border-radius: 5px;
  font-size: 0.94rem;
  background: #FFFFFF;
}
.ha-notice {
  padding: 0.9rem 1.1rem;
  border-radius: 6px;
  background: #EDF5EB;
  border: 1px solid #BDD4B8;
  color: #264A20;
  font-family: sans-serif;
  font-size: 0.92rem;
  margin-bottom: 1.1rem;
}
.ha-notice-err {
  background: #FDF2F2;
  border-color: #F2B8B8;
  color: #7A1F1F;
}

.ha-pager {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 2.5rem;
}
.ha-page-link {
  padding: 0.42rem 0.85rem;
  border: 1px solid var(--ha-rule);
  background: var(--ha-surface);
  border-radius: 5px;
  font-family: sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
}
.ha-page-link.is-now {
  background: var(--ha-burgundy);
  color: #FFFFFF;
  border-color: var(--ha-burgundy);
}

.ha-footer {
  background: #241E1A;
  color: #D8CFC2;
  padding: 2.8rem 0 1.6rem;
  font-size: 0.9rem;
}
.ha-footer-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1.2fr;
  gap: 2rem;
}
.ha-footer h4 {
  color: #FFFFFF;
  font-family: Georgia, serif;
  margin: 0 0 0.85rem;
  font-size: 1.06rem;
}
.ha-footer a { color: #D8CFC2; }
.ha-footer a:hover { color: #FFFFFF; }
.ha-footer-copy {
  border-top: 1px solid rgba(255,255,255,0.12);
  margin-top: 1.8rem;
  padding-top: 1.15rem;
  font-size: 0.81rem;
  color: #A3988B;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
}

.ha-cookie-box {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  max-width: 920px;
  margin: 0 auto;
  background: #FFFFFF;
  border: 1px solid var(--ha-rule);
  box-shadow: 0 10px 28px rgba(36, 30, 26, 0.18);
  border-radius: 8px;
  padding: 1rem 1.3rem;
  z-index: 1020;
  display: none;
}
.ha-cookie-box.is-open {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

@media (max-width: 940px) {
  .ha-Opening-feature { grid-template-columns: 1fr; }
  .ha-grid-three { grid-template-columns: 1fr; }
  .ha-reader-layout { grid-template-columns: 1fr; }
  .ha-footer-grid { grid-template-columns: 1fr; }
  .ha-paper-sheet { padding: 1.4rem; }
}
