/* Local WebFonts - 使用本地字型，避免依賴 Google Fonts/CDN */
/* 字型檔需放在 /static/fonts/ 目錄下，發布後路徑為 /fonts/... */
@font-face {
    font-family: 'Noto Sans TC';
    font-style: normal;
    font-weight: 400;
    src: url('/fonts/NotoSansTC-Regular.woff2') format('woff2');
    font-display: swap;
}

@font-face {
    font-family: 'Noto Sans TC';
    font-style: normal;
    font-weight: 700;
    src: url('/fonts/NotoSansTC-Bold.woff2') format('woff2');
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    src: url('/fonts/Inter-Regular.woff2') format('woff2');
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 600;
    src: url('/fonts/Inter-SemiBold.woff2') format('woff2');
    font-display: swap;
}

@font-face {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 400;
    src: url('/fonts/Roboto-Regular.woff2') format('woff2');
    font-display: swap;
}

@font-face {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 700;
    src: url('/fonts/Roboto-Bold.woff2') format('woff2');
    font-display: swap;
}

:root {
    --primary-color: #0066cc;
    /* Professional Blue */
    --primary-dark: #004494;
    --accent-color: #ff6b00;
    /* Vibrant Orange */
    --accent-hover: #e65c00;
    --text-dark: #1a1a1a;
    --text-gray: #4a4a4a;
    --text-light: #888888;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #e1e4e8;

    /* Spacing */
    --container-width: 1200px;
    --section-padding: 80px 0;

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans TC', 'Inter', 'Roboto', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-white);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

ul {
    list-style: none;
}

.container {
    max-width: var(--container-width) !important;
    margin: 0 auto;
    padding: 0 20px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.1rem;
}

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

.btn-primary:hover {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

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

.btn-block {
    display: block;
    width: 100%;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    padding: 15px 0;
}

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

.nav-actions {
    display: flex;
    gap: 15px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-image {
    height: 40px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo:hover .logo-image {
    transform: scale(1.05);
}

.logo-text {
    color: #333;
}

.logo-text .highlight {
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-item {
    position: relative;
    font-weight: 700;
    color: var(--text-gray);
    cursor: pointer;
    padding: 10px 0;
}

.nav-item>a {
    color: var(--text-gray);
}

.nav-item:hover>a,
.nav-item>a:hover {
    color: var(--primary-color);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-dark);
}

/* Dropdown Toggle Arrow */
.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
}

.dropdown-toggle::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid var(--text-light);
    margin-left: 6px;

    display: inline-block;
    vertical-align: middle;
    transition: transform 0.3s ease, border-top-color 0.3s ease;
}

.dropdown:hover>.dropdown-toggle::after {
    transform: rotate(180deg);
    border-top-color: var(--primary-color);
}

/* Dropdown Styles */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 220px;
    box-shadow: var(--shadow-md);
    border-radius: 8px;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1001;
}

/* Dropdown Item Spacing */
.dropdown-menu li a {
    display: block;
    padding: 12px 24px;
    /* Increased padding for better spacing */
    color: var(--text-dark);
    font-size: 0.95rem;
    /* Slightly smaller than top level */
    line-height: 1.5;
    transition: all 0.2s;
}

.dropdown-menu li a:hover {
    background-color: #f8f9fa;
    color: var(--primary-color);
    padding-left: 28px;
    /* Subtle hover slide effect */
}

.dropdown:hover>.dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    gap: 60px;
}

/* Nested Dropdown Styles */
.dropdown-submenu {
    position: relative;
    width: 100%;
}

.dropdown-submenu>a {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dropdown-submenu>a::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 5px solid var(--text-light);
    margin-left: 10px;
    transition: border-left-color 0.2s;
}

.dropdown-submenu>a:hover::after {
    border-left-color: var(--primary-color);
}

.dropdown-submenu>.dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -5px;
    display: none;
    opacity: 0;
    visibility: hidden;
}

