﻿/* ==================== CONTACT HOME SECTION ==================== */
/* v3.1: real Vietnam vector map + language filter + ASHICO brand */
.contact-home-section {
    padding: 60px 0 80px;
    background: linear-gradient(180deg, #f8fbff 0%, #fff 100%);
}

/* ==================== BRANCH LEGEND ==================== */
.branch-legend {
    display: flex;
    justify-content: center;
    gap: 28px;
    margin-top: 16px;
    flex-wrap: wrap;
}
.branch-legend__item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #444;
}
.branch-legend__dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

/* ==================== TYPE BADGE IN OFFICE ITEM ==================== */
.office-item__type-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 4px;
    color: #fff;
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ==================== MAP MARKER PULSE ANIMATION ==================== */
.map-pulse {
    animation: mapPulse 2s ease-in-out infinite;
    transform-origin: center;
}
@keyframes mapPulse {
    0%   { r: 14; opacity: 0.4; }
    50%  { r: 20; opacity: 0; }
    100% { r: 14; opacity: 0.4; }
}

/* ==================== MAP MARKER HOVER & ACTIVE ==================== */
.map-marker { transition: filter 0.3s ease; cursor: pointer; }
.map-marker:hover { filter: brightness(1.25); }
.map-marker--hq:hover { filter: brightness(1.3); }
.map-marker--active { filter: brightness(1.4) drop-shadow(0 0 6px rgba(3,78,162,0.5)); }
.map-marker--active circle:first-of-type { stroke-width: 3; }

/* ==================== VIETNAM MAP CONTAINER (x2 size, RIGHT side) ==================== */
.vietnam-map-container {
    width: 700px;
    min-width: 600px;
    flex-shrink: 0;
    position: relative;
    order: 2;
}
.vietnam-map-wrap {
    position: relative;
    width: 100%;
    overflow: visible;
}
.vietnam-map-svg {
    width: 100%;
    height: auto;
    display: block;
}
.vietnam-map-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}
.vietnam-map-overlay .map-marker {
    pointer-events: all;
}
.map-label {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.map-marker--active .map-label {
    opacity: 1;
}

/* ==================== MAP POPUP (click-to-show branch info — ra 2 bên, speech-bubble tail) ==================== */
.map-popup {
    --popup-accent: #034ea2;
    position: absolute;
    z-index: 50;
    min-width: 140px;
    max-width: 200px;
    padding: 6px 18px 7px 9px;
    background: #fff;
    border-radius: 7px;
    border-left: 3px solid var(--popup-accent);
    box-shadow: 0 4px 16px rgba(3, 78, 162, 0.14), 0 1px 3px rgba(0, 0, 0, 0.05);
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    line-height: 1.3;
    color: #1a202c;
    pointer-events: all;
    animation: mapPopupFadeIn 0.16s ease-out;
}

/* LEFT variant: popup nằm BÊN TRÁI marker, đuôi speech-bubble dài sang PHẢI trỏ vào marker */
.map-popup--left {
    transform: translate(-100%, -50%);
}
.map-popup--left::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 100%;
    margin-top: -7px;
    width: 0; height: 0;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    border-left: 60px solid #fff;
    filter: drop-shadow(1px 0 1.5px rgba(0, 0, 0, 0.06));
}

