/* ==========================================================
   agency.css - ธีม Professional Blue สำหรับหน้าหน่วยงาน + ข้อสอบ
   โทน: ขาว น้ำเงิน ฟ้า เทาอ่อน + CTA ส้ม/เขียว
   ========================================================== */

:root {
  --navy-900: #0B1E3F;
  --navy-800: #1A3262;
  --navy-700: #284B85;
  --blue-600: #2563EB;
  --blue-500: #3B82F6;
  --blue-400: #60A5FA;
  --blue-100: #DBEAFE;
  --blue-50:  #EFF6FF;

  --sky-500: #0EA5E9;
  --sky-100: #E0F2FE;

  --gray-900: #111827;
  --gray-700: #374151;
  --gray-500: #6B7280;
  --gray-400: #9CA3AF;
  --gray-300: #D1D5DB;
  --gray-200: #E5E7EB;
  --gray-100: #F3F4F6;
  --gray-50:  #F9FAFB;

  --orange-500: #F97316;
  --orange-600: #EA580C;
  --orange-100: #FFEDD5;

  --green-500: #10B981;
  --green-600: #059669;
  --green-100: #D1FAE5;

  --red-500: #EF4444;
  --red-100: #FEE2E2;

  --amber-500: #F59E0B;
  --amber-100: #FEF3C7;

  --shadow-sm:  0 1px 2px  rgba(15, 30, 60, 0.05);
  --shadow-md:  0 4px 12px rgba(15, 30, 60, 0.08);
  --shadow-lg:  0 12px 28px rgba(15, 30, 60, 0.12);
  --shadow-xl:  0 24px 48px rgba(15, 30, 60, 0.18);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --font-body: 'Prompt', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Sarabun', 'Prompt', sans-serif;
}

@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@300;400;500;600;700&family=Sarabun:wght@400;500;600;700;800&display=swap');

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--gray-900);
  background: var(--gray-50);
  line-height: 1.6;
  min-height: 100vh;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--navy-900);
  font-weight: 700;
  line-height: 1.3;
}

h1 { font-size: clamp(1.75rem, 3.5vw, 2.4rem); }
h2 { font-size: clamp(1.35rem, 2.5vw, 1.7rem); }
h3 { font-size: 1.15rem; }

p  { color: var(--gray-700); }
a  { color: var(--blue-600); text-decoration: none; }
a:hover { color: var(--blue-500); }

.container {
  width: min(1160px, 92%);
  margin-inline: auto;
}

/* ============== NAVBAR ============== */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: white;
  border-bottom: 1px solid var(--gray-200);
  padding: 14px 0;
  box-shadow: var(--shadow-sm);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--navy-900);
}
.brand-logo {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--blue-600), var(--navy-700));
  border-radius: 10px;
  display: grid; place-items: center;
  color: white; font-size: 1.1rem;
  font-weight: 700;
}
.nav-links {
  display: flex; gap: 4px;
  list-style: none;
  align-items: center;
  flex-wrap: wrap;
}
.nav-links a {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: var(--gray-700);
  font-weight: 500;
  font-size: .95rem;
}
.nav-links a:hover { background: var(--blue-50); color: var(--blue-600); }
.nav-links a.active { background: var(--blue-100); color: var(--blue-600); }
.nav-cta {
  background: var(--orange-500) !important;
  color: white !important;
  font-weight: 600 !important;
}
.nav-cta:hover { background: var(--orange-600) !important; }

.nav-toggle {
  display: none;
  background: var(--gray-100);
  border: none;
  width: 40px; height: 40px;
  border-radius: 8px;
  font-size: 1.3rem;
  color: var(--navy-700);
  cursor: pointer;
}

