/*
Theme Name: Twenty Twenty-Five Box (Child)
Template: twentytwentyfive
Text Domain: twentytwentyfive-box
Version: 1.0.0
Description: Custom child theme variant with boxed layout.
*/

/* Base: inherit parent styles via functions.php enqueue */

/* Central design tokens for easy tweaking */
:root{
  --accent: #ff8746;
  --frame-x: 24px;
  --frame-x-mobile: 16px;
  --grid-gap: 24px;
  --hero-right-col: 420px;
  --hero-large-height: 600px;
  --hero-small-height: 280px;
  --badge-logo-size: 42px;
  --badge-logo-size-xl: 52px;
  --badge-tagline-size: 20px;
  --badge-tagline-size-xl: 26px;
  --post-list-title-size: 1.1rem;
  --excerpt-size: 14px;
  --page-paragraph-size: 1rem;
  --page-paragraph-size-mobile: 0.7rem;
  --entry-title-mobile: clamp(1.6rem, 5.8vw, 2rem);
  --mobile-font-size-base: 27px;
  --hero-title-sm-mobile: 0.7rem;
  --hero-overlay-top: rgba(0,0,0,0.0);
  --hero-overlay-mid: rgba(0,0,0,0.15);
  --hero-overlay-bot: rgba(0,0,0,0.80);
  /* Mobile-specific hero overlay defaults (can be tuned independently) */
  --hero-overlay-top-mobile: rgba(0,0,0,0.5);
  --hero-overlay-mid-mobile: rgba(0,0,0,0.2);
  --hero-overlay-bot-mobile: rgba(0,0,0,0.95);
  --hover-zoom: 1.06;
  --footer-min-right: 320px;
  --footer-col-min: 140px;
  --footer-col-gap: 40px;
  --footer-logo-max-height: 24px;
  /* Default kicker background (falls back when no category match) */
  --kicker-bg: rgba(115,30,253,0.70);

  /* Per-category accent + kicker overrides (based on hero-card--cat-... classes) */
  --accent-digital-displays: #ea580c;
  --kicker-bg-digital-displays: rgba(234,88,12,0.68);
  
  --accent-it-services: #2563eb;
  --kicker-bg-it-services: rgba(37,99,235,0.68);

  --accent-passenger-info: #12a150;
  --kicker-bg-passenger-info: rgba(18,161,80,0.68);
  
  --accent-services: #eb2553;
  --kicker-bg-services: rgba(235, 37, 80, 0.68);

  /* Body background pattern */
  --body-bg-image: url('https://quirky-haslett.194-164-92-191.plesk.page/wp-content/uploads/2025/11/textpat.webp');
  --body-bg-size: auto; /* e.g., 32px 32px or auto */
  --body-bg-color: #0b0f14;
}

.footer-row {
  background-color: rgba(255, 255, 255, 0.8); border-radius:10px; border: 1px rgba(255, 255, 255, 0.10) solid; box-shadow: 0 0 10px rgba(0,0,0,0.3);
}
.footer-left, .footer-right {padding:0;}
.footer-row {padding:10px;}
@media (min-width: 783px){
  .footer-row {padding:0px;}
  .footer-left, .footer-right {padding:20px;}
}

.footer-box{padding-top: 0 !important;}

/* Ensure full-height layout so footer is below the fold */
html, body, #page{ height:100%; margin: 0 !important; padding: 0 !important;}
.no{
}
html, body{ margin:0; padding:0; }
.site-main{ min-height:100vh; display:block; }
body.blog .site-main{ min-height:100vh; }

/* Global frame spacing for all pages */
.site-main{
  padding-left:var(--frame-x);
  padding-right:var(--frame-x);
  box-sizing:border-box;
}
@media (max-width:640px){
  .site-main{
    padding-left:var(--frame-x-mobile);
    padding-right:var(--frame-x-mobile);
  }
}

/* Repeating body background */
body{
  background-color: var(--body-bg-color);
  background-image: var(--body-bg-image);
  background-repeat: repeat;
  background-size: var(--body-bg-size);
  background-attachment: ;
}

/* Ensure strong text renders with visible weight on the frontend */
.entry-content strong,
.entry-content b,
.wp-block-post-content strong,
.wp-block-post-content b{
  font-weight: 700;
  font-synthesis: weight;
}

/* Frontend fallback for the "Annotation" heading style */
.wp-block-heading.is-style-text-annotation,
.wp-block-heading.is-style-text-annotation--1,
.wp-block-paragraph.is-style-text-annotation{
  display:inline-flex;
  align-items:center;
  width:fit-content;
  font-size:var(--wp--preset--font-size--small);
  line-height:1.5;
  letter-spacing:normal;
  border:1px solid currentColor;
  border-radius:16px;
  padding:0.2rem 0.6rem 0.25rem;
}

/* Fallback styling for the core image lightbox trigger */
.wp-lightbox-container{ position:relative; }
.wp-lightbox-container .lightbox-trigger{
  display:none !important; /* hide the button; container handles clicks */
  pointer-events:none;
}
/* Hide native captions in flow; we show them in the lightbox overlay instead */
.wp-lightbox-container figcaption.wp-element-caption{
  display:none !important;
}

