/* Mortgage Calculator Page-Specific Styles */

/* Calculator section */
.calc-section {
  padding: var(--space-xl) 0;
  background: var(--warm-white);
}

.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: start;
}

/* Calculator Form */
.calc-form {
  background: white;
  padding: 2.25rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--sand);
  box-shadow: 0 8px 30px rgba(27, 58, 92, 0.06);
}

.calc-form h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--deepest-blue);
  font-weight: 500;
  margin-bottom: 1.25rem;
}

.calc-field {
  margin-bottom: 1.25rem;
}

.calc-field label {
  display: block;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light);
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.calc-input-wrap {
  position: relative;
}

.calc-input-prefix,
.calc-input-suffix {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-lighter);
  font-size: 0.95rem;
  font-weight: 600;
  pointer-events: none;
}

.calc-input-prefix {
  left: 0.85rem;
}

.calc-input-suffix {
  right: 0.85rem;
}

.calc-field input,
.calc-field select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--sand);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  background: white;
  color: var(--text);
  transition: all 0.2s;
}

.calc-field input.has-prefix {
  padding-left: 1.85rem;
}

.calc-field input.has-suffix {
  padding-right: 2rem;
}

.calc-field input:focus,
.calc-field select:focus {
  outline: 2px solid var(--light-blue);
  outline-offset: 1px;
  border-color: var(--light-blue);
  box-shadow: 0 0 0 3px rgba(124, 181, 214, 0.15);
}

.calc-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

/* Calculator Results */
.calc-results {
  background: var(--deepest-blue);
  color: white;
  padding: 2.25rem;
  border-radius: var(--radius-lg);
  position: sticky;
  top: 90px;
  position: relative;
  overflow: hidden;
}

.calc-results::before {
  content: '';
  position: absolute;
  right: -80px;
  bottom: -80px;
  width: 280px;
  height: 280px;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text x="50" y="50" text-anchor="middle" dominant-baseline="middle" font-size="80" fill="white" opacity="0.06">LLW</text></svg>') center/contain no-repeat;
  opacity: 0.06;
  pointer-events: none;
}

.calc-results-inner {
  position: relative;
  z-index: 1;
}

.calc-results h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: white;
  font-weight: 500;
  margin-bottom: 0.4rem;
}

.calc-results-sub {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.calc-headline {
  background: rgba(255, 255, 255, 0.06);
  padding: 1.5rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.calc-headline-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.calc-headline-value {
  font-family: var(--font-display);
  font-size: 2.6rem;
  color: white;
  font-weight: 600;
  line-height: 1;
}

.calc-headline-value em {
  font-style: normal;
  color: var(--light-blue);
  font-size: 1.4rem;
  font-weight: 500;
}

.calc-breakdown {
  display: grid;
  gap: 0.6rem;
}

.calc-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.calc-line:last-child {
  border-bottom: none;
}

.calc-line-label {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.85);
}

.calc-line-value {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: white;
  font-weight: 500;
}

.calc-line.calc-total {
  margin-top: 0.5rem;
  padding-top: 1rem;
  border-top: 2px solid rgba(255, 255, 255, 0.25);
  border-bottom: none;
}

.calc-line.calc-total .calc-line-label {
  font-size: 1.05rem;
  font-weight: 600;
  color: white;
}

.calc-line.calc-total .calc-line-value {
  font-size: 1.4rem;
  color: var(--light-blue);
}

.calc-disclaimer {
  margin-top: 1.25rem;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.55;
}

/* IDX placeholder */
.idx-note {
  margin-top: 2rem;
  padding: 1.25rem 1.5rem;
  background: var(--cream);
  border: 1px dashed var(--lightest-blue);
  border-radius: var(--radius);
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.6;
}

.idx-note strong {
  color: var(--deepest-blue);
}

.idx-note code {
  background: white;
  padding: 2px 8px;
  border: 1px solid var(--sand);
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 0.82rem;
  color: var(--dark-blue);
}

/* Tips section */
.tips-section {
  padding: var(--space-xl) 0;
  background: var(--cream);
}

.tips-header {
  text-align: center;
  margin-bottom: var(--space-lg);
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.tips-header .eyebrow {
  display: block;
}

.tips-header p {
  font-size: 1.05rem;
  color: var(--text-light);
  line-height: 1.7;
  margin-top: 1rem;
}

.tips-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.tip-card {
  background: white;
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--sand);
  transition: all 0.3s;
}

.tip-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(27, 58, 92, 0.08);
  border-color: var(--lightest-blue);
}

.tip-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--ice-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.tip-card-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--dark-blue);
  fill: none;
  stroke-width: 1.5;
}

.tip-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--deepest-blue);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.tip-card p {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.65;
}

/* CTA section */
.cta-section {
  padding: var(--space-xl) 0;
  background: var(--deepest-blue);
  color: white;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(124, 181, 214, 0.15) 0%, transparent 70%);
  z-index: 0;
}

.cta-section .container {
  position: relative;
  z-index: 1;
}

.cta-section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.5vw, 2.8rem);
  color: white;
  font-weight: 500;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.cta-section h2 em {
  color: var(--light-blue);
  font-style: italic;
}

.cta-section p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 640px;
  margin: 0 auto 2rem;
}

.cta-section .btn-warm {
  border: none;
  background: white;
}

.cta-ctas {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Responsive Design */
@media (max-width: 960px) {
  .calc-grid {
    grid-template-columns: 1fr;
  }

  .calc-results {
    position: static;
  }

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

@media (max-width: 720px) {
  .calc-row {
    grid-template-columns: 1fr;
  }

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

  .cta-ctas a {
    width: 100%;
    max-width: 300px;
  }
}
