/* Custom styles for Beregnrente.dk */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #16EA8E;
    --primary-dark: #12BA72;
    --secondary-color: #1AE89A;
    --text-dark: #1e293b;
    --text-gray: #64748b;
    --bg-light: #f8fafc;
    --border-color: #e2e8f0;
    --success-color: #10b981;
    --warning-color: #f59e0b;
}

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

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

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

/* Header */
header {
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-dark);
    font-size: 1.5rem;
    font-weight: 700;
}

.logo img {
    height: 40px;
    width: auto;
}

/* Calculator Section */
.calculator-section {
    padding: 3rem 0;
}

.calculator-wrapper {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.07);
    padding: 2rem;
    margin-bottom: 2rem;
}

.calculator-header {
    text-align: center;
    margin-bottom: 2rem;
}

.calculator-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.calculator-header p {
    font-size: 1.125rem;
    color: var(--text-gray);
}

.calculator-form {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.form-group label {
    font-weight: 500;
    margin-bottom: 0;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group input[type="number"],
.form-group select {
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.2s;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.form-group input[type="number"]:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.range-slider {
    margin-top: 0.5rem;
}

.info-hint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
    font-size: 0.7875rem;
    color: var(--text-gray);
}

.info-hint i {
    font-size: 0.7875rem;
    color: var(--primary-color);
}

.info-text {
    font-size: 0.7875rem;
    color: var(--text-gray);
}

.calculate-btn {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 6px rgba(22, 234, 142, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(22, 234, 142, 0.4);
}

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

/* Results */
.calculator-results {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.results-header {
    margin-bottom: 1.5rem;
}

.results-header h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    white-space: nowrap;
}

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

.result-item {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 0.5rem;
    text-align: center;
}

.result-label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-gray);
    margin-bottom: 0.5rem;
}

.result-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Amortization Table */
.amortization-schedule {
    margin-top: 2rem;
}

.amortization-schedule h4 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.schedule-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
    background: white;
    border-radius: 0.5rem;
    overflow: hidden;
}

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

th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    white-space: nowrap;
}

td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

tbody tr:hover {
    background: var(--bg-light);
}

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

/* Info Box */
.calculator-info {
    margin-top: 2rem;
}

.info-box {
    background: #e6fef5;
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem;
    border-radius: 0.5rem;
}

.info-box h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.info-box ul {
    list-style: none;
    padding-left: 0;
}

.info-box li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.info-box li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

/* Content Section */
.content-section {
    padding: 3rem 0;
    background: white;
}

.content-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

.content-section h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.content-section h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.content-section p {
    margin-bottom: 1rem;
    color: var(--text-gray);
    line-height: 1.8;
}

.content-section ul,
.content-section ol {
    margin: 1rem 0;
    padding-left: 2rem;
    color: var(--text-gray);
}

.content-section li {
    margin-bottom: 0.5rem;
}

.content-section a {
    color: var(--primary-color);
    text-decoration: underline;
}

.content-section a:hover {
    color: var(--primary-dark);
}

.media {
    margin: 2rem 0;
    text-align: center;
}

.media img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* FAQ Section */
.faq-section {
    padding: 3rem 0;
    background: var(--bg-light);
}

.faq-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    overflow: hidden;
}

.faq-head {
    padding: 1.5rem 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s;
}

.faq-head:hover {
    background: var(--bg-light);
}

.faq-head h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.faq-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: transform 0.3s;
    font-weight: bold;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.faq-item.active .faq-content {
    max-height: 2000px;
    transition: max-height 0.5s ease-in;
}

.faq-content-inner {
    padding: 1.5rem;
    color: var(--text-gray);
    line-height: 1.8;
}

/* Footer */
footer {
    background: #16EA8E;
    color: white;
    padding: 2rem 0;
    text-align: center;
}

footer p {
    margin: 0;
    color: rgba(255,255,255,0.8);
}

/* Responsive - Medium screens */
@media (max-width: 1200px) and (min-width: 769px) {
    .calculator-form {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        max-width: 100%;
    }
    
    .calculator-wrapper {
        padding: 1.5rem;
    }
    
    .results-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Responsive - Medium-large screens (768px-1280px) */
@media (max-width: 1280px) and (min-width: 768px) {
    .results-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Responsive - Small screens */
@media (max-width: 768px) {
    .calculator-header h1 {
        font-size: 2rem;
    }
    
    .calculator-form {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        max-width: 100%;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .results-header h3 {
        font-size: 1.5rem;
        white-space: nowrap;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    table {
        font-size: 0.75rem;
        min-width: 500px;
    }
    
    th, td {
        padding: 0.5rem 0.75rem;
        white-space: nowrap;
    }
}

/* Print styles */
@media print {
    header, footer, .calculate-btn {
        display: none;
    }
}

