/*
Theme Name: mckras64
Author: Gemini
Description: A theme for mckras64.ru
Version: 1.0
*/

:root {
  --font-body: 'Montserrat', 'Arial', 'Tahoma', sans-serif;
  --font-heading: 'Dela Gothic One', sans-serif;
  --color-text: #232323;
  --color-primary: #4F3185;
  --color-accent-orange: #FF8A00;
  --color-background: #fff;
  --color-background-alt: #F2F2F2;
  --color-border: #EAEAEA;
}

a:link { color: var(--color-primary); }
a:hover { color: var(--color-accent-orange); }

a,
button {
  transition: color 0.2s ease;
}

html {
  font-size: 12px;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--color-text);
  background-color: var(--color-background);
  margin: 0;
}

.visually-hidden {
  position: absolute;
  width: 0.0625rem;
  height: 0.0625rem;
  padding: 0;
  margin: -0.0625rem;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: 1366px;
  margin: 0 auto;
  padding: 0 1rem;
  box-sizing: border-box;
}

.section-title {
  margin: 0 auto 1.5rem;
  text-align: center;
  font-family: 'Dela Gothic One';
  font-size: 2.3rem;
  line-height: 1;
  color: var(--color-primary);
}

.site-header {
  background-color: var(--color-background);
}

.site-header__inner {
  width: 100%;
  max-width: 1920px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr max-content 1fr;
  grid-template-areas: "primary logo secondary";
  align-items: center;
  column-gap: 3rem;
  padding: 2rem 2.5rem;
  box-sizing: border-box;
}

.site-header__nav {
  display: flex;
  align-items: center;
}

.site-header__nav--primary {
  grid-area: primary;
  justify-self: end;
}

.site-header__nav--secondary {
  grid-area: secondary;
  justify-self: start;
}

.site-header__nav-list {
  display: flex;
  align-items: center;
  gap: 2.8rem;
  margin: 0;
  padding: 2.2rem 0 0 0;
  list-style: none;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.site-header__link {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 1.45rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  color: var(--color-primary);
}

.site-header__link--more {
  text-decoration: underline dashed;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.35em;
}

.site-header__link.is-active {
  color: var(--color-accent-orange);
}

.site-header__logo {
  grid-area: logo;
  display: inline-flex;
  justify-content: center;
  justify-self: center;
}

.site-header__logo img {
  width: 13.5rem;
  transform: translateY(3.5rem);
  flex-shrink: 0;
}

.site-header__nav-item--more {
  position: relative;
}

.site-header__more {
  position: relative;
}

.site-header__more-toggle {


  color: var(--color-primary);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.site-header__more-toggle:hover,
.site-header__more-toggle:focus-visible {
  color: var(--color-accent-orange);
}

.site-header__more-menu {
  position: absolute;
  top: calc(100% + 0.75rem);
  right: 0;
  min-width: 14rem;
  padding: 1rem 0.75rem;
  margin: 0;
  list-style: none;
  background-color: var(--color-background);
  border: 0.0625rem solid var(--color-border);
  border-radius: 0.75rem;
  box-shadow: 0 1.125rem 2.8125rem rgba(35, 35, 35, 0.12);
  display: none;
  z-index: 10;
}

.site-header__more-item + .site-header__more-item {
  margin-top: 0.5rem;
}

.site-header__more-link {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--color-primary);
  text-decoration: none;
  display: block;
  padding: 0.35rem 0.5rem;
  border-radius: 0.35rem;
}

.site-header__more-link:hover,
.site-header__more-link:focus-visible {
  background-color: var(--color-background-alt);
  color: var(--color-accent-orange);
  outline: none;
}

.site-header__more--open .site-header__more-menu,
.site-header__more-menu[aria-hidden="false"] {
  display: block;
}

.site-header__toggle {
  grid-area: primary;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.35rem;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--color-text);
  justify-self: start;
}

.site-header__toggle-line {
  display: block;
  width: 1.5rem;
  height: 0.125rem;
  background-color: currentColor;
  border-radius: 999rem;
}

.site-header__phone {
  grid-area: secondary;
  display: none;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--color-primary);
  justify-self: end;
  text-decoration: none;
}

.site-header__phone svg {
  width: 1.75rem;
  height: auto;
  display: block;
}

.site-header__phone:hover {
  color: var(--color-accent-orange);
}

.site-header__toggle:focus-visible,
.site-header__phone:focus-visible,
.site-header__link:focus-visible,
.site-header__more-toggle:focus-visible {
  outline: 0.125rem solid var(--color-primary);
  outline-offset: 0.1875rem;
}

