html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    font-family: 'Arimo', sans-serif;
}

/* Top main heading*/
.main-mortgage-content {
    position: relative;
    width: 100%;
    padding: 45px 0px;
    display: flex;
}

.main-mortgage-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    z-index: -1;
    opacity: 0.5;
}

.mortgage-main-heading {
    position: relative;
    z-index: 1;
    margin-right: 240px;
    padding-top: 80px;
}

.main-mortgage-heading1 {
    font-weight: 100;
    margin-left: 80px;
    margin-bottom: 10px;
    font-size: 40px;
    line-height: 1.2;
    color: black;
}
.word-way {
    font-weight: 100;
}

.main-mortgage-heading2 {
    font-size: 60px;
    font-weight: 700;
    color: navy; 
    margin-left: 80px;
    line-height: 1.2;
}

/* Form */
.form-content {
    font-family: 'Arimo', sans-serif;
}

.form {
    background-color: #fff;
    display: block;
    padding: 1rem;
    max-width: 900px;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}
  
.form-title {
    font-size: 2rem;
    line-height: 1.75rem;
    font-weight: 600;
    text-align: left;
    color: #1f4982;
    margin-bottom: 25px;
}

.form-heading-styles p{
    color: #444;
    font-size: 15px;
}
  
.input-container {
    position: relative;
}
  
.input-container input, .form button {
    font-family: 'Arimo', sans-serif;
    outline: none;
    border: 1px solid #e5e7eb;
    margin: 8px 0;
    
}
  
.input-container input {
    background-color: #fff;
    padding: 1rem;
    padding-right: 3rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
    width: 100%;
    border-radius: 0.5rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
  
.submit {
    display: block;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    background-color: #1f4982;
    color: #ffffff;
    font-size: 0.875rem;
    line-height: 1.25rem;
    font-weight: 500;
    width: 100%;
    border-radius: 0.5rem;
    text-transform: uppercase;
}

/* Responsive CSS */
@media only screen and (max-width: 768px) {
    .main-mortgage-content {
        flex-direction: column;
        align-items: center;
        padding: 20px 10px;
    }

    .main-container {
        flex-direction: column;
        gap: 15px;
    }

    .form {
        width: 90%;
    }

    .form input {
        width: auto;
        height: 50%;
    }
}

/* Cards content*/
.cards-main-heading {
    margin-top: 50px;
    text-align: left;
}

.cards-main-heading h1 {
    font-size: 2rem;
    font-weight: 600;
    color: #333;
}

.card-container {
    display: flex;
    gap: 45px;
    justify-content: space-between;
    flex-wrap: wrap;
    margin: 35px;
}

/* Card Box Styles */
.card-box {
    position: relative;
    padding: 40px 20px;
    font-size: 16px;
    background-color: #e88d14;
    color: #ffffff;
    border-radius: 10px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.35s ease;
    box-shadow: 0 0 30px rgba(31, 45, 61, 0.125);
    height: 110px;
    text-align: center;
    z-index: 1;
    width: 27%;
}

.card-box::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: auto;
    right: 0;
    border-radius: 10px;
    width: 0;
    background: #ffffff;
    z-index: -1;
    transition: width 0.4s ease, height 0.4s ease;
    box-shadow: 0 0 30px rgba(31, 45, 61, 0.125);
}

.card-box:hover::after {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    left: 0;
    right: auto;
}

.card-box:hover {
    top: -5px;
    color: #e88d14;
    background-color: #ffffff;
}

.card-box h5 {
    font-weight: 600;
    margin-bottom: 10px;
    transition: color 0.35s ease;
    color: #ffffff;
}

.card-box:hover h5 {
    color: #e88d14;
}

.card-box p {
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.35s ease;
}

.card-box:hover p {
    color: #e88d14;
}

/* Responsive Card Styles */
@media only screen and (max-width: 768px) {
    .card-container {
        flex-direction: row;
        width: 70%;
        padding: 0 10px;
    }

    .card-container.three-per-row .card-box {
        flex-direction: column;
        width: auto;
        margin-right: 30px;
    }

    .card-box {
        width: 100%; /* Full width for smaller screens */
        margin-bottom: 10px;
        flex: 0 1 calc(50% - 10px); /* Two cards per row for tablets and small devices */
    }
    
    .left-side {
        width: auto;
        display: flex;
        
    }

    .right-side {
        flex-direction: column;
        display: flex;
        width: auto;
        height: auto;
    }

    .card-box h5 {
        font-size: 18px; /* Adjust font size for smaller screens */
    }

    .card-box p {
        font-size: 14px; /* Adjust paragraph size for readability */
    }

    .repayment-btn {
        margin-left: auto;
    }

    .interestonly-btn {
        margin-left: auto;
    }

    .modal-box {
        width: auto;
    }
}

