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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f8f9fa;
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Header Styles */
header {
    text-align: center;
    margin-bottom: 50px;
}

.logo-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.logo {
    height: 50px;
    width: auto;
}

header h1 {
    font-size: 2.2rem;
    color: #003e52;
    font-weight: 600;
    margin: 0;
}

header p {
    font-size: 1.1rem;
    color: #666;
    font-weight: 400;
}

/* Description Styles */
.description {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}

.intro {
    font-size: 1.2rem;
    color: #333;
    font-weight: 500;
    margin-bottom: 20px;
    line-height: 1.6;
}

.intro strong {
    color: #003e52;
    font-weight: 600;
}

.subtitle {
    font-size: 1.1rem;
    color: #003e52;
    font-weight: 500;
    margin-bottom: 15px;
    margin-top: 25px;
}

.benefits-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.benefits-list li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 12px;
    font-size: 1rem;
    color: #555;
    line-height: 1.6;
}

.benefits-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    color: #003e52;
    font-weight: bold;
    font-size: 1.1rem;
}

/* Search Section */
.search-section {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 62, 82, 0.1);
    margin-bottom: 40px;
    border: 1px solid #e9ecef;
}

.input-row.three-columns {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.input-group {
    margin-bottom: 0;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #003e52;
    font-size: 0.95rem;
}

/* Custom Select Dropdown - Advanced Design */
.custom-select {
    position: relative;
    width: 100%;
}

/* Dropdown trigger/button */
.select-trigger {
    display: flex;
    height: auto;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    border-radius: 8px;
    border: 2px solid #e9ecef;
    background: #f8f9fa;
    padding: 14px 18px;
    font-size: 16px;
    transition: all 0.3s ease;
    cursor: pointer;
    outline: none;
    color: #333;
    max-height: 52px;
}

.select-trigger:hover {
    border-color: #003e52;
    background: white;
    box-shadow: 0 0 0 3px rgba(0, 62, 82, 0.1);
}

.select-trigger:focus {
    outline: none;
    border-color: #003e52;
    background: white;
    box-shadow: 0 0 0 3px rgba(0, 62, 82, 0.1);
}

.select-trigger:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.select-trigger.open {
    border-color: #003e52;
    box-shadow: 0 0 0 3px rgba(0, 62, 82, 0.1), 0 4px 6px -1px rgba(0, 62, 82, 0.1);
}

.chevron-icon {
    transition: transform 0.3s ease;
    color: #666;
}

.select-trigger.open .chevron-icon {
    transform: rotate(180deg);
    color: #003e52;
}

/* Dropdown menu container */
.select-content {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 50;
    max-height: 384px;
    min-width: 8rem;
    overflow: hidden;
    border-radius: 8px;
    border: 2px solid #e9ecef;
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 62, 82, 0.1);
    backdrop-filter: blur(8px);
    animation: fade-zoom-in 0.2s ease-out;
    margin-top: 4px;
}

/* Dropdown menu viewport/scrollable area */
.select-viewport {
    padding: 8px;
}

/* Individual dropdown items */
.select-item {
    position: relative;
    display: flex;
    width: 100%;
    cursor: pointer;
    user-select: none;
    align-items: center;
    border-radius: 6px;
    padding: 12px 12px 12px 40px;
    font-size: 16px;
    outline: none;
    transition: all 0.2s ease;
    color: #333;
}

.select-item:hover {
    background: rgba(0, 62, 82, 0.05);
}

.select-item:focus {
    background: rgba(0, 62, 82, 0.1);
}

/* Selected item styling */
.select-item[data-state="checked"] {
    background: rgba(0, 62, 82, 0.1);
    font-weight: 500;
    color: #003e52;
}

.select-item:disabled {
    pointer-events: none;
    opacity: 0.5;
}

/* Checkmark icon container */
.select-item-indicator {
    position: absolute;
    left: 12px;
    display: flex;
    height: 16px;
    width: 16px;
    align-items: center;
    justify-content: center;
}

.select-item-indicator svg {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.select-item[data-state="checked"] .select-item-indicator svg {
    opacity: 1;
}

/* Animation */
@keyframes fade-zoom-in {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .select-trigger,
    .select-content {
        background: #1a1a1a;
        border-color: #333;
        color: #fff;
    }

    .select-item:hover {
        background: rgba(255, 255, 255, 0.05);
    }

    .select-item:focus {
        background: rgba(255, 255, 255, 0.1);
    }

    .select-item[data-state="checked"] {
        background: rgba(255, 255, 255, 0.1);
        color: #fff;
    }
}

.input-group input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f8f9fa;
    min-height: 52px;
}

.input-group input:focus {
    outline: none;
    border-color: #003e52;
    background: white;
    box-shadow: 0 0 0 3px rgba(0, 62, 82, 0.1);
}

.input-group input:hover {
    border-color: #003e52;
    background: white;
}

/* Term hint styling */
.term-hint {
    display: block;
    color: #666;
    font-size: 0.85rem;
    margin-top: 5px;
    font-style: italic;
    transition: all 0.3s ease;
}

.term-hint:hover {
    color: #003e52;
}

/* Button Styles */
button {
    background: #003e52;
    color: white;
    border: none;
    padding: 18px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
}

button:hover {
    background: #002a3a;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 62, 82, 0.2);
}

