body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #0f172a;
    padding: 1rem;
  }

  .container {
    max-width: 100%;
  }

  .container p {
    padding: 0 1rem;
  }

  .container .section {
    padding: 2vw;
  }

  h2 {
    text-align: center;
    font-size: 2rem;
    padding: 1vw;
  }
  /*  */
  .text {
    flex: 1 1 500px;
  }
  .text p {
    margin-bottom: 1rem;
  }
  img {
    max-width: 100%;
    border-radius: 8px;
  }

  @media screen and (min-width: 769px) {
  /* Styles for larger screens */
  .ec-grid {
    grid-template-columns: repeat(auto-fit, minmax(480px, 1fr));
  }

   .loan-content {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    align-items: flex-start;
    flex-wrap: wrap; /* optional for mobile */
    margin-bottom: 1vw;
  }

  .loan-content img {
    max-width: 100%;
    width: 400px;
    border-radius: 8px;
  }

  .loan-content .text {
    flex: 1;
  }
}

/* Top three crucial factors section */

.emi-section {
  background: linear-gradient(to bottom right, #f0f4ff, #ffffff);
  padding: 4rem 1rem;
  border-radius: 16px;
}

.container {
  margin: 0 auto;
  padding: 0 1rem;
}

.emi-section h2 {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 2.5rem;
  color: #1e293b;
}

.grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.mini-card {
  background-color: #ffffff;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
}

.mini-card:hover {
  transform: translateY(-5px);
}

.mini-card h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #2563eb;
  margin-bottom: 0.75rem;
}

.mini-card p {
  font-size: 0.95rem;
  color: #475569;
  line-height: 1.6;
}
/*  end of top 3 crucial factors sections */


/* Everything about EMI section */

.emi-section {
  background: linear-gradient(135deg, #f7f9fc, #ffffff);
  padding: 60px 20px;
  font-family: 'Inter', 'Segoe UI', sans-serif;
}

.emi-container {
  display: flex;
  gap: 40px;
  margin: auto;
  align-items: flex-start;
  flex-wrap: wrap;
}

.emi-text {
  flex: 1 1 60%;
  color: #222;
  font-size: 1.05rem;
  line-height: 1.8;
}

.emi-text h2 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: #0a2a66;
}

