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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #1A535C;
    background-color: #F7FFF7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

/* Header */
.header {
    background: linear-gradient(135deg, #1A535C 0%, #4ECDC4 100%);
    color: #F7FFF7;
    padding: 2rem 0;
    text-align: center;
    box-shadow: 0 2px 10px rgba(26, 83, 92, 0.1);
}

.header__title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header__subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Main */
.main {
    flex: 1;
    padding: 2rem 0;
}

/* Calculator */
.calculator {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.calculator__form {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(26, 83, 92, 0.1);
    border: 1px solid rgba(78, 205, 196, 0.2);
}

.calculator__title {
    font-size: 1.8rem;
    color: #1A535C;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Form Styles */
.form__group {
    margin-bottom: 1.5rem;
}

.form__label {
    display: block;
    font-weight: 600;
    color: #1A535C;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form__required {
    color: #FF6B6B;
    margin-left: 0.25rem;
}
.footer__link {
    color: var(--light-color);
    text-decoration: none;
    transition: var(--transition);
}

.form__input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #F7FFF7;
}

.form__input:focus {
    outline: none;
    border-color: #4ECDC4;
    box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.1);
}

.form__input:invalid {
    border-color: #FF6B6B;
}

.form__help {
    display: block;
    color: #666;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.form__actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
}

.btn--primary {
    background-color: #4ECDC4;
    color: #1A535C;
    flex: 1;
}

.btn--primary:hover {
    background-color: #3db8b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(78, 205, 196, 0.3);
}

.btn--secondary {
    background-color: transparent;
    color: #1A535C;
    border: 2px solid #1A535C;
}

.btn--secondary:hover {
    background-color: #1A535C;
    color: #F7FFF7;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Results */
.calculator__results {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(26, 83, 92, 0.1);
    border: 1px solid rgba(78, 205, 196, 0.2);
}

.results__title {
    font-size: 1.6rem;
    color: #1A535C;
    margin-bottom: 1.5rem;
    text-align: center;
}

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

/* Result Cards */
.result-card {
    background: #F7FFF7;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.result-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 83, 92, 0.1);
}

.result-card--highlight {
    border-color: #4ECDC4;
    background: linear-gradient(135deg, #F7FFF7 0%, rgba(78, 205, 196, 0.1) 100%);
}

.result-card--danger {
    border-color: #FF6B6B;
    background: linear-gradient(135deg, #F7FFF7 0%, rgba(255, 107, 107, 0.1) 100%);
}

.result-card__title {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.result-card__value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1A535C;
    margin-bottom: 0.5rem;
}

.result-card--danger .result-card__value {
    color: #FF6B6B;
}

.result-card__description {
    font-size: 0.85rem;
    color: #666;
}

/* Alert */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.alert--warning {
    background-color: rgba(255, 230, 109, 0.1);
    border: 1px solid #FFE66D;
    color: #b8860b;
}

.alert__icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.alert__content strong {
    display: block;
    margin-bottom: 0.25rem;
}

/* Projection Table */
.projection {
    margin-top: 2rem;
}

.projection__title {
    font-size: 1.4rem;
    color: #1A535C;
    margin-bottom: 1rem;
}

.projection__table-container {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.projection__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.projection__table th,
.projection__table td {
    padding: 0.75rem;
    text-align: right;
    border-bottom: 1px solid #e0e0e0;
}

.projection__table th {
    background-color: #1A535C;
    color: #F7FFF7;
    font-weight: 600;
    text-align: center;
}

.projection__table th:first-child,
.projection__table td:first-child {
    text-align: center;
}

.projection__table tbody tr:hover {
    background-color: rgba(78, 205, 196, 0.05);
}

.projection__table tbody tr:last-child {
    border-bottom: none;
}

/* FAQ */
.faq {
    margin-top: 3rem;
}

.faq__title {
    font-size: 2rem;
    color: #1A535C;
    text-align: center;
    margin-bottom: 2rem;
}

.faq__container {
    max-width: 800px;
    margin: 0 auto;
}

.faq__item {
    background: white;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(26, 83, 92, 0.1);
    overflow: hidden;
}

.faq__question {
    width: 100%;
    padding: 1.5rem;
    background: none;
    border: none;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1A535C;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.faq__question:hover {
    background-color: rgba(78, 205, 196, 0.05);
}

.faq__question[aria-expanded="true"] {
    background-color: rgba(78, 205, 196, 0.1);
}

.faq__icon {
    font-size: 1.5rem;
    font-weight: 300;
    transition: transform 0.3s ease;
}

.faq__question[aria-expanded="true"] .faq__icon {
    transform: rotate(45deg);
}

.faq__answer {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq__answer.faq__answer--open {
    padding: 0 1.5rem 1.5rem;
    max-height: 200px;
}

.faq__answer p {
    color: #666;
    line-height: 1.6;
}

/* Footer */
.footer {
    background-color: #1A535C;
    color: #F7FFF7;
    padding: 1.5rem 0;
    text-align: center;
    margin-top: auto;
}

.footer__text {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header__title {
        font-size: 2rem;
    }
    
    .header__subtitle {
        font-size: 1rem;
    }
    
    .calculator {
        grid-template-columns: 1fr;
    }
    
    .calculator__form,
    .calculator__results {
        padding: 1.5rem;
    }
    
    .form__actions {
        flex-direction: column;
    }
    
    .results__grid {
        grid-template-columns: 1fr;
    }
    
    .projection__table {
        font-size: 0.8rem;
    }
    
    .projection__table th,
    .projection__table td {
        padding: 0.5rem;
    }
    
    .faq__question {
        font-size: 1rem;
        padding: 1rem;
    }
    
    .faq__answer.faq__answer--open {
        padding: 0 1rem 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }
    
    .header {
        padding: 1.5rem 0;
    }
    
    .main {
        padding: 1.5rem 0;
    }
    
    .calculator__form,
    .calculator__results {
        padding: 1rem;
    }
    
    .result-card__value {
        font-size: 1.5rem;
    }
    
    .projection__table-container {
        font-size: 0.75rem;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for accessibility */
.form__input:focus,
.btn:focus,
.faq__question:focus {
    outline: 2px solid #4ECDC4;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .header,
    .faq,
    .footer {
        display: none;
    }
    
    .calculator__form {
        display: none;
    }
    
    .calculator__results {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(26, 83, 92, 0.3);
    border-radius: 50%;
    border-top-color: #1A535C;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Utility classes */
.hidden {
    display: none !important;
}

.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-danger {
    color: #FF6B6B !important;
}

.text-success {
    color: #4ECDC4 !important;
}
