/* Global responsive layer — loaded after style.css */

:root {
    --site-max-width: 1419px;
    --site-gutter: clamp(16px, 3vw, 32px);
}

html {
    width: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    width: 100%;
    min-width: 320px;
    overflow-x: hidden;
}

img,
video,
iframe {
    max-width: 100%;
    height: auto;
}

img.absolute-image-1,
img.absolute-image-2,
img.absolute-image-3,
img.right-logotype {
    max-width: none;
}

/* Site shell — container always fills available width up to max */
.header,
.content,
.footer-main,
.cabinet-main-block {
    width: 100%;
}

.border {
    width: 100%;
    max-width: var(--site-max-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--site-gutter);
    padding-right: var(--site-gutter);
    box-sizing: border-box;
}

.header-content {
    width: 100%;
}

/* Hero slider — desktop defaults live in style.css (468px) */

.header-content,
.bottom-header-content {
    width: 100%;
    box-sizing: border-box;
}

.header-top-section-a {
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
}

.slide-header .header-top-section {
    flex: 0 0 100%;
    min-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

.bottom-header-content {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.contnet-block-a {
    padding: clamp(20px, 4vw, 49px);
    width: 100%;
    box-sizing: border-box;
}

.group-info,
.group-buttons {
    flex-wrap: wrap;
}

a.header-content-object {
    width: 100%;
    min-height: 180px;
    height: auto;
}

p.title-text-video,
p.info-launcher-c {
    width: auto;
    max-width: 100%;
}

/* Desktop: two columns */
.content-main {
    width: 100%;
}

/* Desktop hero — см. hero.css (только .home-page) */

@media (max-width: 1300px) {
    .content-main {
        margin-top: -150px;
    }

    .header {
        padding-bottom: 160px;
    }

    body.inner-page .content-main {
        margin-top: 28px;
    }
}

/* Tablet + Mobile — hero/главная в mobile.css */
@media (max-width: 1175px) {
    .form-panel {
        padding: 32px clamp(20px, 5vw, 48px);
    }

    .modal-auth-form {
        grid-template-columns: 1fr;
        width: 100%;
        max-width: 640px;
    }

    .modal-default {
        width: 100%;
        max-width: 100%;
    }

    .modal-absolute {
        padding: 16px;
        align-items: center;
    }

    .modal-main {
        margin-top: 0;
        width: 100%;
    }

    .top-footer {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 28px;
    }

    .forum-category-row {
        grid-template-columns: 44px 1fr;
    }

    .forum-category-stats {
        grid-column: 1 / -1;
        display: flex;
        gap: 16px;
        text-align: left;
    }

    .forum-topics-head {
        display: none;
    }

    .forum-topic-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .forum-post {
        grid-template-columns: 1fr;
    }

    .forum-post-sidebar {
        flex-direction: row;
        justify-content: flex-start;
        text-align: left;
    }

    .group-donate-list-a {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }

    .list-video {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Small mobile — layout в mobile.css */
@media (max-width: 768px) {
    .news-border {
        padding: 20px 16px;
    }

    .top-footer {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .object-footer-a,
    .object-footer-a:nth-child(2n),
    .object-footer-a:nth-child(2n) > .links-footer-a,
    li.footer-link-a {
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    p.footer-text-a {
        text-align: center;
    }

    .bottom-footer {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .bottom-info-news {
        flex-direction: column;
        gap: 16px;
    }

    .modal-auth-form,
    .modal-default {
        border-radius: 0;
        max-height: none;
    }

    .modal-absolute.auth-form {
        padding: 0;
    }

    .form-panel {
        padding: 24px 20px;
    }

    .contnet-block-a table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .groups-rules {
        padding: 20px 16px;
    }

    .forum-category-top {
        flex-direction: column;
        align-items: stretch;
    }

    .forum-new-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .list-video {
        grid-template-columns: 1fr;
    }

    .privileges-tabs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    h4 {
        font-size: 20px;
        line-height: 1.3;
    }
}
