/* components.css — Reusable UI: buttons, cards, badges, forms */

/* ── Buttons ── */
.btn-primary {
  background: var(--blue); color: var(--white);
  border: none; border-radius: var(--r);
  padding: 11px 24px; font-family: var(--ff-h);
  font-size: 14px; font-weight: 700;
  transition: background .15s;
}
.btn-primary:hover { background: var(--blue-l); }
.btn-secondary {
  background: transparent; color: var(--blue);
  border: 1.5px solid var(--blue); border-radius: var(--r);
  padding: 10px 22px; font-family: var(--ff-h);
  font-size: 14px; font-weight: 600;
  transition: all .15s;
}
.btn-secondary:hover { background: var(--blue-pale); }
.btn-ghost {
  background: rgba(255,255,255,.1); color: var(--white);
  border: 1.5px solid rgba(255,255,255,.2); border-radius: var(--r);
  padding: 10px 22px; font-size: 14px; font-weight: 500;
  transition: background .15s;
}
.btn-ghost:hover { background: rgba(255,255,255,.18); }

/* ── Badges ── */
.badge { font-size: 10px; font-weight: 700; padding: 2px 9px; border-radius: 20px; font-family: var(--ff-h); letter-spacing: .3px; }
.badge-blue   { background: var(--blue-pale); color: var(--blue-d); }
.badge-active { background: var(--green-bg); color: var(--green); }
.badge-closed { background: var(--red-bg); color: var(--red); }
.badge-soon   { background: var(--green-bg); color: var(--green); }
.badge-dark   { background: var(--blue); color: var(--white); }

/* ── Cards ── */
.card {
  border: 1.5px solid var(--border); border-radius: var(--r-lg);
  padding: 18px; background: var(--white);
  transition: border-color .15s, box-shadow .15s;
}
.card:hover { border-color: var(--blue-border); box-shadow: var(--shadow); }

/* ── Forms ── */
.form-input {
  border: 1.5px solid var(--border); border-radius: var(--r);
  padding: 11px 14px; font-size: 14px; width: 100%;
  background: var(--white); outline: none;
  transition: border-color .15s;
}
.form-input:focus { border-color: var(--blue); }
.form-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234A5C8A' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.form-textarea { resize: vertical; min-height: 90px; }

/* ── Section shared ── */
.section { padding: 52px 24px; }
.section-inner { max-width: var(--max); margin: 0 auto; }
.section-alt { background: var(--off-white); }
.sec-label { font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: 1.2px; text-transform: uppercase; font-family: var(--ff-h); margin-bottom: 10px; }
.sec-title { font-family: var(--ff-h); font-size: clamp(22px,3vw,32px); font-weight: 800; color: var(--blue-d); margin-bottom: 8px; line-height: 1.2; }
.sec-desc  { font-size: 14.5px; color: var(--muted); margin-bottom: 28px; max-width: 580px; line-height: 1.7; }
.divider   { height: 1px; background: var(--border); margin: 0 24px; }

/* ── Flash messages ── */
.flash-success { background: var(--green-bg); border: 1px solid var(--green); color: var(--green); padding: 12px 16px; border-radius: var(--r); font-size: 14px; margin-bottom: 16px; }
.flash-error   { background: var(--red-bg); border: 1px solid var(--red); color: var(--red); padding: 12px 16px; border-radius: var(--r); font-size: 14px; margin-bottom: 16px; }

/* ── Announcements ── */
.ann-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.ann-card {
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--white);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: border-color .15s, box-shadow .15s;
}
.ann-card:hover { border-color: var(--blue-border); box-shadow: var(--shadow); }
.ann-img-wrap { position: relative; flex-shrink: 0; }
.ann-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.ann-top-bar { height: 4px; flex-shrink: 0; }
.ann-body { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.ann-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.ann-type-badge {
  font-size: 10px; font-weight: 700; padding: 2px 9px;
  border-radius: 20px; font-family: var(--ff-h); letter-spacing: .3px;
}
.ann-time { font-size: 11px; color: var(--light); font-family: var(--ff-m); }
.ann-title {
  font-family: var(--ff-h); font-size: 15px; font-weight: 700;
  color: var(--blue-d); line-height: 1.35; margin-bottom: 8px;
}
.ann-card-text {
  font-size: 13px; color: var(--muted); line-height: 1.65; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden;
}
.ann-card-link {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12.5px; font-weight: 600; color: var(--blue);
  font-family: var(--ff-h); margin-top: 12px; padding-top: 12px;
  border-top: 1px solid var(--border);
}
.ann-card-link:hover { color: var(--blue-l); }
.ann-pin {
  position: absolute; top: 10px; right: 10px;
  background: var(--blue-xl); color: #fff;
  border-radius: 7px; width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(8,26,74,.35); z-index: 1;
}
@media (max-width: 900px) {
  .ann-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 580px) {
  .ann-grid { grid-template-columns: 1fr; }
}

/* ── Credentials bar ── */
.cred-bar {
  background: var(--off-white);
  border-bottom: 1.5px solid var(--border);
  padding: 11px 24px;

  display: flex;
  align-items: center;
  justify-content: center;

  gap: 0;
  overflow-x: auto;
}
.cred-bar::-webkit-scrollbar { height: 0; }
.cred-item { display: flex; align-items: center; gap: 8px; padding: 0 22px; border-right: 1px solid var(--border); white-space: nowrap; flex-shrink: 0; }
.cred-item:first-child {
  padding-left: 0;
}
.cred-item:last-child  { border-right: none; }
.cred-dot  { width: 7px; height: 7px; border-radius: 50%; background: var(--green); flex-shrink: 0; }
.cred-name { font-size: 11.5px; font-weight: 700; color: var(--blue-d); font-family: var(--ff-h); }
.cred-num  { font-size: 10.5px; color: var(--muted); }
