/* ==========================================================================
   Texas RE Course Directory - shared stylesheet
   ========================================================================== */

:root {
  --color-navy: #0f1e3c;
  --color-navy-light: #16284f;
  --color-blue: #1d5fd6;
  --color-blue-dark: #134a9c;
  --color-green: #1a8a4a;
  --color-amber-bg: #fff6e0;
  --color-amber-border: #f0c330;
  --color-amber-text: #7a5b00;
  --color-text: #1f2937;
  --color-muted: #5b6474;
  --color-border: #e2e6ec;
  --color-bg-alt: #f6f8fb;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--color-text);
  background: #ffffff;
  line-height: 1.55;
}

a { color: var(--color-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---- Placeholder-data banner ------------------------------------------- */
.placeholder-banner {
  background: var(--color-amber-bg);
  border-bottom: 1px solid var(--color-amber-border);
  color: var(--color-amber-text);
  font-size: 14px;
  text-align: center;
  padding: 10px 16px;
}
.placeholder-banner strong { font-weight: 700; }

/* Inline placeholder value styling */
.ph {
  background: var(--color-amber-bg);
  border: 1px dashed var(--color-amber-border);
  color: var(--color-amber-text);
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
  white-space: nowrap;
}

/* ---- Header / nav -------------------------------------------------------*/
header.site-header {
  border-bottom: 1px solid var(--color-border);
  background: #ffffff;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  position: relative;
}
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-navy);
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
  color: var(--color-navy);
}
.brand .brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--color-blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}
.brand small {
  display: block;
  font-weight: 400;
  font-size: 11px;
  color: var(--color-muted);
}
nav.main-nav {
  display: flex;
  gap: 24px;
  font-size: 14px;
  font-weight: 600;
}
nav.main-nav a { color: var(--color-text); }

/* ---- Hero ---------------------------------------------------------------*/
.hero {
  background: linear-gradient(135deg, var(--color-navy) 0%, #1b3566 100%);
  color: #fff;
  padding: 56px 0 44px;
}
.hero h1 { font-size: 34px; margin: 0 0 12px; }
.hero p.lead { font-size: 17px; color: #cfd8ec; max-width: 680px; margin: 0 0 22px; }
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-top: 28px;
}
.hero-stats .stat-num { font-size: 26px; font-weight: 800; }
.hero-stats .stat-label { font-size: 12px; color: #b9c4dd; text-transform: uppercase; letter-spacing: .04em; }
.badge-sponsored {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.25);
  color: #fff;
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}

/* ---- Sections ------------------------------------------------------------*/
section { padding: 48px 0; }
section.alt { background: var(--color-bg-alt); }
h2.section-title { font-size: 24px; margin: 0 0 8px; color: var(--color-navy); }
p.section-sub { color: var(--color-muted); margin: 0 0 28px; max-width: 700px; }

/* ---- Directory table -----------------------------------------------------*/
table.directory {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}
table.directory th, table.directory td {
  padding: 14px 14px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  font-size: 14px;
}
table.directory th {
  background: var(--color-bg-alt);
  cursor: pointer;
  user-select: none;
  font-weight: 700;
  color: var(--color-navy);
  white-space: nowrap;
}
table.directory th.sortable:after { content: " \2195"; color: #9aa4b2; font-size: 11px; }
table.directory tr.row-champions { background: #eef4ff; }
table.directory tr:last-child td { border-bottom: none; }
.provider-cell { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 8px;
}
.tag-sponsor { background: #dbe8ff; color: var(--color-blue-dark, #134a9c); }
.tag-probation { background: #ffe1e1; color: #a51d1d; }

/* ---- Cards ---------------------------------------------------------------*/
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
}
.card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px;
}
.card h3 { margin: 0 0 8px; font-size: 16px; color: var(--color-navy); }
.card p { margin: 0; color: var(--color-muted); font-size: 14px; }

/* ---- Provider detail page --------------------------------------------- */
.provider-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 24px;
}
.stat-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin: 24px 0;
  padding: 18px 20px;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}
.stat-strip .s-num { font-size: 20px; font-weight: 800; color: var(--color-navy); }
.stat-strip .s-label { font-size: 12px; color: var(--color-muted); }

.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.pros-cons .col { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius); padding: 18px 20px; }
.pros-cons .col.pros { border-top: 4px solid var(--color-green); }
.pros-cons .col.cons { border-top: 4px solid #c0392b; }
.pros-cons h4 { margin: 0 0 10px; }
.pros-cons ul { margin: 0; padding-left: 20px; }
.pros-cons li { margin-bottom: 6px; font-size: 14px; }

.cta-box {
  background: var(--color-navy);
  color: #fff;
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  margin-top: 10px;
}
.cta-box h3 { margin: 0 0 10px; font-size: 20px; }
.cta-box p { color: #cfd8ec; margin: 0 0 18px; }
.btn {
  display: inline-block;
  background: var(--color-blue);
  color: #fff;
  font-weight: 700;
  padding: 11px 22px;
  border-radius: 8px;
  font-size: 14px;
}
.btn:hover { background: #1550b5; text-decoration: none; }
.btn-outline {
  display: inline-block;
  border: 1px solid rgba(255,255,255,.4);
  color: #fff;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  margin-left: 10px;
}

/* ---- Disclosure callout ---------------------------------------------- */
.disclosure-box {
  background: #eef4ff;
  border: 1px solid #c6d9fb;
  border-radius: var(--radius);
  padding: 18px 20px;
  font-size: 14px;
  color: #1a3c76;
}
.disclosure-box a { font-weight: 700; }

/* ---- Footer ------------------------------------------------------------*/
footer.site-footer {
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  padding: 40px 0 28px;
  font-size: 13px;
  color: var(--color-muted);
}
footer.site-footer .cols {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}
footer.site-footer h4 { color: var(--color-navy); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; margin: 0 0 10px; }
footer.site-footer ul { list-style: none; margin: 0; padding: 0; }
footer.site-footer li { margin-bottom: 6px; }
.fine-print { border-top: 1px solid var(--color-border); padding-top: 16px; }

/* ---- FAQ ---------------------------------------------------------------*/
.faq-item { border-bottom: 1px solid var(--color-border); padding: 16px 0; }
.faq-item h4 { margin: 0 0 8px; color: var(--color-navy); }
.faq-item p { margin: 0; color: var(--color-muted); }

/* ---- Misc ---------------------------------------------------------------*/
.citation { font-size: 12px; color: var(--color-muted); }
.mt-0 { margin-top: 0; }

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  nav.main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 8px 16px rgba(15, 30, 60, 0.08);
  }
  nav.main-nav.is-open { display: flex; }
  nav.main-nav a {
    padding: 14px 20px;
    border-top: 1px solid var(--color-border);
  }
  .pros-cons { grid-template-columns: 1fr; }
  footer.site-footer .cols { grid-template-columns: 1fr; }
}
