/* ========== BASE RESET ========== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: #111827;
  background: #f3f4f7;
}

/* ========== LINKS & TEXT ========== */
a {
  color: #0056d6;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

p {
  margin: 0 0 0.75rem;
}

ul {
  margin: 0 0 0.75rem 1.25rem;
}

/* ========== LAYOUT WRAPPER & CARDS ========== */
.page-wrapper {
  max-width: 1100px;
  margin: 1.2rem auto 2.5rem;
  padding: 0 1.25rem;
}

.page-title {
  margin: 0 0 0.2rem;
  font-size: 1.8rem;
  font-weight: 700;
  color: #111827;
}

.page-subtitle {
  margin: 0 0 1rem;
  color: #4b5563;
  font-size: 0.95rem;
}

.card {
  background: #ffffff;
  border-radius: 12px;
  padding: 1rem 1.15rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 7px rgba(15, 23, 42, 0.08);
}

/* ========== HEADER ========== */
.site-header {
  background: linear-gradient(90deg, #003366, #00509e);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.7rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo-area .brand {
  display: inline-flex;
  flex-direction: column;
  color: #fff;
}

.brand-main {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
}

.brand-sub {
  font-size: 0.8rem;
  opacity: 0.9;
}

/* MAIN NAV */
.main-nav {
  display: flex;
  gap: 1.1rem;
  align-items: center;
  flex-wrap: wrap;
}

.main-nav a {
  color: #e8f0ff;
  font-size: 0.9rem;
  font-weight: 500;
  position: relative;
  padding-bottom: 0.1rem;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.2rem;
  width: 0;
  height: 2px;
  background: #ffcc33;
  transition: width 0.2s ease;
}

.main-nav a:hover::after,
.main-nav a:focus::after {
  width: 100%;
}

/* HEADER TOOLS / SOCIAL ICONS */
.header-tools {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.social-icon {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 0.9rem;
  transition: background 0.2s ease, transform 0.15s ease;
}

.social-icon:hover {
  background: #ffcc33;
  color: #003366;
  text-decoration: none;
  transform: translateY(-1px);
}

/* Responsive header */
@media (max-width: 900px) {
  .header-inner {
    flex-wrap: wrap;
  }
  .main-nav {
    flex: 1 1 100%;
    justify-content: center;
    order: 3;
  }
}

/* ========== MOSAIC / TILE GRIDS ========== */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 0.5rem;
}

.tile-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 0.9rem 0.95rem;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
  border: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.tile-label {
  display: inline-flex;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  margin-bottom: 0.4rem;
}

.tile-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
  color: #111827;
}

.tile-text {
  font-size: 0.86rem;
  color: #4b5563;
  margin-bottom: 0.6rem;
}

.tile-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: #0056d6;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: auto;
}

.tile-link span {
  font-size: 0.9rem;
}

.tile-link:hover {
  text-decoration: none;
  color: #0042a3;
}

/* Smaller grids for hub pages */
.tile-grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tile-grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 900px) {
  .tile-grid,
  .tile-grid--2,
  .tile-grid--4 {
    grid-template-columns: 1fr;
  }
}

/* ========== GENERIC FORMS ========== */
.input-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 0.6rem;
}

.input-group label {
  font-size: 0.85rem;
  margin-bottom: 0.15rem;
  color: #374151;
}

.text-input,
.number-input,
.select-input,
input[type="email"],
input[type="tel"],
input[type="text"],
input[type="number"],
select,
textarea {
  font-size: 0.9rem;
  padding: 0.35rem 0.5rem;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
  outline: none;
  font-family: inherit;
}

textarea {
  min-height: 90px;
  resize: vertical;
}

.text-input:focus,
.number-input:focus,
.select-input:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="text"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
  border-color: #0056d6;
  box-shadow: 0 0 0 1px rgba(0, 86, 214, 0.25);
}

/* Inputs in two columns */
.input-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

@media (max-width: 700px) {
  .input-row {
    grid-template-columns: 1fr;
  }
}

/* ========== BUTTONS ========== */
.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.45rem 1.1rem;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  text-align: center;
  font-weight: 600;
}

.btn-primary {
  background: #0056d6;
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
  background: #0042a3;
}

.btn-secondary {
  background: #e5e7eb;
  color: #111827;
}

.btn-secondary:hover {
  background: #d1d5db;
}

/* ========== FOOTER & COMPLIANCE ========== */
.site-footer {
  margin-top: 1.2rem;
  padding: 0.8rem 1.25rem 1.1rem;
  border-top: 1px solid #e5e7eb;
  color: #4b5563;
  font-size: 0.83rem;
  background: #f9fafb;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.footer-main {
  margin-bottom: 0.5rem;
}

.footer-main div {
  margin-bottom: 0.15rem;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 0.4rem;
}

.footer-column h4 {
  margin: 0 0 0.3rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #111827;
}

.footer-column a {
  display: block;
  font-size: 0.8rem;
  color: #4b5563;
  margin-bottom: 0.22rem;
}

.footer-column a:hover {
  color: #0056d6;
  text-decoration: none;
}

.footer-social-row {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 0.3rem;
}

.footer-note {
  font-size: 0.77rem;
  color: #6b7280;
}

@media (max-width: 900px) {
  .footer-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .footer-links {
    grid-template-columns: 1fr;
  }
}

/* ========== ACCESSIBILITY ========== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
