/* Amortisation Calculator Specific Styles */

/* Base reset and typography */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #ffffff;
}

/* Header and Navigation */
.main-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: 70px;
}

.logo a {
    font-size: 26px;
    font-weight: 700;
    color: #204080;
    text-decoration: none;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 12px;
    align-items: center;
}

.nav-links a {
    color: #333;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    padding: 14px 18px;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: #204080;
    background: rgba(32, 64, 128, 0.08);
}

.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    min-width: 250px;
    padding: 12px;
    margin-top: 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
}

.dropdown-menu a {
    display: block;
    padding: 12px 16px;
    color: #333;
    font-size: 15px;
    border-radius: 8px;
    margin: 2px 0;
}

.dropdown-menu a:hover {
    background: rgba(32, 64, 128, 0.08);
    color: #204080;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: #333;
    cursor: pointer;
}

/* Breadcrumb */
.breadcrumb {
    background: #f8f9ff;
    padding: 12px 0;
}

.breadcrumb ol {
    list-style: none;
    display: flex;
    gap: 8px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.breadcrumb a {
    color: #204080;
    text-decoration: none;
    font-size: 14px;
}

.breadcrumb li:not(:last-child):after {
    content: "›";
    margin-left: 8px;
    color: #666;
}

/* Page Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.page-header {
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f2ff 100%);
    padding: 60px 0;
    text-align: center;
}

.page-title {
    font-size: 42px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 16px;
    letter-spacing: -1px;
}

.page-subtitle {
    font-size: 20px;
    color: #204080;
    margin-bottom: 16px;
    font-weight: 600;
}

.page-description {
    font-size: 18px;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* Main Content */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 24px;
}

.calculator-section {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    margin-bottom: 40px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    color: #204080;
    margin-bottom: 24px;
    text-align: center;
}

/* Form Styling */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.form-grid.balanced-2 {
    grid-template-columns: repeat(2, 1fr);
}

.input-group {
    margin-bottom: 24px;
}

.input-label {
    display: block;
    font-weight: 600;
    color: #204080;
    margin-bottom: 8px;
    font-size: 16px;
}

.input-label.required::after {
    content: " *";
    color: #e53e3e;
    font-weight: bold;
}

.input-wrapper {
    position: relative;
}

.form-input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e5e5e5;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.2s ease;
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: #204080;
    box-shadow: 0 0 0 4px rgba(32, 64, 128, 0.1);
}

.form-input.error {
    border-color: #e53e3e;
    animation: shake 0.3s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.with-currency {
    padding-left: 48px;
}

.with-percent {
    padding-right: 48px;
}

.currency-symbol {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-weight: 600;
}

.percent-symbol {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-weight: 600;
}

/* Buttons */
.button-group {
    display: flex;
    gap: 16px;
    margin-top: 24px;
}

.calculate-btn,
.reset-btn {
    background: linear-gradient(135deg, #204080 0%, #3366cc 100%);
    color: white;
    padding: 16px 32px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
}

.reset-btn {
    background: linear-gradient(135deg, #666 0%, #888 100%);
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(32, 64, 128, 0.25);
}

.reset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 102, 102, 0.25);
}

/* Results Section */
.results-section {
    display: none;
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f2ff 100%);
    border-radius: 16px;
    padding: 32px;
    margin-top: 32px;
}

.results-title {
    font-size: 24px;
    font-weight: 700;
    color: #204080;
    margin-bottom: 24px;
    text-align: center;
}

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

.result-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.result-card h3 {
    color: #204080;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
}

.result-value {
    font-size: 32px;
    font-weight: 700;
    color: #204080;
    margin-bottom: 8px;
}

.result-label {
    font-size: 14px;
    color: #666;
    font-weight: 600;
}

/* Schedule Table */
.schedule-container {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-top: 24px;
}

.schedule-title {
    font-size: 20px;
    font-weight: 700;
    color: #204080;
    margin-bottom: 16px;
}

