/*
   TSMCEmployeeHousingGuide.com — Styles
   Presented by Dominion Group Properties | dgpaz.com | (480) 703-7990
   Mobile-first, 320px minimum
   ─────────────────────────────────────────────────────────
*/

/* ═══════════ RESET & BASE ═══════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: Georgia, 'Times New Roman', serif;
  background: #fafaf8;
  color: #1a1a1a;
  line-height: 1.7;
  min-width: 320px;
}
a { color: #1a5276; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { padding-left: 1.4em; }
a, button { touch-action: manipulation; }

/* ═══════════ STICKY NAV ═══════════ */
.site-nav {
  position: sticky; top: 0; z-index: 100;
  background: #1a2744;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; height: 52px;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.nav-brand {
  font-family: Georgia, serif; font-size: .82rem; font-weight: 700;
  color: #fff; white-space: nowrap; flex-shrink: 0;
  line-height: 1.25; max-width: 220px;
}
.nav-brand span { display: block; font-size: .65rem; font-weight: 400; color: #a8bcd4; }
.nav-cta {
  background: #c9973a; color: #fff; border: none; border-radius: 4px;
  font-family: Georgia, serif; font-size: .78rem; font-weight: 700;
  padding: 8px 14px; white-space: nowrap; cursor: pointer; flex-shrink: 0;
  text-decoration: none; display: inline-block; min-height: 36px;
}
.nav-cta:hover { background: #b5872f; text-decoration: none; }

/* ═══════════ HERO ═══════════ */
.site-hero {
  background: linear-gradient(135deg, #1a2744 0%, #2c4a7a 50%, #1a3a5c 100%);
  padding: 48px 20px 40px;
  text-align: center; position: relative; overflow: hidden;
}
.site-hero::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-kicker {
  font-size: .78rem; letter-spacing: .12em; text-transform: uppercase;
  color: #c9973a; font-weight: 700; margin-bottom: 12px; position: relative;
}
.hero-title {
  font-size: 1.7rem; font-weight: 700; color: #fff; line-height: 1.2;
  margin-bottom: 14px; position: relative;
}
.hero-sub {
  font-size: .95rem; color: rgba(255,255,255,.80); max-width: 580px;
  margin: 0 auto 28px; line-height: 1.6; position: relative;
}
.hero-badges {
  display: flex; flex-wrap: wrap; gap: 8px;
  justify-content: center; position: relative; margin-bottom: 28px;
}
.hero-badge {
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25);
  border-radius: 20px; padding: 5px 14px;
  font-size: .75rem; color: rgba(255,255,255,.9); white-space: nowrap;
}
.hero-cta-row {
  display: flex; flex-direction: column; gap: 10px;
  align-items: center; position: relative;
}
.btn-primary {
  background: #c9973a; color: #fff; border-radius: 5px; font-family: Georgia,serif;
  font-size: .92rem; font-weight: 700; padding: 13px 28px;
  display: inline-block; min-width: 220px; text-align: center;
  border: none; cursor: pointer;
}
.btn-primary:hover { background: #b5872f; text-decoration: none; }
.btn-secondary {
  background: transparent; color: #fff;
  border: 2px solid rgba(255,255,255,.5); border-radius: 5px;
  font-family: Georgia,serif; font-size: .88rem; font-weight: 700;
  padding: 11px 24px; display: inline-block; min-width: 220px; text-align: center;
}
.btn-secondary:hover { border-color: #fff; text-decoration: none; }

/* ═══════════ STATS BAR ═══════════ */
.stats-bar {
  background: #1a2744; padding: 0;
}
.stats-bar-inner {
  display: flex; flex-wrap: wrap; justify-content: center;
  border-top: 1px solid rgba(255,255,255,.1);
}
.stat-item {
  text-align: center; padding: 14px 10px;
  flex: 0 0 50%; min-width: 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.stat-item:nth-child(odd) { border-right: 1px solid rgba(255,255,255,.08); }
.stat-num { font-size: 1.3rem; font-weight: 700; color: #c9973a; font-family: Georgia,serif; }
.stat-lbl { font-size: .62rem; color: rgba(255,255,255,.6); text-transform: uppercase; letter-spacing: .08em; margin-top: 2px; }

/* ═══════════ TOC / JUMP NAV ═══════════ */
.toc-bar {
  background: #f0ede8; border-bottom: 1px solid #ddd;
  padding: 12px 16px; font-size: .8rem;
  overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch;
}
.toc-bar a {
  color: #1a2744; font-weight: 700; margin-right: 18px;
  display: inline-block;
}
.toc-bar a:hover { color: #c9973a; text-decoration: none; }

/* ═══════════ PAGE MAIN ═══════════ */
.page-main {
  max-width: 760px; margin: 0 auto;
  padding: 28px 20px 60px;
}
.page-main h2 {
  font-size: 1.3rem; color: #1a2744; border-bottom: 3px solid #c9973a;
  padding-bottom: 6px; margin: 36px 0 16px;
  scroll-margin-top: 58px;
}
.page-main h3 {
  font-size: 1.05rem; color: #1a3a5c; margin: 24px 0 10px;
  scroll-margin-top: 58px;
}
.page-main p { margin-bottom: 14px; font-size: .98rem; }
.page-main ul, .page-main ol { margin-bottom: 14px; }
.page-main li { margin-bottom: 6px; font-size: .97rem; }
.page-main table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: .88rem; }
.page-main th { background: #1a2744; color: #fff; padding: 9px 10px; text-align: left; }
.page-main td { padding: 8px 10px; border-bottom: 1px solid #eee; }
.page-main tr:nth-child(even) td { background: #f7f5f2; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 16px 0; }
.table-scroll table { min-width: 480px; }

/* ═══════════ NEIGHBORHOOD CARDS ═══════════ */
.nbhd-grid {
  display: flex; flex-direction: column; gap: 20px; margin: 20px 0;
}
.nbhd-card {
  border: 1px solid #ddd; border-radius: 7px;
  border-left: 5px solid #1a2744; background: #fff;
  padding: 18px 18px 14px; box-shadow: 0 2px 6px rgba(0,0,0,.06);
}
.nbhd-card.closest { border-left-color: #c9973a; }
.nbhd-card.luxury  { border-left-color: #6c3483; }
.nbhd-card.family  { border-left-color: #1a7a4a; }
.nbhd-card.acreage { border-left-color: #8b5e3c; }
.nbhd-tag {
  display: inline-block; font-size: .68rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 3px; margin-bottom: 8px;
  background: #eaf0f8; color: #1a2744;
}
.nbhd-card.closest .nbhd-tag { background: #fdf3e3; color: #8b5e3c; }
.nbhd-card.luxury  .nbhd-tag { background: #f5eef8; color: #6c3483; }
.nbhd-card.family  .nbhd-tag { background: #eafaf1; color: #1a7a4a; }
.nbhd-card.acreage .nbhd-tag { background: #faf0e6; color: #8b5e3c; }
.nbhd-name { font-size: 1.08rem; font-weight: 700; color: #1a2744; margin-bottom: 4px; }
.nbhd-meta { font-size: .8rem; color: #666; margin-bottom: 10px; }
.nbhd-meta strong { color: #333; }
.nbhd-desc { font-size: .93rem; line-height: 1.6; color: #333; margin-bottom: 10px; }
.nbhd-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pill {
  font-size: .72rem; border-radius: 12px; padding: 3px 10px;
  background: #f0ede8; color: #555; border: 1px solid #ddd;
}

/* ═══════════ SCHOOL CARDS ═══════════ */
.school-grid { display: flex; flex-direction: column; gap: 16px; margin: 16px 0; }
.school-card {
  border: 1px solid #ddd; border-radius: 6px; background: #fff;
  padding: 14px 16px; display: flex; gap: 14px; align-items: flex-start;
}
.school-grade {
  flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; font-weight: 700; background: #1a7a4a; color: #fff;
}
.school-grade.b { background: #2471a3; }
.school-grade.stem { background: #6c3483; font-size: .7rem; letter-spacing: -.02em; }
.school-info h4 { font-size: .95rem; color: #1a2744; margin-bottom: 3px; }
.school-info p { font-size: .83rem; color: #555; margin: 0; line-height: 1.5; }
.school-info .school-dist { font-size: .75rem; color: #888; margin-top: 4px; }

/* ═══════════ COMMUTE TABLE ═══════════ */
.commute-note {
  background: #eaf0f8; border-left: 4px solid #1a2744;
  padding: 12px 16px; border-radius: 4px; font-size: .87rem;
  margin: 16px 0; line-height: 1.5;
}

/* ═══════════ CALLOUT BOXES ═══════════ */
.callout {
  border-radius: 6px; padding: 16px 18px; margin: 20px 0; font-size: .92rem; line-height: 1.6;
}
.callout-blue  { background: #eaf0f8; border-left: 4px solid #1a2744; }
.callout-gold  { background: #fdf3e3; border-left: 4px solid #c9973a; }
.callout-green { background: #eafaf1; border-left: 4px solid #1a7a4a; }
.callout-purple{ background: #f5eef8; border-left: 4px solid #6c3483; }
.callout strong { display: block; margin-bottom: 4px; }

/* ═══════════ PRIVATE SCHOOL LIST ═══════════ */
.pvt-school-list { list-style: none; padding: 0; margin: 12px 0; }
.pvt-school-list li {
  padding: 11px 0; border-bottom: 1px solid #f0ede8;
  font-size: .93rem; display: flex; flex-direction: column; gap: 2px;
}
.pvt-school-list li:last-child { border-bottom: none; }
.pvt-school-list .ps-name { font-weight: 700; color: #1a2744; }
.pvt-school-list .ps-detail { font-size: .82rem; color: #666; }

/* ═══════════ DOMINION CTA BLOCK ═══════════ */
.dgp-cta {
  background: linear-gradient(135deg, #1a2744 0%, #2c4a7a 100%);
  border-radius: 8px; padding: 28px 20px; text-align: center;
  margin: 36px 0;
}
.dgp-cta h3 { color: #fff; font-size: 1.2rem; margin-bottom: 8px; }
.dgp-cta p  { color: rgba(255,255,255,.8); font-size: .92rem; margin-bottom: 18px; }
.dgp-cta .cta-details {
  display: flex; flex-direction: column; gap: 6px;
  align-items: center; margin-bottom: 20px;
}
.dgp-cta .cta-details a { color: #c9973a; font-weight: 700; font-size: .95rem; }
.dgp-logo-line { font-size: .78rem; color: rgba(255,255,255,.5); margin-top: 12px; }

/* ═══════════ FOOTER ═══════════ */
.site-footer {
  background: #1a2744; color: rgba(255,255,255,.6);
  font-size: .78rem; text-align: center; padding: 20px 16px;
  line-height: 1.7;
}
.site-footer a { color: rgba(255,255,255,.75); }
.site-footer strong { color: #fff; }

/* ═══════════ STICKY BOTTOM CTA (mobile) ═══════════ */
.sticky-bottom {
  display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 99;
  background: #1a2744; border-top: 2px solid #c9973a;
  padding: 10px 14px; padding-bottom: calc(10px + env(safe-area-inset-bottom));
  gap: 10px; align-items: center;
}
.sticky-bottom-text { color: #fff; font-size: .78rem; flex: 1; line-height: 1.3; }
.sticky-bottom-text strong { display: block; color: #c9973a; font-size: .85rem; }
.sticky-bottom a {
  background: #c9973a; color: #fff; border-radius: 4px;
  padding: 10px 16px; font-size: .82rem; font-weight: 700;
  white-space: nowrap; flex-shrink: 0;
}
.sticky-bottom a:hover { text-decoration: none; }
/* Push footer above sticky CTA */
body { padding-bottom: 72px; }

/* ═══════════ BREAKPOINTS ═══════════ */

/* 390px — wider phones */
@media (min-width: 390px) {
  .hero-title { font-size: 2rem; }
  .stat-item { padding: 16px 10px; }
  .stat-num { font-size: 1.45rem; }
  .stat-lbl { font-size: .65rem; }
}

/* 480px — phablets */
@media (min-width: 480px) {
  .hero-cta-row { flex-direction: row; justify-content: center; }
  .stat-item { flex: 0 0 25%; border-bottom: none; }
  .stat-item:nth-child(odd) { border-right: 1px solid rgba(255,255,255,.08); }
  .stats-bar-inner { flex-wrap: nowrap; }
}

/* 641px — tablet */
@media (min-width: 641px) {
  .site-nav { padding: 0 28px; }
  .nav-brand { font-size: .92rem; max-width: none; }
  .nav-brand span { font-size: .72rem; }
  .hero-title { font-size: 2.4rem; }
  .hero-sub { font-size: 1.05rem; }
  .nbhd-grid { display: grid; grid-template-columns: 1fr 1fr; }
  .school-grid { display: grid; grid-template-columns: 1fr 1fr; }
  .sticky-bottom { display: none; }
  body { padding-bottom: 0; }
  .page-main { padding: 36px 32px 80px; }
  .dgp-cta { padding: 36px 40px; }
  .dgp-cta .cta-details { flex-direction: row; justify-content: center; gap: 24px; }
}

/* 961px — desktop */
@media (min-width: 961px) {
  .page-main { padding: 48px 40px 100px; }
  .page-main h2 { font-size: 1.5rem; }
  .hero-title { font-size: 2.8rem; }
  .nbhd-grid { grid-template-columns: 1fr 1fr 1fr; }
  .school-grid { grid-template-columns: 1fr 1fr 1fr; }
  .stat-num { font-size: 1.6rem; }
  .stat-lbl { font-size: .68rem; }
  .stat-item { padding: 20px 16px; }
}

@media (max-width: 360px) {
  .hero-title { font-size: 1.5rem; }
  .hero-sub { font-size: .85rem; }
  .nav-brand { font-size: .75rem; }
  .nav-cta { font-size: .72rem; padding: 7px 10px; }
}

/* ═══════════ PRINT ═══════════ */
@media print {
  .site-nav, .sticky-bottom, .toc-bar { display: none; }
  body { padding-bottom: 0; color: #000; background: #fff; }
  .site-hero { background: #1a2744 !important; -webkit-print-color-adjust: exact; }
  a { color: #000; }
  .page-main::before {
    content: "TSMCEmployeeHousingGuide.com — Presented by Dominion Group Properties | dgpaz.com | (480) 703-7990";
    display: block; font-size: .75rem; text-align: center;
    border-bottom: 1px solid #ddd; padding-bottom: 8px; margin-bottom: 20px;
  }
}
