/* 重置和基本樣式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --bg-color: #ffffff;
    --bg-light: #f9fafb;
    --border-color: #e5e7eb;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

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

/* 導航欄 */
.navbar {
    background-color: var(--bg-color);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    flex-direction: row;
    gap: 0.75rem;
}

.nav-logo {
    height: 32px;
    width: 32px;
    max-width: 32px;
    max-height: 32px;
    object-fit: contain;
    flex-shrink: 0;
    display: block;
    order: 1;
}

.nav-brand h1 {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 700;
    margin: 0;
    order: 2;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s ease;
}

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

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

.nav-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    transition: all 0.3s ease;
}

/* 公告 Banner 區域 */
.site-banner {
    background: #000;
    color: #f8f9fa;
    padding: 0.5rem 0;
}

.site-banner .container {
    display: flex;
    justify-content: center;
}

/* 主要內容 */
main {
    min-height: calc(100vh - 200px);
}

/* Hero 區域 */
.hero {
    background-image: url('/hong-kong-2378050_1280.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #2563eb; /* 備用背景色 */
    color: white;
    padding: 120px 0;
    text-align: center;
    position: relative;
    min-height: 600px;
}

.hero-banner {
    display: inline-flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.9);
    color: #f8f9fa;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 0.85rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.hero-banner-label {
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.78rem;
    padding: 0.12rem 0.55rem;
    border-radius: 999px;
    border: 1px solid rgba(248, 249, 250, 0.7);
    background: rgba(0, 0, 0, 0.6);
    flex-shrink: 0;
}

.hero-banner-text {
    text-align: left;
}

@media (max-width: 768px) {
    .hero-banner {
        display: flex;
        width: 100%;
        border-radius: 999px;
    }
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
    pointer-events: none;
}

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

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    opacity: 0.95;
    animation: fadeInUp 0.8s ease 0.2s both;
    text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.5);
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: fadeInUp 0.8s ease 0.3s both;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 按鈕 */
.btn {
    display: inline-block;
    padding: 12px 32px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background-color: white;
    color: var(--primary-color);
    animation: fadeInUp 0.8s ease 0.4s both;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* 區塊樣式 */
section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-color);
    font-weight: 700;
}

/* About 區域 */
.about {
    background-color: var(--bg-light);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-text p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.8;
}

