/*
Theme Name: UKZHEU Portal Modern
Theme URI: https://ukzheu34.ru
Author: Биба и Боба
Description: Современный портал для УК "ЖЭУ" с новостями
Version: 2.0
License: GPL v2
Text Domain: ukzheu-portal-modern
*/

/* ===== СБРОС И БАЗОВЫЕ СТИЛИ ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Светлая современная цветовая палитра */
    --primary: #4361ee;
    --primary-light: #4895ef;
    --primary-dark: #3a0ca3;
    --secondary: #7209b7;
    --success: #4cc9f0;
    --success-dark: #3a86ff;
    --danger: #f72585;
    --warning: #ff9e00;
    --info: #00bbf9;
    
    /* Нейтральные цвета */
    --light: #f8f9fa;
    --light-gray: #e9ecef;
    --medium-gray: #adb5bd;
    --dark-gray: #495057;
    --dark: #212529;
    
    /* Акценты */
    --accent-green: #06d6a0;
    --accent-yellow: #ffd166;
    --accent-purple: #9d4edd;
    
    /* Тени */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.12);
    
    /* Скругления */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Анимации */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 350ms ease;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
    min-height: 100vh;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

/* ===== КОНТЕЙНЕРЫ ===== */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== ХЕДЕР ===== */
.site-header {
    background: white;
    border-bottom: 1px solid var(--light-gray);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

/* ЛОГОТИП */
.site-branding {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.2s;
}

.logo-link:hover {
    opacity: 0.9;
}

.site-logo-img {
    display: block;
    max-height: 50px;
    width: auto;
    height: auto;
    border-radius: 6px;
    object-fit: contain;
}

.logo-fallback {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    padding: 5px;
}

.logo-text {
    font-size: 16px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.5px;
}

.logo-subtext {
    font-size: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    text-align: center;
    line-height: 1.2;
    margin-top: 2px;
    opacity: 0.9;
}

.site-title-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.site-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark);
    margin: 0;
    line-height: 1.2;
}

.site-title a {
    color: var(--dark);
    text-decoration: none;
}

.site-title a:hover {
    color: var(--primary);
}

.site-description {
    font-size: 13px;
    color: var(--medium-gray);
    margin-top: 3px;
    font-weight: 500;
    max-width: 250px;
}

/* НАВИГАЦИЯ */
.main-navigation {
    flex: 1;
    display: flex;
    justify-content: center;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    width: 30px;
    height: 30px;
    flex-direction: column;
    justify-content: space-between;
    padding: 0;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--dark);
    border-radius: 2px;
    transition: all 0.3s;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 5px;
}

.nav-menu > li {
    position: relative;
}

.nav-menu a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: var(--radius-full);
    font-weight: 500;
    color: var(--dark-gray);
    text-decoration: none;
    transition: all var(--transition-normal);
    white-space: nowrap;
}

.nav-menu a:hover,
.nav-menu .current-menu-item > a {
    color: var(--primary);
    background: rgba(67, 97, 238, 0.08);
}

.nav-menu svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

.menu-item-portal,
.menu-item-login {
    margin-left: 10px;
}

.nav-portal-link {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%) !important;
    color: white !important;
    font-weight: 600 !important;
}

.nav-portal-link:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%) !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md) !important;
}

.nav-login-link {
    background: linear-gradient(135deg, var(--accent-green) 0%, #06d6a0 100%) !important;
    color: white !important;
    font-weight: 600 !important;
}

.nav-login-link:hover {
    background: linear-gradient(135deg, #05b587 0%, #059669 100%) !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md) !important;
}

/* ПОЛЬЗОВАТЕЛЬСКОЕ МЕНЮ */
.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.current-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    background: rgba(67, 97, 238, 0.08);
    border-radius: var(--radius-full);
    transition: background 0.2s;
}

.current-user:hover {
    background: rgba(67, 97, 238, 0.12);
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.user-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--dark);
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.logout-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 50%;
    color: var(--danger);
    text-decoration: none;
    transition: all 0.2s;
}

