/*
Theme Name: K-Tech Flatsome Child
Theme URI: 
Description: Flatsome Child Theme for K-Tech (Optimized for Flatsome 3.20.7)
Author: Master WP
Author URI: 
Template: flatsome
Version: 1.0.0
Text Domain: k-tech
*/

/*  */
/* CONTAINER / IB LEFT & RIGHT */
/*  */
.home-container {
    max-width: 1350px !important;
    margin: 0 auto;
}

.ib-center.icon-box {
    align-items: center !important;
}

.ib-center .icon-box-img img {
    padding-top: 0 !important;
}

.ib-center .text>* {
    margin-bottom: 0 !important;
}

/* ==========================================================================
   Custom Contact Form 7 Component (ktech-cf7-form)
   ========================================================================== */
.ktech-cf7-form {
    width: 100%;
}

/* Triệt tiêu thẻ p và br tự sinh của Contact Form 7 */
.ktech-cf7-form p {
    margin: 0 !important;
    padding: 0 !important;
    display: contents !important;
}

.ktech-cf7-form br {
    display: none !important;
}

.ktech-cf7-form .wpcf7-form-control-wrap {
    display: block;
    width: 100%;
    margin: 0;
    position: relative;
}

/* Layout Grid 2 Cột với Gap 16px */
.ktech-cf7-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    width: 100%;
}

