/* =============================================
   SUBSCRIBE SECTION — Блок подписки на главной
   ============================================= */

.subscribe-section {
    position: relative;
    width: 100%;
    margin: 160px 0 60px 0;
}

.subscribe-section__inner {
    position: relative;
    display: flex;
    align-items: flex-start;
    min-height: 543px;
    gap: 40px;
    max-width: 1540px;
    margin: 0 auto;
}

.subscribe-section__checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}

/* ---- Левая часть: картинки ---- */
.subscribe-section__images {
    position: relative;
    flex: 0 0 800px;
    max-width: 800px;
    min-height: 543px;
    order: 1;
}

/* Фон пергамент — прижат к левому краю */
.subscribe-section__images::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 775px;
    aspect-ratio: 211 / 134;
    background: url('/local/templates/my/images/background/plash.jpg') center / contain no-repeat;
    z-index: 0;
}

/* Внутренний контейнер для картинок */
.subscribe-section__images-inner {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 775px;
    height: 543px;
}

/* Мышь */
.subscribe-section__mouse {
    position: absolute;
    top: -13px;
    right: 30px;
    width: 380px;
    max-width: 380px;
    height: auto;
    aspect-ratio: 125 / 157;
    max-height: 461px;
    object-fit: contain;
    z-index: 2;
}

/* Пингвин */
.subscribe-section__pinguin {
    position: absolute;
    bottom: -29px;
    left: 94px;
    width: 291px;
    max-width: 291px;
    height: auto;
    aspect-ratio: 47 / 68;
    max-height: 389px;
    object-fit: contain;
    z-index: 1;
}

/* ---- Правая часть: форма ---- */
.subscribe-section__right {
    flex: 1;
    min-width: 0;
    order: 2;
    margin-top: 70px;
}

.subscribe-section__form-content {
    max-width: 680px;
}

.subscribe-section__title {
    font-family: "PT Astra Serif", serif;
    font-size: 40px;
    font-style: italic;
    font-weight: 700;
    line-height: 1.2;
    color: #005C67;
    margin: 0 0 20px 0;
}

.subscribe-section__text {
    font-family: "tt-commons-pro", sans-serif;
    font-size: 20px;
    font-weight: 300;
    font-style: normal;
    line-height: 25.6px;
    color: #222322;
    margin: 0 0 25px 0;
}

/* ---- Форма ---- */
.subscribe-section__form {
    display: flex;
    flex-direction: column;
}

/* Инпут обёртка - нормальное состояние */
.subscribe-section__input-wrap {
    align-items: center;
    align-self: stretch;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid #000;
    border-radius: 4px;
    display: flex;
    margin-bottom: 8px;
    transition: border-color 0.2s ease;
}

/* Ховер на инпут */
.subscribe-section__input-wrap:hover {
    border: 1px solid #005c67;
}

/* Фокус внутри инпута */
.subscribe-section__input-wrap:focus-within {
    border: 1px solid #005c67;
}

/* Состояние ошибки */
.subscribe-section__input-wrap.has-error {
    border: 1px solid #e61734;
    margin-bottom: 8px;
}

/* Ховер при ошибке - остается красным */
.subscribe-section__input-wrap.has-error:hover,
.subscribe-section__input-wrap.has-error:focus-within {
    border-color: #e61734;
}

/* Инпут email */
.subscribe-section__input {
    background: none;
    border: none;
    color: #222322;
    flex: 1 0 0;
    font-family: 'tt-commons-pro', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1;
    outline: none;
    padding: 17px;
    width: 100%;
}

/* Плейсхолдер */
.subscribe-section__input::placeholder {
    color: rgba(34, 35, 34, 0.8);
    font-family: 'tt-commons-pro', sans-serif;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    opacity: 0.5;
}

/* Плейсхолдер исчезает при фокусе */
.subscribe-section__input:focus::placeholder {
    opacity: 0;
}

/* Кнопка - нормальное состояние */
.subscribe-section__btn {
    display: inline-flex;
    text-transform: uppercase;
    min-width: 175px;
    width: fit-content;
    padding: 16px 24px;
    justify-content: center;
    align-items: center;
    border: 1px solid #005C67;
    /* margin-top: 16px; - УБРАТЬ */
    background: #005C67;
    color: #fff;
    border-radius: 4px;
    font-family: "tt-commons-pro", sans-serif;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    line-height: 12.6px;
    letter-spacing: 1.12px;
    transition: background 0.2s ease;
}


.subscribe-section__btn:hover  {
    background: none;
    border-radius: 4px;
    border: 1px solid #005C67;
        color: #005C67;
}


