/* ====================================
   INVESTSIM PRO - Estilo Banco Tradicional
   Profissional, Claro, Confiável
   ==================================== */

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

:root {
    /* Paleta - Banco Tradicional */
    --primary: #003d7a;          /* Azul corporativo */
    --primary-dark: #002a55;
    --primary-light: #1a5ca0;
    --accent: #d4a017;            /* Dourado */
    --accent-dark: #b88a0f;

    --success: #1a7f4a;
    --danger: #c0392b;
    --warning: #e67e22;

    --bg: #f7f9fc;
    --bg-white: #ffffff;
    --bg-light: #eef2f7;

    --text: #1a2332;
    --text-secondary: #4a5568;
    --text-muted: #718096;

    --border: #e2e8f0;
    --border-strong: #cbd5e0;

    --shadow-sm: 0 1px 3px rgba(0, 61, 122, 0.06);
    --shadow: 0 4px 12px rgba(0, 61, 122, 0.08);
    --shadow-lg: 0 12px 32px rgba(0, 61, 122, 0.12);

    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 16px;

    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

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

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

/* ============ HEADER ============ */
.header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-invictrypro: 100;
    box-shadow: var(--shadow-sm);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.logo-accent {
    color: var(--accent);
}

.nav {
    display: flex;
    gap: 32px;
}

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

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

.nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: var(--transition);
}

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

/* ============ HERO ============ */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 80px 0 100px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(212, 160, 23, 0.15), transparent 60%);
}

.hero-content {
    max-width: 800px;
    position: relative;
}

.hero-badge {
    display: inline-block;
    background: rgba(212, 160, 23, 0.2);
    color: var(--accent);
    padding: 6px 16px;
    border-radius: 24px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
    border: 1px solid rgba(212, 160, 23, 0.3);
}

.hero h1 {
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.highlight {
    color: var(--accent);
    position: relative;
}

.hero p {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 40px;
    max-width: 720px;
}

.hero-stats {
    display: flex;
    gap: 48px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.75);
    margin-top: 4px;
}

/* ============ SECTIONS ============ */
section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-header h2 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.section-header p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ============ SIMULATOR ============ */
.simulator-section {
    margin-top: -60px;
    position: relative;
    z-invictrypro: 10;
}

.simulator-grid {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 32px;
    align-items: start;
}

.form-card,
.results-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

.card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--bg-light);
}

.card-title svg {
    color: var(--accent);
}

/* FORM */
.form-group {
    margin-bottom: 24px;
}

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

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-prefix {
    position: absolute;
    left: 16px;
    color: var(--text-muted);
    font-weight: 600;
    pointer-events: none;
    font-size: 0.95rem;
}

.input-wrapper input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
    background: var(--bg-white);
    transition: var(--transition);
    font-family: inherit;
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 61, 122, 0.1);
}

.quick-buttons {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.quick-btn {
    flex: 1;
    min-width: 70px;
    padding: 6px 10px;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

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

.period-selector {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.period-btn {
    padding: 12px;
    background: var(--bg-light);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

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

.period-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 61, 122, 0.25);
}

/* TOGGLE */
.toggle-group {
    background: var(--bg-light);
    padding: 16px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px !important;
}

.toggle-label input[type="checkbox"] {
    display: none;
}

.toggle-slider {
    position: relative;
    width: 44px;
    height: 24px;
    background: var(--border-strong);
    border-radius: 12px;
    transition: var(--transition);
    flex-shrink: 0;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    transition: var(--transition);
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.toggle-label input:checked + .toggle-slider {
    background: var(--primary);
}

.toggle-label input:checked + .toggle-slider::before {
    transform: translateX(20px);
}

.toggle-group small {
    display: block;
    color: var(--text-muted);
    font-size: 0.82rem;
    margin-left: 56px;
}

/* BUTTONS */
.btn-primary {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0, 61, 122, 0.25);
    font-family: inherit;
    letter-spacing: 0.3px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 61, 122, 0.35);
}

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

.btn-export {
    padding: 8px 16px;
    background: var(--bg-light);
    color: var(--primary);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
}

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

/* RESULTS */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--bg-light);
}

.results-header .card-title {
    margin: 0;
    padding: 0;
    border: none;
}

.results-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

.summary-item {
    background: var(--bg-light);
    padding: 20px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    text-align: center;
}

.summary-item.highlight-item {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 61, 122, 0.2);
}

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

.summary-item.highlight-item .summary-label {
    color: rgba(255, 255, 255, 0.85);
}

.summary-value {
    display: block;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.3px;
}

.summary-item.highlight-item .summary-value {
    color: white;
    font-size: 1.6rem;
}

.summary-value.positive {
    color: var(--success);
}

.chart-wrapper {
    position: relative;
    height: 320px;
    margin-bottom: 16px;
}

.info-note {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(212, 160, 23, 0.08);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.info-note svg {
    color: var(--accent);
    flex-shrink: 0;
}

/* ============ COMPARATIVO ============ */
.filter-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 10px 20px;
    background: var(--bg-white);
    border: 2px solid var(--border);
    border-radius: 24px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

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

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

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

.invest-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.invest-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--card-color, var(--primary));
}

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

