/* ============================================
   Font Faces
   ============================================ */

/* ============================================
   CSS Variables (Design Tokens)
   ============================================ */
:root {
    --primary: #ec4b1f;
    --primary-dark: #0038ff;
    --accent: #6B5CE7;
    --accent-dark: #5D3C9E;
    --dark: #1A1A1A;
    --gray-800: #2D3748;
    --gray-600: #64748B;
    --gray-400: #94A3B8;
    --gray-200: #E2E8F0;
    --gray-100: #F1F5F9;
    --gray-50: #F8FAFC;
    --white: #FFFFFF;
    --nav-height: 80px;
    --nav-height-scrolled: 70px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.15);
    --transition-fast: 0.2s cubic-bezier(0.4,0,0.2,1);
    --transition-base: 0.3s cubic-bezier(0.4,0,0.2,1);
    --transition-slow: 0.5s cubic-bezier(0.4,0,0.2,1);
}

/* ============================================
   Global Reset & Base
   ============================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    line-height: 1.6;
    font-size: 16px;
    font-weight: 400;
    visibility: visible;
    font-family: 'pingfang SC','helvetica neue','hiragino sans gb','microsoft yahei ui','microsoft yahei',arial,sans-serif;
    color: var(--dark);
    background: var(--white);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--dark);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.6rem); }
h3 { font-size: clamp(1.2rem, 3vw, 1.6rem); }

p {
    margin-bottom: 0.8rem;
    color: var(--gray-600);
}

ul, li {
    list-style: none;
}
ul {
    padding-left: 0px;
}
a {
    text-decoration: none !important;
    color: inherit;
    transition: color var(--transition-fast);
}
a:hover {
    color: var(--primary);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.pc {
    display: block;
}
@media (max-width: 992px) {
    .pc {
        display: none;
    }
}

.w-90 {
    width: 90%;
    max-width: 1600px;
    margin: 0 auto;
}

.btn:focus,
.btn:active,
.form-control:focus {
    outline: none;
    box-shadow: none;
    border: none;
}

/* ============================================
   Navigation Bar
   ============================================ */
.navbar-custom {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    transition: all var(--transition-base);
    /* 默认透明背景，浮于页面顶部 */
    background: transparent;
    padding: 0 40px;
}

.navbar-custom.scrolled {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-md);
    height: var(--nav-height-scrolled);
}

.navbar-custom .nav-inner {
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-custom .nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.navbar-custom .nav-logo img {
    height: 40px;
    width: auto;
    transition: height var(--transition-base);
}

.navbar-custom.scrolled .nav-logo img {
    height: 34px;
}

.navbar-custom .nav-logo .logo-text {
    font-size: 1.3rem;
    color: var(--dark);
    letter-spacing: -0.5px;
    transition: color var(--transition-base);
}

.navbar-custom .nav-menu {
    display: flex;
    align-items: center;
    gap: 6px;
}

.navbar-custom .nav-menu .nav-link {
    font-size: 0.95rem;
    color: #000;
    padding: 8px 18px;
    border-radius: var(--radius-full);
    position: relative;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.navbar-custom.scrolled .nav-menu .nav-link {
    color: var(--gray-800);
}

.navbar-custom .nav-menu .nav-link::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 50px;
    height: 1px;
    background: var(--primary);
    border-radius: 1px;
    transition: transform var(--transition-fast);
}

.navbar-custom .nav-menu .nav-link:hover {
    color: var(--primary);
}

.navbar-custom.scrolled .nav-menu .nav-link:hover {
    color: var(--primary);
}

.navbar-custom .nav-menu .nav-link:hover::after,
.navbar-custom .nav-menu .nav-link.active::after {
    transform: translateX(-50%) scaleX(1);
}

.navbar-custom .nav-menu .nav-link.active {
    color: var(--primary);
    font-family: 'Roboto-Bold';
}

.navbar-custom.scrolled .nav-menu .nav-link.active {
    color: var(--primary);
}

/* Hamburger Menu Button */
.navbar-custom .nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    background: none;
    border: none;
    z-index: 1200;
    position: relative;
}

.navbar-custom .nav-toggle span {
    display: block;
    width: 26px;
    height: 2px;
    background: var(--dark);
    border-radius: 2px;
    transition: all var(--transition-fast);
}

.navbar-custom.scrolled .nav-toggle span {
    background: var(--dark);
}

/* Hamburger stays as 3 lines - drawer has its own close button */

/* Mobile Drawer - right side */
.nav-menu-mobile {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 280px;
    max-width: 80vw;
    background: #fff;
    z-index: 1100;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -4px 0 20px rgba(0,0,0,0);
    overflow-y: auto;
}

.nav-menu-mobile.open {
    transform: translateX(0);
    box-shadow: -4px 0 20px rgba(0,0,0,0.15);
}

.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1050;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.mobile-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.mobile-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.mobile-drawer-logo {
    height: 28px;
    width: auto;
}