.dropdown-submenu:hover>.dropdown-menu {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.hero-text {
    flex: 1;
}

/* Hero Section */
.hero {
    padding-top: 140px;
    padding-bottom: 80px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e9f2 100%);
}

/* Gradient Primary Background (for value-added-services and similar pages) */
.bg-gradient-primary {
    background: linear-gradient(135deg, #0066cc 0%, #004494 100%);
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 60px;
}

.badge-new {
    display: inline-block;
    background-color: #ffebee;
    color: #d32f2f;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

/* China Direct badge colors */
.hero-dedicated.china-direct .badge-new {
    background-color: rgba(220, 38, 38, 0.2);
    color: #fca5a5;
    border: 1px solid rgba(220, 38, 38, 0.4);
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(211, 47, 47, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(211, 47, 47, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(211, 47, 47, 0);
    }
}

/* Breadcrumbs */
.breadcrumbs {
    font-size: 0.9rem;
    color: var(--text-gray);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.breadcrumbs a {
    color: var(--text-light);
    transition: color 0.3s;
}

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

.breadcrumbs span {
    color: var(--text-light);
    font-size: 0.8rem;
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 20px;
    color: #1a1a1a;
}

.text-gradient {
    background: linear-gradient(90deg, var(--primary-color), #00a8ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subhead {
    font-size: 1.2rem;
    color: var(--text-gray);
    margin-bottom: 30px;
}

.hero-cta {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
}

.hero-trust-badges {
    display: flex;
    gap: 25px;
    color: var(--text-light);
    font-size: 0.9rem;
}

.hero-trust-badges span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.hero-visual {
    flex: 1;
    position: relative;
    height: 400px;
}

.network-map {
    position: relative;
    width: 100%;
    height: 100%;
    background: url('assets/images/map-bg.svg') no-repeat center center;
    /* Placeholder if image missing */
    background-size: contain;
}

/* Simple CSS Map Visualization */
.map-point {
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: var(--primary-color);
    border-radius: 50%;
    border: 4px solid rgba(0, 86, 179, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 10px;
    font-weight: bold;
    z-index: 2;
}

.map-point.taiwan {
    top: 50%;
    left: 20%;
}

.map-point.china {
    top: 40%;
    left: 70%;
}

.connection-line {
    position: absolute;
    top: 45%;
    left: 22%;
    width: 48%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), transparent);
    transform: rotate(-10deg);
    transform-origin: left center;
}

.connection-line::after {
    content: '';
    position: absolute;
    top: -2px;
    left: 0;
    width: 10px;
    height: 6px;
    background-color: var(--accent-color);
    border-radius: 3px;
    animation: moveData 2s linear infinite;
}

@keyframes moveData {
    0% {
        left: 0;
        opacity: 1;
    }

    100% {
        left: 100%;
        opacity: 0;
    }
}

.ping-indicator {
    position: absolute;
    top: 35%;
    left: 45%;
    background: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    color: #28a745;
    box-shadow: var(--shadow-sm);
}

.feature-card {
    position: absolute;
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: float 6s ease-in-out infinite;
}

.feature-card .icon {
    font-size: 1.5rem;
}

.feature-card .text {
    font-weight: 600;
    font-size: 0.9rem;
}

.card-1 {
    top: 10%;
    right: 10%;
    animation-delay: 0s;
}

.card-2 {
    bottom: 20%;
    left: 10%;
    animation-delay: 3s;
}

@keyframes float {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(0);
    }
}

/* Features Section */
.features {
    padding: var(--section-padding);
    background-color: var(--bg-white);
}

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

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: #1a1a1a;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-gray);
}

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

.feature-item {
    padding: 30px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.feature-item h3 {
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.feature-item p {
    color: var(--text-gray);
    font-size: 0.95rem;
}

/* Pricing Section */
.pricing {
    padding: var(--section-padding);
    background-color: var(--bg-light);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    align-items: center;
}

.pricing-card {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    position: relative;
    transition: all 0.3s;
}

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

.pricing-card.popular {
    border: 2px solid var(--accent-color);
    transform: scale(1.05);
    z-index: 2;
    box-shadow: var(--shadow-md);
}

.pricing-card.popular:hover {
    transform: scale(1.05) translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.popular-tag {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-color);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.card-header {
    text-align: center;
    margin-bottom: 30px;
}

.card-header h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.card-header .price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.card-header .price span {
    font-size: 1rem;
    color: var(--text-light);
    font-weight: 400;
}

.features-list {
    margin-bottom: 30px;
}

.features-list li {
    margin-bottom: 12px;
    color: var(--text-gray);
    display: flex;
    align-items: center;
    gap: 10px;
}

.features-list li::before {
    content: '✓';
    color: #28a745;
    font-weight: bold;
}

.features-list li.highlight-feature {
    color: var(--text-dark);
    font-weight: 600;
}

/* Trust Section */
.trust {
    padding: var(--section-padding);
    background-color: var(--bg-white);
}

.trust-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

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

.quote {
    font-size: 1.1rem;
    font-style: italic;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.author {
    display: flex;
    align-items: center;
    gap: 15px;
}

.avatar {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
}

.info strong {
    display: block;
    color: #1a1a1a;
}

.info span {
    font-size: 0.9rem;
    color: var(--text-light);
}

.looking-glass {
    background: #1e1e1e;
    color: white;
    padding: 30px;
    border-radius: 12px;
    font-family: 'Courier New', monospace;
}

/* 覆寫 Tailwind 的字體設定，讓 .font-sans 也使用本地字型 */
.font-sans {
    font-family: 'Noto Sans TC', 'Inter', 'Roboto', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}

/* 表單元素也統一使用同一組字型 */
button,
input,
select,
textarea {
    font-family: 'Noto Sans TC', 'Inter', 'Roboto', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.looking-glass h3 {
    margin-bottom: 20px;
    color: #00ff00;
}

.lg-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #333;
}

.lg-row.header {
    color: #888;
    font-size: 0.9rem;
}

.lg-row .good {
    color: #00ff00;
}

.status-ok {
    color: #00ff00;
}

.lg-actions {
    margin-top: 20px;
    text-align: right;
}

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

/* Footer */
.footer {
    background: #1a1a1a;
    color: #fff;
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.footer-col p {
    color: #888;
    line-height: 1.6;
}

.footer-col a {
    display: block;
    color: #888;
    margin-bottom: 10px;
}

.footer-col a:hover {
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 20px;
    text-align: center;
    color: #666;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 992px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
    }

    .hero-cta {
        justify-content: center;
    }

    .hero-trust-badges {
        justify-content: center;
    }

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

@media (max-width: 768px) {

    .nav-links,
    .nav-actions {
        display: none;
    }

    .nav-links.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        padding: 20px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        z-index: 1000;
    }

    .nav-actions.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: calc(100% + 350px);
        /* Adjust based on menu height */
        left: 0;
        width: 100%;
        background: white;
        padding: 0 20px 20px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        z-index: 1000;
    }

    .nav-item {
        width: 100%;
        padding: 15px 0;
        border-bottom: 1px solid #eee;
    }

    .dropdown-menu {
        position: static;
        box-shadow: none;
        display: none;
        padding-left: 20px;
        opacity: 1;
        visibility: visible;
        transform: none;
        width: 100%;
    }

    .dropdown.active>.dropdown-menu {
        display: block;
    }

    .dropdown-submenu>.dropdown-menu {
        margin-top: 0;
        padding-left: 20px;
        border-left: 2px solid #eee;
    }

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

    .mobile-menu-btn {
        display: block;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .pricing-card.popular {
        transform: scale(1);
    }

    .pricing-card.popular:hover {
        transform: translateY(-10px);
    }

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

/* WordPress Menu Adapter */
.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 30px;
    align-items: center;
}

.main-navigation .menu-item {
    position: relative;
    font-weight: 500;
    color: var(--text-gray);
    cursor: pointer;
    padding: 10px 0;
}

.main-navigation .menu-item>a {
    color: var(--text-gray);
}

.main-navigation .menu-item:hover>a,
.main-navigation .menu-item>a:hover {
    color: var(--primary-color);
}

.main-navigation .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 220px;
    box-shadow: var(--shadow-md);
    border-radius: 8px;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1001;
    display: block;
    /* Override WP default if needed */
}

.main-navigation .menu-item-has-children:hover>.sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.main-navigation .sub-menu li {
    position: relative;
}

.main-navigation .sub-menu a {
    display: block;
    padding: 10px 20px;
    color: var(--text-dark);
    font-size: 0.95rem;
    transition: background 0.2s;
    white-space: nowrap;
}

.main-navigation .sub-menu a:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
}

/* Nested Sub-menu */
.main-navigation .sub-menu .sub-menu {
    top: 0;
    left: 100%;
    margin-top: -10px;
}

/* Arrow indicators */
.main-navigation .menu-item-has-children>a::after {
    content: '▼';
    font-size: 0.7em;
    margin-left: 5px;
    display: inline-block;
    transition: transform 0.3s;
}

.main-navigation .menu-item-has-children:hover>a::after {
    transform: rotate(180deg);
}

.main-navigation .sub-menu .menu-item-has-children>a::after {
    content: '▶';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
}

/* Breadcrumbs */
.breadcrumbs {
    padding: 10px 0;
    margin-bottom: 20px;
    list-style: none;
    border-radius: 4px;
    display: flex;
    flex-wrap: wrap;
    font-size: 0.9rem;
    color: var(--text-light);
}

.breadcrumbs li {
    display: inline-block;
}

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

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs .separator {
    margin: 0 8px;
    color: #ccc;
}

.breadcrumbs .bread-current {
    color: var(--text-gray);
    font-weight: 500;
}

/* Toggle Switch */
.toggle-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    background: #f1f1f1;
    padding: 8px 20px;
    border-radius: 30px;
}

.toggle-label {
    font-weight: 600;
    color: #888;
    transition: color 0.3s;
    cursor: pointer;
}

.toggle-label.active {
    color: var(--primary-color);
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
}

input:checked+.slider {
    background-color: var(--primary-color);
}

input:focus+.slider {
    box-shadow: 0 0 1px var(--primary-color);
}

/* Rounded sliders */
.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}


.main-navigation .menu-item>a {
    color: var(--text-gray);
}

.main-navigation .menu-item:hover>a,
.main-navigation .menu-item>a:hover {
    color: var(--primary-color);
}

.main-navigation .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 220px;
    box-shadow: var(--shadow-md);
    border-radius: 8px;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1001;
    display: block;
    /* Override WP default if needed */
}

.main-navigation .menu-item-has-children:hover>.sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.main-navigation .sub-menu li {
    position: relative;
}

.main-navigation .sub-menu a {
    display: block;
    padding: 10px 20px;
    color: var(--text-dark);
    font-size: 0.95rem;
    transition: background 0.2s;
    white-space: nowrap;
}

.main-navigation .sub-menu a:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
}