/* ============== BUTTONS ============== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all .2s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--blue-600);
  color: white;
}
.btn-primary:hover { background: var(--blue-500); color: white; transform: translateY(-1px); }

.btn-cta {
  background: var(--orange-500);
  color: white;
  box-shadow: var(--shadow-md);
}
.btn-cta:hover { background: var(--orange-600); color: white; transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.btn-success {
  background: var(--green-500);
  color: white;
  box-shadow: var(--shadow-md);
}
.btn-success:hover { background: var(--green-600); color: white; transform: translateY(-2px); }

.btn-outline {
  background: white;
  color: var(--navy-700);
  border-color: var(--gray-300);
}
.btn-outline:hover { border-color: var(--blue-500); color: var(--blue-600); }

.btn-ghost {
  background: transparent;
  color: var(--gray-700);
  border: none;
}
.btn-ghost:hover { color: var(--blue-600); }

.btn-lg { padding: 16px 32px; font-size: 1.08rem; }
.btn-sm { padding: 8px 16px; font-size: .9rem; }
.btn-block { width: 100%; }

/* ============== BADGES ============== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--blue-100);
  color: var(--navy-700);
  font-size: .82rem;
  font-weight: 500;
}
.badge.green  { background: var(--green-100);  color: var(--green-600); }
.badge.amber  { background: var(--amber-100);  color: #92400E; }
.badge.orange { background: var(--orange-100); color: var(--orange-600); }

/* ============== CARDS ============== */
.card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  transition: all .25s;
}
.card:hover {
  border-color: var(--blue-400);
  box-shadow: var(--shadow-md);
}

/* ============== HERO ============== */
.page-hero {
  background: linear-gradient(135deg, var(--navy-800), var(--navy-700));
  color: white;
  padding: 60px 0 48px;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  top: -50%; right: -10%;
  width: 500px; height: 500px;
  background: var(--blue-500);
  opacity: .15;
  border-radius: 50%;
  filter: blur(80px);
}
.page-hero h1 { color: white; margin-bottom: 12px; }
.page-hero p  { color: rgba(255,255,255,.85); max-width: 680px; }

/* ============== POSITIONS LIST (positions.html) ============== */
.list-header {
  background: white;
  border-bottom: 1px solid var(--gray-200);
  padding: 24px 0;
  margin-bottom: 32px;
}
.search-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  background: var(--gray-100);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  padding: 8px 14px;
  margin-top: 16px;
  transition: all .2s;
}
.search-bar:focus-within {
  background: white;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 4px var(--blue-100);
}
.search-bar input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 8px 0;
  font-size: 1rem;
  color: var(--gray-900);
  font-family: var(--font-body);
  outline: none;
}
.search-bar input::placeholder { color: var(--gray-400); }
.search-icon { color: var(--gray-400); font-size: 1.2rem; }
.search-count {
  font-size: .88rem;
  color: var(--gray-500);
  padding-left: 8px;
  border-left: 1px solid var(--gray-300);
}

.agencies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  padding-bottom: 60px;
}

.agency-card {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--gray-200);
  transition: all .25s;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}
.agency-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--blue-400);
}
.agency-cover {
  width: 100%;
  aspect-ratio: 3/4;
  max-height: 280px;
  background: var(--gray-100);
  position: relative;
  overflow: hidden;
}
.agency-cover img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.agency-cover .ph {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: var(--gray-400);
  font-size: 3rem;
  background: linear-gradient(135deg, var(--blue-50), var(--sky-100));
}
.agency-cover .ribbon {
  position: absolute;
  top: 12px; right: 12px;
  background: var(--orange-500);
  color: white;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 600;
  box-shadow: var(--shadow-md);
}

.agency-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.agency-body h3 {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--navy-900);
  min-height: 2.6em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.agency-body .desc {
  font-size: .85rem;
  color: var(--gray-500);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.agency-body .price-row {
  display: flex; align-items: baseline; gap: 6px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--gray-100);
}
.agency-body .price {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--navy-900);
}
.agency-body .price-unit { font-size: .8rem; color: var(--gray-500); }
.agency-body .actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 6px;
}