.mobile-drawer-close {
    background: none;
    border: none;
    font-size: 1.4rem;
    color: #666;
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.2s;
}

.mobile-drawer-close:hover {
    color: #000;
}

.mobile-drawer-body {
    display: flex;
    flex-direction: column;
    padding: 12px 0;
}

.mobile-nav-link {
    display: block;
    padding: 14px 24px;
    font-size: 1rem;
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: var(--primary);
    background: rgba(74, 144, 226, 0.06);
    border-left-color: var(--primary);
}

/* Mobile drawer: second-level nav links (indented, lighter) */
.mobile-nav-sublink {
    padding-left: 44px;
    font-size: 0.9rem;
    color: #666;
}

/* Mobile drawer: collapsible parent item + submenu */
.mobile-nav-parent {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
}

.mobile-nav-arrow {
    font-size: 0.8rem;
    color: #999;
    transition: transform 0.25s ease;
}

.mobile-nav-parent.open .mobile-nav-arrow {
    transform: rotate(180deg);
}

.mobile-nav-submenu {
    display: none;
}

/* ============================================
   Mega Menu (Dropdown)
   ============================================ */
.nav-item-dropdown {
    position: relative;
    padding: 15px 0; /* to bridge the gap for hover */
    display: flex;
    align-items: center;
}

.mega-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(15px);
    width: 1200px; /* 增加宽度 */
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-slow); /* 动画更缓慢 */
    padding: 0; /* 去掉整体padding */
    z-index: 1050;
    pointer-events: none;
    cursor: default;
    overflow: hidden; /* 防止内部圆角溢出 */
}

.nav-item-dropdown:hover .mega-menu {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.mega-menu-inner {
    display: flex;
    gap: 0; /* 移除之前的 gap，依靠 padding 和 width 控制间距 */
}

.mega-menu-left {
    width: 320px; /* 相应增加左侧宽度 */
    background-color: #f8fbff;
    background-size: cover;
    background-position: center bottom;
    background-repeat: no-repeat;
    /* 移除之前的 borderRadius 因为外层已经有了 */
    padding: 40px 30px; 
    flex-shrink: 0;
    position: relative;
}

.mega-menu-left h3 {
    color: #111;
    font-size: 1.2rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.mega-menu-left p {
    color: #666;
    font-size: 0.9rem;
}

.mega-menu-right {
    flex-grow: 1;
    padding: 40px; /* 为右侧内容增加独立的 padding */
    padding-bottom: 60px;
}

.mega-menu-header {
    font-size: 0.9rem;
    color: #999;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 40px;
}

.mega-menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 60px 40px;
}

.mega-menu-col {
    display: block;
    padding: 16px;
    border-radius: var(--radius-sm);
    transition: background-color var(--transition-fast);
}

.mega-menu-col:hover {
    background-color: rgba(4, 68, 200, 0.06);
}

.mega-menu-col h4 {
    font-size: 1rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #000;
    font-weight: 400;
}

.mega-menu-col h4 i {
    color: var(--primary);
    font-size: 1.1rem;
}

.mega-menu-col p {
    font-size: 0.75rem;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* ============================================
   Hero / Banner Section
   ============================================ */
.hero-section {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.hero-section .swiper {
    width: 100%;
}

.hero-section .swiper-slide {
    width: 100%;
}

.hero-section .swiper-slide img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* NOTE: banner height is fully adaptive (image natural ratio + Swiper autoHeight).
   Do NOT add a fixed slide height (e.g. 100vh) — an auto-height image inside a
   fixed-height slide leaves a large blank gap below on tablets / narrow windows. */

/* ============================================
   Unified Primary Button
   ============================================ */
.banner-contact-btn,
.media-cta-btn,
.contact-modal-content .submit-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 32px;
    color: #fff;
    /*background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);*/
    background: linear-gradient(90deg, #fc4210 0%, #fc8810 100%);
    border: none;
    border-radius: var(--radius-full);
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                scale 0.3s ease;
    overflow: hidden;
    letter-spacing: 0.5px;
    text-decoration: none;
}

/* Shimmer sweep effect */
.banner-contact-btn::before,
.media-cta-btn::before,
.contact-modal-content .submit-btn::before,
.kol-features-btn::before,
.dsp-store-btn::before,
.dsp-product-btn::before,
.dsp-analysis-btn::before,
.dsp-diagnosis-btn::before,
.strategy-btn::before,
.creative-btn::before,
.promotion-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
    transition: none;
    pointer-events: none;
}

/* Shared hover */
.banner-contact-btn:hover,
.media-cta-btn:hover,
.contact-modal-content .submit-btn:hover {
    box-shadow: 0 8px 10px rgba(74, 144, 226, 0.25);
    transform: translateY(-3px) scale(1.03);
    color: #fff;
}

.banner-contact-btn:hover::before,
.media-cta-btn:hover::before,
.contact-modal-content .submit-btn:hover::before,
.kol-features-btn:hover::before,
.dsp-store-btn:hover::before,
.dsp-product-btn:hover::before,
.dsp-analysis-btn:hover::before,
.dsp-diagnosis-btn:hover::before,
.strategy-btn:hover::before,
.creative-btn:hover::before,
.promotion-btn:hover::before {
    animation: shimmer 0.6s ease-out;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 120%; }
}

/* Per-button specifics */
.banner-contact-btn {
    position: absolute;
    left: 16.5%;
    bottom: 20%;
    z-index: 100;
}

/* Shimmer prerequisites for buttons defined inline in service pages */
/* clip-path instead of overflow:hidden: overflow changes inline-block baseline and shifts surrounding text layout */
.kol-features-btn,
.dsp-store-btn,
.dsp-product-btn,
.dsp-analysis-btn,
.dsp-diagnosis-btn,
.strategy-btn,
.creative-btn,
.promotion-btn {
    position: relative;
    clip-path: inset(0 round 9999px);
}

.contact-modal-content .submit-btn {
    display: flex;
    width: 200px;
    margin: 20px auto 0;
    padding: 14px;
    font-size: 0.9rem;
    font-weight: 600;
}

.media-cta-btn {
    padding: 14px 36px;
}

/* Contact Modal */
.contact-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    visibility: hidden;
    opacity: 0;
}

