/* Contact Us Block Styles */

.blog-contact-section {
    width: 100%;
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 100px;
    margin-bottom: 50px;
    position: relative;
}

.blog-contact-section .blog-contact-container {
    width: 85%;
    max-width: 1200px;
    height: 309px;
    background: linear-gradient(to right,
            rgba(0, 0, 0, 0.8) 0%,
            rgba(0, 0, 0, 0.581) 40%,
            rgba(0, 0, 0, 0) 100%),
        url(/wp-content/themes/houzez-child/blocks/assets/Contact-banner.png);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 40px 50px;
    border-radius: 16px;
    position: relative;
    overflow: visible;
}

.blog-contact-container div:first-child {
    width: 556px;
    max-width: 50%;
    height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    z-index: 2;
}

.blog-contact-container div:first-child h1 {
    font-size: 32px;
    font-weight: 700;
    color: white;
    margin-bottom: 15px;
    line-height: 1.2;
}

.blog-contact-container div:first-child p {
    color: white;
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    margin-bottom: 20px;
}

.blog-contact-container div:first-child form {
    width: 100%;
    max-width: 540px;
    height: 56px;
    background-color: white;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.blog-contact-container div:first-child form input {
    flex: 1;
    height: 100%;
    border: none;
    padding: 0 15px;
    border-radius: 6px 0 0 6px;
    font-size: 14px;
}

.blog-contact-container div:first-child form input::placeholder {
    font-weight: 400;
    font-size: 14px;
    color: #999;
}

.blog-contact-container div:first-child form input:focus {
    border: none;
    outline: none;
}

.blog-contact-container div:first-child form .blog-contact-submit {
    width: auto;
    min-width: 90px;
    height: 44px;
    border-radius: 6px;
    border: none;
    background-color: #46ad67;
    color: white;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    padding: 0 20px;
}

.blog-contact-container div:first-child form .blog-contact-submit:hover {
    background-color: #3a995c;
}

.blog-contact-container .blog-contact-image {
    width: 340px;
    height: 100%;
    max-height: 100%;
    background-image: url(/wp-content/themes/houzez-child/blocks/assets/Contact-image.png);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    position: absolute;
    top: 0;
    right: 0;
    z-index: 1;
    border-radius: 0 16px 16px 0;
    overflow: hidden;
}

/* Ensure text stays above image */
.blog-contact-container div:first-child { position: relative; z-index: 2; }

/* Optional subtle overlay to improve text readability near image edge */
.blog-contact-container::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 340px;
    height: 100%;
    background: linear-gradient(to left, rgba(0,0,0,0.25), rgba(0,0,0,0));
    pointer-events: none;
    border-radius: 0 16px 16px 0;
}

/* Screen reader only label */
.blog-contact-container .screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .blog-contact-container .blog-contact-image { width: 300px; }
    .blog-contact-container::after { width: 300px; }
}

@media (max-width: 1024px) {
    .blog-contact-section .blog-contact-container {
        width: 90%;
        height: auto;
        padding: 40px 30px;
        overflow: hidden;
    }

    .blog-contact-container div:first-child {
        max-width: 60%;
    }

    .blog-contact-container div:first-child h1 {
        font-size: 28px;
    }

    .blog-contact-container .blog-contact-image { width: 250px; }
    .blog-contact-container::after { width: 250px; }
}

@media (max-width: 768px) {
    .blog-contact-section {
        margin-top: 60px;
        margin-bottom: 80px;
    }

    .blog-contact-section .blog-contact-container {
        width: 95%;
        padding: 30px 25px;
        height: auto;
        min-height: 350px;
    }

    .blog-contact-container div:first-child {
        max-width: 100%;
        width: 100%;
    }

    .blog-contact-container div:first-child h1 {
        font-size: 24px;
    }

    .blog-contact-container div:first-child p {
        font-size: 14px;
        line-height: 20px;
    }

    .blog-contact-container div:first-child form {
        height: 50px;
        max-width: 100%;
    }

    .blog-contact-container .blog-contact-image { width: 220px; opacity: 0.35; }
    .blog-contact-container::after { width: 220px; }
}

@media (max-width: 480px) {
    .blog-contact-section {
        margin-top: 40px;
        margin-bottom: 60px;
    }

    .blog-contact-section .blog-contact-container {
        padding: 25px 20px;
        min-height: auto;
    }

    .blog-contact-container div:first-child h1 {
        font-size: 20px;
    }

    .blog-contact-container div:first-child p {
        font-size: 13px;
        line-height: 18px;
    }

    .blog-contact-container div:first-child form {
        height: auto;
        flex-direction: column;
        gap: 10px;
        padding: 10px;
    }

    .blog-contact-container div:first-child form input {
        width: 100%;
        height: 44px;
        border-radius: 6px;
        padding: 0 15px;
    }

    .blog-contact-container div:first-child form .blog-contact-submit {
        width: 100%;
        min-width: auto;
    }

    .blog-contact-container .blog-contact-image { display: none; }
    .blog-contact-container::after { display: none; }
}
