:root {
  --primary: #0052cc;
  --light-bg: #f5f7fa;
  --dark-text: #001f4d;
  --white: #ffffff;
  --font: 'Inter', sans-serif;
}

body {
  margin: 0;
  font-family: var(--font);
  color: #333;
  line-height: 1.6;
}

a { text-decoration: none; }

.btn {
  display: inline-block;
  background: var(--primary);
  color: var(--white);
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-weight: 600;
  transition: background 0.3s;
}

.btn:hover { background: #003ea6; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

header {
  background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('img/hero.avif');
  background-size: cover;
  background-position: center;
  text-align: center;
  padding: 80px 20px;
  color: var(--white);
  min-height: 300px;
}

header h1 {
  font-size: 2.5rem;
  color: var(--white);
  margin-bottom: 0.5rem;
  font-weight: 700;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

header p {
  font-size: 1.125rem;
  color: var(--white);
  margin-bottom: 1.5rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

section {
  padding: 60px 0;
}

.section-light { background: var(--light-bg); }

.section-dark {
  background: #808080;
  color: var(--white);
}

h2 {
  font-size: 2rem;
  color: var(--dark-text);
  margin-bottom: 1.5rem;
  text-align: center;
}

.grid {
  display: grid;
  gap: 20px;
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.feature {
  background: var(--white);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.feature h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--dark-text);
}

.feature p { color: #555; }

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

table th, table td {
  padding: 12px;
  border: 1px solid #ddd;
  text-align: left;
}

table th { background: var(--primary); color: var(--white); }

form {
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
}

.form-group label {
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box; /* Include padding and border in the element's total width and height */
}

.faq-item {
  border-bottom: 1px solid #ccc;
  padding: 1rem 0;
}

.faq-item h4 {
  cursor: pointer;
  position: relative;
  padding-right: 20px;
  margin: 0;
  font-weight: 600;
}

.faq-item h4::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 0;
}

.faq-item.open h4::after { content: '–'; }

.faq-item p {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  margin: 0.5rem 0 0;
}

.faq-item.open p {
  max-height: 200px;
  opacity: 1;
  transform: translateY(0);
}

footer {
  background: #eee;
  color: #555;
  text-align: center;
  padding: 40px 20px;
  font-size: 0.9rem;
}

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

.testimonial {
  background: var(--white);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.testimonial-img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin-bottom: 1rem;
  object-fit: cover;
}

.testimonial blockquote {
  font-style: italic;
  color: #555;
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.6;
}

.testimonial cite {
  display: block;
  margin-top: 1rem;
  font-style: normal;
  font-weight: 600;
  color: var(--dark-text);
}

.performance-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.performance-item {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
}

.checkmark-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.performance-content {
  flex: 1;
}

.performance-content h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.25rem;
}

.performance-content p {
  margin: 0;
  color: #666;
}

.investment-model-container {
  display: flex;
  flex-wrap: wrap; /* Allow items to wrap on smaller screens */
  gap: 40px; /* Space between text and image */
  align-items: center; /* Vertically align items */
}

.investment-model-content {
  flex: 1; /* Allow content to take up available space */
  min-width: 300px; /* Minimum width before wrapping */
}

.investment-model-image {
  flex: 1; /* Allow image container to take up available space */
  text-align: center; /* Center the image if it's smaller than its container */
}

.investment-model-image img {
  max-width: 100%; /* Ensure image is responsive */
  height: auto;
  border-radius: 8px; /* Optional: add some border radius to the image */
  box-shadow: 0 4px 12px rgba(0,0,0,0.1); /* Optional: add a subtle shadow */
}

@media (max-width: 768px) {
  .investment-model-container {
    flex-direction: column;
  }

  .investment-model-content {
    min-width: unset; /* Remove min-width on mobile */
  }
}

/* Performance Section Layout */
.performance-container {
  display: flex;
  flex-wrap: wrap; /* Allow items to wrap on smaller screens */
  gap: 40px; /* Space between text and image */
  align-items: center; /* Vertically align items */
}

.performance-content-wrapper {
  flex: 1; /* Allow content to take up available space */
  min-width: 300px; /* Minimum width before wrapping */
}

.performance-image {
  flex: 1; /* Allow image container to take up available space */
  text-align: center; /* Center the image if it's smaller than its container */
}

.performance-image img {
  max-width: 100%; /* Ensure image is responsive */
  height: auto;
  border-radius: 8px; /* Optional: add some border radius to the image */
  box-shadow: 0 4px 12px rgba(0,0,0,0.1); /* Optional: add a subtle shadow */
}

@media (max-width: 768px) {
  .performance-container {
    flex-direction: column;
  }

  .performance-content-wrapper {
    min-width: unset; /* Remove min-width on mobile */
  }
}

.performance-content-wrapper h2 {
  text-align: left;
}

header img {
  position: absolute;
  top: 20px;
  left: 20px;
  max-width: 200px;
  height: auto;
}

header {
  position: relative; /* Add position relative to the header */
}

header .container {
  padding-top: 30px;
}

/* New styles for pre-qualification section and form box */
#pre-qualification {
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('img/houses.jpg');
  background-size: cover;
  background-position: center;
}

.form-box {
  background-color: rgba(255, 255, 255, 0.8); /* Semi-transparent white */
  padding: 30px;
  border-radius: 10px;
  max-width: 600px;
  margin: 20px auto; /* Center the box and add some space */
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.form-box label {
  color: var(--dark-text); /* Ensure label color is readable on the semi-transparent background */
}

.form-box input,
.form-box select {
  background-color: rgba(255, 255, 255, 0.9); /* Slightly more opaque input fields */
}
