/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&family=Source+Sans+Pro:wght@400;600&display=swap');

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Source Sans Pro', 'Segoe UI', Arial, sans-serif;
}

body {
    background-color: #F9F4E9;
    font-family: 'Source Sans Pro', 'Segoe UI', Arial, sans-serif;
    line-height: 1.6;
    color: #020101;
    margin: 0;
    padding: 0;
}

/* Calculator container */
.calculator-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 30px;
    background-color: #EDE8DA;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

h2 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    color: #020101;
    text-align: center;
    margin-bottom: 25px;
    font-size: 32px;
}

h3 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    color: #020101;
    margin-bottom: 20px;
    font-size: 24px;
}

a {
    color: #CC6B43;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
    color: #b55a36;
}

/* Form styling */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 400;
    color: #020101;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #dcdfe6;
    border-radius: 8px;
    font-size: 16px;
    font-family: 'Source Sans Pro', sans-serif;
    background-color: #ffffff;
    transition: border-color 0.3s;
}

.form-group input:focus {
    border-color: #CC6B43;
    outline: none;
}

.input-error {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 5px;
}

/* Button styling */
.submit-group {
    margin-top: 30px;
}

.submit-btn {
    width: 100%;
    padding: 14px;
    background-color: #CC6B43;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    font-family: 'Source Sans Pro', sans-serif;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

.submit-btn:hover {
    background-color: #b55a36;
    transform: translateY(-2px);
}

.submit-btn:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
    transform: none;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-weight: 400;
    font-family: 'Source Sans Pro', sans-serif;
    color: #020101;
    text-align: left;
}

.checkbox-label span {
    vertical-align:text-bottom;
}

.checkbox-label input {
    flex-shrink: 0;
    margin-top: 4px;
    height: 20px;
    width: 20px;
    cursor: pointer;
}

/* Success and error messages */
.success-message, 
.error-message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-weight: 500;
}

.success-message {
    background-color: #d5f5e3;
    color: #27ae60;
    border: 1px solid #27ae60;
}

.error-message {
    background-color: #fadbd8;
    color: #e74c3c;
    border: 1px solid #e74c3c;
}


/* Verification container */
.verification-container {
    min-height: 400px;
}

/* Result container */
.result-container {
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
}

.section-title {
    background-color: #D1CCC0;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    color: #020101;
    padding: 12px 16px;
    border-radius: 8px;
    margin: 20px 0 15px 0;
    font-size: 18px;
}

.result-item {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #B5B1A6;
}

.result-item:last-child {
    border-bottom: none;
}

.final-result {
    padding: 15px;
    border-radius: 8px;
    border-bottom: none;
    border-left: 5px solid #CC6B43;
}

.final-result .value-explanation {
    font-size: 15px;
    font-weight: 600;
    font-family: 'Source Sans Pro', sans-serif;
    color: #CC6B43;
}

/* Loading indicator */
.loading-indicator {
    text-align: center;
    padding: 20px;
    font-style: italic;
    color: #7f8c8d;
}

/* Responsive design */
@media (max-width: 768px) {
    .calculator-container {
        width: 95%;
        padding: 15px;
        margin: 10px auto;
    }
    
    .form-group input {
        padding: 10px;
    }
    
    .submit-btn {
        padding: 10px 15px;
    }
}

/* FAQ Link Styling */
.faq-link-container {
    text-align: center;
    margin-bottom: 25px;
    padding: 15px;
    background-color: #ffffff;
    border-left: 4px solid #CC6B43;
    border-radius: 8px;
}

.faq-link-text {
    margin: 0;
    font-family: 'Source Sans Pro', sans-serif;
    color: #020101;
    font-size: 14px;
    line-height: 1.6;
}

.faq-link-text a {
    color: #CC6B43;
    font-weight: 600;
    text-decoration: none;
}

.faq-link-text a:hover {
    text-decoration: underline;
}

/* Terms Link in Checkbox */
.terms-link {
    color: #CC6B43;
}

