/* =========================================
   Alta Mortgage Group - Main Stylesheet
   ========================================= */

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Montserrat', 'Open Sans', Arial, sans-serif;
  font-size: 16px;
  color: #333;
  background: #fff;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Raleway', 'Open Sans', Arial, sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul {
  list-style: none;
}

/* --- Variables --- */
:root {
  /* CRM Brand Colors — matched exactly from altamortgagecrm.net */
  --green-dark:  #1a3d2b;  /* sidebar dark: oklch(0.22 0.06 155) */
  --green-mid:   #1F7B47;  /* primary green: rgb(31, 123, 71) */
  --green-light: #2a9a5a;  /* lighter green */
  --gold:        #C9A84C;  /* brand gold: #C9A84C */
  --gold-light:  #d4b96a;
  --white:       #ffffff;
  --light-gray:  #f5f5f5;
  --text-dark:   #1a2030;
  --text-mid:    #444;
  /* Sidebar/nav dark green */
  --nav-dark:    #1a3d2b;
}

/* =========================================
   TOP BAR
   ========================================= */
.site-header-wrapper {
  position: sticky;
  top: 0;
  z-index: 1000;
}

.top-bar {
  background: var(--green-dark);
  padding: 7px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.top-bar-contact {
  display: flex;
  align-items: center;
  gap: 28px;
}

.top-bar-contact a {
  color: rgba(255,255,255,0.88);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: color 0.2s;
  font-weight: 500;
}

.top-bar-contact a:hover {
  color: #fff;
}

.top-bar-contact .icon {
  font-size: 13px;
  opacity: 0.85;
}

.btn-apply-top {
  background: var(--gold);
  color: #1a1a1a !important;
  padding: 7px 20px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.4px;
  transition: background 0.2s;
}

.btn-apply-top:hover {
  background: var(--gold-light);
}

/* =========================================
   HEADER / NAVIGATION
   ========================================= */
.site-header {
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.10);
  border-bottom: 3px solid var(--green-dark);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-direction: row;
  gap: 0;
  min-height: 80px;
}

.logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logo-img {
  height: 68px;
  width: auto;
}

.main-nav {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

.main-nav ul {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 0;
  border: none;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav ul li {
  position: relative;
}

.main-nav ul li a {
  display: block;
  padding: 28px 14px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: #333;
  text-transform: uppercase;
  border: none;
  white-space: nowrap;
  transition: color 0.2s;
  position: relative;
}

.main-nav ul li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--green-mid);
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

.main-nav ul li a:hover::after,
.main-nav ul li a.active::after {
  transform: scaleX(1);
}

.main-nav ul li a:hover,
.main-nav ul li a.active {
  color: var(--green-mid);
  background: transparent;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--green-dark);
  border-radius: 4px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 20px;
  color: var(--green-dark);
}

/* =========================================
   HERO SECTION
   ========================================= */
.hero-section {
  background: #fff;
  padding: 40px 20px 0;
  position: relative;
  overflow: hidden;
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
}

.hero-content {
  flex: 1;
  min-width: 300px;
}

.hero-title {
  font-size: 52px;
  font-weight: 900;
  color: #1a1a1a;
  line-height: 1.1;
  margin-bottom: 12px;
}

.hero-subtitle {
  font-size: 22px;
  font-weight: 700;
  color: var(--green-mid);
  margin-bottom: 20px;
  line-height: 1.3;
}

.hero-bullets {
  margin-bottom: 28px;
}

.hero-bullets li {
  font-size: 15px;
  color: #333;
  padding: 4px 0;
  line-height: 1.5;
}

.hero-bullets li::before {
  content: "* ";
  color: var(--green-mid);
  font-weight: 700;
}