body.is-locked {
  overflow: hidden;
}

.hero-video {
  width: 100%;
  max-width: 1920px;
  margin: 0 auto;
  padding: 2.25rem 2rem;
  box-sizing: border-box;
}

.hero-video__figure {
  margin: 2rem 0 0 0;
  text-align: center;
}

.hero-video__figure img {
  width: 82%;
  height: auto;
  display: inline-block;
}

.contacts {
  width: 100%;
  max-width: 1920px;
  margin: 0.05rem auto 0 auto;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 3.45rem;
  font-family: 'Dela Gothic One';
}

.contacts__row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  column-gap: 3rem;
  align-items: center;
}

.contacts__item {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  line-height: 1.4;
}

.contacts__item--left {
  justify-self: end;
  text-align: right;
}

.contacts__item--center {
  justify-self: center;
  text-align: center;
}

.contacts__item--right {
  justify-self: start;
  text-align: left;
}

.contacts__link {
  color: var(--color-primary);
  text-decoration: none;
}

.contacts__link:hover,
.contacts__link:focus-visible {
  color: var(--color-accent-orange);
  outline: none;
}

.contacts__separator {
  font-size: 1.625rem;
  color: var(--color-primary);
}

.contacts__grid {
  display: grid;
  grid-template-columns: 1fr minmax(6rem, auto) 1fr;
  column-gap: 5.5rem;
  row-gap: 1.75rem;
  align-items: start;
}

.contacts__unit {
  display: flex;
  flex-direction: column;
  gap: 1.26rem;
}

.contacts__unit--primary {
  align-items: flex-end;
  text-align: right;
}

.contacts__unit--schedule {
  align-items: center;
  text-align: center;
}

.contacts__unit--secondary {
  align-items: flex-start;
  text-align: left;
}

.contacts__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.1rem .6rem;
    border-radius: 999rem;
    font-size: .46rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    font-family: 'Dela Gothic One';
}

.contacts__label {
    font-size: .46rem;
    font-family: 'Dela Gothic One';
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-primary);
    line-height: 132%;
}

.contacts__address {
    font-size: 1.4rem;
    line-height: 1.3;
    color: var(--color-primary);
}

.contacts__address {
    font-style: normal;
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: -.4rem;
}

.contacts__address-line {
  display: block;
}

.contacts__schedule {
    display: flex;
    flex-direction: column;
    gap: 0;
    color: var(--color-primary);
    line-height: 112%;
    text-transform: uppercase;
    font-size: .9rem;
}

.contacts__schedule-line {
  display: block;
  white-space: nowrap;
}

.contacts__schedule span,
.contacts__schedule time {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

.section-divider {
  width: 100%;
  max-width: 1920px;
  margin: 4.9rem auto 3.2rem;
  padding: 0 2rem;
  box-sizing: border-box;
  display: flex;
  align-items: center;
}

.section-divider__line {
  width: 60%;
  height: 0.75rem;
  margin: 0 auto;
}

.section-divider__line polyline {
  fill: none;
  stroke: rgba(79, 49, 133, 0.65);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 0 10;
}

.news-section {
  background-color: var(--color-background);
}

.posts-container {
  width: 100%;
  margin: 0 auto;
  overflow: visible;
}

.posts-container.is-loading {
  pointer-events: none;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.posts-container.swiper-initialized {
  overflow: hidden;
}

.about {
  padding: 3rem 0;
}

.about__title {
  text-align: center;
}

.section-title--shaped {
  display: inline-flex;
  align-items: center;
  position: relative;
  z-index: 2;
  justify-content: center;
  padding: 0.85rem 2.75rem;
  background-color: var(--color-primary);
  color: var(--color-background);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  transition: clip-path 0.4s cubic-bezier(0.25, 1, 0.5, 1), background-color 0.3s ease;
  cursor: default;
}

.section-title--shaped h2 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: 0.01em;
  color: inherit;
}

.about__hero {
  position: relative;
  overflow: hidden;
  margin: -4rem auto 0 auto;
  border-radius: 1.5rem;
  min-height: clamp(260px, 38vw, 420px);
  background-color: #100724;
  --parallax-offset: 0px;
  --parallax-scale: 1.18;
  transition: clip-path 0.4s ease;
  width: calc(100% - 2rem);
  max-width: 1246px;
  z-index: 1;
}

.about__hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(16, 7, 36, 0.35) 0%, rgba(16, 7, 36, 0.55) 100%);
  pointer-events: none;
  z-index: 1;
}