.subscribe-section__btn:active {
    background: #F6881B;;
    border-radius: 4px;
    border: 1px solid #F6881B;;
        color: #fff;
}

/* Кнопка - disabled состояние (опционально) */
.subscribe-section__btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Чекбокс обёртка */
.subscribe-section__checkbox-wrap {
    align-items: flex-start;
    display: flex;
    gap: 12px;

}

.subscribe-section__bottom-row {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-top: 35px;
}

/* Чекбокс - нормальное состояние */
.subscribe-section__checkbox {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: transparent;
    border: 1px solid #000;
    border-radius: 4px;
    cursor: pointer;
    height: 20px;
    width: 20px;
    min-width: 20px;
    flex-shrink: 0;
    margin-top: 3px;
    transition: border-color 0.2s ease;
}

/* Чекбокс - ховер (только при прямом наведении) */
.subscribe-section__checkbox:hover {
    border-color: #005c67;
}

/* Чекбокс - checked состояние */
.subscribe-section__checkbox:checked {
    background-image: url('/local/templates/my/images/icons/mynaui_check-solid.svg');
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    border-color: #000;
}

/* Чекбокс - состояние ошибки */
.subscribe-section__checkbox.has-error {
    border: 1px solid #e61734;
}

/* Чекбокс - ховер при ошибке остается красным */
.subscribe-section__checkbox.has-error:hover {
    border-color: #e61734;
}

/* Текст чекбокса */
.subscribe-section__checkbox-text {
    color: #374151;;
    font-family: 'tt-commons-pro', sans-serif;
    font-size: 16px;
    font-weight: 300;
    line-height: 26px;
    cursor: default;
    user-select: none;
    pointer-events: none;
}

/* Ссылка внутри текста чекбокса */
.subscribe-section__checkbox-text a {
    color: inherit;
    text-decoration: underline;
    cursor: pointer;
    pointer-events: auto;
}

.subscribe-section__link{
	color: inherit;
	text-decoration: underline;
    font-weight: 600;
}

.subscribe-section__link:hover{
text-decoration: underline;
    color: #005C67;
}

.subscribe-section__link:active{
text-decoration: none;
    color: #005C67;
}



/* Ошибки - скрытое состояние */
.subscribe-section__error {
  align-items: flex-start;
  align-self: stretch;
  backdrop-filter: blur(2px);
  background: rgba(255, 255, 255, 0.85);
  border-radius: 4px;
  color: #e61734;
  display: flex;
  flex-direction: column;
  font-family: 'tt-commons-pro', sans-serif;
  font-size: 14px;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
  margin-bottom: 4px;
  margin-top: 4px;
  opacity: 0.5;
  padding: 6px 10px;
}

.subscribe-section__error[hidden] {
    display: none;
}

/* Успешная подписка */
.subscribe-section__success {
    font-family: 'tt-commons-pro', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #2e7d32;
    padding: 12px;
    background: rgba(46, 125, 50, 0.1);
    border-radius: 4px;
    margin-top: 16px;
}

.subscribe-section__success[hidden] {
    display: none;
}


/* ===== Fancybox кастомизация ===== */
.fancybox__container {
    --fancybox-bg: rgba(0, 0, 0, 0.5);
}

.fancybox__content {
    padding: 0 !important;
    background: transparent !important;
    border-radius: 0 !important;
    max-width: 96% !important;
}

.fancybox__content > .f-html {
    padding: 0 !important;
    background: transparent !important;
}

/* ===== Popup Success ===== */
.popup-success {
    width: 834px;
    max-width: 90vw;
    min-height: 376px;
    background: #005C67 !important;
    border-radius: 4px !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 40px 40px 40px !important;
    box-sizing: border-box;
    position: relative;
    opacity: 1;
}

.popup-success__title {
    max-width: 511px;
    color: #FFF;
    text-align: center;
    font-family: "PT Astra Serif", serif;
    font-size: 28px;
    font-style: italic;
    font-weight: 500;
    line-height: 120%;
    margin: 0 0 30px 0;
}

.popup-success__image {
    width: 351px;
    max-width: 100%;
    height: 217px;
    object-fit: contain;
}

/* Крестик внутри попапа */
.popup-success .f-button.is-close-btn,
.popup-success button[data-fancybox-close] {
    position: absolute !important;
    top: 40px !important;
    right: 40px !important;
    width: 28px;
    height: 28px;
    background: transparent !important;
    border: none;
    cursor: pointer;
    transition: transform 0.15s ease;
    padding: 0;
    opacity: 1;
}

