/* ============================================================
   PrepHK: Real Estate — SEO Pages Shared Stylesheet
   Sky-blue gradient theme, mobile-first, no JS, no external fonts
   ============================================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: linear-gradient(180deg, #7dd3fc, #bae6fd, #e0f2fe, #f0f9ff);
  background-attachment: fixed;
  min-height: 100vh;
  color: #0c4a6e;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: #0ea5e9;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* --- Layout --- */
.container {
  max-width: 680px;
  margin: 0 auto;
  padding: 48px 20px 64px;
}

/* --- Typography --- */
h1 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1.3;
}

h2 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
}

.subtitle {
  font-size: 15px;
  color: #6b7280;
  margin-bottom: 28px;
}

.intro {
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 6px;
}

.intro-en {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.6;
  margin-bottom: 28px;
}

/* --- Glass Card --- */
.card {
  background: rgba(255, 255, 255, 0.75);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 16px;
  border: 1px solid rgba(186, 230, 253, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.card h2 {
  font-size: 18px;
  margin-bottom: 8px;
}

.card p {
  font-size: 14px;
  color: #374151;
  line-height: 1.6;
}

/* --- Badge (Q1, Q2, ...) --- */
.badge {
  display: inline-block;
  background: #0ea5e9;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 20px;
  margin-bottom: 12px;
  letter-spacing: 0.3px;
}

/* --- Question Card --- */
.question-card {
  background: rgba(255, 255, 255, 0.75);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 20px;
  border: 1px solid rgba(186, 230, 253, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.question-text {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.7;
  margin-bottom: 6px;
  white-space: pre-wrap;
}

.question-text-en {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.6;
  margin-bottom: 16px;
  white-space: pre-wrap;
}

/* --- Options --- */
.options-list {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
}

.option-item {
  font-size: 15px;
  line-height: 1.6;
  padding: 10px 14px;
  margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 10px;
  border: 1px solid rgba(186, 230, 253, 0.35);
  transition: background 0.15s ease;
}

.option-item:last-child {
  margin-bottom: 0;
}

.options-en {
  list-style: none;
  padding: 0;
  margin: 8px 0 16px;
  font-size: 13px;
  color: #6b7280;
  line-height: 1.5;
}

.options-en li {
  padding: 4px 14px;
}

/* --- Answer Reveal (details/summary) --- */
.answer-reveal {
  margin-top: 12px;
  border-radius: 12px;
  overflow: hidden;
}

.answer-reveal summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: #0ea5e9;
  padding: 10px 14px;
  background: rgba(14, 165, 233, 0.08);
  border-radius: 12px;
  list-style: none;
  user-select: none;
  -webkit-user-select: none;
  transition: background 0.2s ease;
}

.answer-reveal summary::-webkit-details-marker {
  display: none;
}

.answer-reveal summary::before {
  content: "\25B6\FE0E";
  display: inline-block;
  margin-right: 8px;
  font-size: 11px;
  transition: transform 0.25s ease;
}

.answer-reveal[open] summary::before {
  transform: rotate(90deg);
}

.answer-reveal summary:hover {
  background: rgba(14, 165, 233, 0.14);
}

.answer-reveal[open] summary {
  border-radius: 12px 12px 0 0;
}

/* Smooth expand animation via grid trick (pure CSS) */
.answer-reveal .answer-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease;
}

.answer-reveal[open] .answer-body {
  grid-template-rows: 1fr;
}

.answer-reveal .answer-body > div {
  overflow: hidden;
}

.answer-reveal .answer-content {
  padding: 14px;
  background: rgba(14, 165, 233, 0.04);
  border-radius: 0 0 12px 12px;
  border: 1px solid rgba(186, 230, 253, 0.3);
  border-top: none;
}

/* --- Correct Answer --- */
.correct-answer {
  font-size: 15px;
  font-weight: 600;
  color: #059669;
  margin-bottom: 10px;
}

/* --- Key Knowledge --- */
.key-knowledge {
  font-size: 14px;
  line-height: 1.7;
  color: #374151;
  margin-bottom: 6px;
}

.key-knowledge ul {
  padding-left: 18px;
  margin: 4px 0;
}

.key-knowledge li {
  margin-bottom: 4px;
}

.key-knowledge-en {
  font-size: 13px;
  line-height: 1.6;
  color: #6b7280;
}

.key-knowledge-en ul {
  padding-left: 18px;
  margin: 4px 0;
}

.key-knowledge-en li {
  margin-bottom: 3px;
}

/* --- CTA Banner --- */
.cta-banner {
  background: linear-gradient(135deg, #EFF6FF, #DBEAFE);
  color: #0C4A6E;
  border-radius: 20px;
  padding: 28px;
  margin: 32px 0;
  text-align: center;
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.cta-banner h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #0C4A6E;
}

.cta-banner p {
  font-size: 15px;
  line-height: 1.6;
  color: #075985;
  margin-bottom: 18px;
}

.cta-link {
  display: block;
  background: #0B1426;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  padding: 16px 24px;
  border-radius: 14px;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.15s ease;
}

.cta-link:hover {
  text-decoration: none;
  background: #1E293B;
  transform: translateY(-1px);
}

.cta-link .arrow {
  display: inline-block;
  margin-left: 4px;
  transition: transform 0.15s ease;
}

.cta-link:hover .arrow {
  transform: translateX(2px);
}

/* --- Navigation Links --- */
.nav-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 32px 0 16px;
  font-size: 14px;
  gap: 12px;
}

.nav-links a {
  color: #0ea5e9;
  font-weight: 500;
  white-space: nowrap;
}

.nav-links .nav-prev::before {
  content: "\2190\00A0";
}

.nav-links .nav-next::after {
  content: "\00A0\2192";
}

/* --- Part Index Grid (Homepage) --- */
.part-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin: 24px 0;
}

.part-card {
  display: block;
  background: rgba(255, 255, 255, 0.75);
  border-radius: 14px;
  padding: 20px 16px;
  border: 1px solid rgba(186, 230, 253, 0.5);
  text-decoration: none;
  color: #0c4a6e;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.part-card:hover {
  text-decoration: none;
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(12, 74, 110, 0.12);
}

.part-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.part-en {
  font-size: 12px;
  color: #6b7280;
  line-height: 1.4;
  margin-bottom: 8px;
}

.part-count {
  font-size: 12px;
  color: #0ea5e9;
  font-weight: 500;
}

/* --- Bottom Links --- */
.links {
  margin-top: 28px;
  text-align: center;
}

.links a {
  display: inline-block;
  margin: 0 12px;
  font-size: 14px;
}

/* --- Disclaimer --- */
.disclaimer {
  font-size: 12px;
  color: #6b7280;
  margin-top: 36px;
  line-height: 1.6;
  text-align: center;
}

/* --- Responsive --- */
@media (max-width: 480px) {
  .container {
    padding: 32px 16px 48px;
  }

  h1 {
    font-size: 22px;
  }

  .part-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .question-card {
    padding: 18px;
  }

  .option-item {
    padding: 8px 12px;
    font-size: 14px;
  }

  .cta-banner {
    padding: 20px 16px;
  }

  .nav-links {
    font-size: 13px;
    gap: 8px;
  }
}

@media (min-width: 481px) and (max-width: 768px) {
  .container {
    padding: 40px 20px 56px;
  }
}

/* --- Print --- */
@media print {
  body {
    background: #fff;
  }

  .cta-banner,
  .nav-links {
    display: none;
  }

  .card,
  .question-card,
  .part-card {
    background: #fff;
    border: 1px solid #d1d5db;
    backdrop-filter: none;
  }
}
