@import url("https://fonts.googleapis.com/css2?family=Work+Sans:ital,wght@0,100..900;1,100..900&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;700&family=Poppins:wght@400;500;600&display=swap");

/* Base Style */

body {
  font-family: "Poppins", sans-serif;
  color: #333;
  width: 100%;
}

/* Header Styles */

h1,
h2,
h3,
h4,
h5 {
  font-family: "Plus Jakarta Sans", sans-serif;
  color: #222;
}

h1 {
  font-size: 72px;
  font-weight: 700;
  margin: 20px 0;
}

h2 {
  font-size: 56px;
  font-weight: 600;
  margin: 16px 0;
}

h3 {
  font-size: 40px;
  font-weight: 500;
  margin: 14px 0;
}

h4 {
  font-size: 28px;
  font-weight: 500;
  margin: 12px 0;
}

h5 {
  font-size: 16px;
  font-weight: 500;
  margin: 12px 0;
}

/* Paragraph and Body Text */

p,
small,
.caption {
  font-family: "Poppins", sans-serif;
  font-weight: 400;
}

p {
  font-size: 16px;
  color: #666;
  margin: 10px 0;
}

small,
.caption {
  font-size: 14px;
  color: #888;
}

/* Links */

a {
  font-size: 16px;
  font-weight: 500;
  color: #0066cc;
  text-decoration: none;
}

a:hover {
  color: #004999;
  text-decoration: underline;
}

/* Highlights */

.highlight {
  font-weight: 700;
  color: #e67e22;
  background-color: #fbeee6;
  padding: 2px 5px;
  border-radius: 3px;
}

.emphasis {
  font-style: italic;
  color: #333;
}

/* General Layout */

.section-p1 {
  padding: 40px 80px;
}

.section-m1 {
  margin: 40px 0;
}

/* Header Styling */

#header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 0;
  left: 0;
  background-color: #fff;
  z-index: 1000;
}

#header .logo {
  width: 200px;
  height: 50px;
  object-fit: cover;
  object-position: center;
}

/* Navbar Styles */

#navbar {
  display: flex;
  gap: 20px;
  padding: 0;
}

#navbar li {
  list-style: none;
  padding: 0 19px;
  position: relative;
}

#navbar li a {
  font-size: 16px;
  font-weight: 600;
  color: #222;
  transition: 0.3s ease;
}

#navbar li a:hover,
#navbar li a.active {
  color: #e67e22;
}

#navbar li a.active::after,
#navbar li a:hover::after {
  content: "";
  width: 20%;
  height: 4px;
  background: crimson;
  position: absolute;
  bottom: -8px;
  left: 20px;
}

/* Dropdown Menu */

.dropdown {
  position: relative;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #ffffff;
  min-width: 200px;
  z-index: 1;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.dropdown-content a {
  color: white;
  padding: 10px 15px;
  text-decoration: none;
  display: block;
  transition: background 0.3s ease;
}

.dropdown-content a:hover {
  background-color: #ffffff;
}

.dropdown:hover .dropdown-content {
  display: block;
}

.dropdown-arrow::after {
  content: " ▼";
  font-size: 0.8rem;
  margin-left: 5px;
  color: #444;
}

/* Mobile Navbar Styles */

#mobile {
  display: none;
  align-items: center;
}

#close {
  display: none;
}

@media (max-width: 799px) {
  #navbar {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    position: fixed;
    top: 0;
    right: -500px;
    height: 50vh;
    width: 400px;
    background-color: #f5f5f5;
    box-shadow: 0 40px 60px rgba(0, 0, 0, 0.1);
    padding: 80px 0 0 10px;
    transition: 0.3s;
    border-radius: 12px;
    /* This adds a rounded edge */
  }
  #navbar li {
    margin-bottom: 25px;
  }
  #mobile {
    display: flex;
    align-items: center;
  }
  #mobile i {
    color: #1a1a1a;
    font-size: 24px;
    padding-left: 20px;
  }
  #navbar.active {
    right: 0px;
  }
  #close {
    display: initial;
    position: absolute;
    top: 30px;
    left: 30px;
    color: #000000;
    font-size: 24px;
  }
  /* Mobile Dropdown */
  .dropdown-content {
    position: static;
    width: 100%;
    background-color: #fff;
    box-shadow: none;
  }
  .dropdown-content a {
    padding: 15px 10px;
    background-color: #f1f1f1;
    border-bottom: 1px solid #ddd;
  }
  .dropdown:hover .dropdown-content {
    display: block;
  }
}

