/* ===========================
   敬誠居家長照機構 - 主樣式
   色彩：玫瑰粉 #c4857a / 深玫 #a06560 / 淺粉底 #fdf5f4
   =========================== */

/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: 'Noto Sans TC', 'Microsoft JhengHei', sans-serif;
    color: #333;
    background: #fff;
    line-height: 1.7;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* === Variables === */
:root {
    --rose:      #c4857a;
    --rose-dark: #a06560;
    --rose-light:#e8b5ae;
    --bg-light:  #fdf5f4;
    --bg-pink:   #f5ddd9;
    --text:      #333;
    --text-light:#666;
    --white:     #fff;
    --radius:    8px;
    --shadow:    0 2px 12px rgba(0,0,0,.08);
}

/* === Layout === */
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.section    { padding: 60px 0; }
.section--bg { background: var(--bg-light); }

/* === Buttons === */
.btn {
    display: inline-block;
    padding: 12px 32px;
    border-radius: 4px;
    font-size: .95rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, color .2s;
    border: none;
}
.btn--primary { background: var(--rose); color: #fff; }
.btn--primary:hover { background: var(--rose-dark); }
.btn--outline { background: transparent; border: 2px solid var(--rose); color: var(--rose); }
.btn--outline:hover { background: var(--rose); color: #fff; }

/* === Section Title === */
.section-title {
    text-align: center;
    margin-bottom: 40px;
}
.section-title h2 {
    display: inline-block;
    background: var(--rose);
    color: #fff;
    padding: 10px 48px;
    border-radius: 4px;
    font-size: 1.4rem;
    letter-spacing: .1em;
}
.section-title p { color: var(--text-light); margin-top: 10px; font-size: .9rem; }

/* 左側裝飾線標題 */
.side-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--rose);
    padding-left: 14px;
    border-left: 5px solid var(--rose);
    margin-bottom: 24px;
}

/* === Page Banner === */
.page-banner {
    position: relative;
    height: 200px;
    background: center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.page-banner::after {
    content: '';
    position: absolute; inset: 0;
    background: rgba(196,133,122,.35);
}
.page-banner__title {
    position: relative; z-index: 1;
    background: rgba(196,133,122,.7);
    color: #fff;
    font-size: 1.6rem;
    font-weight: 700;
    padding: 12px 48px;
    border-radius: 50px;
    letter-spacing: .15em;
}

/* === Header === */
.site-header {
    position: sticky; top: 0; z-index: 1000;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    height: 70px;
}
.site-logo img { height: 52px; width: auto; }

.main-nav { margin-left: auto; }
.nav-list  { display: flex; gap: 4px; align-items: center; }
.nav-list > li { position: relative; }
.nav-list > li > a {
    display: block;
    padding: 6px 10px;
    font-size: .88rem;
    font-weight: 500;
    color: #444;
    border-radius: 4px;
    white-space: nowrap;
    transition: color .2s;
}
.nav-list > li > a:hover,
.nav-list > li > a.active { color: var(--rose); }

/* Dropdown */
.dropdown {
    display: none;
    position: absolute; top: 100%; left: 0;
    background: #fff;
    border-top: 3px solid var(--rose);
    box-shadow: var(--shadow);
    min-width: 150px;
    z-index: 100;
}
.dropdown li a {
    display: block;
    padding: 10px 16px;
    font-size: .88rem;
    color: #444;
    border-bottom: 1px solid #f0e8e7;
    transition: background .2s, color .2s;
}
.dropdown li a:hover { background: var(--bg-light); color: var(--rose); }
.has-dropdown:hover .dropdown { display: block; }

.arrow { font-size: .7rem; }

/* Hamburger */
.nav-toggle {
    display: none;
    background: none; border: none;
    font-size: 1.6rem;
    color: var(--rose);
    cursor: pointer;
    margin-left: auto;
}

/* === Side Buttons === */
.side-btns {
    position: fixed;
    right: 0; top: 50%;
    transform: translateY(-50%);
    z-index: 900;
    display: flex; flex-direction: column; gap: 4px;
}
.side-btn {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    width: 54px; min-height: 54px;
    background: var(--rose);
    color: #fff;
    font-size: .68rem;
    text-align: center;
    line-height: 1.3;
    padding: 6px 4px;
    transition: background .2s;
}
.side-btn:hover { background: var(--rose-dark); }
.side-btn--line  { background: #06c755; }
.side-btn--line:hover { background: #05a847; }
.side-btn--phone { background: var(--rose-dark); font-size: 1.2rem; }

/* === Footer === */
.site-footer { background: var(--rose); color: #fff; padding: 48px 0 0; }
.footer-inner {
    display: flex; gap: 40px; flex-wrap: wrap;
    padding-bottom: 32px;
}
.footer-brand { flex: 1; min-width: 260px; }
.footer-logo  { height: 60px; margin-bottom: 12px; }
.footer-company { font-weight: 700; margin-bottom: 8px; }
.footer-brand p { font-size: .88rem; line-height: 1.9; opacity: .9; }
.footer-desc { margin-top: 8px; }

.footer-nav {
    display: flex; gap: 40px; flex-wrap: wrap;
    align-items: flex-start; margin-top: 8px;
}
.footer-nav ul { display: flex; flex-direction: column; gap: 10px; }
.footer-nav a {
    font-size: .88rem;
    opacity: .85;
    transition: opacity .2s;
}
.footer-nav a:hover { opacity: 1; }

.footer-bottom {
    background: var(--rose-dark);
    text-align: center;
    padding: 12px;
    font-size: .82rem;
    opacity: .85;
}

/* === Card Grid === */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}
.card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 6px 20px rgba(0,0,0,.12); }
.card__img { width: 100%; height: 200px; object-fit: cover; }
.card__body { padding: 20px; }
.card__date { font-size: .8rem; color: var(--text-light); margin-bottom: 6px; }
.card__title {
    font-size: 1rem; font-weight: 700;
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
    margin-bottom: 8px;
}
.card__excerpt { font-size: .88rem; color: var(--text-light); line-height: 1.6; }

/* Service card (image overlay) */
.service-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
}
.service-card img { width: 100%; height: 180px; object-fit: cover; }
.service-card__label {
    position: absolute; inset: 0;
    background: rgba(0,0,0,.4);
    color: #fff;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    font-weight: 700;
    text-align: center;
    padding: 12px;
    transition: background .2s;
}
.service-card:hover .service-card__label { background: rgba(196,133,122,.7); }
.service-card__code { font-size: .85rem; opacity: .85; }
.service-card__name { font-size: 1rem; margin-top: 4px; }

/* === Pagination === */
.pagination {
    display: flex; justify-content: center;
    gap: 6px; margin-top: 40px;
}
.pagination a, .pagination span {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px;
    border-radius: 4px;
    font-size: .9rem;
    border: 1px solid #ddd;
    color: #555;
    transition: background .2s, color .2s;
}
.pagination a:hover, .pagination .active {
    background: var(--rose); color: #fff; border-color: var(--rose);
}

/* === Forms === */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: .9rem; font-weight: 500; margin-bottom: 6px; }
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: .95rem;
    font-family: inherit;
    transition: border-color .2s;
}
.form-group input:focus,
.form-group textarea:focus { outline: none; border-color: var(--rose); }
.form-group textarea { resize: vertical; min-height: 120px; }
.required-mark { color: var(--rose); }

