/* ============================================
   HK → AU Immigration Blog
   Clean • Australian Green & Gold • Simple
   ============================================ */

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

:root {
  /* Australian palette – eucalyptus green & golden wattle */
  --gum: #2d7a4f;
  --gum-light: #3a9963;
  --wattle: #d4a017;
  --wattle-light: #f0c845;
  --sky: #4da8da;
  --sky-light: #7ec8e3;
  --text: #2b3a2e;
  --text-light: #5f7265;
  --bg: #fafcf8;
  --card-bg: #ffffff;
  --border: #e4ebe2;
  --max-width: 44rem;
  --radius: 12px;
  --gradient: linear-gradient(135deg, var(--gum), var(--wattle));
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  padding: 0 1.25rem;
  -webkit-font-smoothing: antialiased;
}

/* ---- Header ---- */
header {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

nav {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

nav a {
  text-decoration: none;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
}

nav a:hover {
  color: var(--gum);
}

.site-title {
  font-weight: 800;
  font-size: 1.3rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---- Language Switcher ---- */
.lang-switcher {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.2rem;
  font-size: 0.8rem;
}

.lang-switcher a,
.lang-active {
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  text-decoration: none;
  transition: all 0.2s;
}

.lang-switcher a {
  color: var(--text-light);
}

.lang-switcher a:hover {
  color: var(--gum);
  background: #e8f5ed;
}

.lang-active {
  font-weight: 700;
  color: #fff;
  background: var(--gradient);
}

/* ---- Wide Hero Image ---- */
.hero-image-wide {
  position: relative;
  width: 100%;
  max-width: 64rem;
  margin: 0 auto 2.5rem;
  border-radius: var(--radius);
  overflow: hidden;
}

.hero-image-wide img {
  display: block;
  width: 100%;
  height: 380px;
  object-fit: cover;
}

.hero-image-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.15) 60%, transparent 100%);
  color: #fff;
  padding: 2rem;
}

.hero-image-overlay .emoji {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 0.5rem;
}

.hero-image-overlay h1 {
  font-size: 2.2rem;
  font-weight: 800;
  margin: 0 0 0.4rem;
  line-height: 1.25;
  text-shadow: 0 2px 12px rgba(0,0,0,0.3);
  color: #fff;
}

.hero-image-overlay p {
  font-size: 1.05rem;
  opacity: 0.92;
  margin: 0;
  max-width: 34rem;
  text-shadow: 0 1px 6px rgba(0,0,0,0.3);
}

/* ---- Main Content ---- */
main {
  max-width: var(--max-width);
  margin: 0 auto 4rem;
}

h1, h2, h3 {
  line-height: 1.3;
}

h1 {
  font-size: 1.85rem;
  font-weight: 800;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
  color: var(--gum);
}

h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

a {
  color: var(--gum);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--gum-light);
}

.external-link-icon {
  font-size: 0.7em;
  color: var(--gum);
  --fa-primary-color: var(--gum);
  --fa-secondary-color: var(--gum);
}

p {
  margin-bottom: 1rem;
}

ul, ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.3rem;
}

pre {
  background: #f5f8f3;
  border: 1px solid var(--border);
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  overflow-x: auto;
  margin-bottom: 1.25rem;
  font-size: 0.88rem;
}

code {
  font-family: "SF Mono", "Fira Code", Menlo, Consolas, monospace;
  font-size: 0.88em;
}

blockquote {
  border-left: 4px solid var(--wattle);
  padding: 0.75rem 1.25rem;
  margin: 1.25rem 0;
  background: #fdfaf0;
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-light);
  font-style: italic;
}

hr {
  margin-bottom: 1rem;
}

/* ---- Link list (series navigation) ---- */
.link-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.link-list li a {
  display: inline-block;
  padding: 0.45rem 1rem;
  background: #e8f5ed;
  color: var(--gum);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.2s, color 0.2s;
}

.link-list li a:hover {
  background: var(--gum);
  color: #fff;
}

/* ---- Section heading ---- */
.section-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ---- Post List ---- */
.post-list {
  margin-top: 1rem;
}

.post-preview {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
  transition: transform 0.2s, box-shadow 0.2s;
  overflow: hidden;
}