.about__hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.about__hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translateY(var(--parallax-offset, 0px)) scale(var(--parallax-scale, 1.18));
  transform-origin: center;
  will-change: transform;
}

.about__body {
  position: relative;
  overflow: hidden;
  background-color: #f4f4f6;
  margin: clamp(-4.25rem, -7vw, -3rem) auto 0 auto;
  padding: clamp(3.25rem, 6vw, 4.75rem) 0 clamp(3.75rem, 7vw, 5rem);
  width: calc(100% - 2rem);
  max-width: 1246px;
  border-radius: 1.75rem 1.75rem 2.25rem 2.25rem;
  z-index: 2;
}

.about__grid {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: flex-start;
  width: 90%;
  margin: 0 auto;
}

.about__card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.about__card-title {
  margin: 0 0 0.25rem;
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  text-transform: none;
  color: #18122c;
}

.about__card p {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.65;
  color: rgba(11, 15, 26, 0.78);
}

.about__card p + p {
  margin-top: 0.35rem;
}

.section-title-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.directions-section {
  padding: 0;
  background-color: #fff;
}

.directions-grid {
  max-width: 1366px;
  margin: 0 auto;
  touch-action: pan-y;
}

.directions-grid .swiper-wrapper {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
}

.directions-grid .swiper-slide {
  width: clamp(260px, 28vw, 320px);
  height: auto;
}

.single-post {
  display: flex;
  flex-direction: column;
}

.single-post__header {
  margin-bottom: 2rem;
}

.single-post__hero {
  position: relative;
  width: 100%;
  padding-top: 56%;
  overflow: hidden;
  background-color: var(--color-background-alt);
}

.single-post__hero-media {
  position: absolute;
  inset: 0;
}

.single-post__hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.single-post__intro {
  padding: 2.5rem 0 1.5rem;
}

.single-post__intro-inner {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.single-post__badge {
  align-self: flex-start;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.45rem 0.9rem;
  border-radius: 9999px;
  background-color: var(--color-primary);
  color: #fff;
}

.single-post__title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 2.8rem;
  line-height: 1.1;
  color: var(--color-primary);
}

.single-post__meta {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 48rem;
}

.single-post__date {
  font-size: 1.1rem;
  color: rgba(35, 35, 35, 0.68);
}

.single-post__excerpt {
  font-size: 1.3rem;
  line-height: 1.6;
}

.single-post__body {
  padding: 0 0 4rem;
}

.single-post__content {
  max-width: 860px;
  margin: 0 auto;
  font-size: 1.25rem;
  line-height: 1.7;
}

.single-post__content > *:first-child {
  margin-top: 0;
}

.single-post__content h2,
.single-post__content h3,
.single-post__content h4 {
  font-family: var(--font-heading);
  color: var(--color-primary);
  margin-top: 2.5rem;
}

.single-post__content p {
  margin-bottom: 1.6rem;
}

.single-post__content ul,
.single-post__content ol {
  margin: 1.5rem 0 1.5rem 1.5rem;
  padding-left: 1.5rem;
}

.single-post__content li + li {
  margin-top: 0.75rem;
}

.single-post__section-title {
  font-family: var(--font-heading);
  font-size: 2.4rem;
  color: var(--color-primary);
  margin: 0 0 2rem;
  text-align: center;
}

.single-post__gallery {
  padding: 2.5rem 0 4rem;
  background-color: var(--color-background-alt);
}

.single-post__gallery-list {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
}

.single-post__gallery-item {
  position: relative;
  display: block;
  width: 100%;
  padding-top: 100%;
  border-radius: 1rem;
  overflow: hidden;
  background-color: rgba(35, 35, 35, 0.08);
  box-shadow: 0 0.75rem 2rem rgba(20, 17, 35, 0.08);
}

.single-post__gallery-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.single-post__gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(17, 17, 17, 0.08), rgba(17, 17, 17, 0.25));
  opacity: 0;
  transition: opacity 0.2s ease;
}

.single-post__gallery-item:hover::after,
.single-post__gallery-item:focus-visible::after {
  opacity: 1;
}

.single-post__video {
  padding: 3rem 0 4.5rem;
}

.single-post__video-wrapper {
  max-width: 960px;
  margin: 0 auto;
}

.single-post__video-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 1.5rem;
  box-shadow: 0 1rem 2.5rem rgba(26, 21, 45, 0.16);
}

.single-post__video-embed iframe,
.single-post__video-embed video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.single-post__video-fallback {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 3rem;
  border-radius: 1.5rem;
  background: linear-gradient(135deg, rgba(79, 49, 133, 0.08), rgba(255, 138, 0, 0.12));
}

