/* =====================================================
   BASE.CSS - Reset, Variáveis e Tipografia
   Site: Calculadora de Idade Gestacional
   Autor: Dr. Rafael Peters
   ===================================================== */

/* ===== RESET BÁSICO ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===== VARIÁVEIS CSS ===== */
:root {
    /* Cores dos Trimestres */
    --rosa: #EC4899;
    --rosa-claro: #F472B6;
    --rosa-bg: rgba(236, 72, 153, 0.15);
    --rosa-borda: rgba(236, 72, 153, 0.3);
    
    --roxo: #8B5CF6;
    --roxo-claro: #A78BFA;
    --roxo-bg: rgba(139, 92, 246, 0.15);
    --roxo-borda: rgba(139, 92, 246, 0.3);
    
    --azul: #3B82F6;
    --azul-claro: #60A5FA;
    --azul-bg: rgba(59, 130, 246, 0.15);
    --azul-borda: rgba(59, 130, 246, 0.3);
    
    /* Cores de Fundo */
    --bg-dark: #0f172a;
    --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e1b4b 30%, #0f172a 100%);
    --bg-card: #1e293b;
    --bg-card-hover: #334155;
    --bg-input: #0f172a;
    --bg-overlay: rgba(0, 0, 0, 0.3);
    
    /* Cores de Texto */
    --texto: #f1f5f9;
    --texto-secundario: #94a3b8;
    --texto-terciario: #64748b;
    
    /* Bordas */
    --borda: #334155;
    --borda-input: #475569;
    
    /* Sombras */
    --sombra-card: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --sombra-elevada: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
    --sombra-glow-rosa: 0 0 20px rgba(236, 72, 153, 0.3);
    --sombra-glow-roxo: 0 0 20px rgba(139, 92, 246, 0.3);
    --sombra-glow-azul: 0 0 20px rgba(59, 130, 246, 0.3);
    
    /* Espaçamentos */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;
    
    /* Bordas Arredondadas */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Transições */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Tipografia */
    --font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'Consolas', 'Monaco', monospace;
    
    /* Tamanhos de Fonte */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 2rem;
    --text-4xl: 2.5rem;
    --text-5xl: 3.5rem;
    
    /* Z-index */
    --z-base: 1;
    --z-dropdown: 100;
    --z-modal: 1000;
    --z-tooltip: 1100;
}

/* ===== ESTILOS GLOBAIS ===== */
html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background: var(--bg-gradient);
    min-height: 100vh;
    color: var(--texto);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== TIPOGRAFIA ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--texto);
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }

p {
    color: var(--texto-secundario);
    margin-bottom: var(--spacing-md);
}

a {
    color: var(--roxo);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--roxo-claro);
    text-decoration: underline;
}

strong {
    font-weight: 600;
    color: var(--texto);
}

small {
    font-size: var(--text-sm);
    color: var(--texto-secundario);
}

/* ===== TEXTO GRADIENTE ===== */
.texto-gradiente {
    background: linear-gradient(135deg, var(--rosa), var(--roxo), var(--azul));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== CORES DE TEXTO POR TRIMESTRE ===== */
.texto-tri1, .texto-rosa { color: var(--rosa); }
.texto-tri2, .texto-roxo { color: var(--roxo); }
.texto-tri3, .texto-azul { color: var(--azul); }

/* ===== LISTAS ===== */
ul, ol {
    list-style: none;
}

/* ===== IMAGENS ===== */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ===== SELEÇÃO DE TEXTO ===== */
::selection {
    background: var(--roxo);
    color: white;
}

/* ===== SCROLLBAR PERSONALIZADA ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--borda);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--texto-terciario);
}

/* ===== FOCUS VISIBLE ===== */
:focus-visible {
    outline: 2px solid var(--roxo);
    outline-offset: 2px;
}

/* ===== UTILITÁRIOS ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing-md); }
.mb-3 { margin-bottom: var(--spacing-lg); }
.mb-4 { margin-bottom: var(--spacing-xl); }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mt-3 { margin-top: var(--spacing-lg); }
.mt-4 { margin-top: var(--spacing-xl); }