.logout-btn:hover {
    background: var(--danger);
    color: white;
    transform: rotate(90deg);
}

.logout-btn svg {
    width: 18px;
    height: 18px;
}

/* ===== ОСНОВНОЙ КОНТЕНТ ===== */
.site-main {
    padding: 40px 0;
    min-height: calc(100vh - 180px);
}

/* ===== ФУТЕР ===== */
.site-footer {
    background: linear-gradient(135deg, var(--dark) 0%, #1a1a2e 100%);
    color: white;
    padding: 40px 0 20px;
    position: relative;
    font-size: 14px;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent-green) 100%);
}

.footer-main {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 60px;
    align-items: start;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.footer-company-name {
    font-size: 18px;
    font-weight: 700;
    color: white;
    margin: 0 0 8px 0;
    line-height: 1.2;
}

.footer-company-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
    max-width: 400px;
}

.footer-contacts {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.8);
}

.contact-item svg {
    width: 16px;
    height: 16px;
    stroke: rgba(255, 255, 255, 0.6);
    flex-shrink: 0;
}

.contact-item a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.contact-item a:hover {
    color: white;
    text-decoration: underline;
}

.footer-links {
    min-width: 200px;
}

.footer-nav {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-nav a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
    display: inline-block;
    padding: 4px 0;
}

.footer-nav a:hover {
    color: white;
    transform: translateX(3px);
}

.footer-bottom {
    padding-top: 20px;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
}

.footer-legal {
    display: flex;
    gap: 20px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 12px;
    font-family: 'Consolas', 'Monaco', monospace;
}

.footer-inn,
.footer-ogrn {
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.footer-version {
    color: rgba(255, 255, 255, 0.3);
    font-size: 12px;
    font-family: 'Consolas', 'Monaco', monospace;
}

/* ===== КНОПКИ ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    border: none;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
    z-index: -1;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--accent-purple) 100%);
    color: white;
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-lg {
    padding: 18px 36px;
    font-size: 18px;
}

/* ===== КАРТОЧКИ ===== */
.card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all var(--transition-normal);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.card-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 15px;
}

/* ===== НОВОСТИ ===== */
.news-section {
    margin-bottom: 60px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.section-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--dark);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 2px;
}

.view-all {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-weight: 600;
    font-size: 16px;
    transition: all var(--transition-normal);
}

.view-all:hover {
    gap: 12px;
    color: var(--primary-dark);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.news-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.news-image {
    height: 200px;
    position: relative;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.news-card:hover .news-image img {
    transform: scale(1.05);
}

.news-date {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.95);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 14px;
    color: var(--primary);
    backdrop-filter: blur(4px);
}

.news-content {
    padding: 25px;
}

.news-category {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(67, 97, 238, 0.1);
    color: var(--primary);
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.news-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 15px;
    line-height: 1.4;
}

.news-title a {
    color: inherit;
    text-decoration: none;
}

.news-title a:hover {
    color: var(--primary);
}

.news-excerpt {
    color: var(--dark-gray);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-weight: 600;
    font-size: 14px;
    transition: gap var(--transition-normal);
}

.read-more:hover {
    gap: 12px;
}

/* ===== ГЛАВНАЯ СТРАНИЦА ===== */
.hero-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    margin-bottom: 80px;
    padding: 40px 0;
}

.hero-content {
    max-width: 600px;
}

.hero-title {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    color: var(--dark);
    letter-spacing: -0.5px;
}

.hero-description {
    font-size: 20px;
    color: var(--dark-gray);
    line-height: 1.6;
    margin-bottom: 40px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    gap: 40px;
    margin: 30px 0 40px;
    flex-wrap: wrap;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.stat-number {
    font-size: 36px;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.stat-label {
    font-size: 14px;
    color: var(--dark-gray);
    margin-top: 5px;
    font-weight: 500;
}

.hero-image {
    position: relative;
    height: 400px;
}

.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
}

.shape {
    position: absolute;
    border-radius: var(--radius-lg);
}

.shape-1 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    top: 0;
    right: 0;
    opacity: 0.1;
}