/* ============== AGENCY DETAIL PAGE ============== */
.agency-hero {
  background: linear-gradient(135deg, var(--navy-800), var(--navy-700));
  color: white;
  padding: 50px 0 40px;
  position: relative;
  overflow: hidden;
}
.agency-hero::before {
  content: '';
  position: absolute;
  top: -30%; left: -5%;
  width: 600px; height: 600px;
  background: var(--blue-500);
  opacity: .18;
  border-radius: 50%;
  filter: blur(100px);
}

.agency-breadcrumb {
  font-size: .88rem;
  color: rgba(255,255,255,.7);
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}
.agency-breadcrumb a { color: rgba(255,255,255,.85); }
.agency-breadcrumb a:hover { color: white; }

.agency-hero-inner {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 36px;
  align-items: center;
  position: relative;
  z-index: 1;
}
.agency-hero-cover {
  aspect-ratio: 3/4;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  background: white;
}
.agency-hero-cover img,
.agency-hero-cover .ph {
  width: 100%; height: 100%;
  display: block;
  object-fit: cover;
}
.agency-hero-cover .ph {
  display: grid; place-items: center;
  color: var(--gray-400);
  font-size: 5rem;
  background: linear-gradient(135deg, var(--blue-50), var(--sky-100));
}

.agency-title-block .eyebrow {
  display: inline-block;
  background: rgba(255,255,255,.15);
  color: white;
  padding: 4px 14px;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 500;
  margin-bottom: 12px;
}
.agency-title-block h1 {
  color: white;
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  margin-bottom: 12px;
}
.agency-title-block .lead {
  color: rgba(255,255,255,.88);
  font-size: 1.05rem;
  margin-bottom: 20px;
  max-width: 560px;
}

.price-bar {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 22px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--radius-md);
  backdrop-filter: blur(6px);
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.price-bar .pbar-price {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: white;
}
.price-bar .pbar-price small { font-size: .85rem; color: rgba(255,255,255,.7); font-weight: 400; }

.hero-actions {
  display: flex; gap: 10px;
  flex-wrap: wrap;
}

/* ============== CONTENT SECTIONS ============== */
.agency-content {
  padding: 48px 0 60px;
}
.content-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  align-items: start;
}
.content-main .section {
  background: white;
  border-radius: var(--radius-lg);
  padding: 28px;
  border: 1px solid var(--gray-200);
  margin-bottom: 16px;
}
.content-main .section h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 1.3rem;
}
.content-main .section h2 .num {
  display: grid; place-items: center;
  width: 30px; height: 30px;
  border-radius: 8px;
  background: var(--blue-100);
  color: var(--blue-600);
  font-size: .95rem;
  font-weight: 700;
}
.content-main .section p { margin-bottom: 10px; }
.content-main .section ul { padding-left: 20px; color: var(--gray-700); }
.content-main .section li { margin-bottom: 6px; }

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}
.tag-list .tag {
  background: var(--blue-50);
  color: var(--navy-700);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: .9rem;
  font-weight: 500;
  border: 1px solid var(--blue-100);
}

/* Sidebar sticky */
.content-side .side-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 90px;
}
.content-side h3 {
  font-size: 1.05rem;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--gray-100);
}
.content-side .side-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Position list in agency */
.position-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.position-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
}
.position-item .pname { font-weight: 500; color: var(--navy-900); font-size: .95rem; }
.position-item .pcode { font-size: .78rem; color: var(--gray-500); font-family: monospace; }

