/* Loans Hero Section */
.loans-hero {
  position: relative;
  padding: 6rem 0;
  color: #fff;
  overflow: hidden;
}

.loans-hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("../assets/images/loans-preview.jpg") no-repeat center
    center/cover;
  z-index: -1;
  background-attachment: fixed;
}

.loans-hero .container {
  display: flex;
  align-items: center;
  position: relative;
  z-index: 2;
}

.loans-hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
}

.loans-hero .highlight {
  color: #ffc107;
  position: relative;
}

.loans-hero .highlight::after {
  content: "";
  position: absolute;
  bottom: 5px;
  left: 0;
  width: 100%;
  height: 10px;
  background-color: rgba(255, 193, 7, 0.2);
  z-index: -1;
  border-radius: 50px;
}

.loans-hero .hero-subtitle {
  font-size: 1.5rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2rem;
  max-width: 600px;
}

.loans-hero .hero-cta {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.loans-hero .hero-image {
  width: 50%;
  text-align: center;
}

.loans-hero .hero-image img {
  max-width: 100%;
  height: auto;
}

/* Loan Quick Links */
.loan-quick-links {
  padding: 3rem 0;
  background-color: #f8f9fa;
}

.quick-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
}

.quick-link-card {
  background: #fff;
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  border: 1px solid #e9ecef;
  color: #212529;
  text-decoration: none;
}

.quick-link-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  border-color: #0056b3;
}

.quick-link-card i {
  font-size: 2rem;
  color: #0056b3;
  margin-bottom: 1rem;
  display: block;
}

.quick-link-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.quick-link-card p {
  font-size: 0.9rem;
  color: #6c757d;
}

/* Loan Calculator */
.loan-calculator {
  padding: 5rem 0;
  background-color: #fff;
}

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

.calculator-form {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  border: 1px solid #e9ecef;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #495057;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: #0056b3;
  box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.1);
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-icon .input-icon {
  position: absolute;
  padding: 0 1rem;
  color: #6c757d;
}

.input-with-icon .form-control {
  padding-left: 2.5rem;
}

.input-with-icon .input-icon:last-child {
  right: 0;
}

.range-slider {
  margin-top: 0.5rem;
}

.range-slider input[type="range"] {
  width: 100%;
  height: 6px;
  --webkit-appearance: none;
  background: #e9ecef;
  border-radius: 3px;
  outline: none;
}

.range-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  background: #0056b3;
  border-radius: 50%;
  cursor: pointer;
}

.range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #6c757d;
  margin-top: 0.25rem;
}

.calculator-results {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.results-card {
  background: #0056b3;
  color: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.results-card h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  opacity: 0.9;
}

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

.result-details {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 1rem;
}

.detail-item {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.detail-item:last-child {
  border-bottom: none;
}

.detail-label {
  opacity: 0.8;
}

.results-chart {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  border: 1px solid #e9ecef;
  height: 250px;
}

.chart-legend {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1rem;
}

.legend-item {
  display: flex;
  align-items: center;
  font-size: 0.9rem;
  color: #6c757d;
}

.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  margin-right: 0.5rem;
}

.legend-color.principal {
  background: #0056b3;
}

.legend-color.interest {
  background: #ffc107;
}

.results-actions {
  display: flex;
  gap: 1rem;
}

/* Loan Options */
.loan-options {
  padding: 5rem 0;
  background-color: #f8f9fa;
}

.loan-tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  overflow-x: auto;
  padding-bottom: 1rem;
}

