.ctv-noti-wrapper {
    overflow-x: hidden;
}

.ctv-noti-content {
    margin: 0 auto;
    padding: 0 40px;
    width: 100%;
    max-width: 800px;
}

.ctv-noti-content .western,
.ctv-noti-content p,
.ctv-noti-content li,
.ctv-noti-content span {
    line-height: 1.6;
}

.ctv-noti-heading {
    text-align: center !important;
    line-height: 120%;
    margin-bottom: 0.2in;
}

.ctv-noti-signature {
    width: 100%;
    max-width: 658px;
    margin-left: 115px;
}

.ctv-noti-signature img {
    max-width: 100%;
    height: auto;
}

.ctv-noti-announcement {
    white-space: nowrap;
    display: inline-block;
}

.ctv-noti-recipient-table {
    text-align: justify;
    margin-left: 130px;
}

.ctv-noti-legal-title {
    white-space: nowrap;
    display: inline-block;
}


.ctv-noti-cooperation-title {
    text-align: center !important;
    display: block;
    width: 100%;
}

.ctv-noti-cooperation-title span,
.ctv-noti-cooperation-title font,
.ctv-noti-cooperation-title b {
    text-align: center !important;
    display: block;
    width: 100%;
}

/* Dòng kẻ dưới tiêu đề "Về hình thức hợp tác..." */
.ctv-noti-cooperation-line {
    width: 90px;
    height: 1px;
    background-color: #000;
    margin: 0.1in auto 0.21in auto;
    display: block;
}

.ctv-qr-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.ctv-qr-wrapper img {
    max-width: 120px;
    height: auto;
}