/* Services 區域 */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-card {
    background-color: var(--bg-color);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.service-card p {
    color: var(--text-light);
    line-height: 1.6;
}

/* Contact 區域 */
.contact {
    background-color: var(--bg-light);
}

.contact-content {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.contact-info {
    background-color: var(--bg-color);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.contact-info h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.contact-details p {
    margin-bottom: 1rem;
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-color);
}

.contact-details a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-details a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.lang-switch {
    font-weight: 600;
    color: var(--primary-color) !important;
    border: 1px solid var(--primary-color);
    padding: 0.5rem 1rem !important;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.lang-switch:hover {
    background-color: var(--primary-color);
    color: white !important;
}

.contact-form {
    background-color: var(--bg-color);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
}

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

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

.form-group textarea {
    resize: vertical;
}

/* 表單訊息樣式 */
.form-message {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-weight: 500;
    animation: slideDown 0.3s ease;
}

.form-message-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.form-message-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.form-message-info {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

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

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Solutions 區域 */
.solutions {
    background-color: var(--bg-color);
}

.solutions-content {
    max-width: 1000px;
    margin: 0 auto;
}

.solution-item {
    background-color: var(--bg-light);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--primary-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.solution-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow);
}

.solution-item h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 600;
}

.solution-item p {
    color: var(--text-light);
    line-height: 1.8;
    font-size: 1.05rem;
}

.solution-image {
    margin-top: 1.5rem;
    text-align: center;
}

.solution-img {
    max-width: 70%;
    height: auto;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 0.5rem;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.gif-image {
    animation: none;
    image-rendering: auto;
    object-fit: contain;
}

/* 確保 GIF 動畫正常播放 */
img[src$=".gif"] {
    image-rendering: auto;
    -webkit-animation-play-state: running;
    animation-play-state: running;
}

.image-caption {
    font-size: 0.9rem;
    color: var(--text-light);
    font-style: italic;
    margin-top: 0.5rem;
}

/* AI安全監察系統區域 */
.ai-monitoring {
    background-color: var(--bg-light);
}

.monitoring-intro {
    max-width: 800px;
    margin: 0 auto 3rem;
    text-align: center;
}

.monitoring-intro p {
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.8;
}

.monitoring-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.monitoring-category {
    background-color: var(--bg-color);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.monitoring-category:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.monitoring-category h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-weight: 600;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.monitoring-features {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.feature-item {
    padding-left: 1rem;
    border-left: 3px solid var(--primary-color);
}

.feature-item h4 {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.feature-item p {
    color: var(--text-light);
    line-height: 1.6;
    font-size: 0.95rem;
}

.monitoring-advantages {
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 2px solid var(--border-color);
}

.monitoring-advantages h3 {
    font-size: 2rem;
    text-align: center;
    color: var(--text-color);
    margin-bottom: 2rem;
    font-weight: 700;
}

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.advantage-item {
    background-color: var(--bg-color);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.advantage-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.advantage-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.advantage-item h4 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 600;
}

.advantage-item p {
    color: var(--text-light);
    line-height: 1.6;
    font-size: 1rem;
}

/* Footer */
.footer {
    background-color: var(--text-color);
    color: white;
    padding: 3rem 0 1.5rem;
}

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

.footer-section h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: white;
}

.footer-section h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: white;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

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

.footer-section ul li {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.footer-section ul li:before {
    content: "• ";
    color: var(--primary-color);
    font-weight: bold;
    margin-right: 0.5rem;
}

/* 社交媒體分享按鈕 */
.social-share {
    margin-top: 1.5rem;
}

.social-share p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.share-buttons {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.share-btn {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px;
    min-height: 44px;
    border-radius: 50%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.share-btn:hover {
    transform: translateY(-3px);
    background-color: rgba(255, 255, 255, 0.2);
}

.share-btn svg {
    width: 24px !important;
    height: 24px !important;
    fill: white;
    display: block;
}

.share-fb:hover {
    background-color: #1877F2;
}

.share-twitter:hover {
    background-color: #000000;
}

.share-linkedin:hover {
    background-color: #0077B5;
}

.share-whatsapp:hover {
    background-color: #25D366;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 1.5rem;
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

/* 最新消息區域 */
.news {
    background-color: var(--bg-color);
    padding: 80px 0;
}

.news-content {
    max-width: 1000px;
    margin: 0 auto;
}

.news-item {
    background-color: var(--bg-light);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    border-left: 4px solid var(--primary-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow);
}

.news-item h3 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-weight: 600;
    line-height: 1.4;
}

.news-date {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    font-style: italic;
}

.news-item p:not(.news-date) {
    color: var(--text-light);
    line-height: 1.8;
    font-size: 1rem;
}

.news-item strong {
    color: var(--text-color);
    font-weight: 600;
}

/* Footer SEO 區域 */
.footer-seo {
    background-color: rgba(0, 0, 0, 0.3);
    padding: 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 2rem;
}

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

.footer-seo h4 {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 600;
}

.footer-seo p {
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.8;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    text-align: justify;
}

.footer-seo p:last-child {
    text-align: center;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-seo strong {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--bg-color);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .contact-content {
        grid-template-columns: 1fr;
    }

    .monitoring-grid {
        grid-template-columns: 1fr;
    }

    .advantages-grid {
        grid-template-columns: 1fr;
    }

    .monitoring-advantages h3 {
        font-size: 1.5rem;
    }

    .news-item h3 {
        font-size: 1.1rem;
    }

    section {
        padding: 60px 0;
    }
}

/* 平滑滾動 */
html {
    scroll-behavior: smooth;
}

/* WhatsApp 浮動按鈕 */
.whatsapp-float {
    position: fixed !important;
    width: 60px !important;
    height: 60px !important;
    bottom: 30px !important;
    right: 30px !important;
    background-color: #25D366 !important;
    color: white !important;
    border-radius: 50% !important;
    text-align: center;
    font-size: 30px;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4) !important;
    z-index: 99999 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none;
    visibility: visible !important;
    opacity: 1 !important;
}

.whatsapp-float:hover {
    background-color: #20BA5A;
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.6);
}

.whatsapp-float svg {
    width: 32px;
    height: 32px;
    fill: white;
}

/* 響應式設計 - WhatsApp 按鈕 */
@media (max-width: 768px) {
    .whatsapp-float {
        width: 56px;
        height: 56px;
        bottom: 20px;
        right: 20px;
    }

    .whatsapp-float svg {
        width: 28px;
        height: 28px;
    }
}