/* Mobile Styles */

#mobile {
  display: none;
}

#navbar.active {
  right: 0;
}

@media (max-width: 799px) {
  #navbar {
    flex-direction: column;
    position: fixed;
    top: 0;
    right: -300px;
    height: 100vh;
    width: 200px;
    background-color: rgb(180, 161, 161);
    transition: 0.3s;
  }
  #navbar li {
    margin-bottom: 25px;
  }
  #mobile {
    display: flex;
  }
  #close {
    display: initial;
    position: absolute;
    top: 30px;
    left: 30px;
    font-size: 24px;
  }
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.container {
  max-width: 1170px;
  margin: auto;
}

.row {
  display: flex;
  flex-wrap: wrap;
}

ul {
  list-style: none;
}

.footer {
  background-color: #24262b;
  padding: 70px 0;
}

.footer-col {
  width: 25%;
  padding: 0 15px;
}

.footer-col h4 {
  font-size: 18px;
  color: #ffffff;
  text-transform: capitalize;
  margin-bottom: 35px;
  font-weight: 500;
  position: relative;
}

.footer-col h4::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: -10px;
  background-color: #e91e63;
  height: 2px;
  box-sizing: border-box;
  width: 50px;
}

.footer-col ul li:not(:last-child) {
  margin-bottom: 10px;
}

.footer-col ul li a {
  font-size: 16px;
  text-transform: capitalize;
  color: #ffffff;
  text-decoration: none;
  font-weight: 300;
  color: #bbbbbb;
  display: block;
  transition: all 0.3s ease;
}

.footer-col ul li a:hover {
  color: #ffffff;
  padding-left: 8px;
}

.footer-col .social-links a {
  display: inline-block;
  height: 40px;
  width: 40px;
  background-color: rgba(255, 255, 255, 0.2);
  margin: 0 10px 10px 0;
  text-align: center;
  line-height: 40px;
  border-radius: 50%;
  color: #ffffff;
  transition: all 0.5s ease;
}

.footer-col .social-links a:hover {
  color: #24262b;
  background-color: #ffffff;
}

/* ################################### Media Queries ################################### */

/* Small Devices (Portrait phones, less than 576px) */

/* Medium Devices (Tablets, 576px to 768px) */

@media (max-width: 768px) {
  #header {
    padding: 15px 30px;
  }
  #hero h1 {
    font-size: 50px;
  }
  #hero h5 {
    font-size: 16px;
  }
  .card-container {
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
  }
  .boxes-container {
    gap: 15px;
  }
  #navbar li {
    padding: 0 10px;
  }
}

/* Large Devices (Small laptops, less than 992px) */

@media (max-width: 992px) {
  #hero h1 {
    font-size: 60px;
  }
  .card-container {
    flex-wrap: wrap;
    gap: 20px;
  }
}

/* Extra Large Devices (Desktops, 1200px and up) */

@media (min-width: 1200px) {
  #hero h1 {
    font-size: 72px;
  }
  #hero h5 {
    font-size: 18px;
  }
}

/* LOAN CALCULATOR - FIXED GUTTER SPACE */

#loan-calculator-section {
  padding: 80px 16px;
}

#loan-calculator-section .content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 0 16px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin-bottom: 40px;
  text-align: center;
}

#loan-calculator-section h1 {
  font-size: 48px;
  font-weight: 700;
  line-height: 1.2;
  color: #004b23;
  font-family: "Plus Jakarta Sans", sans-serif;
}

