/* --- Contact page--- */
.contact-page .entry-header .entry-title { 
	text-align: center;
    color: var(--site-color-text);
    font-size: 2.2em;
    font-weight: 700;
    margin-bottom: 1.5em;
}

.contact-page .entry-content > .wp-block-columns {
    gap: 40px;
    align-items: flex-start;
    margin-top: 2em;
    margin-bottom: 2em;
    display: flex;
}

.contact-page .entry-content > .wp-block-columns > .wp-block-column {
    flex-basis: 0;
    flex-grow: 1;
    box-sizing: border-box;
}

/* When the theme writes a core/group with class `sandco-contact`, render
   it as a two-column grid: first column = form, second = contact-details + map */
.sandco-contact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}
.sandco-contact > *:nth-child(1) {
    grid-column: 1;
}
.sandco-contact > *:nth-child(2) {
    grid-column: 2;
    display: block;
}
.sandco-contact .contact-details {
    margin-bottom: 0;
}

.wp-block-column:nth-child(1) {
    padding: 25px;
}

.wp-block-column:nth-child(2) {
    /* background-color: var(--site-color-background); */
    padding: 25px;
    border-radius: 5px;
    box-shadow: var(--shadow-sm);
}

.wp-block-column:nth-child(2) .contact-details h3,
.wp-block-column:nth-child(2) .contact-details h4 {
    margin-top: 0;
    color: var(--site-color-text);
    font-size: 1.6em;
    margin-bottom: 1em;
}

.wp-block-column:nth-child(2) .contact-details > * {
    /* width: 100%; */
    margin-bottom: 1.5em;
}

.wp-block-column:nth-child(2) .contact-details {       
    /* max-width: 280px;  */
    /* margin-left: auto; */
    /* margin-right: auto;     */
    margin-bottom: 1.5em;
}

.wp-block-column:nth-child(2) .contact-detail-item {
    display: flex;
    align-items: center;
}

/* On contact page keep contact links the same color as normal text */
.contact-page .wp-block-column:nth-child(2) .contact-detail-item a {
    color: var(--site-color-text) !important;
    text-decoration: none;
}
.contact-page .wp-block-column:nth-child(2) .contact-detail-item a:hover {
    color: var(--site-color-accent-primary) !important;
}

.wp-block-column:nth-child(2) .contact-detail-item p {
    margin: 0; 
}

.wp-block-column:nth-child(2) .contact-detail-item a[href^="mailto:"] {
    /* color: inherit; */
    text-decoration: none; 
}

.wp-block-column:nth-child(2) .contact-icon {
    margin-right: 1em;
    color: var(--site-color-accent-primary);
    font-size: 1.8em;
    line-height: inherit;
    flex-shrink: 0;
}

.wp-block-column:nth-child(2) .social-media-links {
    margin-top: 1.5em;
}

.wp-block-column:nth-child(2) .social-media-links .contact-detail-item a {
    display: flex;
    align-items: center;
    text-decoration: none;
    /* color: inherit; */
}

.wp-block-column:nth-child(2) .social-media-links .contact-icon {
    margin-right: 1em;
    color: var(--site-color-accent-primary);
    font-size: 1.8em;
    line-height: inherit;
    flex-shrink: 0;
}

.wp-block-column:nth-child(2) > .map-responsive {
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    margin-top: 1.5em;
    margin-bottom: 1.5em;
}

/* Donne une taille minimale pour éviter que le lien ne soit "invisible" avant le décodage */
[data-sandco-phone], [data-sandco-email] {
    min-width: 100px;
    display: inline-block;
}

/* Optionnel : un petit effet de "chargement" discret si tu veux chipoter */
[data-sandco-phone]:empty::before, [data-sandco-email]:empty::before {
    content: "...";
    opacity: 0.5;
}

.cf7-cf-turnstile {
    display: flex;
    justify-content: center;
    margin-bottom: 1em !important;
}

@media screen and (max-width: 900px) {
    .contact-page .entry-content > .wp-block-columns {
        flex-direction: column;
    }

    .contact-page .entry-content > .wp-block-columns > .wp-block-column {
        width: 100%;
    }
}

@media screen and (min-width: 901px) {
    .contact-page .entry-content > .wp-block-columns > .wp-block-column:nth-child(2) .map-responsive {
        padding-bottom: 125%;
    }
}

@media screen and (max-width: 768px) {
    .contact-page .entry-content > .wp-block-columns > .wp-block-column:nth-child(2) .map-responsive {
        padding-bottom: 0;
        height: 400px;
    }

    .wp-block-column:nth-child(1) {
        padding: 0;
    }

    .wp-block-column:nth-child(2) .contact-details {       
        max-width: 280px; 
        margin-left: auto;
        margin-right: auto;
    }
}