* {
    font-variant-numeric: tabular-nums; /* Делает цифры моноширинными */
    font-feature-settings: "liga" 0, "clig" 0; /* Полностью отключает лигатуры */
}




@font-face {
    font-family: 'ALS Hauss';
    src: url('/fonts/ALSHauss-Black.eot');
    src: local('ALS Hauss Black'), local('ALSHauss-Black'),
        url('/fonts/ALSHauss-Black.eot?#iefix') format('embedded-opentype'),
        url('/fonts/ALSHauss-Black.woff2') format('woff2'),
        url('/fonts/ALSHauss-Black.woff') format('woff'),
        url('/fonts/ALSHauss-Black.ttf') format('truetype');
    font-weight: 900;
    font-style: normal;
}

@font-face {
    font-family: 'ALS Hauss Book';
    src: url('/fonts/ALSHauss-Book.eot');
    src: local('ALS Hauss Book'), local('ALSHauss-Book'),
        url('/fonts/ALSHauss-Book.eot?#iefix') format('embedded-opentype'),
        url('/fonts/ALSHauss-Book.woff2') format('woff2'),
        url('/fonts/ALSHauss-Book.woff') format('woff'),
        url('/fonts/ALSHauss-Book.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'ALS Hauss';
    src: url('/fonts/ALSHauss-Light.eot');
    src: local('ALS Hauss Light'), local('ALSHauss-Light'),
        url('/fonts/ALSHauss-Light.eot?#iefix') format('embedded-opentype'),
        url('/fonts/ALSHauss-Light.woff2') format('woff2'),
        url('/fonts/ALSHauss-Light.woff') format('woff'),
        url('/fonts/ALSHauss-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'ALS Hauss Book';
    src: url('/fonts/ALSHauss-BookItalic.eot');
    src: local('ALS Hauss Book Italic'), local('ALSHauss-BookItalic'),
        url('/fonts/ALSHauss-BookItalic.eot?#iefix') format('embedded-opentype'),
        url('/fonts/ALSHauss-BookItalic.woff2') format('woff2'),
        url('/fonts/ALSHauss-BookItalic.woff') format('woff'),
        url('/fonts/ALSHauss-BookItalic.ttf') format('truetype');
    font-weight: normal;
    font-style: italic;
}

@font-face {
    font-family: 'ALS Hauss';
    src: url('/fonts/ALSHauss-Medium.eot');
    src: local('ALS Hauss Medium'), local('ALSHauss-Medium'),
        url('/fonts/ALSHauss-Medium.eot?#iefix') format('embedded-opentype'),
        url('/fonts/ALSHauss-Medium.woff2') format('woff2'),
        url('/fonts/ALSHauss-Medium.woff') format('woff'),
        url('/fonts/ALSHauss-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'ALS Hauss Hairline';
    src: url('/fonts/ALSHauss-Hairline.eot');
    src: local('ALS Hauss Hairline'), local('ALSHauss-Hairline'),
        url('/fonts/ALSHauss-Hairline.eot?#iefix') format('embedded-opentype'),
        url('/fonts/ALSHauss-Hairline.woff2') format('woff2'),
        url('/fonts/ALSHauss-Hairline.woff') format('woff'),
        url('/fonts/ALSHauss-Hairline.ttf') format('truetype');
    font-weight: 100;
    font-style: normal;
}

@font-face {
    font-family: 'ALS Hauss';
    src: url('/fonts/ALSHauss-Thin.eot');
    src: local('ALS Hauss Thin'), local('ALSHauss-Thin'),
        url('/fonts/ALSHauss-Thin.eot?#iefix') format('embedded-opentype'),
        url('/fonts/ALSHauss-Thin.woff2') format('woff2'),
        url('/fonts/ALSHauss-Thin.woff') format('woff'),
        url('/fonts/ALSHauss-Thin.ttf') format('truetype');
    font-weight: 200;
    font-style: normal;
}

@font-face {
    font-family: 'ALS Hauss';
    src: url('/fonts/ALSHauss-RegularItalic.eot');
    src: local('ALS Hauss Regular Italic'), local('ALSHauss-RegularItalic'),
        url('/fonts/ALSHauss-RegularItalic.eot?#iefix') format('embedded-opentype'),
        url('/fonts/ALSHauss-RegularItalic.woff2') format('woff2'),
        url('/fonts/ALSHauss-RegularItalic.woff') format('woff'),
        url('/fonts/ALSHauss-RegularItalic.ttf') format('truetype');
    font-weight: normal;
    font-style: italic;
}

@font-face {
    font-family: 'ALS Hauss';
    src: url('/fonts/ALSHauss-BoldItalic.eot');
    src: local('ALS Hauss Bold Italic'), local('ALSHauss-BoldItalic'),
        url('/fonts/ALSHauss-BoldItalic.eot?#iefix') format('embedded-opentype'),
        url('/fonts/ALSHauss-BoldItalic.woff2') format('woff2'),
        url('/fonts/ALSHauss-BoldItalic.woff') format('woff'),
        url('/fonts/ALSHauss-BoldItalic.ttf') format('truetype');
    font-weight: bold;
    font-style: italic;
}

@font-face {
    font-family: 'ALS Hauss';
    src: url('/fonts/ALSHauss-ThinItalic.eot');
    src: local('ALS Hauss Thin Italic'), local('ALSHauss-ThinItalic'),
        url('/fonts/ALSHauss-ThinItalic.eot?#iefix') format('embedded-opentype'),
        url('/fonts/ALSHauss-ThinItalic.woff2') format('woff2'),
        url('/fonts/ALSHauss-ThinItalic.woff') format('woff'),
        url('/fonts/ALSHauss-ThinItalic.ttf') format('truetype');
    font-weight: 100;
    font-style: italic;
}

@font-face {
    font-family: 'ALS Hauss';
    src: url('/fonts/ALSHauss-Bold.eot');
    src: local('ALS Hauss Bold'), local('ALSHauss-Bold'),
        url('/fonts/ALSHauss-Bold.eot?#iefix') format('embedded-opentype'),
        url('/fonts/ALSHauss-Bold.woff2') format('woff2'),
        url('/fonts/ALSHauss-Bold.woff') format('woff'),
        url('/fonts/ALSHauss-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'ALS Hauss';
    src: url('/fonts/ALSHauss-Regular.eot');
    src: local('ALS Hauss Regular'), local('ALSHauss-Regular'),
        url('/fonts/ALSHauss-Regular.eot?#iefix') format('embedded-opentype'),
        url('/fonts/ALSHauss-Regular.woff2') format('woff2'),
        url('/fonts/ALSHauss-Regular.woff') format('woff'),
        url('/fonts/ALSHauss-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'ALS Hauss';
    src: url('/fonts/ALSHauss-MediumItalic.eot');
    src: local('ALS Hauss Medium Italic'), local('ALSHauss-MediumItalic'),
        url('/fonts/ALSHauss-MediumItalic.eot?#iefix') format('embedded-opentype'),
        url('/fonts/ALSHauss-MediumItalic.woff2') format('woff2'),
        url('/fonts/ALSHauss-MediumItalic.woff') format('woff'),
        url('/fonts/ALSHauss-MediumItalic.ttf') format('truetype');
    font-weight: 500;
    font-style: italic;
}

@font-face {
    font-family: 'ALS Hauss';
    src: url('/fonts/ALSHauss-LightItalic.eot');
    src: local('ALS Hauss Light Italic'), local('ALSHauss-LightItalic'),
        url('/fonts/ALSHauss-LightItalic.eot?#iefix') format('embedded-opentype'),
        url('/fonts/ALSHauss-LightItalic.woff2') format('woff2'),
        url('/fonts/ALSHauss-LightItalic.woff') format('woff'),
        url('/fonts/ALSHauss-LightItalic.ttf') format('truetype');
    font-weight: 300;
    font-style: italic;
}

@font-face {
    font-family: 'ALS Hauss Hairline';
    src: url('/fonts/ALSHauss-HairlineItalic.eot');
    src: local('ALS Hauss Hairline Italic'), local('ALSHauss-HairlineItalic'),
        url('/fonts/ALSHauss-HairlineItalic.eot?#iefix') format('embedded-opentype'),
        url('/fonts/ALSHauss-HairlineItalic.woff2') format('woff2'),
        url('/fonts/ALSHauss-HairlineItalic.woff') format('woff'),
        url('/fonts/ALSHauss-HairlineItalic.ttf') format('truetype');
    font-weight: 100;
    font-style: italic;
}

@font-face {
    font-family: 'ALS Hauss';
    src: url('/fonts/ALSHauss-BlackItalic.eot');
    src: local('ALS Hauss Black Italic'), local('ALSHauss-BlackItalic'),
        url('/fonts/ALSHauss-BlackItalic.eot?#iefix') format('embedded-opentype'),
        url('/fonts/ALSHauss-BlackItalic.woff2') format('woff2'),
        url('/fonts/ALSHauss-BlackItalic.woff') format('woff'),
        url('/fonts/ALSHauss-BlackItalic.ttf') format('truetype');
    font-weight: 900;
    font-style: italic;
}

/* ============================================
   COLOR — design tokens
   ============================================ */

:root {
    /* Background */
    --moa-bg-black: #161616;
    --moa-bg-white: #ffffff;
    --moa-bg-gradient: linear-gradient(180deg, #2b2b2b 0%, #161616 100%);

    /* Text */
    --moa-text-on-dark: #ffffff;
    --moa-text-on-dark-muted: #707070;
    --moa-text-on-light: #161616;
    --moa-text-on-light-muted: #a5a5a5;

    /* Semantic aliases */
    --moa-border: var(--moa-text-on-light);
    --moa-border-muted: var(--moa-text-on-light-muted);
}

.moa-bg-gradient {
    background: var(--moa-bg-gradient);
}

.moa-on-dark {
    color: var(--moa-text-on-dark);
}

.moa-on-dark-muted {
    color: var(--moa-text-on-dark-muted);
}

.moa-on-light {
    color: var(--moa-text-on-light);
}

.moa-on-light-muted {
    color: var(--moa-text-on-light-muted);
}

/* Bootstrap color overrides */
.bg-black {
    background-color: var(--moa-bg-black) !important;
}

.bg-white {
    background-color: var(--moa-bg-white) !important;
}

.text-white {
    color: var(--moa-text-on-dark) !important;
}

.text-dark {
    color: var(--moa-text-on-light) !important;
}

.text-muted {
    color: var(--moa-text-on-light-muted) !important;
}

.border-black {
    border-color: var(--moa-border) !important;
}

.btn-dark {
    background-color: var(--moa-text-on-light);
    border-color: var(--moa-text-on-light);
    color: var(--moa-text-on-dark);
}

.btn-dark:hover,
.btn-dark:focus {
    background-color: color-mix(in srgb, var(--moa-bg-black) 75%, var(--moa-bg-white));
    border-color: color-mix(in srgb, var(--moa-bg-black) 75%, var(--moa-bg-white));
    color: var(--moa-text-on-dark);
}

.btn-outline-dark {
    border-color: var(--moa-text-on-light);
    color: var(--moa-text-on-light);
}

.btn-outline-dark:hover,
.btn-outline-dark:focus {
    background-color: var(--moa-text-on-light);
    border-color: var(--moa-text-on-light);
    color: var(--moa-text-on-dark);
}

/* ============================================
   TYPOGRAPHY — design tokens (Desktop default)
   ============================================ */

:root {
    --moa-font-family: 'ALS Hauss', sans-serif;
    --moa-font-family-book: 'ALS Hauss Book', sans-serif;
    --moa-ls-heading: -0.03em;
    --moa-ls-body: 0.02em;

    /* Heading */
    --text-h1-size: 178px;
    --text-h1-lh: 1.1;
    --text-h1-weight: 200;
    --text-h2-size: 64px;
    --text-h2-lh: 1.1;
    --text-h2-weight: 200;
    --text-h3-size: 24px;
    --text-h3-lh: 1.1;
    --text-h3-weight: 300;
    --text-h4-size: 24px;
    --text-h4-lh: 1.4;
    --text-h4-weight: 400;

    /* Body */
    --text-body-size: 22px;
    --text-body-lh: 1.4;
    --text-body-paragraph: 22px;
    --text-body-sm-size: 20px;
    --text-body-sm-lh: 1.4;

    /* List */
    --text-list-cities-size: 22px;
    --text-list-cities-lh: 2;
    --text-list-competition-size: 20px;
    --text-list-competition-lh: 1.4;
    --text-list-team-size: 20px;
    --text-list-team-lh: 1.4;
    --text-list-project-label-size: 22px;
    --text-list-project-label-lh: 1.4;
    --text-list-project-value-size: 22px;
    --text-list-project-value-lh: 1.4;

    /* Button */
    --text-btn-menu-size: 16px;
    --text-btn-menu-lh: 1.4;
    --text-btn-vacancy-size: 20px;
    --text-btn-vacancy-lh: 1.4;
}

@media (max-width: 991px) {
    :root {
        --text-h1-size: 96px;
        --text-h2-size: 40px;
        --text-h3-size: 20px;
        --text-h4-size: 18px;
        --text-h4-lh: 1.4;
        --text-h1-weight: 300;
        --text-h2-weight: 300;
        --text-h3-weight: 300;
        --text-h4-weight: 300;

        --text-body-size: 16px;
        --text-body-paragraph: 16px;
        --text-body-sm-size: 14px;

        --text-list-cities-size: 16px;
        --text-list-competition-size: 14px;
        --text-list-team-size: 20px;
        --text-list-project-label-size: 16px;
        --text-list-project-value-size: 16px;

        --text-btn-menu-size: 16px;
        --text-btn-vacancy-size: 14px;
    }
}

@media (max-width: 576px) {
    :root {
        --text-h1-size: 64px;
        --text-h2-size: 24px;
        --text-h3-size: 16px;
        --text-h4-size: 14px;
        --text-h4-lh: 1.1;
        --text-h1-weight: 200;
        --text-h2-weight: 200;
        --text-h3-weight: 300;
        --text-h4-weight: 400;

        --text-body-size: 14px;
        --text-body-paragraph: 14px;
        --text-body-sm-size: 12px;

        --text-list-cities-size: 14px;
        --text-list-competition-size: 12px;
        --text-list-team-size: 12px;
        --text-list-project-label-size: 14px;
        --text-list-project-value-size: 14px;

        --text-btn-menu-size: 14px;
        --text-btn-vacancy-size: 12px;
    }
}

/* Font weight utilities */
.font-als-light {
    font-family: var(--moa-font-family);
    font-weight: 200;
}

.font-als-book {
    font-family: var(--moa-font-family-book);
    font-weight: normal;
}

.font-als-regular {
    font-family: var(--moa-font-family);
    font-weight: 400;
}

/* Heading utilities */
.text-h1 {
    font-family: var(--moa-font-family);
    font-weight: var(--text-h1-weight);
    font-size: var(--text-h1-size);
    line-height: var(--text-h1-lh);
    letter-spacing: var(--moa-ls-heading);
}

.text-h2 {
    font-family: var(--moa-font-family);
    font-weight: var(--text-h2-weight);
    font-size: var(--text-h2-size);
    line-height: var(--text-h2-lh);
    letter-spacing: var(--moa-ls-heading);
}

.text-h3 {
    font-family: var(--moa-font-family-book);
    font-weight: var(--text-h3-weight);
    font-size: var(--text-h3-size);
    line-height: var(--text-h3-lh);
    letter-spacing: var(--moa-ls-heading);
}

.text-h4 {
    font-family: var(--moa-font-family);
    font-weight: var(--text-h4-weight);
    font-size: var(--text-h4-size);
    line-height: var(--text-h4-lh);
    letter-spacing: var(--moa-ls-heading);
}

/* Body utilities */
.text-body {
    font-family: var(--moa-font-family);
    font-weight: 200;
    font-size: var(--text-body-size);
    line-height: var(--text-body-lh);
    letter-spacing: var(--moa-ls-body);
}

.text-body p + p {
    margin-top: var(--text-body-paragraph);
}

.text-body-sm {
    font-family: var(--moa-font-family-book);
    font-weight: normal;
    font-size: var(--text-body-sm-size);
    line-height: var(--text-body-sm-lh);
    letter-spacing: var(--moa-ls-body);
}

/* List utilities */
.text-list-cities {
    font-family: var(--moa-font-family);
    font-weight: 200;
    font-size: var(--text-list-cities-size);
    line-height: var(--text-list-cities-lh);
    letter-spacing: var(--moa-ls-body);
}

.text-list-competition-year,
.text-list-competition-reward {
    font-family: var(--moa-font-family-book);
    font-weight: normal;
    font-size: var(--text-list-competition-size);
    line-height: var(--text-list-competition-lh);
    letter-spacing: var(--moa-ls-body);
}

.text-list-competition-project {
    font-family: var(--moa-font-family);
    font-weight: 400;
    font-size: var(--text-list-competition-size);
    line-height: var(--text-list-competition-lh);
    letter-spacing: var(--moa-ls-body);
}

.text-list-team-dept {
    font-family: var(--moa-font-family);
    font-weight: 400;
    font-size: var(--text-list-team-size);
    line-height: var(--text-list-team-lh);
    letter-spacing: var(--moa-ls-body);
}

.text-list-team-job,
.text-list-team-name {
    font-family: var(--moa-font-family-book);
    font-weight: normal;
    font-size: var(--text-list-team-size);
    line-height: var(--text-list-team-lh);
    letter-spacing: var(--moa-ls-body);
}

.text-list-project-label {
    font-family: var(--moa-font-family);
    font-weight: 200;
    font-size: var(--text-list-project-label-size);
    line-height: var(--text-list-project-label-lh);
    letter-spacing: var(--moa-ls-body);
}

.text-list-project-value {
    font-family: var(--moa-font-family);
    font-weight: 400;
    font-size: var(--text-list-project-value-size);
    line-height: var(--text-list-project-value-lh);
    letter-spacing: var(--moa-ls-body);
}

/* Button utilities */
.text-btn-menu {
    font-family: var(--moa-font-family);
    font-weight: 400;
    font-size: var(--text-btn-menu-size);
    line-height: var(--text-btn-menu-lh);
    letter-spacing: var(--moa-ls-body);
}

.text-btn-vacancy {
    font-family: var(--moa-font-family);
    font-weight: 400;
    font-size: var(--text-btn-vacancy-size);
    line-height: var(--text-btn-vacancy-lh);
    letter-spacing: var(--moa-ls-body);
    text-decoration: underline;
}

@media (max-width: 991px) {
    .text-btn-vacancy {
        font-family: var(--moa-font-family-book);
        font-weight: 300;
    }
}

@media (max-width: 576px) {
    .text-btn-vacancy {
        font-family: var(--moa-font-family-book);
        font-weight: 300;
    }
}

body {
    font-family: var(--moa-font-family);
    font-weight: 200;
    font-size: var(--text-body-size);
    line-height: var(--text-body-lh);
    letter-spacing: var(--moa-ls-body);
    color: var(--moa-text-on-light);
}

main h1 {
    font-family: var(--moa-font-family);
    font-weight: var(--text-h1-weight);
    font-size: var(--text-h1-size);
    line-height: var(--text-h1-lh);
    letter-spacing: var(--moa-ls-heading);
}

main h2 {
    font-family: var(--moa-font-family);
    font-weight: var(--text-h2-weight);
    font-size: var(--text-h2-size);
    line-height: var(--text-h2-lh);
    letter-spacing: var(--moa-ls-heading);
}

main h3 {
    font-family: var(--moa-font-family-book);
    font-weight: var(--text-h3-weight);
    font-size: var(--text-h3-size);
    line-height: var(--text-h3-lh);
    letter-spacing: var(--moa-ls-heading);
}

main h4 {
    font-family: var(--moa-font-family);
    font-weight: var(--text-h4-weight);
    font-size: var(--text-h4-size);
    line-height: var(--text-h4-lh);
    letter-spacing: var(--moa-ls-heading);
}

/* Admin typography */
.moa-admin h1 {
    font-family: var(--moa-font-family);
    font-weight: var(--text-h1-weight);
    font-size: var(--text-h1-size);
    line-height: var(--text-h1-lh);
    letter-spacing: var(--moa-ls-heading);
}

.moa-admin h3.card-title,
.moa-admin .card-title {
    font-family: var(--moa-font-family-book);
    font-weight: var(--text-h3-weight);
    font-size: var(--text-h3-size);
    line-height: var(--text-h3-lh);
    letter-spacing: var(--moa-ls-heading);
}

.moa-admin h4.card-title {
    font-family: var(--moa-font-family);
    font-weight: var(--text-h4-weight);
    font-size: var(--text-h4-size);
    line-height: var(--text-h4-lh);
    letter-spacing: var(--moa-ls-heading);
}

.moa-admin .nav-tabs .nav-link {
    font-size: var(--text-body-sm-size);
    letter-spacing: var(--moa-ls-body);
}

.moa-admin .table th {
    font-family: var(--moa-font-family-book);
    font-weight: normal;
    font-size: var(--text-body-sm-size);
    letter-spacing: var(--moa-ls-body);
}

.moa-admin .form-control,
.moa-admin .form-select,
.moa-admin .table td {
    font-size: var(--text-body-sm-size);
    letter-spacing: var(--moa-ls-body);
}

/* Footer typography */
.footer-text {
    font-family: var(--moa-font-family);
    font-weight: 200;
    font-size: var(--text-body-sm-size);
    line-height: var(--text-body-sm-lh);
    letter-spacing: var(--moa-ls-body);
    color: var(--moa-text-on-dark);
}

.footer-vacancy-link {
    font-family: var(--moa-font-family);
    font-weight: 400;
    font-size: var(--text-btn-vacancy-size);
    line-height: var(--text-btn-vacancy-lh);
    letter-spacing: var(--moa-ls-body);
    text-decoration: underline;
    color: var(--moa-text-on-dark);
}

@media (max-width: 991px) {
    .footer-vacancy-link {
        font-family: var(--moa-font-family-book);
        font-weight: 300;
    }
}

@media (max-width: 576px) {
    .footer-vacancy-link {
        font-family: var(--moa-font-family-book);
        font-weight: 300;
    }
}

/* Primary about block */
.primary-about-title {
    margin-bottom: 70px;
    color: var(--moa-text-on-dark);
}

.primary-about-body {
    font-family: var(--moa-font-family);
    font-weight: 200;
    font-size: var(--text-body-size);
    line-height: var(--text-body-lh);
    letter-spacing: var(--moa-ls-body);
    color: var(--moa-text-on-dark);
}

/* Team list items */
.team-list-item {
    font-family: var(--moa-font-family-book);
    font-weight: normal;
    font-size: var(--text-list-team-size);
    line-height: var(--text-list-team-lh);
    letter-spacing: var(--moa-ls-body);
}

.team-list-item--dept {
    font-family: var(--moa-font-family);
    font-weight: 400;
}

.header_link {
    text-decoration: none;
    color: var(--moa-text-on-light);
    font-family: var(--moa-font-family);
    font-weight: 400;
    font-size: var(--text-btn-menu-size);
    line-height: var(--text-btn-menu-lh);
    letter-spacing: var(--moa-ls-body);
}

.header_link:hover {

    text-decoration: none;
    color: var(--moa-text-on-light-muted);
}

/* ============================================
   МОБИЛЬНОЕ МЕНЮ
   ============================================ */

/* Скрытие десктопного меню на мобильных */
@media (max-width: 991px) {
    .desktop-nav {
        display: none !important;
    }
    
    .mobile-menu-btn {
        display: flex !important;
    }
}

/* Показ десктопного меню на больших экранах */
@media (min-width: 992px) {
    .desktop-nav {
        display: flex !important;
    }
    
    .mobile-menu-btn {
        display: none !important;
    }
}

/* Кнопка-гамбургер */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 24px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1051;
    position: relative;
}

.mobile-menu-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--moa-text-on-light);
    transition: all 0.3s ease;
    transform-origin: center;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: translateY(11px) rotate(45deg);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: translateY(-11px) rotate(-45deg);
}

/* Панель мобильного меню (tablet / mobile) */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(22, 22, 22, 0.3);
    z-index: 1060;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.mobile-nav-panel {
    --mobile-nav-brand-size: 28px;
    --mobile-nav-panel-padding-x: 24px;

    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 854px;
    height: 384px;
    max-width: calc(100vw - 2 * var(--moa-gutter-min, 20px));
    background-color: var(--moa-bg-white);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 24px var(--mobile-nav-panel-padding-x) 0;
}

.mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    min-height: var(--mobile-nav-brand-size);
    margin-bottom: 20px;
}

.mobile-nav-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    line-height: 0;
    text-decoration: none;
}

.mobile-nav-logo img {
    height: var(--mobile-nav-brand-size);
    width: auto;
    display: block;
}

.mobile-nav-close {
    position: relative;
    width: var(--mobile-nav-brand-size);
    height: var(--mobile-nav-brand-size);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-nav-close span {
    display: block;
    width: var(--mobile-nav-brand-size);
    height: 2px;
    background-color: var(--moa-text-on-light);
    position: absolute;
    transition: background-color 0.2s ease;
}

.mobile-nav-close span:nth-child(1) {
    transform: rotate(45deg);
}

.mobile-nav-close span:nth-child(2) {
    transform: rotate(-45deg);
}

.mobile-nav-close:hover span {
    background-color: var(--moa-text-on-light-muted);
}

.mobile-nav-menu {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    width: 100%;
    text-align: center;
}

.mobile-nav-link {
    font-family: var(--moa-font-family);
    font-weight: 300;
    font-size: 16px;
    line-height: 1.4;
    letter-spacing: var(--moa-ls-body);
    text-decoration: none;
    color: var(--moa-text-on-light);
    transition: color 0.2s ease;
    border-bottom: 1px solid var(--moa-border);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 70px;
    flex-shrink: 0;
    box-sizing: border-box;
}

.mobile-nav-link:first-child {
    border-top: 1px solid var(--moa-border);
}

.mobile-nav-link:hover {
    color: var(--moa-text-on-light-muted);
}

/* Мобильное меню пользователя */
.mobile-user-menu {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1.5px solid var(--moa-border);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mobile-user-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-decoration: none;
    color: inherit;
}

.mobile-user-name {
    font-family: var(--moa-font-family);
    font-weight: 400;
    font-size: var(--text-h3-size);
    line-height: var(--text-h3-lh);
    letter-spacing: var(--moa-ls-heading);
    color: var(--moa-text-on-light);
}

.mobile-user-role {
    font-family: var(--moa-font-family-book);
    font-weight: normal;
    font-size: var(--text-body-size);
    line-height: var(--text-body-lh);
    letter-spacing: var(--moa-ls-body);
    color: var(--moa-text-on-light-muted);
    text-transform: capitalize;
}

.mobile-logout-form {
    margin: 0;
    padding: 0;
}

.mobile-btn-logout {
    background: none;
    border: 1.5px solid var(--moa-border);
    color: var(--moa-text-on-light);
    cursor: pointer;
    font-family: var(--moa-font-family);
    font-weight: 400;
    font-size: var(--text-body-size);
    line-height: var(--text-body-lh);
    letter-spacing: var(--moa-ls-body);
    padding: 12px 24px;
    text-decoration: none;
    transition: all 0.2s ease;
    border-radius: 3px;
    width: fit-content;
}

.mobile-btn-logout:hover {
    background-color: var(--moa-text-on-light);
    color: var(--moa-text-on-dark);
}

.mobile-btn-logout:active {
    transform: scale(0.95);
}

/* Адаптивность мобильного меню */
@media (max-width: 576px) {
    .mobile-nav-panel {
        width: 402px;
        height: 334px;
        --mobile-nav-panel-padding-x: 20px;
        padding: 20px var(--mobile-nav-panel-padding-x) 0;
    }

    .mobile-nav-link {
        font-size: 14px;
        height: 68px;
    }

    .mobile-user-name {
        font-size: var(--text-h3-size);
    }

    .mobile-user-role {
        font-size: var(--text-body-size);
    }

    .mobile-btn-logout {
        font-size: var(--text-body-size);
        padding: 10px 20px;
    }
}

/* Контейнер на всю ширину до 1920px, затем фиксируется на 1920px */
.container {
    width: 100%;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
}


.moa-pad-x {
    /*    padding-left: 17%;
     padding-right: 17%; */
    /*
      Логика “сначала сжимаются поля, потом контент”:
      - Пока ширина окна позволяет, доступная ширина контента держится на фиксированном максимуме.
      - При дальнейшем уменьшении окна поля упираются в минимум, и только после этого начинает сжиматься контент.
    */
    --moa-content-max: 1260px;   /* целевая максимальная ширина контента */
    --moa-gutter-min: 20px;      /* минимальные поля слева/справа */
    --moa-gutter-max: 17vw;      /* максимальные поля (≈ 17% от окна) */

    padding-left: clamp(var(--moa-gutter-min), calc((100vw - var(--moa-content-max)) / 2), var(--moa-gutter-max));
    padding-right: clamp(var(--moa-gutter-min), calc((100vw - var(--moa-content-max)) / 2), var(--moa-gutter-max));
}

/* Мобильная версия - отступы 5% */
@media (max-width: 576px) {
    .moa-pad-x {
        /*        padding-left: 5%;
        padding-right: 5%;*/
        --moa-gutter-min: 5vw;
        --moa-gutter-max: 5vw;
    }
}

/* Предотвращение горизонтального скролла */
main {
    overflow-x: hidden;
    max-width: 100%;
    box-sizing: border-box;
}

/* При ширине экрана больше 1920px - ограничиваем контейнер и центрируем */

    .container {
        padding: 0 !important;
    }



.mb-100 {
    margin-bottom: 100px;
}

.mb-150 {
    margin-bottom: 150px;
}


.mt-100 {
    margin-top: 100px;    
}

.mt-150 {
    margin-top: 150px;
}


.mt-50 {
    margin-top: 50px;
}

.mb-50 {
    margin-bottom: 50px;
}

.mb-20 {
    margin-bottom: 20px;
}

/* Мобильные отступы для утилитных классов */
@media (max-width: 576px) {
    .mb-100 {
        margin-bottom: 25px;
    }

    .mt-100 {
        margin-top: 25px;
    }
}

/* ============================================
   МОДУЛЬ: TEAM (Команда)
   ============================================ */

.employees-row {
    padding-left: 10px;
    padding-right: 10px;
}

.employee-col {
    position: relative;
    box-sizing: border-box;
    padding: 0;
    overflow: hidden;
    contain: layout;
    /* Высота определяется только фото-тайлом через padding-bottom: 100% */
    /* Блок информации не влияет на высоту благодаря position: absolute */
}

/* Отступы для колонок: 1,2,3 - правый отступ, 4 - левый отступ */
.employee-col:nth-child(4n+1),
.employee-col:nth-child(4n+2),
.employee-col:nth-child(4n+3) {
    padding-right: 10px;
}

.employee-col:nth-child(4n+4) {
    padding-left: 0;
}

.employee-tile {
    text-align: center;
    cursor: pointer;
    box-sizing: border-box;
    position: relative;
    width: 100%;
}

.employee-photo-tile {
    /* Обеспечиваем, что фото-тайл всегда определяет высоту колонки */
    position: relative;
    width: 100%;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.employee-photo-wrapper {
    width: 100%;
    padding-bottom: 100%; /* Квадрат */
    position: relative;
    overflow: hidden;
    background-color: #f5f5f5;
    box-sizing: border-box;
}

.employee-photo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: grayscale(100%); /* Черно-белое по умолчанию */
    transition: filter 0.3s ease;
}

.employee-photo-wrapper:hover .employee-photo {
    filter: grayscale(0%); /* Цветное при наведении */
}

.employee-photo-active {
    filter: grayscale(0%) !important; /* Цветное для активного фото (информация открыта) */
}

/* Блок с информацией о сотруднике */
.employee-info-tile {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    box-sizing: border-box;
    cursor: pointer;
    transform: translateZ(0);
    will-change: transform;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    /* Высота должна точно соответствовать employee-photo-wrapper */
}

.employee-info-wrapper {
    width: 100%;
    height: 100%; /* Занимает всю высоту родителя, как и фото */
    position: relative;
    background-color: var(--moa-text-on-dark);
    box-sizing: border-box;
}

.employee-info-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: var(--moa-text-on-light-muted);
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    z-index: 11;
}

.employee-info-close:hover {
    color: var(--moa-text-on-light);
}

.employee-info-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    max-height: 100%;
    padding: 20px;
    padding-top: 40px; /* Место для кнопки закрытия */
    overflow-y: auto;
    box-sizing: border-box;
    overflow-x: hidden;
}

