/* ============================================================
   RESTORE GROUP FL INC — Financing Page Styles
   ============================================================ */

.financing-intro {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4rem;
  align-items: center;
}
.financing-hero-badge {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: var(--black);
  border-radius: var(--radius-lg);
  padding: 2rem 2.5rem;
  flex-shrink: 0;
  border-left: 4px solid var(--red);
}
.financing-hero-badge > i {
  font-size: 2.5rem;
  color: var(--red);
}
.financing-hero-badge strong {
  display: block;
  color: var(--white);
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}
.financing-hero-badge span {
  display: block;
  color: rgba(255,255,255,0.7);
  font-size: 0.95rem;
}

/* Financing Cards */
.financing-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

.financing-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
  position: relative;
  border-top: 4px solid var(--light-gray);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.financing-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-top-color: var(--red);
}
.financing-card.featured-card {
  border-top-color: var(--red);
  background: var(--black);
}
.financing-card.featured-card h3 { color: var(--white); }
.financing-card.featured-card p { color: rgba(255,255,255,0.75); }
.financing-card.featured-card .fc-features li { color: rgba(255,255,255,0.8); }

.fc-badge {
  position: absolute;
  top: -12px; right: 1.5rem;
  background: var(--red);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 20px;
}

.fc-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: rgba(203,25,32,0.1);
  display: flex; align-items: center; justify-content: center;
  color: var(--red);
  font-size: 1.3rem;
  margin-bottom: 1.25rem;
}
.featured-card .fc-icon {
  background: rgba(203,25,32,0.2);
}

.financing-card h3 {
  font-size: 1.2rem;
  color: var(--black);
  margin-bottom: 0.75rem;
}
.financing-card p { font-size: 0.9rem; margin-bottom: 1.25rem; }

.fc-features {
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.fc-features li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray);
}
.fc-features li i { color: var(--red); font-size: 0.7rem; flex-shrink: 0; }

/* FAQ */
.faq-layout {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 5rem;
  align-items: start;
}
.faq-list { display: flex; flex-direction: column; gap: 0; }
.faq-item { border-bottom: 1px solid var(--light-gray); }
.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 0;
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 600;
  color: var(--black);
  letter-spacing: 0.02em;
  text-align: left;
  gap: 1rem;
  transition: color var(--transition);
}
.faq-question:hover { color: var(--red); }
.faq-question i {
  flex-shrink: 0;
  font-size: 0.75rem;
  color: var(--red);
  transition: transform var(--transition);
}
.faq-item.open .faq-question { color: var(--red); }
.faq-item.open .faq-question i { transform: rotate(180deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}
.faq-item.open .faq-answer { max-height: 200px; }
.faq-answer p {
  padding-bottom: 1.25rem;
  font-size: 0.9rem;
  line-height: 1.8;
}

/* ============================================================
   FINANCING CALCULATOR
   ============================================================ */

.calc-section {
  background: #fff;
  padding: 100px 0;
  position: relative;
  overflow: hidden;
}
.calc-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  background: linear-gradient(to right, var(--red), var(--red-light));
}

/* Header */
.calc-header {
  text-align: center;
  margin-bottom: 56px;
}
.calc-header h2 { color: var(--black); }
.calc-header p {
  color: var(--gray);
  max-width: 580px;
  margin: 0 auto;
  font-size: 1.05rem;
  line-height: 1.8;
}

/* Main layout */
.calc-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 80px rgba(0,0,0,0.14);
}

/* ── LEFT PANEL: Inputs ── */
.calc-panel-left {
  background: #fff;
  padding: 48px 44px;
  border: 1px solid #e8e8e8;
  border-right: none;
  border-radius: 20px 0 0 20px;
}

.calc-tab-group {
  display: flex;
  gap: 8px;
  margin-bottom: 36px;
  background: #f8f9fa;
  border-radius: 10px;
  padding: 5px;
}
.calc-tab {
  flex: 1;
  padding: 10px 6px;
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gray);
  background: transparent;
  border: none;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: center;
}
.calc-tab.active {
  background: var(--red);
  color: #fff;
  box-shadow: 0 4px 12px rgba(203,25,32,0.3);
}
.calc-tab:not(.active):hover {
  background: rgba(203,25,32,0.07);
  color: var(--red);
}

/* Input groups */
.calc-field {
  margin-bottom: 28px;
}
.calc-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.calc-label-text {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--black);
}
.calc-label-val {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--red);
  min-width: 90px;
  text-align: right;
}

/* Range slider */
.calc-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 5px;
  border-radius: 5px;
  outline: none;
  cursor: pointer;
  background: linear-gradient(to right, var(--red) 0%, var(--red) var(--pct, 50%), #e8e8e8 var(--pct, 50%), #e8e8e8 100%);
  transition: background 0.15s ease;
}
.calc-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--red);
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(203,25,32,0.4);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.calc-range::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 4px 16px rgba(203,25,32,0.5);
}
.calc-range::-moz-range-thumb {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--red);
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(203,25,32,0.4);
  cursor: pointer;
}

.calc-range-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
}
.calc-range-labels span {
  font-size: 0.72rem;
  color: var(--mid-gray);
  font-weight: 600;
}

/* Select */
.calc-select {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--light-gray);
  border-radius: 8px;
  font-family: var(--font-main);
  font-size: 0.95rem;
  color: var(--black);
  background: #fff;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23cb1920' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.calc-select:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(203,25,32,0.1);
}