.contact-modal-content {
    background: #fff;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 700px; /* 增加宽度以适应双列布局 */
    max-height: 90vh; /* 限制最大高度，防止屏幕较小时溢出 */
    position: relative;
    box-shadow: var(--shadow-xl);
    transform: scale(0.9);
    opacity: 0;
    overflow: hidden; /* 确保顶部图片不溢出圆角 */
    display: flex;
    flex-direction: column;
}

/* Modal Header Image */
.modal-header-image {
    width: 100%;
    /* Height follows the image's natural ratio (form.jpg = 1267x337) so that
       background-size: cover matches the container exactly and NEVER crops it.
       Do NOT set a fixed height here — it re-introduces the cropping. */
    height: auto;
    aspect-ratio: 1267 / 337;
    background-size: cover;
    background-position: center;
    position: relative;
    flex-shrink: 0; /* 防止被压缩 */
}

.modal-header-image .header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(29, 32, 136, 0.9) 0%, rgba(4, 68, 200, 0.7) 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 40px;
}

.modal-header-image h2 {
    color: #fff;
    margin-bottom: 10px;
    font-size: 1.6rem;
    text-align: left;
}

.modal-header-image p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin: 0;
}

.modal-form-body {
    padding: 40px;
    background: #fff;
    overflow-y: auto; /* 允许表单内容区域滚动 */
    flex-grow: 1; /* 占据剩余空间 */
}

.close-modal-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: rgba(255,255,255,0.2);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    cursor: pointer;
    z-index: 10;
    transition: background var(--transition-fast), transform var(--transition-fast);
}

.close-modal-btn:hover {
    background: rgba(255,255,255,0.4);
    color: #fff;
    transform: rotate(90deg);
}

/* Form Grid Layout */
.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 10px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.half-width {
    width: calc(50% - 15px);
}

.form-group.full-width {
    width: 100%;
}

.contact-modal-content label {
    display: block;
    margin-bottom: 8px;
    color: var(--gray-800);
    font-weight: 500;
    font-size: 0.8rem;
}

.contact-modal-content label .required {
    color: #e53e3e;
    margin-right: 4px;
}

.contact-modal-content input,
.contact-modal-content select,
.contact-modal-content textarea {
    width: 100%;
    padding: 8px 15px;
    background-color: var(--gray-50);
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--dark);
    transition: all var(--transition-fast);
}

.contact-modal-content input:focus,
.contact-modal-content select:focus,
.contact-modal-content textarea:focus {
    outline: none;
    background-color: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(4, 68, 200, 0.1);
}

.contact-modal-content select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
}

.contact-modal-content .submit-btn:hover {
    /*background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);*/
    scale: calc(0.95) !important;
}

/* Responsive Modal */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 20px;
    }
    .form-group.half-width {
        width: 100%;
    }
    /* .modal-header-image: no fixed mobile height — aspect-ratio keeps it uncropped */
    .modal-header-image .header-overlay {
        padding: 0 20px;
    }
    .modal-header-image h2 {
        font-size: 1.3rem;
    }
    .modal-form-body {
        padding: 20px;
    }
}


/* ============================================
   Global Media Resources Section
   ============================================ */
.media-resources-section {
    padding: 80px 5%;
    background: #fff;
    position: relative;
    overflow: hidden;
}

.media-resources-inner {
    max-width: 1300px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 5fr 6fr;
    gap: 10px;
    align-items: center;
}

/* Left: Text */
.media-text {
    padding-right: 0px;
}

.media-text h2 {
    font-size: 2rem;
    line-height: 1.4;
    margin-bottom: 50px;
    font-weight: 700;
}

.media-text .media-subtitle {
    color: var(--gray-600);
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 32px;
}

