/* Estilos exclusivos de Contacto. La tipografía y animaciones compartidas están en style.css. */
.contacto-intro {
    --contacto-intro-background: #fafbf9;
    box-sizing: border-box;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    /* Reserva altura para las formas sin limitar el crecimiento del contenido. */
    min-height: clamp(22rem, 40vw, 30rem);
    padding: 2rem clamp(1.25rem, 4vw, 2rem);
    background: var(--contacto-intro-background);
    font-family: 'Inter', sans-serif;
    text-align: center;
}

/* Baja el contenido y la decoración conservando la etiqueta en su posición. */
.contacto-intro > :not(.contacto-intro-eyebrow),
.contacto-intro::before,
.contacto-intro::after {
    translate: 0 12px;
}

/* Formas decorativas: no ocupan espacio ni interceptan el cursor. */
.contacto-intro::before,
.contacto-intro::after {
    content: '';
    position: absolute;
    z-index: -2;
    width: clamp(7rem, 20vw, 18rem);
    height: clamp(8rem, 20vw, 18rem);
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100% 100%;
    pointer-events: none;
}

.contacto-intro::before {
    top: calc(12% + 24px);
    left: -2rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 280 240' preserveAspectRatio='none'%3E%3Cpath fill='%23d8f1eb' d='M0 32C44 8 80 12 110 43C136 70 151 82 190 86C231 90 263 95 268 124C277 170 226 179 190 173C150 166 131 172 95 192C62 210 32 227 0 230Z'/%3E%3C/svg%3E");
}

.contacto-intro::after {
    top: 1rem;
    right: -2rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 280 240' preserveAspectRatio='none'%3E%3Cpath fill='%23d8f1eb' d='M280 0H122C79 0 23 17 17 55C10 94 61 105 99 120C138 135 151 155 177 184C210 222 241 233 280 216Z'/%3E%3C/svg%3E");
}

/* Curvas discontinuas: un mismo SVG reutilizado en ambos laterales. */
.contacto-intro-trail {
    position: absolute;
    z-index: -1;
    display: block;
    width: clamp(7rem, 22vw, 20rem);
    aspect-ratio: 2.5;
    background-color: #76c2af;
    -webkit-mask: url('../icons/dashed-curve.svg') center / contain no-repeat;
    mask: url('../icons/dashed-curve.svg') center / contain no-repeat;
    pointer-events: none;
}

.contacto-intro-trail--left {
    top: 0.5rem;
    left: -1.5rem;
    transform: rotate(-8deg);
}

.contacto-intro-trail--right {
    right: -1.5rem;
    bottom: 1.5rem;
    transform: rotate(12deg) scaleX(-1);
}

/* Iconos decorativos sobre las formas y detrás del contenido. */
.contacto-intro-decoration {
    position: absolute;
    z-index: -1;
    display: block;
    width: clamp(1.75rem, 4vw, 3.5rem);
    height: clamp(1.75rem, 4vw, 3.5rem);
    background-color: #76c2af;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
    pointer-events: none;
}

.contacto-intro-decoration--paw-left,
.contacto-intro-decoration--paw-right {
    -webkit-mask-image: url('../icons/cat-paw.svg');
    mask-image: url('../icons/cat-paw.svg');
}

.contacto-intro-decoration--paw-left {
    background-color: var(--contacto-intro-background);
    top: 38%;
    left: clamp(1rem, 10vw, 9rem);
    transform: rotate(-22deg);
}

.contacto-intro-decoration--paw-right {
    right: clamp(1rem, 9vw, 8rem);
    bottom: 16%;
    transform: rotate(22deg);
}

.contacto-intro-decoration--phone {
    top: 12%;
    right: clamp(2rem, 18vw, 16rem);
    transform: rotate(15deg);
}

.contacto-intro-decoration--phone,
.contacto-intro-decoration--phone-left {
    -webkit-mask-image: url('../icons/phone-fill.svg');
    mask-image: url('../icons/phone-fill.svg');
}

.contacto-intro-decoration--phone-left {
    bottom: 12%;
    left: clamp(3rem, 24vw, 22rem);
    transform: rotate(-18deg);
}

.contacto-intro .contacto-intro-eyebrow {
    margin-bottom: 84px;
    text-transform: uppercase;
}

/* Contacto por redes sociales. */
.contacto-redes {
    box-sizing: border-box;
    scroll-margin-top: calc(6rem + var(--wp-admin--admin-bar--height, 0px));
    padding: 2rem clamp(1.25rem, 4vw, 2rem);
    background: #fafbf9;
    font-family: 'Inter', sans-serif;
    text-align: center;
}

