/*
Theme Name: Hello Elementor Child
Template: hello-elementor
Version: 1.0.0
*/
/* Ép menu dính lên đầu bằng CSS thuần */
header#site-header, .elementor-location-header {
    position: sticky !important;
    top: 0 !important;
    z-index: 9999 !important;
}

body {
    font-family: 'Roboto', sans-serif;
    font-size: 18px;
    line-height: 1.7;
    color: #333;
    margin: 0; /* Xóa margin body để chống tràn */
    padding: 0; /* Xóa padding body */
    word-wrap: break-word;
    overflow-x: hidden; /* Thêm dòng này để chặn mọi nguy cơ tràn ngang */
}

/* Căn lề cho đoạn văn trong bài viết */
p {
    margin-bottom: 1.5em; /* Khoảng cách giữa các đoạn */
    text-align: left; /* Căn đều 2 bên cho chuyên nghiệp */
}
h1, h2, h3, h4, h5, h6 {
    color: #1c449c; /* Màu xanh đậm thương hiệu của ông */
    font-weight: 700;
    line-height: 1.3;
    margin-top: 1.2em;
    margin-bottom: 0.6em;
}

h1 { font-size: 32px; } /* Thường dùng cho tiêu đề bài viết */
/* Chỉ trang con (bài viết cụ thể) mới có vạch kẻ H2 */
.single-post .entry-content 
h2 {
    border-left: 5px solid #179bd7;
    padding-left: 15px;
}

/* H2 chung cho toàn sàn (bao gồm cả trang chủ) thì không có vạch */
h2 {
    border-left: none !important;
    padding-left: 0 !important;
}
h3 { font-size: 22px; }
h4 { font-size: 18px; }
/* Khung chứa nội dung chính */
.site-main, .inside-article {
    max-width: 1100px; /* Độ rộng vừa phải để đọc không mỏi mắt */
    margin: 0 auto;    /* Căn giữa */
    padding: 20px;     /* Khoảng cách lề trong */
}

/* CĂN LỀ MOBILE - CHỐNG DÍNH MÉP */
@media (max-width: 768px) {
   
    /* 2. Căn lề cho trang con (Bài viết, trang dịch vụ) */
    .site-main, 
    .inside-article, 
    .entry-content,
    .page-content {
        padding-left: 10px !important;
        padding-right: 10px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* 3. Đảm bảo ảnh không tràn gây vỡ lề */
    img {
        max-width: 100% !important;
        height: auto !important;
    }
}
/* Khoảng cách cho danh sách trong bài viết */
.entry-content ul, .entry-content ol {
    margin-bottom: 1.5em;
    padding-left: 25px; /* Thụt vào để lộ dấu chấm/số */
}

.entry-content li {
    margin-bottom: 0.5em; /* Khoảng cách giữa các dòng trong danh sách */
}
/* Bo góc nhẹ cho ảnh và căn giữa */
.entry-content img {
    border-radius: 8px;
    margin: 10px auto;
    display: block;
}

/* Chữ chú thích dưới ảnh */
.wp-caption-text, .wp-block-image figcaption {
    text-align: center;
    font-size: 14px;
    font-style: italic;
    color: #666;
    margin-top: 5px;
}
/* Làm bảng chuyên nghiệp hơn */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5em;
}

th, td {
    padding: 12px 15px;
    border: 1px solid #ddd;
    text-align: left;
}

th {
    background-color: #1c449c; /* Màu xanh của ông */
    color: #ffffff;
}

tr:nth-child(even) {
    background-color: #f9f9f9; /* Màu nền xen kẽ cho dễ đọc */
}

/* Hỗ trợ xem bảng trên Mobile không bị vỡ giao diện */
@media (max-width: 768px) {
    table {
        display: block;
        overflow-x: auto; /* Cho phép vuốt ngang bảng trên điện thoại */
    }
}
.entry-content a {
    color: #179bd7;
    text-decoration: none;
    font-weight: 500;
    transition: 0.3s;
}

.entry-content a:hover {
    color: #1c449c;
    text-decoration: underline;
}
.blockquote {
    background: #f0f7fb;
    border-left: 10px solid #1c449c;
    margin: 1.5em 10px;
    padding: 15px 20px;
    font-style: italic;
    quotes: "\201C""\201D""\2018""\2019";
}
/* Style chung cho nút */
.ez-button {
    display: inline-block;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    text-decoration: none !important; /* Bỏ gạch chân của thẻ a */
    border-radius: 50px; /* Bo tròn kiểu hiện đại */
    transition: all 0.3s ease; /* Hiệu ứng mượt mà */
    cursor: pointer;
    border: 2px solid transparent;
    margin: 10px 0;
}
/* cho khối để bọc nút *?
.ez-button-container {
    text-align: center; /* Đẩy tất cả nội dung bên trong vào giữa */
    width: 100%;
    margin: 20px 0;
}
/* Nút chính - Màu xanh đậm Eduzone */
.ez-btn-primary {
    background-color: #1c449c;
    color: #ffffff !important;
}

