/* =========================================================
   Altynsarin Library — Main Page
   Palette: #56004f (primary) · #cd207e (accent) · white
   ========================================================= */

:root {
  --brand-primary: #56004f;
  --brand-primary-700: #3e003a;
  --brand-primary-900: #2a0027;
  --brand-accent: #cd207e;
  --brand-accent-700: #a81864;
  --brand-cream: #fdf6fb;
  --brand-ink: #1a0a17;
  --brand-muted: #6c5a68;
  --brand-line: rgba(86, 0, 79, 0.12);

  --shadow-sm: 0 4px 14px rgba(86, 0, 79, 0.08);
  --shadow-md: 0 18px 40px -12px rgba(86, 0, 79, 0.22);
  --shadow-lg: 0 30px 60px -20px rgba(86, 0, 79, 0.35);

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: Roboto, sans-serif;

  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', sans-serif;
  color: var(--brand-ink);
  background: #ffffff;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  padding-bottom: 72px;
}

@media (min-width: 992px) {
  body {
    padding-bottom: 0;
  }
}

a {
  color: var(--brand-primary);
  text-decoration: none;
  transition: color .18s ease;
}

a:hover {
  color: var(--brand-accent);
}

::selection {
  background: var(--brand-accent);
  color: #fff;
}

/* Buttons */
.btn {
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: .01em;
  border-radius: 999px;
  padding: .65rem 1.4rem;
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-accent {
  background: var(--brand-accent);
  color: #fff;
  border: 0;
  box-shadow: 0 10px 24px -8px rgba(205, 32, 126, 0.55);
}

.btn-accent:hover {
  background: var(--brand-accent-700);
  color: #fff;
}

.btn-outline-primary-brand {
  border: 2px solid var(--brand-primary);
  color: var(--brand-primary);
  background: transparent;
}

.btn-outline-primary-brand:hover {
  background: var(--brand-primary);
  color: #fff;
}

/* Section */
.section {
  padding: 4.5rem 0;
}

@media (min-width: 992px) {
  .section {
    padding: 6.5rem 0;
  }
}

.section-head {
  margin-bottom: 2.5rem;
}

.section-head--center {
  text-align: center;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.section-head__kicker {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .22em;
  color: var(--brand-accent);
  text-transform: uppercase;
  margin-bottom: .6rem;
}

.section-head__title {
  font-weight: 700;
  color: var(--brand-primary);
  font-size: clamp(1.85rem, 3.4vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0;
}

.section-head__text {
  margin-top: .85rem;
  color: var(--brand-muted);
}

/* =========================================================
   TOP BAR
   ========================================================= */
.top-bar {
  background: var(--brand-primary);
  color: #fff;
  padding: .65rem 0;
  font-size: .92rem;
}

.top-bar__socials {}

.top-bar__socials a {
  display: inline-flex;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  align-items: center;
  justify-content: center;
  transition: background .2s ease, transform .2s ease;
}

.top-bar__socials a:hover {
  background: var(--brand-accent);
  transform: translateY(-2px);
  color: #fff;
}

.top-bar__socials--footer a {
  background: rgba(255, 255, 255, .08);
}

.top-bar__search {
  position: relative;
  display: flex;
  align-items: center;
  gap: .5rem;
  background: rgba(255, 255, 255, .08);
  border-radius: 999px;
  padding: 4px 4px 4px 42px;
  transition: background .2s ease, box-shadow .2s ease;
}

.top-bar__search:focus-within {
  background: rgba(255, 255, 255, .18);
  box-shadow: 0 0 0 3px rgba(205, 32, 126, .35);
}

.top-bar__search>i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  opacity: .8;
}

.top-bar__search input {
  background: transparent;
  border: 0;
  color: #fff;
  flex: 1;
  box-shadow: none !important;
  padding: .4rem 0;
}

.top-bar__search input::placeholder {
  color: rgba(255, 255, 255, .75);
}

.top-bar__search .btn-accent {
  padding: .5rem 1.1rem;
  font-size: .88rem;
}

.top-bar__search--mobile {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, .14);
}

.top-bar__search--mobile>i {
  color: rgba(255, 255, 255, .85);
}

.top-bar__search--mobile input {
  color: #fff;
}

.top-bar__search--mobile input::placeholder {
  color: rgba(255, 255, 255, .6);
}

/* Language switcher */
.lang-switcher {}

.lang-btn {
  border: 0;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .05em;
  transition: background .2s ease, transform .2s ease;
}

.lang-btn:hover {
  background: rgba(255, 255, 255, .2);
}

.lang-btn.active {
  background: var(--brand-accent);
  color: #fff;
}

.lang-flag {
  /* deprecated — replaced by flag-icons cdn. */
}

.lang-btn .fi {
  display: inline-block !important;
  width: 20px !important;
  height: 14px !important;
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25);
  vertical-align: middle;
  line-height: 1 !important;
}