.single-post__video-link {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--color-primary);
  text-decoration: none;
}

.single-post__video-link:hover,
.single-post__video-link:focus-visible {
  color: var(--color-accent-orange);
}

.news-archive {
  padding-bottom: 4rem;
}

.news-archive .news-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.news-archive .news-filters .filter-link {
  border: 1px solid rgba(79, 49, 133, 0.18);
  border-radius: 9999px;
  padding: 0.65rem 1.6rem;
  font-family: var(--font-heading);
  font-size: 1rem;
  text-decoration: none;
  color: var(--color-primary);
  transition: all 0.2s ease;
}

.news-archive .news-filters .filter-link:hover,
.news-archive .news-filters .filter-link:focus-visible {
  color: var(--color-accent-orange);
  border-color: var(--color-accent-orange);
}

.news-archive .news-filters .filter-link.active {
  background-color: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.news-archive__stream {
  position: relative;
}

.news-archive__list {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.news-archive__loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin: 3rem auto;
  color: rgba(35, 35, 35, 0.6);
}

.news-archive__spinner {
  width: 2.5rem;
  height: 2.5rem;
  border: 3px solid rgba(79, 49, 133, 0.2);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: news-archive-spin 0.9s linear infinite;
}

.news-archive__loader-text {
  font-size: 0.95rem;
  text-align: center;
}

.news-archive__sentinel {
  height: 1px;
  width: 100%;
}

.news-archive__empty {
  text-align: center;
  font-size: 1.2rem;
  color: rgba(35, 35, 35, 0.55);
  margin: 3rem 0;
}

.center-page {
  background-color: #fff;
}

.center-hero {
  padding: clamp(4rem, 12vw, 7rem) 0;
  background: linear-gradient(135deg, rgba(79, 49, 133, 0.12), rgba(255, 138, 0, 0.14));
}

.center-hero__inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(2rem, 6vw, 4rem);
  align-items: start;
}

.center-hero__badge {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  background-color: #fff;
  font-family: var(--font-heading);
  font-size: 1rem;
  letter-spacing: 0.04em;
  margin-bottom: 1rem;
}

.center-hero__title {
  margin: 0 0 1.5rem;
  font-family: var(--font-heading);
  font-size: clamp(2.8rem, 6vw, 4rem);
  color: var(--color-primary);
}

.center-hero__intro {
  max-width: 520px;
  font-size: 1.1rem;
  line-height: 1.8;
}

.center-hero__nav {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.center-hero__link {
  position: relative;
  align-self: flex-start;
  padding-left: 1.6rem;
  font-family: var(--font-heading);
  color: var(--color-primary);
  text-decoration: none;
}

.center-hero__link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background-color: var(--color-accent-orange);
  transition: transform 0.2s ease;
}

.center-hero__link:hover::before,
.center-hero__link:focus-visible::before {
  transform: translateY(-50%) scale(1.2);
}

.center-section-heading {
  max-width: 640px;
  margin: 0 auto clamp(2rem, 5vw, 3rem);
  text-align: center;
}

.center-section-heading h2 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4.5vw, 2.8rem);
  margin: 0 0 1rem;
  color: var(--color-primary);
}

.center-section-heading p {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.7;
  color: rgba(35, 35, 35, 0.72);
}

.center-contacts {
  padding: clamp(4rem, 11vw, 6.5rem) 0;
}

.center-contacts__grid {
  display: grid;
  gap: clamp(1.5rem, 4vw, 2.5rem);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
}

.center-card {
  background-color: #fff;
  border-radius: 1.25rem;
  padding: clamp(1.75rem, 4vw, 2.5rem);
  box-shadow: 0 1.5rem 3.5rem rgba(35, 35, 35, 0.08);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.center-card--primary {
  border: 2px solid rgba(79, 49, 133, 0.16);
}

.center-card h3 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--color-primary);
}

.center-card address {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-style: normal;
  line-height: 1.6;
}

.center-card__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.center-card__list span {
  display: block;
  font-size: 0.85rem;
  text-transform: uppercase;
  color: rgba(35, 35, 35, 0.55);
  margin-bottom: 0.25rem;
}

.center-card__list a {
  text-decoration: none;
  color: var(--color-primary);
  font-weight: 600;
}

.center-card--schedule ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.center-map {
  width: 100%;
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: 0 1.5rem 3.5rem rgba(35, 35, 35, 0.12);
}

.center-map iframe {
  display: block;
  width: 100%;
  height: clamp(320px, 55vw, 420px);
}

.center-structure {
  padding: clamp(4rem, 12vw, 6.5rem) 0;
  background-color: var(--color-background-alt);
}

