/* ==========================================================================
   TrueTech 2026 — Liên hệ & Sơ đồ tổ chức
   Tải trên: page-lien-he, page-contact, page-sodo
   ========================================================================== */

/* ==========================================================================
   13. CONTACT PAGE (Optimized v4.0)
   ========================================================================== */
.tt-page-header {
    text-align: center;
    max-width: 800px;
    margin-inline: auto;
    display: flex;
    flex-direction: column;
    gap: var(--tt-space-4);
    padding-block-start: var(--tt-space-16);
    padding-block-end: var(--tt-space-8);
}

.tt-page-header h1 {
    margin: 0;
    color: var(--tt-color-text-primary);
}

.tt-page-header p {
    font-size: var(--tt-text-lg);
    color: var(--tt-color-text-secondary);
    margin: 0;
}

.tt-contact-list {
    display: flex;
    flex-direction: column;
    gap: var(--tt-space-8);
}

.tt-contact-card {
    padding: var(--tt-space-6);
}

.tt-contact-card__inner {
    display: grid;
    gap: var(--tt-space-8);
}

@media (min-width: 1024px) {
    .tt-contact-card__inner {
        grid-template-columns: 1fr 1.25fr;
        align-items: stretch;
    }
}

.tt-contact-card__info {
    display: flex;
    flex-direction: column;
    gap: var(--tt-space-4);
    justify-content: center;
}

.tt-contact-card__info h2,
.tt-contact-card__info h3 {
    padding-bottom: var(--tt-space-3);
    border-bottom: 2px solid var(--tt-color-border-light);
    margin-bottom: var(--tt-space-2);
    color: var(--tt-color-text-primary);
}

.tt-contact-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tt-contact-label {
    font-size: var(--tt-text-sm);
    font-weight: 600;
    color: var(--tt-color-text-primary);
}

.tt-contact-text {
    font-size: var(--tt-text-base);
    color: var(--tt-color-text-secondary);
    line-height: 1.6;
    text-decoration: none;
    transition: color var(--tt-transition-base);
}

a.tt-contact-text:hover {
    color: var(--tt-color-accent);
}

.tt-contact-card__map {
    width: 100%;
    height: 350px;
    border-radius: var(--tt-radius-md);
    overflow: hidden;
    border: 1px solid var(--tt-color-border-light);
    background: var(--tt-color-bg-gray);
}

.tt-contact-card__map iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.tt-contact-card__info h2 { font-size: var(--tt-h3-size); }
address.tt-contact-text { font-style: normal; }

@media (max-width: 767px) {
    .tt-contact-card__map { height: 280px; }
}

.tt-social-wrap {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--tt-space-3);
    margin-top: var(--tt-space-12);
}

.tt-social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--tt-radius-full);
    border: 1px solid var(--tt-color-border);
    background: var(--tt-color-surface);
    color: var(--tt-color-text-tertiary);
    transition: all var(--tt-transition-base);
}

.tt-social-btn:hover {
    background: var(--tt-color-accent-light);
    border-color: var(--tt-color-accent);
    color: var(--tt-color-accent);
}

.tt-social-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}


/* CTA Section */
.tt-cta-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--tt-space-6);
    max-width: 640px;
    margin-inline: auto;
}

.tt-cta-wrap h2 {
    color: var(--tt-color-text-primary);
    font-size: var(--tt-text-2xl);
    font-weight: 700;
}

.tt-cta-wrap p {
    color: var(--tt-color-text-secondary);
    font-size: var(--tt-text-lg);
    line-height: 1.6;
}


/* ==========================================================================
   SƠ ĐỒ TỔ CHỨC (chuyển từ <style> trong page-sodo.php)
   ========================================================================== */
/* ==========================================================
   CSS SƠ ĐỒ TỔ CHỨC - CLEAN & RESPONSIVE
   ========================================================== */
.tt-org-section {
    padding-block: var(--tt-space-12) var(--tt-space-16);
    background: var(--tt-color-surface);
}

.tt-org-desc {
    max-width: var(--tt-body-width);
    margin: 0 auto var(--tt-space-12) auto;
    text-align: center;
    color: var(--tt-color-text-secondary);
    font-size: var(--tt-text-lg);
    line-height: 1.6;
}

