/* ============================================
   Covesion 中文官网 - 移动端增量样式
   仅在 820px 及以下加载布局覆盖，不影响桌面版
   ============================================ */

/* Mobile-only hero content stays out of the desktop layout. */
.hero-mobile-copy,
.hero-mobile-product {
    display: none;
}

@media (max-width: 820px) {
    html {
        scroll-padding-top: 92px;
    }

    body {
        overflow-x: hidden;
        font-size: 15px;
    }

    body.nav-open {
        overflow: hidden;
    }

    .container {
        width: 100%;
        padding-right: 16px;
        padding-left: 16px;
    }

    /* Header */
    .header-inner {
        height: 72px;
    }

    .logo {
        min-width: 0;
        gap: 8px;
    }

    .logo-img {
        width: auto;
        height: 38px !important;
        flex: 0 1 auto;
    }

    .logo-img--brightstars {
        height: 35px !important;
    }

    .logo-text {
        display: none;
    }

    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        padding: 9px;
        margin-right: -8px;
        flex: 0 0 44px;
        border-radius: 50%;
        -webkit-tap-highlight-color: transparent;
    }

    .menu-toggle:focus-visible {
        outline: 2px solid var(--primary);
        outline-offset: 2px;
    }

    .menu-toggle span {
        width: 25px;
        height: 2px;
        border-radius: 2px;
        transform-origin: center;
    }

    .menu-toggle.is-open span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .menu-toggle.is-open span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.is-open span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .nav {
        top: 71px;
        left: 0;
        right: 0;
        display: none;
        width: 100%;
        max-height: calc(100vh - 71px);
        padding: 8px 16px 18px;
        overflow-y: auto;
        background: var(--bg);
        border-radius: 0 0 16px 16px;
        box-shadow: 0 14px 30px rgba(3, 36, 47, 0.16);
    }

    .nav.open {
        display: flex;
    }

    .nav a {
        min-height: 48px;
        padding: 13px 4px;
        font-size: 16px;
        border-bottom: 1px solid rgba(3, 36, 47, 0.09);
    }

    .nav a:last-child {
        border-bottom: 0;
    }

    /* Hero */
    .hero-carousel::before {
        display: block;
        height: clamp(440px, 114vw, 520px);
        padding-top: 0;
    }

    .hero-mobile-copy,
    .hero-mobile-product {
        position: relative;
        z-index: 2;
        display: flex;
        flex-direction: column;
        justify-content: center;
        width: 100%;
        height: 100%;
        padding: 48px 22px 62px;
        color: #fff;
        text-align: left;
    }

    .hero-slide--fixed {
        background:
            linear-gradient(100deg, rgba(3, 36, 47, 0.96) 0%, rgba(3, 36, 47, 0.82) 58%, rgba(3, 36, 47, 0.62) 100%),
            url("../assets/images/hero-bg.jpg") center / cover no-repeat;
    }

    .hero-fixed-bg {
        display: none;
    }

    .hero-fixed-overlay {
        display: none;
    }

    .hero-mobile-eyebrow,
    .hero-mobile-product-label {
        display: inline-flex;
        align-items: center;
        align-self: flex-start;
        min-height: 28px;
        margin-bottom: 18px;
        padding: 4px 10px;
        color: #fff;
        background: rgba(0, 174, 234, 0.18);
        border: 1px solid rgba(51, 196, 240, 0.45);
        border-radius: 999px;
        font-size: 12px;
        font-weight: 500;
        letter-spacing: 0.6px;
    }

    .hero-mobile-copy h1,
    .hero-mobile-product h2 {
        max-width: 560px;
        margin: 0;
        font-size: clamp(30px, 8.2vw, 46px);
        font-weight: 700;
        line-height: 1.22;
        letter-spacing: -0.5px;
    }

    .hero-mobile-copy h1 span {
        color: var(--accent);
    }

    .hero-mobile-copy > p,
    .hero-mobile-product > p {
        max-width: 570px;
        margin-top: 18px;
        color: rgba(255, 255, 255, 0.8);
        font-size: 14px;
        font-weight: 300;
        line-height: 1.75;
    }

    .hero-mobile-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        width: 100%;
        max-width: 360px;
        margin-top: 28px;
    }

    .hero-mobile-actions .btn {
        min-height: 46px;
        padding: 12px 14px;
        font-size: 13px;
    }

    .hero-slide--product {
        background:
            radial-gradient(circle at 86% 16%, rgba(0, 174, 234, 0.38), transparent 34%),
            linear-gradient(135deg, rgba(3, 36, 47, 0.98), rgba(23, 85, 106, 0.9)),
            url("../assets/images/hero-bg.jpg") center / cover no-repeat;
    }

    .hero-slide-img-full {
        display: none;
    }

    .hero-mobile-product-tags {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin-top: 22px;
    }

    .hero-mobile-product-tags span {
        display: inline-flex;
        align-items: center;
        min-height: 34px;
        padding: 6px 12px;
        color: rgba(255, 255, 255, 0.92);
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.22);
        border-radius: 8px;
        font-size: 12px;
    }

    .hero-carousel-dots {
        bottom: 14px;
        gap: 1px;
    }

    .hero-dot {
        position: relative;
        width: 30px;
        height: 30px;
        background: transparent;
    }

    .hero-dot::after {
        content: "";
        position: absolute;
        top: 50%;
        left: 50%;
        width: 9px;
        height: 9px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.5);
        transform: translate(-50%, -50%);
        transition: var(--transition);
    }

    .hero-dot.active {
        background: transparent;
        transform: none;
    }

    .hero-dot.active::after {
        width: 11px;
        height: 11px;
        background: var(--accent);
    }

    /* Shared sections and buttons */
    .section,
    .about-section,
    .about-content,
    .products-section,
    .contact-section {
        padding: 56px 0;
    }

    .section-title {
        margin-bottom: 30px;
        text-align: left;
    }

    .section-title h2 {
        margin-bottom: 8px;
        font-size: 1.75rem;
        line-height: 1.35;
    }

    .section-title p {
        font-size: 0.95rem;
        line-height: 1.65;
    }

    .btn {
        min-height: 46px;
        padding: 12px 24px;
        font-size: 0.875rem;
        touch-action: manipulation;
    }

    .solution-card {
        margin-bottom: 16px;
    }

    .solution-card-header {
        padding: 14px 18px;
        font-size: 1.22rem;
        line-height: 1.4;
    }

    .solution-card-body {
        padding: 16px 18px;
    }

    .solution-card-body > p {
        font-size: 0.9rem;
        line-height: 1.7;
    }

    .solution-card-links a {
        min-height: 44px;
        padding: 10px 0;
        font-size: 0.9rem;
    }

    #product-sections {
        padding: 52px 0 28px;
    }

    /* Homepage about and stats */
    .about-intro {
        margin-bottom: 30px;
    }

    .about-intro h2 {
        margin-bottom: 14px;
        font-size: 1.65rem;
        line-height: 1.35;
    }

    .about-intro p {
        font-size: 0.94rem;
        line-height: 1.75;
    }

    .about-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 28px 10px;
    }

    .about-stat-circle {
        width: 118px;
        height: 118px;
        margin-bottom: 7px;
    }

    .about-stat-number {
        font-size: 1.75rem;
    }

    .about-stat p {
        min-height: 2.8em;
        font-size: 0.78rem;
        line-height: 1.4;
    }

    .features-grid,
    .app-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 14px;
    }

    .feature-block,
    .app-card {
        padding: 24px 22px;
    }

    .feature-block {
        background: var(--bg);
        border: 1px solid var(--border);
        border-radius: var(--radius-sm);
        box-shadow: var(--shadow);
        text-align: left;
    }

    .feature-block .feature-icon {
        margin-right: auto;
        margin-left: 0;
    }

    .feature-icon {
        width: 54px;
        height: 54px;
        margin-bottom: 16px;
    }

    .app-card h3,
    .feature-block h3 {
        margin-bottom: 8px;
        font-size: 1.08rem;
    }

    .app-card p,
    .feature-block p {
        font-size: 0.86rem;
        line-height: 1.65;
    }

    .cta {
        padding: 58px 0 76px;
    }

    .cta h2 {
        font-size: 1.75rem;
        line-height: 1.35;
    }

    .cta p {
        margin-bottom: 24px;
        font-size: 0.95rem;
        line-height: 1.7;
    }

    /* Product marquee */
    .marquee-item {
        width: 210px;
        margin-right: 12px;
    }

    .marquee-item img {
        height: 145px;
    }

    .marquee-label {
        padding: 10px 10px 12px;
        font-size: 0.86rem;
    }

    /* Sub-page hero */
    .page-header {
        padding: 54px 0 48px;
    }

    .page-header h1 {
        margin-bottom: 10px;
        font-size: 2.15rem;
        line-height: 1.3;
    }

    .page-header p {
        font-size: 0.98rem;
        line-height: 1.7;
    }

    /* About page */
    .about-grid {
        grid-template-columns: 1fr;
        gap: 28px;
        direction: ltr !important;
    }

    .about-text h2 {
        margin-bottom: 14px;
        font-size: 1.6rem;
    }

    .about-text p {
        margin-bottom: 14px;
        font-size: 0.94rem;
        line-height: 1.8;
    }

    .about-image {
        height: auto;
        aspect-ratio: 16 / 10;
    }

    /* Products page */
    .products-section {
        padding-top: 24px;
    }

    .product-category-nav {
        top: 72px;
        justify-content: flex-start;
        gap: 8px;
        margin: 0 -16px 32px;
        padding: 10px 16px;
        border-radius: 0;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
    }

    .product-category-nav::-webkit-scrollbar {
        display: none;
    }

    .cat-nav-item {
        min-height: 42px;
        padding: 9px 15px;
        flex: 0 0 auto;
        font-size: 0.8rem;
        scroll-snap-align: start;
    }

    .product-category {
        margin-bottom: 46px;
        scroll-margin-top: 140px;
    }

    .category-header {
        gap: 12px;
        margin-bottom: 22px;
        padding-bottom: 14px;
    }

    .category-badge {
        width: 42px;
        height: 42px;
        font-size: 15px;
    }

    .category-header h2 {
        flex: 1 1 calc(100% - 54px);
        font-size: 1.42rem;
        line-height: 1.35;
    }

    .category-header p {
        flex-basis: 100%;
        margin: 0;
        padding-left: 54px;
        font-size: 0.86rem;
    }

    .category-product-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 14px;
    }

    .mini-product-card {
        display: grid;
        grid-template-columns: 126px minmax(0, 1fr);
        min-height: 168px;
    }

    .mini-product-card:hover {
        transform: none;
    }

    .mini-product-img {
        height: 100%;
        min-height: 168px;
        border-right: 1px solid var(--border);
        border-bottom: 0;
    }

    .mini-product-body {
        min-width: 0;
        padding: 15px 14px 13px;
    }

    .mini-product-body h3 {
        margin-bottom: 6px;
        font-size: 1rem;
        line-height: 1.4;
    }

    .mini-product-body p {
        margin-bottom: 10px;
        font-size: 0.79rem;
        line-height: 1.58;
    }

    .mini-product-body .link {
        display: inline-flex;
        align-items: center;
        min-height: 34px;
        font-size: 0.76rem;
    }

    /* Knowledge page */
    .video-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        gap: 16px;
    }

    .video-thumbnail {
        height: 168px;
    }

    .video-card-body {
        padding: 18px;
    }

    .calculator-wrapper {
        margin-right: -4px;
        margin-left: -4px;
    }

    .ppln-calc-wrapper {
        padding: 20px 16px !important;
    }

    .ppln-calc-preset-btns {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ppln-calc-preset-btn {
        min-height: 38px;
        width: 100%;
    }

    .ppln-calc-result-row {
        gap: 12px;
    }

    .ppln-calc-result-label {
        flex: 0 1 auto;
    }

    .ppln-calc-result-value {
        text-align: right;
    }

    /* Contact page */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 38px;
    }

    .contact-grid > .contact-info + .contact-info {
        margin-top: 0;
        padding-top: 0 !important;
    }

    .contact-info h2 {
        font-size: 1.32rem !important;
        line-height: 1.45;
    }

    .contact-info > p {
        font-size: 0.92rem;
    }

    .contact-item {
        gap: 10px;
        margin-bottom: 18px;
    }

    .contact-item-text p,
    .contact-item-text h4 {
        overflow-wrap: anywhere;
    }

    .contact-info > div:not(.contact-item) {
        margin-right: 0 !important;
        margin-left: 0 !important;
        text-align: center;
    }

    /* Footer */
    .footer {
        padding: 48px 0 24px;
    }

    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 34px 24px;
        margin-bottom: 30px;
    }

    .footer-brand,
    .footer-contact {
        grid-column: 1 / -1;
    }

    .footer-brand .footer-logos {
        justify-content: center;
        gap: 14px;
        padding: 10px 14px;
    }

    .footer-logo {
        max-width: 46%;
        height: 34px;
    }

    .footer-logo--brightstars {
        height: 39px;
    }

    .footer-contact {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 4px 18px;
        align-items: start;
        padding-bottom: 12px;
    }

    .footer-contact h4 {
        grid-column: 1 / -1;
    }

    .footer-contact img {
        grid-column: 2;
        grid-row: 2 / span 2;
        width: 96px !important;
        height: 96px !important;
        margin: 0 !important;
    }

    .footer-bottom {
        padding-top: 20px;
        line-height: 1.8;
        overflow-wrap: anywhere;
    }

    .back-to-top {
        right: 16px;
        bottom: 18px;
        width: 42px;
        height: 42px;
    }
}