.center-structure__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(1.75rem, 5vw, 2.5rem);
}

.center-person {
  background-color: #fff;
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: 0 1.5rem 3.5rem rgba(35, 35, 35, 0.08);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.center-person__photo img {
  width: 100%;
  height: clamp(220px, 36vw, 280px);
  object-fit: cover;
}

.center-person__body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.center-person__name {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.35rem;
  color: var(--color-primary);
}

.center-person__role {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(35, 35, 35, 0.72);
}

.center-person__bio {
  margin: 0;
  line-height: 1.6;
  color: rgba(35, 35, 35, 0.78);
}

.center-documents {
  padding: clamp(4rem, 11vw, 6rem) 0;
}

.center-documents__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.center-documents__item {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-radius: 1rem;
  background-color: var(--color-background-alt);
}

.center-documents__title {
  font-weight: 600;
  font-size: 1.05rem;
}

.center-documents__link {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 600;
}

.center-feedback {
  padding: clamp(4rem, 12vw, 6.5rem) 0;
  background: linear-gradient(135deg, rgba(79, 49, 133, 0.08), rgba(255, 138, 0, 0.1));
}

.center-feedback__notice {
  padding: 1rem 1.5rem;
  border-radius: 1rem;
  margin-bottom: 2rem;
  text-align: center;
  font-weight: 600;
}

.center-feedback__notice--success {
  background-color: rgba(79, 133, 96, 0.15);
  color: #2f6b3f;
}

.center-feedback__notice--error {
  background-color: rgba(255, 138, 0, 0.15);
  color: #a04a00;
}

.center-feedback__form {
  max-width: 720px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  background-color: #fff;
  padding: clamp(1.75rem, 4vw, 2.5rem);
  border-radius: 1.5rem;
  box-shadow: 0 1.5rem 3.5rem rgba(35, 35, 35, 0.1);
}

.center-feedback__field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.center-feedback__field label {
  font-weight: 600;
  font-size: 0.95rem;
}

.center-feedback__field input,
.center-feedback__field textarea {
  border: 1.5px solid rgba(35, 35, 35, 0.15);
  border-radius: 0.85rem;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.center-feedback__field input:focus-visible,
.center-feedback__field textarea:focus-visible {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(79, 49, 133, 0.18);
}

.center-feedback__field--wide {
  grid-column: 1 / -1;
}

.center-feedback__submit {
  grid-column: 1 / -1;
  justify-self: center;
  padding: 0.95rem 2.5rem;
  background-color: var(--color-primary);
  border: none;
  color: #fff;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.center-feedback__submit:hover,
.center-feedback__submit:focus-visible {
  background-color: var(--color-accent-orange);
  transform: translateY(-2px);
}

.center-feedback__hint {
  grid-column: 1 / -1;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(35, 35, 35, 0.62);
  margin: 0;
}

@media (max-width: 768px) {
  .center-hero__nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
  }

  .center-card {
    padding: 1.5rem;
  }

  .center-documents__item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
}

@keyframes news-archive-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@media (min-width: 768px) {
  .single-post__hero {
    padding-top: 42%;
  }

  .single-post__intro {
    padding: 3.5rem 0 2.5rem;
  }

  .single-post__title {
    font-size: 3.4rem;
  }

  .single-post__meta {
    flex-direction: row;
    align-items: center;
    gap: 2rem;
  }

  .single-post__excerpt {
    font-size: 1.4rem;
    max-width: 42rem;
  }

  .single-post__gallery {
    padding: 3.5rem 0 5rem;
  }

  .news-archive__list {
    gap: 2.5rem;
  }
}

@media (min-width: 1024px) {
  .single-post__hero {
    padding-top: 36%;
  }

  .single-post__intro-inner {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 3rem;
  }

  .single-post__title {
    flex: 1;
    font-size: 4rem;
  }

  .single-post__meta {
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
  }

  .single-post__section-title {
    font-size: 2.8rem;
  }

  .news-archive .news-filters .filter-link {
    font-size: 1.05rem;
  }
}

.directions-grid:not(.swiper-initialized) .swiper-wrapper {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.direction-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 2.5rem;
  border: 1px solid #ccc;
  border-radius: 0;
  background-color: #fff;
  text-decoration: none;
  color: var(--color-text);
  flex: none;
  min-height: 550px;
  cursor: pointer; /* Added */
  background-repeat: no-repeat;
  background-position: bottom center;
  background-size: 100% auto;
}

.direction-card--cta {
  cursor: default;
  background-image: none;
}

.direction-card:hover {
  color: var(--color-text);
  border-color: #bbb;
}

.direction-card:focus-visible {
  outline: 2px solid rgba(79, 49, 133, 0.5);
  outline-offset: 4px;
}

.direction-card .card-inner-content {
  display: flex;
  flex-direction: column;
  gap: 1rem; /* Added */
  flex: 1 1 auto;
}

.direction-card h3 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.75rem;
  line-height: 1.25;
  color: var(--color-primary);
}
.direction-card__main-title {
  margin: 0 0 1.5rem;
  font-family: var(--font-body);
  font-size: clamp(1.5rem, 2vw, 1.7rem);
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-text);
}

