.hero {
    min-height: 90vh;
    display: grid;
    justify-content: center;
    align-items: center;
}

.main-content {
    text-align: center;
    margin: 12px 0;
}

.main-content p {
    opacity: 0.6;
    color: var(--text-muted);
    font-size: 1rem;
}

.worldmap {
    margin-bottom: 40px;
    align-items: center;
    width: 100%;
    background-color: #212529;
    /* border: 8px #212529; */
    text-align: center;
    position: relative;
}

.fadeIn {
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.worldmap img {
    opacity: 0.6;
    width: 100%;
    max-height: 100%;
    z-index: 10;
    display: block;
}

.map-pointer {
    opacity: 0.5;
    position: absolute;
    border-radius: 50%;
    border: 3px solid rgb(255, 255, 255);
    background-color: #141414;
    height: clamp(8px, 1.5vw, 16px);
    width: clamp(8px, 1.5vw, 16px);
    z-index: 11;
    cursor: pointer;
    transition: 0.5s ease-out;
}

.map-pointer:hover {
    opacity: 1;
    background-color: rgb(255, 255, 255);
}

.map-pointer.point {
    opacity: 1;
    background-color: rgb(255, 255, 255);
}

.info-page {
    position: absolute;
    top: 1%;
    left: 1%;
    width: 40vw;
    max-width: 500px;
    min-width: 280px;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    padding: 16px;
    z-index: 10;
    transition: 2.5s ease-in;
    pointer-events: stroke;
}

.info-page:hover {
    opacity: 0.4;
}

.info-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.modal-header {
    display: flex;
    border-left: 4px solid#141414;
    /* border-bottom: 1px solid#141414; */
    justify-content: space-between;
    align-items: center;
    padding-left: 16px;
    margin-bottom: 16px;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

.contact-section {
    display: none;
    gap: 40px;
    width: 100%;
}

.contact-section.show {
    display: block;
}

.info-item {
    display: flex;
    align-items: flex-start;
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #0056b3;
    /* 點綴左側邊框提升質感 */
}

.info-item .icon {
    width: 10%;
    font-size: 1.5rem;
    margin-right: 15px;
    line-height: 1;
}

.info-item .text strong {
    display: block;
    font-size: 0.95rem;
    color: #495057;
    margin-bottom: 4px;
    text-align: left;
}

.info-item .text span,
.info-item .text a {
    font-size: 1.1rem;
    color: #212529;
    text-decoration: none;
}

.info-item .text a:hover {
    text-decoration: underline;
    color: #0056b3;
}

/* --- 右側地圖 RWD 容器 --- */
.contact-map {
    width: 100%;
    min-height: 350px;
    /* 給手機版一個基本高度 */
}

/* 分業聯絡視窗 */
.map-container {
    width: 100%;
    height: 100%;
    min-height: 400px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.contact-tabs {
    display: flex;
    justify-content: center;
    /* 水平置中 */
    gap: clamp(40px, 5vh, 60px);
    padding: 0 20px;
    border-bottom: clamp(3px, 0.5vh, 5px) solid rgb(224, 224, 224);
    margin: clamp(5px, 1vh, 8px);
    margin-top: clamp(12px, 2vh, 20px);
}

.contact-tabs button {
    height: 100%;
    border-style: none;
    border-radius: 0px;
    font-size: 1.125rem;
    color: rgb(153, 153, 153);
    background: none;
}

.contact-tabs button:hover {
    color: #2d6caf
}

.contact-tabs .active {
    font-weight: bold;
    color: #0056b3
}

.tab-section {
    display: none;
}

.section-active {
    display: grid
}

/* ==========================================
   平板與桌機版 RWD 斷點設定 (Media Query)
   ========================================== */
@media (min-width: 768px) {

    /* 內部資訊欄位變為兩欄併排 */
    .info-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* 讓地址特別獨佔一整行（橫跨兩欄） */
    .info-item.full-width {
        grid-column: span 2;
    }
}

@media (min-width: 1024px) {

    /* 桌機版：大架構變成「左資訊 1.2 份 : 右地圖 1 份」的黃金比例 */
    .hero{
        min-height: 90vh;
    }
    .contact-section {
        grid-template-columns: 1.2fr 1fr;
        gap: 60px;
        align-items: start;
    }

    /* 桌機版讓地圖高度自動填滿右側，與左側資訊等高 */
    .contact-map {
        height: 100%;
    }

    .map-container {
        position: sticky;
        top: 20px;
        /* 捲動時地圖可以優雅地固定在頂部 */
        height: 500px;
        /* 固定一個好看的桌機高度 */
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 60px;
    }

    .worldmap img {
        display: none;
    }

    .info-page {
        position: relative;
        width: 100%;
    }

    .contact-section {
        margin-top: 36px;
    }

    .contact-info {
        width: 100%;
        word-break: normal;
    }

    .mobile {
        display: block;
    }

    .PC {
        display: none;
    }
}