/*
Theme Name: Percent Off Calculator
Author: Soft hub
Description: A free calculator hub theme built around the Percentage Off Calculator, with 127 calculators in four categories — financial, fitness & health, math and everyday — each on its own page with a full description. Original design and code by Soft hub.
Version: 3.5
*/

/* Percent Off Calculator — style.css (original design, calculator-directory style) */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: Arial, Helvetica, sans-serif; background: #f2f4f7; color: #222; line-height: 1.55; }
a { color: #1f4e79; text-decoration: none; }
a:hover { text-decoration: underline; }

header.site-header { background: #1f4e79; color: #fff; padding: 18px 24px; }
header.site-header .logo { font-size: 28px; font-weight: bold; color: #fff; }
header.site-header .logo span { color: #9dc3e6; }
header.site-header p.tagline { color: #cfe0f1; font-size: 14px; margin-top: 2px; }
nav.top-nav { background: #163a5c; padding: 8px 24px; }
nav.top-nav a { color: #dcebf7; margin-right: 18px; font-size: 14px; }

.layout { display: flex; gap: 22px; max-width: 1180px; margin: 22px auto; padding: 0 16px; align-items: flex-start; }
aside.sidebar { width: 260px; flex: 0 0 260px; background: #fff; border: 1px solid #dde3ea; border-radius: 8px; padding: 16px 18px; position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; }
aside.sidebar h2 { font-size: 16px; color: #1f4e79; border-bottom: 2px solid #1f4e79; padding-bottom: 6px; margin: 14px 0 8px; }
aside.sidebar h2:first-child { margin-top: 0; }
aside.sidebar ul { list-style: none; }
aside.sidebar li { margin: 5px 0; font-size: 14px; }
main.content { flex: 1; min-width: 0; }

h1 { font-size: 26px; color: #1f4e79; margin-bottom: 6px; }
.page-intro { color: #444; margin-bottom: 18px; }
h2 { font-size: 20px; color: #1f4e79; margin-bottom: 6px; }
h3 { font-size: 16px; color: #1f4e79; margin: 14px 0 6px; }

.calc-card, .info-card { background: #fff; border: 1px solid #dde3ea; border-radius: 8px; padding: 20px 22px; margin-bottom: 20px; }
.calc-card p.intro, .info-card p { color: #444; font-size: 15px; margin-bottom: 12px; }
.hero-card { border-top: 5px solid #1f4e79; }

.form-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 12px; }
label.field { display: flex; flex-direction: column; font-size: 13px; font-weight: bold; color: #333; gap: 4px; }
input[type="number"], input[type="text"], select, textarea {
  padding: 9px 10px; border: 1px solid #b9c6d4; border-radius: 5px; font-size: 15px; width: 160px; background: #fff;
}
textarea { width: 100%; min-height: 64px; resize: vertical; }
input.small { width: 90px; }
button.calc-btn {
  background: #1f4e79; color: #fff; border: none; border-radius: 5px;
  padding: 10px 22px; font-size: 15px; cursor: pointer;
}
button.calc-btn:hover { background: #2a649c; }
.result { background: #eef4fb; border: 1px solid #c9dcef; border-radius: 5px; padding: 10px 14px; font-size: 15px; min-height: 20px; }
.result:empty { display: none; }
.formula { font-size: 13px; color: #666; margin-top: 10px; font-style: italic; }
.err { color: #b00020; }
.note { font-size: 13px; color: #666; margin-top: 8px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 14px; }
.chip { background: #eef4fb; border: 1px solid #1f4e79; color: #1f4e79; border-radius: 20px; padding: 6px 14px; font-size: 13.5px; cursor: pointer; }
.chip:hover { background: #1f4e79; color: #fff; }

table { border-collapse: collapse; width: 100%; margin: 10px 0; font-size: 14.5px; }
th, td { border: 1px solid #d5dde6; padding: 7px 10px; text-align: left; }
th { background: #1f4e79; color: #fff; }
tr:nth-child(even) td { background: #f5f8fb; }

ol.steps, ul.plain { margin: 8px 0 8px 22px; }
ol.steps li, ul.plain li { margin: 4px 0; }
.faq-item { margin-bottom: 12px; }
.faq-item h3 { margin-bottom: 2px; }

footer.site-footer { background: #163a5c; color: #cfe0f1; padding: 24px; margin-top: 10px; }
footer.site-footer .foot-cols { max-width: 1180px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 28px; }
footer.site-footer h2 { color: #fff; font-size: 15px; margin-bottom: 8px; }
footer.site-footer ul { list-style: none; font-size: 13.5px; }
footer.site-footer a { color: #cfe0f1; }
footer.site-footer .disclaimer { max-width: 1180px; margin: 18px auto 0; font-size: 12.5px; color: #9db8d2; }

@media (max-width: 860px) {
  .layout { flex-direction: column; }
  aside.sidebar { width: 100%; flex: none; position: static; order: 2; }
  main.content { order: 1; width: 100%; }
  input[type="number"], input[type="text"], select { width: 100%; }
  label.field { flex: 1 1 140px; }
}

.cat-band { background: #1f4e79; color: #fff; border-radius: 8px; padding: 16px 22px; margin: 28px 0 20px; }
.cat-band h2 { margin: 0 0 4px; font-size: 22px; color: #fff; }
.cat-band p { margin: 0; color: #cfe0f1; font-size: 14.5px; }
.sidebar li.side-cat { list-style: none; font-weight: bold; background: #eef4fb; border-radius: 5px; padding: 5px 9px; margin: 12px 0 5px; font-size: 14px; }
.sidebar li.side-cat a { color: #1f4e79; text-decoration: none; }

.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-bottom: 10px; }
.hub-card { display: block; background: #fff; border: 1px solid #dde3ea; border-radius: 8px; padding: 13px 15px; text-decoration: none; }
.hub-card strong { display: block; color: #1f4e79; font-size: 15.5px; margin-bottom: 3px; }
.hub-card span { display: block; color: #555; font-size: 13.5px; line-height: 1.45; }
.hub-card:hover { border-color: #1f4e79; background: #eef4fb; }
.page-title { font-size: 26px; color: #163a5c; margin: 2px 0 14px; }
.page-desc { background: #fff; border: 1px solid #dde3ea; border-radius: 8px; padding: 6px 22px 14px; margin-bottom: 20px; }
.page-desc h2 { color: #1f4e79; font-size: 19px; margin: 16px 0 6px; }
.page-desc p, .page-desc li { color: #444; font-size: 15px; }

.sci { max-width: 580px; }
.sci-display-wrap { position: relative; background: #1f4e79; border-radius: 6px; padding: 12px 14px; margin-bottom: 10px; }
#sci-display { width: 100%; background: transparent; border: none; outline: none; color: #fff; font-size: 26px; text-align: right; font-family: 'Courier New', monospace; }
.sci-mem { position: absolute; left: 12px; top: 6px; color: #ffd966; font-size: 12px; font-weight: bold; }
.sci-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 5px; }
.sci-btn { padding: 9px 0; font-size: 13.5px; background: #dbe5f1; border: 1px solid #b9c6d4; border-radius: 5px; cursor: pointer; color: #163a5c; }
.sci-btn:hover { background: #bcd2ec; }
.sci-btn.sci-eq { background: #1f4e79; color: #fff; font-weight: bold; }
.sci-btn.sci-eq:hover { background: #2a649c; }
.sci-toggle { grid-column: span 2; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; color: #163a5c; background: #eef4fb; border: 1px solid #b9c6d4; border-radius: 5px; }
@media (max-width: 640px) { .sci-btn { font-size: 11.5px; padding: 8px 0; } #sci-display { font-size: 21px; } }
