/* ==========================================================================
   Contact page — card over the banner, framed map, shortcuts
   Tokens come from estc_theme.css
   ========================================================================== */

.estc-contact {
    background: #fbfbfc;
    padding-bottom: 112px;
}

/* The banner gets extra room at the bottom for the card's overlap */
.page-title.estc-contact-title {
    margin-bottom: 0;
    padding-bottom: 48px;
}

/* ---- Shared labels ---- */
.estc-contact__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 14px;
    font-family: var(--estc-font-body);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--estc-primary);
}

.estc-contact__eyebrow::before {
    content: '';
    width: 40px;
    height: 2px;
    background: #c9a227;
}

.estc-contact__heading {
    margin: 0;
    font-family: var(--estc-font-heading);
    font-size: 40px;
    font-weight: 500;
    line-height: 1.18;
    letter-spacing: -.3px;
    color: var(--estc-heading);
}

.estc-contact__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    flex: none;
    border-radius: 14px;
    background: var(--estc-primary-light);
    font-size: 18px;
    color: var(--estc-primary);
    transition: background-color .3s ease, color .3s ease;
}

/* ---- Card ---- */
.estc-contact__card {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    margin-top: -48px;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--estc-line);
    border-bottom-right-radius: 40px;
    box-shadow: 0 30px 60px -36px rgba(11, 31, 51, .45);
}

.estc-contact__card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    z-index: 3;
    height: 4px;
    background: linear-gradient(90deg, #c9a227 0 120px, var(--estc-primary) 120px);
}

.estc-contact__intro {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 56px 52px 48px;
    background: #f4f7fa;
    border-right: 1px solid var(--estc-line);
}

/* Faint zellige patch at the foot of the intro column */
.estc-contact__intro::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 220px;
    background: url('../../images/patterns/pattern_05.png') repeat;
    background-size: 120px;
    opacity: .06;
    -webkit-mask-image: linear-gradient(to top, #000, transparent);
    mask-image: linear-gradient(to top, #000, transparent);
    pointer-events: none;
}

.estc-contact__intro > * {
    position: relative;
    z-index: 1;
}

.estc-contact__lead {
    margin: 22px 0 0;
    font-size: 16.5px;
    line-height: 1.85;
    color: var(--estc-text);
}

.estc-contact__social {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: auto;
    padding-top: 36px;
}

.estc-contact__social > span {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--estc-muted);
}

.estc-contact__social ul {
    display: flex;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.estc-contact__social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--estc-border);
    border-radius: 50%;
    background: #fff;
    font-size: 16px;
    color: var(--estc-primary);
    transition: background-color .3s ease, border-color .3s ease, color .3s ease, transform .3s ease;
}

.estc-contact__social a:hover,
.estc-contact__social a:focus-visible {
    transform: translateY(-3px);
    border-color: var(--estc-primary);
    background: var(--estc-primary);
    color: #fff;
}

/* Contact rows */
.estc-contact__list {
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: 0;
    padding: 36px 52px;
    list-style: none;
}

.estc-contact__item {
    display: flex;
    gap: 20px;
    padding: 22px 0;
}

.estc-contact__item + .estc-contact__item {
    border-top: 1px dashed var(--estc-line);
}

.estc-contact__item:hover .estc-contact__icon {
    background: var(--estc-primary);
    color: #fff;
}

.estc-contact__label {
    margin: 2px 0 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--estc-muted);
}

.estc-contact__value {
    margin: 0;
    font-size: 16.5px;
    line-height: 1.6;
    color: var(--estc-heading);
}

.estc-contact__value a {
    color: var(--estc-heading);
    transition: color .3s ease;
}

.estc-contact__value a:hover {
    color: var(--estc-primary);
}

/* Several numbers: one chip each, so they wrap cleanly */
.estc-contact__phones {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.estc-contact__phones > * {
    padding: 4px 12px;
    border: 1px solid var(--estc-line);
    border-radius: 999px;
    background: #fafbfc;
    font-size: 15px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.estc-contact__phones a:hover {
    border-color: var(--estc-primary);
}

.estc-contact__action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--estc-primary);
}

.estc-contact__action i {
    transition: transform .3s ease;
}

.estc-contact__action:hover i {
    transform: translateX(4px);
}

/* ---- Map ---- */
.estc-contact__mapsec {
    padding-top: 72px;
}

.estc-contact__map {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--estc-line);
    border-bottom-right-radius: 40px;
    box-shadow: 0 30px 60px -40px rgba(11, 31, 51, .4);
}

.estc-contact__map iframe {
    display: block;
    width: 100%;
    height: 520px;
    border: 0;
}

