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

:root {
  --paper: #f7f4ef;
  --paper-dark: #ede9e1;
  --ink: #1c1a17;
  --ink-mid: #4a4640;
  --ink-light: #8c877f;
  --red: #8b2020;
  --red-soft: #c14040;
  --red-pale: #f0e6e6;
  --border: rgba(28,26,23,0.12);
  --border-strong: rgba(28,26,23,0.22);
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Source Serif 4', Georgia, serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;                     /* was 16px */
  line-height: 1.7;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
}

p {
  text-align: justify;
}

/* ─── BANNER ─── */
.banner {
  /*padding: 1.8rem 4rem 1.5rem;*/
  padding: 2.5rem 4rem 2rem;
  border-bottom: 0.0625rem solid var(--border);
}
.banner-inner {
  max-width: 67.5rem;                    /* was 960px */
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.banner a {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  text-decoration: none;
  color: inherit;
}
.banner a:hover .logo-text h1 {
  color: var(--red);
}
.logo-mark {
  width: 100%;
  height: 100%;
  flex-shrink: 0;
}
.logo-text h1 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.1;
  transition: color 0.2s;
}
.logo-text h1 span {
  color: var(--red);
}
.logo-text p {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 300;
  color: var(--ink-light);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 0.2rem;
}

/* ─── ARTICLE NAV ─── */
.article-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247,244,239,0.97);
  backdrop-filter: blur(0.375rem);     /* was 6px */
  border-bottom: 0.0625rem solid var(--border-strong);
  box-shadow: 0 0.0625rem 0.5rem rgba(28,26,23,0.06);
}
.article-nav-inner {
  max-width: 60rem;                    /* was 960px */
  margin: 0 auto;
  padding: 0 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 0;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-mid);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-back:hover {
  color: var(--red);
}
.nav-back svg {
  width: 1rem;                         /* was 16px */
  height: 1rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav-article-meta {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  font-size: 0.72rem;
  color: var(--ink-light);
  letter-spacing: 0.04em;
}
.nav-article-meta .nav-tag {
  display: inline-block;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red);
  border: 0.0625rem solid var(--red-pale);
  background: var(--red-pale);
  padding: 0.15rem 0.45rem;
  border-radius: 0.125rem;            /* was 2px */
}
.nav-share-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink-light);
  padding: 0.3rem;
  display: inline-flex;
  align-items: center;
  transition: color 0.2s;
}
.nav-share-btn:hover {
  color: var(--red-soft);
}
.nav-share-btn svg {
  width: 0.9375rem;                    /* was 15px */
  height: 0.9375rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}





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



/* ─── ARTICLE CONTENT ─── */
.article-main {
  max-width: 75rem;                    /* was 1200px */
  margin: 3rem auto 4rem;
  padding: 0 4rem;
}
.article-header {
  margin-bottom: 2.5rem;
}
.article-header .card-tag {
  display: inline-block;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
  border: 0.0625rem solid var(--red-pale);
  background: var(--red-pale);
  padding: 0.2rem 0.55rem;
  border-radius: 0.125rem;            /* was 2px */
  margin-bottom: 1rem;
}
.article-title {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
  margin-bottom: 0.8rem;
}
.article-meta {
  font-size: 0.82rem;
  color: var(--ink-light);
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  border-bottom: 0.0625rem solid var(--border);
  padding-bottom: 1.4rem;
}
.article-meta .separator {
  color: var(--border-strong);
}
.article-featured-img {
  width: 100%;
  margin: 2rem 0;
  border-radius: 0.1875rem;           /* was 3px */
  overflow: hidden;
  /*border: 0.0625rem solid var(--border);*/
}
.article-featured-img img {
  /*width: 100%;
  display: block;*/
    width: 63%;
  margin: 0 auto;
  display: block;
  border-radius: 0.2rem;
}
.article-featured-img .img-ph {
  width: 100%;
  height: 21.25rem;                    /* was 340px */
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper-dark);
}
.article-body {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--ink-mid);
}
.article-body p {
  margin-bottom: 1.5rem;
}
.article-body h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--ink);
  margin: 2.5rem 0 1rem;
  border-left: 0.1875rem solid var(--red-soft);  /* was 3px */
  padding-left: 0.9rem;
}
.article-body h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink);
  margin: 2rem 0 0.8rem;
}
.article-body blockquote {
  border-left: 0.1875rem solid var(--red-pale);  /* was 3px */
  margin: 2rem 0;
  padding: 0.8rem 1.5rem;
  font-style: italic;
  color: var(--ink-mid);
  background: #fff;
  border-radius: 0 0.1875rem 0.1875rem 0;        /* was 0 3px 3px 0 */
  border: 0.0625rem solid var(--border);
  border-left: 0.1875rem solid var(--red-soft);
}
.article-body blockquote p {
  margin-bottom: 0;
}
.article-body ul, .article-body ol {
  margin: 1.2rem 0 1.8rem 1.5rem;
}
.article-body li {
  margin-bottom: 0.5rem;
}
.article-body a {
  color: var(--red-soft);
  text-decoration: none;
  border-bottom: 0.0625rem solid var(--red-pale);
  transition: border-color 0.2s, color 0.2s;
}
.article-body a:hover {
  color: var(--red);
  border-color: var(--red-soft);
}

