﻿

/* ============================================================
   PAGE HERO — faixa colorida no topo das páginas
   ============================================================ */
.page-hero {
    padding: 2.5rem 0;
    margin-bottom: 2rem;
}
.page-hero h1 { font-size: 2rem; color: white; margin-bottom: 0.35rem; }
.page-hero p  { color: rgba(255,255,255,.85); font-size: 1rem; }
.page-hero-content { display: flex; justify-content: space-between; align-items: center; }

.ferramentas-hero { background: linear-gradient(135deg, var(--primary-color, #F97316), #ff9933); }
.ferramentas-hero h1 { color: white; }
.ferramentas-hero p  { color: rgba(255,255,255,.85); }

.ferramenta-page {
    background: var(--bg-secondary);
    min-height: calc(100vh - 200px);
    padding: 3rem 0;
}

.ferramenta-page .page-header {
    background: linear-gradient(135deg, var(--primary-color), #ff9933);
    color: white;
    padding: 3rem 2rem;
    border-radius: var(--radius-lg);
    text-align: center;
    margin-bottom: 3rem;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.ferramenta-page .page-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.ferramenta-page .page-header h1 {
    font-size: 2.5rem;
    color: white;
    margin-bottom: 0.75rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
}

.ferramenta-page .page-header p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.25rem;
    font-weight: 300;
    position: relative;
    z-index: 1;
}


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

.tool-grid .card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.tool-grid .card:hover {
    border-color: rgba(255, 140, 0, 0.2);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.tool-grid .card h2 {
    color: var(--primary-color);
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--gray-200);
}


.tool-form {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.tool-form .form-group {
    display: flex;
    flex-direction: column;
}

.tool-form .form-group label {
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.tool-form .form-group input,
.tool-form .form-group select {
    padding: 0.875rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.tool-form .form-group input:focus,
.tool-form .form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 140, 0, 0.1);
    transform: translateY(-1px);
}

.tool-form .form-group small {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: block;
    line-height: 1.5;
}

.alocacao-total-box {
    color: #1f2937;
}

.alocacao-total-box strong {
    color: #1f2937;
}

.tool-form input[type="range"] {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: var(--gray-200);
    outline: none;
    -webkit-appearance: none;
}

.tool-form input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
}

.tool-form input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
}

.range-value {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 1rem 0;
}


.resultado-card {
    background: linear-gradient(135deg, var(--primary-color), #ff9933) !important;
    color: white;
    position: relative;
    overflow: hidden;
}

.resultado-card::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.resultado-card h2 {
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 1;
}

/* Forca contraste do titulo de resultado em todas as calculadoras */
.ferramenta-page .resultado-card h2,
.ferramenta-page .resultado-card .h2subtitulo {
    color: #ffffff !important;
}

.resultado-destaque {
    background: rgba(255, 255, 255, 0.2);
    padding: 2rem;
    border-radius: var(--radius-lg);
    text-align: center;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 1;
}

.resultado-label {
    display: block;
    font-size: 0.875rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.resultado-valor {
    display: block;
    font-size: 3rem;
    font-weight: 800;
}

.resultado-info {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    background: rgba(255, 255, 255, 0.15);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.info-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(5px);
}

.info-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.info-item strong {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

.info-item p {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.info-item.essenciais {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.3);
}

.info-item.lazer {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.3);
}

.info-item.poupanca {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.3);
}

.info-item small {
    font-size: 0.75rem;
    opacity: 0.8;
    display: block;
    margin-top: 0.25rem;
}

.chart-container-juros {
    position: relative;
    height: 350px;
    margin: 2rem 0;
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: var(--radius-md);
}

.chart-container-financiamento {
    position: relative;
    height: 400px;
    margin: 2rem 0;
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: var(--radius-md);
}

.comparacao-sistemas {
    margin-top: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(255, 140, 0, 0.1), rgba(255, 140, 0, 0.05));
    border-radius: var(--radius-md);
    border: 2px solid rgba(255, 140, 0, 0.3);
}

.comparacao-sistemas h4 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

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

.comparacao-grid > * {
    min-width: 0;
}

.sistema-card {
    background: white;
    padding: 1.25rem;
    border-radius: var(--radius-md);
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    min-width: 0;
}

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

.sistema-card strong {
    display: block;
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.sistema-card p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.valor-sistema {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.25;
}

.valor-sistema.destaque {
    color: var(--success);
}

.economia-info {
    text-align: center;
    padding: 1rem;
    background: white;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.95rem;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.chart-container-financiamento canvas,
.chart-container-juros canvas {
    width: 100% !important;
    max-width: 100%;
}

.economia-info strong {
    color: var(--success);
    font-weight: 700;
}

.valor-percentual {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
}

.info-item-full {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, rgba(255, 140, 0, 0.15), rgba(255, 140, 0, 0.05));
    padding: 1.5rem;
    border-radius: var(--radius-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 2px solid rgba(255, 140, 0, 0.3);
}

.dica-box {
    background: rgba(255, 255, 255, 0.95);
    color: var(--text-primary);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border-left: 5px solid var(--warning);
    box-shadow: var(--shadow-sm);
    position: relative;
    z-index: 1;
}

.dica-box strong {
    display: block;
    margin-bottom: 0.75rem;
    color: var(--warning);
    font-size: 1.125rem;
}

.dica-box p {
    margin: 0;
    line-height: 1.7;
    font-size: 1rem;
}

.resultado-card .dica-box {
    background: #fff7e8;
    color: #1f2937;
    border-left-color: #f59e0b;
}

.resultado-card .dica-box strong {
    color: #b45309 !important;
}

.resultado-card .dica-box p {
    color: #1f2937 !important;
}

:root[data-theme="semi-dark"] .dica-box,
:root[data-theme="dark"] .dica-box {
    background: rgba(20, 20, 20, 0.86);
    color: #f3f4f6;
    border-left-color: #f59e0b;
    border: 1px solid #4b5563;
}

:root[data-theme="semi-dark"] .dica-box strong,
:root[data-theme="dark"] .dica-box strong {
    color: #fbbf24;
}

:root[data-theme="semi-dark"] .dica-box p,
:root[data-theme="dark"] .dica-box p {
    color: #e5e7eb;
}

:root[data-theme="semi-dark"] .resultado-card .dica-box,
:root[data-theme="dark"] .resultado-card .dica-box {
    background: rgba(20, 20, 20, 0.92);
    color: #f3f4f6;
    border-color: #4b5563;
}

:root[data-theme="semi-dark"] .resultado-card .dica-box strong,
:root[data-theme="dark"] .resultado-card .dica-box strong {
    color: #fbbf24 !important;
}

:root[data-theme="semi-dark"] .resultado-card .dica-box p,
:root[data-theme="dark"] .resultado-card .dica-box p {
    color: #e5e7eb !important;
}


.educacional {
    background: white;
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-top: 2rem;
}

.educacional h2 {
    text-align: center;
    margin-bottom: 2.5rem;
    color: var(--primary-color);
    font-size: 2rem;
}

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

.educacional-item {
    text-align: center;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
}

.educacional-item:hover {
    background: var(--bg-secondary);
    transform: translateY(-5px);
}

.edu-icon {
    font-size: 3.5rem;
    display: block;
    margin-bottom: 1.25rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.educacional-item h3 {
    font-size: 1.35rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 600;
}

.educacional-item p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 1rem;
}

.transparencia-card {
    margin-top: 1.5rem;
    background: linear-gradient(180deg, #fffaf1 0%, #fff3df 100%);
    border: 1px solid #ffd29a;
    border-left: 4px solid var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.transparencia-card h2,
.transparencia-card h3 {
    color: #9a4f00;
    border-bottom-color: #ffd29a;
    font-weight: 700;
}

.transparencia-card .resultado-info {
    margin-bottom: 0;
}

.transparencia-card .info-item {
    align-items: flex-start;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid #ffe1b5;
    backdrop-filter: none;
}

.transparencia-card .info-item:hover {
    transform: none;
    background: #fffdf9;
}

.transparencia-card .info-item strong {
    color: #8a4900;
    font-size: 0.86rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.transparencia-card .info-item p {
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.55;
    color: #4b2e10;
}

.transparencia-list {
    margin: 0;
    padding-left: 1.2rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

:root[data-theme="semi-dark"] .transparencia-card,
:root[data-theme="dark"] .transparencia-card {
    background: linear-gradient(180deg, #2a2117 0%, #241c14 100%);
    border-color: #6e4a22;
}

:root[data-theme="semi-dark"] .transparencia-card h2,
:root[data-theme="semi-dark"] .transparencia-card h3,
:root[data-theme="dark"] .transparencia-card h2,
:root[data-theme="dark"] .transparencia-card h3 {
    color: #ffc680;
    border-bottom-color: #6e4a22;
}

:root[data-theme="semi-dark"] .transparencia-card .info-item,
:root[data-theme="dark"] .transparencia-card .info-item {
    background: rgba(20, 20, 20, 0.72);
    border-color: #4f3921;
}

:root[data-theme="semi-dark"] .transparencia-card .info-item strong,
:root[data-theme="dark"] .transparencia-card .info-item strong {
    color: #ffcf92;
}

:root[data-theme="semi-dark"] .transparencia-card .info-item p,
:root[data-theme="dark"] .transparencia-card .info-item p {
    color: #f1dbc1;
}

/* Seções explicativas das calculadoras (cards de normas e explicações) */
.card:not(.resultado-card):not(.transparencia-card) .resultado-info .info-item {
    flex-direction: column;
    align-items: flex-start;
}

.card:not(.resultado-card):not(.transparencia-card) .resultado-info .info-item strong {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.35rem;
    opacity: 0.85;
}

.card:not(.resultado-card):not(.transparencia-card) .resultado-info .info-item p {
    font-size: 0.97rem;
    font-weight: 400;
    line-height: 1.65;
    margin: 0;
}


@media (max-width: 968px) {
    .tool-grid {
        grid-template-columns: 1fr;
    }
    
    .resultado-valor {
        font-size: 2.5rem;
    }
    
    .ferramenta-page .page-header h1 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .ferramenta-page {
        padding: 2rem 0;
    }
    
    .ferramenta-page .page-header {
        padding: 2rem 1.5rem;
        margin-bottom: 2rem;
    }
    
    .ferramenta-page .page-header h1 {
        font-size: 1.75rem;
    }
    
    .ferramenta-page .page-header p {
        font-size: 1rem;
    }
    
    .tool-grid .card {
        padding: 2rem 1.5rem;
    }
    
    .educacional {
        padding: 2rem 1.5rem;
    }
    
    .educacional-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .info-item {
        padding: 1.25rem;
    }
    
    .info-item p {
        font-size: 1.25rem;
    }

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

    .chart-container-financiamento,
    .chart-container-juros {
        height: 280px;
        padding: 0.75rem;
    }
}


@media (max-width: 768px) {
    .ferramenta-page {
        padding: 2rem 0;
    }
    
    .ferramenta-page .page-header {
        padding: 2rem 1.5rem;
        margin-bottom: 2rem;
    }
    
    .ferramenta-page .page-header h1 {
        font-size: 2rem;
    }
    
    .ferramenta-page .page-header p {
        font-size: 1rem;
    }
    
    .tool-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .tool-grid .card {
        padding: 1.5rem;
    }
    
    .tool-grid .card h2 {
        font-size: 1.5rem;
        margin-bottom: 1.25rem;
    }
    
    .tool-form {
        gap: 1.5rem;
    }
    
    .tool-form .form-group label {
        font-size: 0.9375rem;
    }
    
    .tool-form input,
    .tool-form select {
        padding: 0.875rem;
        font-size: 16px; 
    }
    
    .tool-result {
        padding: 1.5rem;
    }
    
    .resultado-principal {
        font-size: 2rem;
    }
    
    .resultado-label {
        font-size: 0.9375rem;
    }
    
    .resultado-detalhes {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .detalhe-item {
        padding: 1rem;
    }
    
    .detalhe-valor {
        font-size: 1.25rem;
    }
    
    .educacional {
        padding: 1.5rem;
    }
    
    .educacional h3 {
        font-size: 1.25rem;
    }
    
    .educacional-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .info-item {
        padding: 1.25rem;
    }
    
    
    .parcelas-table {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .parcelas-table table {
        min-width: 500px;
        font-size: 0.875rem;
    }
    
    .chart-container {
        height: 250px !important;
    }
    
    
    .tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .tab-button {
        min-width: 120px;
        padding: 0.75rem 1rem;
        font-size: 0.9375rem;
    }
}

@media (max-width: 480px) {
    .ferramenta-page .page-header {
        padding: 1.5rem 1rem;
    }
    
    .ferramenta-page .page-header h1 {
        font-size: 1.75rem;
    }
    
    .ferramenta-page .page-header p {
        font-size: 0.9375rem;
    }
    
    .tool-grid .card {
        padding: 1.25rem;
    }
    
    .tool-grid .card h2 {
        font-size: 1.375rem;
    }
    
    .tool-form input,
    .tool-form select {
        padding: 0.75rem;
    }
    
    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9375rem;
    }
    
    .resultado-principal {
        font-size: 1.75rem;
    }
    
    .detalhe-valor {
        font-size: 1.125rem;
    }
    
    .educacional {
        padding: 1.25rem;
    }
    
    .educacional h3 {
        font-size: 1.125rem;
    }
    
    .info-item {
        padding: 1rem;
    }
    
    .info-item p {
        font-size: 1.125rem;
    }
}


@media (hover: none) and (pointer: coarse) {
    .tool-form input,
    .tool-form select,
    .tool-form textarea {
        min-height: 44px;
    }
    
    .btn {
        min-height: 44px;
    }
    
    .tab-button {
        min-height: 44px;
    }
}

