/* ================================================
   CIS Rebate Calculator — cisrebatecalculator.co.uk
   Shared Stylesheet
   ================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: Arial, Helvetica, sans-serif;
  background: #ffffff;
  color: #1e293b;
  font-size: 15px;
  line-height: 1.6;
}

a { cursor: pointer; text-decoration: none; }
img { max-width: 100%; }

/* ---- NAV ---- */
nav {
  background: #1d4ed8;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 64px;
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-box {
  width: 40px; height: 40px;
  background: #fff;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 13px; color: #1d4ed8; flex-shrink: 0;
  line-height: 1;
}
.logo-text { color: #fff; font-size: 17px; font-weight: 800; line-height: 1.2; }
.logo-text small { display: block; font-size: 11px; font-weight: 400; color: #bfdbfe; }
.nav-links { display: flex; flex-wrap: wrap; gap: 2px; padding: 10px 0; }
.nav-links a {
  color: #dbeafe; padding: 8px 11px;
  border-radius: 6px; font-size: 13px; font-weight: 600;
}
.nav-links a:hover, .nav-links a.active {
  background: rgba(255,255,255,0.18); color: #fff;
}

/* ---- PAGE TITLE BAR ---- */
.page-bar { background: #1d4ed8; color: #fff; padding: 32px 20px; text-align: center; }
.page-bar h1 { font-size: 28px; font-weight: 900; }
.page-bar p { font-size: 13px; color: #bfdbfe; margin-top: 7px; }

/* ---- HERO ---- */
.hero { background: #1d4ed8; color: #fff; padding: 56px 20px 48px; text-align: center; }
.hero h1 { font-size: 32px; font-weight: 900; line-height: 1.2; margin-bottom: 14px; max-width: 660px; margin-left: auto; margin-right: auto; }
.hero p { font-size: 17px; color: #bfdbfe; max-width: 560px; margin: 0 auto 26px; }
.badge-row { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-bottom: 30px; }
.badge { background: rgba(255,255,255,0.15); color: #fff; padding: 5px 14px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.btn-primary {
  background: #f59e0b; color: #78350f;
  padding: 14px 34px; border-radius: 8px;
  font-size: 16px; font-weight: 800; border: none; cursor: pointer;
  display: inline-block;
}
.btn-primary:hover { background: #fbbf24; }

/* ---- TRUST BAR ---- */
.trust-bar { background: #1e3a8a; padding: 14px 20px; text-align: center; }
.trust-bar-inner { display: flex; justify-content: center; gap: 22px; flex-wrap: wrap; }
.trust-item { color: #bfdbfe; font-size: 12px; font-weight: 600; display: flex; align-items: center; gap: 5px; }
.tick { color: #34d399; }

/* ---- SECTIONS ---- */
.section { padding: 48px 20px; }
.section-blue { background: #eff6ff; padding: 48px 20px; }
.section-orange { background: #fff7ed; padding: 48px 20px; }
.container { max-width: 900px; margin: 0 auto; }
.section-head { text-align: center; margin-bottom: 30px; }
.section-head h2 { font-size: 26px; font-weight: 800; color: #1e3a8a; margin-bottom: 8px; }
.section-head p { font-size: 15px; color: #6b7280; }

/* ---- CARD GRIDS ---- */
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 16px; }
.card { background: #fff; border: 2px solid #dbeafe; border-radius: 12px; padding: 20px; }
.card-icon { font-size: 26px; margin-bottom: 10px; }
.card h3 { font-size: 15px; font-weight: 800; color: #1e3a8a; margin-bottom: 7px; }
.card p { font-size: 13px; color: #4b5563; line-height: 1.55; }

/* ---- STEPS ---- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.step { text-align: center; padding: 20px 14px; }
.step-num {
  width: 44px; height: 44px; background: #1d4ed8; color: #fff; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 18px; margin: 0 auto 12px;
}
.step h3 { font-size: 14px; font-weight: 800; color: #1e3a8a; margin-bottom: 7px; }
.step p { font-size: 13px; color: #6b7280; line-height: 1.5; }

/* ---- CALCULATOR ---- */
.calc-outer { max-width: 640px; margin: 0 auto; }
.calc-card {
  background: #fff; border: 2px solid #1d4ed8;
  border-radius: 16px; padding: 28px;
}
.field-group {
  font-size: 12px; font-weight: 800; color: #1e3a8a;
  text-transform: uppercase; letter-spacing: .6px;
  margin-bottom: 16px; padding-bottom: 8px;
  border-bottom: 2px solid #dbeafe;
}
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; font-weight: 700; color: #1e3a8a; margin-bottom: 5px; }
.field .hint { font-size: 12px; color: #9ca3af; margin-bottom: 6px; }

/* FIX: pound sign prefix without overlap */
.input-prefix-wrap { display: flex; align-items: center; border: 2px solid #dbeafe; border-radius: 8px; background: #f0f9ff; overflow: hidden; }
.input-prefix-wrap:focus-within { border-color: #1d4ed8; }
.input-prefix { padding: 0 10px 0 12px; font-size: 15px; color: #6b7280; font-weight: 600; flex-shrink: 0; line-height: 1; }
.input-prefix-wrap input {
  border: none; background: transparent; padding: 10px 12px 10px 0;
  font-size: 15px; color: #1e3a8a; width: 100%; outline: none;
}
.input-prefix-wrap input::placeholder { color: #9ca3af; }

.exp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.btn-calc {
  width: 100%; padding: 14px; background: #1d4ed8; color: #fff;
  border: none; border-radius: 8px; font-size: 16px; font-weight: 800;
  cursor: pointer; margin-top: 10px;
}
.btn-calc:hover { background: #1e3a8a; }

/* RESULTS */
.res-banner {
  background: #dcfce7; border: 2px solid #16a34a;
  border-radius: 12px; padding: 24px; text-align: center; margin-bottom: 20px;
}
.res-banner.neg { background: #fee2e2; border-color: #dc2626; }
.res-label { font-size: 13px; font-weight: 700; color: #15803d; margin-bottom: 6px; }
.res-label.neg { color: #dc2626; }
.res-amt { font-size: 42px; font-weight: 900; color: #166534; }
.res-amt.neg { color: #991b1b; }
.res-note { font-size: 12px; color: #16a34a; margin-top: 6px; }
.res-note.neg { color: #dc2626; }
.breakdown { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.bc { background: #f0f9ff; border-radius: 8px; padding: 12px; }
.bc-lbl { font-size: 11px; color: #6b7280; margin-bottom: 4px; }
.bc-val { font-size: 17px; font-weight: 800; color: #1e3a8a; }
.bc-val.g { color: #15803d; }
.bc-val.r { color: #dc2626; }
.tips-box {
  background: #fff7ed; border: 2px solid #f59e0b;
  border-radius: 10px; padding: 16px; margin-bottom: 16px;
}
.tips-box h3 { font-size: 13px; font-weight: 800; color: #92400e; margin-bottom: 10px; }
.tip { font-size: 13px; color: #78350f; padding: 5px 0; border-bottom: 1px solid #fde68a; display: flex; gap: 8px; }
.tip:last-child { border-bottom: none; }
.btn-row { display: flex; gap: 10px; }
.btn-sec {
  flex: 1; padding: 10px; background: #fff;
  border: 2px solid #1d4ed8; color: #1d4ed8;
  border-radius: 8px; font-size: 13px; font-weight: 700; cursor: pointer;
}
.btn-sec:hover { background: #eff6ff; }
.disc { font-size: 11px; color: #9ca3af; margin-top: 14px; line-height: 1.6; }
.hidden { display: none; }

/* ---- FAQ ---- */
.faq-item { border: 2px solid #dbeafe; border-radius: 10px; margin-bottom: 12px; overflow: hidden; }
.faq-q {
  padding: 15px 18px; font-size: 14px; font-weight: 700; color: #1e3a8a;
  cursor: pointer; background: #eff6ff;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq-q:hover { background: #dbeafe; }
.faq-a { padding: 14px 18px; font-size: 13px; color: #374151; line-height: 1.7; display: none; background: #fff; }
.faq-a.open { display: block; }

/* ---- CONTACT ---- */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 28px; }
.contact-box { background: #eff6ff; border: 2px solid #dbeafe; border-radius: 12px; padding: 20px; text-align: center; }
.contact-box h3 { font-size: 14px; font-weight: 700; color: #1e3a8a; margin-bottom: 7px; }
.contact-box a, .contact-box p { color: #1d4ed8; font-size: 14px; }
.form-wrap { background: #fff; border: 2px solid #dbeafe; border-radius: 12px; padding: 26px; max-width: 560px; margin: 0 auto; }
.form-wrap h2 { font-size: 20px; font-weight: 800; color: #1e3a8a; margin-bottom: 20px; }
.ff { margin-bottom: 14px; }
.ff label { display: block; font-size: 13px; font-weight: 700; color: #1e3a8a; margin-bottom: 5px; }
.ff input, .ff textarea, .ff select {
  width: 100%; padding: 10px 12px;
  border: 2px solid #dbeafe; border-radius: 8px;
  font-size: 14px; background: #f0f9ff; color: #1e3a8a;
}
.ff input:focus, .ff textarea:focus { outline: none; border-color: #1d4ed8; }
.ff textarea { height: 100px; resize: vertical; }
.btn-send { background: #1d4ed8; color: #fff; padding: 12px 28px; border: none; border-radius: 8px; font-size: 14px; font-weight: 700; cursor: pointer; }
.btn-send:hover { background: #1e3a8a; }

/* ---- FOOTER ---- */
footer { background: #1e3a8a; color: #fff; padding: 40px 20px 20px; }
.footer-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 24px; max-width: 900px; margin: 0 auto 28px;
}
.footer-col h4 { font-size: 12px; font-weight: 700; color: #93c5fd; margin-bottom: 12px; text-transform: uppercase; letter-spacing: .5px; }
.footer-col a { display: block; color: #bfdbfe; font-size: 13px; margin-bottom: 8px; }
.footer-col a:hover { color: #fff; }
.footer-col p { font-size: 13px; color: #bfdbfe; line-height: 1.6; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.15); padding-top: 18px; text-align: center; font-size: 11px; color: #93c5fd; max-width: 900px; margin: 0 auto; }

/* ---- ABOUT ---- */
.about-intro { font-size: 15px; color: #374151; line-height: 1.75; max-width: 680px; margin: 0 auto 32px; text-align: center; }

/* ---- RESPONSIVE ---- */
@media (max-width: 540px) {
  .hero h1 { font-size: 24px; }
  .nav-links a { padding: 6px 8px; font-size: 12px; }
  .exp-grid { grid-template-columns: 1fr; }
  .breakdown { grid-template-columns: 1fr; }
  .btn-row { flex-direction: column; }
  .contact-grid { grid-template-columns: 1fr; }
}