.ttf5-lightbox-overlay{
  position:fixed;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  z-index:9999;
}
.ttf5-lightbox-overlay.is-open{
  display:flex;
}
.ttf5-lightbox-backdrop{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,0.72);
  backdrop-filter: blur(2px);
}
.ttf5-lightbox-frame{
  position:relative;
  max-width:90vw;
  max-height:90vh;
  z-index:1;
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:10px;
}
.ttf5-lightbox-img{
  max-width:90vw;
  max-height:80vh;
  width:auto;
  height:auto;
  border-radius:14px;
  box-shadow:0 18px 38px rgba(0,0,0,0.35);
}
.ttf5-lightbox-caption{
  width:100%;
  color:#f4f4f4;
  font-size:0.95rem;
  text-align:center;
}

/* Subtle rounded border for images on single posts */
.single-post .wp-block-image{
  border:0px solid color-mix(in srgb, currentColor 16%, transparent);
  border-radius:14px;
  overflow:hidden;
}
.single-post .wp-block-image img{
  border-radius:inherit;
  display:block;
}

.entry-related-nav{
  margin-top:28px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.entry-related-link{
  flex:1 1 220px;
  min-width:220px;
  display:inline-flex;
  align-items:center;
  justify-content:flex-start;
  gap:10px;
  padding:10px 12px;
  border:1px solid color-mix(in srgb, currentColor 20%, transparent);
  border-radius:10px;
  background:color-mix(in srgb, rgba(255,255,255,0.03) 60%, rgba(0,0,0,0.05));
  text-decoration:none;
  transition:transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}
.entry-related-link--prev{
  justify-content:flex-start;
  text-align:left;
}
.entry-related-link--next{
  justify-content:flex-end;
  text-align:right;
}
.entry-related-link:hover{
  transform:translateY(-1px);
  box-shadow:0 8px 18px rgba(0,0,0,0.16);
  border-color:color-mix(in srgb, currentColor 28%, transparent);
}
.entry-related-arrow{
  font-size:1.1rem;
  line-height:1;
}
.entry-related-title{
  margin:0;
  font-weight:600;
  line-height:1.3;
  font-size:0.95rem;
}

/* Alternate Media & Text block direction: odd = LTR, even = RTL */
.entry-content .wp-block-media-text:nth-of-type(odd){
  direction:ltr;
  flex-direction:row;
}
.entry-content .wp-block-media-text:nth-of-type(even){
  direction:rtl;
  flex-direction:row-reverse;
}
.entry-content .wp-block-media-text:nth-of-type(odd) .wp-block-media-text__content{
  text-align:left;
}
.entry-content .wp-block-media-text:nth-of-type(even) .wp-block-media-text__content{
  text-align:right;
}
.wp-block-media-text__media img {
  border-radius:10px;
}
.wp-block-media-text__content h3 {
  line-height: 1.7rem;
}

/* Category-specific accent/kicker wiring (cards add hero-card--cat-{slug}) */
.hero-card--cat-digital-displays{
  --accent: var(--accent-digital-displays);
  --kicker-bg: var(--kicker-bg-digital-displays);
}
.hero-card--cat-it-services{
  --accent: var(--accent-it-services);
  --kicker-bg: var(--kicker-bg-it-services);
}
.hero-card--cat-passenger-info{
  --accent: var(--accent-passenger-info);
  --kicker-bg: var(--kicker-bg-passenger-info);
}
.hero-card--cat-services{
  --accent: var(--accent-services);
  --kicker-bg: var(--kicker-bg-services);
}

/* Hero grid layout */
.hero-grid-wrap{
  min-height:100vh;
  display:grid;
  align-content:stretch;
  padding-top:var(--frame-x);
  padding-bottom:var(--frame-x);
  box-sizing:border-box;
}
@media (max-width:640px){
  .hero-grid-wrap{
    padding-top:var(--frame-x-mobile);
    padding-bottom:var(--frame-x-mobile);
  }
}

/* Block alignments for inline media/text */
.entry-content::after{ content:""; display:block; clear:both; }
.entry-content .alignleft,
.entry-content .wp-block-image.alignleft{
  float:left;
  margin:0 1rem 1rem 0;
}
.wp-block-image img {
  justify-self: center;
}

.entry-content .alignright,
.entry-content .wp-block-image.alignright{
  float:right;
  margin:0 0 1rem 1rem;
}
.entry-content .aligncenter,
.entry-content .wp-block-image.aligncenter{
  display:block;
  margin-left:auto;
  margin-right:auto;
}
@media (max-width:640px){
  .entry-content .alignleft,
  .entry-content .wp-block-image.alignleft,
  .entry-content .alignright,
  .entry-content .wp-block-image.alignright{
    float:none;
    margin:0 0 1rem 0;
  }
  .single .entry-header,
  .page .entry-header,
  article header {
    margin-bottom: 0.1em !important;
  }
  
  .entry-content p {
    margin-bottom: 0 !important;
  }
}
.entry-content .wp-block-group.is-layout-flex{
  display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    flex-direction: row;
    /* justify-content: center; */
    align-items: center;
}
.entry-content .wp-block-group.is-layout-flex.is-nowrap{
  flex-wrap:nowrap;
  /* align-items: end; */
}
.entry-content .wp-block-columns.is-layout-flex.is-nowrap{
  flex-wrap:nowrap;
  align-items:flex-start;
  gap:1.25rem;
}
.entry-content .wp-block-columns.is-not-stacked-on-mobile{
  display:flex;
  flex-wrap:nowrap;
  align-items:flex-start;
  gap:1.25rem;
}
.entry-content .wp-block-columns.is-not-stacked-on-mobile > .wp-block-column{
  flex:1 1 0;
  min-width:0;
}
.block-editor-block-list__layout .wp-block-columns.is-layout-flex.is-nowrap{
  flex-wrap:nowrap;
  align-items:flex-start;
  gap:1.25rem;
}
.block-editor-block-list__layout .wp-block-columns.is-not-stacked-on-mobile{
  display:flex;
  flex-wrap:nowrap;
  align-items:flex-start;
  gap:1.25rem;
}
.block-editor-block-list__layout .wp-block-columns.is-not-stacked-on-mobile > .wp-block-column{
  flex:1 1 0;
  min-width:0;
}
.entry-content .wp-block-group.is-layout-flex {
  align-items: flex-start;
}
.entry-content .wp-block-group.is-layout-flex > .wp-block-image{
  margin:0;
  flex:0 0 auto;
}
.entry-content .wp-block-group.is-layout-flex > p{
  margin:0;
  flex:1 1 auto;
}
@media (max-width:640px){
  .entry-content .wp-block-group.is-layout-flex,
  .entry-content .wp-block-group.is-layout-flex.is-nowrap{
    flex-direction:column;
    flex-wrap:wrap;
  }
  .entry-content .wp-block-image,
  .block-editor-block-list__layout .wp-block-image{
    width:100% !important;
  }
  .entry-content .wp-block-image img,
  .block-editor-block-list__layout .wp-block-image img{
    width:100%;
    height:auto;
    display:block;
  }
  .entry-content .wp-block-columns.is-layout-flex.is-nowrap{
    flex-direction:row;
    flex-wrap:nowrap;
    overflow-x:auto;
  }
  .entry-content .wp-block-columns.is-layout-flex.is-nowrap > .wp-block-column{
    flex:0 0 auto;
    min-width:240px;
  }
  .entry-content .wp-block-group.is-layout-flex > .wp-block-image,
  .entry-content .wp-block-group.is-layout-flex > p{
    width:100%;
  }
  .entry-content .wp-block-columns.is-not-stacked-on-mobile{
    flex-direction:column;
    flex-wrap:wrap;
  }
  .entry-content .wp-block-columns.is-not-stacked-on-mobile > .wp-block-column{
    width:100%;
    flex:0 0 100%;
  }
  .block-editor-block-list__layout .wp-block-columns.is-not-stacked-on-mobile{
    flex-direction:column;
    flex-wrap:wrap;
  }
  .block-editor-block-list__layout .wp-block-columns.is-not-stacked-on-mobile > .wp-block-column{
    width:100%;
    flex:0 0 100%;
  }

  /* iOS Safari fix: background-attachment fixed breaks rendering; force scroll */
  .entry-content .wp-block-group[style*="background-attachment:fixed"],
  .block-editor-block-list__layout .wp-block-group[style*="background-attachment:fixed"]{
    background-attachment:scroll !important;
    background-position:center !important;
    background-size:cover !important;
  }

  /* Force block images to fill the mobile width */
  .entry-content .wp-block-image,
  .entry-content .wp-block-image.alignleft,
  .entry-content .wp-block-image.alignright,
  .entry-content .wp-block-image.aligncenter,
  .block-editor-block-list__layout .wp-block-image{
    width:100% !important;
    max-width:100% !important;
    margin-left:0;
    margin-right:0;
  }
  .entry-content .wp-block-image img,
  .block-editor-block-list__layout .wp-block-image img{
    width:100% !important;
    max-width:100% !important;
    height:auto;
    display:block;
  }
  body.page:not(.home) .entry-content p,
  body.single:not(.home) .entry-content p{
    font-size: var(--page-paragraph-size-mobile) !important;
  }
}

/* Ensure full-height hero layout remains on the blog home */
body.blog .hero-grid-wrap{
  min-height:100vh;
  display:grid;
  align-content:stretch;
  padding-top:var(--frame-x);
  padding-bottom:var(--frame-x);
}
@media (max-width:640px){
  body.blog .hero-grid-wrap{
    padding-top:var(--frame-x-mobile);
    padding-bottom:var(--frame-x-mobile);
  }
}

/* On archive/category pages, use normal flow instead of full-height hero layout */
body.archive .hero-grid-wrap{
  min-height:auto;
  display:block;
  align-content:normal;
  max-width: 1280px;
  margin: 0 auto;
  padding-left: var(--frame-x);
  padding-right: var(--frame-x);
}
.page-template-page-posts .hero-grid-wrap{
  min-height:auto;
  display:block;
  align-content:normal;
  max-width: 1280px;
  margin: 0 auto;
  padding-left: var(--frame-x);
  padding-right: var(--frame-x);
}
.hero-grid{ display:grid; grid-template-columns: 1fr var(--hero-right-col); gap: var(--grid-gap); align-items: stretch; }
.hero-grid .hero-stack{ display:grid; grid-template-rows: 1fr 1fr; gap:var(--grid-gap); }
.hero-card{ position:relative; overflow:hidden; border-radius:10px; border: 1px rgba(255, 255, 255, 0.10) solid; isolation:isolate; outline:0px solid transparent; box-shadow: 0 0 10px rgba(0,0,0,0.3); }
.hero-card::before{
  content:"";
  position:absolute;
  inset:0;
  background: var(--bg) center/cover no-repeat;
  z-index:-2;
  transform:scale(1.02);
  opacity:0;
  /* Only cross-fade by default; hover zoom handled separately */
  transition: opacity 0.9s ease-in-out;
}
.hero-card:hover::before,
.hero-card:focus-within::before{
  transform: scale(var(--hover-zoom));
  transition: transform 2s ease;
}
.hero-card__overlay{ position:absolute; inset:0; background: linear-gradient(180deg, var(--hero-overlay-top) 0%, var(--hero-overlay-mid) 25%, var(--hero-overlay-bot) 100%); z-index:-1; }

/* Ensure smaller hero cards always show their image via ::before */
.hero-card--small::before{
  opacity:1;
}
@media (max-width:640px){
  /* On mobile, we don't force the hero to 100vh so it doesn't squash */
  .hero-grid-wrap{ min-height:auto; }
  /* Slightly adjust card radius on mobile for a different feel */
  .hero-card{ border-radius:8px; }
  /* Prevent accidental horizontal scroll from wide elements */
  html, body, #page{ max-width:100%; overflow-x:hidden; }
  .header-inner, .site-main, .footer-box{ width:100%; box-sizing:border-box; }
  /* Allow footer columns to wrap instead of overflowing */
  .footer-row{ flex-direction:column; padding:0 0; }
  .footer-right{ text-align:left; width:100%; }
  .footer-right-inner{ flex-wrap:wrap; width:100%; }
  .footer-col{ min-width:0; flex:1 1 200px; }
  /* On mobile, use separate overlay tokens so styling can differ */
  .hero-card__overlay{
    background: linear-gradient(
      180deg,
      var(--hero-overlay-top-mobile) 0%,
      var(--hero-overlay-mid-mobile) 35%,
      var(--hero-overlay-bot-mobile) 100%
    );
  }
}

/* Mobile readability improvements */
@media (max-width:640px){
  html{ font-size: var(--mobile-font-size-base); }
  body{ font-size: var(--mobile-font-size-base); }
  .hero-title--lg{ font-size: clamp(1.6rem, 6vw, 2.1rem); }
  .hero-title--sm{ font-size: clamp(1.05rem, 4.6vw, 1.25rem); }
  .hero-card__excerpt{ font-size: calc(var(--mobile-font-size-base) * 0.94); line-height:1.55; }
  .wp-block-post-content p,
  .wp-block-paragraph{ font-size: calc(var(--mobile-font-size-base) * 0.97); line-height:1.6; }
  .post-list__item h4{ font-size: 1.05rem; }
  .footer-links li, .footer-box .wp-block-site-tagline{ font-size: .98rem; }
  .single .entry-title,
  .page .entry-title{
    font-size: var(--entry-title-mobile);
    line-height:1.15;
  }
}
.hero-card__content{ position:absolute; left:20px; right:20px; bottom:20px; color:#fff; z-index:2; }
/* Large hero text animation: slide in from left on each rotation */
.hero-card--large.hero-card--anim-cycle .hero-card__kicker,
.hero-card--large.hero-card--anim-cycle .hero-card__title,
.hero-card--large.hero-card--anim-cycle .hero-card__excerpt,
.hero-card--large.hero-card--anim-cycle .hero-card__cta{
  opacity:0;
  transform:translateX(-20px);
}
.hero-card--large.hero-card--anim-cycle .hero-card__kicker{
  animation: heroTextIn 0.5s ease-out 0.15s forwards;
}
.hero-card--large.hero-card--anim-cycle .hero-card__title{
  animation: heroTextIn 0.5s ease-out 0.30s forwards;
}
.hero-card--large.hero-card--anim-cycle .hero-card__excerpt{
  animation: heroTextIn 0.5s ease-out 0.45s forwards;
}
.hero-card--large.hero-card--anim-cycle .hero-card__cta{
  animation: heroTextIn 0.5s ease-out 0.60s forwards;
}
@keyframes heroTextIn{
  from{
    opacity:0;
    transform:translateX(-20px);
  }
  to{
    opacity:1;
    transform:translateX(0);
  }
}

/* Cross-fade background inside the fixed large hero using CSS vars */
.hero-card--large{
  position:relative;
  --bg-current: var(--bg);
  --bg-next: var(--bg);
}
.hero-card--large::before,
.hero-card--large::after{
  content:"";
  position:absolute;
  inset:0;
  background-position:center;
  background-size:cover;
  background-repeat:no-repeat;
  z-index:-2;
}
.hero-card--large::before{
  background-image:var(--bg-current);
  transform:scale(1.02);
  opacity:1;
  transition:opacity 0.9s ease-in-out;
}
.hero-card--large::after{
  background-image:var(--bg-next);
  transform:scale(1.02);
  opacity:0;
  transition:opacity 0.9s ease-in-out;
}
.hero-card--large.hero-card--crossfade::before{
  opacity:0;
}
.hero-card--large.hero-card--crossfade::after{
  opacity:1;
}
.hero-card__kicker,
.hero-card__content a[rel="category"],
.hero-card__content .wp-block-post-terms__separator + a[rel="category"]{
  display:inline-block;
  font-size:12px;
  letter-spacing:.06em;
  text-transform:uppercase;
  opacity:.95;
  margin-bottom:10px;
  padding:.25rem .5rem;
  background: var(--kicker-bg) !important;
  border-left:4px solid var(--accent);
  border-radius:4px;
  color:#fff;
  text-decoration:none;
  box-shadow: 0 1px 1px rgba(0,0,0,.25);
}
.hero-card__content a[rel="category"]:hover{ filter:brightness(1.05); }

/* Ultra-specific backup to ensure chip renders as expected */
.hero-card__content .hero-card__kicker{
  display:inline-block !important;
  padding:.25rem .5rem !important;
  background: var(--kicker-bg) !important;
  color:#fff !important;
  border-left:4px solid var(--accent) !important;
  border-radius:4px !important;
}
.hero-card__title{ margin:0 0 10px; color:#fff; line-height:1.05; }
.hero-title--lg{ font-size: var(--hero-title-lg); }
.hero-title--sm{ font-size: var(--hero-title-sm); }
.hero-stack .hero-card--small .hero-card__title{ font-size: calc(var(--hero-title-sm) * 0.9); }
.hero-card__meta{ font-size:14px; opacity:.9; }
.hero-card__excerpt{ font-size:14px; line-height:1.5; color:#eaeaea; }
.hero-card__cta{
  display:inline;
  margin-left:.4rem;
  padding:0;
  background: transparent;
  color: var(--accent);
  border-radius:0;
  text-decoration:none;
  font-weight:600;
  font-size:inherit;
}
.hero-card__cta:hover{ text-decoration:underline; filter:none; }
.hero-card__cta:focus{ outline:none; text-decoration:underline; }
.hero-card--small .hero-card__cta{ font-weight:600; }


/* CTA responsiveness */
@media (max-width:1024px){
  .hero-card__cta{ font-size:12.5px; }
  .hero-card--small .hero-card__cta{ font-size:11.5px; }
}
@media (max-width:640px){

  .hero-card__kicker {
    text-shadow: #000000 0 0 4px;
    }

  .hero-stack .hero-card--small .hero-card__title.hero-title--sm{
    font-size: var(--hero-title-sm-mobile);
    text-shadow: #000000 0 0 5px;
  }
}
@media (max-width:640px){
  .hero-card__cta{ font-size:11.5px; }
  .hero-card--small .hero-card__cta{ font-size:11px; }
}
.hero-card__link{ position:absolute; inset:0; z-index:1; }

.hero-card--large{ height:100%; min-height:0; }
.hero-card--small{ height:100%; min-height:0; }

/* Accent borders like screenshot */
.hero-card--small{ outline-color: var(--accent); }
.hero-card--small + .hero-card--small{ outline-color: var(--accent); }

@media (max-width: 1024px){
  .hero-grid{ grid-template-columns: 1fr; }
  .hero-grid .hero-stack{ grid-template-rows: none; grid-template-columns: 1fr; }
}

/* Simple list below the hero */
.post-list{ margin-top: 48px; display:grid; gap:20px; grid-template-columns: repeat(3, minmax(0,1fr)); }
.post-list__item{ padding:16px; border:1px solid rgba(255,255,255,.08); border-radius:8px; }
.post-list__item a{ color:inherit; text-decoration:none; }
.post-list__item a:hover{ text-decoration:underline; }
.post-list__item h4{ font-size:var(--post-list-title-size); }

@media (max-width: 1024px){
  .post-list{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 640px){
  .post-list{ grid-template-columns: 1fr; }
}
.post-list__item h4{ margin:0; }

/* Category mosaic grid using small hero cards */
.hero-category-grid{
  margin-top: 10px;
  margin-bottom: 64px; /* ensure clear space above footer */
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap:20px;
  max-width: 1200px;
  margin-left:auto;
  margin-right:auto;
}
.hero-category-header{
  grid-column:1 / -1;
  margin-bottom:16px;
}
.hero-category-title{
  /* font-size:1.6rem; */
  margin:0 18px 4px;
}
.hero-category-description{
  opacity:.8;
  margin:0;
}
.hero-category-empty{
  grid-column:1 / -1;
}
.hero-category-grid .hero-card{
  min-height: 260px;
}
/* Brand badge sits over the large hero, top-left */
.brand-badge{ position:absolute; top:16px; left:16px; z-index:2; display:inline-flex; flex-direction:column; align-items:flex-start; gap:6px; padding:8px 10px; border-radius:10px; background: transparent; backdrop-filter: none; }
.brand-badge__img{ max-height:var(--badge-logo-size); width:auto; display:block; filter: drop-shadow(0 1px 1px rgba(0,0,0,.4)); }
@media (min-width:1900px){
  .brand-badge__img{ max-height:var(--badge-logo-size-xl); }
}
.brand-badge--text{ color:#fff; text-decoration:none; font-weight:700; letter-spacing:.2px; }
.brand-badge__tagline{ font-size:var(--badge-tagline-size); color:#fff; opacity:1; margin-top:2px; line-height:1.3; text-shadow:0 0 3px rgba(0,0,0,1); }
@media (min-width:1900px){ .brand-badge__tagline{ font-size:var(--badge-tagline-size-xl); } }
@media (max-width:640px){ .brand-badge__tagline{line-height: 0.2em; /* display:none; */ } }

/* Badge contrast states */
.hero--bright .brand-badge{ color:#0b0f14; }
.hero--bright .brand-badge .brand-badge--text{ color:#0b0f14; }
.hero--bright .brand-badge .brand-badge__tagline{ color:#0b0f14; text-shadow:none; }
.hero--dark .brand-badge{ color:#fff; }
.hero--dark .brand-badge .brand-badge__tagline{ color:#fff; }

/* Logo swap: show white by default (safer), switch to dark when hero--bright */
.brand-logo{ max-height:42px; width:auto; display:none; filter: drop-shadow(0 1px 1px rgba(0,0,0,.4)); }
.brand-logo--light{ display:inline-block; }
.hero--bright .brand-logo--light{ display:none; }
.hero--bright .brand-logo--dark{ display:inline-block; }
@media (min-width:1900px){ .brand-logo{ max-height:52px; } }

/* Hide the site header on blog home only */
body.blog .wp-site-blocks > header.wp-block-template-part{ display:none; }

/* Hide classic theme header wrappers on blog home */
body.blog #header{ display:none !important; }

/* Hide top hr from classic wrapper on blog home */
body.blog #page > hr:first-of-type,
body.home #page > hr:first-of-type{ display:none !important; }

/* Footer styling to match design */
.footer-box{
  padding-left:var(--frame-x);
  padding-right:var(--frame-x);
  box-sizing:border-box;
}
@media (max-width:640px){
  .footer-box{
    padding-left:var(--frame-x-mobile);
    padding-right:var(--frame-x-mobile);
  }
}
.footer-box .wp-block-group.alignwide{ justify-content: space-between; max-width: none; width: 100%; }
.footer-box .footer-row{ display:flex; justify-content:space-between; align-items:flex-start; gap:var(--footer-col-gap); flex-wrap:wrap; }
.footer-box .footer-left{ flex: 1 1 auto; }
.footer-box .footer-right{ min-width: var(--footer-min-right); text-align:right; }
.footer-box .footer-right-inner{ display:flex; gap:var(--footer-col-gap); justify-content:flex-end; }
.footer-box .footer-col{ min-width: var(--footer-col-min); }
.footer-box .wp-block-site-tagline{ opacity:.85; margin-top:8px;font-size: small; }

.
.footer-links{ list-style:none; margin:0; padding:0; display:grid; gap:.6rem; }
.footer-links a{ color:inherit; text-decoration:none; }
.footer-links a:hover{ text-decoration:underline; }
.footer-links li{ list-style-position: inside; text-align:left; }
/* Footer styles (moved from footer-box.php) */
.footer-logo{
  max-height: var(--footer-logo-max-height);
  width:auto;
  height:auto;
  display:block;
}
.site-title-fallback{
  font-weight:700;
  font-size:2rem;
  line-height:1.1;
}
.footer-company-meta{
  margin-top:10px;
  font-size:.95rem;
  line-height:1.5;
  opacity:.9;
  display: flex;
  align-items: center;
}
.footer-company-meta a{
  color:inherit;
  text-decoration:none;
}
.footer-company-meta span {
  color: rgb(151, 151, 151);
  font-size: 1rem;
    position: relative;
    padding-right: 4px;
}
.footer-legal{
  margin-top:32px;
  font-size:.85rem;
  opacity:.85;
  text-align:center;
}
@media (max-width: 782px){
  .footer-box .wp-block-group.alignwide{ flex-direction: column; align-items: flex-start; }
  .footer-box [style*="text-align:right"]{ text-align:left !important; }
  .footer-box .footer-right{ min-width:0; width:100%; }
  .footer-box .footer-right-inner{ justify-content:flex-start; }
}

/* Keep footer at bottom on all pages except the home page */
body:not(.home) #page{
  min-height:100vh;
  display:flex;
  flex-direction:column;
  width:100%;
}
body:not(.home) .site-main{
  flex:1 0 auto;
  min-height:auto;
  width:100%;
  box-sizing:border-box;
}
body:not(.home) .footer-box{
  width:100%;
  box-sizing:border-box;
}
body:not(.home) .footer-box .wp-block-group.alignwide{
  max-width:1400px;
  width:100%;
  margin-left:auto;
  margin-right:auto;
}
/* @media (max-width:640px){ .footer-box{ padding-left:var(--frame-x-mobile); padding-right:var(--frame-x-mobile); } } */

/* Mobile: center footer contents */
@media (max-width:640px){

  /* Stack neatly, center layout and spacing */
  .footer-box .wp-block-group.alignwide,
  .footer-box .footer-row{
    display:flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 14px;
    width:100% !important;
    max-width:100% !important;
    margin:0 auto !important;
    box-sizing:border-box;

    overflow-x:hidden;
  }
  .footer-box .footer-left,
  .footer-box .footer-right{
    flex:0 0 auto;
    margin:4px auto 8px;
    width:100% !important;
    max-width:520px !important;
  }
  .footer-box .footer-left,
  .footer-box .footer-left *{ box-sizing:border-box; }
  .footer-box .footer-left{ padding:0; }
  .footer-box .footer-left img,
  .footer-box .footer-left .custom-logo-link{
    display:block;
    margin-left:auto;
    margin-right:auto;
    text-align:center;
    max-width: 100%;
    height:auto;
    margin-top:10px;
  }
  .footer-box .wp-block-site-tagline{
    margin:8px auto 0;
    opacity:.9;
    max-width:100%;
    font-size:.95rem;
    line-height:1.35;
    word-break:break-word;
    padding:0 10px;
  }

  .footer-box .footer-right{ width:100%; text-align:center; min-width:0; }
  .footer-box .footer-right-inner{
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:12px;
    width:100% !important;
    max-width:520px !important;
    margin:4px auto 0 !important;
  }
  .footer-box .footer-col{
    min-width:0;
    width:100%;
    max-width:240px;
  }

  /* Clean centered lists */
  .footer-links{ margin:0; padding:0; }
  .footer-links li{ list-style:none; text-align:center; line-height:1.6; }

  /* Single column links on mobile */
  .footer-box .footer-col{ width:100%; min-width:0; }
  .footer-box .footer-left img{ max-height:40px; }
}

/* Hide classic footer on blog home so new footer shows */
body.blog #footer{ display:none !important; }

/* Single post + page layout */
.single,
.page{
  display:flex;
  justify-content:center;
  flex-direction:column;
  align-items:center;
}
.single #page,
.page #page{
  max-width:1400px;
  width:100%;
  margin:0 10px !important;
}

.single #page article,
.page #page article {
  background-color: white;
  border-radius:10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.single .site-main,
.page .site-main{
  max-width:1400px;
  margin:0 auto;
}
.single .footer-box,
.page .footer-box{
  max-width:1400px;
  margin:1rem auto;
}

/* Category layout: match single/post width (avoid header/main jump) */
.category{
  display:flex;
  justify-content:center;
}
.category #page{
  max-width:1400px;
  width:100%;
  margin:0 10px !important;
}
.category .site-main{
  max-width:1400px;
  margin:0 auto;
}
.category .footer-box{
  max-width:1400px;
  margin:1rem auto;
}
.archive .footer-box{
  max-width:1400px;
  margin:1rem auto;
}
.category #footer{
  max-width:1400px;
  margin:0 auto;
}
.single #footer,
.page #footer{
  max-width:1400px;
  margin:0 auto;
}
.single .entry-header,
.page .entry-header, 
.post .entry-header {
  margin-bottom:0.5rem;
}
.single .entry-featured-image,
.page .entry-featured-image{
  margin-bottom:1.25rem;
}
.single .entry-featured-image img,
.page .entry-featured-image img{
  width:100%;
  height:auto;
  max-height:33vh;
  display:block;
  border-top-left-radius:10px;
  border-top-right-radius:10px;
  object-fit:cover;
}
.single .entry-title{
  margin:0 0 .5rem;
  padding: 0 40px;
}

.page .entry-title{
  margin:1.5rem 0 0 0;
  padding: 0 40px;
}

.single .entry-meta,
.page .entry-meta{
  font-size:.9rem;
  opacity:.8;
  padding: 0 40px;
  display: none;
}
.single .entry-categories{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  padding:0 40px;
  margin-bottom:.75rem;
}
.single .entry-categories .hero-card__kicker{
  margin:0;
}
.page .entry-categories{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  padding:0 40px;
  margin-bottom:.75rem;
}
.page .entry-categories .hero-card__kicker{
  margin:0;
}
.single .entry-header,
.page .entry-header{
  display:block;
  float:none;
  width:100%;
}
.single .entry-content,
.page .entry-content{
  float:none;
  width:100%;
  box-sizing:border-box;
}
.entry-content,
.entry-related-nav {
  padding: 0 40px 2rem 40px;
}
body.page:not(.home) .entry-content p,
body.single:not(.home) .entry-content p{
  font-size: var(--page-paragraph-size);
  line-height: 1.7;
}
/* Keep page content single-column even if a Group is set to flex */
body.page .entry-content > .wp-block-group.is-layout-flex{
  display:flex !important;
  flex-direction:column !important;
}
body.page .entry-content > .wp-block-group.is-layout-flex > *{
  width:100%;
}
/* Force page columns to stack vertically */
body.page .entry-content .wp-block-columns{
  display:block !important;
}
body.page .entry-content .wp-block-columns > .wp-block-column{
  width:100% !important;
  flex:0 0 100% !important;
}
body.page .entry-content .wp-block-columns.is-layout-flex{
  flex-direction:column !important;
  gap:1.25rem;
}

/* Ensure grid layout renders as grid (not stacked) */
.wp-block-group.is-layout-grid{
  display:grid !important;
  grid-template-columns:repeat(auto-fit, minmax(240px, 1fr));
  gap:var(--grid-gap, 24px);
}

/* Match block editor table borders on frontend */
.wp-block-table table{
  width:100%;
  border-collapse:collapse;
  border:1px solid rgba(0,0,0,0.15);
}
.wp-block-table th,
.wp-block-table td{
  border:1px solid rgba(0,0,0,0.15);
  padding:0.6rem 0.75rem;
}
.wp-block-table thead th{
  background:rgba(0,0,0,0.04);
  font-weight:600;
}

/* Ensure social links render as flex (matches editor) */
.wp-block-social-links{
  display:flex !important;
  gap:var(--wp--style--block-gap, 0.6rem);
  flex-wrap:wrap;
  align-items:center;
  padding:0;
  margin:0;
}
/* Prevent duplicate titles when a post-title block is present inside page content */
body.page .entry-content .wp-block-post-title{
  display:none;
}

/* Header layout (moved from header.php) */
#header{
  border-bottom:1px solid rgba(255,255,255,.08);
  position:relative;
  z-index:20;
  /* inherit default body text color (dark on light) */
  color:inherit;
}
.header-inner{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:32px;
  padding:16px var(--frame-x);
  box-sizing:border-box;
  max-width:1400px;
  margin:0 auto;
}
@media (max-width:640px){
  .header-inner{
    padding-left:var(--frame-x-mobile);
    padding-right:var(--frame-x-mobile);
  }
  .single .entry-categories,
    .single .entry-title, .page .entry-title {
    gap:8px;
    padding:0 20px;
  }
  .entry-content {
    padding: 0 20px 1rem 20px;
  } 
}

#header {
  border-bottom: 1px solid rgb(6 6 6);
  margin: 0 20px;
}

.single #header,
.page #header {
  border-bottom: 0px solid rgb(6 6 6);
}

#headerimg img,
.header-logo{
  max-height:40px;
  height:auto;
  width:auto;
  display:block;
}
@media (max-width:640px){
  #headerimg img,
  .header-logo{
    max-height:26px;
  }
}
#headerimg a{
  display:flex;
  align-items:center;
  gap:12px;
  text-decoration:none;
  color:inherit;
}
#headerimg .site-title-text{
  font-size:1.6rem;
  font-weight:700;
  line-height:1.2;
}
#headerimg .description{
  opacity:.8;
  font-size:.9rem;
  margin-top:4px;
}
@media (max-width:640px){
  #headerimg .description{
    display:none;
  }
}
.header-nav-wrap{
  display:flex;
  align-items:center;
  gap:16px;
}
.header-nav .header-menu{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  gap:24px;
}
.header-nav .header-menu li{
  margin:0;
  position:relative;
}
.header-nav .header-menu a{
  text-decoration:none;
  font-size:.95rem;
  color:inherit;
}
.header-nav .header-menu a:hover{
  text-decoration:underline;
}

