/* KHPA - Simple Government Style */

:root{
  --bg: #f3f4f6;
  --surface: #ffffff;
  --ink: #1f2937;
  --muted: #4b5563;
  --line: #d1d5db;
  --brand: #0b3a66;
  --brand2: #0f4c81;
  --btn: #0b3a66;
  --btnText: #ffffff;
  --topbarH: 44px;
}

*{ box-sizing:border-box; }
html, body{ margin:0; padding:0; }
body{
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, "Noto Sans", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  padding-top: var(--topbarH);
}

a{ color: var(--brand2); text-decoration:none; }
a:hover{ text-decoration:underline; }

.container{
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Fixed Top Bar */
.topbar{
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--topbarH);
  background: #fff;
  border-bottom: 1px solid var(--line);
  z-index: 9999;
  display:flex;
  align-items:center;
}
.topbar .container{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
}
.topbar .help{
  font-size: 0.92rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar .actions{
  display:flex;
  gap: 8px;
  flex-wrap: wrap;
}
.btn{
  display:inline-block;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
}
.btn.primary{
  background: var(--btn);
  border-color: var(--btn);
  color: var(--btnText);
}
.btn:hover{ text-decoration:none; opacity:0.95; }

/* Header + Nav */
.header{
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.header .row{
  display:flex;
  align-items:center;
  gap: 14px;
  padding: 18px 0;
}
.header img{
  width: 84px;
  height: auto;
}
.header h1{
  margin:0;
  font-size: 1.6rem;
  color: var(--brand);
}
.header p{
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.nav{
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.nav .container{
  display:flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 16px;
  align-items:center;
}
.nav a{
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--ink);
  font-weight: 700;
}
.nav a.active{
  background: #eef2ff;
  color: var(--brand);
}

/* Dropdown (simple) */
.dropdown{
  position:relative;
}
.dropdown > a{
  cursor: default;
}
.dropdown-menu{
  display:none;
  position:absolute;
  top: 110%;
  left: 0;
  background:#fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 260px;
  padding: 8px;
  z-index: 999;
}
.dropdown-menu a{
  display:block;
  padding: 8px 10px;
  border-radius: 6px;
}
.dropdown:hover .dropdown-menu{ display:block; }

main{
  padding: 18px 0 44px;
}

.card{
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  margin: 12px 0;
}
.card h2, .card h3{
  margin: 0 0 10px;
  color: var(--brand);
}
.meta{ color: var(--muted); margin: 0 0 12px; }

.grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.hr{ border:0; border-top:1px solid var(--line); margin: 14px 0; }

.hero-img{
  width:100%;
  height:auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  display:block;
}

.footer{
  background:#fff;
  border-top:1px solid var(--line);
  padding: 18px 0;
  color: var(--muted);
  font-size: 0.95rem;
  text-align:center;
}

/* Forms */
.form input, .form select, .form textarea{
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  margin: 6px 0 12px;
  font-size: 1rem;
}
.form button{
  padding: 10px 14px;
  border: 1px solid var(--btn);
  background: var(--btn);
  color: #fff;
  border-radius: 8px;
  font-weight: 800;
  cursor:pointer;
}
.form button:hover{ opacity:0.95; }

/* Slider (simple, no heavy effects) */
.slider{
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow:hidden;
  background:#fff;
}
.slides{ display:flex; transition: transform .35s ease; }
.slide{ min-width:100%; background:#f9fafb; }
.slide img{ width:100%; height:auto; display:block; }
.slider-controls{
  display:flex;
  justify-content: space-between;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid var(--line);
}:root{
  --bg:#f6f2ea;
  --paper:#ffffff;
  --border:#d9cfbf;
  --text:#1b1b1b;
  --muted:#555;
  --brand:#5a2b0c;
  --btn:#2a5ea5;         /* simple gov blue */
  --btnText:#fff;
  --btnOutline:#2a5ea5;
  --shadow:0 2px 10px rgba(0,0,0,.06);
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background:var(--bg);
  color:var(--text);
  line-height:1.45;
}

a{color:var(--btnOutline);text-decoration:none}
a:hover{text-decoration:underline}

.site-header{
  position:sticky;
  top:0;
  z-index:50;
  background:var(--paper);
  border-bottom:1px solid var(--border);
}
.header-inner{
  max-width:1100px;
  margin:0 auto;
  padding:.75rem 1rem;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
}
.brand{
  display:flex;
  align-items:center;
  gap:.75rem;
  color:inherit;
}
.brand-logo{
  width:72px;
  height:auto;
  display:block;
}
.brand-title{
  font-weight:800;
  letter-spacing:.2px;
  color:var(--brand);
  font-size:1.15rem;
}
.brand-subtitle{
  font-size:.95rem;
  color:var(--muted);
}
.top-nav{
  display:flex;
  gap:.75rem;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.top-nav a{
  padding:.35rem .45rem;
  border-radius:6px;
}
.top-nav a:hover{
  background:#efe7da;
  text-decoration:none;
}

.page{
  max-width:1100px;
  margin:0 auto;
  padding:1.25rem 1rem 2.5rem;
}
.page-intro{
  margin-top:.25rem;
  margin-bottom:1rem;
}
.page-intro h1{
  margin:.25rem 0 .25rem;
  font-size:1.75rem;
}
.muted{color:var(--muted)}
.small{font-size:.9rem}

.help-banner{
  display:flex;
  gap:1rem;
  justify-content:space-between;
  align-items:center;
  padding:1rem;
  background:var(--paper);
  border:1px solid var(--border);
  border-left:5px solid var(--brand);
  border-radius:10px;
  box-shadow:var(--shadow);
  margin:1rem 0 1.25rem;
}
.help-right{
  display:flex;
  gap:.5rem;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.help-pill{
  display:inline-block;
  padding:.4rem .6rem;
  background:#efe7da;
  border:1px solid var(--border);
  border-radius:999px;
  color:var(--brand);
  font-weight:700;
}

.cards{
  display:grid;
  grid-template-columns: 1fr;
  gap:1rem;
}

.card{
  background:var(--paper);
  border:1px solid var(--border);
  border-radius:12px;
  box-shadow:var(--shadow);
  overflow:hidden;
}
.card-head{
  padding:1rem 1rem .25rem;
}
.card-head h2{
  margin:.25rem 0 .35rem;
  color:var(--brand);
  font-size:1.25rem;
}
.actions{
  display:flex;
  gap:.5rem;
  flex-wrap:wrap;
  margin:.75rem 0 .5rem;
}

.btn{
  display:inline-block;
  border:1px solid var(--btn);
  background:var(--btn);
  color:var(--btnText);
  padding:.55rem .8rem;
  border-radius:8px;
  font-weight:800;
  cursor:pointer;
}
.btn:hover{filter:brightness(.97);text-decoration:none}
.btn-outline{
  background:transparent;
  color:var(--btnOutline);
}
.btn-outline:hover{
  background:#eaf1fb;
}

.form{
  border-top:1px solid var(--border);
  padding:1rem;
}
.grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:.75rem;
}
label{
  display:block;
  font-weight:700;
  font-size:.95rem;
}
input, select, textarea{
  width:100%;
  margin-top:.35rem;
  padding:.6rem .65rem;
  border:1px solid #cdbfae;
  border-radius:8px;
  background:#fff;
  font-size:1rem;
}
.span-2{grid-column: span 2}
.form-footer{
  display:flex;
  gap:1rem;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  margin-top:1rem;
  padding-top:.75rem;
  border-top:1px solid var(--border);
}

.modal{
  position:fixed;
  inset:0;
  display:none;
}
.modal[aria-hidden="false"]{display:block}
.modal-backdrop{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.5);
}
.modal-panel{
  position:relative;
  width:min(1000px, 92vw);
  height:min(80vh, 720px);
  margin:6vh auto 0;
  background:#fff;
  border-radius:12px;
  overflow:hidden;
  box-shadow:0 20px 60px rgba(0,0,0,.25);
  border:1px solid rgba(255,255,255,.2);
}
.modal-bar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  padding:.75rem 1rem;
  background:#f2f2f2;
  border-bottom:1px solid #ddd;
}
.modal-title{font-weight:900}
.modal-close{
  border:1px solid #999;
  background:#fff;
  padding:.45rem .65rem;
  border-radius:8px;
  cursor:pointer;
}
#modalFrame{
  width:100%;
  height:calc(100% - 54px);
  border:0;
}

body.modal-open{overflow:hidden}

/* Mobile */
@media (max-width: 760px){
  .header-inner{flex-direction:column; align-items:flex-start}
  .top-nav{justify-content:flex-start}
  .grid{grid-template-columns:1fr}
  .span-2{grid-column:auto}
  .help-banner{flex-direction:column; align-items:flex-start}
  .modal-panel{height:82vh; margin:5vh auto 0}
}