/* === Table === */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .92rem;
}
.data-table th, .data-table td {
    padding: 12px 16px;
    text-align: center;
    border: 1px solid #e0d6d4;
}
.data-table thead th {
    background: var(--rose);
    color: #fff;
    font-weight: 700;
}
.data-table tbody tr:nth-child(even) { background: var(--bg-light); }

/* === FAQ === */
.faq-item { border-bottom: 1px solid #e8ddd9; }
.faq-question {
    display: flex; justify-content: space-between; align-items: center;
    padding: 18px 0;
    font-weight: 700;
    cursor: pointer;
    gap: 16px;
}
.faq-question .q-mark {
    color: var(--rose); font-size: 1.1rem; min-width: 24px;
}
.faq-question .toggle { color: var(--rose); font-size: 1.2rem; transition: transform .2s; }
.faq-question.open .toggle { transform: rotate(45deg); }
.faq-answer {
    display: none;
    padding: 0 0 18px 36px;
    color: var(--text-light);
    line-height: 1.8;
}

/* === Hero (首頁) === */
.hero {
    position: relative;
    min-height: 420px;
    background: center/cover no-repeat;
    display: flex; align-items: center;
    overflow: hidden;
}
.hero__overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to right, rgba(0,0,0,.45) 0%, rgba(0,0,0,.1) 60%, transparent 100%);
}
.hero__content {
    position: relative; z-index: 1;
    color: #fff;
    padding: 60px 0;
    max-width: 520px;
}
.hero__content h1 { font-size: 2rem; line-height: 1.4; margin-bottom: 20px; }
.hero__content .hero__sub { font-size: 1.1rem; margin-bottom: 28px; }

/* Subsidy Table section */
.subsidy-section { padding: 48px 0; }
.subsidy-section h2 { text-align: center; color: var(--rose); font-size: 1.3rem; margin-bottom: 8px; }
.subsidy-section .sub-note { text-align: center; font-size: .85rem; color: var(--text-light); margin-bottom: 24px; }

/* ===========================
   首頁 Banner Slider
   =========================== */
