/**
 * CPS Side-by-Side / Content with Image Styles
 * Flexible two-column layout for content and images
 */

/* Remove Fusion Builder column margins */
.fusion_builder_column:has(.cps-side-by-side) {
    --awb-margin-bottom-large: 0px !important;
    --awb-margin-top-large: 0px !important;
    margin-bottom: 0 !important;
    margin-top: 0 !important;
}

.fusion-column-wrapper:has(.cps-side-by-side) {
    margin-bottom: 0 !important;
    margin-top: 0 !important;
    padding: 0 !important;
}

/* Main Container */
.cps-side-by-side {
    width: 100vw;
    margin: 0 !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    padding: 80px 0;
}

.cps-side-by-side-inner {
    max-width: var(--awb-content-max-width, 1280px);
    margin: 0 auto;
    padding: 0 var(--awb-content-padding-left, 30px) 0 var(--awb-content-padding-right, 30px);
}

/* Centered Header (above both columns) */
.cps-side-by-side.heading-centered .cps-side-by-side-header.centered {
    text-align: center;
    margin-bottom: 48px;
    width: 100%;
}

/* Inline Header (with content) */
.cps-side-by-side.heading-inline .cps-side-by-side-header {
    margin-bottom: 24px;
}

/* Header Typography */
.cps-side-by-side-heading {
    font-family: refrigerator-deluxe, Impact, Charcoal, sans-serif !important;
    font-size: var(--heading-size, 48px) !important;
    font-weight: 900 !important;
    line-height: 1.1 !important;
    text-transform: uppercase !important;
    letter-spacing: -0.02em !important;
    margin: 0 0 12px 0 !important;
    color: var(--heading-color, inherit) !important;
}

.cps-side-by-side-subheading {
    font-family: refrigerator-deluxe, Impact, Charcoal, sans-serif !important;
    font-size: var(--subheading-size, 36px) !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    margin: 0 !important;
    color: var(--subheading-color, inherit) !important;
}

/* Two-Column Grid */
.cps-side-by-side-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

/* Image Column */
.cps-side-by-side-image {
    width: 100%;
}

.cps-side-by-side-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    object-fit: cover;
    display: block;
}

/* Image Position: Right (default) */
.cps-side-by-side.image-right .cps-side-by-side-content {
    order: 1;
}

.cps-side-by-side.image-right .cps-side-by-side-image {
    order: 2;
}

/* Image Position: Left */
.cps-side-by-side.image-left .cps-side-by-side-content {
    order: 2;
}

.cps-side-by-side.image-left .cps-side-by-side-image {
    order: 1;
}

/* Content Column */
.cps-side-by-side-content {
    width: 100%;
}

/* WYSIWYG Body Content Styling */
.cps-side-by-side-body {
    font-family: DIN, sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
    margin-bottom: 24px;
}

.cps-side-by-side-body h3 {
    font-family: refrigerator-deluxe, Impact, Charcoal, sans-serif;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 12px 0;
    text-transform: uppercase;
}

.cps-side-by-side-body h4 {
    font-family: refrigerator-deluxe, Impact, Charcoal, sans-serif;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 10px 0;
}

.cps-side-by-side-body h5,
.cps-side-by-side-body h6 {
    font-family: refrigerator-deluxe, Impact, Charcoal, sans-serif;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 10px 0;
}

.cps-side-by-side-body p {
    margin: 0 0 16px 0;
    line-height: 1.6;
}

.cps-side-by-side-body p:last-child {
    margin-bottom: 0;
}

.cps-side-by-side-body ul,
.cps-side-by-side-body ol {
    margin: 16px 0;
    padding-left: 20px;
}

.cps-side-by-side-body ul {
    list-style-type: disc;
}

.cps-side-by-side-body ol {
    list-style-type: decimal;
}

.cps-side-by-side-body li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.cps-side-by-side-body li:last-child {
    margin-bottom: 0;
}

.cps-side-by-side-body strong {
    font-weight: 700;
}

.cps-side-by-side-body em {
    font-style: italic;
}

/* Blockquote Styling (Mission/Vision sections) */
.cps-side-by-side-body blockquote {
    border-left: 4px solid #D41F38;
    padding-left: 20px;
    margin: 24px 0;
    font-style: normal !important;
    background: none !important;
    background-color: transparent !important;
    font-weight: 400;
    padding-top: 0;
    padding-bottom: 0;
    padding-right: 0;
}

