/* ============================================
   ESTILOS GLOBAIS - CalcZone BR
   Inspirado em Pico CSS - Minimalista e Elegante
   ============================================ */

:root {
    /* Paleta de cores moderna */
    --primary: #7c3aed;
    --primary-dark: #6d28d9;
    --secondary: #06b6d4;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    
    /* Tons de cinza */
    --text: #111827;
    --text-secondary: #4b5563;
    --text-light: #6b7280;
    --text-lighter: #9ca3af;
    
    /* Fundos */
    --bg-dark: #0f172a;
    --bg: #f8fafc;
    --bg-light: #ffffff;
    --bg-soft: #f1f5f9;
    
    /* Borders */
    --border: #e2e8f0;
    --border-dark: #cbd5e1;
    
    /* Sombras */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-weight: 400;
}

/* ============================================
   TIPOGRAFIA
   ============================================ */

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

/* ============================================
   LAYOUT PRINCIPAL
   ============================================ */

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border);
    background: var(--bg-light);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
}

.logo:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.header nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.header nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding: 0.5rem 0;
}

.header nav a:hover {
    color: var(--primary);
}

.header nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.header nav a:hover::after {
    width: 100%;
}

.main {
    padding: 3rem 0;
    min-height: calc(100vh - 200px);
}

.footer {
    background: var(--bg-soft);
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    text-align: center;
    color: var(--text-light);
    font-size: 0.875rem;
    margin-top: 4rem;
}

/* ============================================
   SEÇÃO DE FERRAMENTA
   ============================================ */

.tool-section {
    margin-bottom: 3rem;
}

.tool-header {
    text-align: center;
    margin-bottom: 3rem;
}

.tool-header h1 {
    margin-bottom: 0.75rem;
    color: var(--text);
}

.tool-header .description {
    font-size: 1rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.8;
}

.tool-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

@media (min-width: 968px) {
    .tool-container {
        grid-template-columns: 1fr 1fr;
    }
}

/* ============================================
   FORMULÁRIO
   ============================================ */

.tool-form {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    color: var(--text);
    background: var(--bg-light);
    transition: var(--transition);
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
    background: var(--bg-light);
}

.form-group input::placeholder {
    color: var(--text-lighter);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .form-row {
        grid-template-columns: 1fr 1fr;
    }
}

/* ============================================
   BOTÕES
   ============================================ */

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
    font-family: inherit;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn:active {
    transform: translateY(0);
}

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

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--bg-soft);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border);
    border-color: var(--border-dark);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-block {
    width: 100%;
}

/* ============================================
   RESULTADO
   ============================================ */

.result {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
}

.result h2 {
    margin-bottom: 1.5rem;
    color: var(--text);
    font-size: 1.5rem;
}

.result-content {
    margin-bottom: 1.5rem;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--bg-soft);
    border-radius: 8px;
    margin-bottom: 0.75rem;
    border-left: 3px solid var(--primary);
    transition: var(--transition);
}

.result-item:hover {
    background: var(--border);
}

.result-item:last-child {
    margin-bottom: 0;
}

.result-item label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.result-item value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
}

.result-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.summary-card {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(6, 182, 212, 0.08));
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    transition: var(--transition);
}

.summary-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.summary-card label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 600;
    display: block;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-card value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
    display: block;
}

.hidden {
    display: none !important;
}

/* ============================================
   SEÇÃO DE INFORMAÇÕES
   ============================================ */

.info-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.info-card {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.info-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.info-card h3 {
    margin-bottom: 1rem;
    color: var(--primary);
    font-size: 1.25rem;
}

.info-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ============================================
   UTILITÁRIOS
   ============================================ */

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    
    .header nav {
        gap: 1rem;
    }
    
    .main {
        padding: 2rem 0;
    }
    
    .tool-header {
        margin-bottom: 2rem;
    }
}
