/* ============================================================ */
/* ambitiv.com — PRODUCT PAGE: ambitiv.Chat                       */
/* Loaded only on /chat page. Place after main styles.css.        */
/* ============================================================ */

/* ===== 1. HERO ===== */
.chat-hero {
    padding: 130px 0 80px;
    position: relative;
    overflow: hidden;
}

.chat-hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.chat-hero-bg::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, var(--accent-light) 0%, transparent 70%);
}

.chat-hero-bg::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -15%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 97, 70, 0.05) 0%, transparent 70%);
}

.chat-hero-inner {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.chat-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent-light);
    color: var(--accent);
    padding: 8px 16px;
    border-radius: 100px;
    font-family: 'Unbounded', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 24px;
}

.chat-hero h1 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
}

.chat-hero h1 .accent {
    color: var(--accent);
}

.chat-hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    color: var(--gray);
    margin-bottom: 32px;
    line-height: 1.6;
}

.chat-hero-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 40px;
}

.chat-hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    padding-top: 28px;
    border-top: 1px solid var(--border);
}

.chat-mini-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.chat-mini-stat strong {
    font-family: 'Unbounded', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1.1;
}

.chat-mini-stat span {
    font-size: 0.85rem;
    color: var(--gray);
}

/* ===== LIVE DEMO CHAT ===== */
.chat-demo {
    position: relative;
}

.chat-demo-window {
    background: white;
    border-radius: 24px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-width: 480px;
    margin-left: auto;
}

.chat-demo-header {
    background: linear-gradient(135deg, var(--dark) 0%, #2d2d2d 100%);
    padding: 18px 22px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
}

.chat-demo-avatar {
    width: 42px;
    height: 42px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: white;
    flex-shrink: 0;
}

.chat-demo-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.chat-demo-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.chat-demo-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.7);
}

.chat-demo-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
    animation: chatPulse 2s infinite;
}

@keyframes chatPulse {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
    70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.chat-demo-body {
    background: var(--bg-alt);
    padding: 20px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 380px;
    max-height: 480px;
    overflow-y: auto;
}

.chat-bubble {
    max-width: 78%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 0.92rem;
    line-height: 1.45;
    word-wrap: break-word;
    opacity: 0;
    transform: translateY(8px);
    animation: chatBubbleIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes chatBubbleIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Each message gets progressive delay via inline animation-delay set by JS, but fallback CSS works too */
.chat-msg[data-delay="0"] { animation-delay: 0.3s; }
.chat-msg[data-delay="900"] { animation-delay: 1.2s; }
.chat-msg[data-delay="1800"] { animation-delay: 2.1s; }
.chat-msg[data-delay="2700"] { animation-delay: 3.0s; }
.chat-msg[data-delay="3600"] { animation-delay: 3.9s; }
.chat-msg[data-delay="4500"] { animation-delay: 4.8s; }

.chat-bubble-bot {
    align-self: flex-start;
    background: white;
    color: var(--dark);
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.chat-bubble-user {
    align-self: flex-end;
    background: var(--accent);
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-typing {
    align-self: flex-start;
    background: white;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    padding: 14px 18px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    width: fit-content;
}

.chat-typing span {
    width: 7px;
    height: 7px;
    background: var(--gray-light);
    border-radius: 50%;
    display: inline-block;
    animation: chatTyping 1.2s infinite ease-in-out;
}

.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes chatTyping {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.5;
    }
    30% {
        transform: translateY(-4px);
        opacity: 1;
    }
}

.chat-demo-footer {
    background: white;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-top: 1px solid var(--border);
}

.chat-demo-input {
    flex: 1;
    background: var(--bg-alt);
    border-radius: 100px;
    padding: 10px 18px;
    color: var(--gray-light);
    font-size: 0.92rem;
}

.chat-demo-send {
    width: 38px;
    height: 38px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.chat-demo-send:hover {
    background: var(--accent-dark);
    transform: scale(1.05);
}

/* Floating labels around the demo */
.chat-demo-label {
    position: absolute;
    background: white;
    padding: 12px 16px;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 0.82rem;
    animation: chatFloatLabel 4s ease-in-out infinite;
}

.chat-demo-label i {
    color: var(--accent);
    font-size: 1rem;
}

.chat-demo-label-1 {
    top: 12%;
    left: -20px;
    animation-delay: 0s;
}

.chat-demo-label-2 {
    bottom: 18%;
    right: -10px;
    animation-delay: 1.5s;
}

@keyframes chatFloatLabel {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* ===== 2. TRUST BAR ===== */
.chat-trust {
    padding: 60px 0;
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.chat-trust-inner {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 48px;
    align-items: center;
}

.chat-trust-headline {
    display: flex;
    gap: 16px;
}

.chat-trust-headline i {
    color: var(--accent);
    font-size: 1.6rem;
    opacity: 0.5;
    flex-shrink: 0;
}

.chat-trust-headline p {
    font-family: 'Unbounded', sans-serif;
    font-size: 1.1rem;
    line-height: 1.5;
    color: var(--dark);
}

.chat-trust-headline strong {
    color: var(--accent);
}

.chat-trust-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.chat-trust-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.chat-trust-stat strong {
    font-family: 'Unbounded', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--dark);
    line-height: 1;
}

.chat-trust-stat span {
    font-size: 0.85rem;
    color: var(--gray);
    line-height: 1.4;
}

/* ===== 3. PROBLEM SECTION ===== */
.chat-problem {
    padding: 100px 0;
}

.chat-problem-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.chat-problem-item {
    background: white;
    padding: 32px 24px;
    border-radius: 16px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.chat-problem-item:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.06);
}

.chat-problem-time {
    font-family: 'Unbounded', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    color: rgba(239, 68, 68, 0.18);
    line-height: 1;
    margin-bottom: 16px;
    letter-spacing: -1px;
}

.chat-problem-item h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--dark);
}

.chat-problem-item p {
    color: var(--gray);
    font-size: 0.9rem;
    line-height: 1.55;
}

/* ===== 4. HOW IT WORKS ===== */
.chat-process {
    padding: 100px 0;
    background: var(--bg-alt);
}

.chat-process-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.chat-process-step {
    background: white;
    padding: 32px 24px;
    border-radius: 16px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.chat-process-step:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.06);
}

.chat-process-num {
    font-family: 'Unbounded', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 16px;
    opacity: 0.85;
}

.chat-process-step h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.chat-process-step p {
    color: var(--gray);
    font-size: 0.9rem;
    line-height: 1.55;
}

/* ===== 5. FEATURES ===== */
.chat-features {
    padding: 100px 0;
}

.chat-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.chat-feature {
    background: white;
    padding: 32px 28px;
    border-radius: 16px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.chat-feature:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.06);
}

