/* ===== Стили страницы контактов ===== */

/* ===== Hero секция ===== */
.contacts-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    padding: 50px 5%;
    background: linear-gradient(135deg, #f4f1ec 0%, #ffffff 100%);
    border-radius: 16px;
    margin-bottom: 40px;
    overflow: hidden;
}

.contacts-title {
    font-size: 3.5rem;
    color: #2E5E7E;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.contacts-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: #FF9F4A;
    margin-top: 15px;
    border-radius: 2px;
}

.contacts-subtitle {
    font-size: 1.15rem;
    color: #6C757D;
    line-height: 1.7;
    max-width: 450px;
    margin-top: 20px;
}

.contacts-hero-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
}

.contacts-hero-text {
    flex: 1;
}

.contacts-travinka {
    width: 30%;
    height: auto;
    flex-shrink: 0;
}

.contacts-hero-image {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.contacts-hero-image img {
    width: 100%;
    height: 460px;
    object-fit: cover;
    display: block;
}

/* ===== Уведомления ===== */
.messages-container {
    margin-bottom: 30px;
}

.alert {
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 1rem;
    margin-bottom: 10px;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border-left: 5px solid #10b981;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 5px solid #ef4444;
}

/* ===== Основная сетка ===== */
.contacts-main {
    padding: 0 0 60px;
}

.contacts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

/* ===== Карточки информации ===== */
.info-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    padding: 35px;
    margin-bottom: 30px;
}

.hours-card {
    margin-bottom: 0;
}

.info-card-title {
    font-size: 1.3rem;
    color: #2E5E7E;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #F8F9FA;
}

.info-card-title i {
    color: #4A6FA5;
    margin-right: 8px;
}

/* ===== Контакты ===== */
.contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px dashed #E9ECEF;
}

.contact-item:last-child {
    border-bottom: none;
}

.contact-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #4A6FA5, #6B8CBC);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: white;
    font-size: 1rem;
}

.contact-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    justify-content: center;
}

.contact-label {
    font-size: 0.78rem;
    color: #9CA3AF;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.contact-value {
    font-size: 1.05rem;
    color: #343A40;
    font-weight: 500;
    /* Длинный email одним словом распирает карточку на телефоне */
    overflow-wrap: anywhere;
}

.contact-link {
    text-decoration: none;
    color: #4A6FA5;
    transition: color 0.2s ease;
}

.contact-link:hover {
    color: #2E5E7E;
}

/* ===== Часы работы ===== */
.hours-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.hours-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px dashed #E9ECEF;
    font-size: 1rem;
}

.hours-item:last-child {
    border-bottom: none;
}

.hours-day {
    color: #6C757D;
}

.hours-time {
    font-weight: 600;
    color: #343A40;
    background: #F8F9FA;
    padding: 4px 12px;
    border-radius: 8px;
}

.hours-closed .hours-time {
    color: #9CA3AF;
    background: #F3F4F6;
    font-weight: 400;
}

/* ===== Форма обратной связи ===== */
.form-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    padding: 40px;
    border-top: 4px solid #4A6FA5;
}

.form-card-title {
    font-size: 1.6rem;
    color: #2E5E7E;
    margin-bottom: 8px;
}

.form-card-subtitle {
    color: #6C757D;
    margin-bottom: 30px;
    font-size: 1rem;
}

.contact-form .form-group {
    margin-bottom: 20px;
}

.contact-form label {
    display: block;
    margin-bottom: 8px;
    color: #343A40;
    font-weight: 500;
    font-size: 0.95rem;
}

.contact-form .form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #E9ECEF;
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Oswald', sans-serif;
    color: #343A40;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: #FAFAFA;
}

.contact-form .form-control:focus {
    outline: none;
    border-color: #4A6FA5;
    box-shadow: 0 0 0 3px rgba(74, 111, 165, 0.12);
    background: white;
}

.form-error {
    color: #DC3545;
    font-size: 0.85rem;
    margin-top: 5px;
}

.submit-button {
    display: block;
    width: 100%;
    background: linear-gradient(to right, #4A6FA5, #6B8CBC);
    color: white;
    padding: 14px 32px;
    border-radius: 50px;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    font-family: 'Oswald', sans-serif;
    text-align: center;
}

.submit-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(74, 111, 165, 0.25);
}

/* ===== Капча ===== */
.captcha-block {
    margin-bottom: 20px;
}

.captcha-row {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1.5px solid #E9ECEF;
    border-radius: 10px;
    padding: 8px 10px 8px 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.07);
    background: white;
}

/* ===== Согласие на обработку ПД (отдельный блок, ст. 9 ч. 1 152-ФЗ) ===== */
.consent-block {
    margin-bottom: 20px;
}

.consent-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border: 1.5px solid #E9ECEF;
    border-radius: 10px;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.07);
}

.consent-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: #4A6FA5;
    margin: 0;
    margin-top: 2px;
}