.contacto-redes .contacto-redes-eyebrow {
    margin-bottom: 36px;
    text-transform: uppercase;
}

.contacto-redes-cards {
    --contacto-redes-button-width: 260px;
    display: grid;
    gap: 20px;
    max-width: 820px;
    margin: 48px auto 0;
}

.contacto-redes-card {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr) var(--contacto-redes-button-width);
    align-items: center;
    gap: 24px;
    padding: 20px 24px;
    border-radius: 22px;
    background: #e3f4ee;
    text-align: left;
}

.contacto-redes-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 64px;
    padding-right: 20px;
    border-right: 2px solid #76c2af;
}

.contacto-redes-card-icon img {
    display: block;
    width: 56px;
    height: 56px;
    border-radius: 0;
}

.contacto-redes .contacto-redes-card-title {
    margin-bottom: 6px;
    font-size: 1.5rem;
}

.contacto-redes-card-description {
    max-width: 29ch;
    margin: 0;
    color: #333333;
    font-size: 0.8rem;
    line-height: 1.5;
}

.contacto-redes .contacto-redes-card-button {
    width: var(--contacto-redes-button-width);
    min-width: 0;
    max-width: 100%;
    box-shadow: 0 4px 12px rgb(41 41 41 / 6%);
}

@media (max-width: 900px) {
    .contacto-redes-card {
        grid-template-columns: 80px minmax(0, 1fr);
        gap: 16px;
        padding: 20px;
    }

    .contacto-redes-card-icon {
        grid-row: span 2;
        padding-right: 20px;
    }

    .contacto-redes-card-icon img {
        width: 56px;
        height: 56px;
    }

    .contacto-redes-card-button {
        grid-column: 2;
        justify-self: start;
    }
}

@media (max-width: 480px) {
    .contacto-redes-card {
        grid-template-columns: minmax(0, 1fr);
        justify-items: center;
        text-align: center;
    }

    .contacto-redes-card-icon {
        grid-row: auto;
        padding: 0;
        border: 0;
    }

    .contacto-redes-card-button {
        grid-column: 1;
        justify-self: center;
    }
}

/* Contacto directo por la página. */
.contacto-mensaje {
    box-sizing: border-box;
    padding: calc(2rem + 24px) clamp(1.25rem, 4vw, 2rem) 2rem;
    background: #fafbf9;
    font-family: 'Inter', sans-serif;
    text-align: center;
}

.contacto-mensaje .contacto-mensaje-eyebrow {
    margin-bottom: 36px;
    text-transform: uppercase;
}

/* Formulario: dos pares de campos y mensaje a todo el ancho. */
.contacto-form {
    max-width: 820px;
    margin: 48px auto 0;
    scroll-margin-top: calc(6rem + var(--wp-admin--admin-bar--height, 0px));
}

.contacto-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    text-align: left;
}

.contacto-form-field--message {
    grid-column: 1 / -1;
}

.contacto-form .contacto-form-field label {
    display: block;
    margin-bottom: 8px;
    color: #333333;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.5;
}

.contacto-form-control {
    position: relative;
}

.contacto-form-icon {
    position: absolute;
    top: 14px;
    left: 14px;
    color: #65b49f;
    pointer-events: none;
}

.contacto-form .contacto-form-control input,
.contacto-form .contacto-form-control textarea {
    box-sizing: border-box;
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 50px;
    margin: 0;
    padding: 12px 14px 12px 48px;
    border: 1px solid #c9cecb;
    border-radius: 12px;
    background: #ffffff;
    color: #333333;
    font: inherit;
    font-size: 1rem;
    line-height: 1.5;
}

.contacto-form .contacto-form-control textarea {
    min-height: 140px;
    resize: vertical;
}

.contacto-form .contacto-form-control :is(input, textarea):focus-visible {
    border-color: #397d6d;
    outline: 2px solid #397d6d;
    outline-offset: 2px;
}

.contacto-form .contacto-form-control [aria-invalid="true"] {
    border-color: #a33333;
}

.contacto-form-hint,
.contacto-form-error {
    margin: 0 0 12px;
    font-size: 0.85rem;
    line-height: 1.5;
    text-align: left;
}

.contacto-form-hint {
    color: #505750;
}

.contacto-form-error {
    margin: 6px 0 0;
    color: #a33333;
}

.contacto-form-notice {
    margin: 0 0 20px;
    padding: 14px 18px;
    border: 1px solid;
    border-radius: 12px;
    text-align: left;
}

.contacto-form-notice--success {
    background: #e3f4ee;
    color: #285b4e;
}

.contacto-form-notice--error {
    background: #fff0ed;
    color: #8f2828;
}

.contacto-form-submit {
    min-width: min(100%, 260px);
    max-width: 100%;
    margin-top: 28px;
}

