/* Modern Minimalist Light Gray Theme for Historical Communications Center */

/* ===== GLOBAL STYLES ===== */
:root {
    --primary-color: #663479;
    --primary-light: #a87bca;
    --accent-color: #77488a;
    --link-color: #542666;
    --bg-main: hsl(0, 0%, 95%);
    --bg-light: hsl(0, 0%, 98%);
    --bg-lighter: hsl(0, 0%, 98%);
    --bg-white: hsl(0, 0%, 100%);
    --border-light: hsl(0, 0%, 85%);
    --border-medium: hsl(0, 0%, 80%);
    --text-primary: hsl(0, 0%, 15%);
    --text-secondary: hsl(0, 0%, 30%);
    --text-light: hsl(0, 0%, 45%);
    --border-radius: 10px;
    --transition-fast: all 0.15s ease-out;
    --transition-medium: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.35s ease-out;
    --shadow-xs: 0 0.5px 1px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.07);
    --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 8px rgba(0, 0, 0, 0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

#main>div {
    align-items: flex-start;
}

img {
    border-radius: var(--border-radius);
}

#block-bootstrap-views-block-views-block-front-slider-block-1 {
    margin-bottom: 0;
    margin-top: 2rem;
}
.carousel-item img {
    width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--border-radius);
}
.carousel-item h3 a{
    color: #fff !important;
    text-shadow:
    -1px -1px 0 var(--primary-color),
    1px -1px 0 var(--primary-color),
    -1px 1px 0 var(--primary-color),
    1px 1px 0 var(--primary-color); /* Четыре тени по углам для обводки */
}
/* ===== MODERN LIGHT NAVBAR ===== */
.navbar-dark {
    background-color: var(--primary-color) !important;
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-xs);
    padding: 0.5rem 0;
    transition: var(--transition-medium);
}

.navbar-dark:hover {
    box-shadow: var(--shadow-lg);
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.25rem;
    color: #fff !important;
    padding: 0.5rem 0;
    position: relative;
    overflow: hidden;
}



.node__content>.field--type-image:last-child {
float:none
}

.navbar-brand:hover {
    transform: translateY(-1px);
}

.nav-link {
    font-weight: 500;
    padding: 0.625rem 0.875rem !important;
    color: #fff !important;
    transition: var(--transition-medium);
    border-radius: 8px;
    margin: 0 0.125rem;
    position: relative;
    overflow: hidden;
}

.nav-link:hover,
.nav-link:focus,
.nav-link.active {
    color: var(--primary-color) !important;
    background-color: var(--bg-main);
    transform: translateY(-1px);
    box-shadow: var(--shadow-xs);
}

.dropdown-menu {
    border: 1px solid var(--border-light);
    background-color: var(--bg-white);
    box-shadow: var(--shadow-md);
    border-radius: var(--border-radius);
    margin-top: 0.25rem;
    padding: 0.5rem;
    animation: slideDown 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: top center;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px) scaleY(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scaleY(1);
    }
}

.dropdown-item {
    color: var(--text-secondary);
    padding: 0.625rem 0.875rem;
    border-radius: 6px;
    transition: var(--transition-fast);
    margin: 0.125rem 0;
    position: relative;
    overflow: hidden;
}

.dropdown-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background-color: var(--accent-color);
    transform: scaleY(0);
    transition: transform 0.2s ease-out;
}

.dropdown-item:hover::before {
    transform: scaleY(1);
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: var(--bg-main);
    color: var(--primary-color);
}

.navbar-toggler {
    border: 1px solid var(--border-light);
    padding: 0.5rem 0.75rem;
    transition: var(--transition-fast);
    border-radius: 6px;
}

.navbar-toggler:hover {
    background-color: var(--bg-main);
    border-color: var(--border-medium);
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 3px rgba(119, 72, 138, 0.1);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280, 0, 0, 0.6%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    transition: transform 0.3s ease-out;
}

.navbar-toggler:hover .navbar-toggler-icon {
    transform: rotate(90deg);
}

/* ===== TOP NAV (SECONDARY MENU) ===== */
#navbar-top {
    background-color: var(--bg-lighter) !important;
    padding: 0.375rem 0;
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition-medium);
}

#navbar-top:hover {
    background-color: var(--bg-white);
}

.nav-link--user-login {
    background-color: var(--primary-color);
    color: var(--bg-white) !important;
    border-radius: 6px;
    padding: 0.5rem 1rem !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.nav-link--user-login:hover {
    background-color: var(--link-color);
    transform: translateY(-2px);
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(102, 52, 121, 0.2);
}

@keyframes shimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

.title {
    font-size: 2.75rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 1.25rem;
    position: relative;
    width: 100%;
    display: inline-block;
    animation: titleAppear 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
    transform: translateY(20px);
}

@keyframes titleAppear {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#block-bootstrap-page-title {
    position: relative;
}

.title::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 0;
    width: 60px;
    height: 4px;
    background-color: var(--accent-color);
    border-radius: 2px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
    background-image: none !important;
}