.lang-btn .fi::before {
  content: none !important;
}

/* mobile lang-switcher is inside dark offcanvas */
.offcanvas .lang-btn {
  background: rgba(255, 255, 255, .1);
  color: #fff;
}

.offcanvas .lang-btn.active {
  background: var(--brand-accent);
}

/* =========================================================
   MAIN NAV
   ========================================================= */
.main-nav {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: #fff;
  border-bottom: 1px solid var(--brand-line);
  box-shadow: var(--shadow-sm);
}

.main-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: .75rem 0;
}

.main-nav__brand {
  display: flex;
  align-items: center;
  gap: .85rem;
}

.main-nav__brand img {
  height: 54px;
  width: auto;
}

.main-nav__brand-text {
  display: none;
  line-height: 1;
}

@media (min-width: 768px) {
  .main-nav__brand-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
}

.main-nav__brand-text strong {
  font-weight: 900;
  color: var(--brand-primary);
  font-size: 1.15rem;
  letter-spacing: .02em;
}

.main-nav__brand-text small {
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--brand-accent);
  font-weight: 600;
}

.main-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  gap: .4rem;
  align-items: center;
}

.main-nav__list>li {
  position: relative;
}

.main-nav__list>li>a {
  display: inline-flex;
  align-items: center;
  padding: .7rem 1rem;
  font-size: .94rem;
  font-weight: 600;
  color: var(--brand-ink);
  border-radius: 999px;
  transition: background .18s ease, color .18s ease;
}

.main-nav__list>li>a:hover,
.main-nav__list>li.is-open>a {
  color: var(--brand-accent);
  background: rgba(205, 32, 126, .06);
}

/* Dropdown arrow with ::after */
.main-nav__list>li.has-dropdown>a::after {
  content: "";
  width: 8px;
  height: 8px;
  margin-left: .55rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .25s ease;
}

.main-nav__list>li.has-dropdown.is-open>a::after,
.main-nav__list>li.has-dropdown:hover>a::after {
  transform: rotate(-135deg) translateY(2px);
}

.dropdown-menu-custom {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 260px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: .6rem;
  list-style: none;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .22s ease, transform .22s ease, visibility .22s;
  /* Safe area — extend hover catch upward */
}

.dropdown-menu-custom::before {
  /* invisible safe-area bridge between trigger and menu */
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -14px;
  height: 14px;
}

.main-nav__list>li.has-dropdown:hover>.dropdown-menu-custom,
.main-nav__list>li.has-dropdown.is-open>.dropdown-menu-custom {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition-delay: 0s;
}

/* Delay the closing so the user has time to move onto the menu */
/* .main-nav__list > li.has-dropdown > .dropdown-menu-custom {
  transition-delay: .18s;
} */