/* Style for centered WordPress image blocks */
.wp-block-image.aligncenter.size-full {
  text-align: center;        /* centers the figcaption text */
  margin: 2rem auto;         /* vertical spacing, horizontal auto */
}

/* The image itself: 50% width and centered */
.wp-block-image.aligncenter.size-full img {
  width: 40%;
  height: auto;              /* maintain aspect ratio */
  display: block;
  margin: 0 auto;            /* horizontal centering */
  border-radius: 0.1875rem;  /* optional: match your other images */
}

/* Style the caption (figcaption) */
.wp-block-image.aligncenter.size-full figcaption {
  font-size: 1.05rem;
  color: var(--ink-light);
  text-align: center;
  margin-top: 0.75rem;
  line-height: 1.4;
  font-style: normal;
  border-top: none;          /* remove any unwanted borders */
}

.callout-box {
  background: #fff;
  border: 0.0625rem solid var(--border-strong);
  border-radius: 0.25rem;             
  padding: 1.6rem 2rem;
  margin: 2.2rem 0;
  box-shadow: 0.1875rem 0.1875rem 0 var(--red-pale); 
}
.callout-box h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--red);
  margin: 0 0 0.6rem;
}
.callout-box p {
  margin-bottom: 0;
  font-size: 0.95rem;
}

.wp-block-preformatted {
      white-space: pre-wrap;      
  white-space: -moz-pre-wrap;  
  white-space: -pre-wrap;      
  white-space: -o-pre-wrap;    
  word-wrap: break-word;       
  overflow-wrap: break-word;   
  word-break: break-word;      
  max-width: 100%;             
  margin-top: 1.5rem; margin-bottom: 1.5rem;
}



/* ─── REFERENCES ─── */
.references {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 0.0625rem solid var(--border-strong);
}
.references h2 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 1rem;
  border-left: none;
  padding-left: 0;
}
.references ol {
  font-size: 0.85rem;
  color: var(--ink-light);
  line-height: 1.7;
  padding-left: 1.2rem;
}
.references ol li {
  margin-bottom: 0.5rem;
}
.references a {
  color: var(--red-soft);
  text-decoration: none;
}

/* ─── DIVIDER ─── */
.divider {
  border: none;
  border-top: 0.0625rem solid var(--border);
  margin: 2rem 0;
}

/* ─── FOOTER ─── */
footer {
  background: var(--ink);
  color: rgba(247,244,239,0.75);
  padding: 2.5rem 3rem 1.5rem;
  margin-top: 2rem;
}
.footer-inner { max-width: 67.5rem; margin: 0 auto; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2rem;
  align-items: start;
}
.footer-heading {
  font-family: var(--font-display);
  font-size: 0.78rem;
  color: rgba(247,244,239,0.4);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  font-weight: 400;
}

.NewsLetter {
    position:absolute; left:-9999px;
}

