/* =========================================================
   TripScan — статическая копия лендинга (tripscan.at)
   ========================================================= */

:root {
  /* Цвета */
  --color-contrast: #1d2327;
  --color-base: #ffffff;
  --color-base-2: #f9f9f9;
  --color-base-3: #e8e8e8;
  --color-accent-1: #2d59f2;
  --color-hero: #5993ee;
  --btn-login-bg: #c8dff0;
  --btn-login-color: #5a8bbd;
  --btn-register-bg: #9bc6ee;
  --card-title: #5a8bbd;
  --card-title-hover: #3a6b9d;
  --footer-link: #358ed6;
  --fake-red: #dc2626;
  --yellow: #fde047;

  /* Шрифты */
  --font-body: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-system: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;

  /* Типографика */
  --fs-base: 16px;
  --fs-h1: clamp(24px, 3vw, 36px);
  --fs-h2: clamp(20px, 1.6vw, 24px);
  --fs-h3: clamp(19px, 1.4vw, 21px);

  /* Размеры контейнеров */
  --content-size: 672px;
  --wide-size: 1344px;
  --home-size: 1000px;
  --header-size: 1350px;

  /* Отступы (spacing-пресеты) */
  --spacing-20: 0.5rem;
  --spacing-30: 0.75rem;
  --spacing-40: 1rem;
  --spacing-50: clamp(1.5rem, 3vw, 2rem);
  --spacing-60: clamp(2rem, 4vw, 3rem);
  --spacing-70: clamp(3rem, 6vw, 4rem);

  --root-pad: clamp(1.5rem, 4vw, 2rem);
  --header-h: 60px;
}

/* ---------- Базовые стили ---------- */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  margin: 0;
  background: var(--color-base);
  color: var(--color-contrast);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  border: 0;
  vertical-align: bottom;
}

a {
  color: var(--color-accent-1);
}

p {
  margin: 0 0 var(--spacing-30);
}

.font-system {
  font-family: var(--font-system);
}

/* Заголовки — Montserrat 600 */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-body);
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-contrast);
  margin: 0 0 var(--spacing-30);
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

ul, ol {
  margin: 0 0 var(--spacing-30);
  padding-left: 1em;
}

/* Тонкий прозрачный скроллбар */
::-webkit-scrollbar { width: 3px; height: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(90, 139, 189, 0.3);
  border-radius: 10px;
  transition: all 0.3s ease;
}
::-webkit-scrollbar-thumb:hover { background: rgba(90, 139, 189, 0.7); }
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(90, 139, 189, 0.3) transparent;
}

/* ---------- Шапка ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-h);
  background: var(--color-base);
  box-shadow: 0 4px 15px -3px rgba(59, 130, 246, 0.3);
  transition: height 0.05s cubic-bezier(0.4, 0, 0.2, 1),
    background-color 0.05s;
  backface-visibility: hidden;
}

.site-header__inner {
  max-width: var(--header-size);
  height: 100%;
  margin: 0 auto;
  padding: 0 var(--root-pad);
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
}

.site-header__logo {
  flex-grow: 0;
  flex-basis: 115px;
  display: block;
}

.site-header__logo img {
  width: 145px;
  max-width: 100%;
  object-fit: cover;
  transition: transform 0.05s cubic-bezier(0.4, 0, 0.2, 1);
}

.site-header.shrink .site-header__logo img {
  transform: scale(0.8);
}

.site-header__spacer {
  flex-grow: 1;
}

.site-header__actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

/* ---------- Кнопки ---------- */

.btn {
  display: inline-block;
  border: none;
  border-radius: 11px;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  font-family: var(--font-system);
  font-size: clamp(14px, 0.875rem + ((1vw - 3.2px) * 0.098), 15px);
  line-height: normal;
  transition: filter 0.2s ease, transform 0.2s ease;
}

.btn:hover {
  filter: brightness(0.96);
}

.btn--login {
  background-color: var(--btn-login-bg);
  color: var(--btn-login-color);
  padding: var(--spacing-20) 30px;
}

.btn--register {
  background-color: var(--btn-register-bg);
  color: var(--color-base);
  padding: 0.8rem;
}

/* ---------- Основной контент ---------- */

main {
  display: block;
  margin: 0;
  padding: 0;
}

.container {
  max-width: var(--home-size);
  margin: 0 auto;
  padding-left: var(--root-pad);
  padding-right: var(--root-pad);
}

.container--wide {
  max-width: var(--wide-size);
}

.container--content {
  max-width: calc(var(--content-size) + var(--root-pad) * 2);
}

.home-section {
  padding-top: var(--spacing-70);
  padding-bottom: var(--spacing-70);
}

