html {
    scroll-behavior: smooth;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    color: #333;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

h1, h2, h3, h4, h5, h6 {
    font-family: inherit;
}

a {
    font-family: inherit;
    text-decoration: none;
    color: #007bff;
}

a:hover {
    color: #0056b3;
}

ul, li {
    font-family: inherit;
}

body {
    padding-left: 100px;
    padding-right: 100px;
}

.wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Основной контент */
main {
    flex: 1;
    width: 100%;
    overflow-x: hidden; /* Предотвращает горизонтальный скролл */
}

h1 {text-align: center; text-align: -moz-center; text-align: -webkit-center}
.title__home {font-size: 55px;background: linear-gradient(to bottom, #b1aa2b 50%, #ac990e 100%);-webkit-background-clip: text;-webkit-text-fill-color: transparent;background-clip: text;color: transparent;}

.description {
    padding: 20px;
    padding-top: 0px;
    line-height: 1.6;
    width: 100%;
    max-width: 1200px; /* Ограничиваем максимальную ширину */
    margin: 0 auto;
    position: relative;
    z-index: 2;
    box-sizing: border-box;
}

.description h2 {
    font-size: 1.8em;
    margin-bottom: 15px;
    color: #333;
}

.description h3 {
    font-size: 1.4em;
    margin-top: 20px;
    color: #555;
    text-align: center;
}

.description p {
    margin-bottom: 15px;
    color: #000;
}

.description ul {
    list-style: disc;
    padding-left: 20px;
    margin-top: 15px;
}

.description li {
    margin-bottom: 10px;
    color: #000;
}

.description ol {
    margin-top: 10px;
    padding-left: 20px;
    list-style: decimal;
}

.description strong {
    color: #333;
}

.description a {
    color: #007bff;
    text-decoration: none;
}

.description a:hover {
    text-decoration: underline;
}

.contacts {
    display: flex;
    grid-gap: 3em;
}

.contacts__content {
    flex-shrink: 0;
}

.contacts__list {
    display: flex;
    flex-direction: column;
    grid-gap: 1.4em;
}

.contact {
    display: flex;
    align-items: center;
    grid-gap: 1.2em;
    font-weight: 500;
}

.contact__ico {
    width: 1.6em;
}

.contact__ico img {
    position: relative;
    overflow: hidden;
    display: block;
    flex-shrink: 0;
}

.img:before {
    content: "";
    display: block;
    position: absolute;
    z-index: 2;
    inset: 0;
    opacity: 0;
}

.map-container {
    width: 100%;
    min-height: 23em;
    position: relative;
}

.map {
    position: absolute;
    inset: 0;
}

/* Карта */
.map-container script {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.advantages {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

/* Стиль для каждого пункта */
.advantage-item {
    text-align: center;
}

.description .advantages p:hover {
    text-decoration: none;
    color: #3fa80d;
}

.advantage-item p {
    font-weight: 600;
    color: #000;
    line-height: 5px;
    text-transform: uppercase;
    text-decoration: none;
}

.description a.btn {
    color: #fff;
}

.description a.btn {
    text-decoration: none;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    font-size: 16px;
    font-weight: bold;
    border-radius: 8px;
    background: #3fa80d;
    color: #fff;
    transition: all 0.3s ease;
}

.btn:hover {
    background: #5cec18;
    color: #fff;
    border-color: #0056b3;
}

.btn:active {
    transform: scale(0.98);
}

/* Общий стиль для иконок */
.icon {
    width: 128px;
    height: 128px;
    /*background-image: url('/images/home_icon.png');*/
    background-size: 256px 256px;
    margin: 0 auto;
}

/* Позиционирование каждого элемента в спрайте */
.delivery {
    background-position: -2px -2px;
}

.quality-control {
    background-position: -127px -2px;
}

.photos {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: wrap;
}

.certificates {
    background-position: -2px -127px;
}

.certificate__photo {
    flex: 1;
    max-width: 40%;
    box-sizing: border-box;
    text-align: center;
}

.certificate__photo h3, .packaging__photo h3 {
    margin-bottom: 10px;
}

.certificate__photo img, .packaging__photo img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
    border-radius: 6px;
    border: 2px solid #f0f0f0;
    transition: all 0.3s ease;
}

.certificate__photo a, .packaging__photo a {
    transition: transform 0.3s ease;
}

.certificate__photo a:hover, .packaging__photo a:hover {
    transform: scale(1.05);
}

.certificate__photo img:hover, .packaging__photo img:hover {
    border-color: #3fa80d;
    box-shadow: 0 5px 15px rgba(63, 168, 13, 0.2);
}

.explode__photo {
    flex: 1;
    box-sizing: border-box;
    text-align: center;
}

.explode__photo img {
    vertical-align: middle;
    width: 165px;
    height: 150px;
    object-fit: cover;
    display: inline-flex;
    margin-bottom: 10px;
}

.packaging {
    background-position: -127px -127px;
}

.packaging__photo {
    flex: 1;
    max-width: 70%;
    box-sizing: border-box;
    text-align: center;
}

.shipment-page {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    margin: 0 auto;
}

.shipment-page h1 {
    font-size: 24px;
    color: #222;
    margin-bottom: 20px;
    text-align: center;
}

.shipment-page h2 {
    font-size: 20px;
    color: #444;
    margin-top: 20px;
    margin-bottom: 10px;
}

.shipment-page p {
    margin-bottom: 15px;
    text-align: justify;
}

.shipment-page ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

.shipment-page ul ul {
    margin-left: 20px;
    margin-top: 10px;
    margin-bottom: 10px;
}

.shipment-page strong {
    color: #000;
    font-weight: bold;
}

.packaging-options {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin: 20px 0;
}

.packaging-text {
    flex: 1;
    font-family: Arial, sans-serif;
}

.packaging-image {
    flex: 0 0 300px;
}

.packaging-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.partners-page {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    margin: 0 auto;
}

.partners-page h1 {
    font-size: 24px;
    color: #222;
    margin-bottom: 20px;
    text-align: center;
}

.partners-page p {
    margin-bottom: 15px;
    text-align: justify;
}

.partners-page strong {
    color: #000;
    font-weight: bold;
}

.partners-page h2 {
    font-size: 20px;
    color: #444;
    text-align: center;
    margin-top: 20px;
}

.partners-page .signature {
    margin-top: 30px;
    font-style: italic;
    text-align: right;
    color: #555;
}

.partner-highlight {
    padding: 20px;
    text-align: center;
    background-color: #f9f9f9;
    margin: 20px 0;
}

.partner-logo {
    max-width: 150px;
    margin: 10px 0;
}

.partner-info p {
    font-size: 16px;
    color: #333;
}

/* Контейнер слайдера */
.slider-section {
    position: relative;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    z-index: 1;
}

/* Стили для слайдов */
.swiper {
    width: 100%;
    height: 600px;
}

.swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
}

.swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.annotation__block {
    display: flex;
    align-items: flex-start;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.text__block {
    flex: 1;
    min-width: 0;
}

.image__block {
    flex: 0 0 auto;
}

.image__block img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Медиа-запросы */
@media (max-width: 1440px) and (min-width: 1025px) {
    body {
        padding-left: 50px;
        padding-right: 50px;
    }

    .description {
        width: 90%;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    body {
        padding-left: 0;
        padding-right: 0;
    }

    main {
        padding-left: 30px;
        padding-right: 30px;
    }

    .title__home {
        font-size: 30px;
    }

    .description {
        width: 95%;
        padding: 15px;
    }

    .advantages {
        flex-wrap: wrap;
        gap: 20px;
    }

    .advantage-item {
        flex: 1 0 45%;
    }

    .annotation__block {
        gap: 20px;
    }

    .image__block img {
        max-width: 250px;
    }
}

@media (max-width: 768px) {
    body {
        width: 100%;
        padding-left: 0;
        padding-right: 0;
    }

    main {
        padding-left: 20px;
        padding-right: 20px;
    }
    .title__home {font-size: 25px}

    .description {
        width: 100%;
        padding: 15px 10px;
        box-sizing: border-box;
    }

    .map-container {
        padding-bottom: 75%;
    }

    .photos {
        flex-direction: column;
        gap: 25px;
    }

    .certificate__photo, .packaging__photo {
        max-width: 100%;
        width: 100%;
    }

    .certificate__photo h3, .packaging__photo h3 {
        font-size: 1.3em;
        margin-bottom: 15px;
    }

    .certificate__photo a, .packaging__photo a {
        margin: 8px;
        display: inline-block;
    }

    .certificate__photo img, .packaging__photo img {
        max-width: 150px;
        height: auto;
    }

    .annotation__block {
        flex-direction: column;
        gap: 20px;
        padding: 15px;
    }

    .image__block {
        order: -1;
        width: 100%;
        text-align: center;
    }

    .image__block img {
        max-width: 300px;
        margin: 0 auto;
    }

    .advantages {
        flex-direction: column;
        gap: 25px;
    }

    .advantage-item {
        width: 100%;
    }

    .advantage-item p {
        line-height: 1.4;
        margin: 10px 0;
    }

    .contacts {
        flex-direction: column;
        gap: 2em;
    }

    .btn {
        width: 100%;
        text-align: center;
        margin: 10px 0;
    }

    .swiper {
        height: 300px;
    }

}

@media (max-width: 768px) and (orientation: landscape) {
    .certificate__photo a, .packaging__photo a {
        margin: 6px;
    }

    .certificate__photo img, .packaging__photo img {
        max-width: 120px;
    }
}

@media (max-width: 480px) {
    body {
        padding-left: 0;
        padding-right: 0;
    }

    main {
        padding-left: 15px;
        padding-right: 15px;
    }

    .title__home {font-size: 25px}

    .description {
        padding: 10px 5px;
    }

    .description h2 {
        font-size: 1.5em;
    }

    .description h3 {
        font-size: 1.2em;
    }

    .icon {
        width: 96px;
        height: 96px;
        background-size: 192px 192px;
    }

    .delivery {
        background-position: -1px -1px;
    }

    .quality-control {
        background-position: -95px -1px;
    }

    .photos {
        gap: 20px;
    }

    .certificate__photo h3, .packaging__photo h3 {
        font-size: 1.2em;
        margin-bottom: 12px;
    }

    .certificate__photo a, .packaging__photo a {
        margin: 5px;
    }

    .certificate__photo img, .packaging__photo img {
        max-width: 130px;
    }
}

@media (hover: none) {
    .certificate__photo a:hover, .packaging__photo a:hover {
        transform: none;
    }

    .certificate__photo img:hover, .packaging__photo img:hover {
        box-shadow: none;
        border-color: #f0f0f0;
    }
}

/* Улучшения для touch-устройств */
@media (hover: none) and (pointer: coarse) {
    a, button, .btn {
        min-height: 44px;
        min-width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    a:hover, .btn:hover {
        background: #3fa80d;
        color: #fff;
    }
}

/* Предотвращение масштабирования при фокусе на полях ввода на iOS */
@media (max-width: 768px) {
    input, select, textarea {
        font-size: 16px !important;
    }
}

/* Улучшение читаемости на маленьких экранах */
@media (max-width: 768px) {
    body {
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }

    p, li, td {
        font-size: 16px;
        line-height: 1.5;
    }
}

/* ===== Anti-overflow & mobile fixes (added) ===== */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}

/* Наследуем box-sizing, чтобы внезапные width не вылезали */
*, *::before, *::after { box-sizing: inherit; }

/* Секция со слайдером растягивалась на 100vw и выезжала из контейнера */
@media (max-width: 768px) {
  .slider-section {
    width: 100%;
    margin-left: 0;
  }
}

/* Жёсткая ширина картинки упаковки могла выталкивать */
@media (max-width: 768px) {
  .packaging-image {
    flex: 1 1 100%;
    max-width: 100%;
  }
}

/* На очень узких — перенос слов и защита от горизонтального скролла */
@media (max-width: 480px) {
  body, main, .description {
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}
