*{box-sizing:border-box}
body{margin:0;background:#f7f9ff;color:#1f2a44;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;line-height:1.6}
.container{max-width:1000px;margin:0 auto;padding:20px}

.site-header {
  background: #fff;        /* full-width background */
  border-bottom: 1px solid #e6ecff;
  display: flex;
  justify-content: center; /* center inner content */
  padding: 10px 0;         /* vertical padding only */
  flex-direction: column;   /* stack top-row + search bar */
}

.site-header .header-inner {
  width: 100%;
  max-width: 1000px;       /* match body container */
  padding: 0 20px;          /* same left/right spacing as body */
  display: flex;
  flex-direction: column;   /* stack top-row + search bar */
  margin: 0 auto;            /* center horizontally */
  gap: 8px;
}


/* Row for brand + nav */
.site-header .top-row {
  display: flex;
  justify-content: space-between; /* brand left, nav right */
  align-items: center;
  margin-bottom: 8px;
}
/* Keep nav inline, right aligned */
.site-header nav {
  display: flex;
  gap: 12px;
}
/* Search bar row, right aligned */
.site-header .search-form {
  display: flex;
  justify-content: flex-end; /* push search bar right */
  align-items: center;
  gap: 6px;
  width: 100%;
}

.site-header .brand{font-weight:800;color:#3a7bd5;text-decoration:none;margin-right:16px}
.site-header nav a{margin-right:12px;color:#466; text-decoration:none}
.site-footer{border-top:1px solid #e6ecff;background:#fff;margin-top:40px}
.page-title{color:#3a7bd5}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:16px}
.card{background:#fff;border:1px solid #e6ecff;border-radius:16px;padding:16px;display:block;text-decoration:none;color:inherit;box-shadow:0 1px 0 rgba(0,0,0,.02)}
.card:hover{transform:translateY(-1px)}
.form{display:grid;gap:10px;max-width:700px}
.form input, .form textarea{width:100%;padding:10px;border-radius:8px;border:1px solid #ccd6f6;background:#fff}
.form button{padding:10px 14px;border-radius:10px;border:0;background:#3a7bd5;color:#fff;cursor:pointer}
.form button.danger{background:#dc3545}
.form .secondary{padding:10px 14px;border-radius:10px;border:1px solid #ccd6f6;background:#fff;color:#1f2a44;text-decoration:none}
.row{display:flex;align-items:center}
.row.between{justify-content:space-between}
.row.gap{gap:10px}
.article h1{color:#3a7bd5}
.article h2{color:#ffb703}
.article p{margin:.75rem 0}
.error{color:#dc3545}
/* Search form in header */
/* .search-form {
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
} */

.search-form input[type="text"] {
  padding: 8px 10px;
  border-radius: 20px;
  border: 1px solid #ccd6f6;
  background: #fff;
  font-size: 14px;
  width: 160px;
  transition: width 0.3s ease, opacity 0.3s ease;
}

.search-form input[type="text"]:focus {
  outline: none;
  width: 220px;
  border-color: #3a7bd5;
}

.search-form button {
  border: 0;
  background: #3a7bd5;
  color: #fff;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: background 0.2s ease;
}

.search-form button:hover {
  background: #2f65b3;
}

/* Mobile view: hide input until active */
@media (max-width: 600px) {
  /* Stack nav under brand */
  .site-header .top-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .site-header nav {
    flex-wrap: wrap;
    gap: 8px;
  }

  /* Make search input full width below nav */
  .search-form {
    justify-content: flex-start; /* align left for mobile */
    margin-top: 8px;
    width: 100%;
  }

  /* .search-form input[type="text"] {
    width: 100%;
    opacity: 1;
    padding: 10px 14px;
    border: 1px solid #ccd6f6;
  } */

  .search-form button {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }


  .search-form input[type="text"] {
    width: 0;
    opacity: 0;
    padding: 0;
    border: none;
    pointer-events: none;
  }

  .search-form input[type="text"].active {
    width: 160px;
    opacity: 1;
    padding: 8px 10px;
    border: 1px solid #ccd6f6;
    pointer-events: auto;
  }
}