.newsletter-desc {
  font-size: 0.82rem;
  color: rgba(247,244,239,0.55);
  line-height: 1.55;
  margin-bottom: 0.9rem;
}
.newsletter-form { display: flex; }
.newsletter-form input {
  flex: 1;
  background: rgba(247,244,239,0.07);
  border: 0.0625rem solid rgba(247,244,239,0.15);
  border-right: none;
  color: rgba(247,244,239,0.9);
  font-family: var(--font-body);
  font-size: 0.82rem;
  padding: 0.55rem 0.9rem;
  outline: none;
  border-radius: 0.125rem 0 0 0.125rem;
  transition: border-color 0.2s;
}
.newsletter-form input::placeholder { color: rgba(247,244,239,0.25); }
.newsletter-form input:focus { border-color: rgba(193,64,64,0.5); }
.newsletter-form button {
  background: var(--red);
  border: 0.0625rem solid var(--red);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.55rem 1rem;
  cursor: pointer;
  border-radius: 0 0.125rem 0.125rem 0;
  white-space: nowrap;
  transition: background 0.2s;
}
.newsletter-form button:hover { background: var(--red-soft); }
.newsletter-note {
  font-size: 0.69rem;
  color: rgba(247,244,239,0.25);
  margin-top: 0.5rem;
}
.footer-right { display: flex; flex-direction: column; gap: 1.25rem; }
.footer-links-horizontal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  list-style: none;
}
.footer-links-horizontal li a {
  font-size: 0.79rem;
  color: rgba(247,244,239,0.45);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-links-horizontal li a:hover { color: #e8a0a0; }
.share-trigger-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: transparent;
  border: 0.0625rem solid rgba(247,244,239,0.18);
  color: rgba(247,244,239,0.55);
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.5rem 1rem;
  cursor: pointer;
  border-radius: 0.125rem;
  transition: all 0.2s;
}
.share-trigger-btn:hover {
  border-color: rgba(193,64,64,0.4);
  color: #e8a0a0;
}
.footer-bottom {
  border-top: 0.0625rem solid rgba(247,244,239,0.07);
  padding-top: 1.2rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  color: rgba(247,244,239,0.28);
}
.footer-bottom a { color: rgba(247,244,239,0.28); text-decoration: none; }
.footer-bottom a:hover { color: #e8a0a0; }

/* ─── SHARE MODAL ─── */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 1000;
  align-items: flex-end;
  justify-content: center;
}
.modal-backdrop.open { display: flex; }
.share-modal {
  background: #222220;
  border: 0.0625rem solid rgba(247,244,239,0.12);
  border-bottom: none;
  border-radius: 0.5rem 0.5rem 0 0;
  padding: 1.5rem 1.75rem 2rem;
  width: 100%;
  max-width: 30rem;
  animation: slideUp 0.22s ease;
}
@keyframes slideUp {
  from { transform: translateY(2.5rem); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}
.modal-title {
  font-family: var(--font-display);
  font-size: 0.78rem;
  color: rgba(247,244,239,0.4);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.modal-close {
  background: none;
  border: none;
  color: rgba(247,244,239,0.4);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: 0.125rem;
  transition: color 0.15s;
}
.modal-close:hover { color: rgba(247,244,239,0.8); }
.share-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}
.share-option {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: rgba(247,244,239,0.05);
  border: 0.0625rem solid rgba(247,244,239,0.1);
  color: rgba(247,244,239,0.7);
  font-family: var(--font-body);
  font-size: 0.8rem;
  padding: 0.6rem 0.9rem;
  cursor: pointer;
  border-radius: 0.1875rem;
  transition: all 0.18s;
  text-align: left;
  width: 100%;
}
.share-option:hover {
  background: rgba(247,244,239,0.1);
  border-color: rgba(193,64,64,0.35);
  color: #fff;
}
.share-option.copied { border-color: rgba(80,180,100,0.5); color: #90d4a0; }
.share-option-full { grid-column: 1 / -1; }

/* ─── SOCIAL LINKS ─── */
.social-links { display: flex; gap: 0.7rem; flex-wrap: wrap; }
.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.125rem;
  height: 2.125rem;
  border: 0.0625rem solid rgba(247,244,239,0.15);
  border-radius: 0.125rem;
  color: rgba(247,244,239,0.6);
  text-decoration: none;
  font-size: 0.875rem;
  transition: border-color 0.2s, color 0.2s;
}
.social-link:hover { border-color: rgba(193,64,64,0.5); color: #e8a0a0; }

/* ─── RESPONSIVE ─── */
@media (max-width: 50em) {            /* was 800px */
  .banner { padding: 1.2rem 1.5rem 1rem; }
  .banner-inner { flex-direction: column; text-align: center; gap: 0.6rem; }
  .banner a { flex-direction: column; }
  .article-nav-inner { padding: 0 1.5rem; }
  .article-main { padding: 0 1.5rem; }
  .article-title { font-size: 1.6rem; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
  .nav-article-meta span:not(.nav-tag) { display: none; }
  .nav-article-meta .separator { display: none; }
  
  
  /* --- MOBILE IMAGE FIX (Container + Image) --- */

/* 1. Featured image container & image */
.article-featured-img {
  width: 100% !important;
  max-width: 100% !important;
}
.article-featured-img img {
  width: 100% !important;
  height: auto !important;
  display: block !important;
  margin: 0 auto !important;
}

/* 2. WordPress inline figure (container) & its image */
.wp-block-image.aligncenter.size-full {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
.wp-block-image.aligncenter.size-full img {
  width: 100% !important;
  height: auto !important;
  display: block !important;
  margin: 0 auto !important;
}

/* 3. PDF images (if you ever use them) */
.PDF-image {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  height: auto !important;
}
  
  
  
}













/* ==========================================
   SEARCH COMPONENT (for Article pages)
   ========================================== */

/* ----- Custom properties (rely on the :root variables already defined in your file) ----- */

/* ----- Search container ----- */
.nav-actions {
  position: sticky;
  top: 5rem;
  left: 85%;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 0.75rem;
  margin-top: 2rem;
  width: fit-content;
}

/* ----- Search wrapper (keeps the icon absolutely positioned) ----- */
.nav-search {
  position: relative;
  margin-left: 1rem;
}

/* ----- Text input ----- */
.nav-search input {
  background: var(--paper-dark);
  border: 0.0625rem solid var(--border-strong);
  border-radius: 1.25rem;
  padding: 0.4rem 1rem 0.4rem 2.2rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--ink);
  width: clamp(8rem, 12vw, 13.5rem);
  outline: none;
  transition: border-color 0.2s, width 0.3s;
}

.nav-search input:focus {
  border-color: var(--red-soft);
  width: 11.25rem;
}

.nav-search input::placeholder {
  color: var(--ink-light);
}

/* ----- Magnifying glass icon ----- */
.nav-search svg {
  position: absolute;
  left: 0.7rem;
  top: 50%;
  transform: translateY(-50%);
  width: 0.875rem;
  height: 0.875rem;
  stroke: var(--ink-light);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  pointer-events: none;
}

/* ----- Hidden trigger button (removes default border) ----- */
.hide-button {
  border: none;
}

/* ----- Visibility toggle: only one search bar is visible ----- */
/* Desktop: show search inside <main>, hide it in <nav class="article-nav"> */
.article-nav .nav-actions {
  display: none;
}

main .nav-actions {
  display: block;
}

/* Mobile: swap – hide main search, show nav search */
@media (max-width: 900px) {
  .article-nav .nav-actions {
    display: block;
  }

  main .nav-actions {
    display: none !important;
  }

  /* Reset margins when inside the sticky nav */
  .nav-actions {
    margin-left: auto;
    margin-top: 0;
  }
}

/* Desktop: also reset margins for consistency */
@media (min-width: 901px) {
  .nav-actions {
    margin-top: 0;
  }
}

/*
.nav-actions {
  position: sticky; top: 5rem; left: 85%;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 0.75rem;
  margin-top: 2rem;
  width: fit-content;
}

.nav-search {
  position: relative;
  margin-left: 1rem;
}
*/









.nav-search input {
  background: var(--paper-dark);
  border: 0.0625rem solid var(--border-strong);  /* was 1px */
  border-radius: 1.25rem;                       /* was 20px */
  padding: 0.4rem 1rem 0.4rem 2.2rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--ink);
  width: clamp(8rem, 12vw, 13.5rem);
  outline: none;
  transition: border-color 0.2s, width 0.3s;
}
.nav-search input:focus {
  border-color: var(--red-soft);
  width: 11.25rem;
}
.nav-search input::placeholder { color: var(--ink-light); }
.nav-search svg {
  position: absolute;
  left: 0.7rem;
  top: 50%;
  transform: translateY(-50%);
  width: 0.875rem;
  height: 0.875rem;
  stroke: var(--ink-light);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  pointer-events: none;
}

/*
 * search.css — Drop-in search modal styles
 * -----------------------------------------
 * Uses CSS custom properties so it inherits your site's existing colours.
 */
.search-overlay {
  --_bg:      var(--bg,      #ffffff);
  --_text:    var(--text,    #1a1a1a);
  --_border:  var(--border,  #e0e0e0);
  --_accent:  var(--accent,  #0057ff);
  --_muted:   var(--muted,   #6b6b6b);
  --_surface: var(--surface, #f5f5f5);
  --_radius:  var(--radius,  0.5rem);
}

.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(0.1875rem);
  -webkit-backdrop-filter: blur(0.1875rem);

  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: clamp(3rem, 10vh, 6rem);
  padding-inline: 1rem;

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.search-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.search-modal {
  background: var(--_bg);
  color: var(--_text);
  border: 0.0625rem solid var(--_border);
  border-radius: var(--_radius);
  box-shadow: 0 0.5rem 2.5rem rgba(0, 0, 0, 0.18);
  width: 100%;
  max-width: 40rem;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;

  transform: translateY(-0.5rem);
  transition: transform 0.18s ease;
}

.search-overlay.is-open .search-modal {
  transform: translateY(0);
}

.search-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-bottom: 0.0625rem solid var(--_border);
  flex-shrink: 0;
}

.search-icon {
  flex-shrink: 0;
  color: var(--_muted);
  display: flex;
  align-items: center;
}

.search-icon svg {
  width: 1.1rem;
  height: 1.1rem;
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  color: var(--_text);
  font-size: 1rem;
  font-family: inherit;
  line-height: 1.5;
  padding: 0.15rem 0;
  -webkit-appearance: none;
  appearance: none;
}

.search-input::placeholder {
  color: var(--_muted);
}

.search-input::-webkit-search-cancel-button,
.search-input::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}

.search-close-btn {
  flex-shrink: 0;
  background: var(--_surface);
  border: 0.0625rem solid var(--_border);
  border-radius: 0.25rem;
  color: var(--_muted);
  font-size: 0.7rem;
  font-family: inherit;
  padding: 0.15rem 0.45rem;
  cursor: pointer;
  line-height: 1.4;
  transition: background 0.12s;
}

.search-close-btn:hover {
  background: var(--_border);
}

.search-status {
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: var(--_muted);
  margin: 0;
}

.search-results {
  list-style: none;
  margin: 0;
  padding: 0.4rem 0;
  overflow-y: auto;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: var(--_border) transparent;
}

.search-results::-webkit-scrollbar {
  width: 0.25rem;
}
.search-results::-webkit-scrollbar-track {
  background: transparent;
}
.search-results::-webkit-scrollbar-thumb {
  background: var(--_border);
  border-radius: 0.125rem;
}

.search-result-item {
  padding: 0;
}

.search-result-link {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.65rem 1rem;
  text-decoration: none;
  color: inherit;
  transition: background 0.1s;
  border-radius: 0;
}

.search-result-link:hover,
.search-result-item.is-active .search-result-link {
  background: var(--_surface);
  box-sizing: border-box; padding-left: 1rem; border-left: 0.15rem ridge red;
}

.search-result-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--_text);
  line-height: 1.35;
}

.search-result-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--_muted);
}

.search-result-category {
  background: var(--_surface);
  border: 0.0625rem solid var(--_border);
  border-radius: 0.1875rem;
  padding: 0.05rem 0.4rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--_muted);
}

.search-result-date {
  color: var(--_muted);
}

.search-result-snippet {
  font-size: 0.8125rem;
  color: var(--_muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-result-title mark,
.search-result-snippet mark {
  background: color-mix(in srgb, var(--_accent) 18%, transparent);
  color: inherit;
  border-radius: 0.125rem;
  padding: 0 0.0625rem;
  font-style: inherit;
}

.search-no-results {
  padding: 1.25rem 1rem;
  color: var(--_muted);
  font-size: 0.875rem;
  text-align: center;
}

.search-hint {
  flex-shrink: 0;
  padding: 0.5rem 1rem;
  border-top: 0.0625rem solid var(--_border);
  font-size: 0.7rem;
  color: var(--_muted);
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.search-hint kbd {
  display: inline-block;
  background: var(--_surface);
  border: 0.0625rem solid var(--_border);
  border-radius: 0.1875rem;
  padding: 0.05rem 0.35rem;
  font-size: 0.65rem;
  font-family: inherit;
  line-height: 1.6;
}

@media (max-width: 30rem) {
  .search-overlay {
    padding-top: 0;
    align-items: flex-end;
  }

  .search-modal {
    max-width: 100%;
    max-height: 85vh;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom: none;
    transform: translateY(0.75rem);
  }

  .search-overlay.is-open .search-modal {
    transform: translateY(0);
  }

  .search-hint {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .search-overlay,
  .search-modal {
    transition: none;
  }
}

/* ============================================
   RESPONSIVE FOOTER GRID (stacking)
   ============================================ */

/* Base: mobile (<600px) – single column */
.footer-grid {
  grid-template-columns: 1fr !important;   /* override the 1.5fr 1fr */
  gap: 2rem;

}

/* Tablet: 600px – 900px – two equal columns */
@media (min-width: 600px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* Desktop: 901px and above – original 1.5fr 1fr */
@media (min-width: 901px) {
  .footer-grid {
    grid-template-columns: 1.5fr 1fr !important;
  }
}

@media (max-width: 400px) {
    .footer {
        padding: 0.5rem 0.5rem 0.5rem;
    }
  .footer-inner,
  .footer-grid {
    text-align: center;
  }
  .footer-grid > * {
    align-items: center;
  }
  .newsletter-form {
    justify-content: center;
  }
  .footer-right {
    align-items: center;
  }
  .footer-links-horizontal {
    justify-content: center;
  }
}



@media (max-width: 500px) {
  /* Reduce side padding so the footer doesn't waste space */
  footer {
    padding: 2rem 1rem 1.5rem;
  }

  /* Reduce gap to avoid unnecessary vertical space */
  .footer-grid {
    gap: 1.5rem;
  }

  /* Stack the newsletter form vertically */
  .newsletter-form {
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  /* Make the input full width and reset its border radius */
  .newsletter-form input {
    width: 100%;
    border-radius: 0.125rem;
    margin-bottom: 0.5rem;
  }

  /* Make the button full width, allow text to wrap */
  .newsletter-form button {
    width: 100%;
    white-space: normal;
    border-radius: 0.125rem;
  }

  /* Ensure the share button stretches and centres its text */
  .share-trigger-btn {
    width: 100%;
    justify-content: center;
  }

  /* Force all text to centre */
  .footer-inner,
  .footer-grid,
  .footer-grid > * {
    text-align: center;
  }

  .footer-right {
    align-items: center;
  }

  .footer-links-horizontal {
    justify-content: center;
  }
  
  .newsletter-form #newsletter-feedback {
  flex-basis: 100%;
  margin-left: 0;
  margin-top: 0.5rem;
  text-align: center;
}
  
}

/*#  PDF image Preview  #*/

/* Aperçu du PDF */
.PDF-block-file__preview {
    margin: 0 0 1rem 0;          /* remplace le style inline de la figure */
}

.PDF-image {
    width: 90%;
    height: auto;
    border: 1px solid var(--border);
    border-radius: 4px;
    display: block;              /* évite les espaces sous l'image */
    margin-left: 6rem; margin-right: 6rem;
}

.PDF-block-file__figcaption {
    font-size: 0.85rem;
    text-align: center;
    margin-top: 0.3rem;
}

.PDF-line-break {
    width: 80%;
    margin-left: auto;
    margin-right: auto;
}

.PDF-block-file__title {
    font-size: 1.25rem;
    margin: 0 0 0.75rem 0;
    color: var(--headings, #1a1a1a);
    font-weight: 600;
}
