﻿.calculator-hero {
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
    color: white;
    padding: 6rem 0 4rem;
    text-align: center;
    margin-top: -80px;
    padding-top: 140px;
}

    .calculator-hero h1 {
        font-size: 2.5rem;
        font-weight: 700;
        margin-bottom: 1rem;
    }

    .calculator-hero p {
        font-size: 1.2rem;
        opacity: 0.95;
        max-width: 700px;
        margin: 0 auto;
    }

.calculators-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 4rem 0;
}

.calculator-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

    .calculator-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 30px rgba(37, 99, 235, 0.15);
        border-color: #2563eb;
    }

    .calculator-card .icon {
        font-size: 3rem;
        margin-bottom: 1rem;
        display: block;
    }

    .calculator-card h3 {
        font-size: 1.5rem;
        color: #1a1a1a;
        margin-bottom: 0.75rem;
        font-weight: 600;
    }

    .calculator-card p {
        color: #6b7280;
        line-height: 1.6;
        margin-bottom: 1rem;
    }

    .calculator-card .learn-more {
        color: #2563eb;
        font-weight: 600;
        text-decoration: none;
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
    }

        .calculator-card .learn-more:hover {
            gap: 0.75rem;
        }

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    overflow-y: auto;
    animation: fadeIn 0.3s ease;
}

    .modal.active {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 2rem 1rem;
    }

.modal-content {
    background: white;
    border-radius: 20px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    padding: 2rem;
    border-radius: 20px 20px 0 0;
    position: sticky;
    top: 0;
    z-index: 10;
}

    .modal-header h2 {
        margin: 0;
        font-size: 1.75rem;
        font-weight: 700;
    }

.close-modal {
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    font-size: 2rem;
    color: white;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

    .close-modal:hover {
        background: rgba(255, 255, 255, 0.3);
        transform: rotate(90deg);
    }

.modal-body {
    padding: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

    .form-group label {
        display: block;
        font-weight: 600;
        margin-bottom: 0.5rem;
        color: #1a1a1a;
        font-size: 0.95rem;
    }

    .form-group input,
    .form-group select {
        width: 100%;
        padding: 0.875rem;
        border: 2px solid #e5e7eb;
        border-radius: 10px;
        font-size: 1rem;
        transition: all 0.3s ease;
        font-family: inherit;
    }

        .form-group input:focus,
        .form-group select:focus {
            outline: none;
            border-color: #2563eb;
            box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
        }

.input-with-addon {
    position: relative;
}

.input-addon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    font-weight: 500;
}

.input-with-addon input {
    padding-right: 3rem;
}

.calculate-btn {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

    .calculate-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
    }

.results-section {
    margin-top: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 16px;
    display: none;
}

    .results-section.active {
        display: block;
        animation: fadeIn 0.5s ease;
    }

.result-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.result-label {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.result-value {
    font-size: 2rem;
    font-weight: 700;
    color: #2563eb;
}

.result-breakdown {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    margin-top: 1rem;
}

    .result-breakdown h4 {
        margin-bottom: 1rem;
        color: #1a1a1a;
        font-size: 1.1rem;
    }

.breakdown-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e5e7eb;
}

    .breakdown-item:last-child {
        border-bottom: none;
    }

.breakdown-label {
    color: #6b7280;
    font-weight: 500;
}

.breakdown-value {
    color: #1a1a1a;
    font-weight: 600;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .calculator-hero {
        padding: 5rem 0 3rem;
        padding-top: 120px;
    }

        .calculator-hero h1 {
            font-size: 2rem;
        }

        .calculator-hero p {
            font-size: 1rem;
        }

    .calculators-grid {
        grid-template-columns: 1fr;
        padding: 2rem 0;
        gap: 1.5rem;
    }

    .modal-content {
        margin: 1rem;
        max-height: 85vh;
    }

    .modal-header {
        padding: 1.5rem;
    }

        .modal-header h2 {
            font-size: 1.5rem;
            padding-right: 2rem;
        }

    .modal-body {
        padding: 1.5rem;
    }

    .result-value {
        font-size: 1.75rem;
    }
}

@media (max-width: 480px) {
    .calculator-hero h1 {
        font-size: 1.75rem;
    }

    .calculator-card {
        padding: 1.5rem;
    }

        .calculator-card .icon {
            font-size: 2.5rem;
        }

        .calculator-card h3 {
            font-size: 1.25rem;
        }
}