@media only screen and (max-width: 480px) {
    .card-box {
        padding: 20px 15px;
        flex: 0 1 100%; /* Single card per row for small mobile screens */
    }

    .card-box h5 {
        font-size: 16px;
    }

    .card-box p {
        font-size: 12px;
    }
}

/* Cards Info Section Stylings */ 
.content-container {
    margin-top: 50px;
}

.content-section {
    display: none; /* Initially hidden */
    padding: 20px;
    border: 1px solid #ddd;
}

.content-section h2 {
    text-align: center;
    margin-bottom: 30px;
    font-weight: 700;
}

.content-section p {
    text-align: center;
    font-size: 18px;
}


/* Calculator block stylings */
.calculator-content {
    font-family: 'Arimo', sans-serif;
    width: 100%; 
    background-color: #f3f3f3;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: row;
    gap: 20px;
    height: auto;
    margin-top: 40px;
}

/* Modal stylings */
.calculator-wrapper {
    text-align: center;
    width: 100%;
    margin: 15px;
}

.calc-modal-btn {
    font-family: 'Arimo', sans-serif;
    padding: 10px 20px;
    font-size: 16px;
    color: white;
    background-color: #1f4982;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
    text-align: center;
    height: 100px;
}

.calc-modal-btn:hover {
    background-color: #0056b3;
}

.cal-btn-heading {
    display:flex; 
    float: left; width:80%; 
    text-align: center; 
    padding-left: 100px;
}

.calc-modal-btn img {
    width: 18%;
    height: 60px;
}

/* Modal Styles */
.modal-overlay {
    display: none; 
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    transition: opacity 0.3s ease; 
}

.modal-box {
    background-color: #fff;
    margin: 0 auto;
    padding: 20px;
    border: 1px solid #888;
    width: 500px;
    height: 500px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    position: relative;
}

.modal-no-header {
    border: 5px solid #e88d14;
}

.modal-body {
    overflow-y: auto; /* Enables vertical scrolling */
    flex-grow: 1; /* Ensures the content area takes up available space */
    padding: 20px;
    text-align: center; /* Center-align the text */
}

.modal-footer {
    display: flex;
    justify-content: center;
}

.modal-footer .calc-modal-closebtn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 18px;
    border-radius: 4px;
}

.modal-footer .calc-modal-closebtn:hover {
    background-color: #0056b3;
}

.first-modal-heading {
    font-family: 'Arimo', sans-serif;
    display: block; /* Make span a block-level element */
    font-size: 16px;
    font-weight: bold;
    color: #333;
    text-align: left;
    font-size: large;
    margin-bottom: 20px;
}

/* Form stylings in modal */
.form-field {
    display: flex;
    margin-bottom: 15px;
}

.form-field label {
    width: 45%;
    text-align: left;
    margin-left: 20px;
}

.input-fields {
    border: 1px solid black;
    display: flex;
    margin-left: 50px;
    height: 30px;
    width: 10%;
}

input {
    flex: 1;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
}

.modal-buttons {
    margin-top: 30px;
    margin-bottom: 30px;
}

.repayment-btn {
    font-family: 'Arimo', sans-serif;
    background-color: #888;
    border: 1px solid #888;
    padding: 8px 40px;
    color: white;
    font-size: large;
    border-radius: 5px;
    display: flex;
    margin-left: 20px;
    float: left;
}

.interestonly-btn {
    font-family: 'Arimo', sans-serif;
    background-color:#ddd;
    border: 1px solid #ddd;
    padding: 8px 40px;
    color:black;
    margin-left: 30px;
    border-radius: 5px;
}

.second-modal-heading {
    font-family: 'Arimo', sans-serif;
    display: block; /* Make span a block-level element */
    font-size: 16px;
    font-weight: bold;
    color: #333;
    text-align: left;
    font-size: large;
    margin-bottom: 20px;
}

  
/* faq block*/
.faq-block {
    margin-top: 70px;
    margin-left: 80px;
    max-width: 980px;
    margin-bottom: 40px;
}

.faq-block h2 {
    margin-bottom: 15px;
}

.accordion {
    font-family: 'Arimo', sans-serif;
    background-color: transparent;  
    color: #444;
    cursor: pointer;
    padding: 15px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 15px;
    transition: 0.4s;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: left;
    border-bottom: 2px solid #ddd; 
}

.accordion.active, .accordion:hover {
    background-color: #f4f4f4;  
}

.accordion::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 10px solid black; 
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    transition: transform 0.3s ease; 
}

.accordion.active::after {
    transform: rotate(90deg); 
}

.panel {
    font-family: 'Arimo', sans-serif;
    display: none; 
    background-color: white;
    padding: 18px;
    font-size: 16px;
    color: #555;
    border-top: 1px solid #ddd; 
    margin-top: -1px;
    width: 100%;
}

.panel p {
    margin: 0;
    font-size: small;
    color:  #e88d14;
}  

.second-faq {
    margin-top: 0;
}
