/* =========================================
   СТРАНИЦА "КОНТАКТЫ"
========================================= */
.contacts-section {
    background-color: #ffffff;
    padding-bottom: 80px;
    font-family: var(--font-base);
}

.contacts-container {
    max-width: 1350px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ЗАГОЛОВОК СТРАНИЦЫ */
.contacts-page-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px auto;
}

.contacts-page-header h1 {
    font-family: var(--font-title);
    font-size: 2.8rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    line-height: 1.2;
}

.contacts-page-header p {
    font-size: 1.1rem;
    color: #555555;
    line-height: 1.6;
}

/* ГЛАВНАЯ КАРТА */
.main-map-wrapper {
    width: 100%;
    height: 497px;
    background-color: #fdfafb;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 60px;
    border: 1px solid #eeeeee;
}

/* ЗАГОЛОВОК СПИСКА ОФИСОВ */
.offices-title-wrapper {
    text-align: center;
    margin-bottom: 40px;
}

.offices-title-wrapper h2 {
    font-family: var(--font-title);
    font-size: 2.2rem;
    color: #333333;
}

/* СПИСОК ОФИСОВ */
.offices-list {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin-bottom: 80px;
}

.office-card {
    background: #ffffff;
    border: 1px solid #eeeeee;
    border-radius: 8px;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
    scroll-margin-top: 120px;
}

.office-card:hover {
    box-shadow: 0 15px 35px rgba(0,0,0,0.06);
    transform: translateY(-3px);
}

.office-info {
    padding: 3rem;
    display: flex;
    flex-direction: column;
}

.office-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.office-header-row h3 {
    font-family: var(--font-title);
    margin: 0;
    font-size: 1.8rem;
    color: var(--primary-color);
}

.office-header-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-end;
}

/* ВЫПАДАЮЩИЕ МЕНЮ (КНОПКИ) */
.action-dropdown {
    position: relative;
    width: 100%;
    min-width: 200px;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 30px;
    font-weight: 600;
    background: #ffffff;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    font-family: var(--font-base);
}

.action-btn:hover {
    background: var(--accent-color);
    color: #ffffff;
}

.action-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background-color: #ffffff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 1px solid #eeeeee;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 100;
}

.action-dropdown.open .action-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.drop-call {
    display: flex;
    flex-direction: column;
    min-width: 240px;
    padding: 10px 0;
}

.drop-item {
    display: flex;
    flex-direction: column;
    padding: 10px 20px;
    border-bottom: 1px solid #f9f9f9;
    transition: background 0.2s;
}

.drop-item:last-child {
    border-bottom: none;
}

.drop-item:hover {
    background: #fdfafb;
}

.drop-val {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 15px;
    margin-bottom: 2px;
}

.drop-desc {
    font-size: 12px;
    color: #888888;
}

.drop-chat {
    display: flex;
    flex-direction: row;
    gap: 12px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f5f5f5;
    color: #666666;
    transition: all 0.2s ease;
}

.social-btn:hover {
    background-color: var(--accent-color);
    color: #ffffff;
}

/* ИНФОРМАЦИЯ ОБ ОФИСЕ */
.office-address-title {
    color: #444444;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    line-height: 1.5;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid #eeeeee;
}

.office-address-title svg {
    color: var(--accent-color);
    margin-top: 2px;
    flex-shrink: 0;
}

.office-desc {
    color: #555555;
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 30px;
    flex-grow: 1;
}

.office-desc p {
    margin-bottom: 15px;
}

.office-desc strong {
    color: #333333;
}

.office-desc h4 {
    margin-top: 25px;
    margin-bottom: 15px;
    font-size: 16px;
    color: var(--primary-color);
    font-weight: 700;
}

.office-features-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.office-features-list li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 10px;
    color: #555555;
}

.office-features-list li svg {
    position: absolute;
    left: 0;
    top: 4px;
    color: var(--accent-color);
}

