/**
 * Estilos Customizados - Landing Page
 * Autor: Alexsandro Gomes Pereira (https://lifeweb.com.br)
 * Data: 2024-11-25 21:00:00
 */

/* Scroll suave */
html {
    scroll-behavior: smooth;
}

/* Header transparente que fica sólido ao rolar */
#header {
    background: linear-gradient(to bottom, rgba(0,0,0,0.8), transparent);
    transition: all 0.3s ease;
}

#header.scrolled {
    background: rgba(17, 24, 39, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Botões animados */
.btn-primary {
    @apply bg-gradient-to-r from-yellow-400 to-orange-500 text-gray-900 font-bold px-6 py-3 rounded-full hover:from-yellow-500 hover:to-orange-600 transition-all duration-300 transform hover:scale-105 shadow-lg;
}

.btn-primary-large {
    @apply bg-gradient-to-r from-yellow-400 to-orange-500 text-gray-900 font-bold px-8 py-4 rounded-full hover:from-yellow-500 hover:to-orange-600 transition-all duration-300 transform hover:scale-105 shadow-2xl text-lg;
    animation: pulse-button 2s infinite;
}

@keyframes pulse-button {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.7);
    }
    50% {
        box-shadow: 0 0 0 20px rgba(251, 191, 36, 0);
    }
}

/* Background pattern */
.bg-pattern {
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(236, 72, 153, 0.3) 0%, transparent 50%);
}

/* Animações de entrada */
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

.animate-fade-in-left {
    animation: fadeInLeft 1s ease-out;
}

.animate-fade-in-right {
    animation: fadeInRight 1s ease-out;
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

/* Cards de capítulos */
.chapter-card {
    transition: all 0.3s ease;
}

.chapter-card:hover {
    transform: translateY(-5px);
}

/* Carousel de depoimentos */
.testimonials-carousel {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.testimonial-card {
    min-width: calc(33.333% - 1rem);
    margin: 0 0.5rem;
    transition: all 0.3s ease;
}

@media (max-width: 1024px) {
    .testimonial-card {
        min-width: calc(50% - 1rem);
    }
}

@media (max-width: 640px) {
    .testimonial-card {
        min-width: calc(100% - 1rem);
    }
}

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

/* Estrelas de avaliação */
.stars {
    color: #fbbf24;
}

/* WhatsApp flutuante */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.3);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    animation: pulse-whatsapp 2s infinite;
}

.whatsapp-float:hover {
    background-color: #128c7e;
    transform: scale(1.1);
}

@keyframes pulse-whatsapp {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    50% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }
}

/* Formulário */
.form-input {
    @apply w-full px-4 py-3 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-transparent transition;
}

.form-textarea {
    @apply px-4 py-3 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-transparent transition resize-none;
    width: 100%;
    min-height: 120px;
}

.form-button {
    @apply bg-gradient-to-r from-indigo-600 to-purple-600 text-white font-bold px-8 py-4 rounded-lg hover:from-indigo-700 hover:to-purple-700 transition-all duration-300 transform hover:scale-105 shadow-lg;
}

/* Estilos específicos para o painel admin */
.admin-form-input,
.admin-form-select,
input[type="text"].form-input,
input[type="email"].form-input,
input[type="password"].form-input,
input[type="number"].form-input,
input[type="url"].form-input,
input[type="tel"].form-input,
input[type="date"].form-input,
select.form-input {
    border: 1px solid #d1d5db !important; /* Cinza claro */
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    width: 100%;
    transition: all 0.3s ease;
}