.ez-btn-primary:hover {
    background-color: #179bd7; /* Chuyển sang xanh sáng khi di chuột */
    transform: translateY(-3px); /* Nhảy nhẹ lên trên tạo hiệu ứng nổi */
    box-shadow: 0 5px 15px rgba(28, 68, 156, 0.3);
}

/* Nút phụ - Viền xanh (dùng cho mục ít quan trọng hơn) */
.ez-btn-outline {
    background-color: transparent;
    border-color: #1c449c;
    color: #1c449c !important;
    text-align: center
}

.ez-btn-outline:hover {
    background-color: #1c449c;
    color: #ffffff !important;
     text-align: center;
}
/* Màu link mặc định trong nội dung bài viết */
.entry-content a, 
.page-content a {
    color: #179bd7 !important; /* Màu xanh đậm chủ đạo */
    text-decoration: none; /* Bỏ gạch chân mặc định */
    font-weight: 500;
}

/* Hiệu ứng khi di chuột vào link */
.entry-content a:hover, 
.page-content a:hover {
    color: #179bd7 !important; /* Chuyển sang xanh sáng hơn */
    text-decoration: underline; /* Hiện gạch chân cho dễ nhận biết */
}
/* Trang trí phân trang số */
.ez-pagination {
    text-align: center;
    margin: 40px 0;
}

.ez-pagination .page-numbers {
    display: inline-block;
    padding: 10px 18px;
    margin: 0 5px;
    border: 1px solid #1c449c;
    color: #1c449c !important;
    text-decoration: none !important;
    border-radius: 4px;
    font-weight: bold;
    transition: 0.3s;
}

/* Màu cho trang hiện tại */
.ez-pagination .page-numbers.current {
    background-color: #1c449c;
    color: #fff !important;
    border-color: #1c449c;
}

/* Hiệu ứng khi di chuột */
.ez-pagination .page-numbers:hover:not(.current) {
    background-color: #179bd7;
    color: #fff !important;
    border-color: #179bd7;
}
/* --- PHẦN TIÊU ĐỀ TRANG DANH MỤC (ARCHIVE) --- */

/* 1. Căn giữa và tạo khoảng trống cho toàn bộ khối header */
.page-header {
    text-align: center;
    margin-top: -20px !important;
    padding: 5px 5px;
    margin-bottom: 30px !important;
    background-color: #fdfdfd; /* Nền xám nhạt để làm nổi bật tiêu đề */
    border-bottom: 1px solid #eee;
}

/* 2. Chỉnh màu xanh Eduzone và cỡ chữ cho tiêu đề */
.page-header h1.entry-title {
    color: #1c449c !important; /* Màu xanh đậm của ông */
    font-size: 32px !important;
    text-transform: uppercase; /* Viết hoa cho oai */
    margin: 0 0 10px 0 !important;
    font-weight: 700;
}

/* 3. Chỉnh phần mô tả danh mục (nếu có) */
.page-header .archive-description {
    max-width: 800px;
    margin: 0 auto;
    color: #666;
    line-height: 1.6;
    font-size: 16px;
}
/* Chiêu cuối: Ép màu xanh cho TẤT CẢ link trong khu vực Header Archive */
div[class*="archive-description"] a, 
.page-header a, 
.ez-page-header a,
section.elementor-section a {
    color: #1c449c !important; 
    text-decoration: none !important;
}

/* Đảm bảo trạng thái Hover cũng không bị hồng */
div[class*="archive-description"] a:hover, 
.page-header a:hover, 
.ez-page-header a:hover,
section.elementor-section a:hover {
    color: #179bd7 !important;
    text-decoration: underline !important;
}
/* --- TỐI ƯU SIDEBAR --- */

/* 1. Xóa bỏ dấu chấm (bullet) và lề thừa của danh sách trong Sidebar */
.ez-sidebar-area ul, 
.ez-sidebar-area li {
    list-style: none !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
}

/* 2. Ép ảnh trong Sidebar không được đẩy nội dung sang phải */
.ez-sidebar-area img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
    margin-bottom: 10px;
    border-radius: 5px;
}

/* 3. Nhuộm xanh tiêu đề bài viết trong Sidebar */
.ez-sidebar-area a {
    color: #1c449c !important; /* Xanh đậm Eduzone */
    text-decoration: none !important;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
    transition: 0.3s;
}

.ez-sidebar-area a:hover {
    color: #179bd7 !important; /* Xanh sáng khi di chuột */
}