/* Заголовок-подзаголовок главной */
.hero-title {
  font-family: var(--font-system);
  font-size: var(--fs-h2);
  font-weight: 600;
  color: var(--color-hero);
  text-align: center;
  margin-bottom: var(--spacing-30);
}

.hero-text {
  font-family: var(--font-system);
  text-align: center;
  margin-bottom: var(--spacing-30);
}

/* ---------- Информационная карточка про ссылки ---------- */

.top-info-card {
  background: linear-gradient(145deg, #ffffff 0%, #fefefe 100%);
  border-radius: 16px;
  padding: 20px 25px;
  margin-bottom: 30px;
  box-shadow: 0 12px 25px -10px rgba(0, 0, 0, 0.12),
    0 0 12px -3px rgba(59, 130, 246, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  width: 100%;
  transition: all 0.4s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

.top-info-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 30px -12px rgba(0, 0, 0, 0.18),
    0 0 18px 2px rgba(59, 130, 246, 0.3);
}

.top-info-card__body {
  font-size: 0.95rem;
  line-height: 1.5;
}

.top-info-card__highlight {
  margin-bottom: 8px;
  font-weight: bold;
  white-space: nowrap;
  overflow-x: auto;
}

.top-info-card__highlight span {
  background-color: var(--yellow);
  padding: 3px 6px;
  border-radius: 6px;
  display: inline-block;
  white-space: nowrap;
}

.top-info-card__domains {
  margin: 0 0 15px 5px;
  color: #1a1a2e;
  font-weight: normal;
}

.top-info-card__warn {
  margin-bottom: 12px;
  color: #1a1a2e;
  font-weight: bold;
}

.top-info-card__fakes {
  margin-bottom: 0;
  color: #4a5568;
}

.top-info-card__fakes strong {
  font-weight: bold;
}

.top-info-card__fakes-list {
  color: var(--fake-red);
  word-spacing: 15px;
}

/* ---------- Сетка карточек статей ---------- */

.posts-grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr);
  gap: 25px;
  list-style: none;
  padding: 0 !important;
  margin: 0;
  width: 100%;
  font-size: clamp(14px, 0.875rem + ((1vw - 3.2px) * 0.195), 16px);
  font-style: normal;
  font-weight: 400;
  background: var(--color-base);
}

.post-card {
  margin-bottom: 0;
  padding: 16px;
  list-style: none;
  width: 100%;
  display: flex;
  flex-direction: column;
  height: auto;
  min-height: 240px;

  transform: perspective(1000px) translateZ(0) rotateX(2deg);
  transition: all 0.4s cubic-bezier(0.2, 0.9, 0.4, 1.1);

  box-shadow: 0 12px 25px -10px rgba(0, 0, 0, 0.12),
    0 0 12px -3px rgba(59, 130, 246, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);

  background: linear-gradient(145deg, #ffffff 0%, #fefefe 100%);
  border-radius: 16px;
  position: relative;

  animation: cardFadeIn 0.4s ease backwards;
}

.post-card:hover {
  transform: perspective(1000px) translateZ(12px) translateY(-4px) rotateX(0deg);
  box-shadow: 0 18px 30px -12px rgba(0, 0, 0, 0.18),
    0 0 18px 2px rgba(59, 130, 246, 0.3);
}

.post-card:nth-child(1) { animation-delay: 0.05s; }
.post-card:nth-child(2) { animation-delay: 0.1s; }
.post-card:nth-child(3) { animation-delay: 0.15s; }
.post-card:nth-child(4) { animation-delay: 0.2s; }
.post-card:nth-child(5) { animation-delay: 0.25s; }
.post-card:nth-child(6) { animation-delay: 0.3s; }
.post-card:nth-child(7) { animation-delay: 0.35s; }
.post-card:nth-child(8) { animation-delay: 0.4s; }

@keyframes cardFadeIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

.post-card__image {
  margin-bottom: 12px;
  border-radius: 12px;
  overflow: hidden;
  width: 100%;
}

.post-card__image img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  border-radius: 12px;
  transition: transform 0.4s ease;
}

.post-card__title {
  font-family: var(--font-system);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--card-title) !important;
  display: block;
  margin-bottom: 6px;
  line-height: 1.3;
  transition: color 0.3s ease;
}

.post-card__title:hover {
  color: var(--card-title-hover) !important;
}

.post-card__excerpt {
  font-family: var(--font-system);
  font-size: 0.85rem;
  line-height: 1.35;
  color: var(--color-contrast);
  margin: 6px 0;
}

/* Скрытая ссылка «Читать далее» — как на оригинале */
.post-card__excerpt a {
  display: none !important;
}

/* ---------- Блок «TripScan» (media-text) ---------- */

.promo {
  display: grid;
  grid-template-columns: 36% auto;
  padding-top: var(--spacing-50);
  padding-bottom: var(--spacing-50);
}

.promo__media {
  margin: 0;
}

