/* ============================================
   Voice Cards Section - Zencia.AI (FIXED)
   ============================================ */

/* ===== VOICE CARDS CONTAINER ===== */
.voice-cards-section {
    background: linear-gradient(135deg, #0a0e13 0%, #051a1a 100%);
    padding: 120px 0;
    position: relative;
    overflow: hidden;
}

.voice-cards-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(0, 217, 213, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(0, 139, 139, 0.08) 0%, transparent 50%);
    z-index: 1;
    pointer-events: none; /* FIX: Prevent blocking clicks */
}

.voice-cards-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

/* ===== SECTION HEADER ===== */
.voice-cards-header {
    text-align: center;
    margin-bottom: 60px;
}

.voice-cards-title {
    font-size: clamp(2rem, 3vw, 3rem);
    font-weight: 800;
    color: #FFFFFF;
    margin-bottom: 1rem;
    letter-spacing: -1px;
}

.voice-cards-subtitle {
    font-size: clamp(1rem, 1.2vw, 1.2rem);
    color: rgba(255, 255, 255, 0.7);
    max-width: 600px;
    margin: 0 auto;
}

/* ===== CARDS GRID ===== */
.voice-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    perspective: 1000px;
    transform: rotateX(10deg) rotateY(-5deg);
    transform-style: preserve-3d;
    padding: 2rem 0;
}

/* ===== INDIVIDUAL VOICE CARD ===== */
.voice-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(0, 217, 213, 0.2);
    border-radius: 20px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    transform: rotateX(-5deg) rotateY(3deg);
    transform-style: preserve-3d;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 5px 15px rgba(0, 217, 213, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.voice-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 217, 213, 0.05) 0%, rgba(0, 139, 139, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
    pointer-events: none; /* FIX: Critical - prevents overlay from blocking clicks */
}

.voice-card:hover {
    transform: rotateX(-5deg) rotateY(3deg) translateY(-10px) scale(1.02);
    box-shadow: 
        0 30px 60px rgba(0, 0, 0, 0.4),
        0 10px 30px rgba(0, 217, 213, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border-color: rgba(0, 217, 213, 0.6);
}

.voice-card:hover::before {
    opacity: 1;
}

.voice-card > * {
    position: relative;
    z-index: 10; /* FIX: Increased z-index to ensure content is above overlay */
}

/* Add alternating tilt to cards */
.voice-card:nth-child(odd) {
    transform: rotateX(-5deg) rotateY(5deg);
}

.voice-card:nth-child(even) {
    transform: rotateX(-5deg) rotateY(-5deg);
}

.voice-card:nth-child(odd):hover {
    transform: rotateX(-5deg) rotateY(5deg) translateY(-10px) scale(1.02);
}

.voice-card:nth-child(even):hover {
    transform: rotateX(-5deg) rotateY(-5deg) translateY(-10px) scale(1.02);
}

/* ===== CARD HEADER ===== */
.voice-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.voice-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #FFFFFF;
    margin: 0;
}

.voice-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: linear-gradient(135deg, rgba(0, 217, 213, 0.2) 0%, rgba(0, 139, 139, 0.2) 100%);
    border: 1px solid rgba(0, 217, 213, 0.4);
    border-radius: 20px;
    font-size: 0.85rem;
    color: #00D9D5;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== MARQUEE CONTAINER ===== */
.voice-marquee-container {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 217, 213, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    overflow: hidden;
    position: relative;
    pointer-events: none; /* FIX: Marquee doesn't need to be clickable */
}

.voice-marquee-wrapper {
    overflow: hidden;
    position: relative;
    height: 60px;
    display: flex;
    align-items: center;
}

.voice-marquee {
    display: flex;
    gap: 2rem;
    animation: marquee 20s linear infinite;
    white-space: nowrap;
}

.voice-marquee-paused {
    animation-play-state: paused;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.voice-conversation-item {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    min-width: fit-content;
}

.voice-speaker-label {
    font-weight: 700;
    font-size: 0.9rem;
    color: #00D9D5;
    white-space: nowrap;
    min-width: fit-content;
}

.voice-speaker-text {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
    white-space: nowrap;
}

/* Duplicate content for seamless loop */
.voice-marquee-content {
    display: flex;
    gap: 2rem;
}

/* ===== CARD FOOTER WITH PLAY BUTTON ===== */
.voice-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    position: relative;
    z-index: 20; /* FIX: Ensure footer is above everything */
}

.voice-info {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.voice-language {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
}

.voice-duration {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

/* ===== PLAY BUTTON ===== */
.voice-play-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00D9D5 0%, #008B8B 100%);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 217, 213, 0.4);
    position: relative;
    flex-shrink: 0;
    z-index: 30; /* FIX: Highest z-index for button */
    pointer-events: auto; /* FIX: Ensure button is always clickable */
}

.voice-play-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(0, 217, 213, 0.6);
}

.voice-play-btn:active {
    transform: scale(0.95);
}

.voice-play-btn svg {
    width: 24px;
    height: 24px;
    color: #FFFFFF;
    transition: all 0.3s ease;
    pointer-events: none; /* FIX: SVG shouldn't intercept clicks */
}

/* Playing state */
.voice-play-btn.playing {
    background: linear-gradient(135deg, #FF6B6B 0%, #C92A2A 100%);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 5px 20px rgba(255, 107, 107, 0.4);
    }
    50% {
        box-shadow: 0 5px 30px rgba(255, 107, 107, 0.8);
    }
}

.voice-play-btn .play-icon {
    display: block;
}

.voice-play-btn .pause-icon {
    display: none;
}

.voice-play-btn.playing .play-icon {
    display: none;
}

.voice-play-btn.playing .pause-icon {
    display: block;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .voice-cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        transform: rotateX(5deg) rotateY(-3deg);
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .voice-cards-section {
        padding: 80px 0;
    }

    .voice-cards-container {
        padding: 0 1rem;
    }

    .voice-cards-grid {
        grid-template-columns: 1fr;
        transform: none;
        gap: 1.5rem;
    }

    .voice-card {
        padding: 1.5rem;
        transform: none !important;
    }

    .voice-card:hover {
        transform: translateY(-5px) !important;
    }

    .voice-marquee-wrapper {
        height: auto;
        min-height: 60px;
    }
}

@media (max-width: 480px) {
    .voice-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .voice-card-title {
        font-size: 1.3rem;
    }

    .voice-marquee-container {
        padding: 1rem;
    }

    .voice-play-btn {
        width: 50px;
        height: 50px;
    }

    .voice-play-btn svg {
        width: 20px;
        height: 20px;
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    .voice-marquee {
        animation: none;
    }
    
    .voice-card,
    .voice-cards-grid {
        transform: none !important;
    }
    
    .voice-card:hover {
        transform: none !important;
    }
}

.voice-play-btn:focus {
    outline: 2px solid #00D9D5;
    outline-offset: 4px;
}

/* FIX: Ensure all interactive elements are clickable */
button, [role="button"], a {
    pointer-events: auto !important;
    position: relative;
    z-index: 25;
}