/* ===== SEÇÃO DE DEPOIMENTOS - MOSAICO DINÂMICO ===== */

.testimonials {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.95) 0%,
        rgba(248, 249, 250, 0.9) 100%);
    backdrop-filter: blur(10px);
}

.testimonials::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent, 
        var(--primary-color, #0066cc), 
        transparent);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-subtitle {
    color: #666;
    font-size: 1.1rem;
    margin-top: 0.5rem;
    font-weight: 300;
}

.testimonial-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.control-btn, .filter-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 50px;
    background: white;
    color: #333;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.control-btn:hover, .filter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.control-btn.active, .filter-btn.active {
    background: linear-gradient(135deg, #0066cc, #0099ff);
    color: white;
}

.filter-btn.active {
    background: linear-gradient(135deg, #ff6600, #ff9900);
}

/* ===== MOSAICO DE CARDS ===== */

.testimonial-mosaic {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    perspective: 1000px;
    margin: 3rem 0;
    justify-items: center;
    align-items: start;
}

.testimonial-card {
    position: relative;
    transform-style: preserve-3d;
    transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    border-radius: 20px;
    overflow: hidden;
    will-change: transform, opacity;
}

/* Animações aleatórias para cada card */
.testimonial-card:nth-child(odd) {
    animation: floatOdd 8s ease-in-out infinite;
}

.testimonial-card:nth-child(even) {
    animation: floatEven 7s ease-in-out infinite;
}

.testimonial-card:nth-child(3n) {
    animation: floatSpecial 9s ease-in-out infinite;
}

.testimonial-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.08),
        0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.4s ease;
    overflow: hidden;
    z-index: 2;
}

.testimonial-card:hover .testimonial-card-inner {
    transform: translateY(-10px);
    box-shadow: 
        0 20px 40px rgba(0, 102, 204, 0.15),
        0 5px 15px rgba(0, 102, 204, 0.1);
}

/* Cores diferentes baseadas no tipo de evento */
.testimonial-card[data-event-type="casamento"] .testimonial-card-inner {
    border-top: 4px solid #ff66cc;
}

.testimonial-card[data-event-type="corporativo"] .testimonial-card-inner {
    border-top: 4px solid #0066cc;
}

.testimonial-card[data-event-type="aniversario"] .testimonial-card-inner {
    border-top: 4px solid #ff9900;
}

.testimonial-card[data-event-type="formatura"] .testimonial-card-inner {
    border-top: 4px solid #00cc99;
}

/* ===== HEADER DO CARD ===== */

.testimonial-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.author-avatar {
    position: relative;
    width: 60px;
    height: 60px;
    flex-shrink: 0;
}

.avatar-initials {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #0066cc, #0099ff);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.5rem;
}

.avatar-decoration {
    position: absolute;
    bottom: -5px;
    right: -5px;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: #ff9900;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.8rem;
}

.author-info {
    flex: 1;
}

.author-name {
    margin: 0;
    font-size: 1.1rem;
    color: #333;
    font-weight: 600;
}

.author-role {
    display: block;
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.2rem;
}

.testimonial-rating {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #ff9900;
}

.testimonial-rating i {
    margin-right: 2px;
}

/* ===== CONTEÚDO DO DEPOIMENTO ===== */

.testimonial-content {
    overflow: hidden;
    position: relative;
    margin-bottom: 1rem;
}

.testimonial-text {
    margin: 0;
    line-height: 1.6;
    color: #444;
    font-size: 0.95rem;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Estado expandido do card */
.testimonial-card.expanded .testimonial-content {
    height: auto;
}

.testimonial-card.expanded .testimonial-text {
    display: block;
    -webkit-line-clamp: unset;
}

.testimonial-card:hover .testimonial-text {
    -webkit-line-clamp: 8;
}

/* ===== FOOTER DO CARD ===== */

.testimonial-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.testimonial-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #888;
}

.testimonial-date i {
    font-size: 0.9rem;
}

.share-btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.share-btn:hover {
    background: rgba(0, 102, 204, 0.1);
    color: #0066cc;
    transform: rotate(15deg);
}

/* ===== ELEMENTOS FLUTUANTES DECORATIVOS ===== */

.floating-element {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    z-index: 1;
    pointer-events: none;
}

.element-1 {
    width: 80px;
    height: 80px;
    background: #0066cc;
    top: -20px;
    right: -20px;
    animation: floatElement1 15s ease-in-out infinite;
}

.element-2 {
    width: 40px;
    height: 40px;
    background: #ff6600;
    bottom: 10px;
    left: 20px;
    animation: floatElement2 12s ease-in-out infinite reverse;
}

.element-3 {
    width: 60px;
    height: 60px;
    background: #00cc99;
    bottom: -15px;
    right: 30px;
    animation: floatElement3 18s ease-in-out infinite;
}

/* ===== ANIMAÇÕES ===== */

@keyframes floatOdd {
    0%, 100% {
        transform: 
            translateY(0) 
            rotate(0deg) 
            scale(1);
    }
    33% {
        transform: 
            translateY(-10px) 
            rotate(0.5deg) 
            scale(1.02);
    }
    66% {
        transform: 
            translateY(5px) 
            rotate(-0.5deg) 
            scale(0.98);
    }
}

@keyframes floatEven {
    0%, 100% {
        transform: 
            translateY(0) 
            rotate(0deg) 
            scale(1);
    }
    25% {
        transform: 
            translateY(-15px) 
            rotate(-0.7deg) 
            scale(1.01);
    }
    50% {
        transform: 
            translateY(8px) 
            rotate(0.7deg) 
            scale(0.99);
    }
    75% {
        transform: 
            translateY(-5px) 
            rotate(-0.3deg) 
            scale(1.005);
    }
}