.schedule-table {
    width: 100%;
    border-collapse: collapse;
}

.schedule-table th,
.schedule-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.schedule-table th {
    background: #f8f9ff;
    font-weight: 700;
    color: #204080;
}

.schedule-table tr:hover {
    background: #f8f9ff;
}

.table-container {
    max-height: 400px;
    overflow-y: auto;
    border-radius: 8px;
}

/* Validation Modal */
.validation-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.validation-modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 30px;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.validation-modal h3 {
    color: #e53e3e;
    margin-bottom: 16px;
    font-size: 24px;
}

.validation-modal ul {
    text-align: left;
    color: #666;
    margin: 16px 0;
}

.validation-modal-close {
    background: #204080;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
}

/* Info and Related Sections */
.info-section {
    background: #f8f9ff;
    border-radius: 16px;
    padding: 32px;
    margin-top: 40px;
}

.info-title {
    font-size: 24px;
    font-weight: 700;
    color: #204080;
    margin-bottom: 24px;
    text-align: center;
}

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

.info-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.info-card h3 {
    color: #204080;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
}

.info-card ul {
    list-style: none;
    padding-left: 16px;
}

.info-card li {
    padding: 8px 0;
    color: #666;
    position: relative;
}

.info-card li:before {
    content: "•";
    color: #204080;
    font-weight: bold;
    position: absolute;
    left: -16px;
}

.related-calculators {
    background: white;
    border-radius: 16px;
    padding: 32px;
    margin-top: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.related-card {
    display: block;
    background: #f8f9ff;
    border-radius: 12px;
    padding: 20px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.related-card:hover {
    border-color: #204080;
    transform: translateY(-2px);
    text-decoration: none;
    color: #333;
}

.related-card i {
    color: #204080;
    font-size: 24px;
    margin-bottom: 12px;
}

.related-card span {
    font-weight: 600;
    display: block;
    margin-bottom: 8px;
}

/* FAQ Section */
.faq-section {
    margin-top: 40px;
}

.faq-header {
    text-align: center;
    margin-bottom: 32px;
}

.faq-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: #204080;
    margin-bottom: 12px;
}

.faq-header p {
    color: #666;
    font-size: 16px;
}

.faq-container {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.faq-item {
    border-bottom: 1px solid #eee;
}

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

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.faq-question:hover {
    color: #204080;
}

.faq-question h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.faq-question i {
    color: #204080;
    transition: transform 0.2s ease;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

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

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer p {
    padding: 0 0 20px 0;
    color: #666;
    line-height: 1.6;
}

/* Footer */
.main-footer {
    background: #1a1a1a;
    color: white;
    padding: 60px 0 30px 0;
    margin-top: 80px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 24px;
}

.footer-section h3 {
    color: #204080;
    margin-bottom: 20px;
    font-size: 20px;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 12px;
}

.footer-section ul li a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-section ul li a:hover {
    color: #204080;
}

.footer-bottom {
    border-top: 1px solid #333;
    padding: 30px 24px 0;
    text-align: center;
    color: #999;
    max-width: 1200px;
    margin: 0 auto;
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-links a {
        padding: 12px 0;
        border-radius: 0;
        border-bottom: 1px solid #eee;
    }
    
    .page-title {
        font-size: 32px;
    }
    
    .form-grid,
    .form-grid.balanced-2 {
        grid-template-columns: 1fr;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .main-content {
        padding: 40px 24px;
    }
    
    .calculator-section {
        padding: 24px;
    }
    
    .table-container {
        overflow-x: auto;
    }
    
    .schedule-table {
        min-width: 600px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .form-grid.balanced-2 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .results-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Large screen optimizations */
@media (min-width: 1201px) {
    .form-grid.balanced-2 {
        grid-template-columns: repeat(2, 1fr);
        max-width: 800px;
        margin: 0 auto 32px auto;
    }
} 