/* WordPress adaptations: block markup differs a little from the original page markup. */

/* ── Core blocks ── */
.wp-block-image,
.wp-block-buttons,
.wp-block-button {
  margin: 0;
}

.wp-block-image img {
  display: block;
}

.wp-block-button__link {
  font-size: inherit;
  word-break: normal;
}

/* Images that fill a photo tile. The figure is either the tile itself (.photo) or a child of it. */
.photo > .wp-block-image {
  position: absolute;
  inset: 0;
}

.photo > .wp-block-image img,
.ag-detail .featured-img img,
.hero-photo > img,
.gallery-item > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Whole cards are clickable through the "learn more" link inside them. */
.age-card,
.group-card {
  position: relative;
}

.age-card-more a,
.group-card-more a {
  color: inherit;
  text-decoration: none;
}

.age-card-more a::after,
.group-card-more a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.age-card:has(a:focus-visible),
.group-card:has(a:focus-visible) {
  outline: 3px solid var(--color-forest-mid);
  outline-offset: 3px;
}

.age-card a:focus-visible,
.group-card a:focus-visible {
  outline: none;
}

/* ── Phones ── */
@media (max-width: 620px) {
  .home-shell .camps > .wp-block-image {
    position: relative;
    height: 15rem;
  }

  .about-shell .btn-gold {
    width: 100%;
  }
}

/* ── Age groups ── */
.ag-hero .hero-btn--outline .wp-block-button__link::after {
  content: "arrow_downward";
  font-family: "Material Symbols Outlined";
  font-size: 1.125rem;
  line-height: 1;
  font-feature-settings: "liga";
}

.ag-detail .tile--scarf {
  background: var(--scarf-bg);
  color: var(--scarf-fg);
}

/* Palettes per group: the outer group of each age-group page has one of these classes. */
.ag-ptashata {
  --ag-dark: #4d3a0e; --ag-dark-chip: #6b5318; --ag-dark-muted: #ece0c0; --ag-accent: #f0c040; --ag-accent-text: #2b2208;
  --scarf-bg: #ffffff; --scarf-fg: #23271d;
}

.ag-novatstvo {
  --ag-dark: #22502f; --ag-dark-chip: #336f45; --ag-dark-muted: #cfe5d6; --ag-accent: #9fd0ad; --ag-accent-text: #13301d;
  --scarf-bg: #f2c94c; --scarf-fg: #2b2208;
}

.ag-yunatstvo {
  --ag-dark: #1f3a26; --ag-dark-chip: #2e5e3b; --ag-dark-muted: #cbd6cc; --ag-accent: #d6b25e; --ag-accent-text: #1c241d;
  --scarf-bg: #a8325a; --scarf-fg: #fff6f8;
}

.ag-starshi {
  --ag-dark: #3f3418; --ag-dark-chip: #62522a; --ag-dark-muted: #e4dbc4; --ag-accent: #c9a85a; --ag-accent-text: #1f1a0c;
  --scarf-bg: #3e6b3f; --scarf-fg: #f4f8f1;
}

/* ── Navbar menus (<details>) ── */
.nav-menu {
  position: relative;
}

.nav-menu > summary {
  list-style: none;
}

.nav-menu > summary::-webkit-details-marker {
  display: none;
}

.nav-menu .menu-panel {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  min-width: 11rem;
  padding: 0.5rem 0;
  border-radius: 0.25rem;
  background: var(--color-cream-card);
  box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.2), 0 4px 5px rgba(0, 0, 0, 0.14), 0 1px 10px rgba(0, 0, 0, 0.12);
}

.nav-menu .menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 3rem;
  padding: 0 1rem;
  color: var(--color-text-dark);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.nav-menu .menu-item:hover,
.nav-menu .menu-item:focus-visible {
  background: var(--color-cream-section);
  outline: none;
}

.nav-menu .menu-item.active {
  color: var(--color-forest-mid);
}

.nav-menu .menu-check {
  width: 1.5rem;
}

.site-header .lang-trigger .material-symbols-outlined {
  font-size: 1rem;
}

.site-header .mobile-menu {
  display: none;
}

/* Links no longer fit next to the logo: switch to the menu button. */
@media (max-width: 1060px) {
  .site-header .nav-links {
    display: none;
  }

  .site-header .mobile-menu {
    display: block;
  }
}

/* ── News ── */
.news-shell .search-wrap {
  margin: 0;
}

.news-shell .search-input::-webkit-search-cancel-button {
  display: none;
}

.news-shell a.search-clear,
.news-shell a.reset-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.news-shell .chip {
  text-decoration: none;
}

.news-pagination .nav-links {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2.5rem;
}

.news-pagination .page-numbers {
  padding: 0.5rem 0.875rem;
  border-radius: 0.5rem;
  color: var(--color-forest);
  font-weight: 700;
  text-decoration: none;
}

.news-pagination .page-numbers.current {
  background: var(--color-forest);
  color: var(--color-cream);
}

.article-rich-body > * + * {
  margin-top: 1rem;
}

.article-rich-body .wp-block-gallery {
  margin-top: 2rem;
}

/* ── Contacts ── */
.contacts-shell .form-input:user-invalid {
  border-color: #c0392b;
}