/* Nested Sub-menu */
.main-navigation .sub-menu .sub-menu {
    top: 0;
    left: 100%;
    margin-top: -10px;
}

/* Arrow indicators */
.main-navigation .menu-item-has-children>a::after {
    content: '▼';
    font-size: 0.7em;
    margin-left: 5px;
    display: inline-block;
    transition: transform 0.3s;
}

.main-navigation .menu-item-has-children:hover>a::after {
    transform: rotate(180deg);
}

.main-navigation .sub-menu .menu-item-has-children>a::after {
    content: '▶';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
}

/* Breadcrumbs */
.breadcrumbs {
    padding: 10px 0;
    margin-bottom: 20px;
    list-style: none;
    border-radius: 4px;
    display: flex;
    flex-wrap: wrap;
    font-size: 0.9rem;
    color: var(--text-light);
}

.breadcrumbs li {
    display: inline-block;
}

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

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs .separator {
    margin: 0 8px;
    color: #ccc;
}

.breadcrumbs .bread-current {
    color: var(--text-gray);
    font-weight: 500;
}

/* Toggle Switch */
.toggle-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    background: #f1f1f1;
    padding: 8px 20px;
    border-radius: 30px;
}

.toggle-label {
    font-weight: 600;
    color: #888;
    transition: color 0.3s;
    cursor: pointer;
}