@media (max-width: 480px) {
    .hero-mobile-copy,
    .hero-mobile-product {
        padding-right: 20px;
        padding-left: 20px;
    }

    .hero-mobile-copy h1,
    .hero-mobile-product h2 {
        font-size: clamp(28px, 7.7vw, 32px);
    }

    .hero-mobile-copy > p,
    .hero-mobile-product > p {
        font-size: 13px;
    }

    .hero-mobile-actions {
        max-width: none;
    }

    .section,
    .about-section,
    .about-content,
    .contact-section {
        padding: 48px 0;
    }

    .section-title h2 {
        font-size: 1.6rem;
    }

    .about-stats {
        gap: 24px 6px;
    }

    .about-stat-circle {
        width: 108px;
        height: 108px;
    }

    .about-stat-number {
        font-size: 1.58rem;
    }

    .feature-block {
        padding: 22px 18px;
    }

    .page-header {
        padding: 46px 0 42px;
    }

    .page-header h1 {
        font-size: 1.95rem;
    }

    .category-header h2 {
        font-size: 1.28rem;
    }

    .category-header p {
        padding-left: 0;
    }

    .mini-product-card {
        grid-template-columns: 106px minmax(0, 1fr);
        min-height: 176px;
    }

    .mini-product-img {
        min-height: 176px;
    }

    .mini-product-body {
        padding: 14px 12px 11px;
    }

    .mini-product-body p {
        font-size: 0.76rem;
    }

    .video-thumbnail {
        height: 158px;
    }

    .calendar-wrapper,
    .calculator-wrapper {
        margin-right: 0;
        margin-left: 0;
    }

    .footer-grid {
        gap: 32px 18px;
    }

    .footer-contact {
        grid-template-columns: minmax(0, 1fr) 84px;
        gap: 4px 14px;
    }

    .footer-contact img {
        width: 84px !important;
        height: 84px !important;
    }
}

