/* Prevent horizontal scroll globally for the overhanging image */
body {
    overflow-x: hidden;
}

/* =========================================
   CONTACT PAGE STYLES
   ========================================= */

.contact-page * {
    box-sizing: border-box;
}

/* --- Main Content Layout --- */
.contact-page {
    font-family: 'Open Sans', Arial, sans-serif;
    color: var(--color-text-main);
    background-color: var(--color-white);
    line-height: 1.6;
    display: flex;
    min-height: 80vh;
    padding: 0 10%;
    position: relative;
    /* Removed overflow-x: hidden to prevent the double-scrollbar bug */
}

.contact-page .content-left {
    flex: 1;
    padding-top: 5rem;
    padding-bottom: 5rem;
    padding-right: 3rem;
    z-index: 2;
}

.contact-page .content-right {
    flex: 1;
    position: relative;
    z-index: 1;
}

/* --- Typography & Elements --- */
.contact-page .content-left h2 {
    font-family: 'Times New Roman', Georgia, serif;
    font-size: 4rem;
    font-weight: 500;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--color-primary);
}

.contact-page .red-divider {
    width: 50px;
    height: 3px;
    background-color: var(--color-accent);
    border: none;
    margin-bottom: 2rem;
    margin-left: 0; /* FIX: Forces the line to align to the left */
}

.contact-page .subtitle {
    font-size: 1.25rem;
    margin-bottom: 4rem;
    color: var(--color-text-muted);
}

/* --- Contact Information List --- */
.contact-page .contact-list {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.contact-page .contact-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.contact-page .icon-circle {
    width: 70px;
    height: 70px;
    border: 1px solid var(--color-sea-blue);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    color: var(--color-sea-blue);
}

.contact-page .contact-details {
    display: flex;
    flex-direction: column;
}

.contact-page .contact-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.3rem;
    font-weight: 500;
    color: var(--color-text-light);
}

.contact-page .contact-value {
    font-size: 1.25rem;
    color: var(--color-sea-blue);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}

.contact-page .contact-value.no-underline {
    text-decoration: none;
}

/* Dynamic wrapper for the Automad uploaded image */
.contact-page .image-wrapper-dynamic {
    position: absolute;
    top: 0;
    right: -15%;
    width: 120%;
    height: 100%;
    mask-image: linear-gradient(to right, transparent, black 25%);
    -webkit-mask-image: linear-gradient(to right, transparent, black 25%);
}

/* Force Automad block containers to fill the space */
.contact-page .image-wrapper-dynamic .am-block,
.contact-page .image-wrapper-dynamic figure,
.contact-page .image-wrapper-dynamic .am-block-image {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
}

/* Force the actual img tag to stretch and crop like a background cover */
.contact-page .image-wrapper-dynamic img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    object-position: center top;
    display: block;
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .contact-page {
        padding-left: 5%;
        padding-right: 5%;
    }
    .contact-page .content-left h2 {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .contact-page {
        flex-direction: column;
    }
    .contact-page .content-left {
        padding-right: 0;
    }
    .contact-page .content-right {
        min-height: 400px;
    }
    /* FIX: Updated to target the new dynamic image wrapper class */
    .contact-page .image-wrapper-dynamic {
        right: 0;
        width: 100%;
        mask-image: none;
        -webkit-mask-image: none;
    }
}