/* 全局樣式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #871D1D;
    --secondary-color: #717171;
    --white: #FFFFFF;
    --black: #000000;
    --light-gray: #F5F5F5;
    --border-gray: #E0E0E0;
    --success-color: #25D366;
    --hover-primary: #6B1717;
    /* 左下 AI / 右下 WhatsApp 浮動按鈕 — 共用對齊 */
    --fab-size: 60px;
    --fab-bottom: 30px;
    --fab-side: 30px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft JhengHei", "PingFang TC", "Noto Sans TC", sans-serif;
    line-height: 1.6;
    color: var(--black);
    background-color: var(--white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Language Switcher */
.language-switcher {
    background: var(--light-gray);
    border-bottom: 1px solid var(--border-gray);
    padding: 8px 0;
}

.language-switcher .container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}

.lang-toggle {
    display: flex;
    gap: 5px;
    background: var(--white);
    border-radius: 6px;
    padding: 4px;
    border: 1px solid var(--border-gray);
}

.lang-btn {
    padding: 6px 12px;
    border: none;
    background: transparent;
    color: var(--secondary-color);
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.lang-btn:hover {
    background: var(--light-gray);
    color: var(--primary-color);
}

.lang-btn.active {
    background: var(--primary-color);
    color: var(--white);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

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

.logo h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 0;
}

.logo-subtitle {
    font-size: 12px;
    color: var(--secondary-color);
    margin-top: 0;
}

/* Navigation */
.nav-menu {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 30px;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    text-decoration: none;
    color: var(--black);
    font-weight: 500;
    transition: color 0.3s;
    padding: 10px 0;
    display: block;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
}

.nav-menu .btn-primary {
    padding: 12px 24px;
    color: var(--white) !important;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    margin: 3px 0;
    transition: 0.3s;
}

/* Dropdown Menu */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    list-style: none;
    padding: 10px 0;
    border-radius: 8px;
}

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

.dropdown-menu li {
    padding: 0;
}

.dropdown-menu a {
    padding: 10px 20px;
    display: block;
    white-space: nowrap;
}

/* Buttons */
.btn-primary,
.btn-secondary,
.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white) !important;
}

.btn-primary:hover {
    background: var(--hover-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(135, 29, 29, 0.3);
}

.btn-secondary {
    background: var(--white);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--white);
}

.btn-whatsapp {
    background: var(--success-color);
    color: var(--white);
}

.btn-whatsapp:hover {
    background: #1EBE56;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.btn-lg {
    padding: 16px 40px;
    font-size: 18px;
}

.btn-block {
    width: 100%;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #871D1D 0%, #A82828 100%);
    color: var(--white);
    padding: 100px 0;
    position: relative;
    overflow: hidden;
    min-height: 360px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></svg>') repeat;
    opacity: 0.5;
}

/* 首頁維港背景圖（僅 .hero--image，覆寫 .hero 純紅漸層） */
.hero.hero--image {
    background:
        linear-gradient(180deg, rgba(20, 10, 10, 0.25) 0%, rgba(135, 29, 29, 0.55) 100%),
        url('../images/hero-hk-640w.jpg') center 30% / cover no-repeat;
}

.hero.hero--image::before {
    display: none;
}

@media (min-width: 769px) {
    .hero.hero--image {
        background:
            linear-gradient(180deg, rgba(20, 10, 10, 0.2) 0%, rgba(135, 29, 29, 0.5) 100%),
            url('../images/hero-hk-800w.jpg') center 30% / cover no-repeat;
    }
}

.hero--image .container {
    position: relative;
    z-index: 1;
}

.hero--image .hero-title {
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
}

