/*
Theme Name: Memorial
Author: Siarhei
Author URI: https://skweb.by
Description: A solemn full-site-editing block theme replicating the Auschwitz-Birkenau Memorial and Museum homepage. Built entirely with native WordPress blocks. Replace placeholder imagery with the Museum's own licensed assets before any public use.
Version: 1.5.0
Requires at least: 6.5
Tested up to: 6.7
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: Memorial
Tags: full-site-editing, block-patterns, one-column, custom-colors, editor-style
*/

/* ---- supplemental front-end CSS (theme.json handles most styling) ---- */

/* nav links: fill red on hover/focus (CSS fallback; JS in assets/js/nav-hover.js
   does the same and reliably beats the inline styles on the links) */
.ab-nav a, .ab-util a { transition: background-color .2s ease, color .2s ease; }
.ab-nav a:hover, .ab-nav a:focus,
.ab-util a:hover, .ab-util a:focus {
  background-color: #721a1e !important;
  color: #ffffff !important;
}

/* category column heading: subtle underline under the word */
.ab-cat h3 {
  display: inline-block;
  border-bottom: 2px solid currentColor;
  padding-bottom: 4px;
}

/* round chevron buttons in hero */
.wp-block-cover .is-style-outline .wp-block-button__link {
  width: 44px; height: 44px; padding: 0 !important;
  display: inline-flex; align-items: center; justify-content: center;
  line-height: 1; font-size: 16px;
}
.wp-block-cover .is-style-outline .wp-block-button__link:hover {
  background: rgba(255,255,255,.14) !important;
}

/* news thumbnails hover */
.ab-news .wp-block-column:hover p { color: #a51d23; }
.ab-news img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }

