/* Переваги - начало */
.advantages {
  background: #FAFAFA;
  border-radius: 16px;
  border-left: 5px solid #E30613;
  padding-left: 25px;
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  padding: 20px 35px;
  border-radius: 8px;
  max-width: 600px;
  min-width: 400px;
  transition: transform 0.5s ease-in-out;
}

.advantages:hover {
  transform: rotate(2deg);
}

.advantages div {
  margin-top: 15px;
  font-size: 20px;
}

.container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  padding: 12px 20px;
  /* Клиппинг переполнения, создаваемого поворотом .advantages:hover,
     чтобы при наведении не появлялся скроллинг */
  overflow: hidden;
}

/* Переваги - конец */

/* Переваги - адаптив: в один столбик на экранах < 1180px или тач */
@media screen and (max-width: 1180px),
screen and (pointer: coarse) {
  .container {
    flex-direction: column;
    align-items: stretch;
  }

  .advantages {
    max-width: 100%;
    min-width: 0;
    width: 100%;
  }
}

/* Послуги/допомога - начало */
.list-title {
  color: #d93b3f;
}

.list-block {
  background: #FAFAFA;
  border-radius: 16px;
  border-left: 5px solid #E30613;
  padding: 1.25rem 2.2rem 1.25rem 1.8rem;
  width: 95%;
  margin: 1.25rem auto;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  font-size: clamp(1.1rem, 0.95rem + 0.5vw, 1.4rem);
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  gap: 1rem;
}

.details {
  text-decoration: none;
  background-color: #dddddd;
  border: none;
  border-radius: 5px;
  color: black;
  padding: 0.75rem 2rem;
  text-align: center;
  font-size: clamp(0.9rem, 0.8rem + 0.3vw, 1rem);
  transition: 0.3s;
  width: auto;
  margin-left: auto;
  white-space: nowrap;
}

.details:hover {
  transform: scale(1.05);
  background-color: #d93b3f;
  color: white;
}

.date {
  font-weight: bold;
  font-size: clamp(0.9rem, 0.8rem + 0.25vw, 1rem);
  margin-right: 1.25rem;
}

.short-text {
  font-size: clamp(0.85rem, 0.8rem + 0.2vw, 0.95rem);
  margin-top: 0.6rem;
}

@media (max-width: 768px) {
  .list-block {
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem 1.25rem;
    gap: 0.5rem;
  }

  .details {
    margin-left: 0;
    margin-top: 0.75rem;
    align-self: flex-start;
    padding-inline: 1.5rem;
  }

  .date {
    margin-right: 0;
  }
}

/* Послуги/допомога  - конец */

/* Пагинатор - начало */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.pagination a,
.pagination span {
  user-select: none;
  border-radius: 3px;
  text-shadow:
    -1px -1px 0 #e2e2e2,
    1px -1px 0 #e2e2e2,
    -1px 1px 0 #e2e2e2,
    1px 1px 0 #e2e2e2;
  font-family: "lato";
  color: black;
  float: left;
  padding: 8px 16px;
  text-decoration: none;
  transition: background-color .3s;
}

.pagination a.active {
  text-shadow: none;
  background: rgba(255, 239, 0, 0.5);
}

.pagination a:hover:not(.active) {
  text-shadow: none;
  background-color: #dddddd;
}

/* Пагинатор - конец */

/* Пагинатор стрелки - начало */
.pagination-arrow {
  user-select: none;
  border-radius: 3px;
  text-shadow:
    -1px -1px 0 #e2e2e2,
    1px -1px 0 #e2e2e2,
    -1px 1px 0 #e2e2e2,
    1px 1px 0 #e2e2e2;
  font-family: "lato";
  color: black;
  float: left;
  padding: 8px 16px;
  text-decoration: none;
  transition: background-color .3s;
  font-size: 1.1rem;
  line-height: 1;
  font-weight: 700;
}

.pagination-arrow:hover:not(.pagination-disabled) {
  text-shadow: none;
  background-color: #dddddd;
}

.pagination-disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.pagination-ellipsis {
  user-select: none;
  float: left;
  padding: 8px 12px;
  color: #666;
  font-family: "lato";
}
/* Пагинатор стрелки - конец */

