/* =========================================================
   THE GIOI AD - PREMIUM ARTICLE DETAIL
========================================================= */

.tgiad-article {
    box-sizing: border-box;
    width: 100%;
    max-width: 1080px;
    margin: 40px auto 70px;
    padding: 46px 56px;
    color: #303641;
    background:
        radial-gradient(
            circle at top right,
            rgba(0, 160, 226, 0.05),
            transparent 320px
        ),
        #ffffff;
    border: 1px solid #e8ebef;
    border-radius: 22px;
    box-shadow:
        0 22px 60px rgba(19, 34, 53, 0.09),
        0 4px 14px rgba(19, 34, 53, 0.04);
}

.tgiad-article,
.tgiad-article * {
    box-sizing: border-box;
}

.tgiad-article-header {
    position: relative;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e9edf1;
}

.tgiad-article-header::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 86px;
    height: 3px;
    background: linear-gradient(90deg, #ed1c24, #f7c600);
    border-radius: 10px;
}

.tgiad-article .tgiad-article-title,
.tgiad-article h1.modheading {
    margin: 0;
    color: #17202b;
    font-size: clamp(31px, 4vw, 46px);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.025em;
    text-transform: none;
}

.tgiad-article .info {
    margin: 0 0 14px;
    color: #7a838d;
    font-size: 14px;
    line-height: 1.7;
}

.tgiad-article .icons {
    margin-bottom: 15px;
}

.tgiad-article .introtext {
    margin: 22px 0 28px;
    padding: 20px 22px;
    color: #3d4650;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.75;
    background: #f7f9fb;
    border-left: 4px solid #ed1c24;
    border-radius: 0 12px 12px 0;
}

/* =========================================================
   TABLE OF CONTENTS
========================================================= */

.tgiad-toc {
    margin: 28px 0 38px;
    padding: 0;
    overflow: hidden;
    background: #f8fafc;
    border: 1px solid #dde4ea;
    border-radius: 14px;
}

