@charset "utf-8";

/* ==========================================================================
   Home Page Specific Styles
   ========================================================================== */

/* Banner Swiper */
.home-swiper {
    position: relative;
    width: 100%;
    /* Remove fixed height, use padding/content driven or min-height */
    min-height: 500px;
    background: #000;
    margin-top: 60px; /* Offset fixed header */
    display: flex;
}

.home-swiper .swiper-container {
    width: 100%;
    height: 100%;
}

.home-swiper .swiper-slide {
    background-color: #000;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.home-swiper .swiper-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    /* background: rgba(0, 0, 0, 0.4); Overlay removed for brighter visuals */
    display: none;
}

.home-swiper .banner-content {
    position: relative;
    z-index: 2;
    color: #fff;
    max-width: 800px;
    padding: 0 24px;
    text-align: center; /* Default centered for banner */
}

.home-swiper .slogan {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.2;
    color: #fff;
}

.home-swiper .desc {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 12px;
}

.home-swiper .features {
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 32px;
    font-family: monospace;
}

.home-swiper .banner-btns {
    display: flex;
    gap: 16px;
    justify-content: center;
}

/* Data Stats Section */
.data-stats-section {
    padding: 48px 0;
    background: #fff;
    border-bottom: 1px solid var(--border-color);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    text-align: center;
}

.stat-item {
    padding: 16px;
    border-radius: 4px;
    transition: transform 0.2s;
}

.stat-item h3 {
    font-size: 36px;
    color: var(--primary-color);
    margin-bottom: 8px;
    font-weight: 700;
}

.stat-item p {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 0;
}

/* Section Common */
.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Infrastructure Section */
.infra-section {
    padding: 80px 0;
    background: #fff;
}

.infra-container {
    display: flex;
    gap: 60px;
    align-items: center;
}

.infra-text {
    flex: 0 0 400px;
}

.infra-title {
    font-size: 32px;
    line-height: 1.3;
    margin-bottom: 24px;
    font-weight: 700;
    color: var(--text-main);
}

.infra-desc {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.6;
}

.infra-btn {
    display: inline-block;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 48px;
}

.infra-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.infra-stat-item h4 {
    font-size: 14px;
    color: var(--text-placeholder);
    margin-bottom: 8px;
}

.infra-stat-item .num {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-main);
}

.infra-stat-item .unit {
    font-size: 14px;
    color: var(--text-secondary);
    margin-left: 4px;
}

.infra-map-wrap {
    flex: 1;
    position: relative;
    height: 400px;
    /* Placeholder for map visual */
    background: #f0f2f5; 
    border-radius: 8px;
    overflow: hidden;
}

.world-map-bg {
    width: 100%;
    height: 100%;
    background: url('../img/home/world_map_dots.png') no-repeat center center;
    background-size: contain;
    opacity: 0.5;
}

.hotspot {
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 0 4px rgba(0, 82, 217, 0.2);
    z-index: 5;
    border: 0;
}

.hotspot:hover .hotspot-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(-10px) translateX(-50%);
}

.hotspot-tooltip {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    padding: 16px;
    border-radius: 4px;
    box-shadow: var(--shadow-lg);
    width: 200px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 10;
    pointer-events: none;
}

/* 新增：首页节点测速弹窗样式 - 2025.12.28 */
.tc-speedtest {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.tc-speedtest.is-open {
    display: flex;
}

.tc-speedtest__mask {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.tc-speedtest__panel {
    position: relative;
    width: min(720px, calc(100vw - 32px));
    background: var(--bg-white);
    border-radius: 6px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.tc-speedtest__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
    background: #fff;
}

.tc-speedtest__title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
}

.tc-speedtest__close {
    border: 0;
    background: transparent;
    color: var(--text-secondary);
    font-size: 20px;
    line-height: 1;
    padding: 4px;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.2s;
}

.tc-speedtest__close:hover {
    color: var(--text-main);
    background: var(--bg-module);
}

.tc-speedtest__body {
    padding: 24px;
}

.tc-speedtest__form {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 16px;
    align-items: end;
    margin-bottom: 24px;
}

.tc-speedtest__field label {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 500;
}

.tc-speedtest__select {
    width: 100%;
    height: 36px;
    border: 1px solid var(--border-color);
    border-radius: 2px;
    padding: 0 12px;
    background: var(--bg-white);
    color: var(--text-main);
    font-size: 13px;
    transition: all 0.2s;
}

.tc-speedtest__select:hover {
    border-color: var(--border-hover);
}

.tc-speedtest__select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 102, 255, 0.1);
}

.tc-speedtest__ip-box {
    width: 100%;
    height: 36px;
    border: 1px solid var(--border-color);
    border-radius: 2px;
    padding: 0 12px;
    background: var(--bg-module);
    color: var(--text-main);
    display: flex;
    align-items: center;
    font-family: "SF Mono", Consolas, "Liberation Mono", Menlo, Courier, monospace;
    font-size: 13px;
}

.tc-speedtest__run {
    height: 36px;
    padding: 0 20px;
    border-radius: 2px;
    font-size: 13px;
    font-weight: 500;
    background: var(--primary-color);
    color: #fff;
    border: 0;
    cursor: pointer;
    transition: background 0.2s;
}

.tc-speedtest__run:hover {
    background: var(--primary-hover);
}

.tc-speedtest__note {
    font-size: 12px;
    color: var(--text-placeholder);
    margin: 0 0 20px;
    line-height: 1.5;
}

.tc-speedtest__grid {
    display: grid;
    gap: 16px;
}