.direction-card__cta {
  font-family: var(--font-body);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-accent-orange);
  text-decoration: none;
  display: inline-block;
  margin-bottom: 1.5rem;
}

.direction-card__cta:hover span { transform: translateX(5px); }

.direction-card p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.55;
  color: rgba(11, 15, 26, 0.8);
}

.direction-card .card-secondary-text {
  margin-top: auto;
  font-size: 0.9rem;
  color: rgba(11, 15, 26, 0.65);
  border-top: 1px solid var(--color-border);
  padding-top: 1.5rem;
}

.directions-grid .swiper-pagination {
  margin-top: 2.5rem;
  position: static;
}

.gallery-section {
  padding-top: 5rem;
  padding-bottom: 0;
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}

.gallery-section .section-title-wrapper {
  padding: 0;
  margin-bottom: -3rem;
}

.final-gallery {
  position: relative;
  height: clamp(380px, 55vw, 520px);
  width: 100%;
  overflow: hidden;
}

.final-gallery .gallery-wrapper {
  display: flex;
  flex-wrap: nowrap;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.4) transparent;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

.final-gallery .gallery-wrapper::-webkit-scrollbar {
  height: 6px;
}

.final-gallery .gallery-wrapper::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.35);
  border-radius: 3px;
}

.final-gallery .gallery-wrapper::-webkit-scrollbar-track {
  background: transparent;
}

.final-gallery .gallery-column,
.final-gallery .gallery-column--cta {
  flex: 0 0 calc(100% / 6.5);
  max-width: calc(100% / 6.5);
  width: calc(100% / 6.5);
  min-height: 100%;
}

.final-gallery .gallery-column {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.final-gallery .gallery-item {
  position: relative;
  display: block;
  width: 100%;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  transition: transform 0.35s cubic-bezier(0.33, 1, 0.68, 1), filter 0.35s ease;
  cursor: pointer;
}

.final-gallery .gallery-item:hover {
  transform: scale(1.04);
  filter: brightness(1.08);
}

.final-gallery .gallery-item:focus-visible,
.gallery-cta:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.65);
  outline-offset: 4px;
}

.gallery-column--cta {
  display: flex;
  align-items: stretch;
  justify-content: center;
  height: 100%;
}

.gallery-cta {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
  height: 100%;
  border: none;
  background: linear-gradient(135deg, rgba(79, 49, 133, 0.9), rgba(52, 32, 94, 0.9));
  color: #fff;
  font-family: var(--font-heading);
  font-size: clamp(1.1rem, 2.4vw, 1.45rem);
  text-transform: lowercase;
  cursor: pointer;
  transition: transform 0.3s ease, background 0.3s ease;
}

.gallery-cta span {
  display: block;
  letter-spacing: 0.06em;
}

.gallery-cta:hover {
  transform: translateX(4px);
  background: linear-gradient(135deg, rgba(255, 118, 20, 0.92), rgba(255, 84, 84, 0.88));
}

.final-gallery .gallery-item.is-portrait {
  background-position: center top;
}

.final-gallery .gallery-item.is-landscape {
  background-position: center;
}

.final-gallery .gallery-item::after {
  display: none;
}