.emi-text ul {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.emi-text ul li {
  margin-bottom: 8px;
  list-style-type: disc;
}

.emi-image {
  flex: 1 1 35%;
  display: flex;
  justify-content: center;
  align-items: center;
}

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

/* Responsive for Mobile */
@media (max-width: 768px) {
  .emi-container {
    flex-direction: column;
  }

  .emi-text, .emi-image {
    flex: 1 1 100%;
  }

  .emi-text h2 {
    font-size: 1.5rem;
  }
}

/* Everything about EMI section ends */


/* Interest rate section */

.interest-rate-section {
  font-family: 'Inter', sans-serif;
  margin: 90px auto;
  padding: 40px 20px;
  background: linear-gradient(to bottom, #f9fafb, #ffffff);
}

.interest-rate-section h2 {
  text-align: center;
  font-size: 2rem;
  color: #0f172a;
  margin-bottom: 40px;
}

.rate-type {
  background: #f1f5f9;
  border-left: 6px solid #2563eb;
  padding: 20px 30px;
  margin-bottom: 30px;
  border-radius: 10px;
}

.rate-type h3 {
  font-size: 1.2rem;
  color: #0a2a66;
  margin-bottom: 10px;
}

.rate-type p {
  color: #334155;
  font-size: 1rem;
  line-height: 1.7;
  margin: 0;
}

.rate-type ul {
  margin-top: 10px;
  padding-left: 20px;
  color: #475569;
}

.rate-type ul li {
  margin-bottom: 8px;
}

/* Mobile-friendly adjustments */
@media (max-width: 768px) {
  .interest-rate-section h2 {
    font-size: 1.5rem;
  }

  .rate-type h3 {
    font-size: 1.05rem;
  }
}

/* Interest rate section code ends */


/* All other above secs */

.loan-emi-section {
  font-family: 'Inter', sans-serif;
  padding: 60px 20px;
  margin: auto;
  background: linear-gradient(to bottom, #f9fafb, #ffffff);
}

.loan-and-emi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  margin-bottom: 60px;
}

.loan-and-emi-grid h2 {
  color: #2563eb;
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.loan-and-emi-grid p {
  font-size: 1rem;
  line-height: 1.7;
  color: #334155;
}

.formula-section {
  text-align: center;
  margin-bottom: 40px;
}

.formula-section h2 {
  font-size: 2rem;
  color: #0f172a;
  margin-bottom: 10px;
}

.formula-section .formula {
  font-size: 1.6rem;
  font-family: 'Georgia', serif;
  color: #0c4a6e;
  margin-top: 20px;
}

.info-box {
  background: #f1f5f9;
  border-left: 6px solid #2563eb;
  padding: 20px 30px;
  border-radius: 10px;
  margin: 30px 0;
}

.info-box h3 {
  margin-bottom: 12px;
  font-size: 1.2rem;
  color: #0f172a;
}

.info-box ul {
  padding-left: 20px;
  list-style-type: disc;
  color: #475569;
}

.conclusion {
  background: #e0f2fe;
  padding: 20px 25px;
  border-left: 5px solid #0ea5e9;
  border-radius: 10px;
  margin-top: 40px;
  color: #0c4a6e;
  font-weight: 500;
  font-size: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .formula-section .formula {
    font-size: 1.2rem;
  }

  .loan-and-emi-grid {
    grid-template-columns: 1fr;
  }
}

/* end of it---- */

  /*  */

  .ec-grid {
    display: grid;
    gap: 2rem;
  }
  .ec-card {
    background-color: #f8f2f4;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 0 8px rgba(0,0,0,0.05);
  }
  .ec-card h2 {
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
  }
  .ec-card p {
    font-size: 0.95rem;
  }
  ul {
    margin-top: 0.5rem;
    padding-left: 1.2rem;
  }
  ul li {
    margin-bottom: 0.4rem;
  }

  /*  */
  @media (max-width: 768px) {
    .grid {
      flex-direction: column;
      align-items: center;
    }
  }

  @media (min-width: 768px) {
    .container {
      padding: 0 2rem;
    }
  }
  h1 {
    padding: 0 1rem;
  }
  /* Header */
  .header {     /* center align even if inside a container */
    background: #ffffff;
    position: sticky;
    top: 0;
    z-index: 100;
  }

  .header__content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 0;
  }

  .header__logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 140px;
    height: 70px;
  }

  .header__nav {
    /* display: none; */
    gap: 2rem;
  }

  @media (min-width: 768px) {
    .header__nav {
      display: flex;
    }
  }

  .header__nav a {
    text-decoration: none;
    color: #334155;
    font-weight: 500;
    transition: color 0.2s;
  }

  .header__nav a:hover {
    color: #2563eb;
  }

  /* Hero Section */
  .hero {
    position: relative;
    padding: 5rem 0;
    overflow: hidden;
  }

  .hero__background {
    position: absolute;
    inset: 0;
    z-index: 0;
  }

  .hero__background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(30, 58, 138, 0.8), rgba(67, 56, 202, 0.8));
  }

  .hero__content {
    position: relative;
    z-index: 10;
    text-align: center;
    color: #ffffff;
  }

  .hero__title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
  }

  @media (min-width: 768px) {
    .hero__title {
      font-size: 3.75rem;
    }
  }

  .hero__title--accent {
    color: #93c5fd;
  }

  .hero__subtitle {
    font-size: 1.25rem;
    color: #bfdbfe;
    margin-bottom: 2rem;
    max-width: 48rem;
    margin-left: auto;
    margin-right: auto;
  }

  /* Buttons */
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
  }

  .btn--primary {
    background: #2563eb;
    color: #ffffff;
  }

  .btn--primary:hover {
    background: #1d4ed8;
  }

  .btn--large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
  }

  /* Cards */
  .card {
    background: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    margin-bottom: 2rem;
  }

  .card__header {
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
  }

  .card__header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #0f172a;
  }

  .card__content {
    padding: 1.5rem;
  }

  /* Educational Section */
  .educational-section {
    padding: 4rem 0;
    background: #fff;
  }

  .educational-grid {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  @media (min-width: 1024px) {
    .educational-grid {
      grid-template-columns: 2fr 1fr;
    }
  }

  .educational-main {
    display: flex;
    flex-direction: column;
    gap: 2rem;
  }

  .educational-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }

  /* Articles */
  .articles-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  @media (min-width: 768px) {
    .articles-grid {
      grid-template-columns: 1fr 1fr;
    }
  }

  .article-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .article-card img {
    width: 100%;
    height: 12rem;
    object-fit: cover;
    border-radius: 0.5rem;
  }

  .article-card h4 {
    font-weight: 600;
    color: #0f172a;
  }

  .article-card p {
    color: #64748b;
    font-size: 0.875rem;
  }

  .article-link {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
    align-self: flex-start;
  }

  .article-link:hover {
    text-decoration: underline;
  }

  /* Discussion */

  /* Sidebar */
  .sidebar-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }

  .sidebar-link {
    display: block;
    padding: 0.75rem;
    border-radius: 0.5rem;
    text-decoration: none;
    color: #334155;
    font-weight: 500;
    font-size: 0.875rem;
    transition: background 0.2s;
  }

  .sidebar-link:hover {
    background: #f8fafc;
  }

  /* Tips */
  .tips-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .tip {
    padding: 1rem;
    border-radius: 0.5rem;
  }

  .tip--blue {
    background: #dbeafe;
  }

  .tip--green {
    background: #dcfce7;
  }

  .tip--orange {
    background: #fed7aa;
  }

  .tip h4 {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
  }

  .tip p {
    font-size: 0.75rem;
    color: #64748b;
  }

  /* Footer */
  .footer {
    background: #1e293b;
    color: #ffffff;
    padding: 3rem 0;
  }

  .footer__content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  @media (min-width: 768px) {
    .footer__content {
      grid-template-columns: 1fr 2fr;
    }
  }

  .footer__brand .footer__logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
  }

  .footer__brand .footer__logo i {
    color: #60a5fa;
  }

  .footer__brand .footer__logo span {
    font-size: 1.25rem;
    font-weight: 700;
  }

  .footer__brand p {
    color: #94a3b8;
  }

  .footer__links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
  }

  .footer__column h4 {
    font-weight: 600;
    margin-bottom: 1rem;
  }

  .footer__column ul {
    list-style: none;
  }

  .footer__column ul li {
    margin-bottom: 0.5rem;
  }

  .footer__column ul li a {
    color: #94a3b8;
    text-decoration: none;
  }

  .footer__column ul li a:hover {
    color: #ffffff;
  }

  .footer__bottom {
    border-top: 1px solid #475569;
    margin-top: 2rem;
    padding-top: 2rem;
    text-align: center;
    color: #94a3b8;
  }

  /* Responsive Design */
  @media (max-width: 768px) {
    .hero__title {
      font-size: 2rem;
    }

    .articles-grid {
      grid-template-columns: 1fr;
    }
  }

  @media (max-width: 480px) {
    .container {
      padding: 0 1rem;
    }

    .hero {
      padding: 3rem 0;
    }

    .educational-section {
      padding: 2rem 0;
    }
  }

  /* Animation and Transition Classes */

  /* Smooth scrolling */
  html {
    scroll-behavior: smooth;
  }

  /* Focus states for accessibility */
  .btn:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
  }

  /* Loading states */
  .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
  }

  /* Hover effects */
  .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }

  .article-card:hover {
    transform: translateY(-2px);
    transition: transform 0.2s ease;
  }

  /* Print styles */
  @media print {
    .header,
    .footer {
      display: none;
    }

    body {
      background: white;
    }
  }
