/*
=================================================
  REVISÃO CSS - OTIMIZADO PARA COPIAR E COLAR
  (Inclui otimização para header fixo no body)
=================================================
*/

/* 1. Reset Básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 2. Variáveis CSS (Cores e Configurações) */
:root {
    --primary: #8B5CF6; /* Roxo principal */
    --primary-dark: #7C3AED;
    --secondary: #D946EF; /* Rosa */
    --dark: #1A1A2E; /* Cor de texto padrão (modo claro) */
    --light: #F8F9FA; /* Cor de fundo padrão (modo claro) */
    --gray: #6C757D;
    --success: #00C851;
    --gradient: linear-gradient(135deg, var(--primary), var(--secondary));
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --header-height: 80px; /* Altura aproximada do header */
}

/* 3. Modo Escuro */
[data-theme="dark"] {
    --dark: #F8F9FA; /* Inverte texto e fundo */
    --light: #1A1A2E;
    --gray: #B0B7C3;
}

/* 4. Estilo Geral do Corpo */
body {
    font-family: 'Poppins', sans-serif;
    color: var(--dark);
    background-color: var(--light);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
    min-height: 100vh;
    /* OTIMIZAÇÃO: Adiciona padding para compensar o header fixo */
    padding-top: var(--header-height); 
}

/* 5. Contêiner de Largura Limitada */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 6. Seções */
section {
    padding: 80px 0;
}

/* 7. Botões Padrão */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: var(--gradient);
    color: white;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    box-shadow: none;
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

/* 8. Título de Seção */
.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    width: 70px;
    height: 4px;
    background: var(--gradient);
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

/* 9. Header e Navegação */
header {
    background-color: var(--light);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.3s;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    /* Altura total deve ser aproximadamente var(--header-height) */
}

.logo {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 1.8rem;
    color: var(--dark);
    text-decoration: none;
}

.logo span {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--dark);
    cursor: pointer;
}

/* 10. Theme Toggle */
.theme-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
}

.theme-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: var(--shadow);
}

/* 11. Hero Section */
.hero {
    /* Padding-top compensa o header, mas é um extra sobre o padding-top do body */
    padding-top: 70px; 
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.05) 0%, rgba(217, 70, 239, 0.05) 100%);
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-text h1 {
    font-size: 3.2rem;
    margin-bottom: 20px;
    line-height: 1.1;
}

.hero-text h1 span {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    margin: 30px 0 40px;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.stat {
    text-align: center;
    padding: 20px;
    background: var(--light);
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary);
}

.hero-image img {
    width: 100%;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

/* 12. Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--light);
    border-radius: 15px;
    padding: 30px;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-10px);
}

.service-icon {
    width: 70px;
    height: 70px;
    background: var(--gradient);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.service-icon i {
    font-size: 1.8rem;
    color: white;
}

.service-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin: 15px 0;
}

.service-features {
    list-style: none;
    margin: 20px 0;
    flex-grow: 1;
}

.service-features li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.service-features li:before {
    content: "✓";
    color: var(--success);
    font-weight: bold;
}

/* 13. Process Section (Aba) */
.process-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.process-tab {
    padding: 12px 24px;
    background: var(--light);
    border: 2px solid var(--primary);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    color: var(--dark); /* Garantir visibilidade no modo escuro */
}

.process-tab.active {
    background: var(--primary);
    color: white;
}

.process-content {
    background: var(--light);
    border-radius: 15px;
    padding: 40px;
    box-shadow: var(--shadow);
    min-height: 300px;
}

.process-step {
    display: none;
    animation: fadeIn 0.5s;
}

.process-step.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 14. Cases Section */
.cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.case-card {
    background: var(--light);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.case-card:hover {
    transform: translateY(-10px);
}

.case-image {
    height: 200px;
    overflow: hidden;
}

.case-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.case-card:hover .case-image img {
    transform: scale(1.1);
}

.case-content {
    padding: 25px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 10px;
}

.project-tag {
    background: rgba(139, 92, 246, 0.1);
    color: var(--primary);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* 15. Carrossel 3D */
.carrossel-section {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.02) 0%, rgba(217, 70, 239, 0.02) 100%);
    padding: 80px 0;
}

.carrossel-wrapper {
    width: 100%;
    height: 400px;
    position: relative;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin: 40px 0;
}

.carrossel-inner {
    /* Variáveis de controle do carrossel */
    --w: 120px;
    --h: 180px;
    --translateZ: calc((var(--w) + var(--h)) + 0px);
    --rotateX: -15deg;
    --perspective: 1000px;
    --quantity: 8;
    
    position: absolute;
    width: var(--w);
    height: var(--h);
    top: 25%;
    left: calc(50% - (var(--w) / 2) - 2.5px);
    z-index: 2;
    transform-style: preserve-3d;
    transform: perspective(var(--perspective));
    animation: rotating 30s linear infinite;
}

@keyframes rotating {
    from {
        transform: perspective(var(--perspective)) rotateX(var(--rotateX))
            rotateY(0);
    }
    to {
        transform: perspective(var(--perspective)) rotateX(var(--rotateX))
            rotateY(1turn);
    }
}

.carrossel-card {
    position: absolute;
    border: 2px solid rgba(139, 92, 246, 0.5);
    border-radius: 12px;
    overflow: hidden;
    inset: 0;
    /* Usa a custom property --index definida no HTML para calcular a rotação */
    transform: rotateY(calc((360deg / var(--quantity)) * var(--index)))
        translateZ(var(--translateZ));
    background: #000;
}

.carrossel-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #0000
        radial-gradient(
            circle,
            rgba(139, 92, 246, 0.2) 0%,
            rgba(139, 92, 246, 0.6) 80%,
            rgba(139, 92, 246, 0.9) 100%
        );
}