/* Info tooltip */
.calc-info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--light-gray);
  color: var(--gray);
  font-size: 0.65rem;
  cursor: help;
  margin-left: 6px;
  transition: background 0.2s;
}
.calc-info:hover { background: var(--red); color: #fff; }

/* ── RIGHT PANEL: Results ── */
.calc-panel-right {
  background: var(--black);
  padding: 48px 44px;
  border-radius: 0 20px 20px 0;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.calc-panel-right::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 280px; height: 280px;
  border-radius: 50%;
  background: rgba(203,25,32,0.06);
  pointer-events: none;
}
.calc-panel-right::after {
  content: '';
  position: absolute;
  bottom: -40px; left: -40px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: rgba(203,25,32,0.04);
  pointer-events: none;
}

.calc-results-title {
  font-family: var(--font-head);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 28px;
  position: relative;
  z-index: 1;
}

/* Monthly payment hero */
.calc-monthly-hero {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 28px 24px;
  text-align: center;
  margin-bottom: 28px;
  position: relative;
  z-index: 1;
  transition: all 0.35s ease;
}
.calc-monthly-hero:hover {
  background: rgba(203,25,32,0.08);
  border-color: rgba(203,25,32,0.3);
}
.calc-monthly-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 10px;
}
.calc-monthly-amount {
  font-family: var(--font-head);
  font-size: clamp(2.4rem, 4vw, 3.4rem);
  font-weight: 700;
  color: var(--red);
  line-height: 1;
  transition: all 0.4s ease;
}
.calc-monthly-amount .calc-cents {
  font-size: 1.4rem;
  color: rgba(203,25,32,0.7);
}
.calc-monthly-sub {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.35);
  margin-top: 8px;
}

/* Breakdown rows */
.calc-breakdown {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 28px;
  position: relative;
  z-index: 1;
  flex: 1;
}
.calc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.calc-row:last-child { border-bottom: none; }
.calc-row-label {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
  display: flex;
  align-items: center;
  gap: 8px;
}
.calc-row-label i {
  color: rgba(203,25,32,0.6);
  font-size: 0.75rem;
  width: 14px;
  text-align: center;
}
.calc-row-value {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  transition: all 0.4s ease;
}
.calc-row-value.highlight { color: var(--red); }

/* Interest cost bar */
.calc-cost-bar-wrap {
  margin-bottom: 28px;
  position: relative;
  z-index: 1;
}
.calc-cost-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.35);
  margin-bottom: 8px;
  font-weight: 600;
  letter-spacing: 0.05em;
}
.calc-cost-bar-track {
  height: 6px;
  background: rgba(255,255,255,0.07);
  border-radius: 6px;
  overflow: hidden;
}
.calc-cost-bar-principal {
  height: 100%;
  border-radius: 6px 0 0 6px;
  background: rgba(255,255,255,0.25);
  display: inline-block;
  transition: width 0.5s ease;
}
.calc-cost-bar-interest {
  height: 100%;
  border-radius: 0 6px 6px 0;
  background: var(--red);
  display: inline-block;
  transition: width 0.5s ease;
}

/* CTA inside calculator */
.calc-cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
  margin-top: auto;
}
.calc-cta-btn:hover {
  background: var(--red-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(203,25,32,0.4);
  color: #fff;
}

/* Number animate */
@keyframes numPop {
  0%  { transform: scale(0.92); opacity: 0.6; }
  60% { transform: scale(1.04); }
  100%{ transform: scale(1);    opacity: 1; }
}
.num-pop { animation: numPop 0.35s ease; }

/* Disclaimer */
.calc-disclaimer {
  text-align: center;
  margin-top: 20px;
  font-size: 0.75rem;
  color: var(--mid-gray);
  line-height: 1.7;
}

/* ── Amortization mini table ── */
.calc-amort-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--red);
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  margin: 16px auto 0;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.calc-amort-toggle:hover { color: var(--red-light); }
.calc-amort-toggle i { transition: transform 0.3s ease; font-size: 0.7rem; }
.calc-amort-toggle.open i { transform: rotate(180deg); }

.calc-amort-wrap {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease;
  margin-top: 0;
}
.calc-amort-wrap.open {
  max-height: 340px;
  margin-top: 16px;
  overflow-y: auto;
}
.calc-amort-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}
.calc-amort-table thead th {
  padding: 8px 10px;
  text-align: left;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mid-gray);
  border-bottom: 2px solid var(--light-gray);
  position: sticky;
  top: 0;
  background: #fff;
}
.calc-amort-table tbody td {
  padding: 8px 10px;
  border-bottom: 1px solid #f0f0f0;
  color: var(--gray);
}
.calc-amort-table tbody tr:hover { background: #fafafa; }
.calc-amort-table tbody td:first-child { font-weight: 700; color: var(--black); }
.calc-amort-table tbody td.interest-col { color: var(--red); font-weight: 600; }

/* Scrollbar for amortization table */
.calc-amort-wrap::-webkit-scrollbar { width: 4px; }
.calc-amort-wrap::-webkit-scrollbar-track { background: #f8f9fa; border-radius: 4px; }
.calc-amort-wrap::-webkit-scrollbar-thumb { background: var(--red); border-radius: 4px; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .financing-cards { grid-template-columns: repeat(2, 1fr); }
  .financing-intro { grid-template-columns: 1fr; gap: 2rem; }
  .faq-layout { grid-template-columns: 1fr; gap: 3rem; }
  .calc-wrapper { grid-template-columns: 1fr; }
  .calc-panel-left { border-right: 1px solid #e8e8e8; border-bottom: none; border-radius: 20px 20px 0 0; }
  .calc-panel-right { border-radius: 0 0 20px 20px; }
}
@media (max-width: 640px) {
  .financing-cards { grid-template-columns: 1fr; }
  .financing-hero-badge { flex-direction: column; text-align: center; }
  .calc-panel-left, .calc-panel-right { padding: 32px 24px; }
  .calc-tab { font-size: 0.7rem; padding: 9px 4px; }
}
