/* ============================================================
   DRA Theme — 台灣中城再生文化協會
   Design system based on live dra.org.tw
   Full RWD: desktop → tablet → mobile
   ============================================================ */

/* ── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@300;400;500;700&display=swap');

/* ── CSS Variables ────────────────────────────────────────── */
:root {
  --primary:       #68826E;
  --primary-dark:   #4E6352;
  --primary-light:  #ECF2EE;
  --primary-muted:  #A2BDA8;

  --footer-bg:      #A2BDA8;
  --footer-color:   #F7F7F7;

  --bg:             #FFFFFF;
  --text:           #2D2D2D;
  --text-light:     #727272;
  --heading:        #333333;

  --border:         #D5DDD7;
  --border-light:   #ECF2EE;

  --font-body:      'Noto Sans TC', 'Source Sans Pro', Helvetica, sans-serif;
  --font-heading:   'Noto Sans TC', 'Source Sans Pro', Helvetica, sans-serif;

  --max-w:          1400px;
  --content-w:      860px;
  --radius:         4px;
  --shadow:         0 2px 8px rgba(0,0,0,0.08);
  --shadow-hover:   0 6px 20px rgba(0,0,0,0.13);
  --transition:     0.2s ease;
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::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: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); text-decoration: underline; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--heading);
  line-height: 1.4;
  font-weight: 700;
}

h1 { font-size: 2rem;   margin-bottom: 1rem; }
h2 { font-size: 1.5rem; margin-bottom: 0.8rem; }
h3 { font-size: 1.25rem;margin-bottom: 0.6rem; }
h4 { font-size: 1.05rem;margin-bottom: 0.5rem; }

p { margin-bottom: 1rem; }

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

blockquote {
  border-left: 4px solid var(--primary);
  padding: 0.75rem 1.25rem;
  margin: 1.5rem 0;
  background: var(--primary-light);
  color: var(--heading);
  font-style: italic;
}

hr { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }

code, pre {
  font-family: 'Menlo', 'Consolas', monospace;
  font-size: 0.875rem;
  background: var(--primary-light);
  border-radius: var(--radius);
}
code { padding: 0.15em 0.4em; }
pre { padding: 1rem; overflow-x: auto; margin-bottom: 1rem; }

table { width: 100%; border-collapse: collapse; margin-bottom: 1.5rem; font-size: 0.95rem; }
th { background: var(--primary-light); color: var(--primary-dark); font-weight: 700; text-align: left; padding: 0.6rem 1rem; border-bottom: 2px solid var(--primary); }
td { padding: 0.5rem 1rem; border-bottom: 1px solid var(--border-light); }
tr:hover td { background: var(--primary-light); }

/* ── Skip Links ───────────────────────────────────────────── */
.skip-link {
  position: absolute; top: -9999px; left: 50%;
  transform: translateX(-50%); background: var(--primary);
  color: #fff; padding: 0.5rem 1rem; z-index: 9999;
  border-radius: 0 0 var(--radius) var(--radius);
}
.skip-link:focus { top: 0; }

/* ── Site Layout ─────────────────────────────────────────── */
.site { display: flex; flex-direction: column; min-height: 100vh; }

.site-main {
  flex: 1;
  max-width: var(--max-w);
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* ── Header ──────────────────────────────────────────────── */
/* Background image from live site */
.site-header {
  position: relative;
  background-image: url("wp-content/uploads/2023/07/標註頁首背景.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 110px;
  border-bottom: 3px solid var(--primary);
}

/* Light overlay so nav text stays readable over background */
.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.82);
  z-index: 0;
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.site-branding { padding: 0.75rem 0; flex-shrink: 0; }

/* Logo image (matches live site structure) */
.site-branding .custom-logo-link {
  display: block;
  line-height: 0;
}
.site-branding .custom-logo {
  height: auto;
  max-width: 470px;
  width: 100%;
}

.site-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary) !important;
  letter-spacing: 0.02em;
}
.site-title a { color: var(--primary) !important; }
.site-title a:hover { color: var(--primary-dark) !important; text-decoration: none; }

.site-description { font-size: 0.8rem; color: var(--text-light); margin-top: 0.2rem; }

/* ── Secondary Nav (top bar) ─────────────────────────────── */
.secondary-nav { background: #fff; border-bottom: 1px solid var(--border); font-size: 0.82rem; }

.secondary-nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0.35rem 1.5rem;
  display: flex;
  justify-content: flex-end;
  gap: 1.5rem;
  align-items: center;
  list-style: none;
}