.popup-success .f-button.is-close-btn:hover,
.popup-success button[data-fancybox-close]:hover {
    transform: scale(1.43);
}

.popup-success .f-button.is-close-btn svg,
.popup-success button[data-fancybox-close] svg {
    width: 28px;
    height: 28px;
}

.popup-success .f-button.is-close-btn svg path,
.popup-success button[data-fancybox-close] svg path {
    stroke: #fff;
    stroke-width: 2;
    stroke-linecap: round;
}



/* =============================================
   RESPONSIVE
   ============================================= */

/* ===== 1540px — добавляем паддинги ===== */
@media (max-width: 1540px) {
    .subscribe-section__inner {
        padding: 0 40px;
    }
}

/* ===== 1400px ===== */
@media (max-width: 1400px) {
    .subscribe-section__images {
        flex: 0 0 650px;
        max-width: 650px;
    }
    
    .subscribe-section__images::before {
        width: 600px;
    }
    
    .subscribe-section__images-inner {
        width: 600px;
    }
    
    .subscribe-section__mouse {
        width: 300px;
        max-width: 300px;
        right: -30px;
    }
    
    .subscribe-section__pinguin {
        width: 220px;
        max-width: 220px;
        left: 40px;
    }
}

/* ===== 1200px ===== */
@media (max-width: 1200px) {
    .subscribe-section__inner {
        gap: 30px;
        padding: 0 40px;
    }
    
    .subscribe-section__images {
        flex: 0 0 500px;
        max-width: 500px;
        min-height: 420px;
    }
    
    .subscribe-section__images::before {
        width: 460px;
    }
    
    .subscribe-section__images-inner {
        width: 460px;
        height: 420px;
    }
    
    .subscribe-section__mouse {
        width: 260px;
        max-width: 260px;
        right: -20px;
    }
    
    .subscribe-section__pinguin {
        width: 180px;
        max-width: 180px;
        left: 30px;
    }
    
    .subscribe-section__title {
        font-size: 40px;
    }
    
    .subscribe-section__text {
        font-size: 20px;
    }
}

/* ===== 1400px — 2 карточки ===== */
@media (max-width: 1400px) {
   .subscribe-section {
        margin: 190px 0 40px 0;
    }
}


