/* Base Styles */
.tn-calculator {
    max-width: 600px;
    margin: 0 auto;
    padding: 25px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 0 15px rgba(0,0,0,0.08);
}

.tn-input-group {
    margin-bottom: 20px;
}

.tn-input-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
}

.tn-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
}

.tn-result {
    margin: 25px 0;
    padding: 15px;
    background: #f0f4ff;
    border-radius: 8px;
}

.tn-chart-container {
    margin-top: 30px;
    height: 300px;
}

/* Responsive */
@media (max-width: 600px) {
    .tn-calculator {
        padding: 15px;
    }
}


/* Calculator Categories Grid */
.tn-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.tn-category-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.tn-category-card:hover {
    transform: translateY(-5px);
}

.tn-category-card a {
    display: block;
    color: inherit;
    text-decoration: none;
}

.tn-category-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.tn-category-card h3 {
    margin: 15px 15px 5px;
    color: #2c3e50;
}

.tn-category-card p {
    margin: 0 15px 15px;
    color: #7f8c8d;
    font-size: 14px;
}

/* Mortgage Calculator Specific Styles */
.tn-mortgage-calculator {
    max-width: 1000px;
    margin: 0 auto;
    padding: 25px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

.tn-calc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.tn-input-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.tn-range-labels {
    display: flex;
    justify-content: space-between;
    margin: 5px 0;
    font-size: 12px;
    color: #7f8c8d;
}

.tn-results-section {
    display: grid;
    grid-template-rows: auto auto auto 1fr;
    gap: 15px;
}

.tn-result-card {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
}

.tn-result-card h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #2c3e50;
}

.tn-result-value {
    font-size: 24px;
    font-weight: bold;
    color: #0073e6;
}

.tn-amortization-section {
    margin-top: 40px;
}

.tn-table-scroll {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #eee;
    border-radius: 8px;
}

#tn-amort-table {
    width: 100%;
    border-collapse: collapse;
}

#tn-amort-table th {
    position: sticky;
    top: 0;
    background: #f8f9fa;
}

#tn-amort-table th, 
#tn-amort-table td {
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

@media (max-width: 768px) {
    .tn-calc-grid {
        grid-template-columns: 1fr;
    }
}