/* ==========================================================================
   Service Category & Detail Page Styles
   ========================================================================== */

:root {
    --service-primary: #d01c24;
    --service-primary-hover: #b91c1c;
    --service-primary-light: #fef2f2;
    --service-dark: #111827;
    --service-text: #374151;
    --service-text-muted: #6b7280;
    --service-border: #e5e7eb;
    --service-bg-card: #ffffff;
}

/* Page Layout */
.service-page {
    padding: 24px 0 60px;
    background-color: #fafbfc;
}

/* --------------------------------------------------------------------------
   1. Left Sidebar
   -------------------------------------------------------------------------- */
.sidebar-wrap {
    position: relative;
}

.service-sidebar-wrapper {
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: sticky;
    top: 90px;
}

/* Card 1: Dịch vụ của chúng tôi */
.service-sidebar-card--menu {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px 20px 22px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid #f1f3f5;
}

.service-sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    padding-bottom: 2px;
}

.service-sidebar-header__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.service-sidebar-header__title {
    font-size: 18px;
    font-weight: 700;
    color: #18181b;
    margin: 0;
    line-height: 1.3;
}

.service-sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.service-sidebar-item {
    list-style: none;
    margin: 0;
    padding: 0;
}

.service-sidebar-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 18px;
    background-color: #f8f9fa;
    color: #27272a;
    border-radius: 10px;
    text-decoration: none;
    font-size: 14.5px;
    font-weight: 600;
    transition: all 0.25s ease;
    border: 1px solid transparent;
}

.service-sidebar-link:hover {
    background-color: #f1f2f4;
    color: #e31b23;
    transform: translateX(3px);
}

.service-sidebar-link__text {
    flex: 1;
    line-height: 1.35;
    padding-right: 10px;
}

.service-sidebar-link__arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    flex-shrink: 0;
    transition: all 0.25s ease;
}

.service-sidebar-link:hover .service-sidebar-link__arrow {
    color: #e31b23;
    transform: translateX(2px);
}

/* Active State */
.service-sidebar-link.is-active {
    background: #e31b23;
    color: #ffffff !important;
    box-shadow: 0 6px 18px rgba(227, 27, 35, 0.35);
}

.service-sidebar-link.is-active .service-sidebar-link__arrow {
    color: #ffffff;
}

.service-sidebar-link.is-active:hover {
    background: #cc151c;
    color: #ffffff !important;
    transform: none;
}

/* Card 2: Contact / Consultation Box */
.service-sidebar-card--contact {
    background: #111622;
    border-radius: 16px;
    padding: 26px 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

.service-sidebar-card--contact::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, rgba(227, 27, 35, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

.service-consult-badge {
    display: inline-block;
    background: rgba(227, 27, 35, 0.16);
    color: #ff4d4f;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 12px;
}

.service-consult-title {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.service-consult-desc {
    font-size: 13.5px;
    color: #94a3b8;
    line-height: 1.55;
    margin: 0 0 20px 0;
}

.service-btn-phone {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #e31b23;
    color: #ffffff !important;
    font-size: 16px;
    font-weight: 700;
    padding: 13px 18px;
    border-radius: 10px;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(227, 27, 35, 0.35);
    margin-bottom: 12px;
    transition: all 0.25s ease;
}

.service-btn-phone:hover {
    background: #cc151c;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(227, 27, 35, 0.45);
}

.service-btn-phone__icon {
    display: inline-flex;
    align-items: center;
}

.service-btn-quote {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #ffffff !important;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 13px 18px;
    border-radius: 10px;
    text-decoration: none;
    margin-bottom: 22px;
    transition: all 0.25s ease;
}

.service-btn-quote:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.35);
    color: #ffffff !important;
}

.service-btn-quote__icon {
    display: inline-flex;
    align-items: center;
}

.service-consult-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin-bottom: 18px;
}

.service-consult-features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.service-consult-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #cbd5e1;
    line-height: 1.4;
    list-style: none;
}

.service-consult-feature__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Sidebar Hot Widget (.side-bar2) */
.sidebar-left .side-bar2 {
    margin-bottom: 24px;
}

.sidebar-left .title_head2 {
    background: var(--service-dark);
    padding: 12px 16px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    border-left: 4px solid var(--service-primary);
}