.toggle-label.active {
    color: var(--primary-color);
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
}

input:checked+.slider {
    background-color: var(--primary-color);
}

input:focus+.slider {
    box-shadow: 0 0 1px var(--primary-color);
}

input:checked+.slider:before {
    transform: translateX(24px);
}

/* Rounded sliders */
.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}




.text-gradient-gold {
    background: linear-gradient(to right, #e74c3c, #f1c40f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* Colocation Hero Highlights */
.hero-highlights-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin: 32px 0;
    text-align: left;
}

@media (min-width: 768px) {
    .hero-highlights-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.highlight-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: rgba(255, 255, 255, 0.1);
    padding: 16px;
    border-radius: 8px;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.highlight-item .icon {
    font-size: 24px;
    line-height: 1;
}

.highlight-item .text strong {
    display: block;
    font-size: 16px;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.highlight-item .text p {
    font-size: 14px;
    color: #4a4a4a;
    margin: 0;
    line-height: 1.4;
}

.hero-cta-group {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 32px;
}

@media (max-width: 768px) {
    .hero-cta-group {
        flex-direction: column;
    }
}

/* Dedicated Page Specific Styles */
.tech-specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.tech-spec-item {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 15px;
}

.tech-spec-icon {
    font-size: 2rem;
    color: var(--primary-color);
    background: rgba(0, 102, 204, 0.1);
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Comparison Chart */
.compare-chart-section {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

.chart-row {
    margin-bottom: 20px;
}

.chart-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-weight: 600;
}

.chart-bar-bg {
    background: #f0f0f0;
    height: 24px;
    border-radius: 12px;
    overflow: hidden;
}

.chart-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-hover));
    width: 0;
    border-radius: 12px;
    transition: width 1s ease-out;
}

.chart-bar-fill.competitor {
    background: #ccc;
}

/* Latency Grid */
.latency-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
}

