/*
 * ЛОГАЗ-АВТО — страницы новостей.
 * Подключается только в blogger_blogs.twig и blogger.twig.
 */

.gbo-news-page {
  --news-blue: var(--gbo-blue, #175fae);
  --news-blue-dark: var(--gbo-blue-deep, #0b2e55);
  --news-green: var(--gbo-green, #2daa61);
  --news-green-dark: var(--gbo-green-dark, #22864a);
  --news-ink: var(--gbo-ink, #152638);
  --news-text: var(--gbo-text, #34495e);
  --news-muted: var(--gbo-muted, #718096);
  --news-bg: var(--gbo-bg, #f4f7fa);
  --news-border: var(--gbo-border, #dfe7ef);
  --news-radius: var(--gbo-radius, 16px);
  --news-radius-lg: var(--gbo-radius-lg, 22px);
  --news-shadow-sm: var(--gbo-shadow-sm, 0 10px 30px rgba(13, 46, 78, .08));
  --news-shadow: var(--gbo-shadow, 0 18px 48px rgba(13, 46, 78, .14));
}

.gbo-news-layout {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
}

.gbo-news-main {
  min-width: 0;
}

.gbo-news-main > :first-child {
  margin-top: 0;
}

.gbo-news-page__header,
.gbo-news-article__header {
  margin-bottom: 28px;
}

.gbo-news-page__eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 9px;
  color: var(--news-green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .1em;
  line-height: 1.2;
  text-transform: uppercase;
}

.gbo-news-page__eyebrow::before {
  width: 26px;
  height: 3px;
  margin-right: 9px;
  background: currentColor;
  border-radius: 20px;
  content: "";
}

.gbo-news-page__header h1,
.gbo-news-article__header h1 {
  max-width: 980px;
  margin: 0;
  color: var(--news-ink);
  font-size: clamp(30px, 4vw, 36px);
  font-weight: 850;
  line-height: 1.08;
}

.gbo-news-page__header > p {
  max-width: 720px;
  margin: 15px 0 0;
  color: var(--news-muted);
  font-size: 15px;
  line-height: 1.7;
}

.gbo-news-list__group + .gbo-news-list__group {
  margin-top: 38px;
}

.gbo-news-list__group-title {
  margin: 0 0 18px;
  color: var(--news-ink);
  font-size: 24px;
  font-weight: 800;
  line-height: 1.25;
}

.gbo-news-list__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.gbo-news-card {
  display: flex;
  min-width: 0;
  overflow: hidden;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--news-border);
  border-radius: var(--news-radius-lg);
  box-shadow: var(--news-shadow-sm);
  transition: border-color .22s ease, box-shadow .22s ease, transform .22s ease;
}

.gbo-news-card[hidden] {
  display: none !important;
}

@media (hover: hover) and (pointer: fine) {
  .gbo-news-card:hover {
    border-color: rgba(23, 95, 174, .28);
    box-shadow: var(--news-shadow);
    transform: translateY(-5px);
  }
}

.gbo-news-card__image {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #eaf0f6;
}

.gbo-news-card__image::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 35%;
  pointer-events: none;
  background: linear-gradient(to top, rgba(4, 27, 50, .18), transparent);
  content: "";
}

.gbo-news-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}

@media (hover: hover) and (pointer: fine) {
  .gbo-news-card:hover .gbo-news-card__image img {
    transform: scale(1.045);
  }
}

.gbo-news-card__body {
  display: flex;
  padding: 22px;
  flex: 1;
  flex-direction: column;
}

.gbo-news-card__meta,
.gbo-news-article__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  color: var(--news-muted);
  gap: 12px;
  font-size: 12px;
  font-weight: 700;
}

.gbo-news-card__date,
.gbo-news-article__meta > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.gbo-news-card__date .fa,
.gbo-news-article__meta .fa {
  color: var(--news-green);
}

.gbo-news-card__title {
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: 820;
    line-height: 1.35;
}

.gbo-news-card__title a {
  display: -webkit-box;
  overflow: hidden;
  color: var(--news-ink);
  text-decoration: none;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.gbo-news-card__title a:hover,
.gbo-news-card__title a:focus-visible {
  color: var(--news-blue);
}

.gbo-news-card__excerpt {
  display: -webkit-box;
  margin: 13px 0 20px;
  overflow: hidden;
  color: var(--news-muted);
  font-size: 14px;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.gbo-news-card__more {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  margin-top: auto;
  color: var(--news-blue);
  gap: 9px;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.gbo-news-card__more .fa {
  transition: transform .2s ease;
}

.gbo-news-card__more:hover,
.gbo-news-card__more:focus-visible {
  color: var(--news-green-dark);
}

.gbo-news-card__more:hover .fa,
.gbo-news-card__more:focus-visible .fa {
  transform: translateX(4px);
}

.gbo-news-empty {
  display: flex;
  min-height: 260px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 35px;
  text-align: center;
  background: #fff;
  border: 1px solid var(--news-border);
  border-radius: var(--news-radius-lg);
  box-shadow: var(--news-shadow-sm);
}

.gbo-news-empty--compact {
  min-height: 150px;
}

.gbo-news-empty > .fa {
  margin-bottom: 15px;
  color: var(--news-blue);
  font-size: 36px;
}

.gbo-news-empty h2,
.gbo-news-empty p {
  margin: 0;
}

.gbo-news-empty p {
  margin-top: 8px;
  color: var(--news-muted);
}

/* Пагинация */
.gbo-news-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 30px;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid var(--news-border);
  border-radius: var(--news-radius);
  box-shadow: var(--news-shadow-sm);
  gap: 18px;
}

.gbo-news-pagination[hidden] {
  display: none !important;
}

.gbo-news-pagination__status {
  margin: 0;
  color: var(--news-muted);
  font-size: 13px;
}

.gbo-news-pagination__nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 7px;
}

.gbo-news-pagination__button,
.gbo-news-pagination__ellipsis {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--news-ink);
  background: #fff;
  border: 1px solid var(--news-border);
  border-radius: 11px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}

.gbo-news-pagination__button {
  cursor: pointer;
  transition: .18s ease;
}

.gbo-news-pagination__button:hover,
.gbo-news-pagination__button:focus-visible {
  color: var(--news-blue);
  background: #f4f8fc;
  border-color: rgba(23, 95, 174, .35);
  outline: none;
}

.gbo-news-pagination__button.is-active {
  color: #fff;
  background: var(--news-blue);
  border-color: var(--news-blue);
  box-shadow: 0 8px 20px rgba(23, 95, 174, .2);
}

.gbo-news-pagination__button:disabled {
  cursor: not-allowed;
  opacity: .42;
}

.gbo-news-pagination__ellipsis {
  border-color: transparent;
}

/* Внутренняя страница */
.gbo-news-article,
.gbo-news-comments,
.gbo-news-comment-form {
  padding: clamp(22px, 4vw, 42px);
  background: #fff;
  border: 1px solid var(--news-border);
  border-radius: var(--news-radius-lg);
  box-shadow: var(--news-shadow-sm);
}

.gbo-news-article__header {
  max-width: 900px;
}

.gbo-news-article__meta {
  margin-top: 15px;
}

.gbo-news-article__image-link {
  position: relative;
  display: block;
  max-width: 100%;
  margin: 0 0 32px;
  overflow: hidden;
  background: #eaf0f6;
  border-radius: var(--news-radius);
}

.gbo-news-article__image {
  display: block;
  width: 100%;
  max-height: 620px;
  object-fit: cover;
  transition: transform .35s ease;
}

.gbo-news-article__zoom {
  position: absolute;
  right: 18px;
  bottom: 18px;
  display: inline-flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(9, 42, 79, .84);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 14px;
  backdrop-filter: blur(8px);
  transition: .2s ease;
}

@media (hover: hover) and (pointer: fine) {
  .gbo-news-article__image-link:hover .gbo-news-article__image {
    transform: scale(1.015);
  }

  .gbo-news-article__image-link:hover .gbo-news-article__zoom {
    background: var(--news-green);
    transform: translateY(-3px);
  }
}

.gbo-news-article__content {
  color: var(--news-text);
  font-size: 16px;
  line-height: 1.78;
}

.gbo-news-article__content::after {
  display: block;
  clear: both;
  content: "";
}

.gbo-news-article__content > :first-child {
  margin-top: 0;
}

.gbo-news-article__content > :last-child {
  margin-bottom: 0;
}

.gbo-news-article__content h2,
.gbo-news-article__content h3,
.gbo-news-article__content h4 {
  color: var(--news-ink);
  font-weight: 820;
  letter-spacing: -.018em;
  line-height: 1.25;
}

.gbo-news-article__content h2 {
  margin: 38px 0 17px;
  font-size: 29px;
}

.gbo-news-article__content h3 {
  margin: 30px 0 14px;
  font-size: 23px;
}

.gbo-news-article__content h4 {
  margin: 25px 0 12px;
  font-size: 19px;
}

.gbo-news-article__content p,
.gbo-news-article__content ul,
.gbo-news-article__content ol,
.gbo-news-article__content table,
.gbo-news-article__content blockquote {
  margin-top: 0;
  margin-bottom: 20px;
}

.gbo-news-article__content ul,
.gbo-news-article__content ol {
  padding-left: 24px;
}

.gbo-news-article__content li + li {
  margin-top: 8px;
}

.gbo-news-article__content a {
  color: var(--news-blue);
  font-weight: 650;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.gbo-news-article__content img {
  max-width: 100%;
  height: auto !important;
  margin: 10px 0 24px;
  border-radius: var(--news-radius);
  cursor: zoom-in;
}

.gbo-news-article__content blockquote {
  padding: 20px 22px;
  color: var(--news-ink);
  background: #f3f8fc;
  border: 0;
  border-left: 4px solid var(--news-green);
  border-radius: 0 var(--news-radius) var(--news-radius) 0;
  font-size: 17px;
  font-weight: 650;
}

.gbo-news-article__content table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  -webkit-overflow-scrolling: touch;
}

.gbo-news-article__content th,
.gbo-news-article__content td {
  min-width: 130px;
  padding: 12px 14px;
  border: 1px solid var(--news-border);
  text-align: left;
}

.gbo-news-article__content th {
  color: var(--news-ink);
  background: var(--news-bg);
  font-weight: 800;
}

/* Комментарии */
.gbo-news-comments,
.gbo-news-comment-form,
.gbo-news-alert {
  margin-top: 24px;
}

.gbo-news-comments__heading {
  margin-bottom: 20px;
}

.gbo-news-comments__heading h2 {
  margin: 0;
  color: var(--news-ink);
  font-size: 27px;
  font-weight: 830;
  letter-spacing: -.02em;
}

.gbo-news-comments__list {
  display: grid;
  gap: 13px;
}

.gbo-news-comment {
  padding: 18px 20px;
  background: #f7f9fb;
  border: 1px solid var(--news-border);
  border-radius: var(--news-radius);
}

.gbo-news-comment__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  color: var(--news-ink);
  gap: 15px;
}

.gbo-news-comment__header time {
  color: var(--news-muted);
  font-size: 12px;
}

.gbo-news-comment__text {
  color: var(--news-text);
  line-height: 1.65;
}

.gbo-news-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.gbo-news-form .form-group {
  margin-bottom: 17px;
}

.gbo-news-form label {
  display: block;
  margin-bottom: 7px;
  color: var(--news-ink);
  font-size: 13px;
  font-weight: 750;
}

.gbo-news-form .form-control {
  width: 100%;
  height: 48px;
  padding: 0 15px;
  color: var(--news-text);
  background: #fff;
  border: 1px solid var(--news-border);
  border-radius: 12px;
  box-shadow: none;
  outline: none;
  transition: .18s ease;
}

.gbo-news-form textarea.form-control {
  height: auto;
  min-height: 145px;
  padding-top: 13px;
  padding-bottom: 13px;
  resize: vertical;
}

.gbo-news-form .form-control:focus {
  border-color: var(--news-blue);
  box-shadow: 0 0 0 4px rgba(23, 95, 174, .1);
}

.gbo-news-form__actions {
  display: flex;
  justify-content: flex-end;
}

.gbo-news-form__actions .btn {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  color: #fff;
  background: var(--news-green);
  border: 0;
  border-radius: 12px;
  gap: 9px;
  font-size: 13px;
  font-weight: 800;
}

.gbo-news-form__actions .btn:hover,
.gbo-news-form__actions .btn:focus-visible {
  color: #fff;
  background: var(--news-green-dark);
}

.gbo-news-alert {
  display: flex;
  align-items: center;
  padding: 15px 18px;
  gap: 10px;
  border-radius: var(--news-radius);
}

@media (max-width: 1199px) {
  .gbo-news-list__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .gbo-news-page__header,
  .gbo-news-article__header {
    margin-bottom: 21px;
  }

  .gbo-news-page__header h1,
  .gbo-news-article__header h1 {
    font-size: 29px;
  }

  .gbo-news-list__grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .gbo-news-card {
    border-radius: 17px;
  }

  .gbo-news-card__body {
    padding: 18px;
  }

  .gbo-news-card__title {
    font-size: 18px;
  }

  .gbo-news-pagination {
    align-items: flex-start;
    flex-direction: column;
    padding: 15px;
  }

  .gbo-news-pagination__nav {
    width: 100%;
    justify-content: flex-start;
  }

  .gbo-news-pagination__button,
  .gbo-news-pagination__ellipsis {
    width: 39px;
    height: 39px;
  }

  .gbo-news-article,
  .gbo-news-comments,
  .gbo-news-comment-form {
    padding: 19px;
    border-radius: 17px;
  }

  .gbo-news-article__image-link {
    margin-bottom: 23px;
    border-radius: 13px;
  }

  .gbo-news-article__zoom {
    right: 11px;
    bottom: 11px;
    width: 42px;
    height: 42px;
    border-radius: 11px;
  }

  .gbo-news-article__content {
    font-size: 15px;
    line-height: 1.72;
  }

  .gbo-news-article__content h2 {
    margin-top: 31px;
    font-size: 24px;
  }

  .gbo-news-article__content h3 {
    font-size: 20px;
  }

  .gbo-news-form__grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .gbo-news-form__actions .btn {
    width: 100%;
  }

  .gbo-news-comment__header {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gbo-news-card,
  .gbo-news-card__image img,
  .gbo-news-card__more .fa,
  .gbo-news-article__image,
  .gbo-news-article__zoom {
    transition: none !important;
  }
}