/* ============== EXAM TUTOR ============== */
.exam-header {
  background: linear-gradient(135deg, var(--navy-800), var(--navy-700));
  color: white;
  padding: 36px 0 30px;
  position: relative;
  overflow: hidden;
}
.exam-header::before {
  content: '';
  position: absolute;
  top: -40%; right: -5%;
  width: 400px; height: 400px;
  background: var(--blue-500);
  opacity: .18;
  border-radius: 50%;
  filter: blur(80px);
}
.exam-header .container { position: relative; z-index: 1; }
.exam-header .breadcrumb {
  font-size: .88rem;
  color: rgba(255,255,255,.75);
  margin-bottom: 10px;
}
.exam-header .breadcrumb a { color: rgba(255,255,255,.9); }
.exam-header h1 {
  color: white;
  display: flex; align-items: center; gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.exam-header .mini-cover {
  width: 50px; height: 66px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--gray-100);
  flex-shrink: 0;
  display: inline-block;
}
.exam-header .mini-cover img { width: 100%; height: 100%; object-fit: cover; }
.exam-header .subtitle { color: rgba(255,255,255,.85); font-size: .95rem; }

.exam-meta {
  display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap;
}
.exam-meta .badge { background: rgba(255,255,255,.15); color: white; }

/* Subject tabs (tutor) */
.subject-tabs {
  background: white;
  border-bottom: 1px solid var(--gray-200);
  padding: 12px 0;
  position: sticky; top: 72px;
  z-index: 50;
  overflow-x: auto;
}
.subject-tabs-inner {
  display: flex; gap: 6px;
  flex-wrap: wrap;
}
.subject-tab {
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--gray-100);
  color: var(--gray-700);
  font-weight: 500;
  font-size: .95rem;
  cursor: pointer;
  border: none;
  transition: all .2s;
  white-space: nowrap;
}
.subject-tab:hover { background: var(--blue-100); color: var(--blue-600); }
.subject-tab.active {
  background: var(--blue-600);
  color: white;
}

.tutor-wrap { padding: 28px 0 60px; }
.subject-section { margin-bottom: 40px; }
.subject-section h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--blue-100);
}
.subject-section h2 .subject-icon {
  width: 36px; height: 36px;
  background: var(--blue-100);
  color: var(--blue-600);
  border-radius: 8px;
  display: grid; place-items: center;
  font-size: 1.1rem;
}