#loan-calculator-section h5 {
  font-size: 18px;
  line-height: 1.5;
  color: #666;
  font-family: "Poppins", sans-serif;
  max-width: 600px;
}

/* MAIN CONTAINER - TIGHTER GAP */

.main-container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 30px;
  /* REDUCED from 40px */
  padding: 20px;
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  background-color: #f8f9fa;
}

/* WIDER LOAN CALCULATOR BOX */

.loan-calculator-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 40px 35px;
  /* WIDER padding */
  background: #ffffff;
  width: 100%;
  max-width: 550px;
  /* INCREASED width */
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  box-sizing: border-box;
  border: 1px solid #e9ecef;
  min-height: 600px;
  gap: 0;
}

/* FULL WIDTH STRETCHED FIELDSETS */

.loan-calculator fieldset {
  all: unset;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  /* FULL WIDTH */
  width: 100%;
  padding: 25px 30px;
  /* LARGER padding */
  border: 2px solid #e9ecef;
  border-radius: 12px;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  margin-bottom: 25px;
  gap: 12px;
}

.loan-calculator fieldset legend {
  font-weight: 700;
  color: #004b23;
  font-size: 16px;
  padding: 0 12px;
  margin-bottom: 15px;
  border-bottom: 2px solid #004b23;
  width: fit-content;
}

/* FULL WIDTH INPUT GROUPS */

.loan-calculator .input-group {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  /* FULL WIDTH */
  margin-bottom: 8px;
}

.loan-calculator .input-group span {
  font-size: 16px;
  font-weight: 600;
  color: #004b23;
  min-width: 40px;
  text-align: center;
  flex-shrink: 0;
}

.loan-calculator fieldset input[type="number"] {
  all: unset;
  flex: 1;
  /* STRETCH TO FILL */
  font-size: 18px;
  text-align: right;
  padding: 16px 20px;
  border: 2px solid #dee2e6;
  border-radius: 8px;
  background-color: #ffffff;
  transition: all 0.3s ease;
  font-weight: 500;
  box-sizing: border-box;
}

.loan-calculator fieldset input[type="number"]:focus {
  border-color: #004b23;
  box-shadow: 0 0 0 3px rgba(0, 75, 35, 0.1);
}

/* EDGE-TO-EDGE SLIDERS */

.loan-calculator fieldset input[type="range"] {
  -webkit-appearance: none;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg, #e9ecef 0%, #dee2e6 100%);
  outline: none;
  margin: 8px 0 0 0;
  /* NO SIDE MARGINS */
  padding: 0;
  width: 100%;
  box-sizing: border-box;
}

.loan-calculator fieldset input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #004b23, #006400);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 75, 35, 0.3);
  border: 3px solid #ffffff;
}

/* LARGER CENTERED BUTTON */

.loan-calculator .calculate-btn {
  background: linear-gradient(135deg, #004b23, #006400);
  color: #ffffff;
  font-size: 18px;
  font-weight: 700;
  padding: 18px 60px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 20px auto 0;
  box-shadow: 0 6px 20px rgba(0, 75, 35, 0.25);
  display: block;
  min-width: 220px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.loan-calculator .calculate-btn:hover {
  background: linear-gradient(135deg, #006400, #004b23);
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 75, 35, 0.35);
}

/* MATCH HEIGHT CHART BOX */

.chart-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 550px;
  /* SAME WIDTH */
  border-radius: 12px;
  background: #ffffff;
  padding: 40px 35px;
  /* SAME PADDING */
  box-sizing: border-box;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  border: 1px solid #e9ecef;
  min-height: 600px;
}

/* RESULTS TABLE */

.result {
  width: 100%;
  background: #f8f9fa;
  padding: 25px;
  border-radius: 12px;
  border: 2px solid #dee2e6;
  margin-top: 20px;
}

.result table {
  width: 100%;
  text-align: left;
  border-collapse: collapse;
  font-size: 16px;
}

.result table tr td {
  padding: 12px 0;
  color: #495057;
}

.result table tr td:nth-child(2) {
  font-weight: 700;
  color: #004b23;
  text-align: right;
  font-size: 18px;
}

/* RESPONSIVE */

@media (max-width: 799px) {
  #loan-calculator-section .content {
    gap: 30px;
  }
  #loan-calculator-section h1 {
    font-size: 32px !important;
  }
  #loan-calculator-section h5 {
    font-size: 16px !important;
  }
  .main-container {
    flex-direction: column;
    gap: 20px;
    padding: 20px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin: 0 auto;
    max-width: 100%;
  }
  .loan-calculator-box,
  .chart-box {
    max-width: 100%;
    padding: 30px 25px;
    min-height: 550px;
  }
  .loan-calculator fieldset {
    padding: 22px 25px;
  }
}