.post-preview.has-image {
  display: flex;
  flex-direction: column;
}

.post-preview:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
}

.post-preview-image {
  width: 100%;
  overflow: hidden;
}

.post-preview-image img {
  display: block;
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s;
}

.post-preview:hover .post-preview-image img {
  transform: scale(1.03);
}

.post-preview-body {
  padding: 1.25rem 1.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.post-preview h3 {
  margin: 0;
  font-size: 1.15rem;
}

.post-preview h3 a {
  text-decoration: none;
  color: var(--text);
  transition: color 0.2s;
}

.post-preview h3 a:hover {
  color: var(--gum);
}

.post-preview time {
  font-size: 0.8rem;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.post-preview time svg,
.post time svg {
  font-size: 1em;
  margin-right: 0.1em;
  color: var(--sky);
}

.post-preview p {
  margin: 0;
  color: var(--text-light);
  font-size: 0.95rem;
}

.post-preview .tags {
  margin: 0;
}

/* Posts without image keep old padding */
.post-preview:not(.has-image) {
  padding: 1.5rem 1.75rem;
}

/* ---- Single Post ---- */
.post {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
}

.post h1 {
  margin-top: 0;
  font-size: 1.85rem;
}

.post time {
  font-size: 0.8rem;
  display: block;
  color: var(--text-light);
  margin-bottom: 0.75rem;
}

.tags {
  margin-bottom: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  border: none;
}

/* Cycle tag colours */
.tag:nth-child(5n+1) { background: #e8f5ed; color: var(--gum); }
.tag:nth-child(5n+2) { background: #fdf5e0; color: #9a7c0f; }
.tag:nth-child(5n+3) { background: #e3f2fb; color: #2a7fb5; }
.tag:nth-child(5n+4) { background: #eef8e8; color: #3a7a2d; }
.tag:nth-child(5n+5) { background: #fef3e0; color: #b8860b; }

.post-content {
  margin-top: 1.5rem;
}

.post-content h2:first-child {
  margin-top: 0;
}

.post-content figure {
  margin: 1.25rem 0;
}

.post-content img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
}

.post-content figure.multi {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.post-content figure.multi figcaption {
  grid-column: 1 / -1;
}

.post-content figcaption {
  font-size: 0.82rem;
  color: var(--text-light);
  text-align: center;
  margin-top: 0.2rem;
}

.post-content figcaption svg {
  color: var(--sky);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 2.5rem;
  padding: 0.6rem 1.25rem;
  background: #e8f5ed;
  color: var(--gum);
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.2s;
}

.back-link:hover {
  background: #d0ebda;
}

/* ---- About page ---- */
.about-content {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
}

.about-content h1 {
  margin-top: 0;
}

/* ---- Pagination ---- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 2.5rem;
  padding: 1.5rem 0;
}

.pagination-btn {
  display: inline-block;
  padding: 0.6rem 1.4rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}

a.pagination-btn {
  background: var(--gum);
  color: #fff;
}

a.pagination-btn:hover {
  background: #236640;
  transform: translateY(-1px);
}

.pagination-btn.disabled {
  background: var(--border);
  color: var(--text-light);
  cursor: default;
}

.pagination-info {
  font-size: 0.85rem;
  color: var(--text-light);
  font-weight: 500;
}

/* ---- Footer ---- */
footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 0;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-light);
}

footer a {
  color: var(--text-light);
}

footer .heart {
  color: var(--gum);
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
  header {
    flex-direction: column;
    gap: 0.75rem;
  }

  .hero-image-wide img {
    height: 220px;
  }

  .hero-image-overlay h1 {
    font-size: 1.4rem;
  }

  .hero-image-overlay p {
    font-size: 0.9rem;
  }

  .hero-image-wide {
    border-radius: 0;
  }

  .post-preview-image img {
    height: 160px;
  }

  .post {
    padding: 1.5rem 1.25rem;
  }

  .about-content {
    padding: 1.5rem 1.25rem;
  }

  .pagination {
    gap: 0.5rem;
  }

  .pagination-btn {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }

  .pagination-info {
    font-size: 0.75rem;
  }
}