.office-desc-hidden {
    display: none;
    margin-top: 15px;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.btn-read-more {
    background: none;
    border: none;
    color: var(--accent-color);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    padding: 0;
    margin-top: 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
    font-family: var(--font-base);
}

.btn-read-more:hover {
    color: var(--primary-color);
}

.btn-read-more svg {
    transition: transform 0.3s ease;
}

.btn-read-more.open svg {
    transform: rotate(180deg);
}

/* КОНТАКТНЫЙ БЛОК */
.office-contacts-block {
    background: #fdfafb;
    padding: 25px 30px;
    border-radius: 6px;
    border: 1px solid #eeeeee;
}

.contact-info-list p {
    margin-bottom: 12px;
    font-size: 15px;
    display: flex;
    align-items: center;
}

.contact-info-list p:last-child {
    margin-bottom: 0;
}

.contact-info-list svg {
    color: var(--accent-color);
    margin-right: 15px;
    flex-shrink: 0;
}

.contact-info-list a {
    color: #333333;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.contact-info-list a:hover {
    color: var(--accent-color);
}

.muted-hint {
    color: #999999;
    font-size: 13px;
    margin-left: 8px;
    font-weight: 400;
}

/* КАРТА ОФИСА */
.map-container {
    height: 100%;
    min-height: 400px;
    width: 100%;
    background-color: #f5f5f5;
    border-left: 1px solid #eeeeee;
    border-radius: 0 8px 8px 0;
    overflow: hidden;
}

.map-container ymaps {
    width: 100% !important;
    height: 100% !important;
}

/* =========================================
   ФОРМА И ОТЗЫВЫ
========================================= */
.contact-reviews-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-form-wrapper, .reviews-wrapper {
    background-color: #ffffff;
    padding: 50px;
    border-radius: 8px;
    border: 1px solid #eeeeee;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
    display: flex;
    flex-direction: column;
}

.contact-form-wrapper h2, .reviews-wrapper h2 {
    text-align: center;
    font-family: var(--font-title);
    font-size: 2.2rem;
    margin-bottom: 15px;
    color: var(--primary-color);
    margin-top: 0;
}

.contact-form-wrapper .subtitle, .reviews-wrapper .subtitle {
    text-align: center;
    color: #666666;
    margin-bottom: 40px;
    font-size: 15px;
    line-height: 1.6;
}

/* Стили формы */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    color: #555555;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #dddddd;
    font-family: var(--font-base);
    font-size: 15px;
    color: #333333;
    background-color: #fdfafb;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(223, 27, 83, 0.1);
    background-color: #ffffff;
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

/* Dropzone (Загрузка файлов) */
.dropzone {
    position: relative;
    border: 2px dashed #dddddd;
    border-radius: 6px;
    padding: 30px;
    text-align: center;
    background-color: #fdfafb;
    transition: border-color 0.2s ease, background-color 0.2s ease;
    cursor: pointer;
}

.dropzone:hover, .dropzone.dragover {
    border-color: var(--accent-color);
    background-color: #fff2f4;
}

.file-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.dropzone svg {
    color: #a0a0a0;
    margin-bottom: 15px;
    transition: color 0.2s ease;
}

.dropzone:hover svg {
    color: var(--accent-color);
}

.dropzone-main-text {
    font-size: 15px;
    color: #555555;
    margin-bottom: 5px;
}

.dropzone-main-text span {
    color: var(--accent-color);
    font-weight: 600;
}

.dropzone-sub-text {
    font-size: 12px;
    color: #999999;
}

.file-list {
    margin-top: 10px;
    font-size: 13px;
    color: #666666;
}

.btn-submit {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    border-radius: 6px;
    margin-top: 20px;
    background-color: #f7d547;
    color: #333333;
    font-weight: 700;
    border: none;
    cursor: pointer;
    font-family: var(--font-base);
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn-submit:hover {
    background-color: #e5c33a;
    transform: translateY(-2px);
}

/* Сообщения */
.msg-box {
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
    text-align: center;
}
.msg-box.success {
    background-color: #eaf8e6;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}
.msg-box.error {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

/* Отзывы */
.reviews-iframe-box {
    width: 100%;
    height: 100%;
    min-height: 600px;
    position: relative;
    border: 1px solid #eeeeee;
    border-radius: 6px;
    overflow: hidden;
}

.reviews-iframe-box iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.iframe-link {
    position: absolute;
    bottom: 8px;
    left: 0;
    width: 100%;
    text-align: center;
    color: #b3b3b3;
    font-size: 10px;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 20px;
    box-sizing: border-box;
}

/* =========================================
   АДАПТИВНОСТЬ
========================================= */
@media (max-width: 1024px) {
    .office-card { grid-template-columns: 1fr; }
    
    .map-container {
        border-left: none;
        border-top: 1px solid #eeeeee;
        border-radius: 0 0 8px 8px;
        min-height: 350px;
    }
    
    .office-info { padding: 40px; }
    .contact-reviews-grid { grid-template-columns: 1fr; }
    .contact-form-wrapper, .reviews-wrapper { padding: 40px; }
    
    .office-header-actions { align-items: flex-start; width: 100%; margin-top: 15px; }
    .action-dropdown { max-width: 100%; width: 100%; }
    .action-menu {
        width: 100%;
        left: 0;
        right: auto;
    }
}

@media (max-width: 768px) {
    .contacts-page-header h1 { font-size: 2.2rem; }
    .office-header-row { flex-direction: column; align-items: flex-start; gap: 0; }
    .office-header-actions { width: 100%; flex-direction: column; gap: 15px; }
    .action-btn { width: 100%; justify-content: center; }
    .form-row { grid-template-columns: 1fr; gap: 0; }
    .contact-form-wrapper, .reviews-wrapper { padding: 25px; }
    .office-info { padding: 25px; }
}