/* ===== CSS Variables (injected by build.js) ===== */
:root {
    --color-primary: #7C3AED;
    --color-secondary: #F59E0B;
    --color-accent: #10B981;
    --color-danger: #EF4444;
    --bg-base: #F8F7F4;
    --bg-card: #FFFFFF;
    --bg-section-alt: #F0EFEB;
    --text-primary: #333333;
    --text-secondary: #555555;
    --text-muted: #888888;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --radius: 10px;
    --font-heading: 'Noto Sans TC', sans-serif;
    --font-body: 'Noto Sans TC', sans-serif;
}

/* ===== Reset & Base ===== */
html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    line-height: 1.7;
    background-color: var(--bg-base);
    color: var(--text-primary);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-primary);
}

p { color: var(--text-secondary); }
a { color: var(--color-primary); transition: color 0.2s; }
a:hover { color: var(--color-secondary); }

img {
    max-width: 100%;
    height: auto;
}

/* ===== Sections ===== */
section {
    padding: 80px 0;
}

section.alt {
    background-color: var(--bg-section-alt);
}

.section-title {
    margin-bottom: 12px;
}

.section-subtitle {
    color: var(--text-muted);
    margin-bottom: 48px;
}

/* ===== Buttons ===== */
.btn {
    border-radius: var(--radius);
    padding: 10px 28px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background-color 0.2s, box-shadow 0.2s;
    border: none;
}

.btn:hover {
    box-shadow: var(--shadow-md);
}

.btn-primary {
    background-color: var(--color-primary);
    color: #fff;
}

.btn-primary:hover {
    background-color: color-mix(in srgb, var(--color-primary) 85%, black);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
}

.btn-outline:hover {
    background-color: var(--color-primary);
    color: #fff;
}

.btn-secondary {
    background-color: var(--color-secondary);
    color: #fff;
}

.btn-lg {
    padding: 14px 36px;
    font-size: 1.05rem;
}

/* ===== Navbar ===== */
.navbar {
    background-color: rgba(248, 247, 244, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: none;
    padding: 12px 0;
    transition: box-shadow 0.3s;
    z-index: 1030;
}

.navbar.scrolled {
    box-shadow: 0 1px 8px rgba(0,0,0,0.06);
}

.navbar-brand {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary) !important;
}

.navbar-nav .nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    padding: 8px 16px;
    font-size: 0.95rem;
}

.navbar-nav .nav-link:hover {
    color: var(--color-primary) !important;
}

.navbar-toggler {
    border: 1px solid #ddd;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(51,51,51,0.8)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Dropdown */
.dropdown-menu {
    background-color: var(--bg-card);
    border: 1px solid #eee;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 8px 0;
}

.dropdown-item {
    color: var(--text-secondary);
    padding: 8px 20px;
    font-size: 0.9rem;
    position: relative;
}

.dropdown-submenu > .dropdown-toggle {
    padding-right: 32px;
}

.dropdown-item:hover {
    background-color: var(--bg-section-alt);
    color: var(--color-primary);
}

/* Submenu */
.dropdown-submenu { position: relative; }

.dropdown-submenu .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -8px;
}

.dropdown-submenu:hover > .dropdown-menu { display: block; }

.dropdown-submenu > .dropdown-toggle::after {
    transform: rotate(-90deg);
    position: absolute;
    right: 12px;
    top: 50%;
    margin-top: -4px;
}

/* Phone button in navbar */
.btn-phone {
    background-color: var(--color-primary);
    color: #fff !important;
    border-radius: 50px;
    padding: 8px 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.btn-phone:hover {
    background-color: color-mix(in srgb, var(--color-primary) 85%, black);
    color: #fff !important;
}

/* ===== Hero Section ===== */
.hero-section {
    padding: 140px 0 80px;
    background-color: var(--bg-base);
}

.hero-section h1 {
    font-size: 2.8rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 16px;
}

.hero-section h1 .highlight {
    color: var(--color-primary);
}

.hero-section .lead {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 32px;
}

.hero-tags {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-section-alt);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.hero-tag i { color: var(--color-primary); }

.hero-image img {
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}

/* ===== Feature Cards ===== */
.feature-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 32px 24px;
    box-shadow: var(--shadow-sm);
    text-align: center;
    height: 100%;
}