@keyframes floatSpecial {
    0%, 100% {
        transform: 
            translateY(0) 
            rotate(0deg) 
            scale(1);
    }
    20% {
        transform: 
            translateY(-12px) 
            rotate(1deg) 
            scale(1.03);
    }
    40% {
        transform: 
            translateY(6px) 
            rotate(-1deg) 
            scale(0.97);
    }
    60% {
        transform: 
            translateY(-8px) 
            rotate(0.8deg) 
            scale(1.02);
    }
    80% {
        transform: 
            translateY(4px) 
            rotate(-0.8deg) 
            scale(0.98);
    }
}

@keyframes floatElement1 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(10px, -15px) rotate(90deg); }
    50% { transform: translate(-5px, 10px) rotate(180deg); }
    75% { transform: translate(-15px, -5px) rotate(270deg); }
}

@keyframes floatElement2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-8px, 12px) scale(1.2); }
    66% { transform: translate(12px, -8px) scale(0.8); }
}

@keyframes floatElement3 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    20% { transform: translate(15px, 5px) rotate(72deg); }
    40% { transform: translate(-10px, 15px) rotate(144deg); }
    60% { transform: translate(-15px, -10px) rotate(216deg); }
    80% { transform: translate(5px, -15px) rotate(288deg); }
}

/* ===== ANIMAÇÃO DE ENTRADA ===== */

@keyframes cardEntrance {
    from {
        opacity: 0;
        transform: 
            scale(0.8) 
            rotate(var(--card-rotation, 0deg)) 
            translateY(50px);
    }
    to {
        opacity: 1;
        transform: 
            scale(1) 
            rotate(var(--card-rotation, 0deg)) 
            translateY(0);
    }
}

.testimonial-card.entering {
    animation: cardEntrance 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* ===== CONTROLES INFERIORES ===== */

.testimonial-footer-section {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.load-more-btn {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #0066cc, #0099ff);
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    box-shadow: 0 5px 20px rgba(0, 102, 204, 0.3);
}

.load-more-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 102, 204, 0.4);
    background: linear-gradient(135deg, #0055aa, #0088ee);
}

.load-more-btn:active {
    transform: translateY(-1px);
}

.testimonial-counter {
    margin-top: 1rem;
    color: #666;
    font-size: 0.9rem;
}

.testimonial-counter span:first-child {
    font-weight: bold;
    color: #0066cc;
}

/* ===== RESPONSIVIDADE ===== */

@media (max-width: 1200px) {
    .testimonial-mosaic {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .testimonial-mosaic {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.5rem;
        justify-items: center;
    }
    
    .testimonial-card {
        height: auto;
        max-width: 320px;
        width: 100%;
    }
    
    .testimonial-controls {
        flex-direction: column;
        align-items: center;
        gap: 0.8rem;
    }
    
    .control-btn, .filter-btn {
        width: 90%;
        max-width: 300px;
        justify-content: center;
        font-size: 0.9rem;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    .testimonial-mosaic {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 1.8rem;
    }
    
    .testimonial-card {
        max-width: 340px;
    }
}

@media (max-width: 480px) {
    .testimonial-mosaic {
        grid-template-columns: 1fr;
        gap: 1.2rem;
        padding: 0 1rem;
    }
    
    .testimonial-card {
        max-width: 100%;
        height: auto;
        min-height: 260px;
    }
    
    .testimonial-card-inner {
        padding: 1rem;
    }
    
    .testimonial-header {
        flex-direction: column;
        text-align: center;
        gap: 0.8rem;
    }
    
    .author-info {
        text-align: center;
    }
    
    .author-name {
        font-size: 1rem;
    }
    
    .testimonial-text {
        font-size: 0.9rem;
        line-height: 1.4;
    }
    
    .testimonial-controls {
        gap: 0.6rem;
    }
    
    .control-btn, .filter-btn {
        width: 95%;
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
}

/* ===== MODO ESCURO ===== */

@media (prefers-color-scheme: dark) {
    .testimonials {
        background: linear-gradient(135deg, 
            rgba(30, 30, 46, 0.95) 0%,
            rgba(26, 26, 38, 0.9) 100%);
    }
    
    .testimonial-card-inner {
        background: #2d2d44;
        color: #e0e0e0;
    }
    
    .author-name {
        color: #f0f0f0;
    }
    
    .author-role {
        color: #aaa;
    }
    
    .testimonial-text {
        color: #ccc;
    }
    
    .testimonial-date {
        color: #888;
    }
    
    .share-btn {
        color: #aaa;
    }
    
    .share-btn:hover {
        background: rgba(100, 150, 255, 0.2);
        color: #88aaff;
    }
}

/* Botão "mais" no canto superior direito dos cards */
.card-plus {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.95);
    color: #333;
    border: none;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
    cursor: pointer;
    z-index: 5;
    transition: transform .18s ease, background .18s ease, color .18s ease;
    font-size: 1rem;
}

/* Ícone dentro do botão */
.card-plus i {
    pointer-events: none;
}

/* Hover / active */
.card-plus:hover {
    transform: translateY(-4px);
    background: linear-gradient(135deg,#0066cc,#0099ff);
    color: #fff;
}

/* Garantir contraste no modo escuro */
@media (prefers-color-scheme: dark) {
    .card-plus {
        background: rgba(30,30,40,0.9);
        color: #e6eefc;
        box-shadow: 0 6px 18px rgba(0,0,0,0.4);
    }
    .card-plus:hover {
        background: linear-gradient(135deg,#0055aa,#0077dd);
        color: #fff;
    }
}

/* Para cartões com overflow hidden: garantir visibilidade do botão */
.testimonial-card, .testimonial-card-inner {
    position: relative;
}