/* Контент - начало */
main {
  display: flex;
  flex-direction: column;
  max-width: 1200px;
  margin: 0 auto;
  margin-top: 137px;
  /* padding-bottom: 50px; */
}

.speedtest {
  margin: 0 auto 2rem auto;
  text-align: center;
  width: 100%;
  padding: 0 1rem;
}

.speedtest a {
  display: inline-block;
  font-family: "lato";
  text-decoration: none;
  background: rgba(255, 239, 0, 0.5);
  border: none;
  border-radius: 0.5rem;
  color: black;
  padding: 0.8rem 1.5rem;
  text-align: center;
  font-size: clamp(0.9rem, 4.5vw, 1.15rem);
  transition: 0.3s;
  width: auto;
  min-width: 250px;
  max-width: 100%;
  white-space: nowrap;
}

.speedtest a:hover {
  background: rgba(217, 59, 63, 0.5);
  color: white;
}

/* Слайдер для баннера - начало */
.slider-container {
  position: relative;
  overflow: hidden;
  padding: 20px 0;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  /* background: rgba(255, 255, 255, 0.3); */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  /* border: 1px solid rgba(255, 255, 255, 0.3); */
}

.slider-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
  width: 100%;
}

.banner {
  min-width: 33.333%;
  box-sizing: border-box;
  padding: 0 10px;
}

/* Тарифы - адаптив: свайп вместо "вертушки" */
@media screen and (max-width: 1180px),
screen and (pointer: coarse) {
  .carousel {
    min-width: 100%;
  }
}

@media screen and (max-width: 600px) {
  .banner {
    min-width: 100%;
  }
}

@media screen and (min-width: 601px) and (max-width: 1180px) {
  .banner {
    min-width: 50%;
  }
}

@media screen and (max-width: 1180px),
screen and (pointer: coarse) {
  main {
    margin-top: 90px;
  }
}

/* Ссылка на товар */
.product-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.product-card img {
  width: 100%;
  height: 200px;
  object-fit: contain;
  display: block;
  padding-top: 15px;
}

.product-info {
  padding: 15px;
  text-align: center;
}

.product-title {
  font-size: 14px;
  margin: 0 0 10px;
  font-weight: 600;
}

.product-price {
  color: #e74c3c;
  font-weight: bold;
}

.prev {
  left: 10px;
}

.next {
  right: 10px;
}

.post {
  line-height: 30px;
  width: 95%;
  margin: 0 auto;
  padding: 20px;
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.post-price-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 90%;
  box-sizing: border-box;
  min-width: 0;
  margin: 0 auto;
}

.post-price {
  font-size: 1.5em;
  font-weight: bold;
  color: #d93b3f;
  flex-shrink: 0;
  text-align: right;
  min-width: 0;
}

.post-price-row > i {
  flex-shrink: 1;
  min-width: 0;
}

@media (max-width: 768px) {
  .post-price-row {
    flex-direction: column;
    align-items: center;
  }
  
  .post-price {
    text-align: center;
  }
}

.post li {
  margin-left: 30px;
}

.post i {
  display: block;
  color: #555555;
  font-size: 14px;
  /* margin: 0 auto; */
  /* max-width: 90%; */
}

.post-separator {
  margin: 1rem auto;
  border: 0;
  height: 1px;
  width: 100%;
  background-image: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(227, 6, 19, 0.4), rgba(0, 0, 0, 0));
}

/* Картинки в контенте постов (SunEditor) - начало */
/* На десктопе размер задаётся inline-стилями из редактора (width/height),
   они НЕ перебиваются этим правилом, т.к. медиа-запрос только для мобильных. */
.post .se-image-container,
.post .se-image-container figure {
  max-width: 100%;
}

/* Только картинки внутри se-image-container (SunEditor), не затрагиваем галерею товаров */
.post .se-image-container img {
  max-width: 100%;
  height: auto;
}

/* На мобильных картинки всегда на всю ширину контента,
   игнорируя настройки размера из редактора. */
@media screen and (max-width: 768px) {
  .post .se-image-container,
  .post .se-image-container figure {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .post .se-image-container img {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
  }
}
/* Картинки в контенте постов (SunEditor) - конец */