.latency-card {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #dee2e6;
    transition: transform 0.2s;
}

.latency-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary-color);
}

.latency-loc {
    font-size: 0.9rem;
    color: var(--text-gray);
    margin-bottom: 5px;
}

.latency-ms {
    font-size: 1.4rem;
    font-weight: 700;
    color: #28a745;
}

.latency-ms small {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-light);
}

/* Configurator Styles (Simplified) */
.config-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.config-tag {
    background: #eef2f7;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--text-dark);
}

/* FAQ Section Styles (mimicking Tailwind) */
.faq-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 16px 0;
    cursor: pointer;
    font-size: 1.125rem;
    /* text-lg */
    font-weight: 500;
    /* font-medium */
    color: #111827;
    /* text-gray-900 */
}

.faq-btn:focus {
    outline: none;
}

.faq-content {
    margin-top: 8px;
    /* mt-2 */
    color: #6b7280;
    /* text-gray-500 */
    font-size: 1rem;
    /* text-base */
    line-height: 1.5;
    padding-bottom: 16px;
}

.faq-icon {
    height: 1.5rem;
    /* h-6 */
    width: 1.5rem;
    /* w-6 */
    color: #6b7280;
    /* text-gray-500 */
    transition: transform 0.2s;
}

.faq-icon.rotate-180 {
    transform: rotate(180deg);
}

