/* ==========================================================================
   CLIENTS & TESTIMONIALS PAGE STYLES
========================================================================== */

.clients-page-wrapper { background: #ffffff; color: var(--text-main); }
.container { max-width: 1180px; margin: 0 auto; padding: 0 2rem; }
.section-header { margin-bottom: 4rem; }
.section-header.center { text-align: center; }
.section-header h2 { font-size: 2.8rem; font-weight: 900; letter-spacing: -1px; color: var(--text-main); margin-bottom: 1rem; line-height: 1.2; }
.section-header p { font-size: 1.15rem; color: var(--text-muted); max-width: 700px; line-height: 1.6; }
.section-header.center p { margin: 0 auto; }

/* 实现点击后平滑滚动 */
html { scroll-behavior: smooth; }

/* ==========================================================================
   1. HERO SECTION
========================================================================== */
.clients-hero {
    background: linear-gradient(180deg, #050a16 0%, #030612 100%);
    color: #ffffff;
    padding: 9rem 0 7rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.hero-kicker { 
    display: inline-flex; align-items: center; gap: 8px; font-size: 0.85rem; 
    font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; 
    color: #94a3b8; margin-bottom: 1.5rem; 
    background: rgba(255,255,255,0.03); padding: 6px 16px; 
    border-radius: 99px; border: 1px solid rgba(255,255,255,0.08); 
}
.hero-kicker .dot { width: 6px; height: 6px; background: var(--primary-orange); border-radius: 50%; }
.clients-hero h1 { font-size: 4rem; font-weight: 900; line-height: 1.1; letter-spacing: -1.5px; margin-bottom: 1.5rem; color: #f8fafc; max-width: 900px; margin-inline: auto; }
.clients-hero .lead { font-size: 1.25rem; color: rgba(148, 163, 184, 0.9); max-width: 800px; margin: 0 auto 4rem; line-height: 1.6; }

.hero-stats-grid { display: flex; justify-content: center; gap: 5rem; flex-wrap: wrap; padding-top: 3rem; border-top: 1px solid rgba(255,255,255,0.08); max-width: 800px; margin: 0 auto;}
.stat-item { display: flex; flex-direction: column; align-items: center; }
.stat-num { font-size: 3rem; font-weight: 900; color: #ffffff; line-height: 1; margin-bottom: 0.5rem; }
.stat-label { font-size: 0.9rem; font-weight: 700; color: var(--primary-orange); text-transform: uppercase; letter-spacing: 1px; }

/* ==========================================================================
   2. FEATURED TESTIMONIALS (S-Class)
========================================================================== */
.featured-stories { padding: 8rem 0; background: #f8fafc; border-bottom: 1px solid var(--line); }
.featured-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }

.feat-card { background: #ffffff; padding: 3rem; border-radius: 20px; border: 1px solid var(--line); display: flex; flex-direction: column;}
.feat-card.highlight-card { border: 1px solid rgba(249, 115, 22, 0.4); box-shadow: 0 20px 40px rgba(249, 115, 22, 0.08); }
.feat-badge { background: rgba(249, 115, 22, 0.1); color: var(--primary-orange); font-size: 0.85rem; font-weight: 800; padding: 6px 14px; border-radius: 6px; display: inline-block; width: fit-content; margin-bottom: 1.5rem; text-transform: uppercase;}

.feat-quote { font-size: 1rem; font-weight: 500; color: var(--text-main); line-height: 1.7; margin-bottom: 3rem; font-style: italic; flex-grow: 1;}
.feat-author { display: flex; align-items: center; gap: 1.2rem; }
.feat-author .testi-avatar { width: 54px; height: 54px; border-radius: 50%; background: #f1f5f9; display: flex; align-items: center; justify-content: center; color: var(--text-muted); flex-shrink: 0;}
.feat-author h4 { font-size: 1.05rem; font-weight: 850; color: var(--bg-navy); margin: 0 0 2px; }
.feat-author p { font-size: 0.9rem; color: var(--text-muted); font-weight: 600; margin: 0; }

/* ==========================================================================
   3. INDUSTRY NAV & MATRIX ROSTER
========================================================================== */
.industry-matrix { padding: 8rem 0; background: #ffffff; }

/* 🔥 行业快捷导航栏样式 */
.industry-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem;
    margin-bottom: 4rem; /* 稍微拉开与下方内容的间距 */
    position: sticky;
    top: 70px; /* 悬浮在顶部，留出 Header 的空间 */
    z-index: 100; /* 确保悬浮在最高层 */
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1rem 0;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}
.industry-nav a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 99px;
    background: var(--section-bg-light);
    border: 1px solid var(--line);
    transition: all 0.2s ease;
}
.industry-nav a:hover {
    color: #fff;
    background: var(--bg-navy);
    border-color: var(--bg-navy);
    transform: translateY(-2px);
}

.roster-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
    gap: 4rem 3rem; 
}
.roster-category {
    /* 🚨 极其关键：防止锚点跳转时被顶部导航栏遮挡标题 */
    scroll-margin-top: 140px; 
}
.roster-category h3 { 
    display: flex; align-items: center; gap: 10px; 
    font-size: 1rem; font-weight: 850; color: var(--bg-navy); 
    margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 2px solid var(--line);
}
.roster-category h3 i { width: 20px; height: 20px; color: var(--primary-orange); }
.roster-category ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.8rem; }
.roster-category li { 
    font-size: 0.9rem; font-weight: 600; color: #475569; 
    position: relative; padding-left: 14px; line-height: 1.2;
}
.roster-category li::before { 
    content: "•"; position: absolute; left: 0; top: -2px; 
    color: #cbd5e1; font-size: 1.2rem; 
}

/* 🔥 折叠按钮样式 */
.toggle-list-btn {
    background: transparent;
    border: none;
    color: var(--primary-orange);
    font-size: 0.95rem;
    font-weight: 800;
    padding: 0;
    margin-top: 1.2rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    transition: color 0.2s;
}
.toggle-list-btn:hover {
    color: var(--orange-hover);
    text-decoration: underline;
}

/* 🔥 展开时的下拉动画 */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   4. WALL OF LOVE (Masonry Layout)
========================================================================== */
.wall-of-love { padding: 8rem 0; background: #f8fafc; border-top: 1px solid var(--line); }

/* Pure CSS Masonry Magic */
.masonry-grid {
    column-count: 3; /* Desktop: 3 columns */
    column-gap: 1.5rem;
    width: 100%;
}

.masonry-card {
    break-inside: avoid; /* Prevents cards from breaking across columns */
    background: #ffffff;
    border: 1px solid var(--line);
    padding: 2.2rem;
    border-radius: 16px;
    margin-bottom: 1.5rem; /* Vertical gap between cards */
    box-shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s;
}
.masonry-card:hover { transform: translateY(-4px); border-color: #cbd5e1; }

.masonry-card p { font-size: 1.05rem; font-weight: 500; color: #334155; line-height: 1.7; margin-bottom: 1.8rem; }
.m-author { font-size: 0.9rem; color: #64748b; line-height: 1.5; border-top: 1px solid #f1f5f9; padding-top: 1.2rem;}
.m-author strong { color: var(--bg-navy); font-weight: 800; font-size: 0.95rem;}

/* ==========================================================================
   RESPONSIVE DESIGN
========================================================================== */
@media (max-width: 992px) {
    .clients-hero h1 { font-size: 3rem; }
    .hero-stats-grid { gap: 3rem; }
    .featured-grid { grid-template-columns: 1fr; }
    .masonry-grid { column-count: 2; } /* Tablet: 2 columns */
}
@media (max-width: 768px) {
    .clients-hero h1 { font-size: 2.5rem; }
    .hero-stats-grid { flex-direction: column; gap: 2rem; }
    .roster-grid { grid-template-columns: 1fr; gap: 3rem; }
    .masonry-grid { column-count: 1; } /* Mobile: 1 column */
}

.client-logo-grid {
    padding: 3rem 0;
    background: rgba(255, 255, 255, 0.02); /* Subtle contrast from navy bg */
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo-label {
    text-align: center;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 2rem;
}

.logo-flex {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 3rem;
}

/* Fix for .jpg logos with white backgrounds */
.logo-item img, .logo-inner img, .feat-client-logo img {
    filter: none !important; /* Remove the white-out filter */
    opacity: 1 !important;
    mix-blend-mode: multiply; /* This makes the white background of the JPG transparent on light backgrounds */
    display: block;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 
                0 8px 10px -6px rgba(0, 0, 0, 0.08);
}

.logo-item:hover img {
    filter: brightness(0) invert(1) opacity(1); /* Lights up on hover */
    transform: translateY(-3px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 
                0 8px 10px -6px rgba(0, 0, 0, 0.08);
}

@media (max-width: 768px) {
    .logo-flex { gap: 1.5rem; }
    .logo-item img { height: 25px; }
}

.client-logo-vault {
    padding: 6rem 0;
    background-color: #f8fafc; /* Light background to make shadows pop */
}

.logo-grid-wrapper {
    display: grid;
    /* 4 columns on desktop, 3 on tablet, 2 on mobile */
    grid-template-columns: repeat(4, 1fr); 
    gap: 24px;
    margin-top: 3rem;
}

.logo-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 30px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Soft elevation shadow inspired by image 3 */
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 
                0 8px 10px -6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 140px; /* Fixed height for rectangular look */
}

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

.logo-inner {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-inner img {
    max-width: 85%;
    max-height: 70%;
    object-fit: contain;
    /* Professional touch: subtle grayscale until hover */
    filter: grayscale(10%) opacity(0.9);
    transition: filter 0.3s ease;
}

.logo-card:hover img {
    filter: grayscale(0%) opacity(1);
}

/* Mobile Responsive Adjustments */
@media (max-width: 992px) {
    .logo-grid-wrapper { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 600px) {
    .logo-grid-wrapper { grid-template-columns: repeat(2, 1fr); gap: 15px; }
    .logo-card { height: 100px; padding: 15px; }
}

.logo-card-hidden {
    display: none !important;
}

.shadow-card.revealed {
    display: flex !important; /* This makes them visible */
    animation: fadeInUpSmall 0.4s ease forwards;
}

/* Reveal animation */
@keyframes fadeInUpSmall {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.logo-card.revealed {
    display: flex !important;
    animation: fadeInUpSmall 0.4s ease forwards;
}

.testi-logo-wrap {
    margin-bottom: 1.25rem;
    height: 40px;
    width: 80px;
    display: flex;
    border-radius: 8px;
    align-items: center;
    /* Professional soft shadow */
    box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.08), 
                0 2px 6px -1px rgba(0, 0, 0, 0.04);
}

.testi-logo-wrap img {
    max-height: 100%;
    max-width: 140px;
    object-fit: contain;
    opacity: 1;
    transition: all 0.3s ease;
}

.masonry-card:hover .testi-logo-wrap img {
    filter: grayscale(0%);
    opacity: 1;
}

/* Featured Author Layout */
.feat-author {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-top: auto; /* Keeps author info at the bottom of cards */
}

/* Ensure the containers have height */
.feat-client-logo {
    width: 120px;
    height: 60px;
    background: #fff; /* Ensure white background for the JPG card */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    overflow: hidden;
    border-width: 1px;
    border-color: #383f48;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 
                0 8px 10px -6px rgba(0, 0, 0, 0.08);
}

.feat-client-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 
                0 8px 10px -6px rgba(0, 0, 0, 0.08);
}

.feat-author h4 {
    margin: 0;
    font-size: 1rem;
    color: #0b1220; /* Darker color for high contrast on light cards */
}

.feat-author p {
    margin: 2px 0 0 0;
    font-size: 0.85rem;
    color: #64748b;
}

/* For the Highlight Card (Dark Background) */
.highlight-card .feat-author h4 {
    color: #000000;
}
.highlight-card .feat-author p {
    color: #94a3b8;
}

/* "Pro" Logo Grid styling (like the homepage) */
.logo-grid-pro {
    display: grid;
    /* 4 columns on desktop, 2 on mobile */
    grid-template-columns: repeat(4, 1fr); 
    gap: 2rem;
    padding: 2rem 0;
}

.logo-item {
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-card-wrapper {
    background: #ffffff;
    border-radius: 0px;
    padding: 0rem;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Soft elevation shadow */
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 
                0 8px 10px -6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    height: 140px; /* Fixed height for rectangular look */
}

/* Hover effects */
.logo-card-wrapper:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.logo-card-wrapper img {
    max-width: 90%;
    max-height: 80%;
    object-fit: contain;
    /* Logos show in full color by default, no filters */
    filter: none;
}

/* Mobile Responsive Adjustments */
@media (max-width: 992px) {
    .logo-grid-pro { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
    .logo-card-wrapper { height: 110px; padding: 1rem; }
}

.clean-shadow-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* 4 columns for 400x200 ratio */
    gap: 45px;
    margin-top: 4rem;
}

/* 1. Five Column Grid Setup */
.clean-shadow-grid.five-cols {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* Force 5 columns */
    gap: 20px;
    margin-top: 3rem;
}

/* 1. Updated 5-Column Grid */
.clean-shadow-grid.five-cols {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* 5 logos per row */
    gap: 40px; /* Increased gap for a cleaner, high-end look */
    margin-top: 3rem;
}

/* 2. Shrink-Wrap Shadow Card */
.shadow-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 0px; 
    border: none;
    box-shadow: 0 8px 20px -6px rgba(0, 0, 0, 0.1); /* Standard shadow */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; 
    /* Remove aspect-ratio to let the box follow the image size */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    /* We set a min-height so the boxes are consistent even with 50% images */
    min-height: 80px; 
}

.shadow-card img {
    /* Direct 50% size control as requested */
    width: 65%; 
    height: auto;
    object-fit: contain; 
    display: block;
    opacity: 0.85; /* Professional low-opacity look */
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.shadow-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px -8px rgba(0, 0, 0, 0.15);
}

.shadow-card:hover img {
    opacity: 1; 
    transform: scale(1.1); /* Subtle zoom on hover */
}

/* 3. Responsive Adjustments */
@media (max-width: 1024px) {
    .clean-shadow-grid.five-cols { 
        grid-template-columns: repeat(3, 1fr); 
        gap: 20px; 
    }
}

@media (max-width: 600px) {
    /* Target the base class, not just the five-cols variant */
    .clean-shadow-grid, 
    .clean-shadow-grid.five-cols { 
        grid-template-columns: repeat(2, 1fr); 
        gap: 30px; /* Added a bit more breathing room for mobile */
    }
    
    .shadow-card { 
        border-radius: 8px; 
        min-height: 100px; /* Ensure they don't get too squished vertically */
    }
    
    /* Slightly increase logo size on mobile so they don't look lost */
    .shadow-card img {
        width: 70%; 
    }
}

/* 3. Smaller Testimonial Boxes */
.masonry-card {
    padding: 1.5rem !important; /* Smaller padding */
    font-size: 0.95rem; /* Slightly smaller text */
}

.masonry-card p {
    margin-bottom: 1.2rem !important;
    line-height: 1.5 !important;
}

/* 4. Responsive adjustments */
@media (max-width: 1024px) {
    .clean-shadow-grid.five-cols { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 600px) {
    .clean-shadow-grid.five-cols { grid-template-columns: repeat(2, 1fr); }
    .shadow-card { border-radius: 8px; }
}

/* Animation for Load More */
.shadow-card.revealed {
    display: flex !important;
    animation: fadeInUpSmall 0.4s ease forwards;
}

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