.final-gallery .gallery-item.has-caption::after {
  display: block;
  content: attr(aria-label);
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  padding: 0.45rem 0.75rem;
  font-size: 0.85rem;
  line-height: 1.4;
  color: #fff;
  background: linear-gradient(120deg, rgba(79, 49, 133, 0.85), rgba(52, 32, 94, 0.85));
  border-radius: 0.75rem;
  pointer-events: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.final-gallery .gallery-item.has-caption:hover::after,
.final-gallery .gallery-item.has-caption:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.fancybox__caption {
  padding: 1rem clamp(1rem, 4vw, 2rem);
  text-align: left;
  color: #fff;
  background: linear-gradient(160deg, rgba(17, 16, 33, 0.85), rgba(30, 18, 64, 0.65));
  backdrop-filter: blur(8px);
  font-size: 1rem;
  line-height: 1.5;
}

.site-footer {
  background: linear-gradient(180deg, #4F3185 0%, #34205E 100%);
  color: #fff;
  padding: clamp(3.5rem, 6vw, 5rem) 0 clamp(3rem, 5vw, 4rem);
}

.footer-grid {
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  align-items: flex-start;
}

.footer-branding {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.footer-logo {
  width: clamp(140px, 12vw, 180px);
}

.footer-contact p {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
}

.footer-contact a {
  color: #fff;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.footer-contact a:hover {
  opacity: 0.75;
}

.footer-links h4 {
  margin: 0 0 1.4rem;
  font-family: var(--font-heading);
  font-size: clamp(1.3rem, 2vw, 1.6rem);
  color: #fff;
}

.footer-links ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.95rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: #fff;
}

.news-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin: 0 0 2rem 0;
}

.filter-link {
    /* Сброс стандартных стилей кнопки */
    background: none;
    border: none;
    margin: 0;
    padding: 0;
    font: inherit;
    cursor: pointer;
    text-align: inherit;
    -webkit-appearance: none; /* Для кроссбраузерной консистентности */
    -moz-appearance: none;
    padding: 0.1rem .6rem;
    border-radius: 999rem;
    font-size: .9rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    border: 2px solid var(--color-background);
    color: var(--color-primary);
    font-family: 'Dela Gothic One';
}

.filter-link.active,
.filter-link:hover,
.filter-link:focus-visible {
  border-color: var(--color-primary);
  background-color: var(--color-background);
  color: var(--color-primary);
}

.posts-container .swiper-wrapper {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding: 3rem;
  box-sizing: border-box;
}

.post-card {
  position: relative;
  display: block;
  border-radius: 1rem;
  overflow: hidden;
  background-color: #f0f0f0;
  color: var(--color-text);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}

.post-card:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
}

.post-card-link {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 480px;
  color: inherit;
  text-decoration: none;
  background-repeat: no-repeat;
  background-size: var(--post-card-bg-size, cover);
  background-position: center top;
}

.post-card-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.1);
  transition: opacity 0.25s ease;
  pointer-events: none;
  z-index: 1;
}

.post-card:hover .post-card-link::after {
  opacity: 0;
}

.post-card-body {
  position: relative;
  z-index: 2;
  margin-top: auto;
  background-color: var(--color-background-alt);
  width: 100%;
}

.post-card-content {
  padding: 3rem 1.5rem 1.5rem 1.5rem;
  text-align: left;
}

.post-card-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border: 1.5px solid var(--color-primary);
  border-radius: 1rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  color: var(--color-primary);
}

.post-card-date {
  display: block;
  font-size: 0.875rem;
  color: #888;
  margin-bottom: 0.5rem;
}

.post-card-title {
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 1.8vw, 1.4rem);
  line-height: 1.3;
  margin: 0 0 1rem 0;
  color: var(--color-text);
}

.post-card-excerpt {
  font-size: 0.9rem;
  line-height: 1.5;
  color: #555;
  margin: 0;
}

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(35, 35, 35, 0.65);
  display: flex;
  align-items: stretch;
  justify-content: center;
  transition: opacity 0.25s ease;
}

.mobile-menu[hidden] {
  display: none;
}

.mobile-menu__inner {
  background: var(--color-background);
  width: 100%;
  max-width: 100%;
  padding: 3.25rem 2.25rem;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  overflow-y: auto;
}

.mobile-menu__close {
  align-self: flex-end;
  width: 2.75rem;
  height: 2.75rem;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  position: relative;
}

.mobile-menu__close-line {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2rem;
  height: 0.125rem;
  background-color: var(--color-text);
  border-radius: 999rem;
}

.mobile-menu__close-line:first-child {
  transform: translate(-50%, -50%) rotate(45deg);
}

.mobile-menu__close-line:last-child {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.mobile-menu__logo img {
  width: 10rem;
  height: auto;
}

.mobile-menu__phone {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--color-primary);
  text-decoration: none;
}

.mobile-menu__phone:hover,
.mobile-menu__phone:focus-visible {
  color: var(--color-accent-orange);
}

.mobile-menu__nav {
  width: 100%;
}

.mobile-menu__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.mobile-menu__link {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--color-text);
  text-decoration: none;
}

.mobile-menu__link:hover,
.mobile-menu__link:focus-visible {
  color: var(--color-primary);
}

.mobile-menu__close:focus-visible {
  outline: 0.125rem solid var(--color-primary);
  outline-offset: 0.1875rem;
}

