:root{
  --primary:#00483a;
  --accent:#BFAF80;
  --light-bg:#F4F4F2;
  --dark-text:#2C2C2C;
  --light-text:#fff;
  --font-main:'Montserrat',sans-serif;
  --font-serif:'Merriweather',serif;
}

/* Base */
*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%}
body{font-family:var(--font-main);color:var(--dark-text);background:var(--light-bg);line-height:1.6;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
img{max-width:100%;height:auto;display:block}
video{width:100%;height:100%;object-fit:cover;object-position:center;display:block}
h1,h2,h3{line-height:1.25}
h2{margin:1rem 0}
p{margin:0 0 1rem}
.container{max-width:1100px;margin:0 auto;padding:0 1rem}
.hero-font{font-family:var(--font-serif)}

/* Links */
.site-main a{color:var(--primary);text-decoration:underline}
.site-main a:hover{color:var(--accent)}
.post-card__title a{color:var(--dark-text);text-decoration:none}
.post-card__title a:hover{color:var(--primary);text-decoration:underline}

/* Header */
.site-header{position:relative;display:flex;align-items:center;justify-content:space-between;width:100vw;left:50%;margin-left:-50vw;padding:1rem 2rem;background:var(--primary)}
.logo-img{display:block;height:48px;width:auto}
.center-nav{position:absolute;left:50%;transform:translateX(-50%)}
.main-nav{display:flex}
.main-nav ul{list-style:none;display:flex;gap:20px;margin:0;padding:0}
.main-nav a{color:var(--light-text);text-decoration:none;font-weight:500;transition:color .2s}
.main-nav a:hover,.main-nav a.active{color:var(--accent)}
.main-nav ul>li:last-child>a{color:var(--accent)}
.contact-info{font-size:1rem}
.contact-info ul{list-style:none;display:flex;flex-direction:column;gap:4px;margin:0;padding:0}
.contact-info a{display:flex;align-items:center;color:var(--light-text);text-decoration:none;font-weight:500}
.contact-info a:hover{color:var(--accent)}
#menu-toggle{display:none}
.hamburger{display:none;flex-direction:column;justify-content:space-between;width:30px;height:22px;cursor:pointer;position:absolute;right:2rem;top:50%;transform:translateY(-50%)}
.hamburger span{height:3px;border-radius:2px;background:var(--light-text);display:block}
.mobile-nav{display:none;background:var(--primary);position:absolute;left:0;right:0;top:100%;z-index:100}
.mobile-nav ul{list-style:none;margin:0;padding:1rem;display:flex;flex-direction:column;gap:10px;text-align:center}
.mobile-nav a{color:var(--light-text);text-decoration:none;font-weight:500}
.mobile-nav ul>li:last-child>a{color:var(--accent)}
#menu-toggle:checked ~ .mobile-nav{display:block}
@media (max-width:900px){
  .center-nav,nav.main-nav,.contact-info{display:none!important}
  .site-header{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:12px;padding:16px 16px;min-height:68px}
  .logo-link{grid-column:2;justify-self:center}
  .logo-img{max-height:48px;width:auto}
  .hamburger{grid-column:3;justify-self:end;display:flex;position:static;transform:none}
}

/* Footer */
.site-footer{background:var(--primary);color:var(--light-text);padding:2rem 1rem;font-size:.9rem}
.footer-content{display:flex;align-items:center;justify-content:space-between;gap:1rem;max-width:1100px;margin:0 auto;position:relative}
.footer-left{display:flex;align-items:center;gap:1rem}
.footer-left .social-icon img{height:40px;width:auto;object-fit:contain}
.footer-center{flex:1;text-align:center}
.footer-abn{margin-bottom:.3rem}
.footer-sub-links{display:flex;justify-content:center;gap:.5rem;margin-bottom:.3rem;font-size:.8rem;color:var(--accent)}
.footer-sub-links a{color:#ccc;text-decoration:none;transition:color .2s}
.footer-sub-links a:hover{color:var(--accent)}
.footer-sub-links .divider{color:#ccc}
.footer-bottom{color:#ccc}
.footer-right{display:flex;align-items:center;height:90px}
.footer-right .lsnsw-logo{height:90px;width:auto;object-fit:contain}
@media (max-width:800px){
  .footer-content{flex-direction:column;text-align:center}
  .footer-left{margin-bottom:1rem}
  .footer-left .social-icon img{height:30px}
  .footer-right{margin-top:1rem}
  .footer-right .lsnsw-logo{height:60px}
}

/* Index tiles */
.post-grid{display:grid;grid-template-columns:1fr;gap:1.6rem}
.post-card{background:#fff;border:1px solid rgba(0,0,0,.10);border-radius:18px;overflow:hidden;box-shadow:0 10px 28px rgba(0,0,0,.12);transition:transform .18s,box-shadow .18s}
.post-card:hover{transform:translateY(-3px);box-shadow:0 18px 40px rgba(0,0,0,.16)}
.post-card__header{background:#f6f6f6;border-bottom:1px solid rgba(0,0,0,.08);text-align:center;padding:16px 20px}
.post-card__title{margin:0;font-size:clamp(20px,2.2vw,24px);line-height:1.25}
.post-card__row{display:flex;align-items:stretch;gap:18px;padding:18px 20px 20px}
.post-card__text{flex:1 1 50%;display:flex;flex-direction:column}
.post-card__meta{font-size:12px;opacity:.75;margin:0 0 .6rem}
.post-card__excerpt{display:-webkit-box;-webkit-line-clamp:6;-webkit-box-orient:vertical;overflow:hidden;line-height:1.6;flex:1 1 auto}
.post-card__more{align-self:flex-start;margin-top:auto;display:flex;align-items:center;justify-content:center;width:100%;min-height:64px;border:1px solid rgba(0,0,0,.14);border-radius:12px;font-size:14px;font-weight:600;color:var(--dark-text);text-decoration:none}
.post-card__media{flex:1 1 50%;display:block;height:clamp(240px,28vw,360px);overflow:hidden;border-radius:12px}
.post-card__media img{width:100%;height:100%;object-fit:cover;display:block}
.post-card:nth-child(even) .post-card__media{order:1}
.post-card:nth-child(even) .post-card__text{order:2}
@media (max-width:800px){
  .post-card__row{flex-direction:column;gap:12px}
  .post-card__media{order:1!important;height:clamp(200px,48vw,260px);border-radius:10px}
  .post-card__text{order:2!important}
}

/* Listing page link tweaks */
.blog .post-card__title a,
.archive .post-card__title a,
.search .post-card__title a,
.blog .post-card__more,
.archive .post-card__more,
.search .post-card__more{ text-decoration:none!important }

/* Single post container */
.single-post .site-main .container{background:transparent}
.single-post .site-main article{background:#fff;border:1px solid rgba(0,0,0,.08);border-radius:18px;box-shadow:0 10px 28px rgba(0,0,0,.12);padding:clamp(20px,3vw,36px);max-width:900px;margin:0 auto}
.single-post .entry-title{text-align:center;font-size:clamp(28px,4vw,38px);line-height:1.2;margin:0 0 1rem}
.single-post .entry-content{font-size:clamp(16px,1.1vw,18px);line-height:1.75}
.single-post .entry-content p{margin:0 0 1rem}
.single-post .entry-content img,
.single-post .entry-content figure{max-width:100%;height:auto;border-radius:12px;overflow:hidden;box-shadow:0 6px 18px rgba(0,0,0,.08);margin:1rem auto}
.single-post .entry-content h2{margin:1.2rem 0 .6rem}
.single-post .entry-content a{color:var(--primary)}

/* Lists */
.entry-content ul,
.entry-content ol,
.post-card__excerpt ul,
.post-card__excerpt ol{margin:0 0 1rem 1.2rem;padding-left:1.1rem;list-style-position:outside}
.entry-content ul{list-style-type:disc}
.entry-content ul ul{list-style-type:circle;margin-left:1rem}
.entry-content ul ul ul{list-style-type:square;margin-left:1rem}
.entry-content ol{list-style-type:decimal}
.entry-content ol ol{list-style-type:lower-alpha;margin-left:1rem}
.entry-content ol ol ol{list-style-type:lower-roman;margin-left:1rem}
.entry-content li,
.post-card__excerpt li{margin:0 0 .45rem}
.entry-content .wp-block-list{margin:0 0 1rem 1.2rem;padding-left:1.1rem}

/* Tables (uniform + responsive) */
.entry-content .wp-block-table,
.entry-content table{width:100%;border-collapse:collapse}
.entry-content table{font-size:16px;line-height:1.5}
.entry-content table th,
.entry-content table td{padding:8px 10px;border-bottom:1px solid rgba(0,0,0,.08);vertical-align:top}
.entry-content table th{font-weight:700}
.entry-content table :is(h1,h2,h3,h4,h5,h6){font-size:1em!important;line-height:1.4;margin:0;font-weight:700}
.entry-content table :is(p,span,li,a,strong,em,small,code){font-size:inherit!important}
.entry-content .wp-block-table :is(.has-x-large-font-size,.has-large-font-size,.has-medium-font-size,.has-small-font-size,.has-extra-small-font-size){font-size:inherit!important}
@media (max-width:900px){
  .entry-content .wp-block-table,
  .entry-content table{display:block;overflow-x:auto;-webkit-overflow-scrolling:touch}
  .entry-content table{font-size:14px;line-height:1.4}
  .entry-content table th,
  .entry-content table td{padding:6px 8px;white-space:nowrap}
  .entry-content table td.wrap,
  .entry-content table th.wrap{white-space:normal;word-break:break-word}
}

/* Helpers */
.site-main .container{background:#fff}
a:focus-visible{outline:2px dashed var(--accent);outline-offset:2px}
@media (max-width:900px){
  .site-main a,
  .post-card__title a,
  .post-card__more,
  .post-card__excerpt a,
  .single-post .entry-content a{ text-decoration:none!important }
}

/* Mobile table font enforcement */
@media (max-width:900px){
  .entry-content .wp-block-table,
  .entry-content table{-webkit-text-size-adjust:100%!important;text-size-adjust:100%!important}
  .entry-content .wp-block-table table,
  .entry-content table{font-size:14px!important;line-height:1.4!important}
  .entry-content table th,
  .entry-content table td{font-size:inherit!important;line-height:inherit!important}
  .entry-content table th *,
  .entry-content table td *{font-size:inherit!important;line-height:inherit!important}
  .entry-content .wp-block-table :is(.has-x-large-font-size,.has-large-font-size,.has-medium-font-size,.has-small-font-size,.has-extra-small-font-size){font-size:inherit!important;line-height:inherit!important}
  .entry-content table [style*="font-size"]{font-size:inherit!important;line-height:inherit!important}
  .entry-content table th:last-child,
  .entry-content table td:last-child,
  .entry-content table th:last-child *,
  .entry-content table td:last-child *{font-size:inherit!important;line-height:inherit!important}
}

/* Blog hero (image set inline in markup) */
.blog-hero{position:relative;height:70vh;min-height:300px;background-size:cover;background-position:center;display:flex;align-items:center;justify-content:center;padding:2rem}
.blog-hero .hero-overlay{position:absolute;inset:0;background-color:rgba(15,61,23,.4);z-index:1}
.blog-hero .hero-content{position:relative;z-index:2;max-width:760px;text-align:center;color:#fff}
.blog-hero .hero-content h1,
.blog-hero .hero-content p{color:#fff!important;margin:0 0 .9rem}
.blog-hero .hero-content h1{font-size:clamp(24px,3.4vw,36px)}
.blog-hero .hero-content p{font-size:clamp(15px,1.3vw,18px)}
@media (max-width:600px){
  .blog-hero{height:70vh;min-height:300px;padding:18px 16px;display:grid;place-items:center;background-position:center 35%}
  .blog-hero .hero-overlay{background-color:rgba(0,72,58,.48)}
  .blog-hero .hero-content{max-width:92%}
  .blog-hero .hero-content h1{font-size:clamp(22px,6vw,28px);margin:0 0 .5rem}
  .blog-hero .hero-content p{font-size:clamp(14px,4.2vw,17px);margin:0}
}
@supports (height:50dvh){
  @media (max-width:900px){.blog-hero{height:50dvh}}
}
@media (max-width:800px){
  .post-card__row{ flex-direction:column; }
  .post-card .post-card__media{ order:1 !important; height:clamp(200px,48vw,260px); }
  .post-card .post-card__text{  order:2 !important; }
}/* Single-post CTAs */
.single-post .post-cta{
  margin: 1.75rem auto 0;
  display: grid;
  gap: 12px;
  max-width: 900px;
}

.single-post .post-cta .btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.2rem;
  border-radius: 12px;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
  width: 100%;
  /* --- Single post overflow guards (append at end) --- */
.single-post .entry-content,
.single-post .entry-content *{
  max-width:100%;
  overflow-wrap:anywhere;
  word-break:break-word;
}

/* Stop wide/full blocks from breaking out of the article card */
.single-post .entry-content .alignwide,
.single-post .entry-content .alignfull{
  margin-left:auto;
  margin-right:auto;
  width:100% !important;
  max-width:100% !important;
}

/* Images & figures always scale down inside the article */
.single-post .entry-content img,
.single-post .entry-content figure{
  max-width:100%;
  height:auto;
}

/* Pre/code blocks don’t push out horizontally */
.single-post .entry-content pre{
  overflow:auto;
  white-space:pre-wrap;
  word-break:break-word;
}

/* Safety for tables that plugin CSS might restyle later */
.single-post .entry-content table{
  display:block;
  max-width:100%;
  overflow-x:auto;
}

}

/* Primary = “Speak to us today” */
.single-post .post-cta .btn-primary{
  background: var(--primary);
  color: var(--light-text);
}
.single-post .post-cta .btn-primary:hover{
  filter: brightness(0.92);
}

/* Secondary = “More Immigration Articles…” */
.single-post .post-cta .btn-secondary{
  background: transparent;
  color: var(--dark-text);
  border-color: rgba(0,0,0,.16);
}
.single-post .post-cta .btn-secondary:hover{
  border-color: rgba(0,0,0,.28);
}
/* Force mobile order: Title, Image, Excerpt, Read more on listings */
@media (max-width:800px){
  .post-card__row{flex-direction:column}
  .post-card__media{order:1 !important}
  .post-card__text{order:2 !important}
}

/* Single-post CTA buttons */
.single-post .post-cta{
  margin:1.75rem auto 0;
  display:grid;
  gap:12px;
  max-width:900px;
}
.single-post .post-cta .btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:.9rem 1.2rem;
  border-radius:12px;
  font-weight:700;
  text-decoration:none;
  border:2px solid transparent;
  width:100%;
}
.single-post .post-cta .btn-primary{
  background:var(--primary);
  color:var(--light-text);
}
.single-post .post-cta .btn-primary:hover{filter:brightness(.92)}
.single-post .post-cta .btn-secondary{
  background:transparent;
  color:var(--dark-text);
  border-color:rgba(0,0,0,.16);
}
/* Full color change on hover/focus (no overlay) */
.single-post .post-cta .btn {
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}

/* Both buttons swap to accent */
.single-post .post-cta .btn-primary:hover,
.single-post .post-cta .btn-primary:focus-visible,
.single-post .post-cta .btn-secondary:hover,
.single-post .post-cta .btn-secondary:focus-visible{
  background: var(--accent);        /* #BFAF80 */
  border-color: var(--accent);
  color: var(--dark-text);          /* keeps contrast readable on accent */
  text-decoration: none;
}

/* Optional: keep click press subtle without changing colors */
.single-post .post-cta .btn:active{
  transform: translateY(1px);
}
/* === CTA fixes (append at very end) === */

/* Center the CTAs and their text on mobile & desktop */
.single-post .post-cta{
  margin: 1.75rem auto 0;
  display: grid;
  gap: 12px;
  max-width: 900px;
  justify-items: center;   /* centers buttons when not full-width */
  width: 100%;
  padding: 0 16px;         /* a little breathing room on small screens */
}
.single-post .post-cta .btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;      /* keeps multi-line labels centered */
  width: 100%;
  padding: .9rem 1.2rem;
  border-radius: 12px;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease, transform .08s ease;
}

/* Primary = Speak to us today */
.single-post .post-cta .btn-primary{
  background: var(--primary);
  color: var(--light-text);
}
.single-post .post-cta .btn-primary:hover,
.single-post .post-cta .btn-primary:focus-visible{
  background: var(--accent);     /* full color change */
  border-color: var(--accent);
  color: var(--light-text);      /* stay white text as requested */
}

/* Secondary = More Immigration Articles… (keep original subtle hover) */
.single-post .post-cta .btn-secondary{
  background: transparent;
  color: var(--dark-text);
  border-color: rgba(0,0,0,.16);
}
.single-post .post-cta .btn-secondary:hover,
.single-post .post-cta .btn-secondary:focus-visible{
  border-color: rgba(0,0,0,.28); /* no color swap */
  background: transparent;
  color: var(--dark-text);
}

/* Small press feedback (both) */
.single-post .post-cta .btn:active{
  transform: translateY(1px);
}

.single-post .site-main article{
  max-width:900px;
  margin:0 auto;
  background:#fff;
  border:1px solid rgba(0,0,0,.08);
  border-radius:18px;
  box-shadow:0 10px 28px rgba(0,0,0,.12);
  padding:clamp(20px,3vw,36px);
}
.single-post .entry-content > *{max-width:100%}
.single-post .entry-content img,
.single-post .entry-content figure,
.single-post .entry-content table{max-width:100%;height:auto}
.single-post .entry-content .alignwide,
.single-post .entry-content .alignfull{width:100%;max-width:100%;margin-left:0;margin-right:0}
.single-post .entry-content{overflow-wrap:anywhere}
/* --- FIX: close CTA button rule properly --- */
.single-post .post-cta .btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:.9rem 1.2rem;
  border-radius:12px;
  font-weight:700;
  text-decoration:none;
  border:2px solid transparent;
  width:100%;
}

/* --- Single post overflow guards (keep everything inside the card) --- */
.single-post .entry-content,
.single-post .entry-content *{
  max-width:100%;
  overflow-wrap:anywhere;
  word-break:break-word;
}

.single-post .entry-content .alignwide,
.single-post .entry-content .alignfull{
  margin-left:auto;
  margin-right:auto;
  width:100% !important;
  max-width:100% !important;
}

.single-post .entry-content img,
.single-post .entry-content figure{
  max-width:100%;
  height:auto;
}

.single-post .entry-content pre{
  overflow:auto;
  white-space:pre-wrap;
  word-break:break-word;
}

.single-post .entry-content table{
  display:block;
  max-width:100%;
  overflow-x:auto;
}

/* --- Tiles: prevent long titles/excerpts from blowing out the layout --- */
.post-card__title,
.post-card__title a,
.post-card__excerpt,
.post-card__excerpt *{
  overflow-wrap:anywhere;
  word-break:break-word;
}

/* (Keep, for safety) tile media sizing */
.post-card__media{ display:block; height:clamp(240px,28vw,360px); overflow:hidden; border-radius:12px; }
.post-card__media img{ width:100%; height:100%; object-fit:cover; display:block; }

/* Blog hero — stacked, centered, 50% opacity; input-only focus ring */

/* Title, then text, then actions */
.blog-hero .hero-content h1{ margin:0 0 6px; }
.blog-hero .hero-content p{ margin:0; }
.blog-hero .blog-hero__actions{
  margin-top:16px;
  display:grid;
  grid-template-columns:1fr;
  gap:14px;
  justify-items:center;  /* centers children incl. search on mobile */
}

/* Search bar (50% white, no outer border ever) */
.blog-hero .search-form{
  display:flex;
  align-items:center;
  gap:8px;
  background:rgba(255,255,255,.50);
  border:1px solid transparent;      /* no outer border */
  backdrop-filter:saturate(110%) blur(2px);
  border-radius:12px;
  padding:8px;
  width:100%;
  max-width:760px;
  box-shadow:0 6px 18px rgba(0,0,0,.18);
  margin:0 auto;                      /* hard-center */
  box-sizing:border-box;
}

/* Input */
.blog-hero .search-field{
  flex:1 1 auto;
  min-width:0;
  border:0;
  background:transparent;
  color:var(--dark-text);
  padding:12px 14px;
  font-size:16px;
  border-radius:8px;
}
.blog-hero .search-field::placeholder{ opacity:.75; }

/* Input-only focus ring (inside the bar) */
.blog-hero .search-field:focus{
  outline:2px solid var(--accent);    /* inner highlight */
  outline-offset:2px;
}

/* Button: icon only */
.blog-hero .search-submit{
  display:inline-flex;
  align-items:center;
  gap:6px;
  border:0;
  padding:12px 16px;
  border-radius:10px;
  background:var(--primary);
  color:#fff;
  font-weight:700;
  cursor:pointer;
}
.blog-hero .search-submit .btn-text{ display:none; } /* hide “Search” word */
.blog-hero .search-submit:hover{ filter:brightness(.92); }

/* “Got a question…” (centered, italic) then button below */
.blog-hero .contact-inline{
  display:grid;
  justify-items:center;
  gap:10px;
  width:100%;
  max-width:760px;
}
.blog-hero .contact-inline__text{
  line-height:1.3;
  font-style:italic;
  text-align:center;
}

/* Contact button hover: gold bg, WHITE text */
.blog-hero .contact-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:12px 16px;
  border-radius:10px;
  font-weight:700;
  text-decoration:none;
  border:2px solid rgba(255,255,255,.9);
  color:#fff;
  backdrop-filter:saturate(120%) blur(2px);
  transition:background-color .18s ease, border-color .18s ease, color .18s ease;
}
.blog-hero .contact-btn:hover,
.blog-hero .contact-btn:focus-visible{
  background:var(--accent);
  border-color:var(--accent);
  color:#fff; /* keep white text */
}

/* Mobile sizing */
@media (max-width:600px){
  .blog-hero{ height:60vh; }
  .blog-hero .hero-content h1{ font-size:clamp(22px,5.2vw,26px); }
  .blog-hero .hero-content p{  font-size:clamp(14px,4vw,16px); }
}
@supports (height:1dvh){
  @media (max-width:600px){
    .blog-hero{ height:60dvh; }
  }
}

/* Screen-reader-only text */
.screen-reader-text{
  position:absolute !important;
  width:1px; height:1px;
  padding:0; margin:-1px;
  overflow:hidden;
  clip:rect(0 0 0 0);
  clip-path:inset(50%);
  white-space:nowrap;
  border:0;
}
.screen-reader-text:focus,
.screen-reader-text:focus-visible{
  position:static !important;
  width:auto; height:auto;
  margin:0; overflow:visible;
  clip:auto; clip-path:none;
  white-space:normal;
  background:#000; color:#fff;
  padding:8px 12px;
  border-radius:6px;
  z-index:10000;
}
/* No-results layout */
.no-results{
  text-align:center;
  padding:24px 16px;
}
.no-results .search-form{
  display:flex;
  align-items:center;
  gap:8px;
  background:rgba(255,255,255,.50);
  border:1px solid transparent;              /* no outer border */
  backdrop-filter:saturate(110%) blur(2px);
  border-radius:12px;
  padding:8px;
  width:100%;
  max-width:760px;
  margin:12px auto 0;                        /* center it */
  box-shadow:0 6px 18px rgba(0,0,0,.18);
}
.no-results .search-field{
  flex:1 1 auto;
  min-width:0;
  border:0;
  background:transparent;
  color:var(--dark-text);
  padding:12px 14px;
  font-size:16px;
  border-radius:8px;
}
.no-results .search-field:focus{
  outline:2px solid var(--accent);
  outline-offset:2px;
}
.no-results .search-submit{                  /* icon-only button */
  display:inline-flex;
  align-items:center;
  gap:6px;
  border:0;
  padding:12px 16px;
  border-radius:10px;
  background:var(--primary);
  color:#fff;
  font-weight:700;
  cursor:pointer;
}
.no-results .search-submit .btn-text{ display:none; }
