.main-header .navbar {
    -webkit-transition: margin-left 0.3s ease-in-out;
    -o-transition: margin-left 0.3s ease-in-out;
    transition: margin-left 0.3s ease-in-out;
    margin-bottom: 0;
    border: none;
    min-height: 50px;
    /* 讓導覽列隨標題換行自適應增高，避免絕對定位標題溢出底部 */
    display: flex;
    align-items: center;
}

.header-banner {
    position: relative;
}

.header-map-btn {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none !important;
    width: 88px;
    height: 88px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.header-map-btn img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@media (max-width: 360px) {
    .header-map-btn {
        width: 72px;
        height: 72px;
        right: 0.5rem;
    }
}

@media (min-width: 768px) {
    .header-map-btn {
        width: 110px;
        height: 110px;
        right: 1rem;
    }
}

/* 語言切換按鈕（繁 / PT） */
.lang-switch-wrapper {
    display: flex;
    justify-content: flex-end;
    padding: 0 0.5rem 0.75rem 0.25rem;
}

.lang-switch {
    display: inline-flex;
    border-radius: 999px;
    overflow: hidden;
    background-color: #d9d9d9;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08);
}

.lang-switch button {
    border: none;
    background: transparent;
    color: #666;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1;
    padding: 0.5rem 1rem;
    min-width: 56px;
    min-height: 36px;
    cursor: pointer;
    transition: background-color 0.25s ease, color 0.25s ease;
    outline: none;
}

.lang-switch button.active,
.lang-switch button[aria-pressed="true"] {
    background-color: #7bc45f;
    color: #fff;
    border-radius: 999px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.lang-switch button:not(.active):hover,
.lang-switch button:not([aria-pressed="true"]):hover {
    color: #333;
}

@media (max-width: 360px) {
    .lang-switch button {
        min-width: 48px;
        padding: 0.45rem 0.75rem;
        font-size: 0.95rem;
    }
}

@media (min-width: 768px) {
    .lang-switch button {
        min-width: 64px;
        padding: 0.55rem 1.15rem;
        font-size: 1.05rem;
    }
}

.footer-content {
    text-align: center;
}

.footer-content .logo {
    height: 44px;
}

.app-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.75rem 0.4rem 1.25rem;
    background-color: #FFE7BB;
    border-radius: 20px;
    box-shadow: none !important;
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: transform 0.25s ease, box-shadow 0.3s ease, background 0.2s ease;
    cursor: pointer;
    text-decoration: none !important;
    color: #1e293b !important;
    height: 100%;
    min-height: 150px;
    position: relative;
    overflow: hidden;
}

.app-btn .app-icon {
    font-size: 3rem;
    width: 68px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    margin-bottom: 0.75rem;
    color: #fff;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.app-btn .app-name {
    font-size: clamp(1.05rem, 4.4vw, 1.35rem);
    font-weight: 600;
    letter-spacing: 0.01em;
    color: #1e293b;
    line-height: 1.35;
    text-align: center;
    white-space: normal;      /* 葡文較長時自動換行 */
    word-break: break-word;   /* 單字過長時允許斷行 */
    overflow-wrap: break-word;
    display: block;           /* 撐滿卡片寬度，讓換行與置中一致 */
    width: 100%;
    flex-shrink: 0;
}

/* 極窄螢幕（如 360px 以下）再微降字級，避免葡文過度換行 */
@media (max-width: 360px) {
    .app-btn .app-name {
        font-size: clamp(0.95rem, 4.0vw, 1.15rem);
        line-height: 1.3;
    }
}

.map {
    padding-top: 3.5rem;
    padding-bottom: 1rem;
    min-height: 80px;
    height: auto;
}

.btn-map {
    position: absolute;
    bottom: -3.5rem;
    left: 50%;
    top: auto;
    transform: translateX(-50%);
    height: 150px;
}

.btn-map img{
    width: 150px;
    /*height: 150px;*/
}

.navbar .nav-left {
    /* 脫離文件流：不再佔用導覽列寬度，避免標題被推向右側而與葡文顯示不一致 */
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    padding-left: 0.5rem;
    min-width: 30px;
}

.navbar .nav-left .btn-back{
    color: #ffffff;
    text-decoration: none;
    font-size: 1.6rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    min-height: 48px;
    padding: .25rem .5rem;
}

.navbar .nav-title {
    /* 佔滿導覽列整寬並以視窗為準水平置中；返回鈕已絕對定位，故不影響中 / 葡對齊 */
    flex: 0 0 100%;
    width: 100%;
    box-sizing: border-box;
    /* 左右對稱預留返回鈕寬度：長葡文不貼邊 / 不重疊，且兩語言皆視窗置中 */
    padding: 0.5rem 10px 0.5rem 40px;
    margin: 0 auto;
    text-align: center;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;        /* 兩語言皆最多兩行，過長葡文截斷並顯示省略號 */
    overflow: hidden;
    font-size: 1.25rem;           /* 中 / 葡一致字級，不隨語言縮小 */
    font-weight: 600;
    letter-spacing: 0.3px;
    line-height: 1.25;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
    color: #ffffff;
}

.nav-item {
    margin-bottom: 1rem;
}

.nav-item a {
    padding: 1rem .75rem;
    min-height: 58px;
    display: flex;
    align-items: center;
    font-size: 1.15rem;
    border-radius: 1.35rem;
}

.summary .btn-seagreen {
    padding: 1rem 0;
    min-height: 58px;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 1.35rem;
}

.blockquote {
    margin-top: .5rem;
}

.blockquote p {
    border-left: .3rem solid #00783B;
    padding-left: 1.15rem;
    font-size: 1.3rem;
    font-weight: bold;
    line-height: 1.5;
    /* 葡文頁名過長時自動換行，避免水平溢出破壞版面 */
    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* 極窄螢幕：進一步縮小導覽標題字級與內邊距，保留兩行顯示空間 */
@media (max-width: 360px) {
    .navbar .nav-title {
        font-size: 1.1rem;
        line-height: 1.2;
        padding: 0.4rem 64px;
        letter-spacing: 0;
    }
    .blockquote p {
        font-size: 1.15rem;
    }
}

.unit-row {
    margin-bottom: 1.25rem;
}

.unit-row .unit-title {
    background-color: #FFE7BB;
    -ms-flex: 0 0 41.666667%;
    flex: 0 0 41.666667%;
    max-width: 41.666667%;
    text-align: center;
    border-top-left-radius: 1rem;
    border-bottom-left-radius: 1rem;
}

.unit-row a.unit-title:hover {
    color: initial;
    text-decoration: none;
}

.unit-row .unit-title .input-group-text {
    white-space: initial; 
    background-color: transparent;
    border: none;
}

.unit-row .unit-title a:active,
.unit-row .unit-title a:hover {
    color: initial;
    text-decoration:none
}

.unit-row .unit-text {
    padding-left: .6rem;
    padding-right: .6rem;
    padding-top: .6rem;
    padding-bottom: .6rem;
    font-size: 1rem;
    line-height: 1.7;
    background-color: #fff;
    border-radius: 1rem;
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    border: 1px solid #FFE7BB;
}

.unit-row .unit-title-area {
    background-color: #FFE7BB;
    -ms-flex: 0 0 100%;
    flex: 0 0 100%;
    max-width: 100%;
    text-align: center;
    border-radius: 1rem;
}

.unit-row a.unit-title-area:hover {
    color: initial;
    text-decoration: none;
}

.unit-row .unit-title-area .input-group-text {
    white-space: initial; 
    background-color: transparent;
    border: none;
}

.unit-row .unit-title-area a:active,
.unit-row .unit-title-area a:hover {
    color: initial;
    text-decoration:none
}

/* 單位列表表頭（單位 / 區域）：與下方 unit-row 欄位對齊 */
.unit-row-head {
    margin-bottom: .6rem;
}

.unit-row-head .unit-head {
    text-align: center;
    font-weight: 700;
    font-size: 0.95rem;
    color: #2E5A7A;
    background-color: rgba(46, 90, 122, 0.10);
    /*border-radius: 1rem;*/
    padding: .45rem 0;
    line-height: 1.4;
}

.unit-row-head .unit-title-head {
    -ms-flex: 0 0 41.666667%;
    flex: 0 0 41.666667%;
    max-width: 41.666667%;
}

.unit-row-head .unit-text-head {
    -ms-flex: 1 1 0%;
    flex: 1 1 0%;
    width: 1%;
    margin-left: -1px;
}

.unit-row-head .unit-title-area-head {
    -ms-flex: 0 0 100%;
    flex: 0 0 100%;
    max-width: 100%;
}

.list-group-unbordered > .list-group-item {
    border-left: 0;
    border-radius: 0;
    border-right: 0;
    padding-left: 0;
    padding-right: 0;
}

.list-group-unbordered > .list-group-item:first-child {
    border-top: 0;
}

.contact-row > .contact-title,
.contact-row > .contact-text {
    padding-top: .45rem;
    padding-bottom: .45rem;
}

.contact-title {
    font-weight: bold;
    font-size: 1rem;
    border-bottom: 2px solid #2C905E;
}

.contact-text {
    padding-left: .75rem;
    padding-top: .65rem;
    padding-bottom: .65rem;
    font-size: 1rem;
    line-height: 1.7;
    color: #6C6C6C;
    border-bottom: 1px solid #D8D8D8;
}