.terms-link:hover {
    text-decoration: underline;
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

/* Modal Content */
.modal-content {
    background-color: #ffffff;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-content-large {
    max-width: 800px;
}

/* Modal Close Button */
.modal-close {
    position: sticky;
    top: 0;
    right: 20px;
    float: right;
    background: none;
    border: none;
    font-size: 32px;
    color: #020101;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
    line-height: 1;
}

.modal-close:hover {
    color: #CC6B43;
}

/* Modal Body */
.modal-body {
    padding: 30px 25px 25px 25px;
    overflow-y: auto;
}

.modal-body h2 {
    margin-top: 0;
    margin-bottom: 20px;
}

/* Terms Content */
.terms-content h2 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    color: #020101;
    margin-bottom: 15px;
}

.terms-content > p {
    margin-bottom: 20px;
    font-family: 'Source Sans Pro', sans-serif;
    color: #020101;
}

.terms-section {
    margin-bottom: 25px;
}

.terms-section h3 {
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 600;
    color: #020101;
    font-size: 16px;
    margin-bottom: 12px;
}

.terms-section p {
    font-family: 'Source Sans Pro', sans-serif;
    color: #020101;
    line-height: 1.7;
    margin-bottom: 10px;
}

/* FAQ Content */
.faq-content h2 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    color: #020101;
    margin-bottom: 25px;
}

.faq-section {
    margin-bottom: 35px;
}

.faq-section h3 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    color: #020101;
    font-size: 18px;
    margin-bottom: 20px;
    border-bottom: 2px solid #B5B1A6;
    padding-bottom: 10px;
}

.faq-item {
    margin-bottom: 20px;
}

.faq-item h4 {
    font-family: 'Source Sans Pro', sans-serif;
    color: #020101;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
}

.faq-question {
    cursor: pointer;
    color: #CC6B43;
    display: flex;
    align-items: center;
    padding: 12px;
    background-color: #ffffff;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.faq-question:hover {
    color: #b55a36;
    background-color: #f8f6f3;
}

.faq-question::before {
    content: '▶';
    display: inline-block;
    width: 20px;
    margin-right: 12px;
    text-align: center;
    transition: transform 0.3s ease;
}

.faq-question:hover::before {
    transform: scale(1.2);
}

.faq-answer {
    padding: 15px 15px 15px 40px;
    background-color: #ffffff;
    border-left: 3px solid #CC6B43;
    border-radius: 0 0 8px 8px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 1000px;
    }
}

.faq-instruction {
    background-color: #ffffff;
    border-left: 4px solid #CC6B43;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    font-family: 'Source Sans Pro', sans-serif;
    color: #020101;
}

.faq-instruction p {
    margin: 0;
    font-weight: 500;
}

.faq-item p {
    font-family: 'Source Sans Pro', sans-serif;
    color: #020101;
    line-height: 1.7;
    margin-bottom: 10px;
    font-size: 14px;
}

.faq-item ul,
.faq-item ol {
    margin: 10px 0 10px 25px;
    font-family: 'Source Sans Pro', sans-serif;
    color: #020101;
    font-size: 14px;
    line-height: 1.7;
}

.faq-item li {
    margin-bottom: 8px;
}

.faq-item strong {
    color: #020101;
    font-weight: 600;
}

/* FAQ Page */
.faq-page-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 30px;
    background-color: #EDE8DA;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: #CC6B43;
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 600;
    text-decoration: none;
}

.back-link:hover {
    text-decoration: underline;
    color: #b55a36;
}

/* Responsive modal */
@media (max-width: 768px) {
    .modal-overlay {
        padding: 0;
    }
    
    .modal-content {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .modal-content-large {
        max-width: 100%;
    }
    
    .modal-body {
        padding: 20px 15px 15px 15px;
    }
    
    .modal-close {
        padding: 5px;
        font-size: 28px;
    }
    
    .faq-page-container {
        width: 95%;
        padding: 15px;
        margin: 10px auto;
    }
}
