/* ==========================================================================
   Header / Footer / How-To / FAQ — कृतिदेव यूनिकोड कन्वर्टर
   Brand tones reused from color.css: #DC3545 → #B22519 (red), #743434 (maroon),
   #a00000 (accent), #e6f7ff (light panel)
   ========================================================================== */

:root{
  --kd-red-1:#DC3545;
  --kd-red-2:#B22519;
  --kd-maroon:#5a2424;
  --kd-maroon-dark:#3a1717;
  --kd-accent:#a00000;
  --kd-cream:#fbf4ee;
  --kd-ink:#2b1c1c;
}

/* ---------- Site header ---------- */
.kd-header{
  background-image: linear-gradient(100deg, var(--kd-red-1), var(--kd-red-2));
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
  position: sticky;
  top: 0;
  z-index: 50;
}
.kd-header-inner{
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  gap: 16px;
  flex-wrap: wrap;
}
.kd-logo{
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
}
.kd-logo-mark{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.16);
  border: 1.5px solid rgba(255,255,255,.55);
  font-family: "Noto Sans Devanagari", "Mangal", arial, sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: #fff;
  flex-shrink: 0;
}
.kd-logo-text{
  font-weight: 700;
  font-size: 17px;
  text-shadow: 0 1px 0 rgba(0,0,0,.35);
  white-space: nowrap;
}
.kd-logo-text em{
  font-style: normal;
  font-weight: 400;
  opacity: .85;
}
.kd-nav{
  display: flex;
  gap: 22px;
}
.kd-nav a{
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: border-color .15s ease, opacity .15s ease;
  opacity: .92;
}
.kd-nav a:hover,
.kd-nav a:focus-visible{
  border-bottom-color: rgba(255,255,255,.85);
  opacity: 1;
}

/* ---------- Hamburger (mobile nav toggle) ---------- */
.kd-hamburger{
  display: none;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 5px;
  color: #fff;
  font-size: 18px;
  width: 38px;
  height: 34px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.kd-hamburger:focus-visible{
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* ---------- Placeholder text centred inside the boxes ---------- */
#legacy_text::placeholder,
#unicode_text::placeholder{
  text-align: center;
  color: #9a8b8b;
  opacity: .85;
}

/* ---------- Subhead under H1 ---------- */
.kd-subhead{
  color: #fce9e9;
  font-size: 14px;
  margin: -6px 0 12px 0;
  font-weight: 400;
}

/* ---------- How-to steps ---------- */
.kd-section{
  max-width: 900px;
  margin: 36px auto 0;
  padding: 0 20px;
}
.kd-section h2{
  font-size: 21px;
  font-weight: 700;
  color: var(--kd-ink);
  border-left: 5px solid var(--kd-accent);
  padding-left: 12px;
  margin-bottom: 14px;
}
.kd-steps{
  list-style: none;
  counter-reset: kd-step;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}
.kd-steps li{
  counter-increment: kd-step;
  position: relative;
  background: var(--kd-cream);
  border: 1px solid #ecd9d9;
  border-radius: 6px;
  padding: 12px 16px 12px 52px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--kd-ink);
}
.kd-steps li::before{
  content: counter(kd-step);
  position: absolute;
  left: 12px;
  top: 10px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background-image: linear-gradient(var(--kd-red-1), var(--kd-red-2));
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- FAQ (fan-out friendly: one question = one self-contained answer) ---------- */
.kd-faq{
  max-width: 900px;
  margin: 36px auto 48px;
  padding: 0 20px;
}
.kd-faq h2{
  font-size: 21px;
  font-weight: 700;
  color: var(--kd-ink);
  border-left: 5px solid var(--kd-accent);
  padding-left: 12px;
  margin-bottom: 16px;
}
.kd-faq-item{
  border: 1px solid #e7d3d3;
  border-radius: 6px;
  padding: 14px 18px;
  margin-bottom: 10px;
  background: #fff;
}
.kd-faq-item h3{
  font-size: 16px;
  font-weight: 700;
  color: var(--kd-accent);
  margin: 0 0 6px 0;
}
.kd-faq-item p{
  font-size: 14.5px;
  line-height: 1.65;
  color: #3a2a2a;
  margin: 0;
}

/* ---------- Footer ---------- */
.kd-footer{
  background: linear-gradient(180deg, var(--kd-maroon), var(--kd-maroon-dark));
  color: #f2e4e4;
  margin-top: 30px;
}
.kd-footer-inner{
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.4fr;
  gap: 28px;
  padding: 36px 20px 24px;
}
.kd-footer-heading{
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 10px 0;
}
.kd-footer-col p{
  font-size: 13.5px;
  line-height: 1.6;
  color: #e6cfcf;
  margin: 0;
}
.kd-footer-links{
  list-style: none;
  padding: 0;
  margin: 0;
}
.kd-footer-links li + li{ margin-top: 8px; }
.kd-footer-links a{
  color: #f2e4e4;
  text-decoration: none;
  font-size: 13.5px;
}
.kd-footer-links a:hover{ text-decoration: underline; }
.kd-footer-bottom{
  border-top: 1px solid rgba(255,255,255,.12);
  text-align: center;
  padding: 14px 20px;
}
.kd-footer-bottom p{
  margin: 0;
  font-size: 12.5px;
  color: #d9bcbc;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px){
  .kd-header-inner{
    flex-wrap: wrap;
    justify-content: space-between;
    text-align: left;
  }
  .kd-hamburger{ display: flex; }

  .kd-nav{
    flex-basis: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    width: 100%;
    transition: max-height .25s ease;
    margin-top: 0;
  }
  .kd-nav.kd-nav-open{
    max-height: 240px;
    margin-top: 8px;
  }
  .kd-nav a{
    width: 100%;
    padding: 11px 4px;
    border-bottom: 1px solid rgba(255,255,255,.18);
  }

  .kd-section,
  .kd-faq{
    margin-top: 26px;
    padding: 0 14px;
  }
  .kd-section h2,
  .kd-faq h2{
    font-size: 18px;
  }
  .kd-faq-item{ padding: 12px 14px; }

  .kd-footer-inner{
    grid-template-columns: 1fr;
    text-align: center;
    gap: 22px;
    padding: 28px 18px 18px;
  }
}

@media (max-width: 420px){
  .kd-logo-text{ font-size: 15px; }
  .kd-logo-mark{ width: 30px; height: 30px; font-size: 15px; }
  #legacy_text, #unicode_text{ font-size: 17px !important; }
}