.dropdown-menu-custom li a {
  display: block;
  padding: .65rem .9rem;
  border-radius: 12px;
  font-size: .9rem;
  font-weight: 500;
  color: var(--brand-ink);
  position: relative;
  transition: background .15s ease, color .15s ease, padding-left .15s ease;
}

.dropdown-menu-custom li a::before {
  content: "";
  position: absolute;
  left: .4rem;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 2px;
  background: var(--brand-accent);
  transition: width .2s ease;
}

.dropdown-menu-custom li a:hover {
  background: rgba(86, 0, 79, .04);
  color: var(--brand-primary);
  padding-left: 1.3rem;
}

.dropdown-menu-custom li a:hover::before {
  width: 12px;
}

.main-nav__toggle {
  background: transparent;
  border: 0;
  padding: .5rem;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.main-nav__toggle span {
  width: 24px;
  height: 2px;
  background: var(--brand-primary);
  border-radius: 2px;
  transition: transform .2s ease;
}

/* Mobile offcanvas */
.mobile-menu {
  background: var(--brand-primary);
  color: #fff;
  width: 320px !important;
}

.mobile-menu .offcanvas-header {
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.mobile-menu__list {
  margin: 0;
  padding: 0;
}

.mobile-menu__list>li {
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.mobile-menu__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1rem 0;
  background: transparent;
  border: 0;
  color: #fff;
  font-weight: 600;
  font-size: 1.02rem;
  text-align: left;
  transition: color .2s ease, padding-left .25s ease;
}

.mobile-menu__link>span {
  flex: 1;
}

.mobile-menu__link:hover,
.mobile-menu__link[aria-expanded="true"] {
  color: var(--brand-accent);
  padding-left: 6px;
}

.mobile-menu__link--leaf:hover .mobile-menu__chevron {
  transform: translateX(4px);
}

.mobile-menu__chevron {
  width: 30px;
  height: 30px;
  min-width: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  font-size: .72rem;
  color: #fff;
  transition: transform .3s ease, background .2s ease, color .2s ease;
}

.mobile-menu__link:hover .mobile-menu__chevron {
  background: var(--brand-accent);
  color: #fff;
}

.mobile-menu__link[aria-expanded="true"] .mobile-menu__chevron {
  background: var(--brand-accent);
  transform: rotate(180deg);
}

.mobile-submenu {
  max-height: 0;
  overflow: hidden;
  margin: 0;
  transition: max-height .35s ease;
}

.has-dropdown.is-open>.mobile-submenu {
  max-height: 640px;
}

.mobile-submenu li a {
  display: block;
  padding: .7rem 0 .7rem 1rem;
  color: rgba(255, 255, 255, .82);
  font-weight: 500;
  font-size: .95rem;
  border-left: 2px solid rgba(255, 255, 255, .12);
  margin-left: 6px;
  transition: color .2s ease, border-color .2s ease, padding-left .2s ease;
}

.mobile-submenu li a:hover {
  color: var(--brand-accent);
  border-color: var(--brand-accent);
  padding-left: 1.25rem;
}

.mobile-submenu li:last-child a {
  padding-bottom: 1.05rem;
}

/* =========================================================
   HERO SLIDER
   ========================================================= */
.hero {
  position: relative;
}

.hero-swiper {
  height: 62vh;
  min-height: 460px;
  max-height: 720px;
}

@media (min-width: 992px) {
  .hero-swiper {
    height: 78vh;
  }
}

.hero-slide {
  position: relative;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
}

.hero-slide__overlay {
  position: absolute;
  inset: 0;
  /* background:
    linear-gradient(100deg, rgba(42, 0, 39, .9) 0%, rgba(86, 0, 79, .72) 5%, rgba(205, 32, 126, .45) 100%); */
}

.hero-slide__content {
  position: relative;
  z-index: 2;
  max-width: 760px;
  color: #fff;
  padding: 1rem 1rem 3rem;
}

.hero-slide__eyebrow {
  display: inline-block;
  font-size: .78rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, .14);
  padding: .5rem 1rem;
  border-radius: 999px;
  backdrop-filter: blur(10px);
  margin-bottom: 1.4rem;
  opacity: 0;
  transform: translateY(20px);
}

.hero-slide__title {
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-size: clamp(2rem, 5vw, 3.8rem);
  margin-bottom: 1.1rem;
  opacity: 0;
  transform: translateY(30px);
}

.hero-slide__text {
  font-size: 1.05rem;
  max-width: 560px;
  opacity: 0;
  transform: translateY(30px);
}

@media (min-width: 992px) {
  .hero-slide__text {
    font-size: 1.2rem;
  }
}

.hero-slide__cta {
  margin-top: 1.8rem;
  opacity: 0;
  transform: translateY(30px);
}

.swiper-slide-active .hero-slide__eyebrow {
  animation: heroFade .7s .15s ease forwards;
}

.swiper-slide-active .hero-slide__title {
  animation: heroFade .8s .35s ease forwards;
}

.swiper-slide-active .hero-slide__text {
  animation: heroFade .8s .55s ease forwards;
}

.swiper-slide-active .hero-slide__cta {
  animation: heroFade .8s .75s ease forwards;
}

@keyframes heroFade {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-swiper .swiper-pagination {
  bottom: 22px !important;
}

.hero-swiper .swiper-pagination-bullet {
  width: 32px;
  height: 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, .4);
  opacity: 1;
  transition: background .25s ease, width .25s ease;
}

.hero-swiper .swiper-pagination-bullet-active {
  background: #fff;
  width: 54px;
}

.hero-swiper .swiper-button-prev,
.hero-swiper .swiper-button-next {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .14);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .2);
  color: #fff;
  transition: background .2s ease, transform .2s ease;
}