.shape-2 {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, var(--accent-green) 0%, var(--success) 100%);
    bottom: 0;
    left: 0;
    opacity: 0.1;
}

.shape-3 {
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, var(--accent-purple) 0%, var(--warning) 100%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.1;
}

.quick-actions {
    margin-bottom: 80px;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.action-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 30px;
    text-decoration: none;
    color: var(--dark);
    transition: all var(--transition-normal);
    border: 1px solid var(--light-gray);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.action-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.action-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.action-icon svg {
    width: 32px;
    height: 32px;
    stroke: white;
}

.action-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--dark);
}

.action-card p {
    color: var(--dark-gray);
    font-size: 15px;
    line-height: 1.5;
    margin: 0;
}

.latest-news {
    margin-bottom: 80px;
}

.view-all-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-weight: 600;
    font-size: 16px;
    transition: gap var(--transition-normal);
}

.view-all-link:hover {
    gap: 12px;
    color: var(--primary-dark);
}

.view-all-link svg {
    width: 16px;
    height: 16px;
}

.news-featured {
    margin-bottom: 60px;
}

.featured-article {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    margin-bottom: 30px;
}

.featured-image {
    height: 400px;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-content {
    padding: 40px;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    font-size: 14px;
}

.article-date {
    color: var(--medium-gray);
    font-weight: 500;
}

.article-category {
    background: rgba(67, 97, 238, 0.1);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 12px;
}

.article-title {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--dark);
}

.article-title a {
    color: inherit;
    text-decoration: none;
}

.article-title a:hover {
    color: var(--primary);
}

.article-excerpt {
    font-size: 18px;
    color: var(--dark-gray);
    line-height: 1.6;
    margin-bottom: 30px;
}

/* ===== СТРАНИЦА КОНТАКТОВ ===== */
.contacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 80px;
    align-items: stretch;
}

.contact-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--light-gray);
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 100%;
    min-height: 300px;
}

.contact-card > *:last-child {
    margin-top: auto;
}

.contact-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.phone-list, .email-list, .working-hours, .requisites {
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex: 1;
}

.requisites {
    /*max-height: 250px;*/
    overflow-y: auto;
    padding-right: 10px;
}

.requisites::-webkit-scrollbar {
    width: 6px;
}

.requisites::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.requisites::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 3px;
}

.requisites::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

.contact-card.company-info-card {
    min-height: 400px;
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    flex-shrink: 0;
}

.contact-card h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 15px;
    line-height: 1.3;
    min-height: 52px;
    display: flex;
    align-items: center;
}

.contact-card p {
    color: var(--dark-gray);
    line-height: 1.6;
    margin-bottom: 15px;
    flex: 1;
}

.contact-card .btn {
    margin-top: auto;
    align-self: flex-start;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
}

.phone-item, .email-item, .hour-item, .requisite-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.phone-item:last-child, 
.email-item:last-child, 
.hour-item:last-child, 
.requisite-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* ===== СТРАНИЦА ВХОДА ===== */
.login-page {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    min-height: calc(100vh - 200px);
    padding: 40px 0;
}

.login-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--light-gray);
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

/* ИСПРАВЛЕННЫЙ ЛОГОТИП */
.login-logo {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    padding: 10px;
    box-shadow: var(--shadow-md);
}

.login-logo img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: none !important;
}

.login-logo-text {
    color: var(--primary);
    font-size: 32px;
    font-weight: 800;
    letter-spacing: 1px;
}

.login-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 10px;
}

.login-description {
    color: var(--dark-gray);
    font-size: 16px;
    line-height: 1.5;
}

.login-form {
    margin-bottom: 30px;
}

.login-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark);
    font-size: 14px;
}

.login-form input[type="text"],
.login-form input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--light-gray);
    border-radius: var(--radius-md);
    font-size: 16px;
    margin-bottom: 20px;
    transition: border-color var(--transition-normal);
}

.login-form input[type="text"]:focus,
.login-form input[type="password"]:focus {
    outline: none;
    border-color: var(--primary);
}