.sidebar-left .news-content {
    padding: 8px 14px;
}

.sidebar-left .news-item {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px dashed var(--service-border);
    align-items: center;
}

.sidebar-left .news-item:last-child {
    border-bottom: none;
}

.sidebar-left .news-item .image {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
}

.sidebar-left .news-item .image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.sidebar-left .news-item:hover .image img {
    transform: scale(1.08);
}

.sidebar-left .news-item .news-info .name {
    font-size: 13.5px;
    font-weight: 500;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sidebar-left .news-item .news-info .name a {
    color: #1f2937;
    text-decoration: none;
    transition: color 0.2s ease;
}

.sidebar-left .news-item .news-info .name a:hover {
    color: var(--service-primary);
}

/* --------------------------------------------------------------------------
   2. Main Right Content Area
   -------------------------------------------------------------------------- */
.main-content-wrap {
    position: relative;
}

.title-bo {
    margin-bottom: 22px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--service-border);
    position: relative;
}

.title-bo::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background-color: var(--service-primary);
    border-radius: 2px;
}

.pt_title {
    font-size: 26px;
    font-weight: 800;
    color: var(--service-dark);
    margin: 0;
    line-height: 1.3;
    letter-spacing: -0.3px;
}

.category-description {
    background: var(--service-bg-card);
    border-radius: 12px;
    padding: 30px 34px;
    border: 1px solid var(--service-border);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
    margin-bottom: 30px;
}

/* --------------------------------------------------------------------------
   3. CKEditor Content Styles (.ck-content)
   -------------------------------------------------------------------------- */
.ck-content {
    font-size: 15.5px;
    line-height: 1.8;
    color: var(--service-text);
    word-break: break-word;
    -webkit-font-smoothing: antialiased;
}

/* Headings */
.ck-content h1,
.ck-content h2,
.ck-content h3,
.ck-content h4,
.ck-content h5,
.ck-content h6 {
    color: var(--service-dark);
    font-weight: 700;
    line-height: 1.35;
    margin-top: 28px;
    margin-bottom: 14px;
}

.ck-content h1:first-child,
.ck-content h2:first-child,
.ck-content h3:first-child,
.ck-content h4:first-child {
    margin-top: 0;
}

.ck-content h1 {
    font-size: 26px;
    border-bottom: 2px solid #f3f4f6;
    padding-bottom: 10px;
}

.ck-content h2 {
    font-size: 21px;
    color: var(--service-dark);
    position: relative;
    padding-left: 14px;
    border-left: 4px solid var(--service-primary);
    margin-top: 30px;
    margin-bottom: 14px;
}

.ck-content h3 {
    font-size: 18px;
    color: #1f2937;
    margin-top: 24px;
    margin-bottom: 12px;
    position: relative;
}

.ck-content h4 {
    font-size: 16px;
    color: #1f2937;
    margin-top: 20px;
    margin-bottom: 10px;
}

.ck-content h5 {
    font-size: 15px;
    font-weight: 600;
    color: var(--service-text);
    margin-top: 16px;
    margin-bottom: 8px;
}

.ck-content h6 {
    font-size: 14px;
    font-weight: 600;
    color: var(--service-text-muted);
    margin-top: 14px;
    margin-bottom: 8px;
}

/* Paragraphs & Text Formatting */
.ck-content p {
    margin: 0 0 16px 0;
    line-height: 1.8;
    text-align: justify;
}

.ck-content p:last-child {
    margin-bottom: 0;
}

.ck-content strong,
.ck-content b {
    font-weight: 700;
    color: var(--service-dark);
}

.ck-content em,
.ck-content i {
    font-style: italic;
    color: #4b5563;
}