.carrossel-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
}

/* 16. Calendar RESPONSIVO */
.calendar-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--light);
    border-radius: 15px;
    padding: 30px;
    box-shadow: var(--shadow);
    overflow-x: auto;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    min-width: 300px; /* Garante que a grade não fique muito estreita */
}

.calendar-date {
    aspect-ratio: 1; /* Mantém as datas quadradas */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.3s;
    padding: 5px;
    min-height: 40px;
}

.calendar-date.today {
    background: var(--gradient);
    color: white;
}

/* 17. Consulting Section */
.consulting-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.consulting-card {
    background: var(--light);
    border-radius: 15px;
    padding: 30px;
    box-shadow: var(--shadow);
}

/* 18. Integration Services */
.integration-services {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.integration-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: var(--light);
    border-radius: 10px;
    box-shadow: var(--shadow);
}

/* 19. Contact Form */
.contact-form {
    max-width: 800px;
    margin: 0 auto;
    background: var(--light);
    border-radius: 15px;
    padding: 40px;
    box-shadow: var(--shadow);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: var(--light);
    color: var(--dark);
    /* Transição para suportar modo escuro */
    transition: border-color 0.3s, background-color 0.3s, color 0.3s;
}

.file-upload {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    /* Transição para suportar modo escuro */
    transition: border-color 0.3s;
}

/* 20. Footer */
footer {
    background: var(--dark);
    color: white;
    padding: 80px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
}

.footer-logo {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 2rem;
    margin-bottom: 20px;
}

.footer-logo span {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: background 0.3s;
}

.social-links a:hover {
    background: var(--primary);
}

.payment-methods {
    margin-top: 30px;
}

.payment-icons {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.legal-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.legal-links a {
    color: var(--secondary);
    text-decoration: none;
}

/* 21. Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--light);
    border-radius: 15px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    position: relative;
    transform: translateY(-50px);
    transition: transform 0.3s;
}

.modal.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark);
}

/* 22. Notificação */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--gradient);
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    z-index: 3000;
    display: none;
    animation: slideIn 0.3s forwards;
}

.notification.active {
    display: block;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 23. Responsive */
@media (max-width: 1200px) {
    .carrossel-inner {
        --w: 100px;
        --h: 150px;
    }
}

@media (max-width: 992px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-image {
        order: -1; /* Move a imagem para cima em telas menores */
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-stats {
        grid-template-columns: repeat(3, 1fr);
        max-width: 600px;
        margin: 0 auto;
    }
    
    .carrossel-inner {
        --w: 80px;
        --h: 120px;
    }
    
    .carrossel-wrapper {
        height: 300px;
    }

    /* Ajuste para o padding-top do body, já que o conteúdo do hero foi ajustado */
    body {
        padding-top: var(--header-height); 
    }
    .hero {
        padding-top: 50px; /* Reduz o padding do hero para não ficar muito grande */
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        background: var(--light);
        flex-direction: column;
        padding: 20px;
        text-align: center;
        box-shadow: var(--shadow);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .process-tabs {
        flex-direction: column;
        align-items: center;
    }
    
    .calendar-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .calendar-grid {
        grid-template-columns: repeat(7, 1fr);
        gap: 8px;
        font-size: 0.9rem;
    }
    
    .calendar-date {
        min-height: 35px;
        font-size: 0.85rem;
    }
    
    .carrossel-inner {
        --w: 60px;
        --h: 90px;
        --translateZ: calc((var(--w) + var(--h)) - 30px);
    }
    
    .carrossel-wrapper {
        height: 250px;
    }
}

@media (max-width: 576px) {
    .hero-text h1 {
        font-size: 2.2rem;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
        max-width: 300px; /* Limita largura do stat em telas muito pequenas */
    }
    
    .integration-services {
        grid-template-columns: 1fr;
    }
    
    .calendar-grid {
        gap: 5px;
    }
    
    .calendar-date {
        min-height: 30px;
        font-size: 0.8rem;
    }
    
    .carrossel-inner {
        --w: 50px;
        --h: 75px;
        --translateZ: calc((var(--w) + var(--h)) - 50px);
    }
    
    .carrossel-wrapper {
        height: 200px;
    }

    .footer-content {
        grid-template-columns: 1fr; /* Colunas do footer empilhadas */
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }

    .payment-icons {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .calendar-grid {
        gap: 4px;
        font-size: 0.8rem;
    }
    
    .calendar-date {
        min-height: 25px;
        font-size: 0.75rem;
    }
}