.employee-info-name {
    font-family: var(--moa-font-family-book);
    font-weight: normal;
    font-size: var(--text-list-team-size);
    line-height: var(--text-list-team-lh);
    letter-spacing: var(--moa-ls-body);
    margin-bottom: 8px;
    color: var(--moa-text-on-light);
}

.employee-info-position {
    font-family: var(--moa-font-family-book);
    font-weight: normal;
    font-size: var(--text-list-team-size);
    line-height: var(--text-list-team-lh);
    letter-spacing: var(--moa-ls-body);
    color: var(--moa-text-on-light-muted);
    margin-bottom: 12px;
    font-style: normal;
}

.employee-info-biography {
    font-family: var(--moa-font-family);
    font-weight: 200;
    font-size: var(--text-body-sm-size);
    line-height: var(--text-body-sm-lh);
    letter-spacing: var(--moa-ls-body);
    color: var(--moa-text-on-light-muted);
    white-space: pre-wrap;
}

.department-section {
    margin-bottom: 3rem;
}

.department-section h2 {
    font-family: var(--moa-font-family);
    font-weight: 400;
    font-size: var(--text-list-team-size);
    line-height: var(--text-list-team-lh);
    letter-spacing: var(--moa-ls-body);
    color: var(--moa-text-on-light);
}