.hero--image .hero-subtitle {
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.hero-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
    font-size: 20px;
    margin-bottom: 40px;
    opacity: 0.95;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

/* Hero 內的主按鈕 - 深紅底白字 */
.hero .btn-primary {
    background: rgba(135, 29, 29, 0.95);
    color: var(--white);
    border: 3px solid var(--white);
    font-weight: 700;
    font-size: 18px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.hero .btn-primary:hover {
    background: #6B1717;
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
    border-color: var(--white);
}

/* Hero 內的 WhatsApp 按鈕優化 */
.hero .btn-whatsapp {
    background: var(--success-color);
    color: var(--white);
    border: 3px solid var(--white);
    font-weight: 700;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.hero .btn-whatsapp:hover {
    background: #1EBE56;
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(37, 211, 102, 0.4);
    border-color: var(--white);
}

.hero-features {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
}

.feature-item svg {
    width: 24px;
    height: 24px;
}

/* Services Section */
.services {
    padding: 80px 0;
    background: var(--light-gray);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 42px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.section-header p {
    font-size: 18px;
    color: var(--secondary-color);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
    text-align: center;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 30px rgba(135, 29, 29, 0.15);
}

.service-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 22px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.service-card h3 a {
    text-decoration: none;
    color: var(--primary-color);
}

.service-card p {
    color: var(--secondary-color);
    margin-bottom: 20px;
    line-height: 1.7;
}

.service-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.service-link:hover {
    color: var(--hover-primary);
    text-decoration: underline;
}

/* Why Choose Section */
.why-choose {
    padding: 80px 0;
    background: var(--white);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.feature-card {
    text-align: center;
}

.feature-number {
    display: inline-block;
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    line-height: 60px;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 22px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.feature-card p {
    color: var(--secondary-color);
    line-height: 1.7;
}

/* CTA Section */
.cta {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, #A82828 100%);
    color: var(--white);
    text-align: center;
}

.cta h2 {
    font-size: 42px;
    margin-bottom: 20px;
}

.cta p {
    font-size: 20px;
    margin-bottom: 40px;
    opacity: 0.95;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Partners */
.partners {
    padding: 72px 0;
    background: var(--white);
    border-top: 1px solid var(--border-gray);
}

.partners .section-header {
    margin-bottom: 40px;
}

.partner-card {
    max-width: 820px;
    margin: 0 auto;
    padding: 36px 40px;
    background: var(--light-gray);
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.partner-card-header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 22px;
}

.partner-card-header--logo {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
}

.partner-logo-wrap {
    background: transparent;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.partner-logo {
    display: block;
    max-width: 220px;
    width: 100%;
    height: auto;
}

.partner-icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--white);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 12px rgba(135, 29, 29, 0.12);
}

.partner-card h3 {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 4px;
}

.partner-tagline {
    font-size: 14px;
    color: var(--secondary-color);
    letter-spacing: 0.02em;
}

.partner-desc {
    font-size: 16px;
    line-height: 1.75;
    color: #333;
    margin-bottom: 14px;
}

.partner-services {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 24px;
    margin: 20px 0 22px;
    padding: 16px 0 0;
    border-top: 1px solid var(--border-gray);
}

.partner-services li {
    font-size: 15px;
    color: #444;
    padding-left: 18px;
    position: relative;
}

.partner-services li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary-color);
}

.partner-disclaimer {
    font-size: 13px;
    line-height: 1.6;
    color: var(--secondary-color);
    margin: 0;
}

/* Footer */
.footer {
    background: #1a1a1a;
    color: var(--white);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3 {
    font-size: 22px;
    margin-bottom: 15px;
}

.footer-subtitle {
    font-size: 14px;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.footer-col h4 {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-col a:hover {
    color: var(--white);
}

.contact-info li {
    margin-bottom: 15px;
    line-height: 1.6;
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 30px;
    text-align: center;
}

.footer-links {
    margin-bottom: 20px;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    margin: 0 15px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--white);
}

.copyright {
    color: var(--secondary-color);
    font-size: 14px;
}

/* WhatsApp Floating Button — 脈衝漣漪（參考 drphk.net Tailwind animate-ping） */
@keyframes fab-ping {
    0% {
        transform: scale(1);
        opacity: 0.75;
    }
    75%, 100% {
        transform: scale(1.85);
        opacity: 0;
    }
}

.whatsapp-float {
    position: fixed;
    bottom: var(--fab-bottom);
    right: var(--fab-side);
    width: var(--fab-size);
    height: var(--fab-size);
    background: var(--success-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.45);
    z-index: 999;
    transition: transform 0.3s, box-shadow 0.3s;
    box-sizing: border-box;
    overflow: visible;
    isolation: isolate;
}

.whatsapp-float::before,
.whatsapp-float::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--success-color);
    pointer-events: none;
    z-index: -1;
}

.whatsapp-float::before {
    opacity: 0.65;
    animation: fab-ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.whatsapp-float::after {
    opacity: 0.4;
    animation: fab-ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
    animation-delay: 0.65s;
}

.whatsapp-float svg {
    position: relative;
    z-index: 1;
}

.whatsapp-float:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 30px rgba(37, 211, 102, 0.55);
}

@media (prefers-reduced-motion: reduce) {
    .whatsapp-float::before,
    .whatsapp-float::after {
        animation: none;
        opacity: 0;
    }
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
}

.modal-content {
    background-color: var(--white);
    margin: 5% auto;
    padding: 40px;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    position: relative;
}

@media (prefers-reduced-motion: no-preference) {
    .modal.is-open .modal-content {
        animation: slideDown 0.3s ease;
    }

    @keyframes slideDown {
        from {
            transform: translateY(-50px);
            opacity: 0;
        }
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }
}

.modal-close {
    color: var(--secondary-color);
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.modal-close:hover {
    color: var(--primary-color);
}

.modal-content h2 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.modal-content p {
    color: var(--secondary-color);
    margin-bottom: 30px;
}

.form-error {
    color: #b91c1c;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.5;
}

/* Form Styles */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--black);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-gray);
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
}

/* Service Detail Page Styles */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #A82828 100%);
    color: var(--white);
    padding: 80px 0 60px;
    text-align: center;
}

.page-header h1 {
    font-size: 48px;
    margin-bottom: 20px;
}

.page-header p {
    font-size: 20px;
    opacity: 0.95;
}

.breadcrumb {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    font-size: 14px;
}

.breadcrumb a {
    color: var(--white);
    text-decoration: none;
    opacity: 0.8;
}

.breadcrumb a:hover {
    opacity: 1;
}

.content-section {
    padding: 80px 0;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
}

.main-content h2 {
    color: var(--primary-color);
    font-size: 32px;
    margin: 40px 0 20px;
}

.main-content h3 {
    color: var(--primary-color);
    font-size: 24px;
    margin: 30px 0 15px;
}

.main-content p {
    color: var(--secondary-color);
    line-height: 1.8;
    margin-bottom: 20px;
}

.main-content ul,
.main-content ol {
    color: var(--secondary-color);
    line-height: 1.8;
    margin-bottom: 20px;
    padding-left: 25px;
}

.main-content li {
    margin-bottom: 10px;
}

.highlight-box {
    background: var(--light-gray);
    border-left: 4px solid var(--primary-color);
    padding: 25px;
    margin: 30px 0;
    border-radius: 8px;
}

.sidebar {
    position: sticky;
    top: 100px;
}

.sidebar-card {
    background: var(--light-gray);
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.sidebar-card h3 {
    color: var(--primary-color);
    font-size: 22px;
    margin-bottom: 20px;
}

.sidebar-card ul {
    list-style: none;
}

.sidebar-card ul li {
    margin-bottom: 12px;
}

.sidebar-card a {
    color: var(--black);
    text-decoration: none;
    transition: color 0.3s;
}

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

.contact-card {
    background: var(--primary-color);
    color: var(--white);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
}

.contact-card h3 {
    color: var(--white);
    margin-bottom: 15px;
}

.contact-card p {
    margin-bottom: 20px;
    opacity: 0.95;
}

.contact-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* 確保側邊欄按鈕正常顯示 */
.contact-card .btn-whatsapp {
    background: var(--success-color);
    color: var(--white);
    border: 2px solid var(--white);
    font-weight: 600;
}

.contact-card .btn-whatsapp:hover {
    background: #1EBE56;
    color: var(--white);
    transform: translateY(-2px);
    border-color: var(--white);
}

.contact-card .btn-primary {
    background: rgba(255, 255, 255, 0.15);
    color: var(--white);
    border: 2px solid var(--white);
    backdrop-filter: blur(10px);
}

.contact-card .btn-primary:hover {
    background: var(--white);
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .language-switcher .container {
        padding: 0 15px;
    }
    
    .lang-btn {
        padding: 5px 10px;
        font-size: 13px;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        gap: 0;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid var(--border-gray);
    }
    
    .dropdown-menu {
        position: static;
        display: none;
        box-shadow: none;
        padding-left: 20px;
    }
    
    .dropdown.active .dropdown-menu {
        display: block;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .hero-subtitle {
        font-size: 18px;
    }
    
    .section-header h2 {
        font-size: 32px;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: static;
    }
    
    .hero-buttons,
    .cta-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        margin: 10% auto;
        padding: 30px 20px;
    }
    
    :root {
        --fab-size: 56px;
        --fab-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
        --fab-side: 16px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero {
        padding: 60px 0;
    }
    
    .hero-title {
        font-size: 28px;
    }
    
    .section-header h2,
    .page-header h1 {
        font-size: 28px;
    }
    
    .services,
    .why-choose,
    .cta,
    .partners,
    .content-section {
        padding: 50px 0;
    }

    .partner-card {
        padding: 28px 22px;
    }

    .partner-card-header:not(.partner-card-header--logo) {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .partner-card-header--logo {
        align-items: center;
        text-align: center;
    }

    .partner-logo-wrap {
        width: 100%;
        justify-content: center;
    }

    .partner-services {
        flex-direction: column;
        gap: 8px;
    }
}