@media (max-width: 425px) {
  .loan-calculator-box,
  .chart-box {
    padding: 25px 20px;
    min-height: 500px;
  }
  .loan-calculator fieldset {
    padding: 18px 20px;
  }
  .loan-calculator .calculate-btn {
    padding: 16px 40px;
    font-size: 16px;
  }
}

#contactus {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 20px;
  background-color: #f5f5f5;
  /* Light background for the section */
}

.contact-container {
  display: flex;
  gap: 30px;
  /* Adds space between the two boxes */
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  /* Centers the container */
  box-sizing: border-box;
  padding-right: 20px;
  /* Adds space on the right side */
}

.contact-box {
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  padding: 20px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.boxs1 {
  background-color: #77b248;
  color: #fff;
  flex: 0 0 35%;
  text-align: left;
  height: 700px;
  margin-left: 0;
  border-radius: 10px;
}

.boxs1 h3 {
  text-align: center;
  margin-bottom: 30px;
}

.boxs1 p {
  font-size: 1rem;
  line-height: 1.5;
}

.boxs2 {
  background-color: #6c757d;
  color: #fff;
  flex: 0 0 50%;
  text-align: center;
  height: 600px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
  border-radius: 10px;
  margin-top: 50px;
  margin-bottom: 50px;
  margin-left: 46px;
}

/* Styling for the form inside the second box */

.contact-form {
  width: 100%;
  max-width: 400px;
  text-align: left;
  margin-top: 20px;
}

.form-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  position: relative;
}

/* Label styling with underline */

.form-group label {
  font-size: 1rem;
  color: #fff;
  flex: 1;
  /* Allocate space for alignment */
  margin-right: 10px;
  text-align: left;
  text-decoration: underline;
  /* Adds the underline */
  text-underline-offset: 2px;
  /* Offset the underline for better visibility */
}

/* Input styling */

.form-group input,
.form-group select,
.form-group textarea {
  flex: 2;
  /* Inputs take up more space */
  padding: 10px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 5px;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.3s ease;
}

/* Textarea styling */

textarea {
  resize: none;
  height: 100px;
}

/* Focus effect */

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: #007bff;
  outline: none;
}

/* Submit button styling */

.submit-btn {
  width: 100%;
  padding: 10px;
  border: none;
  background-color: #007bff;
  color: #fff;
  font-size: 1rem;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease-in-out;
}

.submit-btn:hover {
  background-color: #0056b3;
}

@media (max-width: 799px) {
  /* Stack the container and boxes vertically */
  #contactus {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 10px;
  }
  .contact-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 0;
  }
  .boxs1,
  .boxs2 {
    width: 100%;
    /* Take full width for smaller screens */
    max-width: 90%;
    /* Center-align with some space */
    margin: 0 auto;
    /* Center align both boxes */
  }
  .boxs1 {
    text-align: left;
    /* Align content to the left */
    padding: 15px;
  }
  .boxs2 {
    text-align: center;
    /* Align the form content to the center */
    padding: 15px;
  }
  .contact-form {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    margin-top: 15px;
  }
  .form-group label {
    font-size: 0.9rem;
    /* Slightly reduce label size */
  }
  .form-group input,
  .form-group select,
  .form-group textarea {
    font-size: 0.9rem;
    padding: 8px;
  }
  .submit-btn {
    font-size: 0.9rem;
    padding: 8px;
  }
}
