:root {
    --tapioka-purple: #5B2C6F;
    --tapioka-light-violet: #941C80;
    --tapioka-deep-violet: #512680;
}

.bg-degrade-violet {
    background: linear-gradient(135deg, var(--tapioka-light-violet) 0%, var(--tapioka-deep-violet) 100%);
    color: white;
}

.contact-section {
    color: white;
    padding: 0;
    border-radius: 32px 32px 0 0;
    overflow: hidden;
    margin-top: -36px;
    position: relative;
    z-index: 9;
    font-family: 'Outfit', sans-serif;
}

.contact-card {
    padding: 75px 38px 18px;
}

.contact-layout {
    display: grid;
    grid-template-columns: minmax(320px, 1fr) minmax(360px, 1.1fr);
    gap: 38px;
    align-items: start;
}

.contact-info {
    display: flex;
    flex-direction: column;
}

.contact-info h2 {
    display: inline-block;
    margin: 0;
    color: white;
    font-size: clamp(2.8rem, 3.8vw, 4.1rem);
    font-weight: 800;
    line-height: 0.85;
    letter-spacing: -0.025em;
}

.contact-brand-row {
    margin-bottom: 20px;
}

.contact-brand-top,
.contact-brand-bottom {
    display: block;
}

.contact-brand-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.social-links {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 8px;
}

.social-links a {
    color: white;
    font-size: 1.75rem;
    display: inline-flex;
    align-items: center;
    transition: opacity 0.2s ease;
}

.social-links a:hover {
    color: white;
    opacity: 0.85;
}

.contact-addresses {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 28px;
    max-width: 640px;
    margin-bottom: 10px;
}

.contact-person {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
}

.contact-address p {
    margin: 0;
    opacity: 0.95;
    font-size: 1.1rem;
    line-height: 1.45;
    font-weight: 100;
}

.contact-address p strong {
    font-weight: 700;
}

.contact-portrait {
    width: min(100%, clamp(240px, 18.5vw, 290px));
    aspect-ratio: 0.74;
    margin: 0;
    border-radius: 999px;
    overflow: hidden;
    background: #1d1bc1;
    flex: 0 0 auto;
    position: relative;
    transition: transform 0.35s ease;
}

.contact-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