.faq-item {
    border-bottom: 1px solid #e5e7eb;
    /* border-gray-200 */
}
/* DDoS Hub Sticky Nav */
.ddos-selector-strip { 
    background: white; 
    border-bottom: 1px solid #e2e8f0; 
    padding: 0; 
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05); 
    position: sticky; 
    top: 74px; 
    z-index: 90; 
    margin-top: 80px; /* Pushes content down below fixed/floating navbar */
}
.ddos-selector-container { 
    display: flex; 
    justify-content: center; 
    gap: 5px; 
    max-width: 800px; 
    margin: 0 auto; 
}
.ddos-selector-btn {
    display: flex; 
    align-items: center; 
    gap: 8px; 
    padding: 15px 25px; 
    color: #64748b; 
    text-decoration: none; 
    font-weight: 500; 
    border-bottom: 2px solid transparent; 
    transition: all 0.2s;
}
.ddos-selector-btn:hover { 
    color: #334155; 
    background: #f8fafc; 
}
.ddos-selector-btn.active { 
    color: var(--primary-color); 
    border-bottom: none; 
    background: #f0f7ff; 
    font-weight: 600; 
}
.ddos-selector-icon { 
    font-size: 1.2rem; 
}


/* Section Dark - 用于地区切换section */
.section-dark {
    background: #f8fafc;
}

/* Toggle Wrapper - 地区切换toggle switch样式 */
.toggle-wrapper {
    display: inline-flex;
    align-items: center;
    background: #f1f5f9;
    padding: 5px;
    border-radius: 30px;
    border: 1px solid #e2e8f0;
}

.toggle-label {
    padding: 8px 20px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 25px;
    font-size: 0.95rem;
    user-select: none;
}

.toggle-label.active {
    color: var(--primary-color);
    font-weight: 600;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    margin: 0 10px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--primary-color);
}

input:checked + .slider:before {
    transform: translateX(24px);
}

.round {
    border-radius: 34px;
}

.round:before {
    border-radius: 50%;
}

/* Billing Cycle Control */
.billing-cycle-control {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    align-items: center;
}

.billing-btn {
    background: white;
    border: 1px solid #dee2e6;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    color: #495057;
    transition: all 0.3s;
    font-size: 0.95rem;
}

.billing-btn:hover {
    background: #f8f9fa;
    border-color: var(--primary-color);
}

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

.billing-discount {
    background: #ffc107;
    color: #212529;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.75rem;
    margin-left: 5px;
    font-weight: 700;
}

.region-content {
    display: none;
}

.region-content.active {
    display: grid;
}

.plan-loc {
    font-size: 0.8em;
    color: #64748b;
    font-weight: 400;
}

/* Hero Dedicated Style - 深色背景 */
.hero-dedicated {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: white;
    padding: 120px 0 80px;
    position: relative;
    overflow: hidden;
}

.hero-dedicated::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(37, 99, 235, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(236, 72, 153, 0.05) 0%, transparent 50%);
}

/* DDoS 页面专用浅色背景 */
.hero-dedicated.hero-ddos {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e9f2 100%);
    color: #1a1a1a;
}

.hero-dedicated.hero-ddos::before {
    display: none;
}

.hero-dedicated.hero-ddos h1 {
    color: #1a1a1a;
    text-shadow: none;
}

.hero-dedicated.hero-ddos .subhead {
    color: #4a4a4a;
}

/* DDoS 页面的 hero-visual-dedicated 需要白色半透明背景 */
.hero-dedicated.hero-ddos .hero-visual-dedicated {
    background: rgba(255,255,255,0.8);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    backdrop-filter: blur(10px);
}

