/* Подключение шрифта */
@import url('https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,300;14..32,400;14..32,500;14..32,600;14..32,700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
	height: 100%;
	margin:0;
	padding:0;
}

body {
	font-family: 'Inter', sans-serif;
    background-color: #f8fafc;
    color: #1e293b;
    line-height: 1.5;
    scroll-behavior: smooth;
	min-height:100%;
	display:flex;
	flex-direction:column;
}

main {
	flex: 1 0 auto;
}

/* Основные цвета организации */
:root {
	--primary-blue: rgb(0, 37, 81);
    /*--primary-blue: rgb(30, 57, 104);*/
    --primary-green: rgb(27, 115, 85);
    --primary-gold: rgb(255, 204, 0);
    --primary-blue-dark: rgb(20, 45, 85);
    --primary-green-dark: rgb(20, 95, 70);
    --gray-light: #f1f5f9;
    --gray-border: #e2e8f0;
}

/* Контейнер */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Шапка */
.header {
    background-color: var(--primary-blue);
    color: white;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 1px 24px;
    gap: 20px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo-placeholder {
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed var(--primary-gold);
    transition: all 0.3s ease;
}

.logo-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.logo-icon {
    font-size: 2rem;
}

.logo-text {
    font-size: 0.7rem;
    color: var(--primary-gold);
    font-weight: 500;
}

.logo-container {
	flex-shrink: 0;
}

.logo-wrapper {
    position: relative;
    display: inline-block;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
	width: 90px;
	-webkit-user-select: none;
	user-select: none;
	pointer-events: none; 
	-webkit-user-drag: none;
}

.company-logo {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}

.company-title h1 {
    font-size: 1.7rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: white;
}

.company-title p {
    font-size: 0.75rem;
    color: #b0c4de;
    margin-top: 4px;
}

.nav-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-tabs {
    display: flex;
    gap: 8px;
    background: rgba(255, 255, 255, 0.08);
    padding: 6px;
    border-radius: 60px;
}

.tab-btn {
    background: transparent;
    border: none;
    padding: 10px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 40px;
    cursor: pointer;
    transition: 0.2s;
    color: #e2e8f0;
    font-family: inherit;
}

.tab-btn.active {
    background: var(--primary-gold);
    color: var(--primary-blue);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.tab-btn:hover:not(.active) {
    background: rgba(255, 204, 0, 0.2);
    color: white;
}

.cabinet-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--primary-green);
    border: none;
    padding: 10px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 40px;
    cursor: pointer;
    transition: all 0.2s;
    color: white;
    font-family: inherit;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.cabinet-btn:hover {
    background: var(--primary-green-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(27, 115, 85, 0.4);
}

.cabinet-btn:active {
    transform: translateY(0);
}

.cabinet-icon {
    font-size: 1.1rem;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
    padding: 40px 0 60px;
}

.tab-content.active-tab {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tab-content h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 8px;
}

.section-subtitle {
    color: #5e6f8d;
    margin-bottom: 32px;
    font-size: 1rem;
}

/* Карточки новостей */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 32px;
    margin-top: 8px;
}

.news-card {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: 0.25s;
    border: 1px solid var(--gray-border);
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 30px -12px rgba(30, 57, 104, 0.15);
    border-color: var(--primary-gold);
}

.news-img {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-green) 100%);
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
	-webkit-user-select: none;
	user-select: none;
	pointer-events: none; 
	-webkit-user-drag: none;
}

.news-content {
    padding: 20px 24px 24px;
}

.news-date {
    font-size: 0.8rem;
    color: var(--primary-green);
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
}

.news-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--primary-blue);
}

.news-desc {
    color: #475569;
    line-height: 1.5;
}

/* Контакты: сетка */
.contacts-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    margin-bottom: 32px;
}

.contact-info {
    flex: 1.5;
    background: white;
    border-radius: 28px;
    padding: 28px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--gray-border);
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

/* Карточка отдела */
.department-card {
    margin-bottom: 0;
    padding: 5px;
    background: #fafcff;
    border-radius: 20px;
    border: 1px solid #eef2f8;
    transition: 0.2s;
	max-height: 200px;
}

.department-card:hover {
    border-color: var(--primary-gold);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Заголовок карточки с временем работы */
.dept-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-gold);
}

.dept-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin: 0;
    border-bottom: none;
    padding-bottom: 0;
}

/* Блок с временем работы */
.work-hours-badge {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    background: #f1f5f9;
    padding: 5px 10px;
    border-radius: 40px;
    font-size: 0.75rem;
}