@keyframes contactSlideInDown {
    from {
        transform: translateY(-12px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes contactSlideInUp {
    from {
        transform: translateY(12px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.contact-portrait-overlay {
    position: absolute;
    inset: 0;
    margin: 0;
    padding: 20px 18px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    background: linear-gradient(135deg, #512680 0%, #722180 36%, #8A1D80 68%, #941C80 100%);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.contact-portrait-overlay h3 {
    margin: 0 0 4px;
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    opacity: 0;
    transform: translateY(-8px);
    will-change: transform, opacity;
}

.contact-portrait-role,
.contact-portrait-phone {
    margin: 0;
    font-size: 0.84rem;
    line-height: 1.35;
}

.contact-portrait-role {
    opacity: 0;
    transform: translateY(-8px);
    will-change: transform, opacity;
}

.contact-portrait-phone {
    margin-top: 6px;
    opacity: 0;
    transform: translateY(8px);
    will-change: transform, opacity;
}

.contact-portrait-overlay a {
    margin-top: 8px;
    color: white;
    font-size: 0.76rem;
    line-height: 1.3;
    text-decoration: underline;
    text-underline-offset: 2px;
    overflow-wrap: anywhere;
    opacity: 0;
    transform: translateY(8px);
    will-change: transform, opacity;
}

.contact-portrait-overlay a:hover {
    color: white;
}

.contact-portrait:hover {
    transform: rotate(-6deg) scale(1.04);
}

.contact-portrait:hover .contact-portrait-overlay {
    opacity: 0.88;
}

.contact-portrait:hover .contact-portrait-overlay h3 {
    animation: contactSlideInDown 0.45s cubic-bezier(.2,.9,.3,1) both;
}

.contact-portrait:hover .contact-portrait-overlay .contact-portrait-role {
    animation: contactSlideInDown 0.45s cubic-bezier(.2,.9,.3,1) both;
    animation-delay: 0.06s;
}

.contact-portrait:hover .contact-portrait-overlay .contact-portrait-phone {
    animation: contactSlideInUp 0.45s cubic-bezier(.2,.9,.3,1) both;
    animation-delay: 0.08s;
}

.contact-portrait:hover .contact-portrait-overlay a {
    animation: contactSlideInUp 0.45s cubic-bezier(.2,.9,.3,1) both;
    animation-delay: 0.12s;
}

.contact-mobile-contacts {
    display: none;
}

.contact-mobile-person {
    display: none;
}

.contact-mobile-portrait {
    width: 102px;
    aspect-ratio: 0.72;
    margin: 0;
    border-radius: 999px;
    overflow: hidden;
    flex: 0 0 auto;
    background: #1d1bc1;
}

.contact-mobile-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

.contact-mobile-copy {
    min-width: 0;
}

.contact-mobile-copy h3 {
    margin: 0 0 4px;
    font-size: 1.02rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.contact-mobile-role,
.contact-mobile-phone {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.35;
}

.contact-mobile-copy a {
    color: white;
    font-size: 0.9rem;
    line-height: 1.35;
    text-decoration: underline;
    text-underline-offset: 2px;
    word-break: break-word;
}

.contact-mobile-copy a:hover {
    color: white;
}

.contact-form {
    padding-top: 2px;
}

.contact-form .wpcf7-form p {
    margin: 0;
}

.contact-form .wpcf7-form > p {
    display: contents;
}

.contact-form .wpcf7-form-control-wrap {
    display: block;
}

.contact-form-note {
    margin: 0 0 18px;
    font-size: 0.68rem;
    text-align: right;
    opacity: 0.82;
}

.contact-form-grid {
    display: grid;
    gap: 10px;
}

.contact-form-grid p {
    display: contents;
}

.contact-form-grid br {
    display: none;
}

.contact-form .form-control {
    width: 100%;
    background: #f4f1f7;
    border: 0;
    border-radius: 4px;
    color: #2a2034;
    padding: 13px 12px;
    min-height: 42px;
    box-shadow: none;
}

.contact-form textarea.form-control {
    min-height: 126px;
    resize: vertical;
}

.contact-form .form-control::placeholder {
    color: #5e5668;
}

.contact-form .form-control:focus {
    background: #ffffff;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.24);
}

.contact-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
}

.contact-actions p {
    display: contents;
}

.contact-actions br {
    display: none;
}

.btn-submit,
.btn-whatsapp {
    min-height: 46px;
    border-radius: 999px;
    padding: 11px 28px;
    font-size: 0.92rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    text-decoration: none;
    transition: all 0.25s ease;
}

.btn-submit {
    min-width: 142px;
    background: white;
    color: var(--tapioka-purple);
    border: 1px solid white;
}

.btn-submit:hover {
    background: transparent;
    color: white;
    border-color: rgba(255, 255, 255, 0.72);
}

.contact-form .wpcf7-spinner {
    display: none;
}

.btn-whatsapp {
    background: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.72);
    gap: 8px;
    vertical-align: middle;
}

.btn-whatsapp i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.btn-whatsapp span {
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.btn-whatsapp:hover {
    background: rgba(255, 255, 255, 0.12);
    color: white;
}

.contact-form .wpcf7-not-valid-tip,
.contact-form .wpcf7-response-output {
    color: white;
}

.contact-form .wpcf7-response-output {
    margin: 14px 0 0;
    border-color: rgba(255, 255, 255, 0.5);
    border-radius: 6px;
}

.footer-links {
    margin-top: 24px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.2);
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 18px;
    font-size: 0.72rem;
    opacity: 0.92;
}

.footer-links p {
    display: contents;
}

.footer-links br {
    display: none;
}

.footer-links span,
.footer-links a {
    color: white;
    text-decoration: none;
}

.footer-links a:hover {
    color: white;
    text-decoration: underline;
}

@media (max-width: 992px) {
    .contact-card {
        padding: 68px 0 32px;
    }

    .contact-info h2 {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    .contact-card {
        padding: 64px 24px 18px;
    }

    .contact-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .contact-brand-top {
        justify-content: flex-start;
        gap: 14px;
        flex-wrap: wrap;
    }

    .social-links {
        position: static;
        margin-top: 0;
        padding-top: 0;
    }

    .contact-addresses {
        max-width: none;
    }

    .contact-mobile-contacts {
        display: flex;
        flex-direction: column;
        gap: 22px;
        margin-top: 18px;
    }

    .contact-form-note {
        text-align: left;
    }

    .footer-links {
        justify-content: flex-start;
    }

    .contact-portrait {
        display: none;
    }

    .contact-mobile-person {
        display: flex;
        align-items: flex-start;
        gap: 14px;
    }
}

@media (max-width: 576px) {
    .contact-section {
        border-radius: 24px 24px 0 0;
        margin-top: -24px;
    }

    .contact-card {
        padding: 64px 18px 16px;
    }

    .contact-info h2 {
        font-size: 2rem;
    }

    .contact-addresses {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px 14px;
        margin-bottom: 24px;
    }

    .contact-person {
        gap: 14px;
    }

    .contact-address p {
        font-size: 0.88rem;
        line-height: 1.35;
    }

    .contact-mobile-portrait {
        width: 88px;
    }

    .contact-mobile-copy h3 {
        font-size: 0.95rem;
    }

    .contact-mobile-role,
    .contact-mobile-phone,
    .contact-mobile-copy a {
        font-size: 0.82rem;
    }

    .social-links {
        display: none;
    }

    .contact-actions {
        flex-direction: column;
    }

    .btn-submit,
    .btn-whatsapp {
        width: 100%;
    }

    .footer-links {
        gap: 10px 16px;
        font-size: 0.68rem;
    }
}