/* China Direct variant - red theme */
.hero-dedicated.china-direct::before {
    background-image:
        radial-gradient(circle at 20% 30%, rgba(220, 38, 38, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(234, 179, 8, 0.05) 0%, transparent 50%);
}

.hero-dedicated h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.hero-dedicated .subhead {
    font-size: 1.25rem;
    color: #94a3b8;
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.hero-visual-dedicated {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 0 40px rgba(0, 123, 255, 0.1);
    backdrop-filter: blur(10px);
}

/* China Direct variant - red shadow */
.hero-dedicated.china-direct .hero-visual-dedicated {
    box-shadow: 0 0 40px rgba(220, 38, 38, 0.1);
}

.badge-new {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero-cta-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

@keyframes moveData {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Pricing Table Styles */
.price-table-container {
    overflow-x: auto;
}

.price-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    table-layout: auto;
}

.price-table th {
    background: #f8f9fa;
    padding: 20px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

.price-table td {
    padding: 20px;
    border-bottom: 1px solid #dee2e6;
    color: #212529;
}

.price-table tr:last-child td {
    border-bottom: none;
}

.price-cell {
    text-align: right;
    min-width: 180px;
}

.price-tag {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: #0066cc;
}

.price-note {
    display: block;
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 8px;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn-buy {
    margin-top: 8px;
}

.region-tbody {
    display: none;
}

.region-tbody.active {
    display: table;
}

/* CRO Section */
.cro-section {
    padding: 60px 0;
}

.cro-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
    border: 1px solid #eee;
}

.cro-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.cro-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

/* Partners Grid */
/* Partners Section */
.partners-section {
    padding: 60px 0;
    background-color: #fff;
}

/* Colocation Pricing Grid - Responsive */
@media (min-width: 768px) {
    .pricing-grid[style*="grid-template-columns: repeat(1, 1fr)"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (min-width: 1024px) {
    .pricing-grid[style*="grid-template-columns: repeat(1, 1fr)"] {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

/* Colocation Region Toggle Styles */
.region-toggle-container {
    display: flex;
    justify-content: center;
    margin: 40px 0;
}

.region-toggle-container .toggle-wrapper {
    display: inline-flex;
    align-items: center;
    background: #f1f5f9;
    padding: 5px;
    border-radius: 30px;
    border: 1px solid #e2e8f0;
}

.region-toggle-container .toggle-label {
    padding: 8px 24px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 25px;
    font-size: 0.95rem;
    user-select: none;
}

.region-toggle-container .toggle-label.active {
    color: #2563eb;
    font-weight: 700;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.region-toggle-container .toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    margin: 0 10px;
}

.region-toggle-container .toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.region-toggle-container .toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: .4s;
    border-radius: 34px;
}

.region-toggle-container .toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.region-toggle-container input:checked + .toggle-slider {
    background-color: #2563eb;
}

.region-toggle-container input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

/* Colocation Pricing Grid - Responsive */
.pricing-grid.region-content {
    display: none;
}

.pricing-grid.region-content.active {
    display: grid;
    animation: fadeIn 0.5s ease;
}

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

/* Colocation specific pricing grid styles */
/* 使用专用类名，不依赖内联样式属性选择器（更稳定） */
.pricing-grid-colocation {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 20px;
    justify-content: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

@media (min-width: 768px) {
    .pricing-grid-colocation {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .pricing-grid-colocation {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* 保留旧的属性选择器作为后备 */
.pricing-grid[style*="grid-template-columns: repeat(1, 1fr)"] {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 20px;
    justify-content: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

@media (min-width: 768px) {
    .pricing-grid[style*="grid-template-columns: repeat(1, 1fr)"] {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .pricing-grid[style*="grid-template-columns: repeat(1, 1fr)"] {
        grid-template-columns: repeat(4, 1fr);
    }
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 30px;
    align-items: center;
    margin-top: 40px;
}

.partner-logo {
    background: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    color: #495057;
    border: 1px solid #eee;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Risk Badge */
.risk-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #e6f4ea;
    color: #1e7e34;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 20px;
}

/* DDoS Selector Strip */
.ddos-selector-strip {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 74px;
    z-index: 90;
    margin-top: 74px;
}

.ddos-selector-container {
    display: flex;
    justify-content: center;
    gap: 5px;
    max-width: 800px;
    margin: 0 auto;
}

.ddos-selector-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 15px 25px;
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.ddos-selector-btn:hover {
    color: #334155;
    background: #f8fafc;
}

.ddos-selector-btn.active {
    color: var(--primary-color);
    border-bottom: none;
    background: #f0f7ff;
    font-weight: 600;
}

.ddos-selector-icon {
    font-size: 1.2rem;
}