.hero-swiper .swiper-button-prev:hover,
.hero-swiper .swiper-button-next:hover {
  background: var(--brand-accent);
  transform: scale(1.05);
}

.hero-swiper .swiper-button-prev::after,
.hero-swiper .swiper-button-next::after {
  font-size: 18px;
  font-weight: 800;
}

@media (max-width: 767px) {

  .hero-swiper .swiper-button-prev,
  .hero-swiper .swiper-button-next {
    display: none;
  }
}

/* =========================================================
   QUICK LINKS
   ========================================================= */
.quick-links {
  margin-top: -64px;
  position: relative;
  z-index: 5;
}

@media (max-width: 767px) {
  .quick-links {
    margin-top: -40px;
  }
}

.quick-card {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  padding: 2.25rem 1.75rem;
  border-radius: var(--radius-lg);
  color: #fff;
  height: 100%;
  position: relative;
  overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease;
  box-shadow: var(--shadow-md);
}

.quick-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  color: #fff;
}

.quick-card::after {
  content: "";
  position: absolute;
  right: -30px;
  bottom: -30px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  transition: transform .4s ease;
}

.quick-card:hover::after {
  transform: scale(1.25);
}

.quick-card--primary {
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-700) 100%);
}

.quick-card--accent {
  background: linear-gradient(135deg, var(--brand-accent) 0%, var(--brand-accent-700) 100%);
}

.quick-card--dark {
  background: linear-gradient(135deg, #2a0027 0%, #56004f 100%);
}

.quick-card__icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.55rem;
  position: relative;
  z-index: 1;
}

.quick-card__title {
  font-weight: 700;
  font-size: 1.6rem;
  margin: 0;
  position: relative;
  z-index: 1;
}

.quick-card__text {
  opacity: .9;
  margin: 0;
  position: relative;
  z-index: 1;
}

.quick-card__link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  font-size: .92rem;
  position: relative;
  z-index: 1;
}

.quick-card__link .fa-arrow-right {
  transition: transform .25s ease;
}

.quick-card:hover .quick-card__link .fa-arrow-right {
  transform: translateX(6px);
}