/* Team: Masonry/плитка для карточек отделов (без разрывов по высоте) */
.department-masonry {
    column-count: 1;
    column-gap: 1.5rem;
}

@media (min-width: 768px) {
    .department-masonry {
        column-count: 2;
    }
}

.department-masonry__item {
    display: inline-block;
    width: 100%;
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    page-break-inside: avoid;
}

/* Адаптивность для мобильных - Team */
@media (max-width: 576px) {
    .employee-info-content {
        padding: 15px;
        padding-top: 35px;
    }
}

/* ============================================
   МОДУЛЬ: PRIMARY (Главная страница)
   ============================================ */

/* Таймлайн */
.timeline-container {
    position: relative;
    width: 100%;
    padding: 0;
    margin: 0;
    min-height: 50px;
}

.timeline-line {
    position: absolute;
    top: 50%;
    left: 0;
    width: calc(100% + 100px);
    height: 1px;
    background-color: var(--moa-text-on-light);
    transform: translateY(-50%);
    z-index: 1;
    pointer-events: none; /* Линия не должна перехватывать клики */
}

.timeline-line::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid var(--moa-border);
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
}

.timeline-years {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    z-index: 2;
    min-height: 50px;
}

.timeline-year-item {
    display: block;
    cursor: pointer;
    user-select: none;
    position: relative;
    z-index: 10;
    padding: 0 5px;
    margin: 0 -5px;
    pointer-events: auto; /* Убеждаемся, что элемент кликабелен */
    flex: 0 0 auto;
}

