/* =========================================
   Erdélyi Múzeum overrides on top of the EME Kiadó styles
   ========================================= */

/* Header: slogan under the site name (kiado had none, styled for a dark bg) */
header .site-slogan {
  color: var(--color-muted);
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.95rem;
  margin-top: 0.35rem;
}
header .site-name-slogan::after {
  display: none;
}

/* Sidebar: year / füzet archive ("Évfolyamok") */
#block-emuzeum-evfolyamok {
  background-color: var(--lighter);
  border-top: 3px solid var(--primary);
}
#block-emuzeum-evfolyamok .block-title {
  font-size: 1.5rem;
}
.evfolyamok .evfolyam {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border-light);
}
.evfolyamok .evfolyam:last-child {
  border-bottom: 0;
}
.evfolyamok .evfolyam h3 {
  flex: 0 0 3.2rem;
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-heading);
}
.sidebar .evfolyamok ul.evfolyam__fuzetek {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.sidebar .evfolyamok ul.evfolyam__fuzetek li {
  padding: 0;
  border: 0;
}
.sidebar .evfolyamok ul.evfolyam__fuzetek a {
  display: inline-block;
  min-width: 2.2rem;
  padding: 0.15rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: #fff;
  text-align: center;
  font-size: 0.85rem;
  color: var(--primary);
}
.sidebar .evfolyamok ul.evfolyam__fuzetek a:hover,
.sidebar .evfolyamok ul.evfolyam__fuzetek a:focus,
.sidebar .evfolyamok ul.evfolyam__fuzetek a.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.evfolyamok .evfolyam[hidden] {
  display: none;
}
.evfolyamok__toggle {
  margin-top: 0.75rem;
  padding: 0.3rem 0.9rem;
  border: 1px solid var(--primary);
  border-radius: 1rem;
  background: transparent;
  color: var(--primary);
  font-size: 0.85rem;
  cursor: pointer;
}
.evfolyamok__toggle:hover,
.evfolyamok__toggle:focus {
  background: var(--primary);
  color: #fff;
}

/* Issue grid: cover-less issues get a placeholder of the same height */
.products .views-field.views-field-field-borito:empty,
.products .views-row:not(:has(.views-field-field-borito img))::before {
  content: "";
  display: block;
  width: 200px;
  height: 300px;
  margin-bottom: 12px;
  background: var(--light) url("../images/logo-crop.png") center / 60% no-repeat;
  border: 1px solid var(--border-light);
}

/* "Összes lapszám" more link under the front-page grid */
.frontblock + .more-link,
.products ~ .more-link,
.view .more-link {
  margin-top: 1.5rem;
  text-align: right;
}

/* Issue page */
.node-type--lapszam .layout--twocol-section .layout__region--second img {
  width: 100%;
  height: auto;
  box-shadow: var(--shadow-md);
}
.node-type--lapszam .field--name-body a[href$=".pdf"] {
  display: inline-block;
  padding-left: 1.4rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23912730' stroke-width='2'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 2v6h6'/%3E%3C/svg%3E") left center / 1rem no-repeat;
}

@media (min-width: 992px) {
  /* Align with the site name, which has 1em (at 1.55rem) left padding here. */
  header .site-slogan {
    padding-left: 1.55rem;
  }
}

/* Issue description: the imported HTML separates links with <br><br> */
.node-type--lapszam .field--name-body br + br {
  display: none;
}
.node-type--lapszam .field--name-body a[href$=".pdf"] {
  margin: 0.2rem 0;
}

/* Mobile: content before the sidebar (kiado put the search box first), and
   no slogan – it does not fit next to the logo. */
@media (max-width: 991.98px) {
  #sidebar-right {
    order: 1;
  }
  header .site-slogan {
    display: none;
  }
}
@media (max-width: 991.98px) {
  .node-type--lapszam .layout--twocol-section .layout__region--second img {
    max-width: 260px;
    display: block;
    margin: 0 auto;
  }
}

/* Desktop main menu: six items + language switcher + search icon on one line */
@media (min-width: 992px) {
  .menu-wrap .menu,
  .menu-wrap .menu a,
  .menu-wrap .menu span {
    letter-spacing: 0.02em;
  }
  .menu-wrap .menu-item a,
  .menu-wrap .menu-item > span {
    padding: 6px 10px;
  }
}
@media (min-width: 992px) and (max-width: 1199.98px) {
  .menu-wrap .menu,
  .menu-wrap .menu a,
  .menu-wrap .menu span {
    font-size: 0.72rem;
    letter-spacing: 0;
  }
  .menu-wrap .menu-item a,
  .menu-wrap .menu-item > span {
    padding: 6px 6px;
  }
}
/* html is 18px from 1200px up (base.css), so scale the menu down until 1366 */
@media (min-width: 1200px) and (max-width: 1365.98px) {
  .menu-wrap .menu,
  .menu-wrap .menu a,
  .menu-wrap .menu span {
    font-size: 0.68rem;
    letter-spacing: 0;
  }
  .menu-wrap .menu-item a,
  .menu-wrap .menu-item > span {
    padding: 6px 7px;
  }
}

/* Language switcher: keep each item and its separator on one line */
#block-emuzeum-nyelvvalaszto ul.links li {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}
#block-emuzeum-nyelvvalaszto ul.links li:last-child::after {
  display: none;
}
@media (min-width: 992px) and (max-width: 1199.98px) {
  #block-emuzeum-nyelvvalaszto ul.links li a {
    padding: 5px 5px;
    margin: 6px 0;
  }
}
@media (min-width: 992px) and (max-width: 1099.98px) {
  .menu-wrap .menu-item a,
  .menu-wrap .menu-item > span {
    padding: 6px 4px;
  }
  .region-primary-menu {
    margin-left: calc(65px + 1em);
  }
}
