/* Full width background wrapper - breaks out of any container */
.imgtext-row-fluid-wrapper {
    background-color: #F8F4EF !important;
    width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    margin-right: calc(-50vw + 50%) !important;
    padding: 48px 40px !important;
    box-sizing: border-box !important;
}

/* Override for specific padding top class */
.imgtext-row-fluid-wrapper.pt-96dt-64mob {
    padding-top: 96px !important;
}

/* Override for specific padding bottom class */
.imgtext-row-fluid-wrapper.pb-96pb-64mob {
    padding-bottom: 96px !important;
}

/* Primary grid layout with maximum specificity */
.imgtext-content-max-width {
    display: grid !important;
    grid-template-columns: 5fr 6fr !important;
    grid-template-areas: "image text" !important;
    gap: 80px !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 1100px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

/* Fallback flexbox approach in case grid doesn't work */
@supports not (display: grid) {
    .imgtext-content-max-width {
        display: flex !important;
        align-items: center !important;
        gap: 80px !important;
    }
    
    .imgtext-image-column {
        flex: 0 0 45% !important;
        max-width: 45% !important;
    }
    
    .imgtext-text-column {
        flex: 1 !important;
    }
}

.imgtext-image-column {
    grid-area: image !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    min-width: 0 !important;
}

.imgtext-sa-image {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    border-radius: 8px !important;
    object-fit: cover !important;
    display: block !important;
}

.imgtext-text-column {
    grid-area: text !important;
    min-width: 0 !important;
}

.imgtext-text-column h2 {
    margin-bottom: 16px !important;
    font-size: 28px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    color: #0c121a !important;
}

.imgtext-text-column p {
    font-size: 18px !important;
    line-height: 27px !important;
    color: #0C121A !important;
    margin-bottom: 16px !important;
}

.imgtext-text-column p:last-of-type {
    margin-bottom: 0 !important;
}

/* Button Container */
.imgtext-button-container {
    display: inline-block !important;
    margin-top: 24px !important;
}

/* Medium Primary Button */
.imgtext-medium-primary-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    padding: 12px 24px !important;
    border-radius: 40px !important;
    background-color: #0c121a !important;
    border: none !important;
    color: #ffffff !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    font-size: 16px !important;
    line-height: 1 !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
    opacity: 1 !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
}

.imgtext-medium-primary-button:hover {
    background-color: #1a252f !important;
    color: #ffffff !important;
    text-decoration: none !important;
    transform: translateY(-1px) !important;
}

.imgtext-medium-primary-button:focus {
    outline: 2px solid #ffffff !important;
    outline-offset: 2px !important;
    color: #ffffff !important;
}

.imgtext-medium-primary-button:active {
    transform: translateY(0) !important;
    color: #ffffff !important;
}

.imgtext-medium-primary-button:visited {
    color: #ffffff !important;
}

/* Button Text - Override HubSpot span styles */
.imgtext-medium-primary-button .imgtext-button-text {
    flex-shrink: 0 !important;
    color: #ffffff !important;
    margin: 0 !important;
    font-size: 16px !important;
    line-height: 1 !important;
}

/* Button Icon */
.imgtext-button-icon {
    width: 20px !important;
    height: 20px !important;
    object-fit: contain !important;
    flex-shrink: 0 !important;
    filter: brightness(0) invert(1) !important; /* Makes any icon white */
}

/* Tablet Styles */
@media (max-width: 1024px) {
    .imgtext-row-fluid-wrapper {
        padding: 40px 32px !important;
    }
    
    /* Tablet responsive padding overrides */
    .imgtext-row-fluid-wrapper.pt-96dt-64mob {
        padding-top: 96px !important; /* Same as desktop for this breakpoint */
    }
    
    .imgtext-row-fluid-wrapper.pb-96pb-64mob {
        padding-bottom: 96px !important; /* Same as desktop for this breakpoint */
    }
    
    .imgtext-content-max-width {
        gap: 32px !important;
        grid-template-columns: 5fr 6fr !important;
    }
    
    .imgtext-text-column h2 {
        font-size: 24px !important;
    }
}

/* Mobile Styles */
@media (max-width: 767px) {
    .imgtext-row-fluid-wrapper {
        padding: 32px 24px !important;
        width: 100vw !important;
        margin-left: calc(-50vw + 50%) !important;
        margin-right: calc(-50vw + 50%) !important;
    }
    
    /* Mobile responsive padding overrides - 64px as specified in class name */
    .imgtext-row-fluid-wrapper.pt-96dt-64mob {
        padding-top: 64px !important;
    }
    
    .imgtext-row-fluid-wrapper.pb-96pb-64mob {
        padding-bottom: 64px !important;
    }
    
    .imgtext-content-max-width {
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: none !important;
        grid-template-areas: none !important;
    }
    
    .imgtext-image-column {
        grid-area: unset !important;
        order: 1 !important;
        margin-bottom: 24px !important;
    }
    
    .imgtext-text-column {
        grid-area: unset !important;
        order: 2 !important;
    }
    
    /* Reverse order for mobile when enabled - puts image AFTER text */
    .imgtext-content-max-width.imgtext-reverse-mobile .imgtext-image-column {
        order: 2 !important;
        margin-bottom: 0 !important;
        margin-top: 24px !important;
    }
    
    .imgtext-content-max-width.imgtext-reverse-mobile .imgtext-text-column {
        order: 1 !important;
    }
    
    .imgtext-text-column h2 {
        font-size: 22px !important;
    }
    
    .imgtext-text-column p {
        font-size: 15px !important;
    }
    
    /* Mobile button adjustments */
    .imgtext-medium-primary-button {
        font-size: 14px !important;
        padding: 10px 20px !important;
    }
    
    .imgtext-button-icon {
        width: 18px !important;
        height: 18px !important;
    }
}

/* Small mobile adjustments */
@media (max-width: 480px) {
    .imgtext-row-fluid-wrapper {
        margin-left: calc(-50vw + 50%) !important;
        margin-right: calc(-50vw + 50%) !important;
        padding: 24px 20px !important;
    }
}