/* Reset e Estilos Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1e3a8a;
    --primary-light: #3b82f6;
    --primary-dark: #1e40af;
    --secondary-color: #10b981;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-white);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

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

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

.logo h1 {
    font-size: 24px;
    color: var(--primary-color);
    font-weight: 700;
}

.nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s ease;
}

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

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
}

.hero h2 {
    font-size: 48px;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero p {
    font-size: 18px;
    max-width: 600px;
    margin: 0 auto;
    opacity: 0.95;
}

/* Calculadoras Section */
.calculadoras-section {
    padding: 80px 0;
    background-color: var(--bg-light);
}

.calculadoras-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.calculadora-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

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

.calculadora-card h3 {
    font-size: 22px;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.calculadora-card .description {
    color: var(--text-light);
    margin-bottom: 25px;
    font-size: 14px;
    line-height: 1.5;
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: scale(1.02);
}

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

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: #059669;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--bg-white);
    padding: 40px;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease;
}

.modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-light);
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--text-dark);
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

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

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

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

/* Resultado */
.resultado {
    background-color: var(--bg-light);
    border-left: 4px solid var(--secondary-color);
    padding: 20px;
    border-radius: 6px;
    margin-top: 20px;
}

.resultado h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 18px;
}

.resultado-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.resultado-item:last-child {
    border-bottom: none;
}

.resultado-item strong {
    color: var(--text-dark);
}

.resultado-valor {
    color: var(--secondary-color);
    font-weight: 700;
    font-size: 16px;
}

.resultado-total {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-top: 2px solid var(--border-color);
    margin-top: 10px;
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
}

/* Explicações Section */
.explicacoes-section {
    padding: 80px 0;
    background-color: var(--bg-white);
}

.explicacoes-section h2 {
    text-align: center;
    font-size: 36px;
    margin-bottom: 50px;
    color: var(--primary-color);
}

.explicacao-item {
    margin-bottom: 40px;
    padding: 30px;
    background-color: var(--bg-light);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.explicacao-item h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 22px;
}

.explicacao-item p {
    color: var(--text-light);
    line-height: 1.8;
    font-size: 16px;
}

/* Info Section */
.info-section {
    padding: 80px 0;
    background-color: var(--bg-light);
}

.info-section h2 {
    text-align: center;
    font-size: 36px;
    margin-bottom: 50px;
    color: var(--primary-color);
}

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

.info-item {
    background: var(--bg-white);
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.info-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.info-item h4 {
    color: var(--secondary-color);
    margin-bottom: 10px;
    font-size: 18px;
}

.info-item p {
    color: var(--text-light);
    font-size: 14px;
}

/* Footer */
.footer {
    background-color: var(--primary-color);
    color: white;
    padding: 40px 0;
    margin-top: 80px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.footer-links a:hover {
    opacity: 0.8;
}

/* Animações */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsivo */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 20px;
    }

    .nav ul {
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero h2 {
        font-size: 32px;
    }

    .hero p {
        font-size: 16px;
    }

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

    .modal-content {
        padding: 20px;
        width: 95%;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        flex-direction: column;
        gap: 10px;
    }

    .explicacao-item,
    .info-item {
        padding: 20px;
    }

    .explicacoes-section h2,
    .info-section h2 {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 18px;
    }

    .nav ul {
        gap: 10px;
        font-size: 14px;
    }

    .hero {
        padding: 40px 0;
    }

    .hero h2 {
        font-size: 24px;
    }

    .hero p {
        font-size: 14px;
    }

    .calculadora-card h3 {
        font-size: 18px;
    }

    .modal-content {
        padding: 15px;
    }
}