button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #ffffff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Result Card Styles */
.result-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 62, 82, 0.1);
    overflow: hidden;
    border: 1px solid #e9ecef;
}

.result-header {
    background: #003e52;
    color: white;
    padding: 30px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.result-header h2 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 600;
}

.quote-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Funding Offer Styles */
.funding-offer {
    padding: 40px;
}

.offer-summary {
    margin-bottom: 40px;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.summary-item {
    flex: 1;
    text-align: center;
    padding: 20px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    min-width: 0;
}

.summary-item.total {
    background: #003e52;
    color: white;
    border-color: #003e52;
}

.summary-item .label {
    display: block;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
}

.summary-item.total .label {
    color: rgba(255, 255, 255, 0.9);
}

.summary-item .value {
    font-size: 1.4rem;
    font-weight: 700;
    color: #003e52;
}

.summary-item.total .value {
    color: white;
}

/* Payment Schedule */
.payment-schedule {
    margin-bottom: 40px;
}

.payment-schedule h3 {
    color: #003e52;
    margin-bottom: 25px;
    font-size: 1.4rem;
    font-weight: 600;
}

.payment-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.payment-item {
    background: #f8f9fa;
    padding: 25px 20px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.payment-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 62, 82, 0.1);
}

.payment-label {
    display: block;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 10px;
    font-weight: 500;
}

.payment-amount {
    font-size: 1.3rem;
    font-weight: 700;
    color: #003e52;
    display: block;
}

.doc-fee {
    display: block;
    font-size: 0.8rem;
    color: #dc3545;
    font-weight: 600;
    margin-top: 8px;
    opacity: 0.9;
}

/* Offer Footer */
.offer-footer {
    text-align: center;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.offer-footer p {
    margin: 0 0 25px 0;
    font-size: 1.1rem;
    color: #666;
    line-height: 1.6;
}

.cta-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary {
    background: #003e52;
    color: white;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    width: auto;
}

.btn-primary:hover {
    background: #002a3a;
    transform: translateY(-1px);
}

.btn-secondary {
    background: white;
    color: #003e52;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 600;
    border: 2px solid #003e52;
    cursor: pointer;
    transition: all 0.3s ease;
    width: auto;
}

.btn-secondary:hover {
    background: #003e52;
    color: white;
    transform: translateY(-1px);
}

/* Error Card */
.error-card {
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
}

.error-card h3 {
    color: #e53e3e;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.error-card p {
    color: #666;
    margin: 0;
}

/* Disclaimer Footer */
.disclaimer {
    margin-top: 60px;
    padding: 30px 0;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
}

.disclaimer-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.disclaimer-content h4 {
    color: #003e52;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.disclaimer-content p {
    color: #666;
    font-size: 0.8rem;
    line-height: 1.5;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 20px 15px;
    }
    
    .logo-section {
        flex-direction: column;
        gap: 15px;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    .search-section {
        padding: 30px 20px;
    }
    
    .input-row,
    .input-row.three-columns {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .result-header {
        padding: 25px 20px;
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .funding-offer {
        padding: 25px 20px;
    }
    
    .offer-summary {
        grid-template-columns: 1fr;
        padding: 20px;
    }
    
    .summary-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .summary-item {
        width: 100%;
    }
    
    .payment-grid {
        grid-template-columns: 1fr;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    .btn-primary, .btn-secondary {
        width: 100%;
    }
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.8) translateY(20px);
    transition: all 0.3s ease;
}

.modal-overlay.active .modal-container {
    transform: scale(1) translateY(0);
}

.modal-header {
    padding: 30px 30px 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    color: #003e52;
    font-size: 1.5rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: auto;
    height: auto;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #003e52;
}

.modal-body {
    padding: 30px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #003e52;
    font-size: 0.95rem;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-group input:focus {
    outline: none;
    border-color: #003e52;
    background: white;
    box-shadow: 0 0 0 3px rgba(0, 62, 82, 0.1);
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
}

.form-actions .btn-primary,
.form-actions .btn-secondary {
    width: auto;
    padding: 12px 24px;
    font-size: 14px;
}

/* Notification Styles */
.notification-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.notification-overlay.active {
    opacity: 1;
    visibility: visible;
}

.notification-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 450px;
    width: 90%;
    transform: scale(0.8) translateY(20px);
    transition: all 0.3s ease;
}

.notification-overlay.active .notification-container {
    transform: scale(1) translateY(0);
}

.notification-header {
    padding: 30px 30px 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-header h3 {
    margin: 0;
    color: #003e52;
    font-size: 1.4rem;
    font-weight: 600;
}

.notification-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: auto;
    height: auto;
    transition: color 0.3s ease;
}

.notification-close:hover {
    color: #003e52;
}

.notification-body {
    padding: 30px;
    text-align: center;
}

.notification-body p {
    margin: 0;
    color: #666;
    font-size: 1rem;
    line-height: 1.6;
}

/* Responsive Modal Styles */
@media (max-width: 768px) {
    .modal-container {
        width: 95%;
        margin: 20px;
    }
    
    .modal-header,
    .modal-body {
        padding: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn-primary,
    .form-actions .btn-secondary {
        width: 100%;
    }
    
    .notification-container {
        width: 95%;
        margin: 20px;
    }
    
    .notification-header,
    .notification-body {
        padding: 20px;
    }
}