.login-form .forgetmenot {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.login-form .forgetmenot input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.login-form .submit {
    width: 100%;
}

.login-form .submit input[type="submit"] {
    width: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    border: none;
    padding: 14px;
    border-radius: var(--radius-full);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.login-form .submit input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.login-links {
    text-align: center;
    margin-top: 20px;
}

.login-links a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.login-links a:hover {
    text-decoration: underline;
}

.login-note {
    color: var(--medium-gray);
    font-size: 14px;
    margin-top: 15px;
    font-style: italic;
}

.login-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--light-gray);
    color: var(--dark-gray);
    font-size: 14px;
}

.login-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.login-info {
    height: 100%;
}

.info-card {
    background: linear-gradient(135deg, var(--dark) 0%, #1a1a2e 100%);
    border-radius: var(--radius-lg);
    padding: 40px;
    color: white;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.info-card h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    color: white;
}

.info-card p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-bottom: 40px;
}

.info-features {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 15px;
}

.feature svg {
    width: 24px;
    height: 24px;
    stroke: var(--primary-light);
    flex-shrink: 0;
}

.feature span {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

/* ===== УТИЛИТЫ ===== */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-40 {
    margin-top: 40px;
}

.mb-40 {
    margin-bottom: 40px;
}

.d-flex {
    display: flex;
}

.gap-10 {
    gap: 10px;
}

.gap-20 {
    gap: 20px;
}

.flex-wrap {
    flex-wrap: wrap;
}

/* ===== АНИМАЦИИ ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.animate-fade {
    animation: fadeIn 0.6s ease-out;
}

.animate-slide {
    animation: slideInRight 0.6s ease-out;
}

.float {
    animation: float 3s ease-in-out infinite;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 1024px) {
    .container {
        padding: 0 20px;
    }
    
    .hero-section {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .hero-image {
        height: 300px;
        order: -1;
    }
    
    .hero-title {
        font-size: 36px;
    }
    
    .featured-article {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .featured-image {
        height: 300px;
    }
    
    .article-title {
        font-size: 28px;
    }
    
    .news-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
    
    .footer-main {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-links {
        min-width: auto;
    }
    
    .footer-nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 20px;
    }
    
    .login-page {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .info-card {
        padding: 30px;
    }
    
    .header-content {
        gap: 20px;
    }
    
    .nav-menu {
        gap: 3px;
    }
    
    .nav-menu a {
        padding: 8px 12px;
        font-size: 14px;
    }
    
    .site-title {
        font-size: 16px;
    }
    
    .site-description {
        font-size: 12px;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .site-branding {
        order: 1;
        flex: 1;
    }
    
    .user-menu {
        order: 2;
    }
    
    .main-navigation {
        order: 3;
        width: 100%;
        margin-top: 15px;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        background: white;
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-lg);
        padding: 15px;
        position: absolute;
        top: 100%;
        left: 0;
        z-index: 100;
        border: 1px solid var(--light-gray);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu > li {
        width: 100%;
    }
    
    .nav-menu a {
        border-radius: var(--radius-md);
        padding: 12px 16px;
        justify-content: space-between;
    }
    
    .menu-item-portal,
    .menu-item-login {
        margin-left: 0;
        margin-top: 10px;
    }
    
    .site-logo-img {
        max-height: 40px;
    }
    
    .logo-fallback {
        width: 40px;
        height: 40px;
    }
    
    .logo-text {
        font-size: 14px;
    }
    
    .logo-subtext {
        font-size: 5px;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .hero-description {
        font-size: 18px;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .actions-grid {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .featured-content {
        padding: 25px;
    }
    
    .article-title {
        font-size: 24px;
    }
    
    .article-excerpt {
        font-size: 16px;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .contacts-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-card {
        min-height: auto;
        height: auto;
    }
    
    .contact-card.company-info-card {
        min-height: auto;
    }
    
    .requisites {
        max-height: 200px;
    }
    
    .site-footer {
        padding: 30px 0 15px;
    }
    
    .footer-main {
        padding-bottom: 20px;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .footer-legal {
        order: 3;
        width: 100%;
        justify-content: center;
    }
    
    .footer-version {
        order: 2;
    }
    
    .footer-copyright {
        order: 1;
        width: 100%;
    }
    
    .login-card {
        padding: 30px;
    }
    
    .login-logo {
        width: 70px;
        height: 70px;
    }
    
    .login-logo-text {
        font-size: 28px;
    }
    
    .login-title {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    .site-title {
        font-size: 14px;
    }
    
    .site-description {
        display: none;
    }
    
    .user-name {
        max-width: 100px;
    }
    
    .logo-fallback {
        width: 35px;
        height: 35px;
    }
    
    .logo-text {
        font-size: 12px;
    }
    
    .btn {
        padding: 12px 24px;
        font-size: 14px;
    }
    
    .btn-lg {
        padding: 14px 28px;
        font-size: 16px;
    }
    
    .news-content {
        padding: 20px;
    }
    
    .news-title {
        font-size: 18px;
    }
    
    .featured-content {
        padding: 20px;
    }
    
    .hero-title {
        font-size: 28px;
    }
    
    .hero-description {
        font-size: 16px;
    }
    
    .featured-article {
        border-radius: var(--radius-md);
    }
    
    .featured-image {
        height: 250px;
    }
    
    .article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .contact-card {
        padding: 20px;
    }
    
    .contact-icon {
        width: 50px;
        height: 50px;
    }
    
    .contact-card h3 {
        font-size: 18px;
        min-height: auto;
    }
    
    .footer-company-name {
        font-size: 16px;
    }
    
    .footer-company-description {
        font-size: 13px;
    }
    
    .contact-item {
        font-size: 13px;
    }
    
    .footer-nav {
        flex-direction: column;
        gap: 12px;
    }
    
    .footer-legal {
        flex-direction: column;
        gap: 8px;
        align-items: center;
    }
    
    .footer-copyright {
        font-size: 12px;
        text-align: center;
    }
    
    .login-card {
        padding: 25px;
    }
    
    .login-page {
        padding: 20px 0;
    }
    
    .info-card {
        padding: 25px;
    }
    
    .login-logo {
        width: 60px;
        height: 60px;
    }
    
    .login-logo-text {
        font-size: 24px;
    }
}
/* ===== СТРАНИЦА ВХОДА - ДОПОЛНИТЕЛЬНЫЕ СТИЛИ ===== */
.login-form .submit input[type="submit"] {
    width: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    border: none;
    padding: 14px;
    border-radius: var(--radius-full);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.login-form .submit input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
}

/* Эффект блеска при наведении */
.login-form .submit input[type="submit"]::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.login-form .submit input[type="submit"]:hover::after {
    left: 100%;
}

/* Иконка внутри кнопки (опционально) */
.login-form .submit input[type="submit"] {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.login-form .submit input[type="submit"]::before {
    content: '→';
    font-weight: bold;
    opacity: 0.8;
    transition: transform 0.3s ease;
}

.login-form .submit input[type="submit"]:hover::before {
    transform: translateX(3px);
}

/* ===== КАСТОМНАЯ ГАЛОЧКА "ЗАПОМНИТЬ МЕНЯ" ===== */
.login-form .forgetmenot {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    cursor: pointer;
}

.login-form .forgetmenot label {
    cursor: pointer;
    font-weight: 500;
    color: var(--dark-gray);
    user-select: none;
    transition: color 0.2s;
}

.login-form .forgetmenot label:hover {
    color: var(--primary);
}

/* Скрываем стандартный чекбокс */
.login-form .forgetmenot input[type="checkbox"] {
    display: none;
}

/* Создаем кастомную галочку */
.login-form .forgetmenot label::before {
    content: '';
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid var(--light-gray);
    border-radius: var(--radius-sm);
    margin-right: 8px;
    vertical-align: middle;
    transition: all 0.2s;
    background: white;
    cursor: pointer;
}

/* Галочка внутри */
.login-form .forgetmenot label::after {
    content: '✓';
    position: absolute;
    left: 5px;
    top: 50%;
    transform: translateY(-50%) scale(0);
    color: white;
    font-size: 12px;
    font-weight: bold;
    transition: transform 0.2s;
}

/* Когда чекбокс отмечен */
.login-form .forgetmenot input[type="checkbox"]:checked + label::before {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-color: var(--primary);
}

.login-form .forgetmenot input[type="checkbox"]:checked + label::after {
    transform: translateY(-50%) scale(1);
}

/* Анимация при клике */
.login-form .forgetmenot input[type="checkbox"]:checked + label::before {
    animation: checkboxPop 0.3s ease;
}

@keyframes checkboxPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Фокус состояния для доступности */
.login-form .forgetmenot input[type="checkbox"]:focus + label::before {
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.3);
    outline: none;
}

/* ===== ДОПОЛНИТЕЛЬНЫЕ ЭФФЕКТЫ ДЛЯ КНОПКИ ===== */
.login-form .submit {
    position: relative;
}

/* Эффект загрузки (если нужно будет добавить) */
.login-form .submit.loading input[type="submit"] {
    opacity: 0.8;
    cursor: not-allowed;
}

.login-form .submit.loading input[type="submit"]::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
    right: 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 768px) {
    .login-form .submit input[type="submit"] {
        padding: 12px;
        font-size: 15px;
    }
    
    .login-form .forgetmenot label::before {
        width: 16px;
        height: 16px;
    }
    
    .login-form .forgetmenot label::after {
        left: 4px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .login-form .forgetmenot {
        font-size: 14px;
    }
    
    .login-form .submit input[type="submit"] {
        padding: 10px 16px;
        font-size: 14px;
    }
}
/* ===== КНОПКА ВХОДА В ХЕДЕРЕ ===== */
.login-header-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--accent-green) 0%, #06d6a0 100%);
    color: white !important;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all var(--transition-normal);
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.login-header-btn:hover {
    background: linear-gradient(135deg, #05b587 0%, #059669 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: white !important;
}

.login-header-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    transition: transform 0.2s;
}