.secondary-nav a { color: var(--text); font-size: 0.82rem; }
.secondary-nav a:hover { color: var(--primary); text-decoration: none; }

/* ── Primary Navigation ─────────────────────────────────── */
.primary-navigation {
  background: #fff;
  border-bottom: 2px solid var(--primary);
  position: relative;
  z-index: 100;
}

.primary-navigation-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Reset list styles for nav */
.primary-navigation ul,
.primary-navigation ol,
.primary-navigation .nav-menu {
  list-style: none !important;
  padding: 0;
  margin: 0;
}

/* Desktop: horizontal flex menu */
.nav-menu-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

.nav-menu {
  display: flex;
  flex-wrap: wrap;
}

.primary-navigation li { position: relative; margin: 0; }

.primary-navigation a {
  display: block;
  padding: 0.85rem 1.1rem;
  color: var(--primary) !important;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}

.primary-navigation a:hover,
.primary-navigation .current-menu-item > a {
  background: var(--primary-light);
  color: var(--primary-dark) !important;
  text-decoration: none;
}

/* Dropdown menus */
.primary-navigation .sub-menu,
.primary-navigation .children {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-top: 3px solid var(--primary);
  box-shadow: var(--shadow);
  min-width: 200px;
  z-index: 200;
  list-style: none;
  padding: 0.5rem 0;
}

.primary-navigation li:hover > .sub-menu,
.primary-navigation li:hover > .children { display: block; }

.primary-navigation .sub-menu a,
.primary-navigation .children a {
  padding: 0.6rem 1.2rem;
  font-size: 0.88rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--text) !important;
}

.primary-navigation .sub-menu a:hover,
.primary-navigation .children a:hover {
  background: var(--primary-light);
  color: var(--primary) !important;
}

/* Hamburger toggle — hidden on desktop */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  padding: 0.8rem;
  cursor: pointer;
  color: var(--primary);
  font-size: 1.4rem;
  line-height: 1;
  border-radius: var(--radius);
  transition: background var(--transition);
}
.menu-toggle:hover { background: var(--primary-light); }
.menu-toggle::before { content: "☰"; }

/* ── Entry Header (page titles) ─────────────────────────── */
.entry-header {
  padding: 2rem 0 1rem;
  border-bottom: 2px solid var(--primary-light);
  margin-bottom: 2rem;
}

.entry-title { font-size: 1.9rem; color: var(--primary) !important; margin-bottom: 0.5rem; font-weight: 700; }
.entry-meta { font-size: 0.85rem; color: var(--text-light); margin-top: 0.5rem; }
.entry-meta span + span::before { content: ' · '; color: var(--text-light); }
.taxonomy-description { color: var(--text-light); font-size: 0.95rem; margin-top: 0.5rem; }

/* ── Article Cards (grid layout) ────────────────────────── */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.post-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}

.post-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }

.post-card-thumbnail {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-bottom: 1px solid var(--border-light);
}

.post-card-body { padding: 1rem 1.1rem; }
.post-card-category { display: inline-block; font-size: 0.75rem; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.4rem; }
.post-card-title { font-size: 1.05rem; margin-bottom: 0.5rem; line-height: 1.45; }
.post-card-title a { color: var(--heading) !important; }
.post-card-title a:hover { color: var(--primary) !important; text-decoration: none; }
.post-card-excerpt { font-size: 0.88rem; color: var(--text-light); line-height: 1.65; margin-bottom: 0.5rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-card-meta { font-size: 0.78rem; color: var(--text-light); }

/* ── Article / Single Post ──────────────────────────────── */
article.type-post,
article.type-page { max-width: var(--content-w); }

.entry-content { line-height: 1.8; font-size: 1rem; color: var(--text); }
.entry-content p { margin-bottom: 1.3rem; }
.entry-content h2 { margin-top: 2.5rem; margin-bottom: 1rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--primary-light); color: var(--primary-dark); }
.entry-content h3 { margin-top: 2rem; margin-bottom: 0.8rem; color: var(--primary-dark); }
.entry-content h4 { margin-top: 1.5rem; margin-bottom: 0.6rem; color: var(--heading); }

/* ── Article List (archive pages) ──────────────────────── */
.posts-list { display: flex; flex-direction: column; gap: 1.5rem; margin-bottom: 2rem; }

.post-list-item {
  display: flex;
  gap: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-light);
  align-items: flex-start;
}