.ck-content u {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.ck-content s,
.ck-content strike,
.ck-content del {
    text-decoration: line-through;
    color: #9ca3af;
}

.ck-content mark {
    background-color: #fef08a;
    color: var(--service-dark);
    padding: 2px 6px;
    border-radius: 4px;
}

.ck-content sub,
.ck-content sup {
    font-size: 75%;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
}

.ck-content sup {
    top: -0.5em;
}

.ck-content sub {
    bottom: -0.25em;
}

/* Links */
.ck-content a {
    color: var(--service-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 500;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.ck-content a:hover {
    color: var(--service-primary-hover);
    text-decoration-color: var(--service-primary-hover);
}

/* Unordered Lists */
.ck-content ul {
    list-style: none;
    padding-left: 0;
    margin: 0 0 18px 0;
}

.ck-content ul > li {
    position: relative;
    padding-left: 22px;
    margin-bottom: 10px;
    line-height: 1.75;
    color: var(--service-text);
}

.ck-content ul > li::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 10px;
    width: 6px;
    height: 6px;
    background-color: var(--service-primary);
    border-radius: 50%;
}

/* Ordered Lists */
.ck-content ol {
    padding-left: 22px;
    margin: 0 0 18px 0;
    list-style-type: decimal;
}

.ck-content ol > li {
    padding-left: 6px;
    margin-bottom: 10px;
    line-height: 1.75;
    color: var(--service-text);
}

/* Nested lists */
.ck-content ul ul,
.ck-content ol ol,
.ck-content ul ol,
.ck-content ol ul {
    margin-top: 8px;
    margin-bottom: 8px;
    padding-left: 20px;
}

.ck-content ul ul > li::before {
    background-color: transparent;
    border: 1.5px solid var(--service-primary);
    width: 5px;
    height: 5px;
}

/* Blockquotes */
.ck-content blockquote {
    position: relative;
    margin: 24px 0;
    padding: 18px 24px 18px 28px;
    background-color: var(--service-primary-light);
    border-left: 4px solid var(--service-primary);
    border-radius: 0 10px 10px 0;
    font-style: italic;
    color: #4b5563;
    font-size: 15.5px;
    line-height: 1.75;
}

.ck-content blockquote p {
    margin: 0 0 8px 0;
}

.ck-content blockquote p:last-child {
    margin-bottom: 0;
}

/* Tables */
.ck-content .table {
    width: 100%;
    overflow-x: auto;
    margin: 24px 0;
    -webkit-overflow-scrolling: touch;
}

.ck-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14.5px;
    border: 1px solid var(--service-border);
    border-radius: 8px;
    overflow: hidden;
}

.ck-content table th,
.ck-content table td {
    padding: 12px 16px;
    border: 1px solid var(--service-border);
    text-align: left;
    vertical-align: middle;
}

.ck-content table th {
    background-color: var(--service-dark);
    color: #ffffff;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.3px;
    border-color: #374151;
}

.ck-content table tr:nth-child(even) td {
    background-color: #f9fafb;
}

.ck-content table tr:hover td {
    background-color: var(--service-primary-light);
}

/* Images & Figures */
.ck-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    display: block;
    margin: 18px auto;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.ck-content figure.image {
    margin: 24px auto;
    text-align: center;
    max-width: 100%;
}

.ck-content figure.image figcaption {
    font-size: 13.5px;
    color: var(--service-text-muted);
    font-style: italic;
    margin-top: 8px;
    text-align: center;
}

.ck-content figure.image.image-style-side {
    float: right;
    margin-left: 24px;
    margin-bottom: 16px;
    max-width: 50%;
}

.ck-content figure.image.image-style-align-left {
    float: left;
    margin-right: 24px;
    margin-bottom: 16px;
    max-width: 50%;
}

.ck-content figure.image.image-style-align-center {
    margin: 24px auto;
}

/* Clearfix for floating figures */
.ck-content::after,
.ck-content figure::after {
    content: "";
    display: table;
    clear: both;
}

/* Code & Preformatted */
.ck-content code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 13.5px;
    background-color: #f3f4f6;
    color: #e11d48;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid var(--service-border);
}

.ck-content pre {
    background-color: #1e293b;
    color: #f8fafc;
    padding: 18px 20px;
    border-radius: 10px;
    overflow-x: auto;
    font-size: 13.5px;
    line-height: 1.7;
    margin: 22px 0;
}

.ck-content pre code {
    background: none;
    color: inherit;
    border: none;
    padding: 0;
}

/* Horizontal Rule */
.ck-content hr {
    border: none;
    border-top: 1px dashed #d1d5db;
    margin: 30px 0;
}