.ctv-qr-hint {
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.ctv-noti-feedback .news-col {
    display: flex;
    flex-wrap: nowrap;
    gap: 16px;
    align-items: flex-start;
}

.ctv-qr-wrapper {
    flex: 0 0 auto;
}

.ctv-feedback-info {
    flex: 1 1 240px;
    min-width: 220px;
    margin-left: 20px;
}

@media (max-width: 1024px) {
    .ctv-noti-content {
        padding: 0 24px;
    }

    .ctv-noti-signature {
        margin-left: 0;
    }

    .ctv-noti-recipient-table {
        margin-left: 0;
    }

    .ctv-feedback-info {
        margin-left: 0;
    }
}


@media (min-width: 769px) and (max-width: 1024px) {
    .ctv-noti-content .ctv-noti-recipient-table {
        margin-left: 130px !important;
        width: auto !important;
    }
    
    .ctv-noti-content dl {
        margin-left: 0;
    }
}


@media (max-width: 992px) {
    .ctv-noti-feedback .news-col {
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .ctv-noti-content {
        padding: 0 16px;
    }

 
    .ctv-noti-heading {
        text-align: center !important;
        display: block !important;
    }

    .ctv-noti-heading font,
    .ctv-noti-heading span,
    .ctv-noti-heading .ctv-noti-announcement {
        text-align: center !important;
        display: block !important;
        width: 100% !important;
    }

   
    /* Căn giữa dòng "Về hình thức hợp tác..." trên mobile */
    .ctv-noti-content .ctv-noti-mobile p.western.ctv-noti-cooperation-title[align="center"] {
        text-align: center !important;
        margin-left: 0 !important;
        padding-left: 0 !important;
        margin-bottom: 0 !important;
    }

    .ctv-noti-content .ctv-noti-mobile p.western.ctv-noti-cooperation-title[align="center"]:first-of-type {
        margin-bottom: 0 !important;
    }

    .ctv-noti-content .ctv-noti-mobile p.western.ctv-noti-cooperation-title[align="center"]:last-of-type {
        margin-top: 0 !important;
        margin-left: 0 !important;
        padding-left: 0 !important;
    }

    .ctv-noti-content .ctv-noti-mobile p.western.ctv-noti-cooperation-title[align="center"] span,
    .ctv-noti-content .ctv-noti-mobile p.western.ctv-noti-cooperation-title[align="center"] font,
    .ctv-noti-content .ctv-noti-mobile p.western.ctv-noti-cooperation-title[align="center"] b {
        text-align: center !important;
        display: block !important;
        margin-left: 0 !important;
        padding-left: 0 !important;
        text-indent: 0 !important;
    }

    /* Các dòng khác vẫn giữ nguyên */
    .ctv-noti-content .ctv-noti-mobile p.western[align="center"]:not(.ctv-noti-cooperation-title) {
        text-align: left !important;
        margin-left: -30px !important;
        padding-left: 0 !important;
        margin-bottom: 0 !important;
    }

    .ctv-noti-content .ctv-noti-mobile p.western[align="center"]:not(.ctv-noti-cooperation-title) span,
    .ctv-noti-content .ctv-noti-mobile p.western[align="center"]:not(.ctv-noti-cooperation-title) font,
    .ctv-noti-content .ctv-noti-mobile p.western[align="center"]:not(.ctv-noti-cooperation-title) b {
        text-align: left !important;
        display: block !important;
        margin-left: 0 !important;
        padding-left: 0 !important;
        text-indent: 0 !important;
    }

    .ctv-noti-recipient-table {
        margin-left: 0px !important;
    }

    /* "Kính gửi" và "Ông/bà" cùng dòng trên mobile */
    .ctv-noti-recipient-table,
    .ctv-noti-recipient-table tbody,
    .ctv-noti-recipient-table tr {
        display: flex !important;
        flex-direction: row !important;
        width: 100% !important;
    }

    .ctv-noti-recipient-table td {
        display: flex !important;
        flex-direction: column !important;
        width: auto !important;
        padding: 0 10px !important;
    }

    .ctv-noti-recipient-table td:first-child {
        flex: 0 0 auto !important;
        white-space: nowrap !important;
    }

    .ctv-noti-recipient-table td:last-child {
        flex: 1 1 auto !important;
    }

    .ctv-noti-recipient-table ul {
        margin: 0 !important;
        padding-left: 0 !important;
        list-style: none !important;
    }

    .ctv-noti-recipient-table li {
        display: inline !important;
        margin-right: 10px !important;
    }

    /* Căn phải bảng "ĐẠI DIỆN THEO PHÁP LUẬT" trên mobile */
    .ctv-noti-content center {
        text-align: right !important;
        display: block !important;
        width: 100% !important;
    }

    .ctv-noti-signature {
        margin-left: auto !important;
        margin-right: 0 !important;
        width: auto !important;
        max-width: 100% !important;
        float: right !important;
        clear: both !important;
    }

    .ctv-noti-signature[width="900"] {
        width: auto !important;
        max-width: 100% !important;
    }

    .ctv-noti-signature,
    .ctv-noti-signature tbody,
    .ctv-noti-signature tr,
    .ctv-noti-signature td {
        display: block;
        width: 100%;
        text-align: center !important;
    }

    .ctv-noti-signature td {
        padding: 10px 0;
    }

    /* Căn giữa text "ĐẠI DIỆN THEO PHÁP LUẬT" và "NGUYỄN DUY HÙNG" trên mobile */
    .ctv-noti-signature p.western[align="center"],
    .ctv-noti-signature .ctv-noti-legal-title,
    .ctv-noti-signature p.western[align="center"] span,
    .ctv-noti-signature p.western[align="center"] font,
    .ctv-noti-signature p.western[align="center"] b {
        text-align: center !important;
    }

    .ctv-qr-wrapper {
        flex-direction: column;
        align-items: center;
    }

    .ctv-qr-hint {
        white-space: normal;
        text-align: center;
    }

    .ctv-noti-feedback .news-col {
        flex-direction: column;
        align-items: center;
    }

    .ctv-feedback-info {
        text-align: center;
    }

 
    .ctv-noti-desktop {
        display: none !important;
    }

    .ctv-noti-mobile {
        display: block !important;
    }

    .ctv-noti-mobile p[style*="text-indent"] {
        text-indent: 0 !important;
        margin-bottom: 0 !important;
        line-height: 1.4 !important;
    }

    .ctv-noti-keep-together {
        white-space: nowrap !important;
    }

    
    .ctv-noti-content p.western,
    .ctv-noti-content .western,
    .ctv-noti-content span,
    .ctv-noti-content font {
        word-break: normal !important;
        overflow-wrap: normal !important;
        word-wrap: normal !important;
        hyphens: none !important;
        text-align: justify !important;
        text-justify: inter-word !important;
    }

    .ctv-noti-content p.western[align="justify"] {
        text-align: justify !important;
        word-spacing: normal !important;
        letter-spacing: normal !important;
        word-break: normal !important;
    }

    .ctv-noti-content span[style*="font-family"],
    .ctv-noti-content font {
        word-break: normal !important;
        overflow-wrap: normal !important;
        white-space: normal !important;
    }

    .ctv-noti-content {
        text-rendering: optimizeLegibility;
        -webkit-font-smoothing: antialiased;
    }
}


@media (min-width: 290px) and (max-width: 428px) {
    .ctv-noti-content {
        padding: 0 calc(8px + (16 - 8) * ((100vw - 360px) / (428 - 360))) !important;
    }

    .ctv-noti-mobile .western,
    .ctv-noti-mobile p.western,
    .ctv-noti-mobile span,
    .ctv-noti-mobile font {
        font-size: clamp(11pt, calc(11pt + (13 - 11) * ((100vw - 360px) / (428 - 360))), 13pt) !important;
    }

    .ctv-noti-mobile font[style*="font-size: 13pt"],
    .ctv-noti-mobile font[style*="font-size:13pt"] {
        font-size: clamp(11pt, calc(11pt + (13 - 11) * ((100vw - 360px) / (428 - 360))), 13pt) !important;
    }

    /* Line height co dãn */
    .ctv-noti-mobile p.western[align="justify"] {
        line-height: clamp(1.3, calc(1.3 + (1.4 - 1.3) * ((100vw - 360px) / (428 - 360))), 1.4) !important;
    }

    .ctv-noti-mobile p.western[align="center"] {
        line-height: clamp(1.4, calc(1.4 + (1.5 - 1.4) * ((100vw - 360px) / (428 - 360))), 1.5) !important;
    }

    /* Margin và padding co dãn */
    .ctv-noti-mobile p.western[align="justify"][style*="text-indent"] {
        text-indent: clamp(0.2in, calc(0.2in + (0.39in - 0.2in) * ((100vw - 360px) / (428 - 360))), 0.39in) !important;
    }

    .ctv-noti-mobile p.western[align="center"] {
        margin-bottom: clamp(0.15in, calc(0.15in + (0.21in - 0.15in) * ((100vw - 360px) / (428 - 360))), 0.21in) !important;
    }

    /* Heading font size co dãn */
    .ctv-noti-heading font[style*="font-size: 20pt"],
    .ctv-noti-heading font[style*="font-size:20pt"] {
        font-size: clamp(16pt, calc(16pt + (20 - 16) * ((100vw - 360px) / (428 - 360))), 20pt) !important;
    }

    /* Table và các phần tử khác */
    .ctv-noti-recipient-table font[style*="font-size: 13pt"],
    .ctv-noti-recipient-table font[style*="font-size:13pt"] {
        font-size: clamp(11pt, calc(11pt + (13 - 11) * ((100vw - 360px) / (428 - 360))), 13pt) !important;
    }

    .ctv-noti-signature font[style*="font-size: 13pt"],
    .ctv-noti-signature font[style*="font-size:13pt"] {
        font-size: clamp(11pt, calc(11pt + (13 - 11) * ((100vw - 360px) / (428 - 360))), 13pt) !important;
    }

    /* QR và feedback section */
    .ctv-qr-wrapper img {
        max-width: clamp(100px, calc(100px + (120 - 100) * ((100vw - 360px) / (428 - 360))), 120px) !important;
    }

    .ctv-feedback-info {
        font-size: clamp(0.85rem, calc(0.85rem + (1 - 0.85) * ((100vw - 360px) / (428 - 360))), 1rem) !important;
    }
}

/* Tablet/Desktop responsive: 500px - 800px - Text co dãn theo chiều rộng */
@media (min-width: 500px) and (max-width: 800px) {
    .ctv-noti-content {
        padding: 0 calc(16px + (40 - 16) * ((100vw - 500px) / (800 - 500))) !important;
        max-width: calc(100% - (16px + (40 - 16) * ((100vw - 500px) / (800 - 500))) * 2) !important;
    }

    /* Font size co dãn từ 12pt (500px) đến 13pt (800px) */
    .ctv-noti-content .western,
    .ctv-noti-content p.western,
    .ctv-noti-content span,
    .ctv-noti-content font {
        font-size: clamp(12pt, calc(12pt + (13 - 12) * ((100vw - 500px) / (800 - 500))), 13pt) !important;
    }

    .ctv-noti-content font[style*="font-size: 13pt"],
    .ctv-noti-content font[style*="font-size:13pt"] {
        font-size: clamp(12pt, calc(12pt + (13 - 12) * ((100vw - 500px) / (800 - 500))), 13pt) !important;
    }

    /* Line height co dãn */
    .ctv-noti-content p.western[align="justify"] {
        line-height: clamp(1.35, calc(1.35 + (1.4 - 1.35) * ((100vw - 500px) / (800 - 500))), 1.4) !important;
    }

    .ctv-noti-content p.western[align="center"] {
        line-height: clamp(1.45, calc(1.45 + (1.5 - 1.45) * ((100vw - 500px) / (800 - 500))), 1.5) !important;
    }

    /* Margin và padding co dãn */
    .ctv-noti-content p.western[align="justify"][style*="text-indent"] {
        text-indent: clamp(0.3in, calc(0.3in + (0.39in - 0.3in) * ((100vw - 500px) / (800 - 500))), 0.39in) !important;
    }

    .ctv-noti-content p.western[align="center"] {
        margin-bottom: clamp(0.18in, calc(0.18in + (0.21in - 0.18in) * ((100vw - 500px) / (800 - 500))), 0.21in) !important;
    }

    /* Heading font size co dãn */
    .ctv-noti-heading font[style*="font-size: 20pt"],
    .ctv-noti-heading font[style*="font-size:20pt"] {
        font-size: clamp(18pt, calc(18pt + (20 - 18) * ((100vw - 500px) / (800 - 500))), 20pt) !important;
    }

    /* Table và các phần tử khác */
    .ctv-noti-recipient-table {
        margin-left: clamp(0px, calc(0px + (130 - 0) * ((100vw - 500px) / (800 - 500))), 130px) !important;
    }

    .ctv-noti-recipient-table font[style*="font-size: 13pt"],
    .ctv-noti-recipient-table font[style*="font-size:13pt"] {
        font-size: clamp(12pt, calc(12pt + (13 - 12) * ((100vw - 500px) / (800 - 500))), 13pt) !important;
    }

    .ctv-noti-signature {
        margin-left: clamp(0px, calc(0px + (115 - 0) * ((100vw - 500px) / (800 - 500))), 115px) !important;
        max-width: clamp(90%, calc(90% + (658px - 90%) * ((100vw - 500px) / (800 - 500))), 658px) !important;
    }

    .ctv-noti-signature font[style*="font-size: 13pt"],
    .ctv-noti-signature font[style*="font-size:13pt"] {
        font-size: clamp(12pt, calc(12pt + (13 - 12) * ((100vw - 500px) / (800 - 500))), 13pt) !important;
    }

    /* QR và feedback section */
    .ctv-qr-wrapper img {
        max-width: clamp(100px, calc(100px + (120 - 100) * ((100vw - 500px) / (800 - 500))), 120px) !important;
    }

    .ctv-feedback-info {
        font-size: clamp(0.9rem, calc(0.9rem + (1 - 0.9) * ((100vw - 500px) / (800 - 500))), 1rem) !important;
        margin-left: clamp(10px, calc(10px + (20 - 10) * ((100vw - 500px) / (800 - 500))), 20px) !important;
    }

    /* Desktop content */
    .ctv-noti-desktop p.western[align="justify"] {
        font-size: clamp(12pt, calc(12pt + (13 - 12) * ((100vw - 500px) / (800 - 500))), 13pt) !important;
        line-height: clamp(1.35, calc(1.35 + (1.4 - 1.35) * ((100vw - 500px) / (800 - 500))), 1.4) !important;
    }

    /* Mobile content (nếu hiển thị trong khoảng này) */
    .ctv-noti-mobile p.western[align="justify"] {
        font-size: clamp(12pt, calc(12pt + (13 - 12) * ((100vw - 500px) / (800 - 500))), 13pt) !important;
        line-height: clamp(1.35, calc(1.35 + (1.4 - 1.35) * ((100vw - 500px) / (800 - 500))), 1.4) !important;
    }
}

@media (min-width: 769px) {
    .ctv-noti-desktop {
        display: block !important;
    }

    .ctv-noti-mobile {
        display: none !important;
    }
    .ctv-noti-signature {
        margin-left: 60px;
    }

}