.question-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}
.q-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: all .25s;
}
.q-card:hover { border-color: var(--blue-400); box-shadow: var(--shadow-sm); }
.q-card .q-num {
  display: inline-block;
  background: var(--blue-100);
  color: var(--blue-600);
  padding: 2px 10px;
  border-radius: 6px;
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: 10px;
}
.q-card .q-text {
  color: var(--navy-900);
  font-weight: 500;
  margin-bottom: 14px;
  line-height: 1.55;
}
.q-card .choices { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.q-card .choice {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px;
  background: var(--gray-50);
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all .15s;
  font-size: .94rem;
}
.q-card .choice:hover { background: var(--blue-50); border-color: var(--blue-100); }
.q-card .choice.selected { background: var(--blue-50); border-color: var(--blue-500); }
.q-card .choice.correct  { background: var(--green-100); border-color: var(--green-500); }
.q-card .choice.incorrect{ background: var(--red-100);   border-color: var(--red-500); }
.q-card .choice input { display: none; }
.q-card .choice .letter {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: white;
  border: 1.5px solid var(--gray-300);
  display: grid; place-items: center;
  font-size: .82rem;
  font-weight: 600;
  color: var(--gray-500);
  flex-shrink: 0;
}
.q-card .choice.selected .letter { background: var(--blue-500); color: white; border-color: var(--blue-500); }
.q-card .choice.correct  .letter { background: var(--green-500); color: white; border-color: var(--green-500); }
.q-card .choice.incorrect .letter { background: var(--red-500); color: white; border-color: var(--red-500); }

.q-card .reveal-btn {
  margin-top: 12px;
  background: transparent;
  color: var(--blue-600);
  border: none;
  padding: 6px 0;
  cursor: pointer;
  font-size: .88rem;
  font-weight: 500;
  font-family: inherit;
}
.q-card .reveal-btn:hover { color: var(--blue-500); }
.q-card .explain-box {
  display: none;
  margin-top: 12px;
  padding: 12px 14px;
  background: var(--amber-100);
  border-left: 3px solid var(--amber-500);
  border-radius: 6px;
  font-size: .9rem;
  color: var(--gray-700);
}
.q-card .explain-box.show { display: block; }
.q-card .explain-box strong { color: #92400E; }

.tutor-actions {
  display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;
  margin-top: 30px;
  padding-top: 30px;
  border-top: 1px solid var(--gray-200);
}

/* ============== EXAM REAL (สนามสอบ) ============== */
.real-body { background: var(--gray-100); min-height: 100vh; }

.exam-paper-header {
  background: white;
  border-bottom: 3px double var(--navy-800);
  padding: 30px 0 24px;
  text-align: center;
}
.exam-paper-header h1 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  margin-bottom: 4px;
}
.exam-paper-header .subj {
  color: var(--gray-600);
  font-size: 1rem;
  letter-spacing: .5px;
}
.exam-paper-header .meta {
  display: flex; justify-content: center; gap: 24px;
  margin-top: 12px;
  font-size: .88rem;
  color: var(--gray-600);
  flex-wrap: wrap;
}

.real-wrap {
  padding: 24px 0 60px;
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 24px;
}

.real-main {
  background: white;
  border-radius: var(--radius-lg);
  padding: 30px 36px;
  box-shadow: var(--shadow-sm);
  min-height: 500px;
}
.real-q-num {
  font-size: 1.1rem;
  color: var(--blue-600);
  font-weight: 700;
  margin-bottom: 6px;
}
.real-q-total {
  color: var(--gray-400);
  font-size: .95rem;
  font-weight: 400;
}
.real-q-text {
  font-size: 1.1rem;
  line-height: 1.7;
  margin: 16px 0 24px;
  color: var(--navy-900);
}
.real-choices {
  display: flex; flex-direction: column; gap: 12px;
  list-style: none;
}
.real-choice {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 14px 18px;
  background: var(--gray-50);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all .15s;
}
.real-choice:hover { background: var(--blue-50); border-color: var(--blue-100); }
.real-choice.selected { background: var(--blue-50); border-color: var(--blue-500); }
.real-choice .rc-letter {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: white;
  border: 2px solid var(--gray-300);
  display: grid; place-items: center;
  font-weight: 600;
  color: var(--gray-500);
  flex-shrink: 0;
}
.real-choice.selected .rc-letter { background: var(--blue-500); color: white; border-color: var(--blue-500); }
.real-choice.correct  { background: var(--green-100); border-color: var(--green-500); }
.real-choice.incorrect{ background: var(--red-100);   border-color: var(--red-500); }
.real-choice.correct   .rc-letter { background: var(--green-500); color: white; border-color: var(--green-500); }
.real-choice.incorrect .rc-letter { background: var(--red-500);   color: white; border-color: var(--red-500); }

.real-nav {
  display: flex; justify-content: space-between; gap: 10px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--gray-200);
}

.real-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 90px; align-self: start; }
.real-timer-card,
.real-palette-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 18px;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}
.real-timer {
  text-align: center;
}
.real-timer-label { font-size: .82rem; color: var(--gray-500); margin-bottom: 4px; }
.real-timer-value {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--navy-900);
  letter-spacing: 1px;
}
.real-timer.warning .real-timer-value { color: var(--orange-500); }
.real-timer.danger  .real-timer-value { color: var(--red-500); }

.real-palette-card h4 { font-size: .95rem; margin-bottom: 6px; }
.palette-legend {
  display: flex; gap: 8px; flex-wrap: wrap;
  font-size: .78rem; color: var(--gray-600);
  margin-bottom: 12px;
}
.palette-legend .dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 4px;
  vertical-align: middle;
}
.dot.answered  { background: var(--green-500); }
.dot.unanswered{ background: var(--gray-300); }
.dot.current   { background: var(--blue-500); }