.chat-feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    background: var(--accent-light);
    color: var(--accent);
    border-radius: 14px;
    font-size: 1.3rem;
    margin-bottom: 18px;
}

.chat-feature h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.chat-feature p {
    color: var(--gray);
    font-size: 0.92rem;
    line-height: 1.55;
}

/* ===== 6. CHANNELS ===== */
.chat-channels {
    padding: 100px 0;
    background: var(--bg-alt);
}

.chat-channels-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.chat-channel-item {
    background: white;
    padding: 36px 28px;
    border-radius: 18px;
    border: 1px solid var(--border);
    text-align: center;
    transition: all 0.3s ease;
}

.chat-channel-item:hover {
    border-color: var(--accent);
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.08);
}

.chat-channel-icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    color: white;
    margin: 0 auto 18px;
}

.chat-channel-website { background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%); }
.chat-channel-telegram { background: linear-gradient(135deg, #2AABEE 0%, #229ED9 100%); }
.chat-channel-instagram { background: linear-gradient(135deg, #833AB4 0%, #FD1D1D 50%, #FCB045 100%); }
.chat-channel-whatsapp { background: linear-gradient(135deg, #25D366 0%, #128C7E 100%); }

.chat-channel-item h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.chat-channel-item p {
    color: var(--gray);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ===== 7. USE CASES ===== */
.chat-usecases {
    padding: 100px 0;
}

.chat-usecase-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.chat-usecase {
    background: white;
    padding: 32px 28px;
    border-radius: 16px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.chat-usecase:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.06);
}

.chat-usecase > i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--accent-light);
    color: var(--accent);
    border-radius: 12px;
    font-size: 1.2rem;
    margin-bottom: 18px;
}

.chat-usecase h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.chat-usecase p {
    color: var(--gray);
    font-size: 0.92rem;
    line-height: 1.55;
}

/* ===== 8. FAQ ===== */
.chat-faq {
    padding: 100px 0;
    background: var(--bg-alt);
}

.chat-faq-list {
    max-width: 880px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-faq-item {
    background: white;
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.chat-faq-item[open] {
    border-color: var(--accent);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}

.chat-faq-item summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 22px 26px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.02rem;
    color: var(--dark);
    list-style: none;
    transition: color 0.2s ease;
}

.chat-faq-item summary::-webkit-details-marker { display: none; }

.chat-faq-item summary:hover {
    color: var(--accent);
}

.chat-faq-item summary i {
    color: var(--accent);
    font-size: 0.9rem;
    transition: transform 0.25s ease;
    flex-shrink: 0;
}

.chat-faq-item[open] summary i {
    transform: rotate(45deg);
}

.chat-faq-item p {
    padding: 0 26px 24px;
    color: var(--gray);
    line-height: 1.65;
    font-size: 0.97rem;
}

.chat-faq-item p strong {
    color: var(--dark);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .chat-hero-inner,
    .chat-trust-inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .chat-demo-window {
        margin: 0 auto;
    }

    .chat-trust-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .chat-problem-grid,
    .chat-process-grid,
    .chat-channels-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .chat-features-grid,
    .chat-usecase-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .chat-hero {
        padding: 100px 0 60px;
    }

    .chat-problem,
    .chat-process,
    .chat-features,
    .chat-channels,
    .chat-usecases,
    .chat-faq {
        padding: 60px 0;
    }

    .chat-hero-stats {
        gap: 24px;
    }

    .chat-mini-stat strong {
        font-size: 1.25rem;
    }

    .chat-trust-stats {
        gap: 20px;
    }

    .chat-trust-stat strong {
        font-size: 1.4rem;
    }

    .chat-problem-grid,
    .chat-process-grid,
    .chat-channels-grid,
    .chat-features-grid,
    .chat-usecase-grid {
        grid-template-columns: 1fr;
    }

    .chat-demo-label {
        display: none;
    }

    .chat-demo-window {
        max-width: 100%;
    }

    .chat-faq-item summary {
        padding: 18px 20px;
        font-size: 0.95rem;
    }

    .chat-faq-item p {
        padding: 0 20px 20px;
        font-size: 0.92rem;
    }
}