.timeline-year-item:has(.timeline-year-circle:not(.has-projects)) {
    cursor: default;
    pointer-events: none;
}

.timeline-year-label {
    position: relative !important;
    font-size: 14px;
    color: var(--moa-text-on-light-muted);
    transition: color 0.3s ease;
    pointer-events: none; /* Текст не должен перехватывать клики */
    cursor: pointer;
    line-height: 1;
    white-space: nowrap;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.timeline-year-label--top {
    top: 0;
    margin-bottom: 30px;
}

.timeline-year-label--bottom {
    bottom: 0;
    margin-top: 30px;
}

.timeline-year-item:hover .timeline-year-label {
    color: var(--moa-text-on-light);
}

.timeline-year-circle {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid var(--moa-border);
    background-color: var(--moa-text-on-dark);
    transition: all 0.3s ease;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 11;
    cursor: pointer;
    pointer-events: auto;
    margin: 0;
}

.timeline-year-circle:not(.has-projects) {
    background-color: #999;
    border-color: var(--moa-text-on-light);
    cursor: default;
    pointer-events: none;
}

.timeline-year-circle.has-projects {
    cursor: pointer;
}

.timeline-year-circle.has-projects:hover {
    transform: translate(-50%, -50%) scale(1.3);
}

.timeline-year-circle.active {
    background-color: var(--moa-text-on-dark);
    border-color: var(--moa-text-on-light);
    transform: translate(-50%, -50%);
}

.timeline-year-circle.active::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background-color: var(--moa-text-on-light);
}