/* =========================================================
   NEWS
   ========================================================= */
.news-section {
  background: var(--brand-cream);
}

.news-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: transform .3s ease, box-shadow .3s ease;
  box-shadow: var(--shadow-sm);
}

.news-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.news-card__media {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16/10;
}

.news-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}

.news-card:hover .news-card__media img {
  transform: scale(1.06);
}

.news-card__date {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--brand-accent);
  color: #fff;
  padding: .35rem .8rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 600;
}

.news-card__body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .8rem;
  flex: 1;
}

.news-card__title {
  font-weight: 600;
  font-size: 1.2rem;
  line-height: 1.35;
  margin: 0;
}

.news-card__title a {
  color: var(--brand-ink);
}

.news-card__title a:hover {
  color: var(--brand-accent);
}

.news-card__excerpt {
  color: var(--brand-muted);
  margin: 0;
  font-size: .95rem;
}

.news-card__link {
  margin-top: auto;
  font-weight: 600;
  color: var(--brand-accent);
  font-size: .9rem;
  display: inline-flex;
  align-items: center;
}

.news-card__link .fa-arrow-right {
  transition: transform .25s ease;
}

.news-card__link:hover .fa-arrow-right {
  transform: translateX(4px);
}

/* =========================================================
   VIRTUAL TOUR
   ========================================================= */
.virtual-tour__frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--brand-line);
}

.virtual-tour__frame iframe {
  border: 0;
}

/* =========================================================
   COUNTERS
   ========================================================= */
.counters {
  position: relative;
  padding: 5rem 0;
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-900) 100%);
  color: #fff;
  overflow: hidden;
}

.counters::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(205, 32, 126, .25), transparent 45%),
    radial-gradient(circle at 80% 70%, rgba(255, 255, 255, .08), transparent 40%);
  pointer-events: none;
}

.counter-card {
  position: relative;
}

.counter-card__icon {
  font-size: 2.1rem;
  color: var(--brand-accent);
  margin-bottom: .75rem;
  opacity: .9;
}

.counter-card__number {
  font-weight: 900;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1;
  background: linear-gradient(180deg, #fff 0%, #ffd7ef 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.counter-card__label {
  margin: .5rem 0 0;
  font-size: 1rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .82;
}

/* =========================================================
   BOOKS
   ========================================================= */
.books-swiper {
  padding: 1rem 0 4rem;
  position: relative;
}

.book-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .35s ease, box-shadow .35s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.book-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-md);
}

.book-card__cover {
  aspect-ratio: 2/3;
  background-size: cover;
  background-position: center;
  position: relative;
}

.book-card__cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(86, 0, 79, 0) 60%, rgba(86, 0, 79, .7) 100%);
  opacity: 0;
  transition: opacity .3s ease;
}

.book-card:hover .book-card__cover::after {
  opacity: 1;
}