.promo__media img {
  width: 100%;
  height: auto;
  vertical-align: middle;
}

.promo__content {
  padding: 0 var(--root-pad);
  direction: ltr;
  word-break: break-word;
  align-self: center;
}

.promo__title {
  font-family: var(--font-system);
  font-size: clamp(14px, 0.875rem + ((1vw - 3.2px) * 0.391), 18px);
  font-style: normal;
  font-weight: 600;
  margin-bottom: var(--spacing-30);
}

.promo__text {
  font-family: var(--font-system);
  font-weight: 400;
  margin-bottom: 0;
}

/* ---------- Внутренняя страница статьи ---------- */

.article-head {
  padding-top: var(--spacing-60);
}

.article-title {
  font-size: var(--fs-h1);
  margin-bottom: var(--spacing-40);
}

.article-featured {
  margin: 0 0 var(--spacing-50);
}

.article-featured img {
  width: 100%;
  border-radius: 24px;
  object-fit: cover;
}

.article-body {
  margin-top: var(--spacing-50);
  margin-bottom: var(--spacing-60);
}

.article-body h2 {
  margin-top: var(--spacing-50);
}

.article-body h3 {
  margin-top: var(--spacing-40);
}

.article-body a {
  color: var(--color-accent-1);
}

/* ---------- SEO-ключи в заголовках ---------- */

.seo-keys {
  display: block;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0.2px;
  color: #9aa4b2;
}

h1 .seo-keys {
  margin-top: 8px;
}

h2.seo-keys {
  margin-top: var(--spacing-50);
  margin-bottom: 0;
  padding-top: var(--spacing-30);
  border-top: 1px solid var(--color-base-3);
  font-size: 12px;
}

/* ---------- Подвал ---------- */

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

.site-footer__inner {
  max-width: var(--wide-size);
  margin: 0 auto;
  padding: 24px var(--spacing-70);
  border-top: 1px solid var(--color-base-3);
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
}

.site-footer__logo img {
  width: 96px;
  height: auto;
  filter: grayscale(1);
  opacity: 0.75;
}

.site-footer__gap {
  width: 40px;
  flex-shrink: 0;
}

.site-footer__copy {
  color: #b9b9b9;
  font-size: 12px;
  text-align: center;
  margin: 0;
}

.site-footer__spacer {
  flex-grow: 1;
}

.site-footer__links {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 20px;
}

.site-footer__links p {
  margin: 0;
}

.site-footer__links a,
.site-footer__link {
  color: var(--footer-link);
  font-size: 14px;
  text-decoration: underline;
  text-align: center;
}

/* ---------- Мобильные фиксированные кнопки ---------- */

.mobile-fixed-buttons {
  display: none;
}

/* ---------- Адаптив ---------- */

@media only screen and (max-width: 768px) {
  /* Кнопки в шапке прячем, показываем нижнюю панель */
  .site-header__actions {
    display: none !important;
  }

  .mobile-fixed-buttons {
    position: fixed;
    bottom: 15px;
    left: 15px;
    right: 15px;
    width: auto;
    display: flex;
    gap: 12px;
    justify-content: center;
    z-index: 9999999;
    background-color: #ffffff;
    border-radius: 20px;
    padding: 12px 16px;
    box-shadow: 0 -2px 15px rgba(0, 0, 0, 0.08),
      0 2px 10px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(0px);
  }

  body {
    padding-bottom: 80px;
  }

  .top-info-card {
    padding: 15px 18px !important;
    margin-bottom: 25px !important;
  }

  .top-info-card__body {
    font-size: 0.85rem !important;
  }

  .top-info-card__highlight {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  .posts-grid {
    gap: 18px;
  }

  .post-card {
    padding: 12px;
    min-height: 210px;
    transform: none !important;
  }

  .post-card:hover {
    transform: none !important;
  }

  .post-card__image img {
    height: 110px;
  }

  .post-card__title {
    font-size: 0.85rem;
  }
}

@media only screen and (min-width: 769px) {
  .mobile-fixed-buttons {
    display: none !important;
  }
}

@media only screen and (max-width: 600px) {
  .promo {
    grid-template-columns: 100%;
  }

  .promo__media {
    grid-column: 1;
    grid-row: 1;
  }

  .promo__content {
    grid-column: 1;
    grid-row: 2;
    padding-top: var(--spacing-40);
  }
}

@media only screen and (max-width: 550px) {
  .posts-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .post-card {
    min-height: auto;
    padding: 15px;
  }

  .post-card__image img {
    height: 160px;
  }

  .site-footer__inner {
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    padding: 20px var(--root-pad);
  }

  .site-footer__gap,
  .site-footer__spacer {
    display: none;
  }

  .site-footer__copy {
    width: 100%;
    order: 3;
  }
}