.invest-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.invest-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: var(--card-bg-light);
}

.risk-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.risk-baixo {
    background: rgba(26, 127, 74, 0.1);
    color: var(--success);
}

.risk-medio {
    background: rgba(230, 126, 34, 0.1);
    color: var(--warning);
}

.risk-alto {
    background: rgba(192, 57, 43, 0.1);
    color: var(--danger);
}

.invest-card h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.invest-card-rate {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.invest-card-rate strong {
    color: var(--card-color);
    font-size: 1rem;
}

.invest-card-result {
    background: var(--bg-light);
    padding: 16px;
    border-radius: var(--radius);
    margin-bottom: 12px;
}

.invest-card-result-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: 4px;
}

.invest-card-result-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--card-color, var(--primary));
    letter-spacing: -0.3px;
}

.invest-card-gain {
    font-size: 0.85rem;
    color: var(--success);
    font-weight: 600;
}

/* ============ TABLE ============ */
.table-wrapper {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow-x: auto;
    box-shadow: var(--shadow);
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.comparison-table thead {
    background: var(--primary);
    color: white;
}

.comparison-table th {
    padding: 16px;
    text-align: left;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.comparison-table th:first-child {
    border-top-left-radius: var(--radius-lg);
}

.comparison-table th:last-child {
    border-top-right-radius: var(--radius-lg);
}

.comparison-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 0.92rem;
}

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

.comparison-table tr:hover {
    background: var(--bg-light);
}

.comparison-table .ativo-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--text);
}

.comparison-table .icon-cell {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.comparison-table .value-cell {
    font-weight: 700;
    color: var(--primary);
    font-variant-numeric: tabular-nums;
}

.comparison-table .rate-cell {
    font-weight: 600;
    color: var(--text-secondary);
}

/* ============ INFO CARDS ============ */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.info-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: var(--transition);
}

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

.info-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.info-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
}

.info-card h4 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
}

.info-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 12px;
}

.info-card-meta {
    display: flex;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
}

.info-card-meta span {
    color: var(--text-muted);
}

.info-card-meta strong {
    color: var(--primary);
}

/* ============ DISCLAIMER ============ */
.disclaimer-section {
    padding: 40px 0 80px;
}

.disclaimer-card {
    background: linear-gradient(135deg, #fff8e1, #fff3cd);
    border: 1px solid #f0d479;
    border-radius: var(--radius-lg);
    padding: 32px;
    color: #5c4a16;
}

.disclaimer-card h3 {
    color: #8a6d1c;
    font-size: 1.2rem;
    margin-bottom: 12px;
    font-weight: 700;
}

.disclaimer-card p {
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 12px;
}

.disclaimer-card .data-source {
    font-size: 0.85rem;
    font-style: italic;
    color: #7a5e1a;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed #d4a017;
}

/* ============ FOOTER ============ */
.footer {
    background: var(--primary-dark);
    color: rgba(255, 255, 255, 0.85);
    padding: 48px 0 32px;
}

.footer .logo {
    color: white;
    margin-bottom: 12px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 32px;
    align-items: start;
}

.footer-brand p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.footer-info {
    text-align: right;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.65);
}

.footer-info p {
    margin-bottom: 4px;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 968px) {
    .simulator-grid {
        grid-template-columns: 1fr;
    }

    .nav {
        display: none;
    }

    .hero {
        padding: 60px 0 80px;
    }

    .hero-stats {
        gap: 24px;
    }

    .stat-value {
        font-size: 2rem;
    }

    .results-summary {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .footer-info {
        text-align: left;
    }

    section {
        padding: 60px 0;
    }

    .section-header h2 {
        font-size: 1.7rem;
    }
}

@media (max-width: 540px) {
    .container {
        padding: 0 16px;
    }

    .form-card,
    .results-card {
        padding: 20px;
    }

    .period-selector {
        grid-template-columns: repeat(2, 1fr);
    }

    .results-header {
        flex-direction: column;
        gap: 12px;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .hero p {
        font-size: 1rem;
    }
}

/* ============ ANIMATIONS ============ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.invest-card,
.info-card {
    animation: fadeInUp 0.5s ease-out backwards;
}

.invest-card:nth-child(1) { animation-delay: 0.05s; }
.invest-card:nth-child(2) { animation-delay: 0.1s; }
.invest-card:nth-child(3) { animation-delay: 0.15s; }
.invest-card:nth-child(4) { animation-delay: 0.2s; }
.invest-card:nth-child(5) { animation-delay: 0.25s; }
.invest-card:nth-child(6) { animation-delay: 0.3s; }
.invest-card:nth-child(7) { animation-delay: 0.35s; }
.invest-card:nth-child(8) { animation-delay: 0.4s; }
.invest-card:nth-child(9) { animation-delay: 0.45s; }
.invest-card:nth-child(10) { animation-delay: 0.5s; }
.invest-card:nth-child(11) { animation-delay: 0.55s; }