.work-status {
    font-size: 0.7rem;
}

.work-status-normal {
    color: var(--primary-green);
}

.work-status-short {
    color: var(--primary-gold);
}

.work-status-247 {
    color: #3b82f6;
}

.work-hours-text {
    font-weight: 500;
    color: #334155;
}

.short-day {
    color: #e67e22;
    font-size: 0.7rem;
    font-weight: 500;
    background: #fef3c7;
    padding: 2px 6px;
    border-radius: 20px;
    margin-left: 4px;
}

/* Контактные строки */
.contact-row {
    margin-bottom: 10px;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
}

.contact-label {
    font-weight: 600;
    color: var(--primary-green);
    min-width: 70px;
}

.contact-row a {
    color: #1f3a4b;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.contact-row a:hover {
    color: var(--primary-green);
}

.contact-note {
    font-size: 0.75rem;
    color: #6c7a91;
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px dashed #e2e8f0;
}

/* Блок с информацией об офисе */
.office-info-block {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    border-radius: 24px;
    padding: 24px 32px;
    margin-top: 16px;
    color: white;
}

.office-info-block h3 {
    font-size: 1.3rem;
    margin-bottom: 16px;
    color: var(--primary-gold);
}

.office-details {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    margin-bottom: 20px;
}

.office-address, .office-hours {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
}

.address-icon, .hours-icon {
    font-size: 1.3rem;
}

/* Легенда для времени работы */
.legend-note {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.75rem;
    color: #cbd5e1;
}

.legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
}

.legend-dot.green {
    background-color: var(--primary-green);
    box-shadow: 0 0 4px var(--primary-green);
}

.legend-dot.yellow {
    background-color: var(--primary-gold);
    box-shadow: 0 0 4px var(--primary-gold);
}

.legend-dot.blue {
    background-color: #3b82f6;
    box-shadow: 0 0 4px #3b82f6;
}

.legend-note span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Контейнеры для карт */
.map-wrapper {
    flex: 1.2;
    min-height: 500px;
}

.map-wrapper-full {
    width: 100%;
    height: 520px;
}

.map-container {
    width: 100%;
    height: 100%;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--gray-border);
    background: #f1f5f9;
}

.yandex-map-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    border-radius: 28px;
}

.map-placeholder-content {
    text-align: center;
    padding: 40px;
}

.map-icon {
    font-size: 4rem;
    display: block;
    margin-bottom: 16px;
}

.map-placeholder-content p {
    font-size: 1.1rem;
    color: var(--primary-blue);
    font-weight: 500;
    margin-bottom: 8px;
}

.map-placeholder-content small {
    color: #6b7280;
    font-size: 0.8rem;
}

.large-map .map-placeholder-content p {
    font-size: 1.2rem;
}

/* Футер */
.footer {
    background: var(--primary-blue);
    color: #b0c4de;
    padding: 32px 0;
    text-align: center;
    font-size: 0.85rem;
    border-top: 3px solid var(--primary-gold);
	flex-shrink: 0;
}

.footer-note {
    margin-top: 12px;
    color: var(--primary-gold);
    font-weight: 500;
}

button {
    background: none;
    border: none;
}

/* Адаптивность */
@media (max-width: 950px) {
    .header-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .logo-area {
        justify-content: space-between;
    }

    .nav-wrapper {
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .nav-tabs {
        flex-wrap: wrap;
        justify-content: center;
    }

    .cabinet-btn {
        margin-left: auto;
    }
}

@media (max-width: 850px) {
    .contact-info {
        grid-template-columns: 1fr;
    }
    
    .map-wrapper {
        min-height: 350px;
    }
    
    .dept-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 700px) {
    .nav-wrapper {
        flex-direction: column;
        gap: 12px;
    }
    
    .cabinet-btn {
        width: 100%;
        justify-content: center;
    }
    
    .nav-tabs {
        width: 100%;
        justify-content: center;
    }
    
    .office-details {
        flex-direction: column;
        gap: 16px;
    }
    
    .legend-note {
        flex-direction: column;
        gap: 8px;
    }
}

@media (max-width: 550px) {
    .logo-area {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .company-title h1 {
        font-size: 1.4rem;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .tab-content h2 {
        font-size: 1.6rem;
    }

    .map-wrapper-full {
        height: 350px;
    }
    
    .tab-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    
    .contact-info {
        padding: 16px;
    }
    
    .office-info-block {
        padding: 20px;
    }
}

/* Стили для карт */
#officeMap, #coverageMap {
    width: 100%;
    height: 100%;
    border-radius: 28px;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 28px;
}