/* ============================================================
   全域
   ============================================================ */
html {
    font-size: 14px;
}
@media (min-width: 768px) {
    html { font-size: 16px; }
}
body {
    margin: 0;
    background: #f0f2f5;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
main[role="main"] {
    flex: 1;
}
.btn:focus, .btn:active:focus, .form-control:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #1a56a5;
}

/* ============================================================
   Header 橫幅
   ============================================================ */
.site-header {
    background: linear-gradient(135deg, #1955a0 0%, #0c8f82 100%);
    padding: 16px 0 0;
}
.site-brand {
    padding-bottom: 4px;
}
.brand-title {
    color: #ffffff;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.3;
}
.brand-subtitle {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.72rem;
    letter-spacing: 0.01em;
}
.section-label {
    color: rgba(255, 255, 255, 0.92);
    font-size: 1rem;
    padding: 10px 0 14px;
}

/* ============================================================
   搜尋框
   ============================================================ */
.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.search-icon {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 2;
}
.search-input {
    border: none;
    border-radius: 20px;
    padding: 6px 14px 6px 32px;
    width: 200px;
    font-size: 0.9rem;
    outline: none;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
}
.search-input:focus {
    background: #fff;
    box-shadow: 0 0 0 2px rgba(255,255,255,0.5);
}
.search-input::placeholder {
    color: #aaa;
}
.search-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.14);
    width: 320px;
    z-index: 1050;
    overflow: hidden;
}
.search-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    text-decoration: none;
    color: #333;
    font-size: 0.9rem;
    border-bottom: 1px solid #f2f2f2;
    transition: background 0.1s;
}
.search-result-item:last-child {
    border-bottom: none;
}
.search-result-item:hover {
    background: #f0f4ff;
    color: #1a56a5;
}
.search-arrow {
    color: #bbb;
    font-size: 1.1rem;
}

/* ============================================================
   Category Tab 導覽列
   ============================================================ */
.category-nav {
    background: #ffffff;
    border-bottom: 2px solid #e5e8ed;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}
.category-nav::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}
.category-nav .nav {
    flex-wrap: nowrap;
    padding: 4px 0;
}
.category-nav .nav-link {
    color: #555;
    padding: 10px 22px;
    border-radius: 4px;
    font-size: 0.95rem;
    border: none;
    background: none;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
    cursor: pointer;
}
.category-nav .nav-link:hover:not(.active) {
    background: #e8f0fe;
    color: #1a56a5;
}
.category-nav .nav-link.active {
    background: #1a56a5;
    color: #ffffff;
    font-weight: 600;
}

/* ============================================================
   Service 卡片
   ============================================================ */
.service-card-link {
    text-decoration: none;
    display: block;
    height: 100%;
}
.service-card-link.no-url {
    cursor: default;
}
.service-card {
    background: #f4f5f8;
    border: 1px solid #e4e6ea;
    border-radius: 10px;
    text-align: center;
    padding: 14px 12px 14px;
    height: 100%;
    transition: background 0.18s ease, border-color 0.18s ease,
                transform 0.18s ease, box-shadow 0.18s ease;
}
.service-card-link:not(.no-url):hover .service-card {
    background: #dde8f8;
    border-color: #1a56a5;
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(26, 86, 165, 0.13);
}
.service-card .card-icon {
    width: 200px;
    height: 200px;
    object-fit: contain;
    margin: 0 auto 14px;
    display: block;
}
.service-card .icon-placeholder {
    width: 200px;
    height: 200px;
    background: #d8dde5;
    border-radius: 10px;
    margin: 0 auto 14px;
}
.service-card p {
    font-size: 1.15rem;
    color: #2c3345;
    margin: 0;
    line-height: 1.5;
    font-weight: 500;
}
.service-card-link:not(.no-url):hover .service-card p {
    color: #1a56a5;
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
    background: #1a2035;
    color: #b8bcc8;
    padding: 40px 0 30px;
    margin-top: 24px;
    font-size: 0.9rem;
}
.footer-heading {
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 18px;
}
.footer-line {
    margin-bottom: 10px;
    line-height: 1.8;
}
.footer-icon {
    margin-right: 8px;
    color: #7a8aaa;
}
.footer-link {
    color: #5da8e0;
    text-decoration: none;
}
.footer-link:hover {
    color: #88c4f0;
    text-decoration: underline;
}
.text-muted-light {
    color: #7a8aaa;
    font-size: 0.85rem;
}
.btn-footer {
    border: 1px solid #4a5568;
    color: #cdd5e0;
    border-radius: 4px;
    font-size: 0.8rem;
    padding: 2px 10px;
    line-height: 1.6;
    background: transparent;
    text-decoration: none;
}
.btn-footer:hover {
    background: #2d3a55;
    color: #fff;
    border-color: #6a7a9a;
}
.footer-qr {
    width: 110px;
    height: 110px;
    background: #fff;
    padding: 6px;
    border-radius: 6px;
    display: block;
    margin-left: auto;
    margin-bottom: 8px;
}
.footer-qr:hover {
    opacity: 0.9;
}
.footer-copy {
    color: #5a6480;
    font-size: 0.82rem;
    margin-top: 4px;
}
