.personalized-section {
    display: flex;
    justify-content: space-between;
    padding: 30px 40px;
    align-items: center;
    margin-bottom: -20px;
    /* New: Constrain width and center for a more vertical aspect ratio on larger screens */
    max-width: 1000px; /* Adjust this value to control verticality */
    margin: 0 auto;
}

.personalized-text {
    /* Removed: width: 50%; */
    flex: 1; /* New: Distribute space equally */
    padding-right: 40px;
    /* Removed: display: flex; flex-direction: column; as it's handled by JS min-height and inner window-frame */
}

.window-frame {
    background: white;
    padding: 30px; /* Reverted to original padding */
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%; /* Make it fill the height of its parent (.personalized-text) */
    box-sizing: border-box; /* Include padding in the height calculation */
    text-align: left; /* Ensure text is left-aligned */
    display: flex; /* Make it a flex container for its children */
    flex-direction: column; /* Stack children vertically */
    justify-content: space-between; /* Distribute space between children */
}

.window-frame:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.15);
}

.personalized-text h2 {
    font-size: 2rem;
    margin-bottom: 20px; /* Reverted to original margin */
}

.personalized-text h3 {
    margin-bottom: 10px; /* Added margin to create space between subtitle and paragraph */
}

.personalized-text p {
    line-height: 1.6;
    margin-top: 0; /* Ensure no extra top margin on the paragraph */
}

.personalized-image {
    /* Removed: width: 50%; */
    flex: 1; /* New: Distribute space equally */
}

.personalized-image img {
    width: 100%;
    height: auto;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .personalized-section {
        flex-direction: column; /* Stack text and image vertically on mobile */
        max-width: 100%; /* Allow full width on mobile */
        margin: 0; /* Remove auto margin */
        padding: 20px; /* Adjust padding for mobile */
    }

    .personalized-text {
        padding-right: 0; /* Remove right padding on mobile */
        margin-bottom: 20px; /* Add space between text and image on mobile */
        width: 100%; /* Take full width on mobile */
        min-height: auto !important; /* Override JS min-height on mobile */
    }

    .personalized-image {
        width: 100%; /* Take full width on mobile */
    }

    .window-frame {
        justify-content: flex-start; /* Align content to top on mobile */
        height: auto; /* Revert height on mobile */
    }
    .personalized-text h2 {
        font-size: 1.8rem; /* Adjusted font size for tablets */
    }
    .personalized-text h3 {
        font-size: 1rem; /* Adjusted font size for tablets */
    }
    .personalized-text p {
        font-size: 0.9rem; /* Adjusted font size for tablets */
    }
}

@media (max-width: 480px) {
    .personalized-text h2 {
        font-size: 1.5rem; /* Adjusted font size for mobile */
    }
    .personalized-text h3 {
        font-size: 0.9rem; /* Adjusted font size for mobile */
    }
    .personalized-text p {
        font-size: 0.85rem; /* Adjusted font size for mobile */
    }
}
