:root {
  --color-primary: #2c7be5;
  --color-primary-hover: #1a5fd1;
  --color-text: #fff;
  --color-link: red;
  --color-bg: #420039;
}

body {
  font-family: "Zalando Sans", sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
  margin: 0;
}

/* Общие элементы */
a, a:hover, a:focus, a:visited { color: var(--color-link); text-decoration: none; }
.button { background-color: var(--color-primary); transition: 0.3s; }
.button:hover { background-color: var(--color-primary-hover); }

.media-text-block { display: flex; align-items: center; gap: 40px; }
.media-image { flex: 0 0 100%; }
.media-image img { width: 100%; height: auto; display: block; object-fit: cover; }
.media-text { flex: 1; }

.home-slider .swiper { padding-bottom: 50px; }
.home-slider .swiper-slide, .swiper-slide {
  width: 100%;
  box-sizing: border-box;
  position: relative;
  background-size: cover;
  background-position: center;
  min-height: 300px;
  height: 600px !important;
}
.home-slider .home-content-block { padding: 0; }
.home-slider .home-content-block__image img, .home-slider .home-slider__image { width: 100%; height: auto; display: block; }

.home-slider__top { display: flex; gap: 20px; }
.home-slider__nav { flex-shrink: 0; }
.home-slider__arrow {
  width: 44px; height: 44px; padding: 0; border: 0; border-radius: 8px;
  background: red; color: #fff; display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; transition: 0.2s ease; line-height: 0;
}
.home-slider__arrow:hover { opacity: 0.85; }
.home-slider__arrow svg { display: block; width: 20px; height: 20px; flex: 0 0 20px; }

.home-slider .swiper-pagination { bottom: 0 !important; }
.home-slider .swiper-pagination-bullet { background: #fff; opacity: 1; }
.home-slider .swiper-pagination-bullet-active { opacity: 0.6; }

#reading-progress {
  position: fixed; top: 0; left: 0; width: 0%; height: 4px;
  background-color: #1e73ff; z-index: 99999; transition: width 0.1s ease-out;
}