.main-content:hover .title::after {
    width: 100%;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    background-color: var(--bg-light);
    border-radius: var(--border-radius);
    padding: 2.5rem !important;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
    position: relative;
}

.main-content .section:has(table) {
    
    overflow-x: hidden;
}
.main-content:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--border-medium);
}
.node__content:has(table) {
    overflow: auto;
}
#block-bootstrap-system-main {
    margin-top: 2rem;
    animation: fadeIn 0.6s ease-out 0.2s both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ===== SIDEBAR ===== */
.sidebar_first {
    background-color: var(--bg-light);
    border-radius: var(--border-radius);
    padding: 2rem !important;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar_first:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--border-medium);
}

.sidebar .block,
.front_page_text p,
.feature {
    padding: 1.5rem .75rem;
    background-color: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
    position: relative;
}

.sidebar .block:hover,
.front_page_text p:hover,
.feature:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--border-medium);
}

.sidebar .block:last-child {
    margin-bottom: 0;
}

#block-bootstrap-search-form {
    padding: 0;
    background-color: transparent;
    box-shadow: none;
    border: none;
    transition: none;
}

#block-bootstrap-search-form>div,
#block-bootstrap-search-form>div>div,
#search-block-form {
    width: 100%;
}

#search-block-form,
#search-block-form>* {
    margin-bottom: 0 !important;
}

#search-block-form {
    display: flex;
    gap: 15px;
}

.js-form-type-search {
    flex: 1 1 auto;
}

.js-form-type-search input {
    width: 100%;
}

.feature {
    height: 100%;
    transition: all .3s ease-in-out;
}
.feature .title_border {
    display: none;
}
.feature h3 {
    position: relative;
    font-weight: 700;
    text-align: center;
    font-size: 1.25em;
    letter-spacing: -0.03px;
    color: var(--text-primary);
    margin-bottom: 20px;
    transition: all .3s ease-in-out;
}
.feature h3::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 0px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.feature:hover {
    transform: translateY(-4px);
}
.feature:hover h3 {
    color: var(--primary-color);
}
.feature:hover h3::after {
    width: 100%;
}
.search-form {
    margin-bottom: 2rem;
    position: relative;
}

#edit-keys {
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: var(--bg-white);
    position: relative;
}

#edit-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#edit-keys:hover {
    border-color: var(--border-medium);
    background-color: var(--bg-white);
    box-shadow: 0 0 0 2px rgba(119, 72, 138, 0.1);
}

#edit-keys:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(119, 72, 138, 0.1);
    outline: none;
}

#edit-submit, #edit-preview {
    background-color: var(--primary-color);
    border: none;
    padding: 0.875rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    position: relative;
    overflow: hidden;
}


#edit-submit:hover, #edit-submit:hover {
    background-color: var(--link-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 52, 121, 0.25);
}

/* ===== NEWS BLOCKS ===== */
.views-element-container {
    margin-bottom: 2rem;
    position: relative;
}

.views-element-container h2 {
    font-weight: 700;
    font-size: 1.375rem;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-light);
    position: relative;
    transition: border-color 0.3s ease-out;
}

.views-element-container h2::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease-out;
}

.views-element-container:hover h2::after {
    width: 100%;
}

.views-element-container h2 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
}

.views-element-container:hover h2 a {
    color: var(--primary-color);
}

.views-row {
    padding-top: 1.125em;
    padding-bottom: 1.125em;
    border-bottom: 1px solid var(--border-light);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.views-row:last-child {
    border-bottom: none;
}

.views-row::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background-color: var(--accent-color);
    opacity: 0.3;
    transition: width 0.3s ease-out;
}

.views-row:hover {
    background-color: var(--bg-main);
}

.views-row:hover::before {
    width: 4px;
}

.views-field-title a {
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    line-height: 1.5;
    display: inline-block;
}

.views-field-title a:hover {
    transform: translateY(-1px);
}

.sidebar .views-field-title a {
    color: var(--text-secondary);
}

.sidebar .views-field-title a:hover {
    color: var(--link-color);

}

.views-field-created .field-content {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    background-color: var(--bg-main) !important;
    border-radius: 20px;
    font-size: 0.8125rem;
    color: var(--text-light);
    margin-top: 0.5rem;
    transition: all 0.3s ease-out;
    border: 1px solid transparent;
}

.views-row:hover .views-field-created .field-content {
    background-color: var(--accent-color) !important;
    color: var(--bg-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-xs);
    border-color: var(--primary-color);
}