.feature-card .icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 16px;
    background: color-mix(in srgb, var(--color-primary) 10%, transparent);
    color: var(--color-primary);
}

.feature-card h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0;
}

/* ===== Service Cards ===== */
.service-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 32px 24px;
    box-shadow: var(--shadow-sm);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.service-card .service-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.service-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.service-card ul {
    list-style: none;
    padding: 0;
    margin-bottom: 20px;
    flex-grow: 1;
}

.service-card ul li {
    padding: 4px 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.service-card ul li i {
    color: var(--color-accent);
    margin-right: 8px;
    font-size: 0.8rem;
}

/* ===== Service Detail Cards (sub pages) ===== */
.service-detail-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 28px 24px;
    box-shadow: var(--shadow-sm);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.service-detail-card .service-icon {
    margin-bottom: 16px;
}

.service-detail-card .service-icon i {
    font-size: 2rem;
}

.service-detail-card h5 {
    font-size: 1.05rem;
    margin-bottom: 8px;
}

.service-detail-card p {
    font-size: 0.88rem;
    color: var(--text-muted);
}

.service-detail-card ul {
    list-style: none;
    padding: 0;
    margin-bottom: 16px;
    flex-grow: 1;
}

.service-detail-card ul li {
    padding: 3px 0;
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.service-detail-card ul li i {
    color: var(--color-accent);
    margin-right: 6px;
}

.price-info {
    margin-bottom: 16px;
}

.price-info .badge {
    font-size: 0.78rem;
    padding: 5px 10px;
    border-radius: 50px;
    font-weight: 500;
}

/* ===== About Section ===== */
.about-section img {
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}

.stat-item h3 {
    font-size: 2rem;
    color: var(--color-primary);
    margin-bottom: 4px;
}

.stat-item p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ===== Contact Section ===== */
.contact-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 32px 24px;
    box-shadow: var(--shadow-sm);
    text-align: center;
    height: 100%;
}

.contact-card .icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 16px;
    background: color-mix(in srgb, var(--color-primary) 10%, transparent);
    color: var(--color-primary);
}

.contact-card h5 {
    font-size: 1rem;
    margin-bottom: 8px;
}

.contact-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0;
}

.contact-card a {
    color: var(--text-muted);
    text-decoration: none;
}

.contact-card a:hover {
    color: var(--color-primary);
}

.map-container {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-top: 40px;
}

.map-container iframe {
    width: 100%;
    height: 380px;
    border: none;
}

/* ===== Breadcrumb ===== */
.breadcrumb-section {
    padding: 16px 0;
    background: var(--bg-section-alt);
}

.breadcrumb-item a {
    color: var(--color-primary);
    text-decoration: none;
}

.breadcrumb-item.active {
    color: var(--text-muted);
}

/* ===== Service Hero (sub pages) ===== */
.service-hero {
    background-color: var(--color-primary);
    color: #fff;
    padding: 60px 0;
}

.service-hero h1 {
    color: #fff;
    font-size: 2.2rem;
}

.service-hero .lead {
    color: rgba(255,255,255,0.85);
}

.service-hero .hero-tag {
    background: rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.9);
}

.service-hero .hero-tag i {
    color: var(--color-secondary);
}

/* ===== FAQ / Accordion ===== */
.accordion-item {
    background: var(--bg-card);
    border: 1px solid #eee;
    border-radius: var(--radius) !important;
    margin-bottom: 8px;
    overflow: hidden;
}

.accordion-button {
    background: var(--bg-card);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: none !important;
}

