* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: 'EB Garamond', serif;
    background-color: #F3EBDD;
    background-image:
        radial-gradient(circle at 20% 20%,
            rgba(180, 150, 110, 0.08),
            transparent 35%),
        radial-gradient(circle at 80% 70%,
            rgba(180, 150, 110, 0.06),
            transparent 40%);
    color: #3D2C20;
}

.main-container {
    flex: 1;
    width: 80%;
    margin: 0 auto;
    padding: 10px 30px 110px;
}

h2,
h3 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    color: #583417;
    text-align: center;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 20px 15px 20px;
}

.flex-column {
    display: flex;
    flex-direction: column;
}

.flex-center {
    display: flex;
    justify-content: center;
}

.flex-align-center {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.flex-stretch {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    margin-bottom: 20px;
}

.flex-start {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 20px;
}

.text-content-flex {
    display: flex;
    align-items: center;
    margin-bottom: 0;
    text-indent: 40px;
    width: 100%;
    margin-bottom: 30px;
    padding: 24px 36px;
    box-sizing: border-box;
    border-radius: 12px;
    line-height: 1.45;
    background: linear-gradient(135deg,
            rgba(220, 199, 169, 0.72),
            rgba(243, 235, 221, 0.55));
    border: none;
    box-shadow:
        0 8px 25px rgba(80, 55, 35, 0.12);
}

.text-content-flex p {
    margin: 0;
    font-size: 20px;
    line-height: 1.8;
    text-align: justify;
}

.text-content {
    width: 100%;
    margin-bottom: 20px;
    padding: 24px 36px;
    box-sizing: border-box;

    border-radius: 12px;

    background: linear-gradient(135deg,
            rgba(220, 199, 169, 0.72),
            rgba(243, 235, 221, 0.55));

    box-shadow:
        0 8px 25px rgba(80, 55, 35, 0.12);
}

.text-content p {
    margin: 0;
    font-size: 20px;
    line-height: 1.7;
    text-align: justify;
    text-indent: 28px;
    hyphens: none;
}

.text-content p+p {
    margin-top: 10px;
}

.page-navigation {
    position: fixed;
    bottom: 20px;
    left: 0;
    width: 100%;

    display: flex;
    justify-content: center;
    align-items: center;

    z-index: 10;
}

.page-number {
    width: 48px;
    height: 48px;
    margin: 0 5px;

    display: flex;
    justify-content: center;
    align-items: center;

    text-decoration: none;
    font-size: 20px;
    font-weight: 500;
    color: #6B4321;

    background: linear-gradient(135deg,
            rgba(220, 199, 169, .92),
            rgba(243, 235, 221, .92));

    border: 1px solid rgba(107, 67, 33, .15);
    border-radius: 10px;

    box-shadow:
        0 5px 16px rgba(80, 55, 35, .18);
}

.page-number:hover {
    background: #DCC7A9;
    color: #4E2F16;

    box-shadow:
        0 6px 18px rgba(80, 55, 35, .22);
}

.page-number.active {
    background: #583417;
    color: #F8F3EB;

    box-shadow:
        0 6px 18px rgba(80, 55, 35, .28);
}

.home-button {
    height: 48px;
    padding: 0 18px;
    margin-right: 15px;

    display: flex;
    justify-content: center;
    align-items: center;

    text-decoration: none;
    font-size: 20px;
    font-weight: 500;

    color: #6B4321;

    background: linear-gradient(135deg,
            rgba(220, 199, 169, .92),
            rgba(243, 235, 221, .92));

    border: 1px solid rgba(107, 67, 33, .15);
    border-radius: 10px;

    box-shadow: 0 5px 16px rgba(80, 55, 35, .18);
}

.home-button:hover {
    background: #DCC7A9;
    color: #4E2F16;
}


/* Медиазапросы для адаптива */
@media (min-width: 2521px) and (max-width: 3000px) {
    .main-container {
        width: 52%;
    }
}

@media (min-width: 2420px) and (max-width: 2520px) {
    .main-container {
        width: 56%;
    }
}

@media (min-width: 2270px) and (max-width: 2419px) {
    .main-container {
        width: 60%;
    }
}

@media (min-width: 2200px) and (max-width: 2269px) {
    .main-container {
        width: 62%;
    }
}

@media (min-width: 2140px) and (max-width: 2199px) {
    .main-container {
        width: 64%;
    }
}

@media (min-width: 2001px) and (max-width: 2139px) {
    .main-container {
        width: 68%;
    }
}

/* от 1920 до 2000 px */
@media (min-width: 1920px) and (max-width: 2000px) {
    .main-container {
        width: 70%;
    }
}

/* от 1919 до 1850 px */
@media (min-width: 1850px) and (max-width: 1919px) {
    .main-container {
        width: 72%;
    }
}

/* от 1849 до 1770 px */
@media (min-width: 1770px) and (max-width: 1849px) {
    .main-container {
        width: 76%;
    }
}

/* от 1769 до 1680 px */
@media (min-width: 1680px) and (max-width: 1769px) {
    .main-container {
        width: 80%;
    }
}


/* от 1679 до 1600 px */
@media (min-width: 1600px) and (max-width: 1679px) {
    .main-container {
        width: 84%;
    }
}

/* от 1599 до 1530 px */
@media (min-width: 1530px) and (max-width: 1599px) {
    .main-container {
        width: 88%;
    }
}

/* от 1529 до 1470 px */
@media (min-width: 1470px) and (max-width: 1529px) {
    .main-container {
        width: 92%;
    }
}

/* от 1469 до 1400 px */
@media (min-width: 1400px) and (max-width: 1469px) {
    .main-container {
        width: 96%;
    }
}

/* от 1399 до 1366 px */
@media (min-width: 1366px) and (max-width: 1399px) {
    .main-container {
        width: 98%;
    }
}

/* от 1300 до 1365 px */
@media (min-width: 1300px) and (max-width: 1365px) {
    .main-container {
        width: 100%;
        padding: 10px 25px 110px;
    }
}

/* от 1200 до 1299 px */
@media (min-width: 1200px) and (max-width: 1299px) {
    .main-container {
        width: 100%;
        padding: 10px 20px 110px;
    }
}

/* от 1000 до 1199 px */
@media (min-width: 1000px) and (max-width: 1199px) {
    .main-container {
        width: 70%;
        padding: 10px 20px 110px;
    }

    .flex-center {
        flex-direction: column;
    }

    .flex-align-center {
        flex-direction: column;
    }

    .flex-stretch {
        flex-direction: column;
        align-items: center;
    }

    .flex-start {
        flex-direction: column;
        align-items: center;
    }

    .flex-center {
        align-items: center;
    }

    .text-content {
        width: 600px;
        margin-left: auto;
        margin-right: auto;
    }

    .text-content-flex {
        width: 600px;
        margin-left: auto;
        margin-right: auto;
    }
}



/* 701 px до 999 px*/
@media (min-width: 701px) and (max-width: 999px) {
    .main-container {
        width: 97%;
    }

    .flex-center {
        flex-direction: column;
    }

    .flex-align-center {
        flex-direction: column;
    }

    .flex-stretch {
        flex-direction: column;
        align-items: center;
    }

    .flex-start {
        flex-direction: column;
        align-items: center;
    }

    .flex-center {
        align-items: center;
    }

    .text-content {
        width: 500px;
        margin-left: auto;
        margin-right: auto;
    }

    .text-content-flex {
        width: 500px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* 700 px */
@media (max-width: 700px) {
    .main-container {
        width: 90%;
        padding: 10px 15px 110px;
    }

    .flex-center {
        flex-direction: column;
    }

    .flex-align-center {
        flex-direction: column;
    }

    .flex-stretch {
        flex-direction: column;
        align-items: center;
    }

    .flex-start {
        flex-direction: column;
        align-items: center;
    }
}