.banner-slider {
    position: relative;
    overflow: hidden;
    background: #222;
}
.banner-track {
    display: flex;
    transition: transform .6s cubic-bezier(.25,.46,.45,.94);
}
.banner-slide {
    flex: 0 0 100%;
    width: 100%;
    position: relative;
}
.banner-slide img {
    width: 100%;
    height: auto;
    display: block;
}

.banner-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 44px; height: 44px; border-radius: 50%;
    background: rgba(255,255,255,.22); border: 2px solid rgba(255,255,255,.4);
    color: #fff; font-size: 1.1rem;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; z-index: 10;
    transition: background .2s;
}
.banner-arrow:hover { background: rgba(196,133,122,.8); border-color: transparent; }
.banner-arrow--prev { left: 18px; }
.banner-arrow--next { right: 18px; }

.banner-dots {
    position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 8px; z-index: 10;
}
.bdot {
    width: 10px; height: 10px; border-radius: 50%;
    background: rgba(255,255,255,.4);
    border: none; padding: 0; cursor: pointer;
    transition: background .25s;
}
.bdot--active { background: #fff; }

/* ===========================
   首頁 介紹 + 4 圖示
   =========================== */
.home-icons {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 36px;
    flex-wrap: wrap;
}
.home-icon-item { text-align: center; }
.home-icon-img { font-size: 2.4rem; }
.home-icon-item p { font-size: .9rem; margin-top: 8px; color: var(--text-light); }

/* ===========================
   服務特色 (checkmarks + photo)
   =========================== */
.feature-inner {
    display: flex;
    gap: 56px;
    align-items: center;
}
.feature-list { flex: 1; }
.feature-photo { flex: 1; }
.feature-photo img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); }

.check-list { list-style: none; }
.check-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f0e4e2;
    font-size: .97rem;
    color: #444;
}
.check-list li:last-child { border-bottom: none; }
.ck {
    flex: none;
    width: 28px; height: 28px;
    background: #2bb77c;
    color: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: .85rem;
    font-weight: 700;
}

/* ===========================
   居家照顧服務 靜態 12 卡片
   =========================== */
.home-svc-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}
.home-svc-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    text-align: center;
    transition: transform .2s, box-shadow .2s;
}
.home-svc-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0,0,0,.13);
}
.home-svc-card img {
    width: 100%;
    height: 150px;
    object-fit: contain;
    background: var(--bg-light);
    padding: 14px;
    display: block;
}
.home-svc-body { padding: 12px 12px 16px; }
.home-svc-body h3 {
    font-size: .97rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
}
.home-svc-body p {
    font-size: .8rem;
    color: var(--text-light);
    line-height: 1.55;
    margin: 0;
}

/* ===========================
   喘息服務 全寬深色區
   =========================== */
.respite-dark-section {
    position: relative;
    background: center/cover no-repeat;
    min-height: 200px;
}
.respite-dark-overlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,.55);
}

/* ===========================
   長照 3.0 (橫排 4 項)
   =========================== */
.long30-row {
    display: flex;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
}
.long30-box {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: .95rem;
    color: #444;
}
.long30-ck {
    flex: none;
    width: 30px; height: 30px;
    background: var(--rose);
    color: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: .9rem;
    font-weight: 700;
}

/* === Responsive === */
@media (max-width: 900px) {
    .nav-toggle { display: block; }
    .main-nav {
        display: none;
        position: absolute; top: 70px; left: 0; right: 0;
        background: #fff;
        box-shadow: 0 4px 12px rgba(0,0,0,.1);
        z-index: 999;
        margin: 0;
    }
    .main-nav.open { display: block; }
    .nav-list { flex-direction: column; gap: 0; padding: 8px 0; }
    .nav-list > li > a { padding: 12px 20px; border-radius: 0; font-size: .95rem; }
    .dropdown { display: none !important; position: static; box-shadow: none; border-top: none; padding-left: 16px; background: var(--bg-light); }
    .has-dropdown.open .dropdown { display: block !important; }
    .header-inner { position: relative; }

    .hero__content h1 { font-size: 1.5rem; }
    .card-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
    .footer-inner { flex-direction: column; gap: 24px; }

    /* 首頁 slider — 維持等比例，不另設固定高 */

    /* 首頁 sections */
    .feature-inner { flex-direction: column; gap: 28px; }
    .home-svc-grid { grid-template-columns: repeat(3, 1fr); }
    .long30-row { gap: 20px; }
}

@media (max-width: 600px) {
    .section { padding: 40px 0; }
    .page-banner { height: 140px; }
    .page-banner__title { font-size: 1.2rem; padding: 10px 28px; }
    .hero { min-height: 300px; }
    .side-btns { display: none; }

    .banner-arrow { width: 36px; height: 36px; font-size: .95rem; }

    .home-svc-grid { grid-template-columns: repeat(2, 1fr); }
    .home-svc-card img { height: 120px; }
    .long30-row { flex-direction: column; align-items: center; }
}