.hero-cta-group {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn-primary {
  background: var(--green-dark);
  color: #fff;
  padding: 12px 28px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 700;
  border: 2px solid var(--green-dark);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  display: inline-block;
}

.btn-primary:hover {
  background: var(--green-mid);
  border-color: var(--green-mid);
}

.btn-outline {
  background: transparent;
  color: var(--green-dark);
  padding: 12px 28px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 700;
  border: 2px solid var(--green-dark);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  display: inline-block;
}

.btn-outline:hover {
  background: var(--green-dark);
  color: #fff;
}

.hero-images {
  flex: 1;
  min-width: 300px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-property-img {
  width: 420px;
  height: 420px;
  border-radius: 50%;
  object-fit: cover;
  border: 8px solid var(--green-dark);
}

.hero-person-img {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  border: 6px solid var(--green-dark);
  position: absolute;
  bottom: 10px;
  left: 20px;
}

/* =========================================
   WAVE DIVIDER
   ========================================= */
.wave-section {
  position: relative;
  margin-top: 0;
  background: transparent;
}

.wave-section svg {
  display: block;
  width: 100%;
}

.wave-tagline {
  background: var(--green-dark);
  color: #fff;
  text-align: center;
  padding: 28px 40px;
  font-size: 16px;
  line-height: 1.7;
  max-width: 100%;
}

/* =========================================
   LOAN PROGRAMS SECTION
   ========================================= */
.loan-programs-section {
  padding: 50px 20px;
  background: #fff;
}

.section-header {
  max-width: 1200px;
  margin: 0 auto 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-title {
  font-size: 32px;
  font-weight: 800;
  color: #1a1a1a;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.btn-view-all {
  background: var(--green-dark);
  color: #fff;
  padding: 10px 22px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  transition: background 0.2s;
}

.btn-view-all:hover {
  background: var(--green-mid);
}

.loan-cards-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.loan-card {
  border: 2px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  text-align: center;
  transition: box-shadow 0.2s, transform 0.2s;
  cursor: pointer;
  background: #fff;
}

.loan-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
  transform: translateY(-3px);
}

.loan-card img {
  width: 100%;
  height: 120px;
  object-fit: cover;
}

.loan-card-body {
  padding: 14px 10px;
}

.loan-card-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--green-mid);
  margin-bottom: 8px;
  line-height: 1.2;
}

.loan-card-desc {
  font-size: 13px;
  color: #555;
  line-height: 1.5;
}

/* =========================================
   ABOUT + CONTACT SECTION
   ========================================= */
.about-contact-section {
  padding: 50px 20px;
  background: #fff;
}

.about-contact-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

/* About Us */
.about-title {
  font-size: 32px;
  font-weight: 800;
  color: #1a1a1a;
  text-decoration: underline;
  text-underline-offset: 4px;
  margin-bottom: 14px;
}

.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.about-tag {
  font-size: 13px;
  font-weight: 700;
  color: #555;
  padding: 4px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.about-text {
  font-size: 15px;
  color: #444;
  line-height: 1.8;
  margin-bottom: 14px;
}

.btn-learn-more {
  background: var(--green-dark);
  color: #fff;
  padding: 12px 28px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 700;
  display: inline-block;
  margin-top: 8px;
  transition: background 0.2s;
}

.btn-learn-more:hover {
  background: var(--green-mid);
}

/* Contact Form */
.contact-title {
  font-size: 32px;
  font-weight: 800;
  color: #1a1a1a;
  text-decoration: underline;
  text-underline-offset: 4px;
  margin-bottom: 20px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: #444;
}

.form-group input,
.form-group textarea {
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--green-mid);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: #555;
  line-height: 1.5;
}

.form-checkbox input[type="checkbox"] {
  margin-top: 2px;
  flex-shrink: 0;
}

.btn-submit {
  background: var(--green-dark);
  color: #fff;
  padding: 12px 28px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  align-self: flex-start;
}

.btn-submit:hover {
  background: var(--green-mid);
}

/* =========================================
   FOOTER
   ========================================= */
.site-footer {
  background: var(--green-dark);
  color: #fff;
  padding: 40px 20px 0;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding-bottom: 30px;
}

.footer-company-name {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 16px;
}

.footer-info-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 14px;
  line-height: 1.5;
}

.footer-info-item .icon {
  font-size: 16px;
  margin-top: 1px;
  flex-shrink: 0;
}

.footer-quick-links h3 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 16px;
}

.footer-quick-links ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-quick-links ul li a {
  font-size: 14px;
  color: rgba(255,255,255,0.85);
  transition: color 0.2s;
}

.footer-quick-links ul li a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.2);
  padding: 16px 20px;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.equal-housing-logo {
  width: 50px;
  height: auto;
  filter: brightness(0) invert(1);
}

.footer-copyright {
  font-size: 12px;
  color: rgba(255,255,255,0.75);
  line-height: 1.5;
}

.footer-social {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-social a {
  color: rgba(255,255,255,0.85);
  font-size: 22px;
  transition: color 0.2s;
}

.footer-social a:hover {
  color: #fff;
}

/* =========================================
   LOAN PROGRAMS PAGE
   ========================================= */
.page-hero {
  background: #f5f5f5;
  padding: 30px 20px;
  border-bottom: 2px solid #e0e0e0;
}

.page-hero h1 {
  max-width: 1200px;
  margin: 0 auto;
  font-size: 36px;
  font-weight: 800;
  color: #1a1a1a;
}

.page-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 20px;
}

.page-intro {
  font-size: 15px;
  color: #555;
  margin-bottom: 8px;
  line-height: 1.7;
}

.page-disclaimer {
  font-size: 13px;
  color: #777;
  font-style: italic;
  margin-bottom: 30px;
}