.timeline-year-item.active .timeline-year-label {
    color: var(--moa-text-on-light);
    font-weight: 600;
}

/* Контейнер проектов по годам */
#projectsByYearContainer {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease, height 0.4s ease, min-height 0.4s ease;
    min-height: 200px; /* Минимальная высота для предотвращения скачков */
    overflow: hidden;
    will-change: opacity, visibility, height, min-height;
    transform: translateZ(0); /* Аппаратное ускорение */
    box-sizing: border-box;
}

#projectsByYearContainer.visible {
    opacity: 1;
    visibility: visible;
}

#projectsByYearContainer.loading {
    opacity: 0.6;
}

#projectsByYearContainer.hiding {
    opacity: 0;
    visibility: hidden;
}

/* Плавное появление проектов */
#projectsByYear {
    opacity: 1;
    transition: opacity 0.3s ease;
    will-change: opacity;
}

#projectsByYear.hiding {
    opacity: 0;
}

#projectsByYear .project-col {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    will-change: opacity, transform;
}

#projectsByYear.visible .project-col {
    opacity: 1;
    transform: translateY(0);
}

/* Задержка появления для каждого проекта */
#projectsByYear.visible .project-col:nth-child(1) {
    transition-delay: 0.05s;
}

#projectsByYear.visible .project-col:nth-child(2) {
    transition-delay: 0.1s;
}

#projectsByYear.visible .project-col:nth-child(3) {
    transition-delay: 0.15s;
}

#projectsByYear.visible .project-col:nth-child(4) {
    transition-delay: 0.2s;
}

#projectsByYear.visible .project-col:nth-child(5) {
    transition-delay: 0.25s;
}

#projectsByYear.visible .project-col:nth-child(6) {
    transition-delay: 0.3s;
}

#projectsByYear.visible .project-col:nth-child(n+7) {
    transition-delay: 0.35s;
}

/* Мобильный таймлайн */
.mobile-timeline-container {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    padding: 20px 0;
    position: relative;
}

.mobile-timeline-container::-webkit-scrollbar {
    height: 4px;
}

.mobile-timeline-container::-webkit-scrollbar-track {
    background: #f0f0f0;
}

.mobile-timeline-container::-webkit-scrollbar-thumb {
    background: var(--moa-bg-black);
    border-radius: 3px;
}

.mobile-timeline-track {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 20px;
    padding: 0 10px;
    min-width: max-content;
}

.mobile-timeline-year {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    padding-right: 20px;
    position: relative;
}

.mobile-timeline-year-label {
    font-size: 72px;
    font-weight: 700;
    color: var(--moa-text-on-light);
    line-height: 1;
    white-space: nowrap;
}

.mobile-timeline-project {
    flex-shrink: 0;
    width: 200px;
}

.mobile-timeline-project-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.mobile-timeline-project-link:hover {
    text-decoration: none;
    color: inherit;
}

.mobile-timeline-project-image-wrapper {
    width: 200px;
    height: 200px;
    position: relative;
    overflow: hidden;
    background-color: #f5f5f5;
    border-radius: 3px;
    margin-bottom: 10px;
}

.mobile-timeline-project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: none;
    transition: transform 0.3s ease;
}

.mobile-timeline-project-link:hover .mobile-timeline-project-image {
    transform: scale(1.05);
}

.mobile-timeline-project-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--moa-text-on-light);
    line-height: 1.3;
    text-align: left;
}

.mobile-timeline-project-year {
    font-weight: 300;
    margin-left: 0.5em;
    white-space: nowrap;
}

/* Десктопная карусель проектов */
.desktop-timeline-container {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 40px 0;
    position: relative;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    /* Скрываем стандартный индикатор скролла, но сохраняем возможность прокрутки */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.desktop-timeline-container:active {
    cursor: grabbing;
}

.desktop-timeline-container.dragging {
    cursor: grabbing;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.desktop-timeline-container::-webkit-scrollbar {
    display: none; /* WebKit: полностью скрываем полосу прокрутки */
}

.desktop-timeline-track {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 30px;
    min-width: max-content;
}

.desktop-timeline-year {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    padding-right: 30px;
    position: relative;
}

.desktop-timeline-year-label {
    font-size: 96px;
    font-weight: 700;
    color: var(--moa-text-on-light);
    line-height: 1;
    white-space: nowrap;
}

.desktop-timeline-project {
    flex-shrink: 0;
    width: 400px;
}

.desktop-timeline-project-link {
    text-decoration: none;
    color: inherit;
    display: block;
    cursor: pointer;
    user-select: auto;
    -webkit-user-select: auto;
    -moz-user-select: auto;
    -ms-user-select: auto;
}

.desktop-timeline-project-link:hover {
    text-decoration: none;
    color: inherit;
}

.desktop-timeline-project-image-wrapper {
    width: 400px;
    height: 300px;
    position: relative;
    overflow: hidden;
    background-color: #f5f5f5;
    border-radius: 3px;
    box-sizing: border-box;
}

.desktop-timeline-project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: none;
    transition: transform 0.3s ease;
}

.desktop-timeline-project-link:hover .desktop-timeline-project-image {
    transform: scale(1.05);
}

.desktop-timeline-project-title {
    margin-top: 1rem;
    font-weight: 500;
    color: var(--moa-text-on-light);
    line-height: 1.3;
    text-align: left;
}

.desktop-timeline-project-year {
    font-weight: 300;
    margin-left: 0.5em;
}

/* Фильтры по типологии */
.typology-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-start;
    align-items: center;
}

.typology-filters-details {
    display: block;
}

.typology-filters-summary {
    display: none; /* показываем только на мобильных */
    cursor: pointer;
    user-select: none;
    list-style: none;
    padding: 10px 12px;
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.02);
    border: 1.5px solid rgba(229, 229, 229, 1);
    color: rgba(0, 0, 0, 0.9);
    font-family: var(--moa-font-family);
    font-weight: 500;
    font-size: 14px;
    line-height: 1.2;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.typology-filters-summary::-webkit-details-marker {
    display: none;
}

/* Убираем дефолтную «стрелочку» summary в современных браузерах */
.typology-filters-summary::marker {
    content: "";
}

.typology-filters-summary__label {
    opacity: 0.65;
    font-weight: 500;
}

.typology-filters-summary__value {
    margin-left: auto;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.95);
    text-align: right;
}

.typology-filter-btn {
    background: rgba(0, 0, 0, 0.02);
    border: 1.5px solid rgba(229, 229, 229, 1);
    color: rgba(178, 178, 178, 1);
    cursor: pointer;
    font-size: 14px;
    font-weight: 400;
    padding: 7px 16px;
    text-decoration: none;
    transition: all 0.2s ease;
    border-radius: 3px;
    font-family: var(--moa-font-family);
    white-space: nowrap;
    line-height: auto;
}

.typology-filter-btn:hover {
    background-color: rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.55);
    color: rgba(0, 0, 0, 0.9);
}

.typology-filter-btn.active {
    background-color: rgba(0, 0, 0, 1);
    border-color: rgba(0, 0, 0, 0.65);
    color: rgba(255, 255, 255, 1);
}

.typology-filter-btn.active:hover {
    background-color: rgba(0, 0, 0, 0.16);
    border-color: rgba(0, 0, 0, 0.75);
}

.typology-filter-btn:focus-visible {
    outline: 2px solid rgba(0, 0, 0, 0.35);
    outline-offset: 2px;
}

/* Мобильный раскрывающийся список типологий */
@media (max-width: 991px) {
    .typology-filters-summary {
        display: flex;
        width: 100%;
    }
    
    .typology-filters {
        margin-top: 12px;
    }
}

/* На десктопе summary не нужен, список всегда виден */
@media (min-width: 992px) {
    .typology-filters-details {
        border: none;
        padding: 0;
        background: transparent;
    }
}

/* Адаптивность - Primary */
@media (max-width: 768px) {
    .timeline-year-label {
        font-size: 12px;
    }
}