.tgiad-toc-title {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    color: #ffffff;
    font-size: 17px;
    background: linear-gradient(135deg, #1d2732, #303d49);
}

.tgiad-toc-icon {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    color: #ffffff;
    font-size: 15px;
    background: #ed1c24;
    border-radius: 7px;
}

.tgiad-toc > ul {
    margin: 0;
    padding: 16px 20px 18px;
    list-style: none;
}

.tgiad-toc ul {
    list-style: none;
}

.tgiad-toc li {
    margin: 0;
    padding: 0;
    border-bottom: 1px dashed #dde3e8;
}

.tgiad-toc li:last-child {
    border-bottom: 0;
}

.tgiad-toc li ul {
    margin: 0;
    padding-left: 12px;
}

.tgiad-toc a {
    display: block;
    padding: 9px 8px;
    color: #34404c;
    font-size: 15px;
    line-height: 1.5;
    text-decoration: none;
    transition:
        color 0.2s ease,
        background 0.2s ease,
        padding-left 0.2s ease;
}

.tgiad-toc a:hover {
    padding-left: 14px;
    color: #d71920;
    background: rgba(237, 28, 36, 0.05);
}

/* =========================================================
   ARTICLE TYPOGRAPHY
========================================================= */

.tgiad-article .article-content {
    color: #353d46;
    font-size: 18px;
    line-height: 1.82;
    overflow-wrap: anywhere;
}

.tgiad-article .article-content p {
    margin: 0 0 20px;
}

.tgiad-article .article-content h2 {
    position: relative;
    margin: 48px 0 20px;
    padding: 15px 20px 15px 24px;
    color: #19222c;
    font-size: clamp(25px, 3vw, 32px);
    font-weight: 800;
    line-height: 1.32;
    letter-spacing: -0.015em;
    background: linear-gradient(
        90deg,
        rgba(237, 28, 36, 0.09),
        rgba(247, 198, 0, 0.04),
        transparent
    );
    border-radius: 11px;
    scroll-margin-top: 125px;
}

.tgiad-article .article-content h2::before {
    content: "";
    position: absolute;
    top: 13px;
    bottom: 13px;
    left: 0;
    width: 5px;
    background: linear-gradient(180deg, #ed1c24, #f7c600);
    border-radius: 10px;
}

.tgiad-article .article-content h3 {
    margin: 34px 0 14px;
    color: #202934;
    font-size: clamp(21px, 2.4vw, 25px);
    font-weight: 750;
    line-height: 1.42;
    scroll-margin-top: 125px;
}

.tgiad-article .article-content h3::before {
    content: "";
    display: inline-block;
    width: 9px;
    height: 9px;
    margin-right: 10px;
    vertical-align: 2px;
    background: #ed1c24;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(237, 28, 36, 0.09);
}

.tgiad-article .article-content h4 {
    margin: 27px 0 12px;
    color: #29323d;
    font-size: 20px;
    font-weight: 750;
    line-height: 1.45;
    scroll-margin-top: 125px;
}

.tgiad-article .article-content strong,
.tgiad-article .article-content b {
    color: #202731;
    font-weight: 750;
}

/* =========================================================
   LISTS
========================================================= */

.tgiad-article .article-content ul,
.tgiad-article .article-content ol {
    margin: 16px 0 24px;
    padding-left: 0;
    list-style: none;
}

.tgiad-article .article-content li {
    position: relative;
    margin: 10px 0;
    padding-left: 31px;
}

.tgiad-article .article-content ul > li::before {
    content: "✓";
    position: absolute;
    top: 4px;
    left: 0;
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    background: #ed1c24;
    border-radius: 50%;
}

.tgiad-article .article-content ol {
    counter-reset: article-counter;
}

.tgiad-article .article-content ol > li {
    counter-increment: article-counter;
    padding-left: 43px;
}

.tgiad-article .article-content ol > li::before {
    content: counter(article-counter);
    position: absolute;
    top: 0;
    left: 0;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
    background: linear-gradient(135deg, #ed1c24, #f39400);
    border-radius: 8px;
}

.tgiad-article .article-content li ul,
.tgiad-article .article-content li ol {
    margin: 9px 0 5px;
}

/* =========================================================
   IMAGES AND CAPTIONS
========================================================= */

.tgiad-article .article-content img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 30px auto;
    border-radius: 15px;
    box-shadow: 0 16px 38px rgba(16, 31, 49, 0.15);
}

.tgiad-article .article-content figure {
    margin: 30px 0;
}

.tgiad-article .article-content figure img {
    margin-bottom: 0;
}

.tgiad-article .article-content figcaption {
    margin-top: 11px;
    padding: 0 15px;
    color: #747e89;
    font-size: 14px;
    line-height: 1.55;
    text-align: center;
}

/* =========================================================
   LINKS
========================================================= */

.tgiad-article .article-content a {
    color: #0878d1 !important;
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1px solid rgba(8, 120, 209, 0.32);
    transition:
        color 0.2s ease,
        border-color 0.2s ease,
        background-color 0.2s ease;
}

.tgiad-article .article-content a:hover,
.tgiad-article .article-content a:focus {
    color: #005da8 !important;
    border-color: currentColor;
    background-color: rgba(8, 120, 209, 0.06);
}
/* Buộc chữ bên trong link kế thừa màu xanh */
.tgiad-article .article-content a,
.tgiad-article .article-content a:visited,
.tgiad-article .article-content a strong,
.tgiad-article .article-content a b,
.tgiad-article .article-content strong a,
.tgiad-article .article-content b a {
    color: #0878d1 !important;
}

.tgiad-article .article-content a:hover,
.tgiad-article .article-content a:focus,
.tgiad-article .article-content a:hover strong,
.tgiad-article .article-content a:hover b,
.tgiad-article .article-content a:focus strong,
.tgiad-article .article-content a:focus b {
    color: #005da8 !important;
}
/* =========================================================
   TABLES
========================================================= */

.tgiad-article .article-content table {
    width: 100%;
    margin: 28px 0;
    border-spacing: 0;
    border-collapse: separate;
    overflow: hidden;
    font-size: 16px;
    line-height: 1.55;
    border: 1px solid #e2e7eb;
    border-radius: 13px;
    box-shadow: 0 8px 26px rgba(25, 39, 55, 0.06);
}

.tgiad-article .article-content th {
    padding: 15px 17px;
    color: #ffffff;
    font-weight: 700;
    text-align: left;
    background: linear-gradient(135deg, #222c36, #35424f);
}

.tgiad-article .article-content td {
    padding: 14px 17px;
    vertical-align: top;
    border-top: 1px solid #e8ecef;
}

.tgiad-article .article-content tbody tr:nth-child(even) {
    background: #f8fafb;
}

/* =========================================================
   BLOCKQUOTES AND CALLOUTS
========================================================= */

.tgiad-article .article-content blockquote {
    position: relative;
    margin: 28px 0;
    padding: 23px 25px 23px 31px;
    color: #333c46;
    background: linear-gradient(135deg, #fff9ef, #fffdf8);
    border: 1px solid #f3dfbc;
    border-left: 5px solid #f39a00;
    border-radius: 13px;
}

.tgiad-article .article-content blockquote::before {
    content: "“";
    position: absolute;
    top: 3px;
    left: 10px;
    color: rgba(237, 28, 36, 0.15);
    font-family: Georgia, serif;
    font-size: 62px;
    line-height: 1;
}

.tgiad-note,
.tgiad-tip,
.tgiad-warning {
    margin: 26px 0;
    padding: 20px 22px;
    border-radius: 12px;
}

.tgiad-note {
    background: #f1f7ff;
    border: 1px solid #d7e7fb;
}

.tgiad-tip {
    background: #f3faf4;
    border: 1px solid #d7ebda;
}

.tgiad-warning {
    background: #fff7ed;
    border: 1px solid #f0dcc3;
}

/* =========================================================
   RELATED ARTICLES
========================================================= */

.tgiad-article #mixitup_list {
    margin-top: 0;
}

.tgiad-article #mixitup_list .img_holder {
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 10px 28px rgba(19, 34, 53, 0.1);
}

.tgiad-article #mixitup_list img {
    margin: 0;
    border-radius: 12px;
    box-shadow: none;
    transition: transform 0.35s ease;
}

.tgiad-article #mixitup_list .img_holder:hover img {
    transform: scale(1.04);
}

