/* ── CSS Variables (set by Customizer via functions.php) ── */
:root {
  --primary: #2563eb;
  --accent: #d97706;
  --text: #1f2937;
  --bg: #f8fafc;
  --font-heading: Georgia, serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --hamburger-slice-color: #fff;
  --hamburger-size: clamp(11px, 7vmin, 22px); /* Sensible value */
}

* { box-sizing: border-box; }

body {
  position: relative;
  font-family: var(--font-body);
  line-height: 1.7;
  margin: 0;
  padding: 0;
  color: var(--text);
  background: var(--bg);
}

/* ── Header ── */
.site-header {
  background: var(--primary);
  color: #fff;
  padding: 1.5rem 1rem;
  text-align: center;
}
.site-header img.custom-logo { max-height: 60px; display: block; margin: 0 auto 0.5rem; }
.site-header .site-title { margin: 0; font-size: 1.8rem; }
.site-header .site-title a { color: #fff; text-decoration: none; }
.site-header .site-title a:hover { text-decoration: underline; }
.site-header .site-tagline { color: rgba(255,255,255,0.85); font-style: italic; margin: 0.25rem 0 0; font-size: 1rem; }

/* ── Search form ── */
.site-header .search-form {
  display: flex;
  max-width: 360px;
  margin: 0.75rem auto 0;
}
.site-header .search-label {
  flex: 1;
}
.site-header .search-field {
  width: 100%;
  padding: 0.4rem 0.6rem;
  border: 1px solid rgba(255,255,255,0.3);
  border-right: none;
  border-radius: 3px 0 0 3px;
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 0.9rem;
}
.site-header .search-field::placeholder { color: rgba(255,255,255,0.5); }
.site-header .search-field:focus {
  outline: none;
  border-color: rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.25);
}
.site-header .search-submit {
  padding: 0.4rem 0.8rem;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 0 3px 3px 0;
  background: rgba(255,255,255,0.2);
  color: #fff;
  cursor: pointer;
  font-size: 0.9rem;
}
.site-header .search-submit:hover { background: rgba(255,255,255,0.35); }

.screen-reader-text {
  border: 0; clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%); height: 1px; margin: -1px;
  overflow: hidden; padding: 0; position: absolute; width: 1px;
}

/* ── Hamburger ── */
#hamburger-toggle,
#hamburger {
  z-index: 20;
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
}

#hamburger-toggle {
  opacity: 0;
  cursor: pointer;
  width: var(--hamburger-size);
  height: var(--hamburger-size);
  z-index: 22;
}

#hamburger {
  display: block;
  cursor: pointer;
  width: var(--hamburger-size);
  height: var(--hamburger-size);
  box-sizing: content-box;
}

#hamburger .slice {
  --slice-height: 4px;
  position: absolute;
  left: 0;
  right: 0;
  height: var(--slice-height);
  border-radius: var(--slice-height);
  background-color: var(--hamburger-slice-color);
  opacity: 0.9;
  transition: top 0.2s ease, margin-top 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

#hamburger .slice:nth-child(1) {
  top: 0;
}

#hamburger .slice:nth-child(2) {
  top: 50%;
  margin-top: calc(var(--slice-height) / -2);
}

#hamburger .slice:nth-child(3) {
  bottom: 0;
}

/* X animation */
#hamburger-toggle:checked ~ #hamburger .slice:nth-child(1) {
  top: 50%;
  margin-top: calc(var(--slice-height) / -2);
  transform: rotate(45deg);
}

#hamburger-toggle:checked ~ #hamburger .slice:nth-child(2) {
  opacity: 0;
}

#hamburger-toggle:checked ~ #hamburger .slice:nth-child(3) {
  top: 50%;
  margin-top: calc(var(--slice-height) / -2);
  transform: rotate(-45deg);
}

/* ── Navigation ── */

.main-nav-items {
    position: absolute;
    list-style: none;
    margin: 0;
    padding: 40px 0;
    display: flex;
    gap: 0.25rem;
    /* flex-wrap: wrap; */
    /* justify-content: center; */
    flex-direction: column;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 10;
    background: black;
    min-width: 180px;
	max-width: 180px;
    text-align: left;
    transform: translateX(-180px);
    transition: transform 0.5s ease;
}

#hamburger-toggle:checked ~ #main-nav-items {
  transform: translateX(0);
}
.main-nav li { position: relative; }
.main-nav a {
  display: block;
  padding: 0.4rem 0.75rem;
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  font-size: 0.9rem;
  border-radius: 4px;
  transition: background 0.15s;
}
.main-nav a:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
}
/* ── Submenu accordion ── */

.submenu-toggle {
  display: none;
}