/* ===== FOOTER ===== */
.site-footer {
    background-color: var(--primary-color);
    color: rgba(255, 255, 255, 0.7);
    padding: 2.5rem 0;
    margin-top: 4rem;
    border-top: 1px solid var(--border-light);
    font-size: 0.9375rem;
    transition: all 0.3s ease-out;
}
.site-footer a {
    color: rgba(255, 255, 255, 1);
}
.site-footer a:hover {
    color: rgba(255, 255, 255, 1);
}
.site-footer:hover {
    box-shadow: inset 0 1px 0 var(--border-light);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .title {
        font-size: 2.25rem;
    }

    .main-content,
    .sidebar_first {
        padding: 1.75rem !important;
        margin-bottom: 1.25rem;
    }


    .navbar-nav {
        padding: 1rem 0;
    }

    .nav-link {
        padding: 0.75rem 1rem !important;
        margin: 0.25rem 0;
    }

    .dropdown-menu {
        border: 1px solid var(--border-light);
        box-shadow: var(--shadow-md);
        padding: 0.5rem;
        margin-left: 1rem;
        background-color: var(--bg-white);
    }


    .navbar-brand::after {
        display: none;
    }
}

@media (max-width: 576px) {
    .title {
        font-size: 2rem;
    }

    .navbar-brand {
        font-size: 1.1rem;
    }

    .main-content {
        padding: 1.5rem !important;
    }

    .views-field-title h6 a {
        font-size: 1rem;
    }

    .dropdown-item {

        white-space: normal;
    }
    .sidebar_first.order-first {
        order: unset !important;
    }
}

/* ===== UTILITY CLASSES ===== */
.visually-hidden-focusable:focus {
    position: static !important;
    width: auto !important;
    height: auto !important;
    clip: auto !important;
    white-space: normal !important;
    background-color: var(--primary-color);
    color: var(--bg-white);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s ease-out;
}

/* ===== FORM STYLES ===== */
.form-control {
    border-color: var(--border-light);
    transition: var(--transition-medium);
    background-color: var(--bg-lighter);
}

.form-control:hover {
    border-color: var(--border-medium);
    background-color: var(--bg-white);
}

.form-control:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(119, 72, 138, 0.1);
    background-color: var(--bg-white);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}


.btn-primary:hover {
    background-color: var(--link-color);
    border-color: var(--link-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 52, 121, 0.25);
}

/* ===== BORDER UTILITIES ===== */
.border {
    border-color: var(--border-light) !important;
    transition: border-color 0.3s ease-out;
}

.border:hover {
    border-color: var(--border-medium) !important;
}




/* ===== PRINT STYLES ===== */
@media print {

    .navbar,
    .sidebar_first,
    .site-footer {
        display: none !important;
    }

    .main-content {
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
    }

    body {
        background-color: white !important;
        color: black !important;
    }

    a {
        color: black !important;
        text-decoration: underline !important;
    }
}

/* ===== ADDITIONAL MINIMALIST ELEMENTS ===== */
.container-md {
    max-width: 1200px;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.row-offcanvas {
    gap: 2rem;
    align-items: stretch;
}

/* Clean links */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

a:hover {
    color: var(--link-color);
}

/* Section spacing */
.section {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
    position: relative;
}

.section:first-child {
    padding-top: 0;
}

.section:last-child {
    padding-bottom: 0;
}

/* Clean headings */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 0;
    transition: color 0.3s ease-out;
}

h1:hover,
h2:hover,
h3:hover,
h4:hover,
h5:hover,
h6:hover {
    color: var(--text-primary);
}

/* Smooth transitions for all interactive elements */
button,
input,
select,
textarea,
.btn,
.nav-link,
.dropdown-item,
.card {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Subtle glow effect for interactive elements */
button:hover,
.btn:hover,
.nav-link:hover {
    filter: brightness(1.05);
}

/* Loading animation for dynamic content */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.navbar.bg-primary {
    background-image: none !important;
}

.navbar-expand-lg {
    justify-content: center !important;
}

.navbar-collapse {
    flex-grow: unset;
}

.clearfix::after,
.clearfix::before {
    display: none;
}

#block-bootstrap-bloksekspoziciyamidlyaglavnoystranicy h2 {
    margin-bottom: 20px;
}

.front_page_text .col-md-6 {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.front_page_text p {
    margin-bottom: 0;
    flex: 1 1 auto;
}

#main-wrapper {
    margin-top: 2rem;
}

.pagination {
    margin-top: 2rem;
}

.active>.page-link,
.page-link.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.page-link {
    color: var(--primary-color);
}

.dropdown-item.active, .dropdown-item:active {
    background-color: var(--primary-color);
    color: #fff;
}
.dropdown-item.active a, .dropdown-item:active a{
    color: #fff !important;
}

#block-bootstrap-nizhniytekstdlyaglavnoystranicy .row {
    
    padding-left: calc(.5 * 1.5rem);
    padding-right: calc(.5 * 1.5rem);
}
#block-bootstrap-nizhniytekstdlyaglavnoystranicy p {
    margin-bottom: 20px;
}
.main-content:has(.ya-share2) {
    position: relative;
}
.ya-share2 {
    position: absolute;
    bottom: 0px;
    left: 0px;
}
.main-content:has(.ya-share2) .section {
    padding-bottom: 20px;
}
