/* --- Contact Page Specific Styles --- */

/* Specific background for the Contact page hero */
.page-hero-section .page-hero-image[style*="hero-contact-bg.jpg"] {
    background-position: center bottom;
    /* Adjust as per your specific hero image */
}

/* Contact Details & Form Section */
.contact-details-section {
    padding: 1rem;
    /* Standard section spacing */
    background-color: white;
    /* Light background for this section */
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    /* Left column slightly narrower than right */
    gap: 3rem;
    /* Space between columns */
    align-items: flex-start;
    /* Align content to the top */
    background-color: var(--white);
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.contact-info-block,
.contact-form-wrapper {
    padding: 10px;
}

.contact-block-title {
    font-size: 1.8em;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.contact-block-subtitle {
    font-size: 1.1em;
    color: black;
    margin-top: 8px;
    margin-bottom: 6px;
}

.contact-info-block .detail-item {
    display: flex;
    /* flex-wrap: wrap; */
    /* Allow wrapping on smaller screens */
    margin-bottom: 10px;
    font-size: 1.05em;
    line-height: 1.5;
}

.contact-info-block .detail-label {
    font-weight: 600;
    color: black;
    flex-basis: 150px;
    /* Fixed width for labels */
    flex-shrink: 0;
    margin-right: 10px;
}

.contact-info-block .detail-value {
    color: black;
    flex-grow: 1;
    /* Allow value to take remaining space */
}

.contact-info-block .detail-value a {
    color: var(--primary-color);
    text-decoration: none;
}

.contact-info-block .detail-value a:hover {
    text-decoration: underline;
}

.contact-divider {
    border: none;
    border-top: 1px solid gray;
    margin: 8px 0;
}

/* Newsletter form on contact page (specific style if different from footer) */
.newsletter-form-contact-page {
    display: flex;
    gap: 10px;
}

.newsletter-form-contact-page input[type="email"] {
    flex-grow: 1;
    padding: 12px 15px;
    border: 1px solid gray;
    border-radius: 5px;
    font-size: 1em;
}

.newsletter-form-contact-page .btn-primary {
    padding: 12px 25px;
    font-size: 1em;
    white-space: nowrap;
    /* Prevent button text from wrapping */
}


.contact-form-wrapper {
    margin-inline: 1.2rem;
}

/* Main Contact Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    /* Space between form fields */
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid gray;
    border-radius: 5px;
    font-size: 1em;
    /* Ensure consistent font */
    color: var(--text-color);
    background-color: #fff;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 77, 0, 0.2);
}

.contact-form textarea {
    resize: vertical;
    /* Allow vertical resizing of textarea */
    min-height: 120px;
}

.contact-form .btn-primary {
    align-self: flex-start;
    /* Align button to the left */
    padding: 12px 30px;
    font-size: 1.1em;
    margin-top: 10px;
}

.btn-primary {
    background-color: var(--color-primary);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
}


/* Directions Section (Maps) */
.directions-section {
    padding: 1rem;
    background-color: white;
}

.directions-section .section-title {
    margin-bottom: 8px;
}

.map-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* Two columns for maps */
    gap: 10px;
    /* Space between maps */
}

.map-container {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    background-color: var(--white);
    display: flex;
    flex-direction: column;
    /* Stack map and link */
}

.map-placeholder iframe {
    width: 100%;
    height: 300px;
    /* Fixed height for maps */
    display: block;
    border: none;
}

.map-direction-link {
    display: block;
    text-align: center;
    padding: 15px;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    /* Handle long link text */
}

.map-direction-link:hover {
    filter: brightness(150%) saturate(150%);
}

/* --- Styles for Contact Form Spinner --- */

.contact-form-wrapper {
    position: relative;
}

.processing-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99;
    /* Add a border-radius if your wrapper has one */
    /* border-radius: 10px; */
}

.processing-spinner {
    text-align: center;
}

.processing-spinner .fa-spinner {
    font-size: 2rem;
    color: #1A5F1A;
    /* Or your var(--color-primary) */
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0);
    }

    100% {
        transform: rotate(360deg);
    }
}

.processing-spinner .processing-text {
    margin-top: 0.7rem;
    font-weight: 600;
    color: #1A5F1A;
    /* Or your var(--color-primary) */
    font-size: 1.1rem;
}

/* Add styles for feedback alerts if you don't have them */
.alert {
    padding: 1rem;
    margin-top: 1rem;
    border-radius: 5px;
    border: 1px solid transparent;
}

.alert-success {
    color: #0f5132;
    background-color: #d1e7dd;
    border-color: #badbcc;
}

.alert-danger {
    color: #842029;
    background-color: #f8d7da;
    border-color: #f5c2c7;
}


/* --- Responsive Adjustments for Contact Page --- */

@media (max-width: 992px) {
    .contact-grid {
        grid-template-columns: 1fr;
        /* Stack columns on smaller screens */
        gap: var(--spacing-large);
        /* More space when stacked */
        padding: var(--spacing-small);
    }

    .contact-block-title {
        text-align: center;
        margin-bottom: var(--spacing-small);
    }

    .contact-info-block .detail-item {
        flex-direction: column;
        /* Stack label and value */
        align-items: flex-start;
        gap: 2px;
        margin-bottom: 15px;
    }

    .contact-info-block .detail-label {
        flex-basis: auto;
        margin-right: 0;
        margin-bottom: 5px;
        /* Space between stacked label and value */
    }

    .newsletter-form-contact-page {
        flex-direction: column;
        gap: 10px;
    }

    .newsletter-form-contact-page .btn-primary {
        width: 100%;
    }

    .contact-form .btn-primary {
        align-self: stretch;
        /* Make button full width */
    }

    .map-grid {
        grid-template-columns: 1fr;
        /* Stack maps on smaller screens */
        gap: var(--spacing-large);
    }
}