.login-header-btn:hover svg {
    transform: translateX(2px);
}

/* Адаптивность для кнопки входа */
@media (max-width: 768px) {
    .login-header-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .login-header-btn span {
        display: none; /* На мобилках скрываем текст, оставляем только иконку */
    }
    
    .login-header-btn svg {
        width: 18px;
        height: 18px;
        margin: 0;
    }
}

@media (max-width: 480px) {
    .login-header-btn {
        width: 40px;
        height: 40px;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
    }
    
    .user-menu .current-user {
        padding: 4px 8px;
    }
    
    .user-name {
        max-width: 80px;
    }
}
/* Улучшенная стилизация таблиц TablePress на странице "Дома в управлении" — ахуенная версия от Бибы */

/* Карточка для таблицы (обязательно оберни таблицу в <div class="table-card">) */
.table-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    border: 1px solid #e2e8f0;
    margin: 40px 0;
    padding: 30px;
}

/* Responsive скролл */
.tablepress-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 16px;
    overflow: hidden;
}

/* Основная таблица */
.tablepress {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 16px;
    margin: 0;
}

/* Заголовки таблицы — градиент как в портале */
.tablepress thead th {
    background: linear-gradient(135deg, #4361ee 0%, #3a0ca3 100%);
    color: white !important;
    font-weight: 700;
    text-align: center;
    padding: 18px 16px;
    font-size: 17px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 3px solid #4361ee;
}

/* Строки тела */
.tablepress tbody td {
    padding: 16px;
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
    transition: background 0.3s;
}

/* Чередование строк */
.tablepress tbody tr:nth-child(even) {
    background-color: #f0f9ff;
}

/* Hover на строку */
.tablepress tbody tr:hover {
    background-color: #dbeafe;
    transform: scale(1.01);
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.15);
    transition: all 0.3s;
}

