/* Variáveis de Cores */
:root {
    --primary-color: #0078d4;
    --secondary-color: #50e6ff;
    --accent-color: #ff6b6b;
    --dark-bg: #1e1e1e;
    --light-bg: #f5f5f5;
    --text-dark: #333;
    --text-light: #666;
    --border-color: #e0e0e0;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Reset e Estilos Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 20px 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 28px;
    margin-bottom: 5px;
}

.logo p {
    font-size: 14px;
    opacity: 0.9;
}

.nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

.nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
}

.nav a:hover {
    opacity: 0.8;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0099ff 100%);
    color: white;
    padding: 100px 0;
    text-align: center;
}

.hero h2 {
    font-size: 48px;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero p {
    font-size: 20px;
    margin-bottom: 30px;
    opacity: 0.95;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Buttons */
.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background-color: var(--accent-color);
    color: white;
}

.btn-primary:hover {
    background-color: #ff5252;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

.btn-secondary {
    background-color: var(--primary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: #0066b3;
    transform: translateY(-2px);
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

/* Main Content */
.main-content {
    padding: 60px 0;
    min-height: calc(100vh - 200px);
}

/* Seções */
section {
    margin-bottom: 80px;
}

section h2 {
    font-size: 36px;
    margin-bottom: 40px;
    color: var(--primary-color);
    text-align: center;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 12px 24px;
    border: 2px solid var(--border-color);
    background-color: white;
    color: var(--text-dark);
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.tab-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Módulos */
.modulo {
    background-color: #ffffff;
    padding: 30px;
    margin-bottom: 20px;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.modulo:hover {
    transform: translateX(5px);
}

.modulo h3 {
    color: var(--primary-color);
    font-size: 22px;
    margin-bottom: 10px;
}

.modulo p {
    color: #666666;
    margin-bottom: 15px;
}

.conteudo-modulo {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    margin-top: 15px;
}

.conteudo-modulo h4 {
    color: var(--primary-color);
    margin-top: 15px;
    margin-bottom: 10px;
    font-size: 16px;
}

.conteudo-modulo h4:first-child {
    margin-top: 0;
}

.conteudo-modulo ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

.conteudo-modulo li {
    margin-bottom: 8px;
}

/* Código */
code {
    background-color: #f4f4f4;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: #e83e8c;
}

pre {
    background-color: #1e1e1e;
    color: #d4d4d4;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 15px 0;
    line-height: 1.5;
}

pre code {
    background-color: transparent;
    padding: 0;
    color: inherit;
}

/* Tabela de Funções */
.tabela-funcoes {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

.tabela-funcoes th,
.tabela-funcoes td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.tabela-funcoes th {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
}

.tabela-funcoes tr:hover {
    background-color: var(--light-bg);
}

/* Exemplos */
.exemplos {
    background-color: #ffffff;
    padding: 40px;
    border-radius: 8px;
}

.exemplo-card {
    background-color: #f8f9fa;
    padding: 25px;
    margin-bottom: 20px;
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
    box-shadow: var(--shadow);
}

.exemplo-card h3 {
    color: var(--accent-color);
    margin-bottom: 15px;
}

.exemplo-conteudo p {
    color: #333333;
    margin-bottom: 10px;
}

.exemplo-card h3 {
    color: var(--accent-color);
    margin-bottom: 15px;
}

.exemplo-conteudo p {
    margin-bottom: 10px;
}

.exemplo-conteudo pre {
    margin: 15px 0;
}

/* Recursos */
.recursos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.recurso-card {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    text-align: center;
    border-top: 4px solid var(--primary-color);
    transition: transform 0.3s ease;
}

.recurso-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0, 120, 212, 0.2);
}

.recurso-card h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.recurso-card p {
    color: #666666;
    margin-bottom: 20px;
}

/* Quiz */
.quiz {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 60px 40px;
    border-radius: 8px;
}

.quiz h2 {
    color: white;
    margin-bottom: 40px;
}

.quiz-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.quiz-pergunta {
    background-color: #ffffff;
    color: #333333;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.quiz-pergunta h4 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

.opcoes {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.opcoes label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.opcoes input[type="radio"] {
    margin-right: 10px;
    cursor: pointer;
}

.resultado {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    font-weight: 600;
    display: none;
}

.resultado.correto {
    background-color: #d4edda;
    color: #155724;
    display: block;
}

.resultado.incorreto {
    background-color: #f8d7da;
    color: #721c24;
    display: block;
}

/* Footer */
.footer {
    background-color: var(--dark-bg);
    color: white;
    padding: 30px 0;
    text-align: center;
}

.footer p {
    margin: 5px 0;
    opacity: 0.8;
}

/* Responsivo */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 20px;
    }

    .nav ul {
        gap: 15px;
    }

    .logo h1 {
        font-size: 24px;
    }

    .hero h2 {
        font-size: 36px;
    }

    .hero p {
        font-size: 18px;
    }

    section h2 {
        font-size: 28px;
    }

    .tabs {
        flex-direction: column;
    }

    .tab-btn {
        width: 100%;
    }

    .recursos-grid {
        grid-template-columns: 1fr;
    }

    .quiz-container {
        grid-template-columns: 1fr;
    }

    pre {
        font-size: 12px;
        overflow-x: auto;
    }

    .tabela-funcoes {
        font-size: 14px;
    }

    .tabela-funcoes th,
    .tabela-funcoes td {
        padding: 8px;
    }
}

/* Upload e Análise DAX */
.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #ffffff;
    margin: 20px 0;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background-color: rgba(0, 120, 212, 0.05);
}

.upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    gap: 10px;
}

.upload-icon {
    font-size: 48px;
}

.upload-texto {
    font-weight: 600;
    font-size: 16px;
    color: var(--primary-color);
}

.upload-subtexto {
    font-size: 12px;
    color: var(--text-light);
}

/* Preview Info */
.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.preview-header h3 {
    color: var(--primary-color);
    margin: 0;
}

.preview-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.info-card {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: var(--shadow);
}

.info-valor {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 10px;
}

.info-label {
    font-size: 14px;
    opacity: 0.9;
}

/* Tabela de Colunas */
.colunas-info {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    overflow-x: auto;
}

.tabela-colunas table {
    width: 100%;
    border-collapse: collapse;
}

.tabela-colunas th {
    background-color: var(--primary-color);
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: 600;
}

.tabela-colunas td {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    color: #333333;
}

.tabela-colunas tr:hover {
    background-color: #f8f9fa;
}

.badge-tipo {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.barra-preenchimento {
    width: 100%;
    height: 6px;
    background-color: var(--border-color);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 5px;
}

.barra-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

/* Medidas DAX */
.medidas-section {
    margin-top: 40px;
}

.medidas-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.medidas-header h3 {
    color: var(--primary-color);
    margin: 0;
}

.filtro-medidas {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filtro-btn {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    background-color: white;
    color: var(--text-dark);
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.filtro-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.filtro-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.medidas-lista {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 20px;
}

.medida-card {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border-left: 4px solid var(--primary-color);
}

.medida-card:hover {
    box-shadow: 0 4px 16px rgba(0, 120, 212, 0.2);
    transform: translateY(-2px);
}

.medida-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 10px;
    margin-bottom: 10px;
}

.medida-header h4 {
    margin: 0;
    color: var(--primary-color);
    font-size: 16px;
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.badge-agregacao {
    background-color: #e7f3ff;
    color: var(--primary-color);
}

.badge-contagem {
    background-color: #fff3cd;
    color: #856404;
}

.badge-análise {
    background-color: #d4edda;
    color: #155724;
}

.badge-data {
    background-color: #cfe2ff;
    color: #084298;
}

.badge-categorização {
    background-color: #f8d7da;
    color: #721c24;
}

.medida-descricao {
    color: #666666;
    font-size: 13px;
    margin: 10px 0;
    line-height: 1.4;
}

.medida-formula {
    background-color: #f4f4f4;
    padding: 12px;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    font-size: 12px;
}

.medida-formula code {
    background-color: transparent;
    padding: 0;
    color: #e83e8c;
    font-family: 'Courier New', monospace;
    flex: 1;
    overflow-x: auto;
}

.btn-copiar {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.btn-copiar:hover {
    background-color: #0066b3;
}

/* Seção de Colunas Calculadas */
.colunas-calculadas-section h3 {
    color: var(--primary-color);
    margin-top: 0;
}

/* Responsivo */
@media (max-width: 768px) {
    .medidas-lista {
        grid-template-columns: 1fr;
    }

    .preview-info {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }

    .medidas-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .filtro-medidas {
        width: 100%;
    }

    .medida-formula {
        flex-direction: column;
        align-items: flex-start;
    }

    .btn-copiar {
        width: 100%;
        text-align: center;
    }

    .upload-area {
        padding: 30px 15px;
    }
}

/* Seção de Informações do Gerador */
.info-gerador {
    background: linear-gradient(135deg, #e8f4f8, #f0f8ff);
    padding: 40px;
    border-radius: 8px;
    margin-top: 60px;
}

.info-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.info-step {
    background-color: #ffffff;
    padding: 25px;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 50%;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 15px;
}

.info-step h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.info-step p {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

/* Exemplos do Gerador */
.exemplos-gerador {
    margin-top: 60px;
}

.tipos-medidas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.tipo-medida {
    background: linear-gradient(135deg, rgba(0, 120, 212, 0.05), rgba(80, 230, 255, 0.05));
    border: 1px solid var(--border-color);
    padding: 25px;
    border-radius: 8px;
    border-top: 3px solid var(--primary-color);
}

.tipo-medida h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.tipo-medida p {
    color: #666666;
    font-size: 13px;
    margin-bottom: 15px;
}

.tipo-medida ul {
    list-style-position: inside;
    color: #333333;
}

.tipo-medida li {
    margin-bottom: 8px;
    font-size: 14px;
}

/* FAQ */
.faq-gerador {
    margin-top: 60px;
}

.faq-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.faq-item {
    background-color: #ffffff;
    padding: 25px;
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
}

.faq-item h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 16px;
}

.faq-item p {
    color: #666666;
    font-size: 14px;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .info-cards-grid {
        grid-template-columns: 1fr;
    }

    .tipos-medidas {
        grid-template-columns: 1fr;
    }

    .faq-items {
        grid-template-columns: 1fr;
    }

    .info-gerador {
        padding: 25px;
    }
}