/* Embed / Media / Video */
.ck-content .media,
.ck-content .raw-html-embed {
    margin: 24px 0;
}

.ck-content iframe {
    max-width: 100%;
    border-radius: 10px;
    display: block;
    margin: 0 auto;
}

/* CKEditor Todo List / Checklist */
.ck-content ul.todo-list {
    list-style: none;
    padding-left: 0;
}

.ck-content ul.todo-list li {
    padding-left: 28px;
    position: relative;
    margin-bottom: 8px;
}

.ck-content ul.todo-list li::before {
    display: none;
}

.ck-content ul.todo-list li input[type="checkbox"] {
    position: absolute;
    left: 4px;
    top: 4px;
    accent-color: var(--service-primary);
}

/* --------------------------------------------------------------------------
   4. Services Grid List
   -------------------------------------------------------------------------- */
.services-grid {
    margin-top: 10px;
    row-gap: 24px;
}

.item-news-hot {
    background: var(--service-bg-card);
    border-radius: 10px;
    border: 1px solid var(--service-border);
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.item-news-hot:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border-color: #fca5a5;
}

.item-news-hot .wrap-img {
    display: block;
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background-color: #f3f4f6;
}

.item-news-hot .wrap-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.item-news-hot:hover .wrap-img img {
    transform: scale(1.06);
}

.item-news-hot .content {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.item-news-hot .content h3 {
    margin: 0;
    padding: 0;
}

.item-news-hot .title {
    font-size: 15.5px;
    font-weight: 700;
    color: var(--service-dark);
    line-height: 1.45;
    margin-bottom: 8px;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 44px;
    transition: color 0.2s ease;
}

.item-news-hot:hover .title {
    color: var(--service-primary);
}

.item-news-hot .cate-time {
    font-size: 12.5px;
    color: var(--service-text-muted);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.item-news-hot .des {
    font-size: 13.5px;
    color: var(--service-text-muted);
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: auto;
}

/* --------------------------------------------------------------------------
   5. Pagination
   -------------------------------------------------------------------------- */
.service-page .pagination {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 6px;
}

.service-page .pagination li {
    list-style: none;
}

.service-page .pagination li a,
.service-page .pagination li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid var(--service-border);
    background: #ffffff;
    color: var(--service-text);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.service-page .pagination li.active span,
.service-page .pagination li a:hover {
    background-color: var(--service-primary);
    border-color: var(--service-primary);
    color: #ffffff;
}

/* --------------------------------------------------------------------------
   6. Empty State Alert
   -------------------------------------------------------------------------- */
.no-content-alert {
    padding: 60px 20px;
    text-align: center;
    border-radius: 12px;
    background: #ffffff;
    border: 1px dashed var(--service-border);
    margin-top: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.no-content-alert .empty-icon {
    width: 64px;
    height: 64px;
    color: var(--service-primary);
}

.no-content-alert span {
    font-size: 16px;
    font-weight: 500;
    color: var(--service-text-muted);
}

/* --------------------------------------------------------------------------
   7. Responsive Breakpoints
   -------------------------------------------------------------------------- */
@media (max-width: 991px) {
    .service-page {
        padding: 16px 0 40px;
    }

    .sidebar-left {
        position: static;
        margin-bottom: 24px;
    }

    .category-description {
        padding: 22px 20px;
    }
}

@media (max-width: 768px) {
    .pt_title {
        font-size: 22px;
    }

    .category-description {
        padding: 18px 16px;
        border-radius: 8px;
    }

    .ck-content {
        font-size: 15px;
        line-height: 1.7;
    }

    .ck-content h1 { font-size: 22px; }
    .ck-content h2 { font-size: 18.5px; padding-left: 10px; }
    .ck-content h3 { font-size: 16.5px; }

    .ck-content blockquote {
        padding: 14px 16px;
        font-size: 14.5px;
    }

    .ck-content figure.image.image-style-side,
    .ck-content figure.image.image-style-align-left {
        float: none;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

    .ck-content table th,
    .ck-content table td {
        padding: 8px 10px;
        font-size: 13px;
    }

    .ck-content pre {
        padding: 14px 16px;
        font-size: 12.5px;
    }
}