/* Границы ячеек */
.tablepress td,
.tablepress th {
    border-right: 1px solid #e2e8f0;
}

.tablepress td:last-child,
.tablepress th:last-child {
    border-right: none;
}

/* Ссылки в таблице (договоры) */
.tablepress a {
    color: #4361ee;
    text-decoration: none;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 8px;
    transition: all 0.2s;
}

.tablepress a:hover {
    background: #4361ee;
    color: white;
    padding: 6px 12px;
}

/* Кнопка "Изменить" от TablePress (только для админа) */
.tablepress-table-description + .tablepress-post-edit-link,
.tablepress .edit-link {
    display: inline-block !important;
    background: linear-gradient(135deg, #4361ee 0%, #3a0ca3 100%);
    color: white !important;
    padding: 10px 20px !important;
    border-radius: 12px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    text-decoration: none !important;
    margin-top: 20px !important;
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
    transition: all 0.3s;
}

.tablepress-table-description + .tablepress-post-edit-link:hover,
.tablepress .edit-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(67, 97, 238, 0.4);
}

/* DataTables элементы (если оставишь) — теперь красивее */
.dataTables_wrapper {
    padding: 0;
}

.dataTables_length select,
.dataTables_filter input {
    padding: 10px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
}

.dataTables_paginate .paginate_button.current {
    background: linear-gradient(135deg, #4361ee 0%, #3a0ca3 100%) !important;
    color: white !important;
    border: none !important;
}

/* Адаптивность */
@media (max-width: 768px) {
    .table-card {
        padding: 20px;
    }
    
    .tablepress thead th,
    .tablepress tbody td {
        padding: 12px 8px;
        font-size: 14px;
    }
    
    .tablepress a {
        padding: 4px 8px;
        font-size: 14px;
    }
}
/* Финальная стилизация Download Attachments — ахуенно, без косяков */
.download-attachments {
    margin: 40px 0 !important;
}

/* Полная карточка вокруг таблицы */
.download-attachments > table {
    width: 100% !important;
    background: white !important;
    border-radius: 20px !important;
    overflow: hidden !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.12) !important;
    border: 1px solid #e2e8f0 !important;
}