@media (max-width: 576px) {
    .timeline-year-label {
        font-size: 10px;
    }
    
    .mobile-timeline-year-label {
        font-size: 60px;
    }
    
    .mobile-timeline-project {
        width: 180px;
    }
    
    .mobile-timeline-project-image-wrapper {
        width: 180px;
        height: 180px;
    }
    
    .typology-filters {
        gap: 8px;
    }
    
    .typology-filter-btn {
        font-size: 12px;
        padding: 6px 16px;
    }
}

/* ============================================
   МОДУЛЬ: PROJECTS (Список проектов)
   ============================================ */

.projects-row {
    padding-left: 10px;
    padding-right: 10px;
}

.project-col {
    box-sizing: border-box;
    padding: 0;
    margin-bottom: 2rem;
}

/* Отступы для колонок: 1,2,3 - правый отступ, 4 - левый отступ */
.project-col:nth-child(4n+1),
.project-col:nth-child(4n+2),
.project-col:nth-child(4n+3) {
    padding-right: 10px;
}

.project-col:nth-child(4n+4) {
    padding-left: 0;
}

.project-tile-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.project-tile-link:hover {
    text-decoration: none;
    color: inherit;
}

.project-tile {
    width: 100%;
    box-sizing: border-box;
    background-color: var(--moa-text-on-dark);
    overflow: hidden;
}

.project-cover-wrapper {
    width: 100%;
    height: 300px; /* Фиксированная высота для всех изображений */
    position: relative;
    overflow: hidden;
    border-radius: 3px;
    background-color: #f5f5f5;
    box-sizing: border-box;
}

.project-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: grayscale(100%); /* Черно-белое по умолчанию */
    transition: transform 0.3s ease, filter 0.3s ease;
}

.project-tile-link:hover .project-cover {
    transform: scale(1.05);
    filter: grayscale(0%); /* Цветное при наведении */
}


.project-tile-link:hover .project-title {
    color: var(--moa-text-on-light);
}

.project-tile .project-title {
    margin-top: 1rem;
    font-weight: 500;
}

.project-title-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.project-title-link:hover {
    text-decoration: none;
    color: inherit;
}

.project-title-link:hover .project-title {
    color: var(--moa-text-on-light);
}

/* Адаптивность для мобильных - Projects */
@media (max-width: 768px) {
    .project-cover-wrapper {
        height: 250px; /* Меньшая высота для планшетов */
    }
    
    .project-title {
        font-size: 16px;
        padding: 0.75rem 0;
    }
    
    .projects-row {
        padding-left: 5px;
        padding-right: 5px;
    }
}

@media (max-width: 576px) {
    .project-cover-wrapper {
        height: 200px; /* Еще меньшая высота для мобильных */
    }
    
    .project-title {
        font-size: 14px;
        padding: 0.5rem 0;
    }
}

/* ============================================
   МОДУЛЬ: PROJECT (Страница проекта)
   ============================================ */

.project-hero {
    width: 100%;
    overflow: hidden;
    background-color: #f5f5f5;
}

.project-hero-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}

.project-section {
    margin-bottom: 3rem;
}

.project-section-title {
    font-family: var(--moa-font-family);
    font-weight: var(--text-h2-weight);
    font-size: var(--text-h2-size);
    line-height: var(--text-h2-lh);
    letter-spacing: var(--moa-ls-heading);
    color: var(--moa-text-on-light);
    margin-bottom: 1.5rem;
}

.project-description,
.project-philosophy {
    font-family: var(--moa-font-family);
    font-weight: 200;
    font-size: var(--text-body-size);
    line-height: var(--text-body-lh);
    letter-spacing: var(--moa-ls-body);
    color: var(--moa-text-on-light-muted);
    text-align: justify;
}

/* Участники проекта */
.project-participants {
    margin-top: 1.5rem;
}

.participants-role-group {
    margin-bottom: 2rem;
}

.participants-role-group:last-child {
    margin-bottom: 0;
}

.participants-role-title {
    font-family: var(--moa-font-family);
    font-weight: var(--text-h4-weight);
    font-size: var(--text-h4-size);
    line-height: var(--text-h4-lh);
    letter-spacing: var(--moa-ls-heading);
    color: var(--moa-text-on-light);
    margin-bottom: 1rem;
}

.participants-list {
    font-size: 1rem;
    color: var(--moa-text-on-light-muted);
    line-height: 1.6;
}

.participants-list strong {
    margin-right: 0.5rem;
}

.participant-names-comma {
    display: inline;
}

.participant-name-nowrap {
    white-space: nowrap;
}

.participant-item {
    position: relative;
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 3px;
}

.participant-name {
    font-size: 1rem;
    color: var(--moa-text-on-light-muted);
    font-weight: 500;
}

.participant-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 0.5rem;
    padding: 0.75rem 1rem;
    background-color: rgba(0, 0, 0, 0.9);
    color: var(--moa-text-on-dark);
    font-size: 0.875rem;
    line-height: 1.5;
    border-radius: 3px;
    white-space: normal;
    min-width: 200px;
    max-width: 300px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
    text-align: left;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    word-wrap: break-word;
}

.participant-item:hover .participant-tooltip {
    opacity: 1;
    visibility: visible;
}

.participant-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
}

.project-info-card {
    background-color: #f9f9f9;
    padding: 2rem;
    border-radius: 3px;
    margin-top: 30px;

}

.contact-info-block {
    background-color: transparent;
    padding: 0;
    margin-bottom: 150px;
}

.contact-info-block .project-info-title {
    margin-bottom: 3rem;
}

.contact-info-block .project-info-item {
    display: grid;
    grid-template-columns: 1fr 4fr;
    gap: 1rem;
    align-items: baseline;
    margin-bottom: 0;
    padding-bottom: 1rem;
}

.contact-info-block .project-info-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.contact-info-block .project-info-label {
    text-align: left;
    display: block;
}

.contact-info-block .project-info-value {
    text-align: left;
    margin-left: 0;
    display: block;
}

.project-info-title {
    font-family: var(--moa-font-family-book);
    font-weight: var(--text-h3-weight);
    font-size: var(--text-h3-size);
    line-height: var(--text-h3-lh);
    letter-spacing: var(--moa-ls-heading);
    color: var(--moa-text-on-light);
    margin-bottom: 1.5rem;
}

.project-info-item {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
}

.project-info-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.project-info-item-block {
    display: block;
    flex-wrap: nowrap;
}

.project-info-label {
    display: inline;
    font-family: var(--moa-font-family);
    font-weight: 200;
    font-size: var(--text-list-project-label-size);
    line-height: var(--text-list-project-label-lh);
    letter-spacing: var(--moa-ls-body);
    color: var(--moa-text-on-light-muted);
    white-space: nowrap;
}

.project-info-item-block .project-info-label {
    display: block;
    margin-bottom: 0.25rem;
}

.project-info-value {
    display: inline;
    font-family: var(--moa-font-family);
    font-weight: 400;
    font-size: var(--text-list-project-value-size);
    line-height: var(--text-list-project-value-lh);
    letter-spacing: var(--moa-ls-body);
    color: var(--moa-text-on-light);
    text-align: right;
    margin-left: auto;
}

.project-info-value a {
    color: var(--moa-text-on-light);
    text-decoration: none;
    transition: color 0.2s ease;
}

.project-info-value a:hover {
    color: var(--moa-text-on-light-muted);
    text-decoration: underline;
}

.project-info-item-block .project-info-value {
    display: block;
    text-align: left;
    margin-left: 0;
}

.project-info-item-inline {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.project-info-item-inline .project-info-field {
    flex: 1;
    min-width: 150px;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.project-info-item-inline .project-info-field .project-info-label {
    display: inline;
    font-family: var(--moa-font-family);
    font-weight: 200;
    font-size: var(--text-list-project-label-size);
    line-height: var(--text-list-project-label-lh);
    letter-spacing: var(--moa-ls-body);
    color: var(--moa-text-on-light-muted);
    white-space: nowrap;
}

.project-info-item-inline .project-info-field .project-info-value {
    display: inline;
    font-family: var(--moa-font-family);
    font-weight: 400;
    font-size: var(--text-list-project-value-size);
    line-height: var(--text-list-project-value-lh);
    letter-spacing: var(--moa-ls-body);
    color: var(--moa-text-on-light);
    flex: 1;
    min-width: 0;
}

/* .project-photos-row - стили применяются через padding в media queries */

.project-photo-item {
    width: 100%;
    position: relative;
    padding-bottom: 75%;
    overflow: hidden;
    background-color: #f5f5f5;
    cursor: pointer;
    border-radius: 3px;
}

.project-photo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: grayscale(100%); /* Черно-белое по умолчанию */
    transition: transform 0.3s ease, filter 0.3s ease;
}

.project-photo-item:hover .project-photo {
    transform: scale(1.05);
    filter: grayscale(0%); /* Цветное при наведении */
}

.project-team-row {
    padding-left: 10px;
    padding-right: 10px;
}

.project-team-member {
    text-align: center;
}

.team-member-photo-wrapper {
    width: 100%;
    padding-bottom: 100%;
    position: relative;
    overflow: hidden;
    background-color: #f5f5f5;
    border-radius: 3px;
    margin-bottom: 1rem;
}

.team-member-photo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.project-team-member:hover .team-member-photo {
    filter: grayscale(0%);
}

.team-member-info {
    text-align: left;
}

.team-member-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--moa-text-on-light);
    margin-bottom: 0.25rem;
}

