/* Minimalist CTA Buttons Styles - Final Version 4 (Robust Wrap Fix) */

.mcta-container {
    margin: 20px 0 30px 0;
    padding-bottom: 25px;
    border-bottom: 1px solid #eee;
}

/* --- สไตล์สำหรับ Headline (จุดแก้ไขสำคัญ) --- */
.mcta-headline {
    /* เราได้เอา display: flex และคุณสมบัติอื่นๆ ที่เกี่ยวข้องออกไป */
    /* เพื่อให้ headline เป็น block ปกติ ซึ่งจะตัดคำได้ 100% */
    margin-bottom: 5px;
    font-size: 1.1em;
    padding: 0; /* เพิ่ม padding: 0 เพื่อความแน่นอน */
}

.mcta-headline-text {
    padding: 0;
    color: #D32F2F !important;
    font-weight: bold !important;
    /* คุณสมบัติเหล่านี้จะทำงานได้ดีขึ้นเมื่อ headline เป็น block ปกติ */
    white-space: normal;
    word-break: break-word;
}

/* บังคับให้ลิงก์เบอร์โทรใน Headline เป็นสีแดงและตัวหนาด้วย */
.mcta-headline-text a.mcta-tel-link {
    color: inherit !important;
    font-weight: inherit !important;
    text-decoration: underline;
    text-decoration-color: #ff8a80;
}
.mcta-headline-text a.mcta-tel-link:hover {
    text-decoration-color: #D32F2F;
}

/* --- สไตล์สำหรับ Sub-headline --- */
.mcta-subheadline {
    font-size: 0.9em;
    color: #555;
    margin-top: 0;
    margin-bottom: 20px;
    padding: 0;
    text-align: left;
    /* เพิ่ม word-break เพื่อความปลอดภัย */
    word-break: break-word;
}

/* ------------------------------------- */

.mcta-buttons-wrapper {
    display: flex;
    flex-wrap: wrap; 
    justify-content: flex-start !important;
    gap: 15px; 
}

.mcta-button {
    flex-grow: 0; 
    flex-basis: auto;
    display: inline-block;
    background-color: #000000; 
    color: #ffffff !important;   
    font-weight: bold;         
    text-decoration: none;     
    padding: 12px 28px;        
    border-radius: 5px;        
    text-align: center;
    transition: background-color 0.3s, transform 0.2s;
}

.mcta-button:hover {
    background-color: #333333;
    color: #ffffff !important;
    transform: translateY(-2px);
}

/* สำหรับจอเล็ก (มือถือ) */
@media (max-width: 600px) {
    .mcta-buttons-wrapper {
        flex-direction: column; 
        align-items: stretch;
    }
    .mcta-button {
        width: 100%; 
    }
}