/* 4. Chỉnh lại Widget tiêu đề cho sang hơn */
.widget-title {
    font-size: 24px !important;
    border-bottom: 2px solid #1c449c;
    padding-bottom: 8px;
    margin-bottom: 20px !important;
}
/* LÀM SIDEBAR DÍNH KHI CUỘN CHUỘT (STICKY SIDEBAR) */
@media (min-width: 992px) { /* Chỉ áp dụng trên máy tính, mobile không cần dính */
    
    .ez-main-wrapper {
        display: flex;
        align-items: flex-start; /* Quan trọng: Phải có dòng này để Sticky hoạt động */
    }

    .ez-sidebar-area {
        position: -webkit-sticky; /* Hỗ trợ trình duyệt Safari */
        position: sticky;
        top: 40px; /* Khoảng cách từ đỉnh đầu xuống khi dính (chừa chỗ cho Menu của ông) */
        height: max-content; /* Đảm bảo chiều cao chỉ bằng nội dung bên trong */
    }
}
/* Fix CLS: Giữ chỗ trước cho ảnh đại diện bài viết */
.ez-thumb a {
    display: block;
    position: relative;
    padding-top: 56.25%; /* Tỷ lệ 16:9 - Điều chỉnh tùy theo tỷ lệ ảnh của ông */
    background-color: #f0f0f0; /* Hiện nền xám nhẹ trong lúc đợi ảnh tải */
    overflow: hidden;
    border-radius: 8px;
}

.ez-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
}
/* Chống nhảy trang cho ảnh chèn tay trong nội dung */
.entry-content img, 
.page-content img {
    height: auto; /* Đảm bảo tỷ lệ ảnh không bị méo */
    max-width: 100%;
    aspect-ratio: attr(width) / attr(height); /* Tự động tính toán không gian dựa trên thông số ảnh */
    content-visibility: auto; /* Giúp trình duyệt tối ưu hóa việc dựng hình */
}
/* Fix CLS cho H1: Giữ chỗ bằng line-height và min-height an toàn */
h1.entry-title, 
.page-header h1.entry-title {
    color: #1c449c !important;
    font-family: 'Roboto', sans-serif; /* Ép dùng font chuẩn để trình duyệt tính toán sớm */
    font-weight: 700;
    line-height: 1.2; /* Cố định độ cao dòng */
    min-height: 38px; /* Giữ sẵn một khoảng cao tương đương 1 dòng tiêu đề */
    display: block;
    margin-bottom: 15px !important;
    text-align: center;
    text-transform: uppercase;
}

/* Đảm bảo trên Mobile tiêu đề không bị nhảy khi xuống dòng */
@media (max-width: 768px) {
    h1.entry-title {
        min-height: 70px; /* Mobile thường tiêu đề dài sẽ xuống 2 dòng, nên giữ chỗ cao hơn */
        font-size: 24px !important;
    }
}
/* --- PHẦN NÚT LIÊN HỆ CỐ ĐỊNH --- */
.ez-contact-buttons {
    position: fixed;
    bottom: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 99999;
    pointer-events: none; /* Tránh cản trở click vào nội dung bên dưới */
}

.ez-btn-contact {
    pointer-events: auto; /* Cho phép click vào nút */
    display: flex;
    align-items: center;
    padding: 8px 15px;
    border-radius: 30px;
    color: #fff !important;
    text-decoration: none !important;
    font-size: 10px;
    font-weight: 400;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

/* Màu nền Zalo */
.ez-zalo-btn {
    background: #0084ff; /* Màu xanh Zalo */
}

/* Màu nền Facebook (Xanh chủ đạo Eduzone) */
.ez-fb-btn {
    background: #1c449c; /* Màu xanh chủ đạo của ông */
}

/* Icon và hiệu ứng rung rinh */
.ez-icon-shake {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ez-icon-shake img {
    width: 100%;
    height: auto;
}

.ez-btn-text {
    white-space: nowrap;
}

/* HIỆU ỨNG THÔI THÚC (RUNG RING) */
@keyframes ez-shake {
    0% { transform: rotate(0) scale(1); }
    25% { transform: rotate(15deg) scale(1.1); }
    50% { transform: rotate(-15deg) scale(1.1); }
    75% { transform: rotate(15deg) scale(1.1); }
    100% { transform: rotate(0) scale(1); }
}

.ez-icon-shake {
    animation: ez-shake 2s infinite ease-in-out;
}

/* Hiệu ứng Phóng to khi di chuột */
.ez-btn-contact:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    filter: brightness(1.1);
}

/* Ẩn bớt chữ trên Mobile cho gọn nếu cần */
@media (max-width: 480px) {
    .ez-btn-text {
        font-size: 10px;
    }
    .ez-btn-contact {
        padding: 6px 12px;
    }
}