.team-member-position {
    font-size: 0.875rem;
    color: var(--moa-text-on-light-muted);
    font-style: italic;
    margin-bottom: 0.25rem;
}

.team-member-role {
    font-size: 0.875rem;
    color: var(--moa-text-on-light-muted);
    margin-top: 0.5rem;
}

/* Полноэкранный слайдер фотографий */
.photo-slider-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #f5f5f5;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 80px 70px 60px;
    box-sizing: border-box;
}

.photo-slider-overlay.active {
    opacity: 1;
}

.photo-slider-header {
    position: absolute;
    top: 24px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    pointer-events: none;
}

.photo-slider-title {
    font-size: 18px;
    line-height: 1.2;
    color: rgba(0, 0, 0, 0.95);
    font-weight: 500;
    text-align: center;
    max-width: min(900px, calc(100vw - 140px));
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.photo-slider-close {
    position: absolute;
    top: 18px;
    right: 22px;
    background: transparent;
    border: none;
    color: rgba(0, 0, 0, 0.55);
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10001;
    padding: 0;
}

.photo-slider-close:hover {
    color: rgba(0, 0, 0, 0.9);
}

.photo-slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: rgba(0, 0, 0, 0.35);
    font-size: 44px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10001;
    padding: 0;
    user-select: none;
}

.photo-slider-nav:hover {
    color: rgba(0, 0, 0, 0.85);
}

.photo-slider-prev {
    left: 100px;
}

.photo-slider-next {
    right: 100px;
}

.photo-slider-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 0;
    box-sizing: border-box;
}

.photo-slider-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
    width: 100%;
    height: 100%;
}

.photo-slider-slide {
    min-width: 100%;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
}

.photo-slider-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
    user-select: none;
    -webkit-user-drag: none;
    display: block;
    background-color: var(--moa-text-on-dark);
    border-radius: 2px;
}

.photo-slider-counter {
    position: absolute;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(0, 0, 0, 0.55);
    font-size: 14px;
    font-weight: 500;
    background: transparent;
    padding: 0;
    border-radius: 0;
    z-index: 10001;
}

/* Адаптивность для мобильных - Project */
@media (max-width: 768px) {
    .project-info-card {
        padding: 1.5rem;
    }
    
    .project-photos-row,
    .project-team-row {
        padding-left: 5px;
        padding-right: 5px;
    }
    
    /* На мобильных стрелки скрываем — навигация свайпом */
    .photo-slider-prev,
    .photo-slider-next {
        display: none;
    }
    
    .photo-slider-close {
        top: 12px;
        right: 12px;
        font-size: 30px;
    }
    
    .photo-slider-counter {
        bottom: 14px;
        font-size: 13px;
        padding: 0;
    }

    .photo-slider-overlay {
        padding: 70px 16px 50px;
    }

    .photo-slider-title {
        max-width: calc(100vw - 32px);
    }
}

@media (max-width: 576px) {
    .photo-slider-nav {
        font-size: 32px;
    }
    
    .photo-slider-counter {
        bottom: 12px;
        font-size: 13px;
        padding: 0;
    }
}

/* ============================================
   МОДУЛЬ: CHANNEL (Блог/Канал)
   ============================================ */

.posts-list {
    max-width: 800px;
    margin: 0 auto;
}

.post-item {
    transition: opacity 0.2s;
}

.post-item:hover {
    opacity: 0.9;
}

.post-cover-wrapper {
    width: 100%;
    max-height: 400px;
    overflow: hidden;
    border-radius: 3px;
    background-color: #f5f5f5;
}

.post-cover-link {
    display: block;
    width: 100%;
    text-decoration: none;
}