/* Desktop dropdown for nested items (e.g., Categories → child categories) */
.header-nav .header-menu .sub-menu{
  list-style:none;
  margin:0;
  padding:8px 0;
  position:absolute;
  top:100%;
  left:0;
  min-width:180px;
  /* Desktop dropdown background: light, with dark text */
  background:rgba(255,255,255,0.98);
  border-radius:8px;
  box-shadow:0 8px 18px rgba(0,0,0,.4);
  display:none;
}
.header-nav .header-menu .sub-menu li{
  margin:0;
}
.header-nav .header-menu .sub-menu a{
  display:block;
  padding:6px 14px;
  font-size:.9rem;
  text-decoration:none;
  color:#111111;
}
.header-nav .header-menu li.menu-item-has-children:hover > .sub-menu,
.header-nav .header-menu li.menu-item-has-children:focus-within > .sub-menu{
  display:block;
}

/* Burger button (hidden on desktop) */
.header-burger{
  display:none;
  width:32px;
  height:32px;
  border:none;
  background:transparent;
  padding:0;
  cursor:pointer;
}
.header-burger span{
  display:block;
  height:2px;
  background:currentColor;
  margin:5px 0;
  transition:transform 0.2s ease, opacity 0.2s ease;
}

/* Mobile header behavior */
@media (max-width:782px){
  .header-burger{
    display:block;
  }
  /* Mobile dropdown: overlay above content, aligned to right */
  .header-nav{
    position:absolute;
    top:100%;
    right:0;
    margin-top:8px;
    background: rgba(255,255,255,0.98);
    color:#111111;
    border-radius:8px;
    padding:12px 16px;
    box-shadow:0 8px 20px rgba(0,0,0,.35);
    display:none;
  }
  .header-nav .header-menu{
    flex-direction:column;
    gap:6px;
  }
  /* On mobile, show sub-menus inline under their parent, indented */
  .header-nav .header-menu .sub-menu{
    position:static;
    background:transparent;
    box-shadow:none;
    padding:4px 0 0 0;
    display:block;
  }
  .header-nav .header-menu .sub-menu a{
    padding:4px 0 4px 16px;
    color:#111111;
  }
  /* When toggled open, show nav as overlay without pushing content */
  body.header-nav-open .header-nav{
    display:block;
  }
  .single #page, .page #page {
  margin:0 !important;
}
}
