:root {
    /* Cores - Tema Claro Construção */
    --primary: #f59e0b; /* Laranja amarelo, lembrando equipamento/tijolo */
    --primary-hover: #d97706;
    --background: #f8fafc;
    --surface: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --accent: #2563eb; /* Azul para constraste */
    
    /* Sombras e Raios */
    --radius: 12px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background);
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

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

/* Header */
.app-header {
    background-color: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 10;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-hover);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s;
}

.logo:hover {
    transform: scale(1.02);
}

.main-nav {
    display: flex;
    gap: 10px;
}

.nav-btn {
    background: transparent;
    border: none;
    padding: 8px 16px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: var(--radius);
    transition: all 0.2s ease;
}

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

/* Main Content Area */
.main-content {
    flex: 1;
    padding: 40px 20px;
    width: 100%;
}

/* View Animations */
.view-container {
    animation: fadeIn 0.3s ease-out;
}

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

/* Cards & Forms */
.card {
    background-color: var(--surface);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}

.view-header {
    width: 100%;
    height: calc(100vh - 70px); /* Ocupa a tela cheia descontando o header */
    margin-bottom: 40px;

    /* Gradientes múltiplos: transição no bottom (to top) e lateral (to right) */
    background-image: 
        linear-gradient(
            to top,
            #f8fafc 0%,
            rgba(248, 250, 252, 0) 60%
        ),
        linear-gradient(
            to right,
            rgba(248, 250, 252, 0.95) 0%,
            rgba(248, 250, 252, 0.8) 40%,
            rgba(248, 250, 252, 0) 100%
        ), 
        url("../img/banner.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    display: flex;
    align-items: center;
}

.view-header .container {
    width: 100%;
    max-width: 1024px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.view-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
    color: var(--text-main);
    max-width: 100%;
}

.view-subtitle {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 0;
    max-width: 100%;
}

/* Responsividade do Hero: Alinhado à esquerda até a metade da tela em computadores */
@media (min-width: 768px) {
    .view-title,
    .view-subtitle {
        max-width: 50%;
    }
}

/* Estilos para o Cabeçalho das Calculadoras individuais */
.calc-header {
    margin-bottom: 24px;
}

.calc-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
}

.calc-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.2s, transform 0.1s;
}

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

.btn-primary:active {
    transform: scale(0.98);
}

/* Results Box */
.result-box {
    margin-top: 24px;
    padding: 20px;
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    display: none;
}

.result-box.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.result-title {
    color: #166534;
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.result-value {
    font-size: 2rem;
    font-weight: 700;
    color: #15803d;
}

/* Footer */
.app-footer {
    text-align: center;
    padding: 24px;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    background-color: var(--surface);
    font-size: 0.9rem;
}

/* Grid Dashboard */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

/* Seções de categoria */
.categoria-section {
    margin-bottom: 40px;
    scroll-margin-top: 90px;
}

.categoria-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
}

.categoria-icon {
    font-size: 1.3rem;
}

.categoria-titulo {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Cards de calculadora */
.calc-card {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    cursor: pointer;
}

.calc-card:hover:not(.calc-card-breve) {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    border-color: var(--primary);
}

.calc-card-titulo {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-main);
}

.calc-card-desc {
    color: var(--text-muted);
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Card "Em breve" */
.calc-card-breve {
    cursor: default;
    opacity: 0.6;
    filter: grayscale(0.4);
}

.badge-breve {
    display: inline-block;
    margin-top: 6px;
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
    color: #475569;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 999px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* Bloco "Em breve" para categorias sem nenhuma calculadora */
.categoria-breve-bloco {
    margin-top: 16px;
}

.breve-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px;
    background: repeating-linear-gradient(
        -45deg,
        #f8fafc,
        #f8fafc 8px,
        #f1f5f9 8px,
        #f1f5f9 16px
    );
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    text-align: center;
}

.breve-placeholder-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.breve-placeholder-texto {
    font-size: 1.1rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.breve-placeholder-sub {
    font-size: 0.85rem;
    color: #cbd5e1;
    margin-top: 4px;
}

.calc-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

/* Botão Secundário (adicionar à lista) */
.btn-secondary {
    background-color: transparent;
    color: var(--primary-hover);
    border: 2px solid var(--primary);
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, transform 0.1s;
}

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

.btn-secondary:active {
    transform: scale(0.98);
}

/* Botão primário desabilitado */
.btn-primary:disabled {
    background-color: #d1d5db;
    cursor: not-allowed;
    transform: none;
}

/* Badge de contagem */
.badge {
    background-color: var(--primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
}

/* Tabela de elementos */
.th {
    padding: 10px 16px;
    text-align: left;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
}

.td {
    padding: 12px 16px;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.td-dim {
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.tr-linha:last-child .td {
    border-bottom: none;
}

.tr-linha:hover {
    background-color: var(--background);
}

/* Botão remover */
.btn-remover {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background-color 0.15s;
}

.btn-remover:hover {
    background-color: #fee2e2;
}

/* ── Cards de Material (Calculadora de Concreto) ── */
.material-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background-color: var(--surface);
    box-shadow: var(--shadow-sm);
}

.material-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.material-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.material-valor {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-main);
}

.material-detalhe {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.material-cimento { border-left: 4px solid #94a3b8; }
.material-areia   { border-left: 4px solid #f59e0b; }
.material-brita   { border-left: 4px solid #64748b; }

/* Link inline para navegar entre calculadoras */
.link-btn {
    background: none;
    border: none;
    color: var(--accent);
    font-size: inherit;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    font-weight: 500;
}

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

/* ── Container para os Anúncios Google AdSense ── */
.adsense-container {
    width: 100%;
    max-width: 600px;
    min-height: 90px;
    margin: 24px auto 0 auto;
    background-color: var(--background);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Rótulo de anúncio discreto para estar em conformidade com as regras do AdSense */
.adsense-container::before {
    content: "PUBLICIDADE";
    font-size: 0.625rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    position: absolute;
    top: 4px;
    left: 8px;
    opacity: 0.7;
}