/* Tablet only: keep the existing PC layout untouched above 1200px. */
@media (min-width: 821px) and (max-width: 1200px) {
    html {
        scroll-padding-top: 180px;
    }

    .header-inner {
        height: 80px;
    }

    .logo {
        gap: 8px;
    }

    .logo-img {
        width: auto;
        height: 42px !important;
    }

    .logo-img--brightstars {
        height: 42px !important;
    }

    .logo-text {
        font-size: 12px;
    }

    .nav {
        gap: 24px;
    }

    .nav a {
        font-size: 14px;
    }

    .hero-carousel::before {
        display: block;
        height: 380px;
        padding-top: 0;
    }

    .hero-fixed-bg,
    .hero-slide-img-full,
    .hero-fixed-overlay {
        display: none;
    }

    .hero-slide--fixed {
        background:
            linear-gradient(100deg, rgba(3, 36, 47, 0.96) 0%, rgba(3, 36, 47, 0.82) 58%, rgba(3, 36, 47, 0.62) 100%),
            url("../assets/images/hero-bg.jpg") center / cover no-repeat;
    }

    .hero-slide--product {
        background:
            radial-gradient(circle at 86% 16%, rgba(0, 174, 234, 0.38), transparent 34%),
            linear-gradient(135deg, rgba(3, 36, 47, 0.98), rgba(23, 85, 106, 0.9)),
            url("../assets/images/hero-bg.jpg") center / cover no-repeat;
    }

    .hero-mobile-copy,
    .hero-mobile-product {
        position: relative;
        z-index: 2;
        display: flex;
        flex-direction: column;
        justify-content: center;
        width: 100%;
        height: 100%;
        padding: 44px 64px 58px;
        color: #fff;
        text-align: left;
    }

    .hero-mobile-eyebrow,
    .hero-mobile-product-label {
        display: inline-flex;
        align-items: center;
        align-self: flex-start;
        min-height: 28px;
        margin-bottom: 14px;
        padding: 4px 10px;
        color: #fff;
        background: rgba(0, 174, 234, 0.18);
        border: 1px solid rgba(51, 196, 240, 0.45);
        border-radius: 999px;
        font-size: 12px;
        font-weight: 500;
        letter-spacing: 0.6px;
    }

    .hero-mobile-copy h1,
    .hero-mobile-product h2 {
        max-width: 760px;
        margin: 0;
        font-size: clamp(38px, 4.4vw, 52px);
        font-weight: 700;
        line-height: 1.2;
        letter-spacing: -0.5px;
    }

    .hero-mobile-copy h1 span {
        color: var(--accent);
    }

    .hero-mobile-copy > p,
    .hero-mobile-product > p {
        max-width: 760px;
        margin-top: 12px;
        color: rgba(255, 255, 255, 0.8);
        font-size: 15px;
        font-weight: 300;
        line-height: 1.7;
    }

    .hero-mobile-actions {
        display: flex;
        gap: 12px;
        margin-top: 20px;
    }

    .hero-mobile-actions .btn {
        min-width: 148px;
        min-height: 44px;
    }

    .hero-mobile-product-tags {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin-top: 18px;
    }

    .hero-mobile-product-tags span {
        display: inline-flex;
        align-items: center;
        min-height: 32px;
        padding: 5px 11px;
        color: rgba(255, 255, 255, 0.92);
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.22);
        border-radius: 8px;
        font-size: 12px;
    }

    .hero-carousel-dots {
        bottom: 14px;
    }

    .product-category-nav {
        top: 80px;
    }
}