.tgiad-article #mixitup_list h5 {
    color: #252e38;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.45;
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 991px) {
    .tgiad-article {
        width: calc(100% - 30px);
        padding: 38px 34px;
    }
}

@media (max-width: 767px) {
    .tgiad-article {
        width: calc(100% - 18px);
        margin: 20px auto 46px;
        padding: 25px 17px;
        border-radius: 15px;
    }

    .tgiad-article .tgiad-article-title,
    .tgiad-article h1.modheading {
        font-size: 29px;
    }

    .tgiad-article .article-content {
        font-size: 17px;
        line-height: 1.75;
    }

    .tgiad-article .article-content h2 {
        margin-top: 38px;
        padding: 13px 14px 13px 19px;
        font-size: 24px;
    }

    .tgiad-article .article-content h3 {
        font-size: 21px;
    }

    .tgiad-toc > ul {
        padding: 13px 12px 15px;
    }

    .tgiad-toc li {
        margin-left: 0 !important;
    }

    .tgiad-article .article-content table {
        display: block;
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* =========================================================
   FLOATING GOOGLE MAP BUTTON - OPTIMIZED POSITION
========================================================= */

.tgiad-floating-map {
    position: fixed;
    z-index: 9997;

    /* Góc dưới, tách khỏi nhóm nút liên hệ */
    right: 88px;
    bottom: 24px;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 46px;
    height: 46px;

    color: #ffffff !important;
    font-size: 23px;
    line-height: 1;
    text-decoration: none !important;

    background: linear-gradient(135deg, #34a853, #17843b);
    border: 3px solid #ffffff;
    border-radius: 50%;

    box-shadow:
        0 6px 18px rgba(0, 0, 0, 0.24),
        0 0 0 1px rgba(0, 0, 0, 0.08);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.tgiad-floating-map:hover,
.tgiad-floating-map:focus {
    color: #ffffff !important;
    background: linear-gradient(135deg, #43bd68, #147735);
    transform: translateY(-3px) scale(1.06);

    box-shadow:
        0 10px 24px rgba(0, 0, 0, 0.28),
        0 0 0 5px rgba(52, 168, 83, 0.14);
}

.tgiad-floating-map i {
    display: block;
    color: #ffffff !important;
    font-size: inherit;
    line-height: 1;
}

/* Tablet */
@media (max-width: 991px) {
    .tgiad-floating-map {
        right: 78px;
        bottom: 20px;
        width: 44px;
        height: 44px;
        font-size: 22px;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .tgiad-floating-map {
        top: auto;
        right: 76px;
        bottom: 18px;

        width: 42px;
        height: 42px;
        font-size: 21px;

        border-width: 2px;

        box-shadow:
            0 5px 15px rgba(0, 0, 0, 0.22),
            0 0 0 1px rgba(0, 0, 0, 0.08);
    }
}

/* Điện thoại màn hình nhỏ */
@media (max-width: 420px) {
    .tgiad-floating-map {
        right: 72px;
        bottom: 16px;
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
}
