* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: url("images/loan.jpg") no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    max-width: 1600px;   /* expand a bit more on iMac screens */
    width: 100%;
    margin: 0 auto;
    padding: 0 40px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 40px;
}

.logo {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    display: flex;
    align-items: center;
}

.logo i {
    margin-right: 10px;
    color: #3498db;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    text-decoration: none;
    color: #f8f8f8ff;
    font-weight: 600;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: #3498db;
}

.auth-buttons {
    display: flex;
    gap: 15px;
}

.btn {
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    border: none;
    font-size: 16px;
}

.btn-outline {
    border: 2px solid #3498db;
    color: #3498db;
    background: transparent;
}

.btn-outline:hover {
    background: #3498db;
    color: white;
}

.btn-filled {
    background: #3498db;
    color: white;
    border: 2px solid #3498db;
}

.btn-filled:hover {
    background: #2980b9;
    border-color: #2980b9;
}

.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 80px;
}

.hero-content {
    flex: 1;
    max-width: 500px;
    margin-right: 40px;
}

.hero-title {
    font-size: clamp(2.5rem, 3vw, 4.5rem);  /* scales with screen width */
    font-weight: 800;
    color: #2c3e50;
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero-title span {
    color: #3498db;
}

.hero-description {
    font-size: clamp(1rem, 1.2vw, 1.3rem);
    color: #000000ff;
    line-height: 1.6;
    margin-bottom: 30px;
}

@media (min-width: 1600px) {
    .feature-card {
        padding: 100px;
    }
    .cta-title {
        font-size: 3rem;
    }
    .cta-description {
        font-size: 1.3rem;
    }
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Features Section - Optimized for your existing CSS */
.features {
    margin-bottom: 80px;
    width: 100%;
}

.feature-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    justify-items: center;
    align-items: start;
}

.feature-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.feature-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid #e0e0e0;
}

.feature-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.feature-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 12px;
    line-height: 1.3;
}

.feature-description {
    font-size: 1rem;
    color: #555;
    margin-bottom: 20px;
    line-height: 1.6;
    flex: 1;
}

.feature-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #3498db;
    font-weight: 600;
    font-size: 0.95rem;
    margin-top: auto;
}

.feature-footer i {
    font-size: 1.1rem;
}

/* Enhanced Responsive Design for Features */
@media (min-width: 1600px) {
    .feature-container {
        grid-template-columns: repeat(4, 1fr);
        gap: 35px;
        max-width: 1600px;
        margin: 0 auto;
    }
    
    .feature-card {
        max-width: 100%;
    }
    
    .feature-content {
        padding: 30px;
    }
    
    .feature-title {
        font-size: 1.4rem;
    }
    
    .feature-description {
        font-size: 1.05rem;
    }
}

@media (max-width: 1599px) and (min-width: 1200px) {
    .feature-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }
}

@media (max-width: 1199px) and (min-width: 768px) {
    .feature-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
}

@media (max-width: 767px) {
    .feature-container {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 10px;
    }
    
    .feature-card {
        max-width: 100%;
    }
    
    .feature-content {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .features {
        margin-bottom: 60px;
    }
    
    .feature-container {
        gap: 15px;
    }
    
    .feature-content {
        padding: 18px;
    }
    
    .feature-title {
        font-size: 1.2rem;
    }
    
    .feature-description {
        font-size: 0.95rem;
    }
}

.cta-section {
    background: linear-gradient(120deg, #3498db, #2c3e50);
    border-radius: 20px;
    padding: 60px;
    text-align: center;
    color: white;
    margin-bottom: 80px;
}

.cta-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.cta-description {
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto 30px;
    line-height: 1.6;
}

.btn-light {
    background: white;
    color: #3498db;
    padding: 15px 40px;
    font-size: 1.1rem;
}

.btn-light:hover {
    background: #f5f5f5;
}

footer {
    text-align: center;
    padding: 40px 0;
    color: #7f8c8d;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
}

.footer-links a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 600;
}

.footer-links a:hover {
    color: #3498db;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 450px;
    overflow: hidden;
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    background: linear-gradient(120deg, #3498db, #2c3e50);
    color: white;
    padding: 20px;
    text-align: center;
    position: relative;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: white;
}

.modal-body {
    padding: 30px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus, .form-group select:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.remember-me {
    display: flex;
    align-items: center;
}

.remember-me input {
    margin-right: 8px;
}

.forgot-password {
    color: #3498db;
    text-decoration: none;
    font-weight: 600;
}

.forgot-password:hover {
    text-decoration: underline;
}

.modal-footer {
    padding: 20px 30px;
    text-align: center;
    border-top: 1px solid #eee;
}

.modal-footer p {
    color: #7f8c8d;
}

.modal-footer a {
    color: #3498db;
    text-decoration: none;
    font-weight: 600;
}

.modal-footer a:hover {
    text-decoration: underline;
}

.form-btn {
    width: 100%;
    padding: 14px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.form-btn:hover {
    background: #2980b9;
}

.password-toggle {
    position: relative;
}

.password-toggle i {
    position: absolute;
    right: 15px;
    top: 70%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #7f8c8d;
}

.role-selection {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.role-option {
    flex: 1;
    text-align: center;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.role-option:hover {
    border-color: #3498db;
    background-color: #f5f9ff;
}

.role-option.selected {
    border-color: #3498db;
    background-color: #e3f2fd;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.role-option i {
    font-size: 24px;
    margin-bottom: 10px;
    color: #7f8c8d;
}

.role-option.selected i {
    color: #3498db;
}

.role-option h3 {
    font-size: 16px;
    margin-bottom: 5px;
    color: #2c3e50;
}

.role-option p {
    font-size: 12px;
    color: #7f8c8d;
}

.error-message {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 5px;
    display: none;
}

.success-message {
    color: #2ecc71;
    font-size: 14px;
    margin-top: 5px;
    display: none;
}

@media (max-width: 900px) {
    .hero {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-content {
        max-width: 100%;
        margin-bottom: 40px;
        margin-right: 0;
    }
    
    nav {
        display: none;
    }
    
    .hero-title {
        font-size: 2.8rem;
    }
    
    .modal-content {
        width: 90%;
    }
    
    .role-selection {
        flex-direction: column;
    }
    
    .feature-container {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 10px;
    }
}

.sidebar-KMPLOGO {
    display: flex;
    align-items: center;
    padding: 15px;
}

.sidebar-KMPLOGO img {
    width: 40px;
    height: 40px;
    border-radius: 8px; /* optional: makes it rounded square */
    margin-right: 10px;
}

.sidebar-KMPLOGO span {
    font-size: 20px;
    font-weight: bold;
    color: #fff; /* adjust based on sidebar theme */
}

/* Additional responsive improvements */
@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
    
    .cta-section {
        padding: 40px 20px;
        margin-bottom: 60px;
    }
    
    .cta-title {
        font-size: 2rem;
    }
    
    .auth-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .cta-section {
        padding: 30px 15px;
        border-radius: 15px;
    }
    
    .cta-title {
        font-size: 1.8rem;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 15px;
    }
}