.tab-btn {
  padding: 0.75rem 1.5rem;
  background: none;
  border: none;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.tab-btn.active {
  background-color: #0056b3;
  color: white;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

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

.loan-card {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  border: 1px solid #e9ecef;
  transition: all 0.3s ease;
  position: relative;
}

.loan-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  border-color: #0056b3;
}

.loan-card.featured {
  border: 2px solid #0056b3;
}

.featured-badge {
  position: absolute;
  top: -10px;
  right: 20px;
  background: #0056b3;
  color: white;
  padding: 0.25rem 1rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
}

.loan-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.loan-header i {
  font-size: 2.5rem;
  color: #0056b3;
  margin-bottom: 1rem;
}

.loan-header h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.loan-body {
  margin-bottom: 1.5rem;
}

.loan-rate {
  text-align: center;
  margin-bottom: 1.5rem;
}

.loan-rate .rate {
  font-size: 2rem;
  font-weight: 700;
  color: #0056b3;
}

.loan-rate .rate-label {
  font-size: 0.9rem;
  color: #6c757d;
}

.loan-features {
  list-style: none;
}

.loan-features li {
  padding: 0.5rem 0;
  display: flex;
  align-items: flex-start;
}

.loan-features i {
  color: #0056b3;
  margin-right: 0.75rem;
  margin-top: 0.2rem;
}

.loan-footer {
  display: flex;
  gap: 1rem;
}

/* Application Process */
.application-process {
  padding: 5rem 0;
  background-color: #fff;
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.process-step {
  text-align: center;
  position: relative;
}

.process-step::after {
  content: "";
  position: absolute;
  top: 40px;
  right: -30px;
  width: 30px;
  height: 2px;
  background: #e9ecef;
}

.process-step:last-child::after {
  display: none;
}

.step-number {
  width: 80px;
  height: 80px;
  background: #0056b3;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  margin: 0 auto 1.5rem;
}

.step-content h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: #212529;
}

.step-content p {
  color: #6c757d;
}

/* Loan Testimonials */
.loan-testimonials {
  padding: 5rem 0;
  background-color: #f8f9fa;
}

.testimonial-slider {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

.testimonial {
  display: none;
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.testimonial.active {
  display: block;
}

.rating {
  color: #ffc107;
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
}

.testimonial-text {
  font-size: 1.1rem;
  font-style: italic;
  color: #495057;
  margin-bottom: 2rem;
  position: relative;
}

.testimonial-text::before,
.testimonial-text::after {
  content: '"';
  font-size: 3rem;
  color: #e9ecef;
  position: absolute;
  line-height: 1;
}

.testimonial-text::before {
  top: -1rem;
  left: -1.5rem;
}

.testimonial-text::after {
  bottom: -2rem;
  right: -1.5rem;
}

.testimonial-author {
  display: flex;
  align-items: center;
}

.author-avatar {
  width: 60px;
  height: 60px;
  background-color: #e6f0ff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  color: #0056b3;
  font-weight: 600;
  font-size: 1.25rem;
}

.author-info h4 {
  margin-bottom: 0.25rem;
  color: #212529;
}

.author-info p {
  color: #6c757d;
  font-size: 0.9rem;
}

.slider-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 2rem;
  gap: 1rem;
}

.slider-prev,
.slider-next {
  background: none;
  border: none;
  font-size: 1.25rem;
  color: #6c757d;
  cursor: pointer;
  padding: 0.5rem;
  transition: color 0.3s ease;
}

.slider-prev:hover,
.slider-next:hover {
  color: #0056b3;
}

.slider-dots {
  display: flex;
  gap: 0.5rem;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #e9ecef;
  cursor: pointer;
  transition: all 0.3s ease;
}

.dot.active {
  background-color: #0056b3;
  transform: scale(1.2);
}

/* Loan CTA */
.loan-cta {
  padding: 5rem 0;
  background: linear-gradient(135deg, #0056b3 0%, #003d82 100%);
  color: white;
  text-align: center;
}

.loan-cta h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.loan-cta p {
  font-size: 1.25rem;
  max-width: 700px;
  margin: 0 auto 2rem;
  opacity: 0.9;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .loans-hero .container {
    flex-direction: column;
    text-align: center;
  }

  .loans-hero .hero-content {
    margin-bottom: 3rem;
  }

  .loans-hero .hero-cta {
    justify-content: center;
  }

  .loans-hero .hero-image {
    width: 100%;
  }

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

  .process-step::after {
    display: none;
  }
}

@media (max-width: 768px) {
  .loans-hero h1 {
    font-size: 2.5rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .process-steps {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 576px) {
  .loans-hero h1 {
    font-size: 2rem;
  }

  .section-title {
    font-size: 1.75rem;
  }

  .loan-tabs {
    flex-wrap: wrap;
  }

  .loan-footer {
    flex-direction: column;
  }
}

@media (max-width: 992px) {
  /* Tablet adjustments */
  .loans-hero .container {
    flex-direction: column;
    text-align: center;
  }

  .loans-hero .hero-content {
    margin-bottom: 2rem;
  }

  .loans-hero .hero-cta {
    justify-content: center;
  }

  .loans-hero .hero-image {
    width: 80%;
    margin: 0 auto;
  }

  .calculator-grid {
    grid-template-columns: 2fr;
  }

  .results-chart {
    height: 300px;
  }

  .process-step::after {
    display: none;
  }

  .process-steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  /* Small tablets and large phones */
  .loans-hero {
    padding: 4rem 0;
  }

  .loans-hero h1 {
    font-size: 2.5rem;
  }

  .loans-hero .hero-subtitle {
    font-size: 1.25rem;
  }

  .quick-links-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .loan-tabs {
    flex-wrap: wrap;
    justify-content: center;
  }

  .tab-btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }

  .loan-card {
    padding: 1.25rem;
  }

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

  .testimonial-slider {
    padding: 0 1rem;
  }
}

@media (max-width: 576px) {
  /* Mobile phones */
  .loans-hero h1 {
    font-size: 2rem;
    line-height: 1.2;
  }

  .loans-hero .hero-cta {
    flex-direction: column;
    gap: 0.75rem;
  }

  .quick-links-grid {
    grid-template-columns: 1fr;
  }

  .calculator-form {
    padding: 1.5rem;
  }

  .form-group {
    margin-bottom: 1.25rem;
  }

  .results-actions {
    flex-direction: column;
  }

  .loan-footer {
    flex-direction: column;
    gap: 0.75rem;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }

  .loan-cta h2 {
    font-size: 2rem;
  }

  .loan-cta p {
    font-size: 1.1rem;
  }
}

@media (max-width: 400px) {
  /* Small mobile devices */
  .loans-hero h1 {
    font-size: 1.75rem;
  }

  .loans-hero .hero-subtitle {
    font-size: 1.1rem;
  }

  .result-value {
    font-size: 2rem;
  }

  .loan-header h3 {
    font-size: 1.3rem;
  }

  .loan-rate .rate {
    font-size: 1.75rem;
  }
}

/* Testimonial Slider Responsiveness */
@media (max-width: 768px) {
  .testimonial {
    padding: 1.5rem;
  }

  .testimonial-text {
    font-size: 1rem;
  }

  .author-avatar {
    width: 50px;
    height: 50px;
    font-size: 1rem;
  }
}

/* Process Steps Responsiveness */
@media (max-width: 768px) {
  .process-step {
    text-align: center;
  }

  .step-number {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }
}

/* Form Elements Responsiveness */
@media (max-width: 576px) {
  .form-control {
    padding: 0.65rem 0.75rem;
    font-size: 0.9rem;
  }

  .input-with-icon .form-control {
    padding-left: 2rem;
  }

  .input-with-icon .input-icon {
    padding: 0 0.5rem;
  }
}

/* Range Slider Responsiveness */
@media (max-width: 576px) {
  .range-slider input[type="range"] {
    height: 4px;
  }

  .range-slider input[type="range"]::-webkit-slider-thumb {
    width: 16px;
    height: 16px;
  }
}

/* Tab Navigation Responsiveness */
@media (max-width: 768px) {
  .loan-tabs {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
  }

  .tab-btn {
    white-space: nowrap;
    margin-bottom: 0.5rem;
  }
}

/* Chart Responsiveness */
@media (max-width: 768px) {
  .results-chart {
    height: 250px;
  }
}

@media (max-width: 576px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-col {
    margin-bottom: 1.5rem;
  }

  .footer-bottom-content {
    flex-direction: column;
    text-align: center;
  }

  .footer-legal ul {
    justify-content: center;
    flex-wrap: wrap;
  }
}
