/* ===================================================================
 * WiderMatrix - Homepage Styles (index.css)
 * Loaded only on is_front_page()
 * =================================================================== */

/* ===================================================================
 * 1. Hero Section
 * =================================================================== */
.hero {
    position: relative;
    min-height: 720px;
    display: flex;
    align-items: center;
    overflow: hidden;
    color: #fff;
    isolation: isolate;
}
.hero-bg,
.hero-bg .hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}
.hero-mask {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at top left, rgba(136, 62, 116, 0.55), transparent 60%),
        linear-gradient(180deg, rgba(31, 19, 32, 0.55) 0%, rgba(31, 19, 32, 0.85) 100%);
    z-index: -1;
}
.hero-inner {
    padding: 120px 24px 100px;
    max-width: 1280px;
}
.hero-eyebrow {
    margin: 0 0 18px;
    font-size: 14px;
    letter-spacing: 0.2em;
    color: var(--brand-accent);
    font-weight: 600;
}
.hero-title {
    margin: 0 0 24px;
    font-size: clamp(36px, 6vw, 64px);
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: -0.02em;
}
.hero-title .accent {
    background: linear-gradient(135deg, #f472b6 0%, #c084fc 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-sub {
    margin: 0 0 32px;
    font-size: 18px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.85);
    max-width: 720px;
}
.hero-badges {
    list-style: none;
    margin: 0 0 36px;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.hero-badges li {
    padding: 8px 18px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    backdrop-filter: blur(6px);
}
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}


/* ===================================================================
 * 2. About Us
 * =================================================================== */
.about-section {
    padding: 110px 0;
    background: var(--color-bg);
}
.about-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 80px;
    align-items: center;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    padding-top: 32px;
    border-top: 1px solid var(--color-border);
}
.stat-item .stat-num {
    font-size: 36px;
    font-weight: 800;
    color: var(--brand-primary);
    line-height: 1;
    letter-spacing: -0.02em;
}
.stat-item .stat-label {
    margin-top: 8px;
    font-size: 14px;
    color: var(--color-text-muted);
}

.about-media {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}
.about-media img {
    width: 100%;
    height: 520px;
    object-fit: cover;
    transition: transform 0.8s ease;
}
.about-media:hover img { transform: scale(1.04); }

/* Play button overlay */
.about-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(136, 62, 116, 0.85);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: transform 0.3s, background 0.3s;
}
.about-play-btn:hover {
    transform: translate(-50%, -50%) scale(1.12);
    background: rgba(136, 62, 116, 1);
}
.about-play-btn svg { margin-left: 3px; }
.play-btn-ripple {
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 2px solid rgba(136, 62, 116, 0.4);
    animation: ripple 2s ease-out infinite;
}
@keyframes ripple {
    0%   { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.5); opacity: 0; }
}

/* Video Modal */
.video-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.85);
    align-items: center;
    justify-content: center;
}
.video-modal.is-open {
    display: flex;
}
.video-modal-content {
    position: relative;
    width: 90%;
    max-width: 860px;
    aspect-ratio: 16 / 9;
}
.video-modal-close {
    position: absolute;
    top: -44px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 36px;
    cursor: pointer;
    line-height: 1;
    padding: 4px 12px;
    transition: opacity 0.2s;
}
.video-modal-close:hover { opacity: 0.7; }
.video-container {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
}
.video-container iframe,
.video-container video {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}


/* ===================================================================
 * 3. Products + Tab Switching
 * =================================================================== */
.products-section {
    padding: 110px 0;
    background: var(--color-bg-soft);
    background-image:
        radial-gradient(circle at 100% 0%, rgba(136, 62, 116, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 0% 100%, rgba(212, 163, 115, 0.08) 0%, transparent 40%);
}
.product-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
    padding: 8px;
    background: #fff;
    border-radius: 999px;
    box-shadow: var(--shadow-sm);
    max-width: max-content;
    margin-left: auto;
    margin-right: auto;
}
.product-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    background: transparent;
    color: var(--color-text-muted);
    font-size: 15px;
    font-weight: 600;
    border-radius: 999px;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}
.product-tab:hover {
    color: var(--brand-primary);
    background: rgba(136, 62, 116, 0.06);
}
.product-tab.is-active {
    background: var(--brand-gradient);
    color: #fff;
    box-shadow: 0 8px 20px rgba(136, 62, 116, 0.35);
}

.product-panel[hidden] { display: none; }