/* RIGHT variant: popup nằm BÊN PHẢI marker, đuôi speech-bubble dài sang TRÁI trỏ vào marker */
.map-popup--right {
    transform: translate(0, -50%);
}
.map-popup--right::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 100%;
    margin-top: -7px;
    width: 0; height: 0;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    border-right: 60px solid #fff;
    filter: drop-shadow(-1px 0 1.5px rgba(0, 0, 0, 0.06));
}
.map-popup__close {
    position: absolute;
    top: 1px;
    right: 2px;
    background: transparent;
    border: none;
    font-size: 13px;
    line-height: 1;
    color: #cbd5e1;
    cursor: pointer;
    padding: 1px 4px;
    border-radius: 3px;
    transition: background 0.15s ease, color 0.15s ease;
}
.map-popup__close:hover { background: #f1f5f9; color: #1a202c; }
.map-popup__type {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 8px;
    color: #fff;
    font-size: 7.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 3px;
    background: #034ea2;
}
.map-popup__company {
    font-size: 7.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #94a3b8;
    margin-bottom: 0;
    line-height: 1.1;
}
.map-popup__name {
    font-size: 10px;
    font-weight: 700;
    color: #034ea2;
    word-break: break-word;
    line-height: 1.25;
}

@keyframes mapPopupFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ==================== GOOGLE MAP SECTION (Liên hệ — vị trí thực tế) ==================== */
.contact-google-map-section {
    margin-top: 36px;
    padding: 20px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 4px 18px rgba(3, 78, 162, 0.08), 0 1px 4px rgba(0, 0, 0, 0.04);
    border: 1px solid #e2e8f0;
}
.contact-google-map-section__header {
    margin-bottom: 16px;
}
.contact-google-map-section__title {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 6px 0;
    letter-spacing: 0.3px;
}
.contact-google-map-section__title i { margin-right: 8px; }
.contact-google-map-section__subtitle {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #4a5568;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}
.contact-google-map-section__subtitle i { flex-shrink: 0; }
.contact-google-map-section__frame {
    position: relative;
    width: 100%;
    height: 420px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #e2e8f0;
    background: #f1f5f9;
}
.contact-google-map-section__frame iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}
@media (max-width: 767px) {
    .contact-google-map-section { padding: 14px; margin-top: 24px; }
    .contact-google-map-section__title { font-size: 17px; }
    .contact-google-map-section__frame { height: 320px; }
}

/* ⭐ HEADER ⭐ */
.contact-home-section__header {
    text-align: center;
    margin-bottom: 30px;
}

.contact-home-section__title {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-size: 32px;
    font-weight: 700;
    text-transform: uppercase;
    margin: 0;
    position: relative;
    display: inline-block;
}

/* ⭐ WRAPPER 2 CỘT: OFFICES (TRÁI) + MAP (PHẢI) ⭐ */
.contact-home-section__wrapper {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

/* ⭐ CỘT TRÁI: DANH SÁCH CHI NHÁNH ⭐ */
.contact-home-section__offices {
    flex: 1;
    min-width: 0;
    order: 1;
}

/* ⭐ CỘT PHẢI: GOOGLE MAP CỐ ĐỊNH ⭐ */
.contact-home-section__map {
    width: 450px;
    min-width: 450px;
    flex-shrink: 0;
    position: sticky;
    top: 120px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.1);
    background: #f8f9fa;
}

.contact-home-section__map iframe {
    width: 100%;
    height: 500px;
    border: none;
    display: block;
}

/* ==================== OFFICE ITEM ==================== */
.office-item {
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: all 0.3s ease;
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
}

.office-item:last-child {
    margin-bottom: 0;
}

.office-item:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* ⭐ ACTIVE STATE - HIGHLIGHT CHI NHÁNH ĐANG CHỌN ⭐ */
.office-item.office-item--active {
    box-shadow: 0 4px 20px rgba(3, 78, 162, 0.15);
    border-left: 3px solid var(--ashico-blue, #034ea2);
}

.office-item.office-item--active .office-item__header {
    background: rgba(3, 78, 162, 0.03);
}

/* HEADER */
.office-item__header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    cursor: pointer;
    transition: background 0.2s ease;
    background: #fff;
}

.office-item__header:hover {
    background: rgba(0, 0, 0, 0.02);
}

.office-item__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    min-width: 24px;
    border-radius: 4px;
    color: #fff;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.office-item__header:hover .office-item__icon {
    transform: scale(1.1);
}

.office-item__icon i {
    font-size: 10px;
    font-weight: 700;
}

.office-item__header h4 {
    margin: 0;
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1.4;
}

/* ⭐ CONTENT - CHỈ THÔNG TIN ⭐ */
.office-item__content {
    padding: 15px 20px 20px;
    background: #fff;
    border-top: 1px solid #f0f0f0;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.office-item__content p {
    margin: 0 0 8px 0;
    font-family: 'Inter', 'Plus Jakarta Sans', sans-serif;
    font-size: 13px;
    line-height: 1.6;
    color: #444;
}

.office-item__content p:last-child {
    margin-bottom: 0;
}

.office-item__content strong {
    color: #333;
    font-weight: 600;
}

.office-item__content a {
    text-decoration: none;
    transition: all 0.2s ease;
}

.office-item__content a:hover {
    text-decoration: underline;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1600px) {
    .vietnam-map-container {
        width: 580px;
        min-width: 480px;
    }
}

@media (max-width: 1200px) {
    .vietnam-map-container {
        width: 480px;
        min-width: 380px;
    }
}

@media (max-width: 991px) {
    .contact-home-section {
        padding: 50px 0 60px;
    }

    .contact-home-section__header {
        margin-bottom: 25px;
    }

    .contact-home-section__title {
        font-size: 28px;
    }

    .contact-home-section__wrapper {
        flex-direction: column;
        gap: 30px;
    }

    .vietnam-map-container {
        width: 100%;
        max-width: 500px;
        min-width: unset;
        position: relative;
        top: unset;
        margin: 0 auto;
        order: -1;
    }

    .contact-home-section__offices {
        order: 2;
    }

    .branch-legend {
        gap: 16px;
    }
}

@media (max-width: 767px) {
    .contact-home-section {
        padding: 40px 0 50px;
    }

    .contact-home-section__header {
        margin-bottom: 20px;
    }

    .contact-home-section__title {
        font-size: 24px;
    }

    .vietnam-map-container {
        max-width: 400px;
    }

    .office-item__header {
        padding: 14px 15px;
        gap: 8px;
    }

    .office-item__icon {
        width: 22px;
        height: 22px;
        min-width: 22px;
    }

    .office-item__icon i {
        font-size: 9px;
    }

    .office-item__header h4 {
        font-size: 12px;
    }

    .office-item__content {
        padding: 12px 15px 15px;
    }

    .office-item__content p {
        font-size: 12px;
    }

    .branch-legend__item {
        font-size: 11px;
    }

    .office-item__type-badge {
        font-size: 9px;
        padding: 1px 6px;
    }
}

@media (max-width: 480px) {
    .contact-home-section__title {
        font-size: 20px;
    }

    .contact-home-section__header {
        margin-bottom: 15px;
    }

    .office-item__header h4 {
        font-size: 11px;
    }

    .office-item__content p {
        font-size: 11px;
        line-height: 1.5;
    }

    .office-item {
        margin-bottom: 10px;
    }

    .vietnam-map-container {
        max-width: 300px;
    }

    .branch-legend {
        gap: 10px;
    }
}