.book-card__body {
  padding: 1.1rem 1.2rem 1.4rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.book-card__title {
  font-weight: 600;
  font-size: 1.08rem;
  line-height: 1.3;
  margin: 0 0 .25rem;
  color: var(--brand-ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.8rem;
}

.book-card__author {
  color: var(--brand-muted);
  font-size: .85rem;
  margin-bottom: 1.5rem;
}

.book-card__link {
  margin-top: auto;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  gap: 6px;
  color: var(--brand-accent);
  font-weight: 600;
  font-size: .88rem;
  padding: .35rem .8rem;
  border-radius: 999px;
  background: rgba(205, 32, 126, .08);
  transition: background .2s ease, color .2s ease;
}

.book-card__link::after {
  content: "→";
  transition: transform .2s ease;
}

.book-card__link:hover {
  background: var(--brand-accent);
  color: #fff;
}

.book-card__link:hover::after {
  transform: translateX(3px);
}

.books-swiper .swiper-pagination {
  bottom: 0 !important;
}

.books-swiper .swiper-pagination-bullet {
  background: var(--brand-primary);
  opacity: .28;
}

.books-swiper .swiper-pagination-bullet-active {
  background: var(--brand-accent);
  opacity: 1;
  width: 24px;
  border-radius: 3px;
}

.books-swiper .swiper-button-prev,
.books-swiper .swiper-button-next {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  color: var(--brand-primary);
  box-shadow: var(--shadow-md);
  top: 40%;
  transition: background .2s ease, color .2s ease;
}

.books-swiper .swiper-button-prev:hover,
.books-swiper .swiper-button-next:hover {
  background: var(--brand-accent);
  color: #fff;
}

.books-swiper .swiper-button-prev::after,
.books-swiper .swiper-button-next::after {
  font-size: 15px;
  font-weight: 800;
}

/* =========================================================
   PARTNERS
   ========================================================= */
.partners {
  background: var(--brand-cream);
}

.partners-swiper {
  padding: 1rem 0;
}

.partner-logo {
  height: 120px;
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--brand-line);
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  transition: transform .25s ease, box-shadow .25s ease, border-color .2s ease;
}

.partner-logo:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-accent);
}

.partner-logo a img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: .85;
  transition: filter .25s ease, opacity .25s ease;
}

.partner-logo:hover img {
  filter: grayscale(0%);
  opacity: 1;
}

/* =========================================================
   MAP
   ========================================================= */
/*.map-section {
  padding-top: 4.5rem;
}

.map-section__frame {
  margin-top: 2rem;
  box-shadow: var(--shadow-md);
  border-top: 4px solid var(--brand-accent);
}

.map-section__frame iframe {
  border: 0;
}*/

.map-wrapper {
    width: 100%;
    height: 460px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    background: #fff;
}

.map-wrapper iframe {
    display: block;
    border: 0;
    width: 100%;
    height: 100%;
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  background: var(--brand-primary-900);
  color: #fff;
  padding: 4rem 0 2rem;
}

.site-footer__brand img {
  height: 72px;
  background: #fff;
  padding: 8px;
  border-radius: 12px;
}

.site-footer__title {
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: .95rem;
  margin-bottom: 1.2rem;
}

.site-footer ul li {
  margin-bottom: .55rem;
}

.site-footer a {
  color: rgba(255, 255, 255, .8);
  font-size: .92rem;
}

.site-footer a:hover {
  color: var(--brand-accent);
}

.site-footer__contacts li {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
}

.site-footer__contacts i {
  color: var(--brand-accent);
  margin-top: 4px;
}

.site-footer__hr {
  border-color: rgba(255, 255, 255, .12);
  margin: 2.5rem 0 1.5rem;
}

/* =========================================================
   BOTTOM NAV (MOBILE)
   ========================================================= */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid var(--brand-line);
  box-shadow: 0 -12px 30px -12px rgba(86, 0, 79, .2);
  padding: .35rem .25rem calc(.35rem + env(safe-area-inset-bottom, 0));
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  z-index: 1040;
}

.bottom-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: .55rem .3rem;
  font-size: .68rem;
  font-weight: 600;
  color: var(--brand-muted);
  background: transparent;
  border: 0;
  transition: color .2s ease, transform .2s ease;
  border-radius: 12px;
}

.bottom-nav__item i {
  font-size: 1.15rem;
}

.bottom-nav__item:hover,
.bottom-nav__item.active {
  color: var(--brand-accent);
}

.bottom-nav__item.active {
  background: rgba(205, 32, 126, .08);
}

.bottom-nav__item--cta {
  background: var(--brand-accent);
  color: #fff;
  width: 56px;
  height: 56px;
  align-self: center;
  justify-self: center;
  border-radius: 50%;
  padding: 0;
  box-shadow: 0 10px 22px -6px rgba(205, 32, 126, .55);
  margin: 0 auto;
}