.media-features {
    list-style: none;
    padding: 0;
    margin-bottom: 50px;
    margin-left: 30px;
}

.media-features li {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 7px 0;
    font-size: 1.15rem;
    color: var(--gray-600);
}

.media-features li .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fc4210;
    flex-shrink: 0;
}

.media-cta-btn {
    padding: 14px 36px;
}

/* Right: Sphere */
.media-sphere-wrap {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    min-height: 580px; /* raised with camera pullback (z=380) to keep globe visual size unchanged */
    isolation: isolate;
}

#three-globe-container {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    cursor: grab;
    z-index: 1;
    overflow: visible;
}

#three-globe-container:active {
    cursor: grabbing;
}

#three-globe-container::after {
    content: '';
    position: absolute;
    /* Fixed px matched to the globe's rendered diameter (min-height 580 + camera z=380 → ~412px).
       Do NOT use % — it drifts against the fixed-size globe and exposes a white gap ring on wide screens. */
    width: 430px;
    aspect-ratio: 1;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    box-shadow: 0 0 70px 15px rgba(255, 122, 29, 0.45);
    pointer-events: none;
    z-index: 0;
}
@media (max-width:992px){
    #three-globe-container::after {
        box-shadow: 0 0 70px -20px rgba(255, 122, 29, 0.45);
    }
}

@media (max-width: 451px) {
    .media-text h2 {
        font-size: 1.2rem;
    }
}

#three-globe-container canvas {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 1;
}

/* ============================================
   Core Services Section - Expandable Cards
   ============================================ */
.services-section {
    padding: 80px 5%;
    /*background: linear-gradient(180deg, #fff 0%, #EEF4FF 100%);*/
    overflow: hidden;
}

.services-inner {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    container-type: inline-size; /* Enable cqw units for exact expanded-width calculation */
}

/* --- Individual Card --- */
.service-card {
    flex: 2;
    min-width: 80px;
    height: 39.875rem;
    background: linear-gradient(1deg, #ffe2d2, #ffbf81);
    border-radius: var(--radius-lg);
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: flex 1.25s cubic-bezier(0.25, 1, 0.5, 1),
                background 1.25s ease;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    position: relative;
    opacity: .85;
}

.service-card.expanded {
    flex: 6;
    background: linear-gradient(1deg, #fde8e4, #fce7de);
    box-shadow: 0 4px 15px rgba(255, 140, 0, 0.25);
    border: 1px solid rgba(255, 97, 53, .1);
    opacity: 1;
}

/* --- Card Top (always visible) --- */
.card-top {
    display: flex;
    align-items: flex-start;
    padding: 28px 28px 0;
    flex-shrink: 0;
    position: relative; /* Make it a positioning context for the arrow */
}

.card-title-wrap {
    flex: 1;
    min-width: 0; /* Allow text to wrap naturally within collapsed width */
    transition: padding-right 0.6s ease;
}

.service-card.expanded .card-title-wrap {
    padding-right: 40px; /* Leave space for absolute arrow when expanded */
}

.card-title-wrap h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 20px;
    white-space: nowrap;
}
@media (max-width:992px){
    .card-title-wrap h3 {
        white-space:unset;
    }
}

/* Collapsed subtitle - visible by default, hidden instantly when expanded */
.subtitle-collapsed {
    font-size: 1rem;
    color: var(--dark);
    line-height: 1.6;
    margin: 0;
    margin-bottom: 20px;
    /* Fixed width based on collapsed card width to prevent reflow */
    width: 130px;
    white-space: normal;
    word-break: break-all;
}

.service-card.expanded .subtitle-collapsed {
    display: none;
}

/* Expanded subtitle - inside card-expand, animated by parent */
.subtitle-expanded {
    font-size: 1rem;
    color: var(--dark);
    line-height: 1.6;
    margin: 0;
    margin-bottom: 16px;
    /* No individual animation, parent .card-expand handles it */
}

/* --- Arrow --- */
.card-arrow {
    position: absolute;
    right: 28px;
    top: 28px;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: #ff6135; /* White background as per reference */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .9rem; /* Slightly larger icon */
    color: #fff; /* Dark color as per reference */
    transition: opacity 0.6s ease, visibility 0.6s ease; /* Removed transform from here, handled by animation/rotation */
    opacity: 0;
    text-decoration: none;
    z-index: 5;
    cursor: pointer;
    visibility: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05); /* Optional: add slight shadow to pop off light blue background */
}

@media (max-width:992px){
    .services-inner-2 .card-arrow{
        top: 40px;
    }
    .operation-text{
        position: relative;
    }
    .operation-arrow{
        position: absolute;
        top: 40px;
        right: 32px;
    }
}

@keyframes arrowBounceLeftRight {
    0%, 100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(4px); /* Bounce slightly to the right */
    }
}

.service-card.expanded .card-arrow {
    opacity: 1;
    visibility: visible;
}
.service-card.expanded .card-arrow i{
    color: #fff;
    opacity: 1;
    visibility: visible;
    /* Arrow points right natively, add bounce animation */
    animation: arrowBounceLeftRight 1.5s ease-in-out infinite;
}