/* ===== 1024px — планшет, вертикальный layout ===== */
@media (max-width: 1024px) {
     .popup-success {
        padding: 40px 30px 30px 30px !important;
    }


        .popup-success .f-button.is-close-btn,
    .popup-success button[data-fancybox-close] {
        top: 12px !important;
        right: 12px !important;
    }
    
    .subscribe-section__inner {
        flex-direction: column;
        min-height: auto;
        gap: 30px;
        padding: 0 40px;
    }
    
    .subscribe-section__images {
        flex: none;
        width: 100%;
        max-width: 100%;
        min-height: auto;
        order: 1;
        position: relative;
    }
    
    .subscribe-section__images::before {
        width: 100%;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .subscribe-section__images-inner {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        width: 100%;
        height: auto;
        aspect-ratio: 775 / 543;
        max-height: 450px;
    }
    
    /* Мышь */
    .subscribe-section__mouse {
        position: absolute;
        width: 468px;
        max-width: 48%;
        height: auto;
        right: 5%;
        top: -5%;
        left: auto;
        bottom: auto;
    }
    
    /* Пингвин */
    .subscribe-section__pinguin {
        position: absolute;
        width: 335px;
        max-width: 38%;
        height: auto;
        left: 9%;
        bottom: -15%;
        right: auto;
        top: auto;
    }
    
    .subscribe-section__right {
        width: 100%;
        order: 2;
        margin-top: 50px;
        position: relative;
        z-index: 5;
    }
    
    .subscribe-section__form-content {
        max-width: 100%;
    }
    
    .subscribe-section__title {
        font-size: 40px;
    }
    
    /* br остаётся на планшете */
    
    .subscribe-section__text {
        font-size: 20px;
          line-height: 120%;
    }

    .subscribe-section__btn {
        padding: 14px 20px;
        font-size: 14px;
    }
}

/* ===== 850px ===== */
@media (max-width: 850px) {
    .subscribe-section__inner {
        padding: 0 24px;
        gap: 24px;
    }
    
    .subscribe-section__images-inner {
        max-height: 380px;
    }
    
    .subscribe-section__mouse {
        max-width: 46%;
    }
    
    .subscribe-section__pinguin {
        max-width: 36%;
    }
    
    .subscribe-section__title {
        font-size: 40px;
    }
}

/* ===== 768px ===== */
@media (max-width: 768px) {
    .subscribe-section {
        margin: 240px 0 30px 0;
    }
    
    .subscribe-section__images-inner {
        max-height: 320px;
    }
    
    .subscribe-section__mouse {
        max-width: 44%;
        right: 8%;
        top: -3%;
    }
    
    .subscribe-section__pinguin {
        max-width: 34%;
        left: 9%;
        bottom: -25%;
    }
    
    .subscribe-section__title {
        font-size: 40px;
    }
    
    .subscribe-section__checkbox-text {
        font-size: 14px;
    }
}

/* ===== 680px ===== */
@media (max-width: 680px) {
    .subscribe-section__inner {
        padding: 0 16px;
        gap: 20px;
    }
    
    .subscribe-section__images-inner {
        max-height: 280px;
    }
    
    .subscribe-section__mouse {
        max-width: 42%;
        right: 10%;
    }
    
    .subscribe-section__pinguin {
        max-width: 32%;
        left: 12%;
    }
    
    .subscribe-section__title {
        font-size: 40px;
    }
    
    .subscribe-section__text {
        font-size: 20px;
    }
}

/* ===== 580px — мобилка ===== */
@media (max-width: 580px) {


        .popup-success {
        padding: 40px 20px 30px 20px !important;
        min-height: auto;
    }

    .popup-success__title {
        font-size: 26px;
    }

    .popup-success .f-button.is-close-btn,
    .popup-success button[data-fancybox-close] {
        top: 10px !important;
        right: 10px !important;
        width: 24px;
        height: 24px;
    }

    .popup-success .f-button.is-close-btn svg,
    .popup-success button[data-fancybox-close] svg {
        width: 24px;
        height: 24px;
    }

    .subscribe-section__checkbox-wrap {
margin-top: 40px;

}

    .subscribe-section {
        margin: 240px 0 24px 0;
    }
    
    .subscribe-section__inner {
        gap: 16px;
    }
    
    .subscribe-section__images-inner {
        max-height: 240px;
    }
    
    /* Мышь: 327px на мобилке */
    .subscribe-section__mouse {
        width: 327px;
        max-width: 50%;
        right: 5%;
        top: -24%;
    }

        .subscribe-section__checkbox {
        margin-top: 0;
        align-self: center;
    }
    
    .subscribe-section__checkbox-label {
        align-items: center;
    }

    
    
    /* Пингвин: 270px на мобилке */
    .subscribe-section__pinguin {
        width: 270px;
        max-width: 40%;
        left: 8%;
        bottom: -28%;
    }
    
    .subscribe-section__title {
        font-size: 24px;
        margin-bottom: 16px;
    }
    

    .subscribe-section__text {
        font-size: 14px;
          line-height: 120%;
        margin-bottom: 20px;
    }
    
    .subscribe-section__input {
        padding: 14px;
        font-size: 16px;
    }
    
    /* Кнопка и чекбокс в колонку только на мобилке */
    .subscribe-section__bottom-row {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
    
    .subscribe-section__btn {
        width: 100%;
        padding: 14px 20px;
        font-size: 14px;
    }
    
    .subscribe-section__checkbox-text {
        font-size: 14px;
          line-height: 120%;
    }
}

/* ===== 480px ===== */
@media (max-width: 480px) {
    .subscribe-section__inner {
        padding: 0 12px;
    }
    
    .subscribe-section__images-inner {
        max-height: 200px;
    }
    
    .subscribe-section__mouse {
        max-width: 48%;
    }
    
    .subscribe-section__pinguin {
        max-width: 38%;
    }
    
    .subscribe-section__title {
        font-size: 24px;
    }
}

/* ===== 400px ===== */
@media (max-width: 400px) {
    .subscribe-section__images-inner {
        max-height: 170px;
    }
    
    .subscribe-section__mouse {
        max-width: 46%;
    }
    
    .subscribe-section__pinguin {
        max-width: 36%;
    }
    
    .subscribe-section__title {
        font-size: 24px;
    }
    
    .subscribe-section__text {
        font-size: 14px;
    }
}

/* ===== 360px ===== */
@media (max-width: 360px) {
    .popup-success {
        padding: 36px 16px 24px 16px !important;
    }

    .popup-success__title {
        font-size: 26px;
    }

    .subscribe-section__images-inner {
        max-height: 150px;
    }
    
    .subscribe-section__mouse {
        max-width: 44%;
    }
    
    .subscribe-section__pinguin {
        max-width: 34%;
    }
    
    .subscribe-section__checkbox-text {
        font-size: 13px;
    }
}