.bottom-nav__item--cta i {
  font-size: 1.25rem;
}

.bottom-nav__item--cta span {
  display: none;
}

.bottom-nav__item--cta:hover {
  color: #fff;
  background: var(--brand-accent-700);
}

/* =========================================================
   SCROLL TO TOP (bottom-left)
   ========================================================= */
.scroll-top {
  position: fixed;
  right: 18px;
  bottom: 96px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--brand-primary);
  color: #fff;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px);
  transition: opacity .3s ease, transform .3s ease, background .2s ease;
  z-index: 1045;
}

.scroll-top:hover {
  background: var(--brand-accent);
}

.scroll-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

@media (min-width: 992px) {
  .scroll-top {
    right: 24px;
    bottom: 24px;
    width: 52px;
    height: 52px;
  }
}

/* =========================================================
   UTIL
   ========================================================= */
img {
  max-width: 100%;
}

/* Prevent horizontal scroll from sliders */
.swiper {
  width: 100%;
}

/* =========================================================
   Breadcrumbs
   ========================================================= */
.breadcrumb-wrapper {
  padding: 20px 0;
  background-color: var(--brand-cream);
}

.breadcrumb {
  margin-bottom: 0;
  padding: 0;
  font-family: var(--font-body);
  font-size: 0.95rem;
}

.breadcrumb-item+.breadcrumb-item::before {
  content: "\f105";
  /* FontAwesome Chevron-right */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  color: var(--brand-line);
  font-size: 0.8rem;
  vertical-align: middle;
}

.breadcrumb-item a {
  color: var(--brand-muted);
  text-decoration: none;
  transition: color 0.3s ease;
  font-weight: 500;
}

.breadcrumb-item a:hover {
  color: var(--brand-accent);
}

.breadcrumb-item.active {
  color: var(--brand-primary);
  font-weight: 600;
}

.breadcrumb-item i {
  font-size: 0.85rem;
  color: var(--brand-primary);
}

/* =========================================================
   Contact page
   ========================================================= */
.feedback-section {
  margin-top: 50px;
  margin-bottom: 50px;
}

.contact-details .detail-item {
  display: flex;
  align-items: center;
  margin-bottom: 25px;
}

.icon-box {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.icon-box i {
  color: var(--brand-accent);
  font-size: 1.1rem;
}

/* =========================================================
   Club page
   ========================================================= */

.clubs-section {
  padding: 80px 0;
  background-color: #ffffff;
}

.text-primary-dark {
  color: var(--brand-primary);
}

.section-subtitle {
  font-family: var(--font-body);
  color: var(--brand-muted);
  max-width: 600px;
  margin: 0 auto;
}

.club-card {
  background: var(--brand-cream);
  border-radius: var(--radius);
  overflow: hidden;
  height: 100%;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--brand-line);
  display: flex;
  flex-direction: column;
}

.club-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

.club-image {
  width: 100%;
  height: 220px;
  overflow: hidden;
}

.club-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.club-card:hover .club-image img {
  transform: scale(1.1);
}

.club-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.club-title {
  color: var(--brand-primary-700);
  font-size: 1.5rem;
  margin-bottom: 15px;
  position: relative;
  padding-bottom: 10px;
}

.club-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background-color: var(--brand-accent);
  border-radius: 2px;
}

.club-text {
  font-family: var(--font-body);
  color: var(--brand-ink);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
}

@media (max-width: 767.98px) {
  .club-image {
    height: 200px;
  }

  .clubs-section {
    padding: 50px 0;
  }
}

/* =========================================================
   Chat bot
   ========================================================= */

.fixed-controls {
  position: fixed;
  bottom: 80px;
  right: 30px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1060;
}

.scroll-top {
  position: static !important;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background-color: var(--brand-primary);
  color: #fff;
  border: none;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.scroll-top.is-visible {
  display: flex;
}

.chat-trigger-btn {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background-color: var(--brand-accent);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease;
}

.chat-trigger-btn:hover {
  transform: scale(1.1);
}

#chatWindow {
  position: fixed;
  bottom: 180px;
  right: 30px;
  z-index: 9999;
}