.post-list-item .post-thumb { flex-shrink: 0; width: 180px; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--border); }
.post-list-item .post-thumb-square { flex-shrink: 0; width: 120px; height: 120px; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--border); }
.post-list-item h2 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.post-list-item h2 a { color: var(--heading) !important; }
.post-list-item h2 a:hover { color: var(--primary) !important; }
.post-list-item .cat-links { font-size: 0.78rem; color: var(--primary); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.3rem; }

/* ── Sidebar / Widget Area ──────────────────────────────── */
.widget-area {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.widget { background: var(--primary-light); padding: 1.2rem; border-radius: var(--radius); border: 1px solid var(--border-light); }
.widget-title { font-size: 0.9rem; font-weight: 700; color: var(--primary-dark); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.8rem; padding-bottom: 0.4rem; border-bottom: 2px solid var(--primary); }
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget li { padding: 0.4rem 0; border-bottom: 1px solid var(--border-light); font-size: 0.88rem; }
.widget li:last-child { border-bottom: none; }

/* ── Pagination ─────────────────────────────────────────── */
.pagination,
.post-navigation,
.article-navigation {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 2rem 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  clear: both;
}

.pagination a,
.pagination span {
  display: inline-block;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.88rem;
  color: var(--primary);
  transition: all var(--transition);
}

.pagination a:hover { background: var(--primary-light); border-color: var(--primary); text-decoration: none; color: var(--primary-dark); }
.pagination .current { background: var(--primary); color: #fff; border-color: var(--primary); font-weight: 700; }

/* ── Figure / Caption ───────────────────────────────────── */
figure { margin: 1.5rem 0; }
figcaption { font-size: 0.82rem; color: var(--text-light); text-align: center; margin-top: 0.5rem; font-style: italic; }

/* ── Buttons ────────────────────────────────────────────── */
button, .button, .wp-block-button__link, input[type="submit"], .post-edit-link {
  display: inline-block;
  padding: 0.6rem 1.4rem;
  background: var(--primary-light);
  color: var(--primary) !important;
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none !important;
}

button:hover, .button:hover, .wp-block-button__link:hover,
input[type="submit"]:hover, .post-edit-link:hover {
  background: var(--primary);
  color: #fff !important;
  text-decoration: none !important;
}

.read-more, .more-link {
  display: inline-block;
  font-size: 0.88rem;
  color: var(--primary);
  font-weight: 500;
  margin-top: 0.5rem;
  border-bottom: 1px solid var(--primary);
  padding-bottom: 1px;
}
.read-more:hover, .more-link:hover { color: var(--primary-dark); text-decoration: none; border-bottom-color: var(--primary-dark); }

/* ── Tags ───────────────────────────────────────────────── */
.tags-links, .tag-links { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1rem; font-size: 0.8rem; }
.tags-links a, .tag-links a {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  background: var(--primary-light);
  color: var(--primary) !important;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.78rem;
}
.tags-links a:hover, .tag-links a:hover { background: var(--primary); color: #fff !important; border-color: var(--primary); text-decoration: none; }

/* ── Comments ───────────────────────────────────────────── */
.comments-area { margin-top: 3rem; padding-top: 2rem; border-top: 2px solid var(--primary-light); }
.comments-title { font-size: 1.2rem; color: var(--primary-dark); margin-bottom: 1.5rem; }

/* ── Footer ─────────────────────────────────────────────── */
.site-footer { background: var(--footer-bg); color: var(--footer-color); margin-top: auto; padding: 2.5rem 0 1.5rem; }
.footer-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }

.footer-widgets {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-widget-title { font-size: 0.9rem; font-weight: 700; color: #fff; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.8rem; padding-bottom: 0.4rem; border-bottom: 2px solid rgba(255,255,255,0.3); }
.footer-widget { font-size: 0.88rem; line-height: 1.7; }
.footer-widget a { color: rgba(255,255,255,0.85) !important; }
.footer-widget a:hover { color: #fff !important; text-decoration: underline; }
.footer-widget ul { list-style: none; padding: 0; }
.footer-widget li { padding: 0.25rem 0; border-bottom: 1px solid rgba(255,255,255,0.15); }

.site-info { border-top: 1px solid rgba(255,255,255,0.25); padding-top: 1.2rem; font-size: 0.82rem; text-align: center; color: rgba(255,255,255,0.8); }
.site-info a { color: rgba(255,255,255,0.9) !important; }

/* ── Section Headers ─────────────────────────────────────── */
.section-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.section-header h2 { color: var(--primary); font-size: 1.2rem; margin: 0; white-space: nowrap; }
.section-header::after { content: ''; flex: 1; height: 2px; background: var(--primary-light); }

/* ── Two-column layout (sidebar + main) ─────────────────── */
.has-sidebar { display: grid; grid-template-columns: 1fr 280px; gap: 2.5rem; align-items: start; }
.has-sidebar .site-main { padding: 2rem 1.5rem; }
.sidebar { padding-top: 2rem; }

/* ── Map embed area ─────────────────────────────────────── */
.google-map-embed { margin: 2rem 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.google-map-embed iframe { width: 100%; height: 350px; border: none; display: block; }

/* ── Post/Page Navigation ──────────────────────────────── */
.post-nav { display: flex; justify-content: space-between; gap: 1rem; margin: 2rem 0; padding: 1.2rem; background: var(--primary-light); border-radius: var(--radius); border: 1px solid var(--border-light); }
.post-nav-prev, .post-nav-next { font-size: 0.88rem; max-width: 45%; }
.post-nav a { display: block; color: var(--primary-dark); font-weight: 700; }
.post-nav a:hover { color: var(--primary); }

/* ── Utility Classes ────────────────────────────────────── */
.text-center { text-align: center; }
.text-right  { text-align: right;  }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }

.attachment-medium { max-width: 100%; height: auto; }
.alignleft  { float: left;  margin: 0.5rem 1.2rem 0.5rem 0; }
.alignright { float: right; margin: 0.5rem 0 0.5rem 1.2rem; }
.aligncenter { display: block; margin: 0 auto; }

.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 0.82rem; color: var(--text-light); text-align: center; margin-top: 0.4rem; font-style: italic; }
.has-text-align-center { text-align: center; }

.cat-links { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--primary); font-weight: 700; }

/* ================================================================
   RESPONSIVE — Tablet (768px–1024px)
   ================================================================ */
@media (max-width: 1024px) {
  /* Two-column → single column */
  .has-sidebar { grid-template-columns: 1fr; }
  .sidebar { padding-top: 0; }

  /* Footer widgets → 2 columns */
  .footer-widgets { grid-template-columns: repeat(2, 1fr); }

  /* Nav items slightly smaller */
  .primary-navigation a { padding: 0.75rem 0.9rem; font-size: 0.88rem; }
}

/* ================================================================
   RESPONSIVE — Mobile (< 768px)
   ================================================================ */

/* ── Secondary nav inside header (matching live site) ── */
.secondary-nav-wrapper {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 100;
}
.secondary-nav {
  display: block;
}
.secondary-nav-inner ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0;
  align-items: center;
}
.secondary-nav-inner ul li {
  display: inline-block;
}
.secondary-nav-inner ul li a {
  display: inline-block;
  padding: 0.4em 1em;
  color: #2c2d33;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: background 0.2s;
}
.secondary-nav-inner ul li a:hover {
  background: rgba(0,0,0,0.08);
  text-decoration: none;
}
.secondary-nav-inner ul li:first-child a {
  padding-left: 0;
}
.secondary-nav-inner ul li:last-child a {
  padding-right: 0;
}

/* Mobile toggle button */
.header-menu-toggle {
  display: none;
  position: absolute;
  top: 0.5em;
  right: 0;
  z-index: 200;
  background: rgba(255,255,255,0.9);
  border: 2px solid rgba(0,0,0,0.15);
  border-radius: 4px;
  padding: 0.4em 0.8em;
  font-size: 0.85rem;
  cursor: pointer;
  color: #2c2d33;
}

/* ── Mobile ── */
@media (max-width: 768px) {
  /* ── Secondary Nav ── */
  .secondary-nav-inner {
    padding: 0.3rem 1rem;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
  }

  /* ── Primary Nav: hamburger mode ── */
  .menu-toggle { display: flex; align-items: center; justify-content: center; }

  .primary-navigation-inner { padding: 0; }

  /* Nav menu: hidden by default on mobile, shown when toggled */
  .nav-menu-wrapper {
    display: none;
    flex-direction: column;
    width: 100%;
    border-top: 1px solid var(--border);
  }

  .nav-menu-wrapper.is-open { display: flex; }

  .nav-menu {
    flex-direction: column;
    width: 100%;
  }

  .primary-navigation li { width: 100%; border-bottom: 1px solid var(--border-light); }

  .primary-navigation a {
    padding: 0.9rem 1rem;
    font-size: 0.95rem;
    border-bottom: none;
    white-space: normal;
  }

  /* Dropdowns: expand inline on mobile */
  .primary-navigation .sub-menu,
  .primary-navigation .children {
    position: static;
    display: none;
    border: none;
    border-top: 1px solid var(--border-light);
    box-shadow: none;
    padding: 0;
    background: var(--primary-light);
  }

  .primary-navigation li.dropdown-open > .sub-menu,
  .primary-navigation li.dropdown-open > .children { display: block; }

  .primary-navigation .sub-menu a,
  .primary-navigation .children a {
    padding: 0.75rem 1.5rem;
    font-size: 0.88rem;
  }

  /* Dropdown indicator */
  .primary-navigation li.menu-item-has-children > a::after {
    content: ' ▾';
    font-size: 0.7em;
    color: var(--text-light);
  }

  /* ── Site main ── */
  .site-main { padding: 1.25rem 1rem; }

  /* ── Entry header ── */
  .entry-header { padding: 1.5rem 0 0.75rem; margin-bottom: 1.5rem; }
  .entry-title { font-size: 1.6rem; }

  /* ── Posts grid → single column ── */
  .posts-grid { grid-template-columns: 1fr; gap: 1rem; }

  /* ── Post list: vertical stack ── */
  .post-list-item { flex-direction: column; gap: 0.75rem; }

  .post-list-item .post-thumb,
  .post-list-item .post-thumb-square {
    width: 100%;
    height: 200px;
  }

  .post-list-item h2 { font-size: 1.1rem; }

  /* ── Sidebar widgets → single column ── */
  .widget-area { grid-template-columns: 1fr; }

  /* ── Footer widgets → single column ── */
  .footer-widgets { grid-template-columns: 1fr; gap: 1.5rem; }

  .footer-inner { padding: 0 1rem; }

  /* ── Post nav: stack vertically ── */
  .post-nav { flex-direction: column; gap: 0.75rem; }
  .post-nav-prev, .post-nav-next { max-width: 100%; }

  /* ── Section headers ── */
  .section-header h2 { font-size: 1rem; }

  /* ── Typography ── */
  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.3rem; }
  h3 { font-size: 1.1rem; }

  /* ── Pagination ── */
  .pagination { justify-content: center; }

  /* ── Tables: horizontal scroll ── */
  table { font-size: 0.88rem; }
  table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* ── Google map ── */
  .google-map-embed iframe { height: 260px; }

  /* ── Buttons: full width on mobile ── */
  button, .button, input[type="submit"] { width: 100%; text-align: center; }
}

/* ================================================================
   RESPONSIVE — Small Mobile (< 481px)
   ================================================================ */
@media (max-width: 480px) {
  /* ── Site header inner ── */
  .header-inner { padding: 0 0.75rem; gap: 0; }

  .site-branding { padding: 0.6rem 0; }

  .site-title { font-size: 1.15rem; }
  .site-description { display: none; }

  /* ── Menu toggle ── */
  .menu-toggle { padding: 0.6rem 0.75rem; font-size: 1.2rem; }

  /* ── Nav items ── */
  .primary-navigation a { padding: 0.8rem 0.75rem; font-size: 0.9rem; }
  .primary-navigation .sub-menu a,
  .primary-navigation .children a { padding: 0.65rem 1.25rem; font-size: 0.85rem; }

  /* ── Main content ── */
  .site-main { padding: 1rem 0.75rem; }

  /* ── Images: always max-width ── */
  img { max-width: 100%; }

  /* ── Footer ── */
  .site-footer { padding: 1.5rem 0 1rem; }

  /* ── Article content: slightly smaller text ── */
  .entry-content { font-size: 0.95rem; }
  .entry-content p { margin-bottom: 1rem; }

  /* ── Tags ── */
  .tags-links a, .tag-links a { font-size: 0.72rem; padding: 0.15rem 0.5rem; }

  /* ── Post card body ── */
  .post-card-body { padding: 0.8rem; }
  .post-card-title { font-size: 0.98rem; }

  /* ── Section header: smaller text ── */
  .section-header h2 { font-size: 0.9rem; }
  .section-header { gap: 0.6rem; }

  /* ── Map ── */
  .google-map-embed iframe { height: 200px; }

  /* ── Images inside articles: full bleed on small screens ── */
  .entry-content figure { margin: 1rem -0.75rem; }
  .entry-content img { max-width: 100%; }
}

/* ================================================================
   RESPONSIVE — Wide Desktop (> 1400px) — constrain max width
   ================================================================ */
@media (min-width: 1400px) {
  .site-main { padding: 2.5rem 0; }
  .header-inner, .footer-inner, .primary-navigation-inner { padding: 0; }
}