/* Enhanced blockquote styling when option enabled */
.cps-side-by-side-content.blockquote-style blockquote {
    border-left: 4px solid #D41F38;
    padding-left: 20px;
    margin: 24px 0;
    font-style: normal !important;
    background: none !important;
    background-color: transparent !important;
}

/* Feature Boxes / Icon Boxes */
.cps-side-by-side-features {
    display: grid;
    gap: 24px;
    margin: 24px 0;
}

.cps-side-by-side-feature {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.cps-side-by-side-feature-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: #D41F38;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.cps-side-by-side-feature:hover .cps-side-by-side-feature-icon {
    background: #7F182C;
    transform: scale(1.05);
}

.cps-side-by-side-feature-icon i {
    font-size: 24px;
    color: #ffffff;
}

.cps-side-by-side-feature-content {
    flex: 1;
}

.cps-side-by-side-feature-content h4 {
    font-family: refrigerator-deluxe, Impact, Charcoal, sans-serif !important;
    font-size: 20px !important;
    font-weight: 400 !important;
    line-height: 1.2 !important;
    margin: 0 0 8px 0 !important;
    color: var(--feature-title-color, inherit) !important;
}

.cps-side-by-side-feature-content p {
    font-family: DIN, sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
    margin: 0;
    opacity: 0.9;
    color: var(--feature-desc-color, inherit);
}

/* CTA Buttons */
.cps-side-by-side-buttons {
    display: flex;
    gap: 16px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.cps-side-by-side-buttons.button-align-left {
    justify-content: flex-start;
}

.cps-side-by-side-buttons.button-align-center {
    justify-content: center;
}

.cps-side-by-side-buttons.button-align-right {
    justify-content: flex-end;
}

.cps-side-by-side-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    font-family: DIN, sans-serif;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    cursor: pointer;
}

/* Primary Button */
.cps-side-by-side-button-primary {
    background-color: var(--primary-btn-bg, #D41F38);
    color: var(--primary-btn-text, #ffffff);
    border: 2px solid var(--primary-btn-bg, #D41F38);
}

.cps-side-by-side-button-primary:hover {
    background-color: var(--primary-btn-hover, #7F182C);
    border-color: var(--primary-btn-hover, #7F182C);
    color: var(--primary-btn-text, #ffffff);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 31, 56, 0.3);
}

/* Secondary Button (Outline) */
.cps-side-by-side-button-secondary {
    background-color: transparent;
    color: var(--secondary-btn-text, #D41F38);
    border: 2px solid var(--secondary-btn-border, #D41F38);
}

.cps-side-by-side-button-secondary:hover {
    background-color: var(--secondary-btn-border, #D41F38);
    color: #ffffff;
    transform: translateY(-2px);
}

/* Responsive: Tablet */
@media (max-width: 1024px) {
    .cps-side-by-side {
        padding: 60px 0;
    }

    .cps-side-by-side-grid {
        gap: 40px;
    }

    .cps-side-by-side-heading {
        font-size: 40px !important;
    }

    .cps-side-by-side-subheading {
        font-size: 30px !important;
    }
}

/* Responsive: Mobile */
@media (max-width: 768px) {
    .cps-side-by-side {
        padding: 40px 0;
    }

    .cps-side-by-side-inner {
        padding: 0 var(--awb-content-padding-left, 20px) 0 var(--awb-content-padding-right, 20px);
    }

    .cps-side-by-side-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    /* Always show image first on mobile, then content */
    .cps-side-by-side.image-right .cps-side-by-side-content,
    .cps-side-by-side.image-left .cps-side-by-side-content {
        order: 2;
    }

    .cps-side-by-side.image-right .cps-side-by-side-image,
    .cps-side-by-side.image-left .cps-side-by-side-image {
        order: 1;
    }

    .cps-side-by-side-heading {
        font-size: 36px !important;
    }

    .cps-side-by-side-subheading {
        font-size: 24px !important;
    }

    .cps-side-by-side-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .cps-side-by-side-buttons.button-align-left,
    .cps-side-by-side-buttons.button-align-center,
    .cps-side-by-side-buttons.button-align-right {
        align-items: stretch;
    }

    .cps-side-by-side-button {
        width: 100%;
        text-align: center;
    }
}