.loan-programs-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 30px;
  align-items: start;
}

.loan-sidebar {
  border: 1px solid #ddd;
  border-radius: 6px;
  overflow: hidden;
  position: sticky;
  top: 120px;
}

.loan-sidebar-btn {
  display: block;
  width: 100%;
  padding: 12px 16px;
  text-align: left;
  background: #fff;
  border: none;
  border-bottom: 1px solid #ddd;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.loan-sidebar-btn:last-child {
  border-bottom: none;
}

.loan-sidebar-btn:hover,
.loan-sidebar-btn.active {
  background: var(--green-dark);
  color: #fff;
}

.loan-detail-panel {
  display: none;
}

.loan-detail-panel.active {
  display: block;
}

.loan-detail-panel h2 {
  font-size: 28px;
  font-weight: 800;
  color: #1a1a1a;
  margin-bottom: 16px;
}

.loan-detail-panel p {
  font-size: 15px;
  color: #444;
  line-height: 1.8;
  margin-bottom: 16px;
}

/* =========================================
   ABOUT PAGE
   ========================================= */
.about-page-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 50px 20px;
}

.about-page-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.about-page-text h2 {
  font-size: 28px;
  font-weight: 800;
  color: #1a1a1a;
  margin-bottom: 16px;
}

.about-page-text p {
  font-size: 15px;
  color: #444;
  line-height: 1.8;
  margin-bottom: 14px;
}

.about-page-image img {
  border-radius: 8px;
  width: 100%;
  object-fit: cover;
}

/* =========================================
   CONTACT PAGE
   ========================================= */
.contact-page-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 50px 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}

.contact-info h2 {
  font-size: 28px;
  font-weight: 800;
  color: #1a1a1a;
  margin-bottom: 20px;
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 15px;
  color: #444;
  line-height: 1.6;
}

.contact-info-item .icon {
  font-size: 18px;
  color: var(--green-mid);
  margin-top: 2px;
}

/* =========================================
   GET A QUOTE PAGE
   ========================================= */
.quote-page-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 50px 20px;
}

.quote-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.quote-form .form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

/* =========================================
   APPLY NOW PAGE
   ========================================= */
.apply-page-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 50px 20px;
  text-align: center;
}

.apply-page-content h2 {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 16px;
}

.apply-page-content p {
  font-size: 16px;
  color: #555;
  margin-bottom: 30px;
  line-height: 1.7;
}

.apply-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  text-align: left;
  margin-top: 30px;
}

.apply-option-card {
  border: 2px solid var(--green-dark);
  border-radius: 8px;
  padding: 28px;
}

.apply-option-card h3 {
  font-size: 20px;
  font-weight: 800;
  color: var(--green-dark);
  margin-bottom: 12px;
}

.apply-option-card p {
  font-size: 14px;
  margin-bottom: 20px;
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 900px) {
  .loan-cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .about-contact-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .loan-programs-layout {
    grid-template-columns: 1fr;
  }

  .loan-sidebar {
    position: static;
  }

  .about-page-grid,
  .contact-page-content,
  .apply-options {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

@media (max-width: 900px) {
  .main-nav ul {
    flex-wrap: wrap;
  }
  .main-nav ul li a {
    padding: 22px 10px;
    font-size: 11.5px;
  }
}

@media (max-width: 768px) {
  .header-inner {
    padding: 0 16px;
    flex-wrap: wrap;
    min-height: auto;
    padding-top: 12px;
    padding-bottom: 0;
  }

  .logo-img {
    height: 56px;
  }

  .main-nav {
    width: 100%;
    justify-content: flex-start;
    border-top: 1px solid #eee;
    margin-top: 10px;
  }

  .main-nav ul {
    justify-content: flex-start;
    flex-wrap: wrap;
    display: none;
  }

  .main-nav ul.open {
    display: flex;
  }

  .nav-toggle {
    display: block;
    margin-left: auto;
  }

  .main-nav ul li a {
    padding: 14px 12px;
    font-size: 12px;
    border-bottom: 1px solid #eee;
    width: 100%;
  }

  .main-nav ul li a::after {
    display: none;
  }
}

@media (max-width: 640px) {
  .top-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .hero-title {
    font-size: 36px;
  }

  .hero-subtitle {
    font-size: 18px;
  }

  .hero-property-img {
    width: 280px;
    height: 280px;
  }

  .hero-person-img {
    width: 110px;
    height: 110px;
  }

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

  .form-row {
    grid-template-columns: 1fr;
  }

  .main-nav ul li:first-child a {
    border-left: none;
  }

  .hero-inner {
    flex-direction: column;
  }

  .hero-images {
    width: 100%;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .quote-form .form-row-3 {
    grid-template-columns: 1fr;
  }
}