/* Sticky Header */
.site-header {
  position: sticky; top: 0; z-index: 1000; background: #fff; border-bottom: 1px solid #e5e5e5;
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 80px; }
.site-branding { flex-shrink: 0; }
.site-title { margin: 0; font-size: 24px; line-height: 1; }
.site-title a { color: #222; text-decoration: none; }
.site-description { margin: 6px 0 0; font-size: 14px; color: #777; }

.main-navigation ul { display: flex; align-items: center; gap: 24px; margin: 0; padding: 0; list-style: none; }
.main-navigation a { text-decoration: none; color: #222; font-weight: 500; transition: opacity 0.3s ease; }
.main-navigation a:hover { opacity: 0.7; }

/* Fancy Post Nav */
.fancy-post-nav { margin-top: 60px; padding-top: 30px; border-top: 1px solid #e5e5e5; }
.fancy-post-nav .nav-links { display: flex; justify-content: space-between; gap: 20px; }
.fancy-post-nav .nav-previous, .fancy-post-nav .nav-next { width: 320px; }
.fancy-post-nav .nav-next { margin-left: auto; }
.fancy-post-nav a { display: block; color: inherit; }

.post-nav-card {
  display: block; padding: 20px; background: #fff; border-radius: 12px; border: 1px solid #e5e5e5;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.post-nav-card__label { display: block; font-size: 13px; color: #777; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.04em; }
.post-nav-card__title { display: block; font-size: 18px; line-height: 1.3; font-weight: 600; color: #222; }
.fancy-post-nav a:hover .post-nav-card { transform: translateY(-3px); box-shadow: 0 10px 25px rgba(0,0,0,0.08); }
.fancy-post-nav a:hover .post-nav-card__title { text-decoration: underline; }

/* Other News */
.other-news { margin-top: 50px; }
.other-news h2 { color: #fff; font-size: 22px; margin-bottom: 20px; }
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.news-card { width: 100%; }
.news-card a { display: block; }
.news-card img, .no-image { width: 100%; height: 180px; border-radius: 16px; object-fit: cover; }
.no-image { background: linear-gradient(135deg, #3b5fa0, #4a76c9); display: flex; align-items: center; justify-content: center; }
.no-image span { color: white; font-weight: bold; }
.news-card p { margin-top: 8px; color: #ff3b3b; font-size: 14px; }

/* Blog */
.blog-container { max-width: 1200px; margin: 0 auto; padding: 40px 20px; }
.category-title { font-size: 32px; margin-bottom: 30px; }
.blog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.blog-card {
  background: #fff; border-radius: 16px; overflow: hidden;
  box-shadow: 0 6px 25px rgba(0,0,0,0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.blog-card:hover { transform: translateY(-6px); box-shadow: 0 12px 35px rgba(0,0,0,0.12); }
.blog-card__image img { width: 100%; height: 220px; object-fit: cover; display: block; }
.blog-card__content { padding: 16px; }
.blog-card__title { font-size: 18px; margin: 0 0 10px; }
.blog-card__title a { text-decoration: none; color: #111; }
.blog-card__excerpt { font-size: 14px; color: #666; line-height: 1.5; }

/* Navigation Menu */
.desktop-nav { display: flex; gap: 20px; }
.burger-menu, .mobile-nav { display: none; }

/* Mobile Menu */
@media (max-width: 768px) {
  .home-slider__top { flex-direction: column; align-items: flex-start !important; }
  .home-content-block__content.ps-md-4 { padding-left: 0 !important; padding-top: 20px; }

  .fancy-post-nav .nav-links { flex-direction: column; }
  .fancy-post-nav .nav-previous, .fancy-post-nav .nav-next { width: 100%; margin-left: 0; }

  .desktop-nav { display: none; }
  .burger-menu { display: inline-block; font-size: 28px; background: none; border: none; cursor: pointer; }
  .mobile-nav {
    display: block; position: fixed; top: 0; right: -100%; width: 80%; height: 100%;
    background: #fff; z-index: 9999; padding: 50px 20px; transition: right 0.3s ease; overflow-y: auto;
  }
  body.mobile-menu-open { overflow: hidden; }
  .mobile-nav.open { right: 0; }
  .burger-close { position: absolute; top: 20px; right: 20px; font-size: 28px; background: none; border: none; cursor: pointer; }
  .mobile-menu { list-style: none; padding: 0; margin-top: 60px; }
  .mobile-menu li { margin-bottom: 20px; }
  .mobile-menu a { text-decoration: none; color: #222; font-size: 18px; }

  /* Hero Slider mobile */
  .swiper-slide { height: 500px !important; }
  .slide-content h2 { font-size: 28px; }
  .slide-content p { font-size: 16px; }
}

/* Hero Slider overlay/content */
.slide-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.5); z-index: 1; }
.slide-content {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  z-index: 2; max-width: 800px; text-align: center; color: #fff; padding: 0 20px;
}
.slide-content h2 { font-size: 42px; margin-bottom: 20px; }
.slide-content p { font-size: 18px; margin-bottom: 30px; }
.slide-content .btn { padding: 10px 25px; font-size: 16px; }

/* Блок с медиа и текстом */
.media-text-block {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap; /* Чтобы на мобильных блоки переносились */
}

.media-image {
    flex: 1 1 50%; /* Картинка занимает половину блока */
    max-width: 50%; /* Ограничение ширины */
}

.media-image img {
    width: 100%; /* Картинка подгоняется под контейнер */
    height: auto;
    display: block;
    border-radius: 12px; /* Можно добавить скругление */
}

.media-text {
    flex: 1 1 50%; /* Текст занимает вторую половину */
    max-width: 50%;
}

/* Адаптив для мобильных */
@media (max-width: 768px) {
    .media-text-block {
        flex-direction: column;
        gap: 15px;
    }
    .media-image, .media-text {
        max-width: 100%;
        flex: 1 1 100%;
    }
}



/* footer */

.site-footer {
    margin-top: 70px;
    padding: 56px 0 34px;
    background: var(--color-bg-light);
    color: var(--color-text);
}

.site-footer__top {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 48px;
    padding-bottom: 46px;
    border-bottom: 1px solid var(--color-border);
}

.site-footer__title {
    margin: 0 0 18px;
    color: var(--color-text-dark);
    font-size: 20px;
    line-height: 1.25;
}

.site-footer__menu {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer__menu li + li {
    margin-top: 10px;
}

.site-footer__menu a {
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color 0.25s ease;
}

.site-footer__menu a:hover {
    color: var(--color-link);
}

.site-footer__bottom {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr) 220px;
    gap: 32px;
    align-items: center;
    padding-top: 30px;
}

.site-footer__logo {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    color: inherit;
    text-decoration: none;
}

.site-footer__logo svg {
    display: block;
    width: 150px;
    height: 40px;
}

.site-footer__info {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 18px;
    color: var(--color-text-muted);
    text-align: center;
    font-size: 15px;
}

.site-footer__slogan {
    width: 100%;
    color: var(--color-text-dark);
    font-weight: 700;
}

.site-footer__info a {
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color 0.25s ease;
}

.site-footer__info a:hover {
    color: var(--color-link);
}

.site-footer__socials {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.site-footer__social {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--color-accent-soft);
    color: var(--color-link) !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: 0.25s ease;
}

.site-footer__social svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.site-footer__social:hover {
    background: var(--color-link);
    color: var(--color-text-light) !important;
    transform: translateY(-2px);
}

@media (max-width: 991.98px) {
    .site-footer__bottom {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .site-footer__logo {
        justify-self: center;
    }

    .site-footer__socials {
        justify-content: center;
    }
}

@media (max-width: 767.98px) {
    .site-footer {
        margin-top: 50px;
        padding: 42px 0 30px;
    }

    .site-footer__top {
        grid-template-columns: 1fr;
        gap: 30px;
        padding-bottom: 34px;
    }

    .site-footer__bottom {
        gap: 24px;
        padding-top: 26px;
    }
}