.chat-trigger-btn {
  position: relative;

}

.chat-label {
  position: absolute;
  top: -40px;
  right: 0;
  background-color: var(--brand-primary);
  color: #fff;
  font-size: 12px;
  font-family: var(--font-body);
  padding: 4px 12px;
  border-radius: 20px;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
  pointer-events: none;
  animation: hintBounce 3s infinite;
}


.chat-label::after {
  content: '';
  position: absolute;
  bottom: -5px;
  right: 15px;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid var(--brand-primary);
}

@keyframes hintBounce {

  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }

  40% {
    transform: translateY(-5px);
  }

  60% {
    transform: translateY(-3px);
  }
}

@media (max-width: 767px) {
  .chat-label {
    display: none;
  }
}

#chatWindow {
  width: 360px;
  height: 500px;
  background: #fff;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--brand-line);
}


.chat-header {
  background: var(--brand-primary);
  padding: 15px 20px;
}

.chat-avatar-circle {
  width: 38px;
  height: 38px;
  background: var(--brand-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.chat-status {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: #25d366;
  border-radius: 50%;
  margin-right: 4px;
}

.chat-body {
  flex-grow: 1;
  padding: 20px;
  overflow-y: auto;
  background: var(--brand-cream);
  display: flex;
  flex-direction: column;
}

/*.chat-body {
    height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}*/

.chat-screen-welcome {
  text-align: center;
  margin: auto 0;
}

.welcome-icon {
  font-size: 3rem;
  color: var(--brand-accent);
  margin-bottom: 15px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.1);
  }

  100% {
    transform: scale(1);
  }
}

.chat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 15px;
}

.chat-grid-btn {
  background: #fff;
  border: 1px solid var(--brand-line);
  padding: 15px 10px;
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--brand-primary);
  transition: all 0.2s;
  cursor: pointer;
  text-align: center;
}

.chat-grid-btn:hover {
  border-color: var(--brand-accent);
  background: #fff;
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

.chat-grid-btn i {
  display: block;
  font-size: 1.4rem;
  margin-bottom: 8px;
  color: var(--brand-accent);
}

.msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: var(--radius);
  margin-bottom: 12px;
  font-size: 14px;
  line-height: 1.4;
}

.msg-bot {
  background: #fff;
  color: var(--brand-ink);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  box-shadow: var(--shadow-sm);
}

.msg-user {
  background: var(--brand-accent);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.chat-footer {
  padding: 15px;
  background: #fff;
  border-top: 1px solid var(--brand-line);
}

.chat-header {
  position: relative;
  background: var(--brand-primary);
  padding: 18px 20px;
}

.chat-close-btn {
  position: absolute;
  top: -6px;
  right: -124px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  cursor: pointer;
  font-size: 1.1rem;
}

.chat-close-btn:hover {
  background: var(--brand-accent);
  transform: rotate(90deg);
  color: #fff;
}

.chat-close-btn:focus {
  outline: none;
}

/* КНОПКА LOAD MORE */
.btn-load-more {
    background-color: #fff;
    border: 2px solid var(--brand-line);
    color: var(--brand-primary);
    font-weight: 700;
    border-radius: 50px;
    transition: 0.3s;
}

.btn-load-more:hover {
    background-color: var(--brand-primary);
    color: #fff;
    transform: scale(1.05);
}

.btn-load-more:hover .btn-icon {
    animation: spinIcon 1.5s linear infinite;
}

@keyframes spinIcon {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@media (max-width: 991px) {
    .repo-sidebar {
        margin-bottom: 30px;
    }
}

.chat-footer .form-control:focus {
    border-color: var(--brand-accent);
    box-shadow: none;
}
