@import "variables.css";
@import "header.css";
@import "button.css";
@import "footer.css";
@import "card.css";
@import "form.css";
@import "sidebar.css";

html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
    margin: 0;
    border: 0;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden; /* Предотвращаем горизонтальную прокрутку */
    width: 100%;
    max-width: 100%;
    margin: 0;
    scroll-behavior: smooth;
}

::-webkit-scrollbar {
    height: 3px;
    width: 3px;
}

::-webkit-scrollbar-thumb {
    background-color: var(--color-5);
    border-radius: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

body{
    height: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: Roboto, sans-serif;
    background: var(--color-5); /* белый фон */
    color: var(--color-9); /* темный текст */
    margin: 0;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 20px 20px;
    height: inherit;
    box-sizing: border-box;
}

/* Responsive container padding */
@media (max-width: 991px) {
    .container {
        padding: 15px 15px;
    }
}

@media (max-width: 767px) {
    .container {
        padding: 10px 10px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 8px 8px;
    }
}

@media (max-width: 320px) {
    .container {
        padding: 5px 5px;
    }
}

a {
    text-decoration: none;
    color: var(--color-11);
    transition: var(--base-transition);
}

a:hover {
    color: var(--color-3);
    text-decoration: underline;
}

.admin-bar header {
    top: 0; /* Sticky хедер остается на месте */
}

.admin-bar body {
    padding-top: 32px; /* Отступ для WordPress admin bar */
}

body {
    padding-top: 0; /* Убираем отступ, так как хедер sticky */
}

main {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-left: 0; /* Убираем отступ слева */
    margin-top: 0; /* Убираем отступ сверху */
    padding-top: 0; /* Убираем отступ, так как sticky хедер не перекрывает контент */
    overflow-x: hidden; /* Предотвращаем горизонтальную прокрутку */
    box-sizing: border-box;
    z-index: 1; /* Убеждаемся, что main ниже хедера */
}

footer {
    flex: 0 0 auto;
    width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}


table {
    margin-block-start: 15px!important;
    margin-block-end: 15px!important;
    border-collapse: collapse;
}

table td {
    border: 1px solid var(--color-9);
    padding: 10px;
}

.table_wrapper tbody tr:nth-child(odd) {
    background: rgba(0, 0, 0, 0.05);
}

.table_wrapper {
    overflow: auto;
}

.arrow_wrapper {
    display: flex;
    align-items: center;
    gap: 10px;

    .arrow {
        position: static;
        width: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 1px solid var(--color-4);
        height: 32px;
        background: var(--color-4);
        cursor: pointer;
        border-radius: 8px;

        svg {
            width: 14px;
            height: 14px;
            fill: var(--color-5);
        }

        &.arrow--disabled {
            opacity: 0.5;
        }
    }
}

.navigation-wrapper .arrow.arrow--disabled {
    display: none;
}



.swiper-button-next:after, .swiper-button-prev:after {
    color: var(--color-4);
    font-weight: bold;
}

.swiper-button-next {
    right: 0;
    left: auto;
}

.swiper-button-prev {
    left: 0;
    right: auto;
}

.block__head__title {
    font-size: 14px;
    color: var(--color-10);
    font-weight: bold;
}

html :where(.wp-block) {
    max-width: 100%;
}

/* Ensure sections and divs don't overflow */
section, div {
    max-width: 100%;
    box-sizing: border-box;
}

/* Universal overflow prevention */
* {
    max-width: 100%;
    box-sizing: border-box;
}


.wp-block-group p a {
    color: var(--color-11);
    text-decoration: underline;
}


.content_wrapper {
    display: flex;
    align-items: stretch;
    width: 100%;
}

.page__content {
    flex: 1;
    margin-top: 0;

}

/* Tablet adjustments for page content */
@media (max-width: 1200px) and (min-width: 769px) {
    .page__content {
        margin-top: 0;
    }
}

body.active  .page__content {
    filter: blur(10px);
}

/* Typography for frontend content and block editor to mirror admin styles */
.page__content,
.editor-styles-wrapper,
.wp-block-post-content {
    line-height: 1.6;
    color: var(--color-9);
}

/* Container wrapper for text content only */
.page__content {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 20px 20px;
    box-sizing: border-box;
}

/* Gutenberg wide/full alignments (theme support: align-wide) */
.page__content .alignwide,
.editor-styles-wrapper .alignwide,
.wp-block-post-content .alignwide {
    width: 100%;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.page__content .alignfull,
.editor-styles-wrapper .alignfull,
.wp-block-post-content .alignfull {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.page__content p,
.editor-styles-wrapper p,
.wp-block-post-content p {
    margin: 0 0 1em 0;
}

.page__content h1,
.editor-styles-wrapper h1,
.wp-block-post-content h1 {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.25;
    margin: 0.6em 0 0.4em;
}

.page__content h2,
.editor-styles-wrapper h2,
.wp-block-post-content h2 {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0.7em 0 0.4em;
}

.page__content h3,
.editor-styles-wrapper h3,
.wp-block-post-content h3 {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0.8em 0 0.4em;
}

.page__content h4,
.editor-styles-wrapper h4,
.wp-block-post-content h4 {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.4;
    margin: 0.9em 0 0.4em;
}

.page__content h5,
.editor-styles-wrapper h5,
.wp-block-post-content h5 {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.45;
    margin: 1em 0 0.4em;
}

.page__content h6,
.editor-styles-wrapper h6,
.wp-block-post-content h6 {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.5;
    margin: 1.1em 0 0.4em;
    text-transform: none;
}

.page__content ul,
.editor-styles-wrapper ul,
.wp-block-post-content ul,
.page__content ol,
.editor-styles-wrapper ol,
.wp-block-post-content ol {
    margin: 0 0 1em 1.4em;
}


.page__content ol,
.editor-styles-wrapper ol,
.wp-block-post-content ol {
    list-style: decimal;
}

.page__content li,
.editor-styles-wrapper li,
.wp-block-post-content li {
    margin: 0.4em 0;
}


.page__content blockquote,
.editor-styles-wrapper blockquote,
.wp-block-post-content blockquote {
    margin: 1.2em 0;
    border-left: 4px solid var(--color-4);
    background: rgba(0, 0, 0, 0.03);
}

.page__content img,
.editor-styles-wrapper img,
.wp-block-post-content img {
    max-width: 100%;
    height: auto;
}

.page__content code,
.editor-styles-wrapper code,
.wp-block-post-content code {
    background: rgba(0, 0, 0, 0.06);
    border-radius: 4px;
}

/* Responsive padding for page content */
@media (max-width: 991px) {
    .page__content {
        padding: 15px 15px;
    }
}

@media (max-width: 767px) {
    .page__content {
        padding: 10px 10px;
    }
    
    .page__content h1,
    .editor-styles-wrapper h1,
    .wp-block-post-content h1 { font-size: 28px; }
    .page__content h2,
    .editor-styles-wrapper h2,
    .wp-block-post-content h2 { font-size: 24px; }
    .page__content h3,
    .editor-styles-wrapper h3,
    .wp-block-post-content h3 { font-size: 20px; }
}

@media (max-width: 480px) {
    .page__content {
        padding: 8px 8px;
    }
}

@media (max-width: 320px) {
    .page__content {
        padding: 5px 5px;
    }
}



/* Admin block editor: neutralize global constraints so editor panels render correctly */
.block-editor-page body {
    overflow-x: visible !important;
    display: block; /* avoid flex on admin canvas */
}

.block-editor-page .interface-interface-skeleton__content,
.block-editor-page .interface-interface-skeleton__editor,
.block-editor-page .interface-interface-skeleton__sidebar {
    max-width: none !important;
}

/* Avoid universal max-width constraint inside the editor */
.block-editor-page * {
    max-width: none !important;
}