.post-cover {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.post-cover-link:hover .post-cover {
    transform: scale(1.02);
}

.post-title {
    font-family: var(--moa-font-family);
    font-weight: var(--text-h1-weight);
    font-size: var(--text-h1-size);
    line-height: var(--text-h1-lh);
    letter-spacing: var(--moa-ls-heading);
}

.post-title a:hover {
    color: var(--moa-text-on-light-muted) !important;
}

.post-content {
    font-family: var(--moa-font-family);
    font-weight: 200;
    font-size: var(--text-body-size);
    line-height: var(--text-body-lh);
    letter-spacing: var(--moa-ls-body);
    color: var(--moa-text-on-light-muted);
}

.post-content p {
    margin-bottom: 1rem;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    letter-spacing: var(--moa-ls-heading);
}

.post-content h1 {
    font-family: var(--moa-font-family);
    font-weight: var(--text-h1-weight);
    font-size: var(--text-h1-size);
    line-height: var(--text-h1-lh);
}

.post-content h2 {
    font-family: var(--moa-font-family);
    font-weight: var(--text-h2-weight);
    font-size: var(--text-h2-size);
    line-height: var(--text-h2-lh);
}

.post-content h3 {
    font-family: var(--moa-font-family-book);
    font-weight: var(--text-h3-weight);
    font-size: var(--text-h3-size);
    line-height: var(--text-h3-lh);
}

.post-content h4 {
    font-family: var(--moa-font-family);
    font-weight: var(--text-h4-weight);
    font-size: var(--text-h4-size);
    line-height: var(--text-h4-lh);
}

.post-content ul,
.post-content ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.post-content code {
    background-color: #f5f5f5;
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-size: 0.9em;
    font-family: 'Courier New', monospace;
}

.post-content pre {
    background-color: #f5f5f5;
    padding: 1rem;
    border-radius: 3px;
    overflow-x: auto;
    margin-bottom: 1rem;
}

.post-content pre code {
    background-color: transparent;
    padding: 0;
}

.post-content blockquote {
    border-left: 4px solid #ddd;
    padding-left: 1rem;
    margin: 1rem 0;
    color: var(--moa-text-on-light-muted);
    font-style: italic;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 3px;
    margin: 1rem 0;
}

.post-content a {
    color: var(--moa-text-on-light);
    text-decoration: underline;
}

.post-content a:hover {
    color: var(--moa-text-on-light-muted);
}

.post-photos-title {
    font-family: var(--moa-font-family);
    font-weight: var(--text-h2-weight);
    font-size: var(--text-h2-size);
    line-height: var(--text-h2-lh);
    letter-spacing: var(--moa-ls-heading);
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

/* Стили для карточек постов в списке */
.post-card-meta {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.post-card-date {
    font-size: 0.875rem;
    color: var(--moa-text-on-light-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

.post-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    justify-content: flex-end;
    margin-left: auto;
}

.post-card-tags .badge {
    font-size: 0.7rem;
    padding: 0.25em 0.5em;
    font-weight: 400;
}

/* Адаптивность - Channel */
@media (max-width: 768px) {
    .post-cover-wrapper {
        max-height: 300px;
    }

    .post-photos-row {
        padding-left: 5px;
        padding-right: 5px;
    }
}

/* ============================================
   HEADER: user menu
   ============================================ */

.user-menu {
    gap: 12px;
    padding: 10px 18px;
    background-color: #f8f9fa;
    border: 1.5px solid var(--moa-border);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.user-menu:hover {
    background-color: #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-decoration: none;
    color: inherit;
}

.user-name {
    font-family: var(--moa-font-family);
    font-weight: 400;
    font-size: var(--text-body-sm-size);
    line-height: var(--text-body-sm-lh);
    letter-spacing: var(--moa-ls-body);
    color: var(--moa-text-on-light);
    transition: color 0.2s ease;
}

.user-info:hover .user-name {
    color: var(--moa-text-on-light-muted);
    text-decoration: underline;
}

.user-role {
    font-family: var(--moa-font-family-book);
    font-weight: normal;
    font-size: var(--text-body-sm-size);
    line-height: var(--text-body-sm-lh);
    letter-spacing: var(--moa-ls-body);
    color: var(--moa-text-on-light-muted);
    text-transform: capitalize;
}

.admin-badge {
    color: #28a745;
    font-weight: 600;
}

.logout-form {
    margin: 0;
    padding: 0;
}

.btn-logout {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    font-family: var(--moa-font-family);
    font-weight: 400;
    font-size: var(--text-body-sm-size);
    line-height: var(--text-body-sm-lh);
    letter-spacing: var(--moa-ls-body);
    padding: 6px 12px;
    text-decoration: underline;
    transition: all 0.2s ease;
    border-radius: 4px;
}

.btn-logout:hover {
    background-color: #dc3545;
    color: var(--moa-text-on-dark);
    text-decoration: none;
}

.btn-logout:active {
    transform: scale(0.95);
}

/* ============================================
   AUTH: login
   ============================================ */

.moa-auth .card {
    border-radius: 8px;
}

.moa-auth .form-control {
    border: 1px solid var(--moa-border);
    border-radius: 4px;
}

.moa-auth .form-control:focus {
    border-color: var(--moa-text-on-light);
    box-shadow: 0 0 0 0.2rem rgba(0, 0, 0, 0.25);
}

.moa-auth .btn-dark {
    background-color: var(--moa-text-on-light);
    border-color: var(--moa-text-on-light);
    font-weight: 500;
}

.moa-auth .btn-dark:hover {
    background-color: color-mix(in srgb, var(--moa-bg-black) 75%, var(--moa-bg-white));
    border-color: color-mix(in srgb, var(--moa-bg-black) 75%, var(--moa-bg-white));
}

.moa-auth .btn-outline-dark {
    border-color: var(--moa-text-on-light);
    color: var(--moa-text-on-light);
    font-weight: 500;
}

.moa-auth .btn-outline-dark:hover {
    background-color: var(--moa-text-on-light);
    border-color: var(--moa-text-on-light);
    color: var(--moa-text-on-dark);
}

.moa-auth .alert {
    border-radius: 4px;
}

/* ============================================
   ERROR PAGE: 403
   ============================================ */

.moa-error-page .display-1 {
    font-size: 8rem;
    font-weight: 900;
    color: var(--moa-text-on-light);
}

.moa-error-page h2 {
    font-family: var(--moa-font-family);
    font-weight: var(--text-h2-weight);
    font-size: var(--text-h2-size);
    line-height: var(--text-h2-lh);
    letter-spacing: var(--moa-ls-heading);
}

.moa-error-page .lead {
    font-size: var(--text-body-size);
    line-height: var(--text-body-lh);
    letter-spacing: var(--moa-ls-body);
    color: var(--moa-text-on-light-muted);
}

.moa-error-page .btn-dark {
    background-color: var(--moa-text-on-light);
    border-color: var(--moa-text-on-light);
    font-weight: 500;
    padding: 0.75rem 2rem;
}

.moa-error-page .btn-dark:hover {
    background-color: color-mix(in srgb, var(--moa-bg-black) 75%, var(--moa-bg-white));
    border-color: color-mix(in srgb, var(--moa-bg-black) 75%, var(--moa-bg-white));
}

.moa-error-page .btn-outline-dark {
    border-color: var(--moa-text-on-light);
    color: var(--moa-text-on-light);
    font-weight: 500;
    padding: 0.75rem 2rem;
}

.moa-error-page .btn-outline-dark:hover {
    background-color: var(--moa-text-on-light);
    border-color: var(--moa-text-on-light);
    color: var(--moa-text-on-dark);
}

/* ============================================
   ADMIN UI
   ============================================ */

.moa-admin .card {
    border-radius: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.moa-admin .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.moa-admin .btn-dark {
    background-color: var(--moa-text-on-light);
    border-color: var(--moa-text-on-light);
    font-weight: 500;
    padding: 0.5rem 1.5rem;
}

.moa-admin .btn-dark:hover {
    background-color: color-mix(in srgb, var(--moa-bg-black) 75%, var(--moa-bg-white));
    border-color: color-mix(in srgb, var(--moa-bg-black) 75%, var(--moa-bg-white));
}

.moa-admin .btn-outline-dark {
    border-color: var(--moa-text-on-light);
    color: var(--moa-text-on-light);
    font-weight: 500;
}

.moa-admin .btn-outline-dark:hover {
    background-color: var(--moa-text-on-light);
    border-color: var(--moa-text-on-light);
    color: var(--moa-text-on-dark);
}

.moa-admin .btn-outline-danger {
    border-color: #dc3545;
    color: #dc3545;
}

.moa-admin .btn-outline-danger:hover {
    background-color: #dc3545;
    border-color: #dc3545;
    color: var(--moa-text-on-dark);
}

.moa-admin .btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
}

.moa-admin .btn-danger:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

.moa-admin .btn-outline-primary {
    border-color: #0d6efd;
    color: #0d6efd;
}

.moa-admin .btn-outline-primary:hover {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: var(--moa-text-on-dark);
}

.moa-admin .btn-outline-warning {
    border-color: #ffc107;
    color: #ffc107;
}

.moa-admin .btn-outline-warning:hover {
    background-color: #ffc107;
    border-color: #ffc107;
    color: var(--moa-text-on-light);
}

.moa-admin .badge {
    font-size: 0.75rem;
    padding: 0.35em 0.65em;
}

.moa-admin .table {
    margin-bottom: 0;
}

.moa-admin .table th {
    border-top: none;
    background-color: #f8f9fa;
}

.moa-admin .table td {
    vertical-align: middle;
}

.moa-admin .btn-group-sm .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.moa-admin .modal-content {
    border-radius: 8px;
}

.moa-admin .form-control,
.moa-admin .form-select {
    border: 1px solid var(--moa-border);
    border-radius: 4px;
}

.moa-admin .form-control:focus,
.moa-admin .form-select:focus {
    border-color: var(--moa-text-on-light);
    box-shadow: 0 0 0 0.2rem rgba(0, 0, 0, 0.25);
}

.moa-admin .text-muted {
    color: var(--moa-text-on-light-muted) !important;
}

.moa-admin-pregen-track {
    background: #eee;
    border-radius: 4px;
    height: 24px;
    overflow: hidden;
}

.moa-admin-pregen-bar {
    background: var(--moa-bg-black);
    height: 100%;
    width: 0%;
    transition: width 0.2s;
}

.moa-admin .alert {
    border-radius: 4px;
}

.moa-admin .nav-tabs {
    border-bottom: 2px solid var(--moa-border);
}

.moa-admin .nav-tabs .nav-link {
    color: var(--moa-text-on-light);
    border: none;
    border-bottom: 2px solid transparent;
}

.moa-admin .nav-tabs .nav-link:hover {
    border-bottom-color: #ccc;
}

.moa-admin .nav-tabs .nav-link.active {
    color: var(--moa-text-on-light);
    background-color: transparent;
    border-bottom-color: var(--moa-text-on-light);
    font-weight: 600;
}

/* Markdown editor (edit_posts) */
.moa-admin .markdown-editor-wrapper {
    position: relative;
}

.moa-admin .markdown-toolbar {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
    padding: 0.5rem;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px 4px 0 0;
}

.moa-admin .markdown-toolbar .btn {
    border: 1px solid #ced4da;
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
}

.moa-admin .markdown-toolbar .btn:hover {
    background-color: #e9ecef;
}

.moa-admin .markdown-editor {
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    line-height: 1.6;
    border-radius: 0 0 4px 4px;
    resize: vertical;
}

.moa-admin .markdown-editor:focus {
    border-color: var(--moa-text-on-light);
    box-shadow: 0 0 0 0.2rem rgba(0, 0, 0, 0.25);
}

/* Gallery (edit_projects) */
.moa-admin #gallery_photos_container {
    margin: 0;
}

.moa-admin #gallery_photos_container .gallery-photo-card {
    transition: transform 0.2s, box-shadow 0.2s;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.moa-admin #gallery_photos_container .gallery-photo-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2) !important;
}

.moa-admin #gallery_photos_container .gallery-photo-card.border-primary {
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.25);
}

.moa-admin #gallery_photos_container .gallery-photo-wrapper {
    background-color: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.moa-admin #gallery_photos_container .gallery-photo-img {
    transition: transform 0.3s ease;
}

.moa-admin #gallery_photos_container .gallery-photo-card:hover .gallery-photo-img {
    transform: scale(1.05);
}

.moa-admin #gallery_photos_container .badge {
    font-size: 0.75rem;
    padding: 0.35em 0.65em;
    z-index: 10;
}

.moa-admin #gallery_photos_container .card-body {
    flex-grow: 0;
    padding: 0.75rem;
}

.moa-admin #gallery_photos_container .btn-group {
    gap: 0.25rem;
}

.moa-admin #gallery_photos_container .btn-group .btn {
    flex: 1;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

/* ============================================
   CHANNEL: post detail
   ============================================ */

.post-hero {
    width: 100%;
    overflow: hidden;
    background-color: #f5f5f5;
}

.post-hero-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}

.post-detail {
    max-width: 800px;
    margin: 0 auto;
}

.post-content li {
    margin-bottom: 0.5rem;
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.post-content table th,
.post-content table td {
    border: 1px solid #ddd;
    padding: 0.75rem;
    text-align: left;
}

.post-content table th {
    background-color: #f5f5f5;
    font-weight: 600;
}

.post-photos-section {
    margin-top: 3rem;
}

.post-photos-row {
    padding-left: 10px;
    padding-right: 10px;
}

.post-photo-item {
    width: 100%;
    position: relative;
    padding-bottom: 75%;
    overflow: hidden;
    background-color: #f5f5f5;
    cursor: pointer;
    border-radius: 4px;
}

.post-photo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: grayscale(100%);
    transition: transform 0.3s ease, filter 0.3s ease;
}

.post-photo-item:hover .post-photo {
    transform: scale(1.05);
    filter: grayscale(0%);
}