.admin-form-input:focus,
.admin-form-select:focus,
input[type="text"].form-input:focus,
input[type="email"].form-input:focus,
input[type="password"].form-input:focus,
input[type="number"].form-input:focus,
input[type="url"].form-input:focus,
input[type="tel"].form-input:focus,
input[type="date"].form-input:focus,
select.form-input:focus {
    border-color: #6366f1 !important; /* Indigo ao focar */
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

textarea.form-input,
textarea.form-textarea {
    border: 1px solid #d1d5db !important; /* Cinza claro */
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    width: 100% !important;
    min-height: 120px;
    transition: all 0.3s ease;
    resize: vertical;
}

textarea.form-input:focus,
textarea.form-textarea:focus {
    border-color: #6366f1 !important; /* Indigo ao focar */
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Loading spinner */
.spinner {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 3px solid white;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mockup do livro */
.book-mockup {
    perspective: 1000px;
}

.book-mockup img {
    transform-style: preserve-3d;
    transition: transform 0.5s ease;
    filter: none;
    box-shadow: none;
}

.book-mockup:hover img {
    transform: rotateY(-5deg) rotateX(5deg);
}

/* Responsividade */
@media (max-width: 768px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
        font-size: 24px;
    }
}

/* Alertas */
.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.alert-info {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

/* Tabelas Admin - Design Moderno e Responsivo */
.admin-table {
    width: 100%;
    background-color: #ffffff;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    table-layout: auto;
    border-collapse: separate;
    border-spacing: 0;
}

/* Cabeçalho com azul clean */
.admin-table thead {
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
}

.admin-table th {
    padding: 1rem 1.5rem;
    text-align: left;
    font-size: 0.875rem;
    font-weight: 600;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    border-bottom: 2px solid #2563eb;
}

/* Primeira coluna do cabeçalho com borda arredondada */
.admin-table th:first-child {
    border-top-left-radius: 0.75rem;
}

.admin-table th:last-child {
    border-top-right-radius: 0.75rem;
}

/* Células do corpo */
.admin-table td {
    padding: 1rem 1.5rem;
    font-size: 0.875rem;
    color: #1f2937;
    border-bottom: 1px solid #e5e7eb;
    word-wrap: break-word;
    vertical-align: middle;
}

/* Linhas alternadas */
.admin-table tbody tr:nth-child(even) {
    background-color: #f9fafb;
}

.admin-table tbody tr:nth-child(odd) {
    background-color: #ffffff;
}

/* Hover nas linhas */
.admin-table tbody tr:hover {
    background-color: #eff6ff;
    transition: background-color 0.2s ease;
    cursor: pointer;
}

/* Última linha sem borda */
.admin-table tbody tr:last-child td {
    border-bottom: none;
}

/* Container das tabelas - 100% da largura */
.overflow-x-auto {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 0.75rem;
}

/* Scrollbar customizada */
.overflow-x-auto::-webkit-scrollbar {
    height: 8px;
}

.overflow-x-auto::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.overflow-x-auto::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.overflow-x-auto::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Responsividade das tabelas */
@media (max-width: 1024px) {
    .admin-table th,
    .admin-table td {
        padding: 0.875rem 1.25rem;
        font-size: 0.8125rem;
    }
}

@media (max-width: 768px) {
    .admin-table th,
    .admin-table td {
        padding: 0.75rem 1rem;
        font-size: 0.75rem;
    }
    
    .admin-table th {
        letter-spacing: 0.025em;
    }
}

@media (max-width: 640px) {
    .admin-table th,
    .admin-table td {
        padding: 0.625rem 0.75rem;
        font-size: 0.7rem;
    }
}

/* Badges */
.badge {
    @apply inline-flex items-center px-3 py-1 rounded-full text-xs font-medium;
}

.badge-success {
    @apply bg-green-100 text-green-800;
}

.badge-warning {
    @apply bg-yellow-100 text-yellow-800;
}

.badge-danger {
    @apply bg-red-100 text-red-800;
}

.badge-info {
    @apply bg-blue-100 text-blue-800;
}

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ========================================
   CARROSSEL DE DEPOIMENTOS
   ======================================== */

.testimonials-carousel {
    --testimonial-gap: 24px;
    display: flex;
    gap: var(--testimonial-gap);
    transition: transform 0.6s ease-in-out;
    will-change: transform;
    width: 100%;
}

.testimonial-card {
    flex: 0 0 calc((100% - (var(--testimonial-gap) * 2)) / 3);
    max-width: none;
    min-width: 0;
    background: white;
    margin: 0;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.testimonial-card .stars {
    font-size: 18px;
}

/* Responsividade do carrossel */
@media (max-width: 1024px) {
    .testimonial-card {
        flex-basis: calc((100% - var(--testimonial-gap)) / 2);
        max-width: none;
        min-width: 240px;
    }
}

@media (max-width: 640px) {
    .testimonials-carousel {
        --testimonial-gap: 16px;
    }

    .testimonial-card {
        flex-basis: 100%;
        max-width: none;
        min-width: 0;
    }
    
    .testimonials-carousel {
        gap: var(--testimonial-gap);
    }
}
