/*
Theme Name: Sửa Nhà Phố
Author: Đinh Hùng Kiên
Description: Cung cấp dịch vụ sửa nhà
Version: 1.0.0
*/
@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.logo-slide { 
    display: flex; 
    width: 200%; 
    animation: scroll 25s linear infinite; 
}
/* --- Tinh chỉnh bảng báo giá chuyên nghiệp --- */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 30px 0;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    border: 1px solid #eee;
    font-family: inherit;
}

/* FIX LỖI CHỮ TRẮNG TRÙNG NỀN: Ép màu tiêu đề */
table thead tr {
    background-color: var(--primary) !important;
}

table thead td, 
table thead th {
    color: #00aeef !important; /* Chữ trắng trên nền hồng */
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    padding: 18px 20px;
    letter-spacing: 0.5px;
    border: none;
}

/* Thân bảng */
table tbody td {
    padding: 15px 20px;
    color: #444;
    border-bottom: 1px solid #f5f5f5;
    vertical-align: middle;
}

/* Hiệu ứng dòng xen kẽ cho đỡ mỏi mắt */
table tbody tr:nth-child(even) {
    background-color: #fff9fa; 
}

/* Highlight cột quan trọng */
table tbody tr td:nth-child(2) {
    color: var(--primary);
    font-weight: 700;
}

/* Hiệu ứng hover cho chuyên nghiệp */
table tbody tr:hover {
    background-color: #fff0f2;
    transition: 0.3s;
}

/* Bo tròn góc cuối cùng của bảng */
table tbody tr:last-child td {
    border-bottom: none;
}

/* --- RESPONSIVE CHO MOBILE --- */
@media screen and (max-width: 600px) {
    table {
        border-radius: 10px;
    }
    th, td {
        padding: 12px 10px;
        font-size: 0.85rem;
    }
}
/* Khống chế nội dung bài viết không tràn Sidebar */
.seo-article {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Ép tất cả hình ảnh, video, iframe không được vượt quá chiều rộng 100% */
.seo-article img, 
.seo-article figure, 
.seo-article iframe, 
.seo-article video, 
.seo-article table {
    max-width: 100% !important;
    height: auto !important;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Xử lý riêng cho bảng (table) nếu có */
.seo-article table {
    width: 100%;
    border-collapse: collapse;
    overflow-x: auto;
    display: block; /* Giúp table có thể scroll ngang trên mobile */
}

/* Bo góc cho ảnh trong nội dung cho đồng bộ layout */
.seo-article img {
    border-radius: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
}
/* Fix lỗi thẻ Figure (chứa ảnh + caption) bị tràn */
.seo-article figure {
    margin-left: 0;
    margin-right: 0;
    width: 100% !important; /* Ép thẻ bọc luôn rộng bằng container */
    max-width: 100% !important;
    display: block !important; /* Phải để block để không bị tính width theo table */
}

/* Fix lỗi Caption (Chú thích ảnh) */
.seo-article figcaption {
    width: 100%;
    word-break: break-word; /* Ép chữ phải xuống dòng nếu quá dài */
    white-space: normal;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #64748b; /* Màu xám slate */
    text-align: center;
    margin-top: 0.75rem;
    font-style: italic;
}

/* Đảm bảo ảnh bên trong figure luôn co giãn */
.seo-article figure img {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
}
/* 1. XỬ LÝ CẤU TRÚC MẶC ĐỊNH CỦA CF7 */
.cf7-custom-style br {
    display: none !important;
}

.cf7-custom-style p {
    margin: 0 !important;
    display: contents; /* Giúp các thẻ con bên trong p tham gia trực tiếp vào Grid */
}

/* 2. THIẾT LẬP LAYOUT GRID 3 CỘT */
.cf7-custom-style .wpcf7-form {
    display: grid;
    grid-template-columns: 1fr; /* 1 cột trên điện thoại */
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
}

@media (min-width: 768px) {
    .cf7-custom-style .wpcf7-form {
        grid-template-columns: 1fr 1fr 1fr; /* 3 cột trên máy tính */
        align-items: center;
    }
}

/* 3. LÀM NỔI BẬT CÁC Ô NHẬP LIỆU (INPUT) */
.cf7-custom-style .wpcf7-form-control-wrap {
    width: 100%;
}

.cf7-custom-style input:not([type="submit"]) {
    width: 100%;
    padding: 1.25rem 1.5rem;
    border-radius: 1.25rem; /* Bo góc 20px */
    background: rgba(255, 255, 255, 0.1) !important; /* Trắng trong suốt để thấy trên nền xanh */
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: #ffffff !important;
    font-size: 1.1rem;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hiệu ứng khi khách nhấn vào ô */
.cf7-custom-style input:not([type="submit"]):focus {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: #ffffff !important;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1);
}

/* Chỉnh màu chữ gợi ý (Placeholder) */
.cf7-custom-style input::placeholder {
    color: rgba(255, 255, 255, 0.6) !important;
}

/* 4. NÚT GỬI MÀU CAM "SẮC XẢO" */
.cf7-custom-style .btn-secondary,
.cf7-custom-style input[type="submit"] {
    width: 100%;
    padding: 1.25rem;
    border-radius: 1.25rem;
    background-color: #F15C1C !important; /* Màu cam đặc trưng */
    color: #ffffff !important;
    font-weight: 800;
    font-size: 1.1rem;
    text-transform: uppercase;
    border: none !important;
    cursor: pointer;
    box-shadow: 0 10px 25px -5px rgba(241, 92, 28, 0.4);
    transition: all 0.3s ease;
}

.cf7-custom-style input[type="submit"]:hover {
    transform: translateY(-3px) scale(1.02);
    filter: brightness(1.1);
    box-shadow: 0 15px 30px -5px rgba(241, 92, 28, 0.5);
}

/* 5. HIỆU ỨNG PULSE NHẤP NHÁY */
.pulse-secondary {
    animation: pulse-orange 2s infinite;
}

@keyframes pulse-orange {
    0% { box-shadow: 0 0 0 0 rgba(241, 92, 28, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(241, 92, 28, 0); }
    100% { box-shadow: 0 0 0 0 rgba(241, 92, 28, 0); }
}

/* Xử lý thông báo thành công/lỗi */
.wpcf7-response-output {
    grid-column: 1 / -1; /* Trải dài hết các cột */
    border-radius: 1rem !important;
    margin: 20px 0 0 0 !important;
    padding: 15px !important;
    color: #ffffff !important;
    font-size: 0.9rem;
    text-align: center;
}