/**
 * Estilos para o sistema de depoimentos
 * 
 * @package Steel360
 * @since 1.0.0
 */

/* Componente de Depoimentos */
.testimonials-section {
    position: relative;
    overflow: hidden;
}

.testimonials-grid {
    display: grid;
    gap: 2rem;
    grid-auto-rows: min-content;
    align-items: start;
}

@media (min-width: 768px) {
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .testimonials-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Cards de Depoimentos */
.testimonial-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--glass-border);
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 1);
}

.testimonial-card.featured {
    border: 2px solid var(--accent-orange);
    background: linear-gradient(135deg, rgba(219, 106, 49, 0.05) 0%, rgba(219, 106, 49, 0.1) 100%);
}

.testimonial-card.featured::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-orange), var(--steel-secondary));
}

/* Badge de Destaque */
.featured-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--accent-orange);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    box-shadow: 0 2px 4px rgba(219, 106, 49, 0.3);
}

/* Mídia do Depoimento */
.testimonial-media {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f3f4f6;
}

.testimonial-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.testimonial-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.testimonial-card:hover .testimonial-image {
    transform: scale(1.05);
}

.video-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.testimonial-media:hover .video-overlay {
    opacity: 1;
}

.play-button {
    width: 4rem;
    height: 4rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-orange);
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.play-button:hover {
    background: white;
    transform: scale(1.1);
    color: var(--steel-secondary);
}

/* Conteúdo do Card */
.testimonial-content {
    padding: 1.5rem;
}

.testimonial-text {
    color: var(--text-dark);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.testimonial-text.expanded {
    -webkit-line-clamp: unset;
    overflow: visible;
}

.read-more-btn {
    color: var(--accent-orange);
    font-weight: 500;
    cursor: pointer;
    transition: color 0.3s ease;
    font-size: 0.875rem;
}

.read-more-btn:hover {
    color: var(--steel-secondary);
}

/* Informações do Aluno */
.student-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.student-avatar {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e5e7eb;
    margin-right: 10px;
}

.student-avatar.placeholder {
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
}

.student-details h4 {
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
    font-size: 1rem;
}

.student-details p {
    color: var(--subtle-gray);
    margin: 0;
    font-size: 0.875rem;
}

.student-course {
    color: var(--accent-orange);
    font-weight: 500;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Avaliação */
.testimonial-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.stars {
    display: flex;
    gap: 0.125rem;
}

.star {
    width: 1rem;
    height: 1rem;
    color: var(--accent-orange);
    filter: drop-shadow(0 1px 2px rgba(219, 106, 49, 0.3));
}

.star.empty {
    color: var(--glass-border);
}

.rating-text {
    color: var(--subtle-gray);
    font-size: 0.875rem;
    font-weight: 500;
}

/* Metadados */
.testimonial-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid var(--glass-border);
    font-size: 0.875rem;
    color: var(--subtle-gray);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.meta-icon {
    width: 1rem;
    height: 1rem;
}

/* Filtros */
.testimonials-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--glass-bg-base);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    backdrop-filter: blur(10px);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-label {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.875rem;
}

.filter-select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--glass-border);
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-dark);
    font-size: 0.875rem;
    transition: border-color 0.3s ease;
}

.filter-select:focus {
    outline: none;
    border-color: var(--accent-orange);
    box-shadow: 0 0 0 3px rgba(219, 106, 49, 0.1);
}

/* Paginação */
.testimonials-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.pagination-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-dark);
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    font-weight: 500;
}

.pagination-btn:hover {
    background: rgba(219, 106, 49, 0.1);
    border-color: var(--accent-orange);
    color: var(--accent-orange);
}

.pagination-btn.current {
    background: var(--accent-orange);
    color: white;
    border-color: var(--accent-orange);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Lightbox */
.testimonial-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.testimonial-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.testimonial-lightbox.active .lightbox-content {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2.5rem;
    height: 2.5rem;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s ease;
}

.lightbox-close:hover {
    background: rgba(0, 0, 0, 0.7);
}

/* Estados de Loading */
.testimonials-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 4rem;
}

.loading-spinner {
    width: 2rem;
    height: 2rem;
    border: 2px solid var(--glass-border);
    border-top: 2px solid var(--accent-orange);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Estados Vazios */
.testimonials-empty {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--subtle-gray);
}

.empty-icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1rem;
    color: var(--glass-border);
}

/* Responsividade */
@media (max-width: 768px) {
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .testimonials-filters {
        flex-direction: column;
        gap: 1rem;
    }

    .filter-group {
        width: 100%;
    }

    .testimonial-content {
        padding: 1rem;
    }

    .testimonial-media {
        height: 160px;
    }

    .student-info {
        gap: 0.75rem;
    }

    .student-avatar {
        width: 2.5rem;
        height: 2.5rem;
    }

    .testimonials-pagination {
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .pagination-btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .testimonial-card {
        margin: 0 1rem;
        border-radius: 0.75rem;
    }

    .testimonials-filters {
        margin: 0 1rem 2rem;
        border-radius: 0.75rem;
    }

    .testimonials-grid {
        padding: 0 1rem;
    }

    .lightbox-content {
        margin: 1rem;
        max-width: calc(100vw - 2rem);
        max-height: calc(100vh - 2rem);
    }
}

/* Animações */
.testimonial-card {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animação de entrada escalonada */
.testimonial-card:nth-child(1) {
    animation-delay: 0.1s;
}

.testimonial-card:nth-child(2) {
    animation-delay: 0.2s;
}

.testimonial-card:nth-child(3) {
    animation-delay: 0.3s;
}

.testimonial-card:nth-child(4) {
    animation-delay: 0.4s;
}

.testimonial-card:nth-child(5) {
    animation-delay: 0.5s;
}

.testimonial-card:nth-child(6) {
    animation-delay: 0.6s;
}

/* Efeitos de hover aprimorados */
.testimonial-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(219, 106, 49, 0.05), rgba(234, 88, 12, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.testimonial-card:hover::after {
    opacity: 1;
}

/* Melhorias de acessibilidade */
.testimonial-card:focus-within {
    outline: 2px solid var(--accent-orange);
    outline-offset: 2px;
}

.filter-select:focus,
.pagination-btn:focus {
    outline: 2px solid var(--accent-orange);
    outline-offset: 2px;
}

/* Modo escuro (opcional) */
@media (prefers-color-scheme: dark) {
    .testimonial-card {
        background: #1f2937;
        color: #f9fafb;
    }

    .testimonial-text {
        color: #d1d5db;
    }

    .student-details h4 {
        color: #f9fafb;
    }

    .student-details p {
        color: #9ca3af;
    }

    .testimonials-filters {
        background: #1f2937;
    }

    .filter-select {
        background: #374151;
        border-color: #4b5563;
        color: #f9fafb;
    }

    .pagination-btn {
        background: #374151;
        border-color: #4b5563;
        color: #f9fafb;
    }

    .pagination-btn:hover {
        background: #4b5563;
    }
}