.contacto-form-trap {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

@media (max-width: 600px) {
    .contacto-form-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Cierre: paleta y ancho del CTA de Nosotros, con composición horizontal. */
.contacto-cta {
    padding: 2rem 2rem clamp(2rem, 4vw, 4rem);
    background: #fafbf9;
    font-family: 'Inter', sans-serif;
}

.contacto-cta,
.contacto-cta * {
    box-sizing: border-box;
}

.contacto-cta-inner {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr) 100px;
    align-items: center;
    gap: 32px;
    max-width: 1120px;
    margin-inline: auto;
    padding: 28px 24px;
    border-radius: 1.5rem;
    background: #eef3ef;
}

.contacto-cta-art {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100px;
    border-right: 2px solid #76c2af;
    padding-right: 24px;
}

.contacto-cta-art::before {
    content: '';
    position: absolute;
    z-index: -1;
    left: -6px;
    bottom: -34px;
    width: 170px;
    height: 86px;
    border-radius: 58% 42% 63% 37% / 60% 55% 45% 40%;
    background: #dcefe7;
    transform: rotate(-6deg);
}

.contacto-cta .contacto-cta-envelope {
    display: block;
    width: 100px;
    height: 80px;
    max-width: 100%;
    border-radius: 0;
    transform: rotate(-9deg);
}

.contacto-cta .contacto-cta-title {
    margin-bottom: 8px;
    font-size: clamp(1.4rem, 2.2vw, 1.85rem);
}

.contacto-cta .contacto-cta-description {
    font-size: calc(1rem - 2px);
    line-height: 1.6;
}

.contacto-cta-paws {
    position: relative;
    width: 100px;
    height: 100px;
    pointer-events: none;
}

.contacto-cta-paw {
    position: absolute;
    background: #76c2af;
    -webkit-mask: url('../icons/cat-paw.svg') center / contain no-repeat;
    mask: url('../icons/cat-paw.svg') center / contain no-repeat;
}

.contacto-cta-paw--large {
    left: 0;
    bottom: 0;
    width: 48px;
    height: 48px;
    transform: rotate(-18deg);
}

.contacto-cta-paw--small {
    top: 0;
    right: 0;
    width: 36px;
    height: 36px;
    transform: rotate(16deg);
}

@media (max-width: 767px) {
    .contacto-cta {
        padding-inline: 1.25rem;
    }

    .contacto-cta-inner {
        grid-template-columns: 100px minmax(0, 1fr);
        gap: 24px;
        padding: 24px 20px 56px;
    }

    .contacto-cta-art {
        padding-right: 16px;
    }

    .contacto-cta-art::before {
        width: 110px;
        height: 70px;
        bottom: -12px;
    }

    .contacto-cta-paws {
        position: absolute;
        right: 16px;
        bottom: 12px;
        width: 64px;
        height: 44px;
    }

    .contacto-cta-paw--large {
        width: 30px;
        height: 30px;
    }

    .contacto-cta-paw--small {
        width: 24px;
        height: 24px;
    }
}

@media (max-width: 480px) {
    .contacto-cta-inner {
        grid-template-columns: minmax(0, 1fr);
        text-align: center;
    }

    .contacto-cta-art {
        justify-self: center;
        width: 140px;
        min-height: 110px;
        padding: 0 0 16px;
        border-right: 0;
        border-bottom: 2px solid #76c2af;
    }

    .contacto-cta-art::before {
        bottom: 12px;
        left: 0;
        width: 140px;
    }
}

/* Enlace a Redes con el mismo trazo que la flecha de Nosotros. */
.contacto-intro .contacto-intro-next {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-top: clamp(4.5rem, 9vw, 7.5rem);
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: #65b49f;
    opacity: 1;
    text-decoration: none;
    cursor: pointer;
}

.contacto-intro .contacto-intro-next:hover {
    color: #65b49f;
    text-decoration: none;
}

.contacto-intro-next:focus-visible {
    outline: 2px solid #333333;
    outline-offset: 4px;
}

@media (prefers-reduced-motion: no-preference) {
    html:has(#contacto-redes) {
        scroll-behavior: smooth;
    }
}

@media (max-width: 767px) {
    .contacto-intro-decoration--paw-left {
        /* Parte del mismo anclaje que la forma izquierda y entra en su zona central. */
        top: calc(12% + 24px + 3.5rem);
        left: 1rem;
    }

    .contacto-intro-decoration--phone-left {
        bottom: calc(12% + 12px);
    }

    .contacto-intro .contacto-intro-next {
        margin-top: calc(clamp(4.5rem, 9vw, 7.5rem) + 12px);
    }
}
