wrapper {
    width: 100%;
    overflow-x: hidden;
}

.article-title-photo {
    display: flex;
    position: relative;
    /* Заменяем фиксированную ширину на резиновую */
    width: 100%;
    max-width: 1200px;
    height: auto; /* Высота теперь зависит от пропорций фото */
    aspect-ratio: 1200 / 837;
    margin: 0 auto; /* Центрируем без transform */
    transform: none;
    left: 0;
}

.article-title-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-title-text {
    position: absolute;
    /* Используем проценты для гибкости на средних экранах */
    width: 60%;
    max-width: 727px;
    height: fit-content;
    z-index: 5;
    left: 4%;
    top: 32%;
    text-align: left;
    color: #F9FED8;
    text-shadow: 10px 10px 15px #000;
    font-family: "Playfair Display";
    font-size: clamp(48px, 8vw, 96px); /* Шрифт уменьшается при сужении окна */
    font-style: normal;
    font-weight: 900;
    line-height: 1;
}

.article-title-torn-edge {
    position: absolute;
    width: 100%;
    height: 6vw; /* Высота края теперь пропорциональна ширине */
    max-height: 76px;
    bottom: 0;
    z-index: 6;
    background-image: url("../img/page_elements/torn_edges/torn_edge3-2.png");
    background-size: cover;
    background-repeat: no-repeat;
}

.article-title-field {
    display: flex;
    position: relative;
    width: 100%;
    max-width: 1200px;
    height: fit-content;
    justify-content: flex-end;
    margin: 0 auto;
    transform: none;
}

.article-title {
    position: relative;
    width: 90%;
    max-width: 874px;
    height: fit-content;
    margin-top: 5vw;
    margin-bottom: 5vw;
    text-align: right;
    color: #BB1023;
    font-family: "Playfair Display";
    font-size: clamp(32px, 5vw, 64px); /* Гибкий размер заголовка */
    font-style: normal;
    font-weight: 900;
    line-height: normal;
}

.article-body {
    display: flex;
    position: relative;
    flex-direction: column;
    width: 100%;
    max-width: 1200px;
    height: auto;
    margin: 0 auto 100px auto;
    transform: none;
    padding: 0 20px; /* Отступы, чтобы текст не лип к краям при сжатии */
    box-sizing: border-box;
    color: #5A062A;
    text-align: justify;
    font-family: Gabriola;
    font-size: clamp(24px, 3.5vw, 40px); /* Гибкий размер текста */
    font-style: normal;
    font-weight: 400;
    line-height: 1.1;
}
@media screen and (max-width: 768px) {
    /* 1. ГЛОБАЛЬНЫЙ СБРОС (Изоляция от хедера) */
    .background-1-article,
    .background-2-history,
    .wrapper > div:not([class*="header"]),
    [class^="article-"] {
        position: relative !important;
        left: 0 !important;
        right: 0 !important;
        top: 0 !important;
        margin-left: auto !important;
        margin-right: auto !important;
        transform: none !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        box-sizing: border-box !important;
    }

    /* 2. ФОТОГРАФИЯ (На весь экран) */
    .article-title-photo {
        display: flex !important;
        flex-direction: column !important;
        padding: 0 !important;
    }

    .article-title-photo img {
        width: 100% !important;
        height: auto !important;
        display: block !important;
        aspect-ratio: auto !important;
    }

    /* 3. ЗАГОЛОВОК ВЕКА (Перемещаем под фото и центрируем) */
    .article-title-text {
        display: none;
    }

    /* 4. СКРЫВАЕМ ДЕКОР */
    .article-title-torn-edge {
        display: none !important;
    }

    /* 5. ЗАГОЛОВОК СТАТЬИ (Фикс центрирования) */
    .article-title-field {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        padding: 0 15px !important;
    }

    .article-title {
        width: 100% !important;
        margin-top: 10px !important;
        margin-bottom: 30px !important;
        text-align: center !important; /* Строго по центру */
        font-size: 34px !important;
        line-height: 1.2 !important;
        color: #BB1023 !important;
    }

    /* 6. ТЕКСТ СТАТЬИ (BODY) */
    .article-body {
        display: block !important;
        padding: 0 20px !important;
        font-size: 24px !important; /* Размер Gabriola для мобильных */
        line-height: 1.3 !important;
        text-align: justify !important;
        margin-bottom: 60px !important;
        color: #5A062A !important;
    }

    /* 7. ЗАЩИТА ОТ ГОРИЗОНТАЛЬНОГО СКРОЛЛА */
    .wrapper {
        overflow-x: hidden !important;
    }
}