.accordion-button:not(.collapsed) {
    background: color-mix(in srgb, var(--color-primary) 8%, white);
    color: var(--color-primary);
}

.accordion-body {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ===== CTA Section ===== */
.cta-section {
    background-color: var(--color-primary);
    color: #fff;
    padding: 60px 0;
    text-align: center;
}

.cta-section h2 { color: #fff; }
.cta-section p { color: rgba(255,255,255,0.85); }

.cta-section .btn-light {
    background: #fff;
    color: var(--color-primary);
    font-weight: 600;
}

.cta-section .btn-outline-light {
    border: 2px solid rgba(255,255,255,0.6);
    color: #fff;
}

.cta-section .btn-outline-light:hover {
    background: rgba(255,255,255,0.15);
}

/* ===== Footer ===== */
footer {
    background: #2D2D2D;
    color: #ccc;
    padding: 60px 0 30px;
}

footer h5 {
    color: #fff;
    font-size: 1rem;
    margin-bottom: 16px;
}

footer p, footer li {
    font-size: 0.88rem;
    color: #aaa;
}

footer a {
    color: #aaa;
    text-decoration: none;
}

footer a:hover {
    color: #fff;
}

footer ul {
    list-style: none;
    padding: 0;
}

footer ul li {
    padding: 3px 0;
}

footer ul li i {
    width: 20px;
    color: #888;
}

footer .social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #444;
    color: #ccc;
    font-size: 0.9rem;
    transition: background 0.2s;
}

footer .social-icon:hover {
    background: var(--color-primary);
    color: #fff;
}

footer hr {
    border-color: #444;
    margin: 30px 0 20px;
}

footer .copyright {
    font-size: 0.82rem;
    color: #777;
}

/* ===== Float Buttons ===== */
.float-buttons {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.float-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    text-decoration: none;
    color: #fff;
    box-shadow: var(--shadow-md);
    transition: transform 0.2s;
    font-size: 1.3rem;
}

.float-btn:hover {
    transform: scale(1.08);
    color: #fff;
}

.float-btn-line { background: #06C755; }
.float-btn-messenger { background: #0084FF; }
.float-btn-phone { background: var(--color-primary); }

/* ===== Animations ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* ===== Mobile ===== */
@media (max-width: 767px) {
    .dropdown-submenu .dropdown-menu {
        position: static !important;
        box-shadow: none;
        border: none;
        padding-left: 16px;
        display: none !important;
    }

    .dropdown-submenu .dropdown-menu.show {
        display: block !important;
    }

    .dropdown-submenu:hover > .dropdown-menu {
        display: none;
    }
}

@media (max-width: 991px) {
    .navbar-collapse {
        background: var(--bg-card);
        border-radius: var(--radius);
        padding: 16px;
        margin-top: 8px;
        box-shadow: var(--shadow-md);
    }

    .navbar-nav .dropdown-menu {
        box-shadow: none;
        border: none;
        background: var(--bg-section-alt);
        border-radius: 8px;
    }
}

@media (max-width: 768px) {
    section { padding: 60px 0; }

    .hero-section {
        padding: 120px 0 60px;
        text-align: center;
    }

    .hero-section h1 { font-size: 2rem; }
    .hero-tags { justify-content: center; }
    .hero-image { margin-top: 32px; }

    .btn-phone {
        width: 44px;
        height: 44px;
        padding: 0;
        border-radius: 50%;
        font-size: 0;
    }

    .btn-phone i {
        font-size: 1.1rem;
        margin: 0 !important;
    }

    .float-buttons {
        bottom: 80px;
        right: 16px;
    }

    .float-btn {
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .hero-section h1 { font-size: 1.75rem; }
    .container { padding-left: 16px; padding-right: 16px; }
}

/* ===== Print ===== */
@media print {
    .navbar, .float-buttons, footer { display: none !important; }
    body { background: #fff !important; }
}