.consent-label {
    font-size: 0.82rem;
    color: #6C757D;
    cursor: pointer;
    line-height: 1.4;
    margin: 0;
}

.consent-label a {
    color: #4A6FA5;
    text-decoration: none;
}

.consent-label a:hover {
    text-decoration: underline;
}

.captcha-image {
    display: block;
    width: 225px;
    height: auto;
    border-radius: 6px;
    flex-shrink: 0;
}

.contact-form .captcha-input {
    width: 90px;
    flex-shrink: 0;
    border: 1.5px solid #ced4da;
    border-radius: 8px;
    box-shadow: none;
    background: white;
    letter-spacing: 0.12em;
    text-align: center;
    font-size: 1rem;
    padding: 8px 10px;
    color: #343A40;
}

/* ===== Секция карты ===== */
.map-section {
    padding: 0 0 80px;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    color: #2E5E7E;
    margin-bottom: 2rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: #FF9F4A;
    margin: 15px auto 0;
    border-radius: 2px;
}

.map-container {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    width: 85%;
    margin: 0 auto;
}

/* Виджет 2ГИС подставляет свой контейнер с iframe внутрь #map */
#map > div {
    width: 100% !important;
    border-radius: 16px;
    overflow: hidden;
}

#map iframe {
    border-radius: 16px;
}

/* ===== Адаптивность ===== */
@media (max-width: 992px) {
    .contacts-hero {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .contacts-hero-image {
        display: none;
    }

    .contacts-hero-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .contacts-travinka {
        width: 50%;
        align-self: flex-end;
    }

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

@media (max-width: 768px) {
    .contacts-hero {
        padding: 40px 5%;
    }

    .contacts-title {
        font-size: 2.2rem;
    }

    .info-card {
        padding: 25px;
    }

    .form-card {
        padding: 25px;
    }

    .hours-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .captcha-row {
        flex-wrap: wrap;
    }

    .captcha-image {
        width: 100%;
        max-width: 225px;
    }

    .contact-form .captcha-input {
        width: 100%;
    }

    .map-container {
        width: 100%;
    }
}

/* ---- Телефоны ---- */
@media (max-width: 560px) {
    .contacts-hero {
        padding: 28px 5%;
        border-radius: 12px;
        margin-bottom: 28px;
    }

    .contacts-title {
        font-size: 1.8rem;
    }

    .contacts-subtitle {
        font-size: 1.08rem;
        margin-top: 14px;
    }

    .contacts-travinka {
        width: 40%;
    }

    .contacts-grid {
        gap: 24px;
    }

    .info-card,
    .form-card {
        padding: 18px 16px;
        border-radius: 14px;
        margin-bottom: 20px;
    }

    .info-card-title {
        font-size: 1.15rem;
        margin-bottom: 18px;
    }

    .form-card-title {
        font-size: 1.35rem;
    }

    .contact-item {
        gap: 12px;
    }

    .contact-icon {
        width: 38px;
        height: 38px;
        border-radius: 10px;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .map-container {
        border-radius: 12px;
    }

    #map > div,
    #map iframe {
        border-radius: 12px;
    }

    .map-section {
        padding-bottom: 50px;
    }
}

/* ---- Небольшие телефоны (≤400px) ---- */
@media (max-width: 400px) {
    .contacts-hero {
        padding: 22px 4%;
        margin-bottom: 22px;
    }

    .contacts-title { font-size: 1.55rem; }
    .contacts-title::after { width: 52px; margin-top: 12px; }

    .contacts-travinka { width: 34%; }

    .info-card,
    .form-card {
        padding: 16px 13px;
        margin-bottom: 16px;
    }

    .info-card-title {
        font-size: 1.08rem;
        margin-bottom: 14px;
        padding-bottom: 12px;
    }

    .form-card-title { font-size: 1.22rem; }
    .form-card-subtitle { margin-bottom: 22px; }

    .contact-item { gap: 10px; padding: 12px 0; }

    .contact-icon {
        width: 34px;
        height: 34px;
        border-radius: 9px;
        font-size: 0.9rem;
    }

    .contact-form .form-group { margin-bottom: 16px; }
    .contact-form .form-control { padding: 11px 13px; }

    .captcha-row { padding: 8px; gap: 8px; }
    .consent-row { padding: 10px 11px; }

    /* 0.82rem = 13px — на «Политике…» мелко для тапа и чтения */
    .consent-label { font-size: 0.86rem; }

    .submit-button { padding: 13px 18px; }

    .section-title { font-size: 1.45rem; }
    .section-title::after { width: 52px; margin-top: 10px; }

    .map-container { border-radius: 10px; }

    #map > div,
    #map iframe {
        border-radius: 10px;
    }
    .map-section { padding-bottom: 40px; }
}

@media (hover: none) {
    .submit-button:hover {
        transform: none;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    }
}