/* --- Expandable Content --- */
.card-expand {
    padding: 0 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Text wrapper inside card-expand - animated as one unit */
.card-expand-text {
    opacity: 0;
    transform: translateX(-30px);
    transition: none; /* Instant hide when collapsing */
    min-width: calc((100cqw - 64px) * 6 / 14 - 32px); /* Exact expanded content width: (container - 4*16px gap) * 6/14 - 30px padding - 2px border, zero reflow at any viewport */
}

.service-card.expanded .card-expand-text {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 1s ease 0.3s, transform 1s cubic-bezier(0.25, 1, 0.5, 1) 0.3s; /* Slow fade in when expanding */
}

.card-list {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
    /* No individual animation, parent .card-expand handles it */
    min-width: 450px; /* Prevent text wrapping from pushing image down */
}

.service-card.expanded .card-list {
    /* No individual animation */
}

.card-list li {
    position: relative;
    padding: 7px 0 7px 16px;
    font-size: 0.85rem;
    color: var(--gray-800);
    line-height: 1.6;
}

.card-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 14px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fc4210;
}

/* --- Card Image --- */
.card-image {
    position: absolute;
    bottom: 28px;
    left: 0px;
    height: 325px; /* Larger image */
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin: 0;
}

.card-image img {
    display: block;
    height: 100%;
    width: auto; /* Natural width to prevent cropping/distortion */
    max-width: none; /* Prevent constraint by parent */
    border-radius: var(--radius-sm);
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.service-card.expanded .card-image img:hover {
    transform: scale(1.03);
}

/* --- Full-Chain Operation Card --- */
.services-bottom {
    max-width: 1300px;
    margin: 0 auto;
    margin-top: 40px;
}

.operation-card {
    background: linear-gradient(1deg, #fde8e4, #fce7de);
    border-radius: var(--radius-lg);
    box-shadow: 0 0px 4px rgba(74, 144, 226, 0.05);
    height: 30rem;
    display: grid;
    grid-template-columns: 5fr 7fr;
    overflow: hidden;
}

.operation-text {
    padding: 48px 32px 48px 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.operation-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
    margin: 0 0 36px;
}

.operation-group {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 40px;
}

.operation-item h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark);
    margin: 0 0 8px;
}

.operation-item p {
    font-size: 0.85rem;
    color: var(--gray-600);
    line-height: 1.7;
    margin: 0;
}

.operation-arrow {
    width: 44px;
    height: 44px;
    background: #ff6135;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
    text-decoration: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.operation-arrow:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 16px rgba(74, 144, 226, 0.2);
    color: #fff;
}

.operation-image {
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 24px 24px 0;
}

.operation-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: var(--radius-lg);
}

/* ============================================
   Ecological Partners Section - Infinite Scroll
   ============================================ */
.partners-section {
    padding: 80px 0 60px;
    background: #fff;
    overflow: hidden;
}

.partners-section h2 {
    text-align: center;
    font-size: 2.8rem;
    font-weight: 600;
    color: #000;
    margin: 0 0 16px;
}

.partners-desc {
    text-align: center;
    font-size: 0.95rem;
    color: var(--gray-600);
    max-width: 720px;
    margin: 0 auto 48px;
    line-height: 1.7;
    padding: 0 20px;
}