.panel-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.product-card {
    background: #fff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition-slow);
    display: grid;
    grid-template-columns: 460px 1fr;
    min-height: 360px;
}
.product-cover {
    position: relative;
    overflow: hidden;
}
.product-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Cover Gallery (multi-image carousel) */
.cover-gallery {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cover-gallery .cover-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.4s ease;
    pointer-events: none;
}
.cover-gallery .cover-img.is-active {
    opacity: 1;
    pointer-events: auto;
}
.cover-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.85);
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.25s;
}
.cover-gallery:hover .cover-arrow {
    opacity: 1;
}
.cover-arrow:hover {
    background: #fff;
    box-shadow: 0 3px 12px rgba(0,0,0,0.18);
}
.cover-prev { left: 8px; }
.cover-next { right: 8px; }
.cover-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
    z-index: 2;
}
.cover-dot {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    border: 1px solid rgba(0,0,0,0.15);
    transition: background 0.25s;
}
.cover-dot.is-active {
    background: var(--wm-brand, #883E74);
    border-color: var(--wm-brand, #883E74);
}
.product-tag {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 6px 14px;
    background: var(--brand-gradient);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    border-radius: 6px;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 12px rgba(136, 62, 116, 0.3);
}
.product-body {
    padding: 40px 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0;
    border-left: 1px solid var(--color-border);
}
.product-eyebrow {
    display: inline-block;
    margin: 0 0 14px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--brand-primary);
    background: rgba(136, 62, 116, 0.08);
    border-radius: 999px;
    width: fit-content;
}
.product-title {
    margin: 0 0 14px;
    font-size: 26px;
    font-weight: 800;
    line-height: 1.3;
    color: var(--color-text);
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-color: rgba(136, 62, 116, 0.3);
}
.product-desc {
    margin: 0 0 20px;
    font-size: 15px;
    line-height: 1.8;
    color: var(--color-text-muted);
}
.product-specs-label {
    margin: 0 0 10px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text);
}
.product-specs {
    list-style: none;
    margin: 0 0 24px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.product-specs li {
    position: relative;
    padding-left: 20px;
    font-size: 14px;
    color: var(--color-text);
    line-height: 1.6;
}
.product-specs li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    background: var(--brand-gradient);
}
.product-divider {
    height: 1px;
    background: var(--color-border);
    margin: 20px 0;
}
.product-price-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0 0;
}
.product-original-price {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
}
.product-current-price {
    font-size: 24px;
    font-weight: 800;
    color: var(--brand-primary);
}
.product-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.product-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}
.product-link-primary {
    border: 2px solid var(--brand-primary);
    color: var(--brand-primary);
    background: transparent;
}
.product-link-primary:hover {
    background: var(--brand-primary);
    color: #fff;
}
.product-link-secondary {
    background: var(--brand-gradient);
    color: #fff;
    border: 2px solid transparent;
    box-shadow: 0 6px 16px rgba(136, 62, 116, 0.3);
}
.product-link-secondary:hover {
    box-shadow: 0 10px 22px rgba(136, 62, 116, 0.45);
    transform: translateY(-2px);
}


/* ===================================================================
 * 3b. More Vending Machines
 * =================================================================== */
.more-machines-section {
    padding: 90px 0 110px;
    background: var(--color-bg-soft);
}
.more-machines-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 36px;
}
.more-machine-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.more-machine-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
}
.more-machine-icon {
    font-size: 48px;
    line-height: 1;
    margin-bottom: 4px;
}
.more-machine-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text);
}
.more-machine-desc {
    margin: 0;
    font-size: 14px;
    line-height: 1.7;
    color: var(--color-text-muted);
    flex: 1;
}
.more-machines-cta-text {
    text-align: center;
    font-size: 16px;
    color: var(--color-text-muted);
    margin: 0;
}
.more-machines-cta-text strong {
    color: var(--color-text);
}


/* Section 4 (Advantages) moved to main.css — shared with about page */


/* ===================================================================
 * 5. Application Scenarios
 * =================================================================== */
.scenes-section {
    padding: 110px 0;
    background: var(--color-bg);
}
.scenes-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.scene-card {
    position: relative;
    height: 380px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    isolation: isolate;
    transition: all var(--transition-slow);
}
.scene-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.scene-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
    z-index: -2;
}
.scene-card:hover .scene-bg { transform: scale(1.08); }
.scene-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(31, 19, 32, 0) 0%, rgba(31, 19, 32, 0.85) 100%);
    z-index: -1;
}
.scene-inner {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 28px;
    color: #fff;
}
.scene-title {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 700;
}
.scene-desc {
    margin: 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.7;
}


/* ===================================================================
 * 6. How It Works (Process)
 * =================================================================== */