/* footer link rows */
.ab-foot-links a:hover { color: #ffffff !important; }
.ab-donate .wp-block-button__link:hover { background: #8c181d !important; }

/* fixed social sidebar */
.ab-sidebar {
  position: fixed; right: 0; top: 50%; transform: translateY(-50%); z-index: 999;
  display: flex; flex-direction: column;
}
.ab-sidebar a {
  width: 40px; height: 40px; display: grid; place-items: center; background: #2c2c2c;
}
.ab-sidebar a:first-child { background: #a51d23; }
.ab-sidebar a:hover { background: #a51d23; }
.ab-sidebar svg { width: 18px; height: 18px; fill: #fff; }

@media (max-width: 781px) {
  .ab-sidebar {top: 75%;}
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}

/* =================== SLIDERS (featured + thumbnails) =================== */
.ab-slider { position: relative; padding: 0 60px; }
.ab-viewport { overflow: hidden; }
.ab-track { display: flex; transition: transform .45s ease; will-change: transform; }
.ab-slide { flex: 0 0 100%; max-width: 100%; box-sizing: border-box; padding: 0 9px; }

.ab-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: none; border: 0; cursor: pointer; padding: 10px; z-index: 2;
  color: #8a8a8a; line-height: 0;
}
.ab-arrow svg { width: 26px; height: 46px; stroke: currentColor; fill: none; stroke-width: 2; }
.ab-arrow:hover { color: #333; }
.ab-arrow:disabled { opacity: .25; cursor: default; }
.ab-prev { left: 6px; }
.ab-next { right: 6px; }

/* numbered dots */
.ab-dots { display: flex; gap: 6px; justify-content: flex-end; margin: 14px 9px 0; }
.ab-dots button {
  width: 26px; height: 26px; border: 0; cursor: pointer;
  background: #c9c9c9; color: #444; font-family: 'Oswald', sans-serif; font-size: 14px;
}
.ab-dots button.on { background: #a51d23; color: #fff; }

/* featured card */
.ab-feat-card {
  display: grid; grid-template-columns: 340px 1fr;
  background: #0e0e0e; color: #fff; min-height: 360px; overflow: hidden;
}
.ab-feat-card img { width: 100%; height: 100%; object-fit: cover; min-height: 360px; }
.ab-feat-txt { padding: 40px 44px; display: flex; flex-direction: column; }
.ab-feat-txt h3 {
  font-family: 'Oswald', sans-serif; font-weight: 500; font-size: 26px;
  line-height: 1.25; margin: 0 0 16px; color: #fff;
}
.ab-feat-txt p { font-weight: 300; font-size: 15px; line-height: 1.7; color: #d7d7d7; margin: 0; }
.ab-feat-go {
  margin-top: auto; align-self: flex-start; width: 38px; height: 38px;
  background: #2a2a2a; display: inline-grid; place-items: center; color: #fff; margin-top: 26px;
}

/* thumbnails */
.ab-thumb a { color: inherit; text-decoration: none; display: block; }
.ab-thumb img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.ab-thumb p { text-align: center; font-size: 13px; line-height: 1.45; color: #333; margin: 12px 0 0; }
.ab-thumb a:hover p { color: #a51d23; }

@media (max-width: 600px) {
  .ab-slider { padding: 0 36px; }
  .ab-feat-card { grid-template-columns: 1fr; }
  .ab-feat-card img { min-height: 200px; }
}

/* ---- native-block slider overrides ---- */
.ab-track.ab-slides { display: flex; gap: 0; align-items: stretch; }
.ab-track.ab-slides > * { margin: 0 !important; }
.ab-slider .ab-slide { box-sizing: border-box; }

/* featured: one media-text per view */
.ab-featured .ab-slide { padding: 0; }
.ab-featured .wp-block-media-text { min-height: 360px; margin: 0; }
.ab-featured .wp-block-media-text__media { height: 100%; }
.ab-featured .wp-block-media-text__media img { width: 100%; height: 100%; object-fit: cover; min-height: 360px; }
.ab-featured .wp-block-media-text__content { padding: 36px 40px; }

/* thumbnails: groups with image + caption */
.ab-thumbs-slider .ab-slide { padding: 0 9px; }
.ab-thumb img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.ab-thumb p { text-align: center; font-size: 13px; line-height: 1.45; color: #333; margin: 12px 0 0; }
.ab-thumb:hover p { color: #a51d23; }

/* in the editor the slides simply stack (no JS) — keep them readable */
.editor-styles-wrapper .ab-slides { display: block; }
.editor-styles-wrapper .ab-slides > * { margin-bottom: 18px; }
/* adcss */
.wp-block-navigation .wp-block-navigation-item__label {font-family: 'Oswald', sans-serif; font-weight: 300; font-size: 21px;text-decoration: underline;text-underline-offset:2px;}
.wp-block-navigation-item__content:hover,
.wp-block-navigation-item.current-menu-item > .wp-block-navigation-item__content:focus {background-color: #721a1e !important;color: #ffffff !important;}
.wp-block-navigation-item__content {transition: background-color .2s, color .2s;padding: 4px 2px;}
@media (max-width: 768px) {.wp-block-navigation .wp-block-navigation-item__label {color: #000 !important;}}
@media (max-width: 768px) {
  .wp-block-navigation__responsive-container-content {
    display: flex;
    flex-direction: column;
    align-items: center !important; /* центрируем весь блок */
    justify-content: center;
    width: 100%;
    text-align: center;
  }

  .wp-block-navigation__container {
    display: flex;
    flex-direction: column;
    align-items: center !important; /* центрируем список */
    width: 100%;
    text-align: center;
  }

  .wp-block-navigation-item {
    width: 100%;
    text-align: center; /* центрируем каждый пункт */
  }

  .wp-block-navigation-item__content,
  .wp-block-navigation-item__label {
    justify-content: center;
    text-align: center !important;
    width: 100%;
  }
}
.wp-block-navigation__responsive-container-close.wp-block-navigation__responsive-container-close.wp-block-navigation__responsive-container-close {color: #000000;}
@media (max-width: 768px) {
  .menu-label-ru .wp-block-navigation__responsive-container-open {
    display: inline-flex;
    align-items: center;
  }

  .menu-label-ru .wp-block-navigation__responsive-container-open::after {
    content: "меню";
    margin-left: 8px;
    color: #fff;
    font-size: 16px;
	text-transform: uppercase;
  }
}
@media (max-width: 768px) {
  .menu-label-en .wp-block-navigation__responsive-container-open {
    display: inline-flex;
    align-items: center;
  }

  .menu-label-en .wp-block-navigation__responsive-container-open::after {
    content: "menu";
    margin-left: 8px;
    color: #fff;
    font-size: 16px;
	text-transform: uppercase;  
  }
}

.wp-block-gallery a {
    position: relative;
}

@media (max-width: 768px) {
  .hide-on-mobile {
    display: none !important;
  }
}

@media (min-width: 769px) {
  .hide-on-desktop {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .center-on-mobile {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
  }
}
.wp-block-navigation-item.current-menu-item > .wp-block-navigation-item__content {
  background-color: #721a1ec7 !important;
  color: #ffffff !important;
}

.img-valign-middle {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

@media (max-width: 768px) {
    .my-mobile-flex {
        display: flex;
        justify-content: space-between;
        
    }
}

.ab-sidebar-text {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 100px !important;;
  background: #2c2c2c;
  font-family: 'Oswald', sans-serif;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  color: #fff !important;
  text-decoration: none;
  transition: background-color .2s ease;
}
.ab-sidebar-text:hover {
  background: #a51d23;
}