#db9_contact {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 8%;
    position: relative;
    overflow: hidden;
}

#db9_contact::before {
    content: '';
    position: absolute;
    bottom: -20%;
    right: -15%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(183, 200, 138, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(90px);
    pointer-events: none;
}

#db9_contact_container {
    width: 100%;
    max-width: 1300px;
    margin-top: 50px;
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 35px;
    align-items: start;
}

/* Avoid horizontal overflow on small viewports (long strings / intrinsic sizes) */
#db9_contact_container > * {
    min-width: 0;
    max-width: 100%;
}

#db9_contact_info {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.db9_contact-card {
    display: flex;
    gap: 20px;
    align-items: center;
    background: linear-gradient(135deg, var(--neutral-color-0) 0%, rgba(246, 246, 243, 0.8) 100%);
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0px 6px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 4px solid transparent;
    position: relative;
    overflow: hidden;
}

:root[data-theme="dark"] .db9_contact-card {
    background: linear-gradient(135deg, var(--neutral-color-0) 0%, rgba(42, 42, 42, 0.8) 100%);
    box-shadow: 0px 6px 30px rgba(0, 0, 0, 0.3);
}

.db9_contact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(183, 200, 138, 0.1), transparent);
    transition: left 0.6s;
}

.db9_contact-card:hover::before {
    left: 100%;
}

.db9_contact-card:hover {
    transform: translateY(-6px);
    box-shadow: 0px 12px 45px rgba(0, 0, 0, 0.12);
    border-left-color: var(--color-4);
}

.db9_contact-card i {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--color-2) 0%, var(--color-3) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--neutral-color-0);
    font-size: 1.5rem;
    flex-shrink: 0;
    box-shadow: 0px 4px 15px rgba(183, 200, 138, 0.3);
}

.db9_contact-card h4 {
    color: var(--neutral-color-1);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.db9_contact-card p {
    color: var(--neutral-color-3);
    font-size: 0.98rem;
}

.db9_contact-card p,
.db9_contact-card a {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.db9_contact-card a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.db9_contact-card a:hover {
    color: var(--color-6);
}

#db9_contact_form {
    background: linear-gradient(145deg, var(--neutral-color-0) 0%, rgba(246, 246, 243, 0.9) 100%);
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0px 10px 40px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 20px;
    border-top: 5px solid var(--color-4);
}

:root[data-theme="dark"] #db9_contact_form {
    background: linear-gradient(145deg, var(--neutral-color-0) 0%, rgba(42, 42, 42, 0.9) 100%);
    box-shadow: 0px 10px 40px rgba(0, 0, 0, 0.4);
}

.db9_form-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.db9_form-row label {
    color: var(--neutral-color-1);
    font-weight: 600;
    font-size: 1.02rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.db9_form-row input,
.db9_form-row textarea {
    padding: 14px 16px;
    border-radius: 14px;
    border: 2px solid var(--color-2);
    background-color: rgba(246, 246, 243, 0.5);
    color: var(--neutral-color-1);
    outline: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1rem;
    font-family: var(--font-body);
    cursor: none;
}

:root[data-theme="dark"] .db9_form-row input,
:root[data-theme="dark"] .db9_form-row textarea {
    background-color: rgba(42, 42, 42, 0.5);
    border-color: rgba(168, 184, 141, 0.3);
}

.db9_form-row input:focus,
.db9_form-row textarea:focus {
    border-color: var(--color-4);
    background-color: var(--neutral-color-0);
    box-shadow: 0px 4px 20px rgba(233, 166, 160, 0.15);
    transform: translateY(-2px);
}

.db9_form-row textarea {
    resize: vertical;
    min-height: 140px;
}

#db9_contact_submit {
    margin-top: 12px;
    padding: 16px 20px;
    font-size: 1.05rem;
    font-weight: 600;
}

#db9_contact_map {
    grid-column: 1 / -1;
    background: linear-gradient(145deg, var(--neutral-color-0) 0%, rgba(246, 246, 243, 0.9) 100%);
    border-radius: 20px;
    padding: 12px;
    box-shadow: 0px 10px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

:root[data-theme="dark"] #db9_contact_map {
    background: linear-gradient(145deg, var(--neutral-color-0) 0%, rgba(42, 42, 42, 0.9) 100%);
    box-shadow: 0px 10px 40px rgba(0, 0, 0, 0.4);
}

#db9_contact_map iframe {
    width: 100%;
    height: 380px;
    border: 0;
    border-radius: 14px;
    cursor: none;
    display: block;
    max-width: 100%;
}

@media screen and (max-width: 1024px) {
    #db9_contact_container {
        grid-template-columns: 1fr;
        gap: 30px;
        justify-items: center;
    }

    #db9_contact_info,
    #db9_contact_form,
    #db9_contact_map {
        width: min(100%, 720px);
        justify-self: center;
    }
}

@media screen and (max-width: 768px) {
    #db9_contact {
        padding: 60px 8%;
    }

    #db9_contact_container {
        margin-top: 32px;
    }

    #db9_contact_info,
    #db9_contact_form,
    #db9_contact_map {
        animation: none;
    }

    #db9_contact_form {
        padding: 28px 24px;
    }

    .db9_contact-card {
        padding: 20px;
    }

    .db9_contact-card i {
        width: 52px;
        height: 52px;
        font-size: 1.4rem;
    }
}

@media screen and (max-width: 600px) {
    .db9_contact-card {
        flex-direction: column;
        text-align: center;
        padding: 18px;
    }

    #db9_contact_map iframe {
        height: 300px;
    }
}

@media screen and (max-width: 480px) {
    #db9_contact {
        padding: 56px 6%;
    }

    #db9_contact_container {
        gap: 22px;
        justify-items: center;
    }

    #db9_contact_info,
    #db9_contact_form,
    #db9_contact_map {
        width: min(100%, 560px);
        justify-self: center;
    }

    .db9_contact-card {
        width: 100%;
        padding: 16px;
        text-align: center;
        border-left: none;
    }

    .db9_contact-card i {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }

    #db9_contact_form {
        padding: 22px 18px;
    }

    #db9_contact_map {
        padding: 10px;
    }

    #db9_contact_map iframe {
        height: 260px;
    }
}