/* ==========================================================================
   Media Queries
   ========================================================================== */

/* Планшеты и десктопы (адаптивный шрифт) */
@media (min-width: 768px) and (max-width: 1919px) {
  html {
    font-size: calc(12px + 4 * ((100vw - 768px) / (1920 - 768)));
  }
}

/* Большие десктопы */
@media (min-width: 1920px) {
  html {
    font-size: 16px;
  }
}

/* Планшеты и десктопы */
@media (min-width: 768px) {
  .posts-container .swiper-wrapper {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Средние десктопы */
@media (min-width: 1280px) {
  .posts-container .swiper-wrapper {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .about__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .about__body {
    border-radius: 1.5rem 1.5rem 2rem 2rem;
  }
  .directions-grid:not(.swiper-initialized) .swiper-wrapper {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Уменьшение отступов в шапке на небольших десктопах */
@media (max-width: 1180px) {
  .site-header__inner {
    column-gap: 1.9rem;
  }

  .site-header__nav-list {
    gap: 1.6rem;
  }
}

/* Переход к мобильной шапке */
@media (max-width: 1100px) {
  .site-header__inner {
    grid-template-columns: auto 1fr auto;
    column-gap: 1.5rem;
    padding: 1.375rem 1.5rem;
  }
  .site-header__nav {
    display: none;
  }
  .site-header__toggle,
  .site-header__phone {
    display: inline-flex;
  }
  .site-header__logo {
    justify-self: center;
  }
}

/* Планшеты (вертикальная ориентация) */
@media (max-width: 900px) {
  .contacts__row {
    grid-template-columns: 1fr;
    row-gap: 0.75rem;
    text-align: left;
  }
  .contacts__item,
  .contacts__item--left,
  .contacts__item--center,
  .contacts__item--right {
    justify-self: start;
    text-align: left;
  }
  .contacts__separator {
    display: none;
  }
  .contacts__grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    order: 0;
  }
  .contacts__unit,
  .contacts__unit--primary,
  .contacts__unit--schedule,
  .contacts__unit--secondary {
    align-items: flex-start;
    text-align: left;
  }
  .contacts__address {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.3rem;
  }
  .contacts__address-line {
    display: inline;
  }
  .contacts__schedule {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.35rem;
  }
  .contacts__schedule-line {
    display: inline;
  }
  .contacts__row--links {
    margin-bottom: 1.5rem;
  }
  .contacts__grid .contacts__unit--primary {
    order: 0;
  }
  .contacts__grid .contacts__unit--secondary {
    order: 1;
  }
  .contacts__grid .contacts__unit--schedule {
    order: 2;
  }
}

/* Мобильные устройства */
@media (max-width: 768px) {
  .section-title h2 {
    font-size: 1.4rem;
    white-space: normal;
  }
  .section-title--shaped {
    padding: 0.75rem 1.75rem;
  }
  .js-shape-shifter:not(.section-title--shaped) {
    padding: 1rem 1.5rem;
  }
  .js-shape-shifter h2 {
    white-space: normal;
  }
  .posts-container.swiper-initialized .swiper-wrapper {
    display: flex !important;
    padding: 2rem 0;
    gap: 0;
  }
  .about__hero {
    margin: 2.5rem auto;
    min-height: clamp(220px, 55vw, 360px);
  }
  .about__body {
    margin: clamp(-3.5rem, -12vw, -2.5rem) auto 0;
    padding: clamp(2.5rem, 8vw, 3.5rem) 0 clamp(3rem, 9vw, 4rem);
  }
  .about__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .site-header__toggle {
    width: 2.5rem;
    height: 2.5rem;
    gap: 0.3rem;
  }
  .site-header__toggle-line {
    width: 1.5rem;
  }
  .site-header__logo img {
    transform: translateY(1rem);
  }
  .final-gallery {
    height: clamp(320px, 80vw, 420px);
  }
  .final-gallery .gallery-wrapper {
    padding-bottom: 0.5rem;
  }
  .final-gallery .gallery-column {
    min-width: clamp(160px, 60vw, 220px);
  }
}

@media (max-width: 900px) {
  .final-gallery .gallery-column,
  .final-gallery .gallery-column--cta {
    flex: 0 0 calc(100% / 2.5);
    max-width: calc(100% / 2.5);
    width: calc(100% / 2.5);
  }
}

/* Fix for Fancybox image lingering on close: hide content during fadeOut animation */
.fancybox-custom-gallery.is-closing .fancybox__slide > * {
  opacity: 0 !important;
}