.partners-scroll {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.partners-track {
    display: flex;
    width: max-content;
    will-change: transform;
    font-size: 0; /* eliminate inline whitespace between images */
}

.partners-track img {
    height: 110px;
    width: auto;
    flex-shrink: 0;
    object-fit: contain;
}

/* Row 1: scroll left (standard direction) */
.track-1 {
    animation: scrollLeft 40s linear infinite;
}

/* Row 2: scroll right (reverse direction for visual variety) */
.track-2 {
    animation: scrollRight 45s linear infinite;
}

@keyframes scrollLeft {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes scrollRight {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}

.partners-track:hover {
    animation-play-state: paused;
}

/* ============================================
   Customer Cases Section
   ============================================ */
.cases-section {
    padding: 80px 5%;
    background: #f7f8fc;
}

.cases-section h2 {
    text-align: center;
    font-size: 2.8rem;
    font-weight: 600;
    color: #000;
    margin: 0 0 80px;
}

.cases-grid {
    max-width: 1300px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* --- Case Card --- */
.case-card {
    position: relative;
    height: 420px;
    border-radius: 20px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.4s ease;
}

.case-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.18);
}

/* Background elements (no longer used for slide-up effect) */
.case-bg-img,
.case-overlay {
    display: none;
}

/* --- Default State --- */
.case-default {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.case-thumb {
    height: 55%;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
    z-index: 5;
}

.case-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.case-default .case-tags {
    padding: 16px 20px 0;
    transition: opacity 0.3s ease;
}

.case-default h4 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 10px 20px 0;
    line-height: 1.4;
    transition: opacity 0.3s ease;
}

.case-default p {
    font-size: 0.85rem;
    color: var(--gray-600);
    line-height: 1.7;
    margin: 8px 20px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: opacity 0.3s ease;
}
@media (max-width:992px){
    .case-default p{
        -webkit-line-clamp: 2;
    }
}

.case-card:hover .case-default .case-tags,
.case-card:hover .case-default h4,
.case-card:hover .case-default p {
    opacity: 0;
}

/* --- Tags --- */
.case-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.case-tags span {
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 500;
    background: #f0f2f7;
    color: #333;
    transition: background 0.3s ease, color 0.3s ease;
}

/* --- Hover State: slide-up panel --- */
.case-hover {
    position: absolute;
    top: 15%;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    padding: 24px 24px 28px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap:15px;
    color: #fff;
    background: linear-gradient(180deg, rgba(255, 177, 125, .8), #ff9655);
    box-shadow: .25rem .25rem 1.25rem 0 rgba(0,0,0,.2),0 .125rem .75rem 0 rgba(0,0,0,.1);
    border-radius: 20px 20px 0 0;
    transform: translateY(100%);
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.case-card:hover .case-hover {
    transform: translateY(0);
}

.case-hover .case-tags {
    margin-bottom: 20px;
}

.case-hover .case-tags span {
    background: rgba(255,255,255,1);
    color: #000;
    backdrop-filter: blur(4px);
}

.case-hover h4 {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0 0 8px;
    line-height: 1.4;
    color: #fff;
}

.case-hover p {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.8);
    line-height: 1.65;
    margin: 0 0 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- Metrics --- */
.case-metrics {
    display: flex;
    gap: 24px;
    margin-bottom: 40px;
}

.metric {
    display: flex;
    flex-direction: column;
}

.metric strong {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}

.metric strong small {
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(255,255,255,0.95);
}

.metric span {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.6);
    margin-top: 4px;
}

/* --- CTA Link --- */
.case-cta {
    font-size: 1rem;
    color: #fff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: gap 0.3s ease;
    margin-top: auto;
}

.case-cta:hover {
    gap: 8px;
    color: #fff;
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
    /*background: linear-gradient(180deg, #1a1a1a, #0f0868 49%, #0f0868);*/
    background: #3a302b;
    color: #c8cbda;
    font-size: 0.85rem;
    line-height: 1.7;
}

.footer-main {
    max-width: 2250px;
    width: 90%;
    margin: 0 auto;
    padding: 100px 0 0;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    padding-bottom: 40px;
}

/* --- Brand Column --- */
.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 50px;
    flex-shrink: 0;
    min-width: 200px;
}

.footer-logo {
    width: 100%;
    max-width: 256px;
    /*filter: brightness(0) invert(1);*/ /* white logo on dark bg */
}

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-contact .contact-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 20px;
}

.footer-contact .contact-address p {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: #fff;
    font-size: 0.85rem;
    line-height: 1.6;
    margin: 0 0 4px;
}

.footer-contact .contact-address i {
    margin-top: 4px;
}

.footer-contact a {
    color: #fff;
    text-decoration: none;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s ease;
}

.footer-contact a:hover {
    color: #fff;
}

.footer-contact i {
    font-size: 0.8rem;
    width: 16px;
    text-align: center;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.social-icon-wrap {
    position: relative;
}

.social-qr {
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) scale(0.8);
    opacity: 0;
    visibility: hidden;
    background: #fff;
    border-radius: 5px;
    padding: 3px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    z-index: 100;
}

.social-qr::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #fff;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.1));
}

.social-qr img {
    width: 120px;
    height: 120px;
    display: block;
    border-radius: 6px;
}

.social-icon-wrap:hover .social-qr {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) scale(1);
}

.social-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.9rem;
    text-decoration: none;
    transition: background 0.3s ease, color 0.3s ease;
}

.social-icon:hover {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

.social-icon img {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

/* --- Nav Columns --- */
.footer-nav {
    display: grid;
    grid-template-columns: repeat(4, auto);
    gap: 100px;
    justify-content: end;
    margin-left: auto;
}

.footer-col h5 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    margin: 0 0 50px;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col li {
    margin-bottom: 15px;
}

.footer-col a {
    color: #fff;
    text-decoration: none;
    font-size: 0.84rem;
    position: relative;
    display: inline-block;
}

.footer-col a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 1px;
    background: #fff;
    transition: width 0.3s ease;
}

.footer-col a:hover::after {
    width: 100%;
}

/* --- Friend Links --- */
.footer-links-bar {
    padding: 20px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 0.82rem;
}

.links-label {
    color: #fff;
    white-space: nowrap;
}

.footer-links-bar a {
    color: #fff;
    text-decoration: none;
    position: relative;
    display: inline-block;
}

.footer-links-bar a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 1px;
    background: #fff;
    transition: width 0.3s ease;
}

.footer-links-bar a:hover::after {
    width: 100%;
}