/* Khung bọc sơ đồ - Fix lỗi hiển thị và cho phép cuộn mượt */
.tt-org-tree-wrap {
    width: 100%;
    overflow-x: auto;
    padding-bottom: var(--tt-space-8);
    -webkit-overflow-scrolling: touch;
}
.tt-org-tree-wrap::-webkit-scrollbar {
    height: 6px;
}
.tt-org-tree-wrap::-webkit-scrollbar-thumb {
    background-color: var(--tt-color-border);
    border-radius: var(--tt-radius-full);
}
.tt-org-tree-wrap::-webkit-scrollbar-track {
    background-color: var(--tt-color-bg-gray);
    border-radius: var(--tt-radius-full);
}

.tt-org-tree {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: max-content; /* Đóng băng kích thước thực tế để ko bị co chữ */
    margin: 0 auto; /* Canh giữa hoàn hảo trên mọi desktop */
    padding: var(--tt-space-4) 20px;
}

.tt-org-node {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-radius: var(--tt-radius-md);
    font-family: var(--tt-font-family);
    transition: transform var(--tt-transition-base), box-shadow var(--tt-transition-base);
    position: relative;
    z-index: 2;
}
.tt-org-node:hover {
    box-shadow: var(--tt-shadow-card-hover);
}

/* Cục Ban Giám Đốc */
.tt-org-bod {
    background: var(--tt-color-accent);
    color: #ffffff;
    font-size: var(--tt-text-lg);
    font-weight: 700;
    padding: var(--tt-space-4) var(--tt-space-8);
    min-width: 280px;
    box-shadow: var(--tt-shadow-card);
    margin-bottom: 0;
}

/* Nét dọc từ BGĐ đâm xuống */
.tt-org-trunk {
    width: 2px;
    height: 30px;
    background-color: var(--tt-color-accent);
    z-index: 1;
}

/* Hệ thống xương cá kết nối */
.tt-org-branches {
    display: flex;
    justify-content: center;
    position: relative;
    padding-top: 30px;
}
.tt-org-branches::before {
    content: '';
    position: absolute;
    top: 0;
    left: calc(50% - (100% - 165px) / 2);
    right: calc(50% - (100% - 165px) / 2);
    height: 2px;
    background-color: var(--tt-color-accent);
    z-index: 1;
}

.tt-org-branch {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    padding: 0 var(--tt-space-2);
    flex: 1;
    width: 165px; /* Tăng nhẹ độ rộng để hiển thị tiếng Anh đẹp hơn */
}
.tt-org-branch::before {
    content: '';
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 30px;
    background-color: var(--tt-color-accent);
    z-index: 1;
}

/* Xử lý vệt thừa 2 đầu trục ngang */
.tt-org-branch:first-child::after,
.tt-org-branch:last-child::after {
    content: '';
    position: absolute;
    top: -30px;
    width: 50%;
    height: 2px;
    background-color: var(--tt-color-surface);
    z-index: 2;
}
.tt-org-branch:first-child::after { left: 0; }
.tt-org-branch:last-child::after { right: 0; }

/* Khối các phòng ban con */
.tt-org-dept {
    background: var(--tt-color-bg-gray);
    color: var(--tt-color-text-primary);
    border: 1px solid var(--tt-color-accent);
    font-size: var(--tt-text-sm);
    font-weight: 600;
    padding: var(--tt-space-3) var(--tt-space-2);
    width: 100%;
    height: 100%;
    box-shadow: var(--tt-shadow-card);
    line-height: 1.4;
}

/* GIAO DIỆN TRỤC DỌC CHO THIẾT BỊ DI ĐỘNG */
@media (max-width: 1024px) {
    .tt-org-branches::before,
    .tt-org-branch::before,
    .tt-org-branch:first-child::after,
    .tt-org-branch:last-child::after { display: none; }
    
    .tt-org-branches {
        flex-direction: column;
        padding-top: 0;
        gap: var(--tt-space-4);
    }
    .tt-org-branch {
        width: 100%;
        max-width: 340px;
        padding: 0;
    }
    .tt-org-trunk { height: 20px; }
    
    .tt-org-branch:not(:first-child)::before {
        display: block;
        content: '';
        position: absolute;
        top: calc(var(--tt-space-4) * -1);
        left: 50%;
        width: 2px;
        height: var(--tt-space-4);
        background-color: var(--tt-color-border-light);
    }
}