.palette-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  max-height: 320px;
  overflow-y: auto;
}
.palette-btn {
  aspect-ratio: 1;
  border: 1.5px solid var(--gray-300);
  background: white;
  border-radius: 6px;
  cursor: pointer;
  font-size: .82rem;
  font-weight: 600;
  color: var(--gray-600);
  transition: all .12s;
  font-family: inherit;
}
.palette-btn:hover { border-color: var(--blue-400); }
.palette-btn.answered {
  background: var(--green-500); color: white; border-color: var(--green-500);
}
.palette-btn.current {
  background: var(--blue-500); color: white; border-color: var(--blue-500);
  box-shadow: 0 0 0 3px var(--blue-100);
}
.palette-btn.answered.current {
  background: var(--blue-600); color: white; border-color: var(--blue-600);
}

.real-submit-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 18px;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}
.real-progress {
  font-size: .88rem;
  color: var(--gray-600);
  margin-bottom: 12px;
  text-align: center;
}

/* Result */
.result-card {
  max-width: 680px;
  margin: 40px auto;
  padding: 40px;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  text-align: center;
  border-top: 6px solid var(--blue-500);
}
.result-score {
  font-family: var(--font-heading);
  font-size: 4rem;
  font-weight: 800;
  color: var(--navy-900);
  line-height: 1;
  margin: 12px 0;
}
.result-detail {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 24px 0;
}
.result-detail div {
  padding: 14px 8px;
  background: var(--gray-50);
  border-radius: var(--radius-md);
}
.result-detail .num { font-size: 1.6rem; font-weight: 700; font-family: var(--font-heading); color: var(--navy-900); }
.result-detail .lbl { font-size: .82rem; color: var(--gray-500); }
.result-detail .num.good { color: var(--green-600); }
.result-detail .num.bad  { color: var(--red-500); }
.result-actions {
  display: flex; justify-content: center; gap: 10px; flex-wrap: wrap;
  margin-top: 20px;
}

/* ============== FOOTER ============== */
.footer {
  background: var(--navy-900);
  color: rgba(255,255,255,.75);
  padding: 40px 0 24px;
  margin-top: 60px;
}
.footer .brand { color: white; margin-bottom: 12px; }
.footer .brand-logo { background: rgba(255,255,255,.1); }
.footer h4 { color: white; font-size: 1rem; margin-bottom: 10px; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.footer-links a { color: rgba(255,255,255,.7); font-size: .9rem; }
.footer-links a:hover { color: white; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 30px;
  margin-bottom: 24px;
}
.footer-bottom {
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,.1);
  text-align: center;
  font-size: .85rem;
  color: rgba(255,255,255,.5);
}

/* ============== RESPONSIVE ============== */
@media (max-width: 960px) {
  .agency-hero-inner { grid-template-columns: 180px 1fr; gap: 24px; }
  .content-grid      { grid-template-columns: 1fr; }
  .content-side .side-card { position: static; }
  .real-wrap         { grid-template-columns: 1fr; }
  .real-side         { position: static; flex-direction: row; overflow-x: auto; }
  .real-side > *     { min-width: 240px; }
  .footer-grid       { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .nav-toggle { display: grid; place-items: center; }
  .nav-links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    background: white;
    padding: 14px;
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-md);
    display: none;
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { text-align: center; padding: 10px; border-radius: 8px; }

  .agency-hero-inner { grid-template-columns: 140px 1fr; gap: 16px; }
  .agency-hero        { padding: 30px 0 24px; }
  .real-main          { padding: 22px 20px; }
  .footer-grid        { grid-template-columns: 1fr; gap: 20px; }
  .result-detail      { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .result-card        { padding: 28px 20px; }
  .palette-grid       { grid-template-columns: repeat(5, 1fr); }
}