/* --- Divider --- */
.footer-divider {
    height: 1px;
    background: rgba(255,255,255,0.08);
    max-width: 2250px;
    width: 90%;
    margin: 0 auto;
}

/* --- Copyright --- */
.footer-bottom {
    max-width: 2250px;
    width: 90%;
    margin: 0 auto;
    padding: 16px 0;
}

.footer-bottom-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    font-size: 0.78rem;
    color: #fff;
    gap: 12px;
}

.bottom-left {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.bottom-right {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-bottom-inner a {
    color: #fff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-bottom-inner a:hover {
    color: #fff;
}

.footer-bottom-inner i {
    margin-right: 4px;
}

/* ============================================
   Responsive Design
   ============================================ */

/* Tablet (769px - 1024px) */
@media (max-width: 1024px) {
    .navbar-custom {
        padding: 0 24px;
    }

    .navbar-custom .nav-menu .nav-link {
        padding: 8px 12px;
        font-size: 0.88rem;
    }

    .media-resources-inner {
        gap: 30px;
    }

    .media-text h2 {
        font-size: 1.6rem;
    }

    /* Tablet: cards stack full-width like mobile (no expand/collapse) */
    .services-inner {
        flex-direction: column;
        gap: 12px;
    }

    /* Carousel mode (JS adds .swiper to .services-inner at <=1024px):
       horizontal slider replaces the stacked column above */
    .services-inner.swiper {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 0;
    }

    .services-inner.swiper .swiper-slide {
        min-width: 0;   /* override the stacked min-width: 100% */
        height: auto;   /* slides stretch to equal height (cards are fully expanded) */
    }

    .services-inner.swiper .swiper-pagination {
        position: static;
        margin-top: 14px;
    }

    .services-inner.swiper .swiper-pagination-bullet {
        background: #e8cdbd;
        opacity: 1;
    }

    .services-inner.swiper .swiper-pagination-bullet-active {
        background: var(--primary);
    }

    /* Carousel: arrows always visible and pointing right —
       never rely on the .expanded toggle (Swiper may swallow tap clicks),
       and kill the mobile down-arrow rotate animation */
    .services-inner.swiper .service-card .card-arrow {
        opacity: 1;
        visibility: visible;
        animation: none;
    }

    .services-inner.swiper .service-card .card-arrow i {
        animation: arrowBounceLeftRight 1.5s ease-in-out infinite;
    }

    /* All slides stay fully expanded (padding equal to the PC expanded state) */
    .services-inner.swiper .service-card .card-expand {
        padding-top: 14px;
        padding-bottom: 20px;
    }

    /* Align card images to the slide bottom (margin-top: auto inside the
       stretched flex column) so images line up across cards while swiping;
       the 20px comes from card-expand padding-bottom above */
    .services-inner.swiper .service-card .card-image {
        margin-top: auto;
    }

    /* The data cards have shorter text — lift images a bit off the bottom so
       they don't sit too low; total bottom gap = 20px card-expand padding + 30px */
    .services-inner-2.swiper .service-card .card-image {
        margin-bottom: 30px;
    }

    /* Carousel: neutralize the tap/expand visual toggle — cards must look
       identical regardless of .expanded (no background/opacity/shadow shift
       when tapping; covers both click and emulated mouseenter) */
    .services-inner.swiper .service-card {
        opacity: 1;
        background: linear-gradient(1deg, #fde8e4, #fce7de);
        /*box-shadow: 0 4px 15px rgba(255, 140, 0, 0.25);*/
        border: 1px solid rgba(255, 97, 53, .1);
    }

    .service-card.expanded{
        box-shadow: none;
    }

    .service-card {
        flex: none;
        min-width: 100%;
        height: auto;
    }

    .service-card.expanded {
        flex: none;
        height: auto;
    }

    .card-list {
        transform: none;
        min-width: 0;
    }

    .card-expand-text {
        min-width: 0;
    }

    .card-title-wrap {
        min-width: 0;
    }

    .subtitle-collapsed,
    .subtitle-expanded {
        font-size: 0.9rem;
    }

    .subtitle-collapsed {
        width: auto;
        max-width: 100%;
        word-break: normal;
    }

    .card-top {
        padding: 20px 16px 0;
    }

    .card-expand {
        padding: 0 16px;
    }

    .card-expand-text {
        /* No slide animation on tablet */
        opacity: 1;
        transform: none;
        transition: none;
    }

    .card-image {
        position: relative;
        bottom: auto;
        left: auto;
        width: 100%;
        height: auto;
        margin-top: 20px;
    }

    .card-image img {
        width: 100%;
        height: auto;
        max-width: 100%;
    }

    .service-card.expanded .card-expand {
        padding-top: 14px;
        padding-bottom: 20px;
    }
}

/* Mobile (≤ 768px) */
@media (max-width: 768px) {
    :root {
        --nav-height: 64px;
        --nav-height-scrolled: 58px;
    }

    /* Banner mobile height */
    .hero-section .swiper-slide {
        height: auto;
        max-height: 100%;
    }

    .hero-section .swiper-slide img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center 30%;
    }

    .banner-contact-btn {
        left: 50%;
        bottom: 10%;
        transform: translateX(-50%);
    }

    .navbar-custom {
        padding: 0 16px;
    }

    .navbar-custom .nav-menu,
    .navbar-custom .nav-menu *,
    .navbar-custom .nav-item-dropdown,
    .navbar-custom .mega-menu {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
        height: 0 !important;
        overflow: hidden !important;
    }

    .navbar-custom .nav-toggle {
        display: flex;
    }

    .navbar-custom.scrolled .nav-toggle {
        display: flex;
        z-index: 1200;
    }

    /* Hide hamburger when drawer is open */
    body.menu-open .navbar-custom .nav-toggle {
        display: none;
    }

    /* Hide navbar logo when drawer is open */
    body.menu-open .navbar-custom .nav-logo {
        visibility: hidden;
    }

    .nav-menu-mobile {
        display: flex;
    }

    .mobile-overlay {
        display: block;
    }

    .navbar-custom .nav-logo img {
        max-height: 26px;
    }

    .media-resources-section {
        padding: 60px 20px;
    }

    .media-resources-inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .media-text {
        padding-right: 0;
        text-align: center;
    }

    .media-text h2 {
        font-size: 1.35rem;
    }

    .media-features {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 4px 12px;
        margin-left: 10%;
    }

    .media-features li {
        justify-content: start;
        gap: 8px;
        font-size: 0.9rem;
    }

    .media-cta-btn {
        justify-content: center;
    }

    .media-sphere-wrap {
        min-height: 420px;
    }

    /* Globe glow disc matched to mobile globe diameter (~299px) */
    #three-globe-container::after {
        width: 315px;
    }

    .services-section {
        padding: 50px 16px;
        padding-top: 10px;
    }

    .services-inner {
        flex-direction: column;
        gap: 12px;
    }

    .service-card {
        flex: none;
        min-width: 100%;
        height: auto;
    }

    .service-card.expanded {
        flex: none;
        height: auto;
    }

    .card-list {
        transform: none;
        min-width: 0;
    }

    .card-expand-text {
        min-width: 0;
    }

    .card-title-wrap {
        min-width: 0;
    }

    .subtitle-collapsed,
    .subtitle-expanded {
        font-size: 0.9rem;
    }

    /* Mobile cards are always full-width (no collapse animation), remove PC fixed-width reflow protection */
    .subtitle-collapsed {
        width: auto;
        max-width: 100%;
        word-break: normal;
    }

    .card-top {
        padding: 20px 20px 0;
    }

    .card-expand {
        padding: 0 20px;
    }

    .card-expand-text {
        /* No slide animation on mobile */
        opacity: 1;
        transform: none;
        transition: none;
    }

    .card-image {
        position: relative;
        bottom: auto;
        left: auto;
        width: 100%;
        height: auto;
        margin-top: 20px;
    }

    .card-image img {
        width: 100%;
        height: auto;
        max-width: 100%;
    }

    .service-card.expanded .card-expand {
        padding-top: 14px;
        padding-bottom: 20px;
    }

    .service-card.expanded .card-arrow {
        /* On mobile, cards expand downwards, so arrow should point down and bounce up/down */
        animation: arrowBounceUpDown 1.5s ease-in-out infinite;
    }

    @keyframes arrowBounceUpDown {
        0%, 100% {
            transform: rotate(90deg) translateY(0);
        }
        50% {
            transform: rotate(90deg) translateY(4px); /* Because it's rotated 90deg, translateY moves it down visually */
        }
    }

    .operation-card {
        height: auto;
        grid-template-columns: 1fr;
    }

    .operation-text {
        padding: 28px 20px;
    }

    .operation-arrow {
        /* 992 breakpoint puts it top-right; match the mobile padding here */
        top: 28px;
        right: 20px;
    }

    .operation-group {
        margin-bottom: 24px;
    }

    .operation-image {
        height: 220px;
        padding: 0 20px 20px;
    }

    .partners-section {
        padding: 50px 0 40px;
    }

    .partners-section h2 {
        font-size: 2rem;
    }

    .partners-desc {
        font-size: 0.85rem;
        margin-bottom: 32px;
    }

    .partners-track img {
        height: 72px;
    }

    .cases-section h2 {
        font-size: 2rem;
    }

    .cases-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .case-card {
        height: 380px;
    }

    .footer-inner {
        flex-direction: column;
        gap: 32px;
    }

    .footer-nav {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
        justify-content: start;
        margin-left: 0;
    }

    .footer-bottom-inner {
        flex-direction: column;
        gap: 8px;
        text-align: center;
        align-items: center;
    }

    .bottom-left,
    .bottom-right {
        justify-content: center;
    }
}

/* Body state when mobile menu is open */
body.menu-open {
    overflow: hidden;
}