/* Заголовки */
.download-attachments thead th {
    background: linear-gradient(135deg, #4361ee 0%, #3a0ca3 100%) !important;
    color: white !important;
    font-weight: 700 !important;
    text-align: center !important;
    padding: 20px 16px !important;
    font-size: 18px !important;
}

/* Строки тела */
.download-attachments tbody td {
    padding: 18px 16px !important;
    text-align: center !important;
    border-bottom: 1px solid #e2e8f0 !important;
    font-size: 16px !important;
}

/* Чередование */
.download-attachments tbody tr:nth-child(even) {
    background: #f8fafc !important;
}

/* Hover на строку */
.download-attachments tbody tr:hover {
    background: #ebf4ff !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(67,97,238,0.15);
    transition: all 0.3s;
}

/* Кнопка скачивания */
.download-attachments .da-download-link,
.download-attachments a[title="Download"] {
    display: inline-block !important;
    background: linear-gradient(135deg, #4361ee 0%, #3a0ca3 100%) !important;
    color: white !important;
    padding: 12px 30px !important;
    border-radius: 14px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    box-shadow: 0 6px 20px rgba(67,97,238,0.3) !important;
    transition: all 0.3s !important;
    margin: 10px 0 !important;
}

.download-attachments .da-download-link:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(67,97,238,0.4);
}

/* Иконка файла */
.download-attachments .da-download-icon {
    margin-right: 10px;
    font-size: 18px;
}

/* Размер, дата, скачивания */
.download-attachments .da-download-size,
.download-attachments .da-download-date,
.download-attachments .da-download-count {
    color: #64748b !important;
    font-size: 15px !important;
}

/* Responsive скролл */
.download-attachments {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
}

/* Для вложенных таблиц в похожих новостях (рекурсивно) */
.download-attachments table table {
    box-shadow: none !important;
    border-radius: 16px !important;
}

/* Кнопка "Все новости" — больше и красивее */
.article-footer .btn {
    padding: 18px 60px !important;
    font-size: 18px !important;
}

/* Похожие новости — карточки выше */
.related-posts .related-card {
    transition: all 0.3s;
}

.related-posts .related-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}