.estc-contact__pin {
    position: absolute;
    left: 28px;
    bottom: 28px;
    width: min(380px, calc(100% - 56px));
    padding: 26px 28px 28px;
    background: #fff;
    border-bottom-right-radius: 24px;
    border-top: 3px solid var(--estc-primary);
    box-shadow: 0 24px 48px -20px rgba(11, 31, 51, .45);
}

.estc-contact__pin .estc-contact__eyebrow {
    margin-bottom: 10px;
    font-size: 12px;
}

.estc-contact__pin h3 {
    margin: 0 0 8px;
    font-family: var(--estc-font-heading);
    font-size: 22px;
    font-weight: 500;
    color: var(--estc-heading);
}

.estc-contact__pin > p:not(.estc-contact__eyebrow) {
    margin: 0;
    font-size: 15px;
    line-height: 1.65;
    color: var(--estc-text);
}

.estc-contact__pin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.estc-contact__pin-actions .estc-btn {
    gap: 8px;
    padding: 11px 18px;
    font-size: 14.5px;
}

.estc-contact__pin-actions .estc-contact__btn-outline {
    background: transparent;
    color: var(--estc-primary);
}

.estc-contact__pin-actions .estc-contact__btn-outline:hover,
.estc-contact__pin-actions .estc-contact__btn-outline:focus-visible {
    background: var(--estc-primary);
    color: #fff;
}

/* ---- Shortcuts ---- */
.estc-contact__help {
    padding-top: 88px;
}

.estc-contact__help .estc-contact__heading {
    margin-bottom: 36px;
}

.estc-contact__help-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.estc-contact__help-grid > li {
    display: flex;
}

.estc-contact__help-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    padding: 26px 24px 54px;
    background: #fff;
    border: 1px solid var(--estc-line);
    border-bottom-right-radius: 24px;
    color: inherit;
    transition: transform .4s ease, box-shadow .4s ease, border-color .4s ease;
}

.estc-contact__help-card:hover,
.estc-contact__help-card:focus-visible {
    transform: translateY(-5px);
    border-color: transparent;
    box-shadow: 0 26px 48px -26px rgba(11, 31, 51, .45);
    color: inherit;
}

.estc-contact__help-card .estc-contact__icon {
    margin-bottom: 8px;
}

.estc-contact__help-card:hover .estc-contact__icon {
    background: var(--estc-primary);
    color: #fff;
}

.estc-contact__help-card strong {
    font-family: var(--estc-font-heading);
    font-size: 19px;
    font-weight: 500;
    line-height: 1.35;
    color: var(--estc-heading);
}

.estc-contact__help-card > span:not(.estc-contact__icon) {
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--estc-muted);
}

.estc-contact__help-arrow {
    position: absolute;
    left: 24px;
    bottom: 22px;
    font-size: 14px;
    color: var(--estc-primary);
    transition: transform .3s ease;
}

.estc-contact__help-card:hover .estc-contact__help-arrow {
    transform: translateX(5px);
}

.estc-contact__body {
    padding-top: 72px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1100px) {
    .estc-contact__card {
        grid-template-columns: 1fr;
    }

    .estc-contact__intro {
        border-right: 0;
        border-bottom: 1px solid var(--estc-line);
    }

    .estc-contact__help-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    .estc-contact {
        padding-bottom: 72px;
    }

    .page-title.estc-contact-title {
        padding-bottom: 32px;
    }

    .estc-contact__card {
        margin-top: -32px;
        border-bottom-right-radius: 28px;
    }

    .estc-contact__intro {
        padding: 36px 22px 30px;
    }

    .estc-contact__heading {
        font-size: 30px;
    }

    .estc-contact__list {
        padding: 12px 22px 18px;
    }

    .estc-contact__item {
        gap: 16px;
    }

    .estc-contact__icon {
        width: 42px;
        height: 42px;
        font-size: 16px;
        border-radius: 12px;
    }

    .estc-contact__mapsec {
        padding-top: 48px;
    }

    /* The address card moves under the map */
    .estc-contact__map {
        border-bottom-right-radius: 28px;
    }

    .estc-contact__map iframe {
        height: 340px;
    }

    .estc-contact__pin {
        position: static;
        width: auto;
        border-top-width: 3px;
        border-bottom-right-radius: 0;
        box-shadow: none;
    }

    .estc-contact__help {
        padding-top: 56px;
    }
}

@media (max-width: 640px) {
    .estc-contact__help-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .estc-contact__pin-actions .estc-btn {
        flex: 1 1 auto;
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .estc-contact__social a,
    .estc-contact__help-card,
    .estc-contact__help-arrow,
    .estc-contact__action i {
        transition: none;
    }

    .estc-contact__help-card:hover,
    .estc-contact__social a:hover {
        transform: none;
    }
}