.submenu-label {
  cursor: pointer;
  float: right;
  padding: 0.4rem 0.75rem;
  position: absolute;
  top: 0;
  right: 0;
}

.submenu-arrow {
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid rgba(255,255,255,0.9);
  transition: transform 0.3s ease;
  vertical-align: middle;
}

.submenu-toggle:checked ~ .submenu-label .submenu-arrow {
  transform: rotate(180deg);
}

.submenu-toggle:checked ~ .sub-menu {
  max-height: 500px;
}

.main-nav .sub-menu {
  max-height: 0;
  overflow: hidden;
  list-style: none;
  margin: 0;
  padding-left: 1rem;
  transition: max-height 0.4s ease;
  width: 180px;
}
.main-nav .sub-menu a { padding: 0.5rem 1rem; font-size: 0.85rem; }
.main-nav .sub-menu a:hover { background: rgba(255,255,255,0.1); }

/* ── Social nav (header) ── */
.site-header .social-nav {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
}
.site-header .social-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}
.site-header .social-nav a {
  display: inline-flex;
  padding: 0.3rem 0.6rem;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-size: 0.85rem;
  border-radius: 4px;
  transition: background 0.15s;
}
.site-header .social-nav a:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

/* ── Main content area ── */
.site-main {
  margin: 0 auto;
  padding: 2rem 1rem;
  min-height: 60vh;
}

/* ── Content wrapper (sidebar support) ── */
.sidebar {
  display: none;
}