.process-section {
    padding: 110px 0;
    background: var(--color-bg-soft);
}
.process-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    counter-reset: step;
    position: relative;
}
.process-steps::before {
    content: "";
    position: absolute;
    top: 30px;
    left: 8%;
    right: 8%;
    height: 2px;
    background: repeating-linear-gradient(90deg, var(--brand-primary-light) 0 8px, transparent 8px 16px);
    opacity: 0.4;
}
.process-step {
    position: relative;
    padding: 32px 20px;
    background: #fff;
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
}
.process-step:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
}
.process-step .step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    background: var(--brand-gradient);
    color: #fff;
    font-size: 18px;
    font-weight: 800;
    border-radius: 50%;
    box-shadow: 0 8px 20px rgba(136, 62, 116, 0.35);
}
.process-step .step-title {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text);
}
.process-step .step-desc {
    margin: 0;
    font-size: 13.5px;
    color: var(--color-text-muted);
    line-height: 1.7;
}


/* Section 7 (Contact) moved to main.css — shared with about page */


/* ===================================================================
 * Responsive - Tablet (Homepage)
 * =================================================================== */
@media (max-width: 1100px) {
    .product-card {
        grid-template-columns: 300px 1fr;
    }
    .scenes-grid { grid-template-columns: repeat(2, 1fr); }
    .more-machines-grid { grid-template-columns: repeat(2, 1fr); }
    .process-steps { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
    .process-steps::before { display: none; }

    .about-grid { grid-template-columns: 1fr; gap: 50px; }
    .about-media img { height: 420px; }
}


/* ===================================================================
 * Responsive - Mobile (Homepage)
 * =================================================================== */
@media (max-width: 768px) {
    .hero { min-height: 600px; }
    .hero-inner { padding: 100px 20px 80px; }
    .hero-title { font-size: 34px; }
    .hero-sub { font-size: 15px; }
    .hero-actions .btn { padding: 12px 22px; font-size: 14px; }

    .about-section,
    .products-section,
    .scenes-section,
    .process-section,
    .faq-section,
    .more-machines-section { padding: 70px 0; }

    .stats-row { grid-template-columns: repeat(2, 1fr); gap: 24px; }
    .about-media img { height: 320px; }

    .product-card {
        grid-template-columns: 1fr;
    }
    /* Product cover for mobile - full width and complete display */
    .product-cover {
        min-height: 250px;
        max-height: none;
        aspect-ratio: auto;
        width: 100%;
        padding-bottom: 0;
        position: relative;
    }
    .product-cover img,
    .product-cover .cover-img {
        width: 100% !important;
        height: auto !important;
        object-fit: contain !important;
        display: block;
        margin: 0 auto;
    }
    .scenes-grid { grid-template-columns: 1fr; }
    .more-machines-grid { grid-template-columns: 1fr; }

    .product-tabs {
        max-width: 100%;
        border-radius: var(--radius-md);
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        padding: 6px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .product-tabs::-webkit-scrollbar { display: none; }
    .product-tab { padding: 10px 16px; font-size: 14px; }

    .process-steps { grid-template-columns: 1fr; gap: 14px; }
    .process-step {
        display: flex;
        align-items: center;
        gap: 18px;
        text-align: left;
        padding: 20px;
        min-width: 0;
    }
    .process-step .step-num { margin: 0; flex-shrink: 0; width: 48px; height: 48px; font-size: 16px; }
    .process-step .step-title,
    .process-step .step-desc {
        overflow-wrap: anywhere;
        hyphens: auto;
    }
}

/* ===================================================================
 * 8. FAQ Section
 * =================================================================== */
.faq-section {
    padding: 110px 0;
    background: var(--color-bg-soft);
}
.faq-list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.faq-item {
    background: #fff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: box-shadow 0.3s;
}
.faq-item[open] {
    box-shadow: var(--shadow-md);
}
.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    font-size: 17px;
    font-weight: 600;
    color: var(--color-text);
    cursor: pointer;
    list-style: none;
    gap: 16px;
}
.faq-question::-webkit-details-marker { display: none; }
.faq-question::after {
    content: '+';
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(136, 62, 116, 0.08);
    color: var(--brand-primary);
    font-size: 20px;
    font-weight: 400;
    transition: transform 0.3s, background 0.3s;
}
.faq-item[open] .faq-question::after {
    content: '\2212';
    background: var(--brand-primary);
    color: #fff;
}
.faq-answer {
    padding: 0 24px 20px;
    font-size: 15px;
    line-height: 1.8;
    color: var(--color-text-muted);
}
.faq-answer strong { color: var(--color-text); }

/* ===================================================================
 * 9. Success Stories – Auto-Scrolling Gallery
 * =================================================================== */
.success-stories-gallery {
    padding: 80px 0;
    background: #fff;
    overflow: hidden;
}
.success-header {
    text-align: center;
    margin-bottom: 60px;
    padding: 0 20px;
}
.success-header .section-title {
    font-size: 42px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 20px;
}
.success-header .highlight {
    background: linear-gradient(135deg, #e040a0 0%, #883E74 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.section-divider {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
}
.section-divider-icon {
    font-size: 32px;
}
.success-subtitle {
    font-size: 18px;
    color: var(--color-text-muted);
    margin-top: 15px;
}

/* Carousel wrapper – clips overflow */
.success-carousel-wrapper {
    margin-bottom: 30px;
    overflow: hidden;
}

/* Carousel track */
.success-carousel {
    display: flex;
    gap: 20px;
    width: fit-content;
}

/* Scroll animations */
.success-carousel.scroll-right {
    animation: scrollRight 120s linear infinite;
}
.success-carousel.scroll-left {
    animation: scrollLeft 120s linear infinite reverse;
}
@keyframes scrollRight {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
@keyframes scrollLeft {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.success-carousel:hover {
    animation-play-state: paused;
}

/* Slide item */
.success-slide {
    flex-shrink: 0;
}

/* Card style */
.success-card {
    width: 350px;
    height: 250px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}
.success-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}
.success-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Responsive */
@media (max-width: 768px) {
    .success-stories-gallery { padding: 50px 0; }
    .success-header .section-title { font-size: 30px; }
    .success-header { margin-bottom: 36px; }
    .success-card { width: 280px; height: 200px; }
    .success-carousel.scroll-right,
    .success-carousel.scroll-left {
        animation-duration: 90s;
    }
}

/* ============================================================
   Operator Testimonials Section
   ============================================================ */
.testimonials-section {
    position: relative;
    background: #faf6f9;
    padding: 100px 0 90px;
    overflow: visible;
}
.testimonials-section .wave-top,
.testimonials-section .wave-bottom {
    position: absolute;
    left: 0;
    width: 100%;
    height: 60px;
    color: #faf6f9;
    display: block;
}
.testimonials-section .wave-top {
    top: -59px;
}
.testimonials-section .wave-bottom {
    bottom: -59px;
}

/* Pills */
.testi-pills {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}
.testi-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px 10px 12px;
    border-radius: 50px;
    border: 2px solid #e8e0e5;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}
.testi-pill:hover {
    border-color: var(--wm-brand, #883E74);
}
.testi-pill.is-active {
    background: var(--wm-brand, #883E74);
    border-color: var(--wm-brand, #883E74);
}
.testi-pill.is-active .pill-name,
.testi-pill.is-active .pill-earn {
    color: #fff;
}
.pill-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--wm-brand, #883E74), #c06aa8);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    flex-shrink: 0;
}
.testi-pill.is-active .pill-avatar {
    background: rgba(255,255,255,0.25);
}
.pill-info {
    display: flex;
    flex-direction: column;
    text-align: left;
}
.pill-name {
    font-weight: 600;
    font-size: 14px;
    color: #2d2d44;
}
.pill-earn {
    font-size: 13px;
    font-weight: 700;
    color: #e8590c;
}

/* Story layout */
.testi-stories {
    max-width: 960px;
    margin: 0 auto;
}
.testi-story {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 48px;
    align-items: center;
}
.testi-story[hidden] {
    display: none;
}

/* Photo */
.testi-photo {
    position: relative;
    background: #fff;
    padding: 12px 12px 16px;
    border-radius: 6px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.08);
    transform: rotate(-2deg);
    max-width: 380px;
}
.testi-photo::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 6px;
    right: -6px;
    bottom: -6px;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    z-index: -1;
    transform: rotate(2deg);
}
.testi-photo img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    border-radius: 4px;
    display: block;
}
.testi-photo-placeholder {
    width: 100%;
    aspect-ratio: 3/4;
    background: linear-gradient(135deg, #f3e8f0, #e8d5e4);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    font-weight: 800;
    color: var(--wm-brand, #883E74);
    opacity: 0.5;
}
.testi-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%) rotate(2deg);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    transition: box-shadow 0.2s, color 0.2s;
    z-index: 2;
}
.testi-arrow:hover {
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
    color: var(--wm-brand, #883E74);
}
.testi-prev { left: -20px; }
.testi-next { right: -20px; }

/* Content */
.testi-content {
    position: relative;
}
.testi-dots {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
}
.testi-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--wm-brand, #883E74);
}
.testi-counter {
    position: absolute;
    top: 0;
    right: 0;
    font-size: 13px;
    color: #999;
}
.testi-quote {
    font-size: 18px;
    line-height: 1.7;
    color: #2d2d44;
    margin: 0 0 20px;
    border: none;
    padding: 0;
}
.testi-author {
    margin: 0 0 24px;
}
.testi-author strong {
    display: block;
    font-size: 16px;
    color: #2d2d44;
}
.testi-author span {
    font-size: 14px;
    color: #888;
}

/* Metrics */
.testi-metrics {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.metric-badge {
    background: #fdf0f6;
    border: 1px solid #f5d5e5;
    border-radius: 12px;
    padding: 12px 18px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 120px;
}
.metric-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #999;
    font-weight: 600;
}
.metric-value {
    font-size: 18px;
    font-weight: 700;
    color: #2d2d44;
}
.metric-value.accent {
    color: var(--wm-brand, #883E74);
}

/* Responsive */
@media (max-width: 768px) {
    .testimonials-section {
        padding: 70px 0 60px;
    }
    .testimonials-section .wave-top,
    .testimonials-section .wave-bottom {
        height: 36px;
    }
    .testimonials-section .wave-top { top: -35px; }
    .testimonials-section .wave-bottom { bottom: -35px; }
    .testi-story {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    .testi-photo-placeholder {
        aspect-ratio: 4/3;
    }
    .testi-pills {
        gap: 8px;
    }
    .testi-pill {
        padding: 8px 14px 8px 8px;
    }
    .pill-avatar {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }
    .testi-quote {
        font-size: 16px;
    }
    .testi-metrics {
        gap: 8px;
    }
    .metric-badge {
        min-width: 100px;
        padding: 10px 14px;
    }
}

/* ============================================================
   10. Latest Blog Posts Section
   ============================================================ */
.latest-posts-section {
    padding: 100px 0;
    background: var(--color-bg-soft, #faf8f9);
    position: relative;
    overflow: visible;
}
.lp-wave-top,
.lp-wave-bottom {
    position: absolute;
    left: 0;
    width: 100%;
    height: 60px;
    display: block;
}
.lp-wave-top { top: -59px; }
.lp-wave-bottom { bottom: -59px; }
.latest-posts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
.lp-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(42,21,51,.06);
    transition: box-shadow .25s, transform .25s;
    display: flex;
    flex-direction: column;
}
.lp-card:hover {
    box-shadow: 0 8px 24px rgba(136,62,116,.12);
    transform: translateY(-4px);
}
.lp-card-thumb {
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    flex-shrink: 0;
}
.lp-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s;
}
.lp-card:hover .lp-card-thumb img {
    transform: scale(1.05);
}
.lp-card-body {
    padding: 20px 22px 24px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}
.lp-card-cat {
    display: inline-block;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #883E74;
    background: rgba(136,62,116,.08);
    padding: 3px 10px;
    border-radius: 999px;
    width: fit-content;
    margin-bottom: 2px;
}
.lp-card-title {
    font-size: .95rem;
    font-weight: 700;
    color: #1A1A2E;
    line-height: 1.35;
    margin: 0;
}
.lp-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color .2s;
}
.lp-card-title a:hover { color: #883E74; }
.lp-card-date {
    font-size: .75rem;
    color: #aaa;
    font-weight: 500;
}
.lp-card-excerpt {
    font-size: .82rem;
    color: #666;
    line-height: 1.6;
    margin: 4px 0 0;
}

/* ── Responsive: Latest Posts ── */
@media (max-width: 992px) {
    .latest-posts-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}
@media (max-width: 640px) {
    .latest-posts-section { padding: 70px 0; }
    .lp-wave-top,
    .lp-wave-bottom { height: 36px; }
    .lp-wave-top { top: -35px; }
    .lp-wave-bottom { bottom: -35px; }
    .latest-posts-grid { grid-template-columns: 1fr; gap: 16px; }
    .lp-card-body { padding: 18px 18px 22px; }
}

/* ===================================================================
 * Overflow Fix — Multi-language button text wrapping
 * Fixes long Spanish/Russian/German text overflowing buttons on mobile
 * =================================================================== */
.ask-button,
.btn-primary {
    overflow-wrap: anywhere;
    hyphens: auto;
    white-space: normal !important;
}
.hero-actions .btn {
    min-width: 0;
}

/* ===================================================================
 * Process Steps Overflow Fix — Russian/long text wrapping
 * Fixes container expansion due to long text in process-step content
 * =================================================================== */
.process-step {
    min-width: 0;
}
.process-step .step-title,
.process-step .step-desc {
    overflow-wrap: anywhere;
    hyphens: auto;
}