.ktech-cf7-col {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.ktech-cf7-col--full {
    grid-column: 1 / -1;
}

/* Input Fields: fs-14, viền #d1d5db, height 44px */
.ktech-cf7-form input[type="text"],
.ktech-cf7-form input[type="email"],
.ktech-cf7-form input[type="tel"],
.ktech-cf7-form input[type="url"],
.ktech-cf7-form input[type="number"],
.ktech-cf7-form select,
.ktech-cf7-input {
    width: 100% !important;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    padding: 0 14px !important;
    font-size: 14px !important;
    line-height: 42px !important;
    color: #6B7280 !important;
    background-color: #ffffff !important;
    border: 1px solid #d1d5db !important;
    border-radius: 4px !important;
    box-shadow: none !important;
    margin-bottom: 0 !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

/* Textarea: fs-14, viền #d1d5db, min-height 100px */
.ktech-cf7-form textarea,
.ktech-cf7-textarea {
    width: 100% !important;
    min-height: 100px !important;
    padding: 12px 14px !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    color: #6B7280 !important;
    background-color: #ffffff !important;
    border: 1px solid #d1d5db !important;
    border-radius: 4px !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
    margin-bottom: 0 !important;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

/* Placeholder Styling: fs-14 */
.ktech-cf7-form input::placeholder,
.ktech-cf7-form textarea::placeholder {
    font-size: 14px !important;
    color: #6b7280 !important;
    opacity: 1;
}

/* Focus State */
.ktech-cf7-form input:focus,
.ktech-cf7-form textarea:focus {
    border-color: #00477e !important;
    background-color: #ffffff !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(0, 71, 126, 0.12) !important;
}

/* Button Submit: fs-16, bg --fs-color-secondary, padding 14px top/bottom, line-height 1 */
.ktech-cf7-submit,
.ktech-cf7-form input[type="submit"],
.ktech-cf7-form button[type="submit"] {
    width: 100% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    padding: 14px 24px !important;
    height: auto !important;
    min-height: 0 !important;
    color: #ffffff !important;
    background-color: var(--fs-color-secondary, #d2232a) !important;
    border: none !important;
    border-radius: 4px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    cursor: pointer !important;
    margin: 0 !important;
    box-shadow: 0 2px 6px rgba(210, 35, 42, 0.25) !important;
    transition: all 0.25s ease !important;
}

.ktech-cf7-submit:hover,
.ktech-cf7-form input[type="submit"]:hover,
.ktech-cf7-form button[type="submit"]:hover {
    background-color: #b51c22 !important;
    box-shadow: 0 4px 14px rgba(210, 35, 42, 0.35) !important;
    transform: translateY(-1px);
}

.ktech-cf7-submit svg {
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.ktech-cf7-submit:hover svg {
    transform: translate(2px, -2px);
}

/* Thông báo validation & thông điệp trạng thái CF7 */
.ktech-cf7-form .wpcf7-not-valid-tip {
    font-size: 12px;
    color: var(--fs-color-secondary);
    margin-top: 4px;
    font-weight: 500;
}

.ktech-cf7-form .wpcf7-not-valid {
    border-color: var(--fs-color-secondary) !important;
    background-color: #fef2f2 !important;
}

.ktech-cf7-form .wpcf7-response-output {
    margin: 16px 0 0 !important;
    padding: 12px 16px !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    grid-column: 1 / -1;
}

.ktech-cf7-form .wpcf7-spinner {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
}

/* ==========================================================================
   Why Choose Us Box (.wcu-box)
   ========================================================================== */
.wcu-box {
    display: flex;
    align-items: center;
    gap: 16px;
    background-color: #ffffff;
    padding: 16px;
    margin-bottom: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wcu-box:last-child {
    margin-bottom: 0;
}

.wcu-box:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Số thứ tự 01, 02... */
.wcu-num {
    font-size: 13px;
    font-weight: 800;
    color: var(--fs-color-primary, #00477e);
    line-height: 1;
    flex-shrink: 0;
}

/* Khối văn bản bên phải */
.wcu-meta {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Tiêu đề tiếng Anh */
.wcu-meta h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 4px 0;
    line-height: 1.3;
}

/* Dòng mô tả tiếng Việt */
.wcu-meta p {
    font-size: 14px;
    margin: 0;
    line-height: 1.4;
}

/*  */
/* HEADER & FOOTER */
/*  */
.header-inner.container.logo-left {
    max-width: 1400px;
}

.header-wrapper.stuck #wide-nav .flex-col.flex-center {
    display: none !important;
}

.footer-tag>p {
    font-size: 12px !important;
    padding: 4px 10px;
    width: max-content;
    border: 1px solid rgba(229, 231, 235, 1);
    background-color: rgba(243, 244, 246, 0.9);
    border-radius: 4px;
    margin-bottom: 0 !important;
}

.footer-tag>p+p {
    margin-bottom: 1rem !important;
}

.absolute-footer {
    background-color: var(--fs-color-primary) !important;
}

.absolute-footer .footer-primary {
    width: 100%;
    text-align: center;
}

#footer .icon-angle-right:before {
    color: var(--fs-color-secondary);
}

#footer .ux-menu-link__text {
    font-size: 14px !important;
    color: var(--fs-color-primary);
}

/* Responsive trên Mobile */
@media (max-width: 569px) {
    .wcu-box {
        padding: 14px 16px;
        gap: 16px;
    }

    .wcu-meta h3 {
        font-size: 15.5px;
    }

    .wcu-meta p {
        font-size: 13px;
    }

    .ktech-cf7-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
}



/* ==========================================================================
   DESKTOP ONLY HEADER CUSTOMIZATIONS (min-width: 850px)
   Chỉ áp dụng trên Desktop, không tiêm / không hiển thị trên Tablet & Mobile
   ========================================================================== */
@media (min-width: 850px) {

    /* Header Contact Block (.header-block-1 / Icon Box Header) */
    #masthead .header-inner {
        align-items: center !important;
    }

    #masthead .flex-left.flex-grow {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    #masthead .flex-left.flex-grow>.header-nav {
        width: 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        height: 100% !important;
    }

    #masthead li.header-block {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        height: 100% !important;
        text-transform: none !important;
        /* Triệt tiêu nav-uppercase */
    }

    #masthead li.header-block::after,
    #masthead li.header-block>a::after {
        display: none !important;
        /* Triệt tiêu nav-line-bottom */
    }

    #masthead .header-block-block-1,
    #masthead .header-block-1 {
        width: 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    /* Header Contact Matrix (Mẫu 4 khối thông tin liên hệ header - 2x2 Grid) */
    .header-contact-matrix {
        grid-template-columns: 1fr;
    }

    .matrix-item {
        display: flex !important;
        align-items: flex-start !important;
        gap: 8px !important;
        font-size: 13px !important;
        line-height: 1.45 !important;
        color: #475569 !important;
        text-align: left !important;
    }

    .matrix-icon {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        color: #475569 !important;
        margin-top: 2px !important;
        flex-shrink: 0 !important;
        width: 16px !important;
        height: 16px !important;
    }

    .matrix-icon svg {
        width: 15px !important;
        height: 15px !important;
        stroke: currentColor !important;
        display: block !important;
    }

    .matrix-icon img {
        width: 16px !important;
        height: 16px !important;
        max-width: 16px !important;
        object-fit: contain !important;
        display: block !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .matrix-icon i {
        font-size: 14px !important;
        line-height: 1 !important;
        color: currentColor !important;
        display: block !important;
    }

    .matrix-body {
        display: flex !important;
        align-items: flex-start !important;
        gap: 5px !important;
        flex-wrap: nowrap !important;
        line-height: 1.45 !important;
    }

    .matrix-label {
        font-weight: 400 !important;
        color: #475569 !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
    }

    .matrix-val {
        color: #475569 !important;
        display: flex !important;
        flex-direction: column !important;
        line-height: 1.45 !important;
    }

    .matrix-val a {
        color: #334155 !important;
        text-decoration: none !important;
        transition: color 0.2s ease !important;
    }

    .matrix-val a:hover {
        color: var(--fs-color-primary, #004f8c) !important;
        text-decoration: underline !important;
    }

    .matrix-note {
        color: #475569 !important;
        font-size: 13px !important;
    }

    /* Language Switcher: VI | EN */
    .header-languages-inline {
        display: inline-flex !important;
        align-items: center !important;
        gap: 8px !important;
        margin-right: 18px !important;
        font-size: 13.5px !important;
        font-weight: 600 !important;
        letter-spacing: 0.5px !important;
    }

    .header-languages-inline .lang-link {
        color: #99A1AF !important;
        text-decoration: none !important;
        transition: color 0.2s ease !important;
        padding: 2px 4px !important;
        font-size: 1rem;
    }

    .header-languages-inline .lang-link:hover,
    .header-languages-inline .lang-link.active {
        color: var(--fs-color-primary, #004f8c) !important;
        font-weight: 700 !important;
    }

    .lang-link::before {
        display: none !important;
    }

    .header-languages-inline .lang-divider {
        color: #D1D5DC !important;
        font-weight: 600 !important;
        user-select: none !important;
    }

    /* Header Bottom (#wide-nav) - 2 Tầng */
    #wide-nav {
        background: transparent !important;
        padding: 0 !important;
        border: none !important;
    }

    #wide-nav .flex-row.container {
        display: flex !important;
        flex-direction: column !important;
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 !important;
    }

    #wide-nav .flex-col.flex-left {
        display: none !important;
    }

    /* TẦNG 1: BANNER SLOGAN MÀU XANH */
    #wide-nav .flex-col.flex-center {
        width: 100% !important;
        background-color: var(--fs-color-primary, #004f8c) !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        font-size: 25px;
        padding: 2rem !important;
        margin: 0 !important;
    }

    #wide-nav .flex-col.flex-center>ul {
        width: 100% !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        margin: 0 !important;
    }

    #wide-nav .flex-col.flex-center li {
        margin: 0 !important;
        padding: 0 !important;
        line-height: 1 !important;
    }

    #wide-nav .menu-title {
        color: #ffffff !important;
        font-size: 25px !important;
        font-weight: 700 !important;
        letter-spacing: 0.8px !important;
        text-transform: uppercase !important;
        margin: 0 !important;
        text-align: center !important;
        line-height: 1.3 !important;
    }

    /* TẦNG 2: MENU & TÌM KIẾM NỀN TRẮNG */
    #wide-nav .flex-col.flex-right {
        width: 100% !important;
        background-color: #ffffff !important;
        border-bottom: 1px solid #e5e7eb !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        padding: 0 16px !important;
        min-height: 48px !important;
    }

    #wide-nav .flex-col.flex-right>ul {
        width: 100% !important;
        max-width: 1280px !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        margin: 0 !important;
        padding: 14px;
    }

    /* Các mục menu */
    #wide-nav .flex-col.flex-right>ul>li.menu-item {
        margin: 0 !important;
        padding: 0 4px !important;
    }

    #wide-nav .flex-col.flex-right>ul>li.menu-item>a.nav-top-link {
        color: #334155 !important;
        font-size: 16px !important;
        font-weight: 600 !important;
        letter-spacing: 0.3px !important;
        padding: 16px !important;
        display: inline-block !important;
        position: relative !important;
        transition: color 0.2s ease !important;
    }

    #wide-nav .flex-col.flex-right>ul>li.menu-item:hover>a.nav-top-link {
        color: var(--fs-color-primary, #004f8c) !important;
    }

    /* Mục Menu Active */
    #wide-nav .flex-col.flex-right>ul>li.menu-item.active>a.nav-top-link,
    #wide-nav .flex-col.flex-right>ul>li.menu-item.current-menu-item>a.nav-top-link {
        color: var(--fs-color-primary, #004f8c) !important;
        font-weight: 700 !important;
    }

    #wide-nav .flex-col.flex-right>ul>li.menu-item.active>a.nav-top-link::after,
    #wide-nav .flex-col.flex-right>ul>li.menu-item.current-menu-item>a.nav-top-link::after {
        content: "" !important;
        position: absolute !important;
        bottom: 0 !important;
        left: 14px !important;
        right: 14px !important;
        height: 4px !important;
        background-color: var(--fs-color-secondary, #c41230) !important;
        display: block !important;
    }

    /* PHÂN CÁCH DỌC VÀ Ô TÌM KIẾM */
    #wide-nav li.header-search-form {
        display: inline-flex !important;
        align-items: center !important;
        margin: 0 0 0 16px !important;
        padding: 0 0 0 18px !important;
        border-left: 1px solid #cbd5e1 !important;
    }

    #wide-nav .header-search-form-wrapper {
        width: auto !important;
    }

    #wide-nav .searchform-wrapper {
        margin: 0 !important;
    }

    #wide-nav .searchform {
        margin-bottom: 0 !important;
    }

    #wide-nav .searchform .flex-row {
        align-items: center !important;
        flex-direction: row-reverse !important;
        background: transparent !important;
        border: none !important;
        margin: 0 !important;
    }

    #wide-nav .searchform .flex-col:has(.submit-button) {
        margin-right: 6px !important;
        padding: 0 !important;
    }

    #wide-nav .searchform .submit-button {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        min-height: auto !important;
        height: auto !important;
        line-height: 1 !important;
    }

    #wide-nav .searchform .submit-button i {
        color: #64748b !important;
        font-size: 15px !important;
        display: block !important;
        transition: color 0.2s ease !important;
    }

    #wide-nav .searchform .submit-button:hover i {
        color: var(--fs-color-primary, #004f8c) !important;
    }

    #wide-nav .searchform input[type="search"] {
        border: none !important;
        box-shadow: none !important;
        background: transparent !important;
        height: 28px !important;
        line-height: 28px !important;
        padding: 0 !important;
        font-size: 13.5px !important;
        color: #334155 !important;
        width: 100px !important;
        transition: width 0.25s ease !important;
    }

    #wide-nav .searchform input[type="search"]:focus {
        width: 140px !important;
    }

    #wide-nav .searchform input[type="search"]::placeholder {
        color: #64748b !important;
        font-size: 13.5px !important;
    }
}
/* Header Contact Matrix (Mẫu 4 khối thông tin liên hệ header - 2x2 Grid) */
@media (min-width: 1059px) {

    
    .header-contact-matrix {
        display: grid !important;
        grid-template-columns: minmax(auto, 1fr) minmax(auto, 1.3fr) !important;
        gap: 10px 10px !important;
        align-items: start !important;
        justify-content: center !important;
        width: auto !important;
        max-width: 100% !important;
        margin: 0 auto !important;
    }
}

/* ==========================================================================
   TABLET & MOBILE RESET (max-width: 849px)
   Ẩn hoàn toàn khối liên hệ Desktop, header bottom và các phần tử tiêm tự động
   ========================================================================== */
@media (max-width: 849px) {

    #wide-nav,
    .header-bottom,
    .header-contact-matrix,
    #masthead li.header-block,
    #masthead .flex-left.flex-grow,
    #masthead .hide-for-medium,
    .header-languages-inline {
        display: none !important;
    }
}