/* Variant B — final version with fixed responsive layout */

/* Main container */

.page-template-custom-contact-page .almaz-contact {
    max-width: 1200px;
    margin: 32px auto 90px;
    padding: 0 20px;
    box-sizing: border-box;
}

.page-template-custom-contact-page .almaz-contact__inner {
    display: flex;
    gap: 56px;
    align-items: stretch;
}

/* ================== H1 ================== */

.page-template-custom-contact-page .almaz-contact__title {
    font-size: 28px;
    font-weight: 500;
    color: #3f3f3f;
    margin: 0 0 20px 0;
    line-height: 1.3;
    position: relative;
}

.page-template-custom-contact-page .almaz-contact__title::after {
    content: "";
    display: block;
    width: 48px;
    height: 2px;
    margin-top: 10px;
    background: rgba(119, 84, 65, 0.35);
}

/* Left column */

.page-template-custom-contact-page .almaz-contact__left {
    flex: 1;
    min-height: 300px;
    display: flex;
    flex-direction: column;
}

.page-template-custom-contact-page .almaz-contact__row {
    display: flex;
    align-items: baseline;
    gap: 24px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(119, 84, 65, 0.22);
}

.page-template-custom-contact-page .almaz-contact__row:last-child {
    border-bottom: none;
}

.page-template-custom-contact-page .almaz-contact__label {
    flex: 0 0 160px;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    color: #333333;
}

.page-template-custom-contact-page .almaz-contact__value {
    font-size: 15px;
    font-weight: 500;
    color: #333333;
    line-height: 1.35;
}

.page-template-custom-contact-page .almaz-contact__value a {
    color: #333333;
    text-decoration: none;
}

.page-template-custom-contact-page .almaz-contact__value a:hover {
    text-decoration: underline;
}

/* Right column — map */

.page-template-custom-contact-page .almaz-contact__image {
    flex: 0 0 600px;      
    min-height: 300px;
    display: flex;
    align-items: stretch;
}

.page-template-custom-contact-page #map.map-yandex {
    width: 100%;
    height: 100%;
    min-height: 300px;
    border-radius: 4px;
    overflow: hidden;
}

/* Tablet layout */
@media (max-width: 1024px) {

    .page-template-custom-contact-page .almaz-contact__inner {
        gap: 40px;
    }

    /* Remove fixed width */
    .page-template-custom-contact-page .almaz-contact__image {
        flex: 1;
        max-width: 420px;   
    }
}

/* Mobile layout */
@media (max-width: 768px) {

    .page-template-custom-contact-page .almaz-contact {
        margin-bottom: 48px;   /* Remove large spacing gap */
    }

    .page-template-custom-contact-page .almaz-contact__inner {
        flex-direction: column;
        gap: 28px;
    }

    .page-template-custom-contact-page .almaz-contact__left,
    .page-template-custom-contact-page .almaz-contact__image {
        min-height: unset;
        max-width: 100%;
    }

    .page-template-custom-contact-page .almaz-contact__row {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
        padding: 10px 0;
    }

    .page-template-custom-contact-page .almaz-contact__label {
        flex: none;
        width: auto;
        font-size: 13px;
    }

    .page-template-custom-contact-page .almaz-contact__value {
        font-size: 15px;
        line-height: 1.3;
    }

    .page-template-custom-contact-page #map.map-yandex {
        height: 280px;
        min-height: 280px;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .page-template-custom-contact-page .almaz-contact__title {
        font-size: 24px;
    }

    .page-template-custom-contact-page #map.map-yandex {
        height: 260px;
        min-height: 260px;
    }
}

/* Remove sidebar */

.page-template-custom-contact-page #secondary,
.page-template-custom-contact-page .sidebar,
.page-template-custom-contact-page .widget-area {
    display: none !important;
}

.page-template-custom-contact-page #primary,
.page-template-custom-contact-page #content {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 0 !important;
}
