:root {
  --bg: #f8f9fa;
  --surface: #ffffff;
  --text: #212529;
  --muted: #6c757d;
  --accent: #28a745;
  --accent-dark: #218838;
  --jockey: #28a745;
  --jockey-dark: #1e7e34;
  --border: #e9ecef;
  --shadow: 0 2px 8px rgba(0,0,0,.06);
  --radius: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  padding-bottom: 20px;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header */
.site-navbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text);
}
.brand img { height: 36px; width: auto; }
.brand:hover { text-decoration: none; color: var(--text); }

.nav-main {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.nav-main a {
  font-size: .95rem;
  color: var(--text);
  padding: 4px 0;
}
.nav-main a:hover { color: var(--accent); }
.nav-main .nav-jockey {
  color: var(--jockey);
  font-weight: 600;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: #fff;
  padding: 40px 0 32px;
  margin-bottom: 28px;
}
.hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 600;
  margin-bottom: 12px;
}
.hero p {
  max-width: 700px;
  opacity: .9;
  font-size: 1.05rem;
}

/* Sections */
.section { margin: 28px 0; }
.section h2 {
  font-size: 1.4rem;
  margin-bottom: 16px;
  font-weight: 600;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: #fff;
  font-weight: 500;
  font-size: .95rem;
  padding: 8px 20px;
  border-radius: 24px;
  border: 0;
  cursor: pointer;
  transition: background .2s, transform .1s;
  white-space: nowrap;
  text-decoration: none;
}
.btn:hover { background: var(--accent-dark); text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: scale(.98); }
.btn.secondary { background: #6c757d; }
.btn.secondary:hover { background: #5a6268; }
.btn.outline { background: transparent; color: var(--accent); border: 2px solid var(--accent); }
.btn.outline:hover { background: rgba(40,167,69,.08); }
.btn.call { background: #17a2b8; }
.btn.call:hover { background: #138496; }

/* Table */
.table-wrap {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
table { width: 100%; border-collapse: collapse; }
thead { background: #f1f3f5; }
thead th {
  padding: 14px 20px;
  text-align: left;
  font-weight: 600;
  font-size: .95rem;
  color: #495057;
  border-bottom: 2px solid #dee2e6;
}
tbody tr { border-bottom: 1px solid #f1f3f5; transition: background .15s; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: #f8f9fa; }
tbody td { padding: 12px 20px; vertical-align: middle; }

.school-cell { display: flex; align-items: center; gap: 14px; }
.school-cell img {
  width: 48px; height: 48px; border-radius: 50%; object-fit: cover;
  background: #fff; border: 1px solid var(--border); flex-shrink: 0;
}
.school-cell .school-name { font-size: 1.05rem; font-weight: 500; color: #1a1a2e; }
.school-cell .meta { font-size: .85rem; color: var(--muted); }

/* Jockey priority row */
.jockey-row { background: #eaf8ed; }
.jockey-row:hover { background: #dff0e4; }
.jockey-row .school-cell img { border-color: var(--jockey); width: 56px; height: 56px; }
.jockey-row .school-name { color: var(--jockey-dark); font-size: 1.1rem; }
.badge {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .02em;
  background: var(--jockey);
  color: #fff;
  padding: 2px 8px;
  border-radius: 10px;
  margin-bottom: 2px;
}

/* Cards */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 20px;
}
.card h3 { font-size: 1.2rem; margin-bottom: 10px; }
.card p { margin-bottom: 10px; color: #343a40; }
.card ul { margin-left: 18px; margin-bottom: 10px; }
.card li { margin-bottom: 6px; }

/* School detail */
.school-hero {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  margin-bottom: 18px;
}
.school-hero img {
  width: 96px; height: 96px; border-radius: 50%; object-fit: cover;
  background: #fff; border: 2px solid var(--border);
}
.school-hero .titles h1 { font-size: 1.8rem; margin-bottom: 4px; }
.school-hero .titles .muted { color: var(--muted); }

.actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0; }

.contacts a { display: inline-block; font-size: 1.1rem; font-weight: 500; margin-right: 14px; }

.branches { display: grid; gap: 14px; }
.branch {
  background: #f8f9fa;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
}
.branch h4 { font-size: 1.05rem; margin-bottom: 6px; }

/* Map */
.map-container {
  width: 100%;
  height: min(70vh, 560px);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #eef0f2;
  position: relative;
}
#map { width: 100%; height: 100%; }
.map-fallback {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px; text-align: center; color: var(--muted);
}
.map-list { margin-top: 18px; }
.map-list details { background: var(--surface); border-radius: 10px; padding: 12px 16px; margin-bottom: 10px; box-shadow: var(--shadow); }
.map-list summary { cursor: pointer; font-weight: 600; }
.map-list ul { margin: 10px 0 0 18px; color: #343a40; }

/* Photos */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin: 14px 0; }
.photo-placeholder {
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
  border: 2px dashed #adb5bd;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #6c757d; font-size: .85rem; text-align: center; padding: 8px;
}

/* Info text */
.info-text {
  background: var(--surface);
  padding: 22px 22px 8px;
  border-radius: var(--radius);
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
  margin: 24px 0;
}
.info-text p { margin-bottom: 14px; color: #343a40; }

/* FAQ */
.faq details {
  background: var(--surface);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 14px 18px;
  margin-bottom: 12px;
}
.faq summary { font-weight: 600; cursor: pointer; }
.faq .answer { margin-top: 10px; color: #343a40; }

/* Footer */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 18px 0;
  margin-top: 30px;
  text-align: center;
  font-size: .9rem;
  color: var(--muted);
}

@media (max-width: 640px) {
  .site-navbar .container { justify-content: center; }
  .nav-main { justify-content: center; width: 100%; gap: 12px; }
  .hero h1 { font-size: 1.5rem; }
  thead { display: none; }
  tbody tr { display: block; padding: 14px 0; border-bottom: 1px solid #dee2e6; }
  tbody td { display: block; padding: 4px 16px; border: none; }
  tbody td:first-child { padding-top: 4px; }
  tbody td:last-child { padding-bottom: 4px; text-align: left; }
  .school-cell img { width: 44px; height: 44px; }
  .jockey-row .school-cell img { width: 56px; height: 56px; }
  .school-hero img { width: 72px; height: 72px; }
  .map-container { height: 50vh; }
}