.content-wrapper.has-sidebar .sidebar {
  display: block;
  margin-top: 2rem;
  padding: 1.5rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

/* ── Sidebar widgets ── */
.widget {
  margin-bottom: 1.5rem;
}

.widget:last-child {
  margin-bottom: 0;
}

.widget-title {
  font-size: 1.1rem;
  margin: 0 0 0.75rem;
  color: var(--primary);
}

.widget ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.widget li {
  padding: 0.35rem 0;
  border-bottom: 1px solid #f1f5f9;
}

.widget li:last-child {
  border-bottom: none;
}

.widget a {
  color: var(--accent);
  text-decoration: none;
}

.widget a:hover {
  text-decoration: underline;
}

.widget form {
  display: flex;
  gap: 0.5rem;
}

.widget input[type="search"] {
  flex: 1;
  padding: 0.4rem 0.6rem;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 0.9rem;
}

.widget button {
  padding: 0.4rem 0.75rem;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
}

.widget button:hover {
  opacity: 0.9;
}

/* ── Layout: content width ── */
.content-width-constrained-large .content-wrapper {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}
.content-width-constrained-medium .content-wrapper {
  max-width: 1020px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Layout: archive grid ── */
.archive-layout-grid .post-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}
.archive-layout-grid .post-card {
  margin-bottom: 0;
}
.archive-layout-grid .post-card .post-card-thumb img {
  aspect-ratio: 1;
  object-fit: cover;
}

/* ── Post cards (home) — mobile-first: stacked by default ── */
.post-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  transition: box-shadow 0.15s;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
  max-width: 100%;
}
.post-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.post-card-thumb {
  flex-shrink: 0;
  width: 100%;
  height: 180px;
  overflow: hidden;
  border-radius: 6px;
}
.post-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.post-card-content { flex: 1; min-width: 0; }
.post-card h2 { margin: 0 0 0.25rem; font-size: 1.25rem; }
.post-card h2 a { color: var(--primary); text-decoration: none; }
.post-card h2 a:hover { text-decoration: underline; }
.post-card .deck { color: #6b7280; font-size: 0.95rem; margin: 0.25rem 0; line-height: 1.5; }
.post-card .meta { color: #9ca3af; font-size: 0.85rem; margin-top: 0.5rem; }
.post-card .meta a { color: var(--accent); text-decoration: none; }
.post-card .meta a:hover { text-decoration: underline; }

/* ── Single post / page ── */
.entry { background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; padding: 2rem; }
.entry-header h1 { margin-top: 0; margin-bottom: 0.25rem; font-size: 2rem; line-height: 1.3; }
.entry .deck { font-size: 1.15rem; color: #6b7280; margin-top: 0; }
.entry .meta { color: #9ca3af; font-size: 0.9rem; margin-bottom: 1.5rem; }
.entry .meta a { color: var(--accent); text-decoration: none; }
.entry .meta a:hover { text-decoration: underline; }
.entry .featured-img {
	max-width: 100%;
    height: auto;
    border-radius: 6px;
    position: relative;
    z-index: 1;
    display: block;
    margin: 0 auto;
}
.entry .featured::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--featured-bg) center/cover no-repeat;
  filter: blur(20px);
  transform: scale(1.1);
}
.entry .featured {
    position: relative;
    overflow: hidden;
	margin-bottom: 1.5rem;
}

/* ── Article body ── */
.entry-content { line-height: 1.8; font-size: 1.05rem; color: #374151; }
.entry-content h2 { margin-top: 2rem; font-size: 1.5rem; color: var(--primary); }
.entry-content h3 { margin-top: 1.5rem; font-size: 1.25rem; color: var(--primary); }
.entry-content p { margin: 1rem 0; }
.entry-content a { color: var(--accent); }
.entry-content a:hover { text-decoration: underline; }
.entry-content img { max-width: 100%; height: auto; border-radius: 6px; margin: 1rem 0; }
.entry-content blockquote {
  border-left: 4px solid var(--primary);
  margin: 1.5rem 0;
  padding: 0.5rem 1rem;
  background: #f1f5f9;
  color: #475569;
  font-style: italic;
}
.entry-content pre {
  background: #1e293b;
  color: #e2e8f0;
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
  font-size: 0.9rem;
}
.entry-content code {
  background: #f1f5f9;
  padding: 0.15rem 0.35rem;
  border-radius: 3px;
  font-size: 0.9em;
}
.entry-content pre code { background: transparent; padding: 0; border-radius: 0; }
.entry-content ul, .entry-content ol { padding-left: 1.5rem; }
.entry-content hr { border: none; border-top: 1px solid #e5e7eb; margin: 2rem 0; }
.entry-content .wp-block-image { margin: 1.5rem 0; }
.entry-content .wp-block-image img { display: block; }

/* ── Tags ── */
.entry-tags { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid #e5e7eb; font-size: 0.9rem; }
.entry-tags a { color: var(--accent); text-decoration: none; }
.entry-tags a:hover { text-decoration: underline; }

/* ── 404 ── */
.error-404 { text-align: center; padding: 4rem 1rem; }
.error-404 h1 { font-size: 4rem; color: var(--primary); margin: 0; }
.error-404 p { color: #6b7280; font-size: 1.15rem; }
.error-404 a { color: var(--primary); }

/* ── Pagination ── */
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 2rem 0;
  padding: 1rem 0;
  border-top: 1px solid #e5e7eb;
}
.pagination-info { color: #9ca3af; font-size: 0.9rem; }
.pagination-links { display: flex; gap: 1rem; }
.pagination a { color: var(--primary); text-decoration: none; }
.pagination a:hover { text-decoration: underline; }
.pagination .disabled { color: #d1d5db; }

/* ── Footer ── */
.site-footer {
  background: #1e293b;
  color: #94a3b8;
  text-align: center;
  padding: 1.5rem 1rem;
  font-size: 0.9rem;
  margin-top: 3rem;
}
.site-footer a { color: var(--accent); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer p { margin: 0.25rem 0; }

/* ── Footer nav ── */
.footer-nav ul {
  list-style: none;
  margin: 0.5rem 0;
  padding: 0;
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}
.footer-nav li { }
.footer-nav a { padding: 0.25rem 0.5rem; }

/* ── Social nav (footer) ── */
.site-footer .social-nav {
  margin: 0.5rem 0;
}
.site-footer .social-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}
.site-footer .social-nav a {
	display: inline-flex;
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.85rem;
}
.site-footer .social-nav a:hover {
  color: #fff;
}

/* ── Social menu icons ── */
.amc-menu-social {
  display: inline-flex;
  align-items: center;
}
.amc-menu-social-icon {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}
.amc-menu-social-icon svg {
  width: 20px;
  height: 20px;
}
.amc-menu-social-name {
  display: none;
}
@media (min-width: 60.0625em) {
  footer.site-footer .amc-menu-social-name {
    display: inline;
    margin-left: 0.35em;
  }
}

/* ── Mobile-first breakpoints ── */

/* 40.0625em — 641px: portrait tablets, landscape phones */
@media (min-width: 40.0625em) {
  body.archive-layout-list .post-card {
    flex-direction: row;
  }

 body.archive-layout-list .post-card-thumb {
    width: 140px;
    height: 100px;
  }
}

/* 60.0625em — 961px: landscape tablets, lo-res laptops */
@media (min-width: 60.0625em) {
  .content-wrapper.has-sidebar {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    margin: 0 auto;
    padding: 2rem 1rem;
  }

  .content-wrapper.has-sidebar .content-area {
    flex: 1;
    min-width: 0;
    max-width: none;
    margin: 0;
  }

  .content-wrapper.has-sidebar .sidebar {
    width: 280px;
    flex-shrink: 0;
    margin-top: 0;
  }
}