.tc-speedtest__row {
    display: grid;
    grid-template-columns: 140px 1fr 100px;
    gap: 16px;
    align-items: center;
    padding: 12px 16px;
    border-radius: 4px;
    background: var(--bg-module);
    border: 1px solid transparent;
    transition: all 0.2s;
}

.tc-speedtest__row:hover {
    background: #fff;
    border-color: var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.tc-speedtest__label {
    font-size: 13px;
    color: var(--text-main);
    font-weight: 500;
}

.tc-speedtest__bar {
    height: 6px;
    background: #e6e9f0;
    border-radius: 3px;
    overflow: hidden;
}

.tc-speedtest__bar > span {
    display: block;
    height: 100%;
    width: 0%;
    background: var(--primary-color);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.tc-speedtest__value {
    font-size: 13px;
    color: var(--text-main);
    text-align: right;
    font-family: "SF Mono", Consolas, monospace;
    font-weight: 500;
}

@media (max-width: 576px) {
    .tc-speedtest__form {
        grid-template-columns: 1fr;
    }
    .tc-speedtest__run {
        width: 100%;
    }
    .tc-speedtest__row {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .tc-speedtest__value {
        text-align: left;
    }
}

.tooltip-title {
    font-weight: 600;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.tooltip-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tooltip-list li {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 4px;
    color: var(--text-secondary);
}

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

.home-cta .cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.home-cta h2 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #fff;
}

.home-cta p {
    font-size: 16px;
    opacity: 0.9;
    margin: 0;
    color: #fff;
}

.home-cta .cta-btn .btn-light {
    background: #fff;
    color: var(--primary-color);
    border-color: #fff;
}

.home-cta .cta-btn .btn-light:hover {
    background: #f2f2f2;
    color: var(--primary-hover);
}

/* ==========================================================================
   Region Selection Section (Tencent Cloud Style)
   ========================================================================== */
.tc-region {
    padding: 60px 0;
    background: #fff;
}

/* Tabs Styling - Centered and Clean */
.tc-region__bar {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.tc-region__tabs {
    display: inline-flex;
    justify-content: center;
    gap: 40px; /* Generous spacing */
    border-bottom: 1px solid transparent; /* Align with bottom line if needed */
    margin: 0 auto;
}

.tc-region__tab {
    position: relative;
    padding: 12px 4px;
    background: none;
    border: none;
    font-size: 16px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    font-weight: 500;
}

.tc-region__tab:hover {
    color: var(--primary-color);
}

.tc-region__tab.is-active {
    color: var(--primary-color);
    font-weight: 600;
}

.tc-region__tab.is-active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 3px 3px 0 0;
    box-shadow: 0 2px 4px rgba(0, 102, 255, 0.2);
}

.tc-region__hint {
    display: none;
}

/* Grid Styling */
.tc-region__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
}

/* Card Item Styling */
.tc-region__item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 4px; /* Tencent style: 4px or 2px */
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.38, 0, 0.24, 1);
    text-align: left;
    position: relative;
    overflow: hidden;
}

.tc-region__item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    background: var(--bg-white);
}

/* Flag */
.tc-region__flag {
    font-size: 24px;
    margin-bottom: 12px;
    border-radius: 2px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Name */
.tc-region__name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 12px;
    line-height: 1.4;
}

/* Tags */
.tc-region__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto; /* Push to bottom if height varies */
}

.tc-region__tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    font-size: 12px;
    color: var(--text-secondary);
    background: var(--bg-module);
    border-radius: 2px;
    border: 1px solid transparent;
}

.tc-region__item:hover .tc-region__tag {
    background: #eef4ff; /* Light blue bg on hover */
    color: var(--primary-color);
}

@media (max-width: 992px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .node-grid { grid-template-columns: repeat(4, 1fr); }
    .infra-container { flex-direction: column; }
    .infra-map-wrap { width: 100%; }
}

@media (max-width: 768px) {
    .home-swiper { min-height: auto; padding-top: 20px; } /* Adjust for mobile */
    .home-swiper .slogan { font-size: 28px; }
    .node-grid { grid-template-columns: repeat(2, 1fr); }
    .home-cta .cta-inner { flex-direction: column; text-align: center; }
    
    .tc-region__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .tc-region__tabs {
        gap: 20px;
        overflow-x: auto;
        padding-bottom: 8px;
        width: 100%;
        justify-content: flex-start;
    }
    
    .tc-region__bar {
        justify-content: flex-start;
        overflow-x: auto;
    }
    
    .tc-region__item {
        padding: 16px;
    }
}

/* Hotspot Positions */
.hotspot-us { top: 35%; left: 22%; }
.hotspot-uk { top: 30%; left: 47%; }
.hotspot-de { top: 32%; left: 51%; }
.hotspot-jp { top: 38%; left: 85%; }
.hotspot-sg { top: 55%; left: 78%; }
.hotspot-hk { top: 45%; left: 80%; }
.hotspot-ca { top: 30%; left: 20%; }
.hotspot-au { top: 75%; left: 88%; }
.hotspot-br { top: 65%; left: 32%; }
.hotspot-nl { top: 31%; left: 49%; }
.hotspot-fr { top: 34%; left: 48%; }
.hotspot-in { top: 48%; left: 70%; }
.hotspot-ae { top: 45%; left: 62%; }
.hotspot-za { top: 70%; left: 54%; }
.hotspot-kr { top: 37%; left: 83%; }

/* Node Swiper Slide */
.node-swiper-slide {
    width: 280px;
    margin-right: 30px;
    flex-shrink: 0; /* Prevent shrinking in flex container */
}