@charset "UTF-8";
/*
Theme Name: AHBVVC
Description: Child theme for AHBVVC (Associação Humanitária de Bombeiros Voluntários de Viana do Castelo)
Author: https://nitida.pt
Template: kadence
Version: 1.0.0
*/

/* Import parent theme styles */
/* @import url("../kadence/style.css"); */

/* AHBVVC Custom Styles */
:root {
  /* --color-primary: #C74337;        
  --color-secondary: #C5A46D;      
  --color-neutral-dark: #1A1A1A;   
  --color-neutral-light: #FFFFFF;  
  --color-accent: #2B7EB3;         
  --color-supporting-blue: #63A1B0;
  --color-gray: #B0B0B0;           */

  --color-primary: #D32F2F;       
  --color-secondary: #A1814D;     
  --color-neutral-dark: #111111;  
  --color-neutral-light: #FFFFFF; 
  --color-accent: #0C92C9;        
  --color-gray: #B0B0B0;          
  --color-dark-red: #8B1A1A;      
}

/* Supernav Styles */
.ahbvvc-supernav {
  background: var(--color-neutral-dark);
  color: var(--color-neutral-light);
}

.ahbvvc-supernav .container {
  max-width: var(--global-content-width);
  margin: 0 auto;
  padding: 0 10px;
}

.ahbvvc-supernav .supernav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ahbvvc-supernav .supernav-contact {
  display: flex;
  gap: 20px;
  align-items: center;
}

.ahbvvc-supernav .contact-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 600;
}

.ahbvvc-supernav .contact-icon {
  display: flex;
  align-items: center;
}

.ahbvvc-supernav .contact-icon svg {
  width: 16px;
  height: 16px;
}

.ahbvvc-supernav .contact-item a {
  color: var(--color-neutral-light);
  text-decoration: none;
  transition: color 0.3s ease;
}

.ahbvvc-supernav .contact-item a:hover {
  color: var(--color-secondary);
}

.ahbvvc-supernav .supernav-menu {
  flex-shrink: 0;
}

.ahbvvc-supernav .supernav-links {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 1px;
}

.ahbvvc-supernav .supernav-links li a {
  color: var(--color-neutral-light);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 0;
  font-weight: 600;
  background: var(--color-primary);
  transition: all 0.3s ease;
  font-size: 15px;
  height: 100%;
  display: flex;
  align-items: center;
}

.ahbvvc-supernav .supernav-links li a:hover {
  background: var(--color-dark-red);
  transform: translateY(-1px);
}

/* Responsive Design */
/* Below 1400px contact info + menu no longer fit on one row and the contact
   items wrapped mid-text ("9h-" / "17h"). Stack instead: contact row on top,
   menu row centred below, each item kept on one line. */
@media (max-width: 1399px) {
  .ahbvvc-supernav .supernav-content {
    flex-direction: column;
    align-items: flex-end; /* stacked rows sit on the right, under the header's Emergências button */
    gap: 6px;
    padding: 6px 0;
  }

  .ahbvvc-supernav .supernav-contact {
    flex-wrap: wrap;
    justify-content: flex-end;
    row-gap: 4px;
  }

  .ahbvvc-supernav .contact-item {
    white-space: nowrap;
  }

  .ahbvvc-supernav .supernav-links li a {
    padding-top: 4px;
    padding-bottom: 4px;
  }
}

@media (max-width: 768px) {
  .ahbvvc-supernav .supernav-content {
    flex-direction: column;
    align-items: center; /* phones: back to centred (overrides the 1399px flex-end) */
    gap: 10px;
  }

  .ahbvvc-supernav .supernav-contact {
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
  }

  .ahbvvc-supernav .supernav-links {
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .ahbvvc-supernav .supernav-contact {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .ahbvvc-supernav .supernav-links {
    gap: 8px;
  }

  .ahbvvc-supernav .supernav-links li a {
    padding: 5px 10px;
    font-size: 12px;
  }
}

/* Ensure submenu hover styles work */
.main-navigation .primary-menu-container .menu li.menu-item a:hover,
.main-navigation .primary-menu-container .menu li.menu-item a:focus {
  color: var(--color-primary); /* colour only, no background box (2026-10-10) */
}

/* Emergency Button Styles - Modern Flexbox */
.header-navigation,
.main-navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.header-navigation .header-menu-container ul ul li.menu-item > a {
  width: 300px !important;
}

/* Dropdown (2026-10-10): tighter items (Kadence default 1em = 15px top/bottom) and a soft divider.
   Kadence's divider was rgba(255,255,255,.1), made for a dark dropdown, invisible on the white one.
   #masthead prefix beats Kadence's inline Customizer CSS. */
#masthead .header-navigation .header-menu-container ul ul li.menu-item > a {
  padding-top: 9px;
  padding-bottom: 9px;
}
#masthead .header-navigation .header-menu-container ul ul li.menu-item {
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
#masthead .header-navigation .header-menu-container ul ul li.menu-item:last-child {
  border-bottom: 0;
}

.ahbvvc-emergency-button {
  margin-left: auto;
  flex-shrink: 0;
}

.ahbvvc-emergency-button .emergency-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--color-primary);
  color: var(--color-neutral-light);
  padding: 12px 20px;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  line-height: 1.2;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  white-space: nowrap;
}

.ahbvvc-emergency-button .emergency-icon {
  flex-shrink: 0;
}

.ahbvvc-emergency-button .emergency-icon svg {
  width: 20px;
  height: 20px;
}

.ahbvvc-emergency-button .emergency-text {
  text-align: left;
}

.ahbvvc-emergency-button .emergency-btn:hover {
  background: var(--color-dark-red);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.ahbvvc-emergency-button .emergency-phone {
  font-size: 0.9em;
  font-weight: 700;
  opacity: 0.95;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .header-navigation,
  .main-navigation {
    flex-direction: column;
    gap: 1rem;
  }

  .ahbvvc-emergency-button {
    margin-left: 0;
  }

  .ahbvvc-emergency-button .emergency-btn {
    padding: 10px 16px;
    font-size: 14px;
  }
}

/* Sticky header (all pages, desktop; Kadence's mobile header isn't sticky): white glass.
   The blur sits on the fixed wrapper and the inner row's solid #F7FAFC is cleared, so the
   page shows through. Not on the inner row itself: an element with backdrop-filter becomes
   the backdrop root for its descendants, so a nested blur would see nothing.
   #masthead: Kadence's own stuck rule (.site-main-header-wrap.site-header-row-container...
   .item-is-fixed.item-is-stuck, 7 classes) sets a shadow; an ID beats any number of classes.
   :not(.item-at-start): with no supernav the header starts at offset 0, and Kadence marks it
   fixed already at scroll 0 (plus .item-at-start); like Kadence's own rules, skip that state. */
#masthead .site-header-upper-inner-wrap.child-is-fixed .site-main-header-wrap:not(.item-at-start) {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 6px 24px rgba(0, 0, 0, 0.08); /* soft: tight contact line + wide diffuse spread */
  background: rgba(255, 255, 255, 0.87);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  backdrop-filter: blur(18px) saturate(180%);
}
/* Two IDs: Kadence's inline rule (#masthead .kadence-sticky-header.item-is-fixed:not(...):not(...)
   > .site-header-row-container-inner { background: palette8 }) is 1 ID + 5 classes and prints later. */
#masthead #main-header .kadence-sticky-header.item-is-fixed:not(.item-at-start) > .site-header-row-container-inner {
  background: transparent;
}

/* TOC scroll offset - prevent content being hidden by sticky header */
h2.toc-item,
h2.kt-adv-heading.toc-item,
.wp-block-kadence-advancedheading.toc-item {
  scroll-margin-top: 120px !important;
}

html {
  scroll-behavior: smooth;
}

/* Calendário cards (archive-event.php) use Kadence's post-card markup; the meta line holds the
   event date and location. Location on its own line: long addresses wrapped mid-line otherwise. */
.event-item .entry-meta .event-location {
  flex-basis: 100%;
}
.event-item .entry-meta > *::after {
  display: none; /* Kadence's dot divider between meta items; not needed with one item per line */
}

/* Single event meta details */
.event-meta-details {
  background: #f8f9fa;
  border-left: 4px solid var(--color-primary);
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.event-meta-details > div {
  margin-bottom: 0.75rem;
}

.event-meta-details > div:last-child {
  margin-bottom: 0;
}

.event-meta-details strong {
  color: var(--color-primary);
}

.event-url a {
  word-break: break-all;
}

.back-to-calendar {
  display: inline-block;
  margin-top: 2rem;
  padding: 0.75rem 1.5rem;
  background: var(--color-primary);
  color: white;
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.3s ease;
}


.back-to-calendar:hover {
  background: var(--color-dark-red);
  transform: translateY(-2px);
}

/* Sócio template styles */
.socio-login-required,
.socio-access-denied {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.socio-login-required h1,
.socio-access-denied h1 {
  color: var(--color-primary);
  margin-bottom: 1rem;
}

.socio-login-box {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 2rem;
  margin: 2rem 0;
  text-align: left;
}

.socio-login-box form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.socio-login-box label {
  font-weight: 600;
  margin-bottom: 0.25rem;
  display: block;
}

.socio-login-box input[type="text"],
.socio-login-box input[type="password"] {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #dee2e6;
  border-radius: 4px;
}

.socio-login-box input[type="submit"] {
  background: var(--color-primary);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

.socio-login-box input[type="submit"]:hover {
  background: var(--color-dark-red);
}

.socio-login-box .login-remember {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.socio-login-box .login-remember input {
  width: auto;
}

.login-help {
  text-align: center;
  margin-top: 1rem;
}

.socio-info {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid #dee2e6;
  text-align: left;
}

.socio-info h2 {
  color: var(--color-primary);
}

.socio-info ul {
  list-style: none;
  padding: 0;
}

.socio-info ul li {
  margin-bottom: 0.5rem;
}

.socio-access-denied ul {
  list-style: none;
  padding: 0;
  text-align: left;
  display: inline-block;
  margin-top: 1rem;
}

.socio-access-denied ul li {
  margin-bottom: 0.5rem;
}

/* Sidebar lists: no left indent (2026-10-09) — Kadence's global `ul { margin: 0 0 1.5em 1.5em }` indents
   every sidebar list (Artigos recentes = core wp-block-latest-posts, plus any Archives/Categories/Comments
   widgets), so links didn't align with the widget heading/search box. Only margin-left is reset (bottom
   spacing kept); bullets are dropped so they don't hang outside. Scoped to the sidebar, post-body lists untouched. */
.primary-sidebar .widget ul {
  margin-left: 0;
  list-style: none;
}
.primary-sidebar .widget ul ul {
  margin-left: 1em; /* keep nested levels (e.g. child categories) visibly nested */
}

/* Sidebar "Artigos recentes" (core latest-posts, class ahbvvc-recent-posts, featured image + date on;
   DB widget_block 3, 2026-11-09): square thumb on the left, date above the title. Core prints image,
   title, date in that order, so a grid places them. The title link is stretched over the whole item,
   so the thumb and date click through too. Items without a featured image keep the empty thumb column
   so titles stay aligned. */
.ahbvvc-recent-posts li {
  position: relative;
  display: grid;
  grid-template-columns: 64px 1fr;
  grid-template-rows: auto 1fr;
  grid-template-areas: "thumb date" "thumb title";
  column-gap: 0.75rem;
  margin-bottom: 1rem;
}
.ahbvvc-recent-posts .wp-block-latest-posts__featured-image {
  grid-area: thumb;
  margin: 0;
}
.ahbvvc-recent-posts .wp-block-latest-posts__featured-image img {
  display: block;
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 4px;
}
.ahbvvc-recent-posts .wp-block-latest-posts__post-date {
  grid-area: date;
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.4;
  color: #555555;
}
.ahbvvc-recent-posts .wp-block-latest-posts__post-title {
  grid-area: title;
  line-height: 1.3;
}
.ahbvvc-recent-posts .wp-block-latest-posts__post-title::after {
  content: "";
  position: absolute;
  inset: 0;
}

/* Single post featured image: contain, not cover (2026-10-09) — Kadence crops the
   top image into a fixed 16:9 box (padding-bottom hack + absolutely positioned
   inner), which cuts heads off portrait photos (960x1280). Instead drop the fixed
   ratio so the box follows the image's natural ratio, cap the height so portraits
   don't become huge, show the whole image (contain) and fill the side space with a
   neutral light background. Scoped to .article-post-thumbnail (single posts only);
   archive/loop cards use plain .post-thumbnail and stay cover. */
.wp-site-blocks .article-post-thumbnail.post-thumbnail {
  padding-bottom: 0;
  height: auto;
  background: #f1f1f1;
}
.wp-site-blocks .article-post-thumbnail .post-thumbnail-inner {
  position: static;
}
.wp-site-blocks .article-post-thumbnail img.post-top-featured {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 70vh;
  margin: 0 auto;
  object-fit: contain;
}

/* Header side padding (2026-10-09) — the Customizer saved the header row padding
   as "10px 0 10px 0", which overrides Kadence's default side gutter
   (.site-container { padding: 0 var(--global-content-edge-padding) }). With the
   standard (full-width) row layout the logo and the Emergências button then touch
   the viewport edges, on desktop and mobile. Restore only the horizontal gutter,
   using the same token as the page content (1.5rem); vertical padding is untouched.
   #masthead prefix beats Kadence's inline rule regardless of stylesheet order. */
#masthead .site-header-row-container-inner > .site-container {
  padding-left: var(--global-content-edge-padding);
  padding-right: var(--global-content-edge-padding);
}

/* Black top bar (.ahbvvc-supernav): its .container had only 10px side padding, so it
   sat closer to the edge than the content. Match the content gutter. */
.ahbvvc-supernav .container {
  padding-left: var(--global-content-edge-padding);
  padding-right: var(--global-content-edge-padding);
}

/* Supernav in the mobile drawer (2026-10-10) — at <=1024px Kadence swaps to the
   burger header; the black bar would then be a cramped extra row, so it's hidden and
   the same contact info + menu are rendered inside the drawer instead
   (ahbvvc_add_drawer_supernav, hook kadence_after_mobile_navigation_popup). */
@media (max-width: 1024px) {
  .ahbvvc-supernav {
    display: none;
  }
}

/* No gap/border above: the supernav links continue the main menu as one list.
   No side padding: the drawer content box already lines up with the menu items. */
.ahbvvc-drawer-supernav {
  margin-top: -10px; /* cancels Kadence's 10px margin-bottom on the drawer's .site-header-item */
  color: var(--color-neutral-light);
}

/* Menu first (continues the main nav), contact info at the bottom. */
.ahbvvc-drawer-supernav .supernav-menu {
  order: -1;
}

.ahbvvc-drawer-supernav .supernav-content,
.ahbvvc-drawer-supernav .supernav-contact {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ahbvvc-drawer-supernav .supernav-content {
  gap: 1.5em;
}

.ahbvvc-drawer-supernav .contact-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 15px;
}

.ahbvvc-drawer-supernav .contact-icon svg {
  width: 16px;
  height: 16px;
  margin-top: 3px;
}

.ahbvvc-drawer-supernav .contact-item a {
  color: inherit;
  text-decoration: none;
}


/* Mobile drawer redesign (2026-10-10): white panel instead of Kadence's near-black one, larger
   main items with soft dividers, grey dashed sub-items (same "– " marker as the footer), the
   supernav links (Contactos … Loja) as outlined pills, contact info last with red icons.
   #mobile-drawer prefix: Kadence prints the drawer colours (white link bg, rgba(255,255,255,.1)
   dividers made for the dark panel) as inline Customizer CSS after this file. */
#mobile-drawer .drawer-inner {
  background: #fff;
  color: var(--color-neutral-dark);
}
#mobile-drawer .menu-toggle-close {
  color: var(--color-neutral-dark);
}
#mobile-drawer .drawer-content {
  padding-bottom: 2.5rem;
}
/* Main menu (also matches the supernav nav, which reuses .mobile-navigation; its pills override below) */
#mobile-drawer .mobile-navigation ul.menu li > a,
#mobile-drawer .mobile-navigation ul.menu li.menu-item-has-children > .drawer-nav-drop-wrap {
  background: transparent;
  color: var(--color-neutral-dark);
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}
#mobile-drawer .mobile-navigation ul.menu li.menu-item-has-children > .drawer-nav-drop-wrap > a {
  border-bottom: 0; /* the wrap carries the divider */
}
#mobile-drawer .mobile-navigation ul.menu > li > a,
#mobile-drawer .mobile-navigation ul.menu > li > .drawer-nav-drop-wrap > a {
  padding: 15px 0;
  font-size: 18px;
  font-weight: 600;
}
#mobile-drawer .mobile-navigation ul.menu li.current-menu-item > a,
#mobile-drawer .mobile-navigation ul.menu li.current-menu-ancestor > .drawer-nav-drop-wrap > a {
  color: var(--color-primary);
}
#mobile-drawer .mobile-navigation .drawer-sub-toggle {
  color: var(--color-neutral-dark);
}
/* Sub-items: no indent, a dash instead; tighter, lighter */
#mobile-drawer .mobile-navigation ul.menu ul.sub-menu {
  padding-left: 0;
}
#mobile-drawer .mobile-navigation ul.menu ul.sub-menu li > a {
  padding: 11px 0;
  font-size: 16px;
  font-weight: 400;
  color: #555;
}
#mobile-drawer .mobile-navigation ul.menu ul.sub-menu li > a::before {
  content: "\2013\00a0"; /* en dash + nbsp, escaped: a stylesheet served without a charset can be read as Latin-1 ("â€“") */
}
/* Supernav links as pills */
#mobile-drawer .ahbvvc-drawer-supernav .mobile-navigation ul.menu {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
#mobile-drawer .ahbvvc-drawer-supernav .mobile-navigation ul.menu > li > a {
  padding: 8px 16px;
  font-size: 15px;
  font-weight: 500;
  color: var(--color-primary);
  border: 1px solid color-mix(in srgb, var(--color-primary) 35%, transparent);
  border-radius: 999px;
}
#mobile-drawer .ahbvvc-drawer-supernav .mobile-navigation ul.menu > li.current-menu-item > a {
  background: var(--color-primary);
  color: var(--color-neutral-light);
}
/* Contact info */
#mobile-drawer .ahbvvc-drawer-supernav {
  margin-top: 1.5rem; /* replaces the -10px "continue the list" offset: the pills are their own group now */
  color: #555;
}
#mobile-drawer .ahbvvc-drawer-supernav .supernav-contact {
  padding-top: 1.25rem;
  border-top: 1px solid rgba(0, 0, 0, 0.07);
}
#mobile-drawer .ahbvvc-drawer-supernav .contact-icon {
  color: var(--color-primary);
}

/* === FE review 2026-10-10 — group B: posts & events === */

/* FE-10: sidebars are off on single posts/events (theme_mods post_layout / event_layout = narrow), but keep the
   widgets presentable if a sidebar is ever re-enabled: brand-red search button, widget titles smaller than the H1. */
.primary-sidebar .wp-block-search__button {
  background: var(--global-palette2, #d32f2f);
  color: #fff;
  border: 0;
  border-radius: 4px;
  padding: 0.5em 1em;
  font-weight: 600;
}
.primary-sidebar .wp-block-search__button:hover {
  background: #be2b2b;
}
.primary-sidebar .widget .wp-block-heading,
.primary-sidebar .widget-title {
  font-size: 1.25rem;
  line-height: 1.3;
}

/* FE-11: home "Próximos Eventos" (shortcode [ahbvvc_upcoming_events]) */
.ahbvvc-events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.ahbvvc-event-card {
  background: #fff;
  box-shadow: 0 0 20px -16px #000;
  display: flex;
  flex-direction: column;
}
.ahbvvc-event-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
.ahbvvc-event-body {
  padding: 1.25rem;
}
.ahbvvc-event-body h3 {
  font-size: 1.25rem;
  margin: 0 0 0.5rem;
}
.ahbvvc-event-body h3 a {
  color: inherit;
  text-decoration: none;
}
.ahbvvc-event-date {
  color: var(--global-palette2, #d32f2f);
  font-weight: 600;
  font-size: 0.9rem;
  margin: 0 0 0.35rem;
}
.ahbvvc-event-more {
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
}
.ahbvvc-events-empty {
  margin-bottom: 1.5rem;
}
.ahbvvc-events-past-label {
  font-size: 1.1rem;
  margin: 0 0 1rem;
  color: var(--global-palette6, #797979);
}

/* FE-12: cards without a featured image must not reserve an image box (Kadence keeps a ratio box only when a
   thumbnail exists, this guards any empty .post-thumbnail wrapper). */
.loop-entry:not(.has-post-thumbnail) .post-thumbnail {
  display: none;
}
.loop-entry:not(.has-post-thumbnail) .entry-content-wrap {
  padding-top: 2rem;
}

/* FE-13: portrait featured image — no grey frame spanning the full width; the frame hugs the image. */
.wp-site-blocks .article-post-thumbnail.post-thumbnail {
  background: transparent;
}

/* FE-13: "Notícias Relacionadas" sits on the content gutter (the inner wrapper added a second 1.5rem). */
/* .alignwide pushes the inner wrapper outside the narrow container (x=193 vs content at 323); keep it inside. */
.entry-related .entry-related-inner .entry-related-inner-content.alignwide {
  max-width: none;
  margin-left: 0 !important; /* beats Kadence's alignwide negative margin */
  margin-right: 0 !important;
  padding-left: 0; /* .entry-related-inner already provides the 1.5rem gutter */
  padding-right: 0;
  width: auto !important;
}

/* === FE review 2026-10-10 — group A: global chrome === */

/* FE-01: the home hero H1 has an inline font-size:62px (post content), so only !important can
   step it down. Scoped to the home hero H1 (has-theme-palette-9-color, centered). */
@media (max-width: 768px) {
  .home h1.wp-block-heading.has-text-align-center.has-theme-palette-9-color {
    font-size: clamp(30px, 9vw, 44px) !important;
    line-height: 1.2 !important;
    padding-top: var(--wp--preset--spacing--40, 1rem) !important;
    padding-bottom: var(--wp--preset--spacing--40, 1rem) !important;
  }
}

/* FE-02: the burger header (<=1024px) was ~155px tall. The logo size per breakpoint now lives in
   the Customizer (Header > Logo > logo_width: tablet 58px, mobile 42px; 2026-10-10), as does the
   mobile row padding (Header > Main Row > header_main_padding mobile 4px top/bottom). This only
   drops the row's min-height and trims the logo's own padding. */
@media (max-width: 1024px) {
  #masthead .site-main-header-inner-wrap {
    min-height: 0;
  }
  #masthead .site-branding {
    padding: 6px 0;
  }
}

/* FE-03: footer layout. Kadence's tablet layout is a single column, so set the grid here
   (prefixed with .site-footer to beat footer.min.css, which loads after this file).
   Section 1 = logo, 2 = História + Colaborar + Redes sociais, 3 = Sobre Nós + Legal, 4 = Contactos.
   Desktop 4 columns, tablet 3 (logo on its own row), mobile 1 (Nuno, 2026-11-03). */
.site-middle-footer-inner-wrap {
  overflow-wrap: anywhere; /* long e-mail in Contactos must not push the grid wider */
}
.site-middle-footer-inner-wrap .site-footer-middle-section-1 .wp-block-image {
  margin: 0;
  float: none;
}
@media (min-width: 1025px) {
  /* Logo column was 2fr (about 40%); give the link columns the room instead. */
  .site-footer .site-middle-footer-inner-wrap.site-footer-row.site-footer-row-columns-4.site-footer-row-column-layout-left-forty {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.2fr);
  }
}
@media (min-width: 481px) {
  /* The footer menus are not an accordion on desktop/tablet: show História / Sobre Nós
     children and drop the chevron buttons. (On mobile they stay collapsed to keep it short.) */
  .site-footer .collapse-sub-navigation ul.menu .drawer-sub-toggle {
    display: none;
  }
  .site-footer .collapse-sub-navigation ul.menu ul.sub-menu {
    display: block;
  }
}
/* Footer submenu items (História / Sobre Nós children): no indent, a dash marks them instead. */
.site-footer .collapse-sub-navigation ul.menu ul.sub-menu {
  padding-left: 0;
}
/* No dash before footer sub-items any more: the parents are now headings (Nuno, 2026-11-03). */
@media (max-width: 1024px) {
  .site-footer .site-middle-footer-inner-wrap.site-footer-row.site-footer-row-columns-4 {
    /* 3 columns side by side under the logo row; 2 left Contactos alone on a row with a big gap
       (Nuno, 2026-11-03). Last column wider so the e-mail address fits on one line at 768px. */
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.3fr);
    grid-column-gap: 24px;
    grid-row-gap: 24px;
  }
  .site-footer-middle-section-1 {
    grid-column: 1 / -1;
  }
  .site-footer-middle-section-1 .wp-block-image img {
    width: 120px !important;
  }
}
@media (max-width: 767px) {
  /* One column on phones, large ones and landscape included (Kadence's mobile breakpoint is 767px;
     at 480px a 544px-wide phone still got 2 columns). */
  .site-footer .site-middle-footer-inner-wrap.site-footer-row.site-footer-row-columns-4 {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 480px) {
  .site-footer-middle-section-1 .wp-block-image img {
    width: 90px !important;
  }
  .site-middle-footer-inner-wrap .widget {
    margin-bottom: 20px;
  }
}

/* FE-04: pages are on a white body, but boxed templates (archives, 404, patron, event) have a
   grey body (#F7FAFC) and the transparent bottom footer row showed it through. */
.site-bottom-footer-wrap .site-footer-row-container-inner {
  background: #fff;
}
/* Menus row: bottom padding = top (80px, Kadence's setting) at every width (Nuno, 2026-11-03).
   #colophon prefix beats footer.min.css, which loads after this file. */
#colophon .site-middle-footer-inner-wrap {
  padding-bottom: 80px;
}
/* Copyright row: smaller text, less air (was 17px text in a 121px row; Nuno, 2026-11-03; padding 14px → 17px, +20%, client found it slightly tight).
   #colophon prefix beats Kadence's footer.min.css, which loads after this file. */
#colophon .site-bottom-footer-inner-wrap {
  padding-top: 17px;
  padding-bottom: 17px;
}
#colophon .site-bottom-footer-wrap .footer-html {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #555;
}

/* FE-05: social icons were 24px glyphs with a .4rem gap. Keep the drawing, enlarge the hit
   area to 44px (the icon is a ::before inside the link, set in Additional CSS). */
.site-footer .menu-social-container ul {
  gap: 4px;
}
.site-footer .menu-social-container ul li a {
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
}
.site-footer .menu-social-container ul li a:before {
  width: 28px;
  height: 28px;
}

/* FE-07: 404 and patron use Kadence's boxed card on a grey body. Make them look like the
   regular (unboxed) pages: white background, no card, same 24px gutter, centred title. */
body.error404,
body.single-patron {
  background: #fff;
}
/* Kadence's boxed mode gives the card negative side margins on mobile; !important to win. */
body.error404 .page-content,
body.single-patron .entry.content-bg {
  background: transparent !important;
  box-shadow: none !important;
  margin: 2rem 0 0 !important;
}
.error404 .entry-content-wrap,
.single-patron .entry-content-wrap {
  padding-left: 0;
  padding-right: 0;
}
.error404 .page-title,
.single-patron .entry-title {
  text-align: center;
}
.error404 .search-form {
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}
.error404 .page-content > .entry-content-wrap > p {
  text-align: center;
}

/* FE-08: archive pages (Notícias, Calendário) on white. Their titles are left-aligned like the page
   titles now (Customizer: *_archive_title_align; the old centring here is gone, 2026-10-10).
   Cards keep their own white background and shadow. */
body.blog,
body.post-type-archive-event {
  background: #fff;
}
.blog .content-bg.loop-entry,
.post-type-archive-event .content-bg.loop-entry {
  border: 1px solid var(--global-palette7);
}

/* === FE review 2026-10-10 — group C: page layouts === */

/* FE-14: an "alignwide" image inside a Kadence column gets the full-bleed negative margins and
   100vw width, so on Condecorações (Crachá de Ouro, image 531) it covered the text column at
   768–1024. Inside a column, wide alignment means nothing: keep the image in its column. */
.kt-inside-inner-col > .wp-block-image.alignwide {
  margin-left: 0;
  margin-right: 0;
  width: auto;
  max-width: 100%;
}
/* FE-14: the Crachá and Medalhas rows have "inherit max width" on, which adds a 24px side
   padding inside the page gutter (content at 48px vs 24px for the rest). IDs are the Kadence
   uniqueIDs stored in the page content, so they are the same on every environment.
   The extra .wp-block-kadence-rowlayout beats Kadence's inline row CSS, which prints after this file. */
.wp-block-kadence-rowlayout.kb-row-layout-id46_221610-2d > .kt-row-column-wrap,
.wp-block-kadence-rowlayout.kb-row-layout-id46_7b379f-49 > .kt-row-column-wrap {
  padding-left: 0;
  padding-right: 0;
}

/* FE-15: Kadence's form is a *wrapping* flex column, so fields stretch to the widest item (inputs'
   intrinsic ~300px) rather than the form; on narrow columns inputs overflowed by a few px and the
   textarea (width:100% of the form) looked narrower. Pin every direct child (fields, or a row layout
   wrapping them as on Contactos) and each control to the form width. */
.wp-block-kadence-advanced-form .kb-advanced-form > * {
  width: 100%;
}
.wp-block-kadence-advanced-form .kb-adv-form-field input:not([type=checkbox]):not([type=radio]):not([type=submit]),
.wp-block-kadence-advanced-form .kb-adv-form-field select {
  width: 100%;
}
/* FE-15: Contactos info boxes (icon left of text). Below 1024 the text column was ~217px, so the
   e-mail broke mid-word and "Central de Atendimento" wrapped. Put the icon above the text there.
   kt-info-box20_* = the info boxes on the Contactos page (Kadence uniqueIDs, prefixed with the page ID). */
@media (max-width: 1024px) {
  [class*="kt-info-box20_"] .kt-blocks-info-box-link-wrap.kt-blocks-info-box-media-align-left {
    display: block;
  }
  [class*="kt-info-box20_"] .kt-blocks-info-box-media {
    display: inline-block;
    margin: 0 0 4px;
  }
}

/* Glass header over the home hero video (2026-10-10).
   Kadence's transparent-header option positions the header absolutely from the top of the
   page, so it overlapped the black supernav and got the hero height wrong. Instead the header
   stays in normal flow (supernav untouched, sticky still works) and the hero (#hero, the
   home's first row, anchor "hero") is pulled up underneath it by the header's height.
   --ahbvvc-header-h is measured from #masthead by ahbvvc_glass_header_script() (functions.php);
   the values here are only fallbacks so there is no jump before it runs.
   :has(#hero) — if the hero row is removed or its anchor renamed, the normal header comes back. */
body.home:has(#hero) {
  --ahbvvc-header-h: 114px;
  --ahbvvc-hero-top: 0px; /* page offset of #masthead = admin bar when logged in (supernav is off) */
}
@media (max-width: 1024px) {
  body.home:has(#hero) {
    --ahbvvc-header-h: 111px;
    --ahbvvc-hero-top: 0px; /* supernav is hidden here */
  }
}
body.home:has(#hero) #masthead {
  background: transparent;
  z-index: 20; /* above the hero's video/overlay, which are positioned */
}
body.home:has(#hero) #hero {
  margin-top: calc(-1 * var(--ahbvvc-header-h));
  padding-top: var(--ahbvvc-header-h); /* hero content keeps its place below the header */
}
/* Hero fills the rest of the screen: everything below the supernav, header included.
   Replaces the 76vh min-height set in the block (on .kt-row-column-wrap, so it's overridden there);
   the wrap is border-box, so its own padding stays inside. svh = the viewport with the mobile
   browser bars showing, so the bottom never hides behind them. */
body.home:has(#hero) #hero > .kt-row-column-wrap {
  min-height: calc(100vh - var(--ahbvvc-hero-top) - var(--ahbvvc-header-h));
  min-height: calc(100svh - var(--ahbvvc-hero-top) - var(--ahbvvc-header-h));
}
/* The header row is fully transparent over the video, with white top-level links and burger
   (dropdowns keep their own colours). Once scrolled, Kadence adds .item-is-stuck to the sticky
   row and it falls back to the normal solid white header with dark text. */
body.home:has(#hero) #masthead .site-main-header-wrap:not(.item-is-stuck) .site-header-row-container-inner {
  background: transparent;
}
body.home:has(#hero) #masthead .site-main-header-wrap:not(.item-is-stuck) .primary-menu-container > ul > li.menu-item > a,
body.home:has(#hero) #masthead .site-main-header-wrap:not(.item-is-stuck) .menu-toggle-open {
  color: var(--color-neutral-light);
}
/* Hover/focus on a top-level item turns it into a white tab with dark text. The link is the
   full 48px item and an open dropdown starts exactly at its bottom, so the tab and the white
   dropdown read as one shape. :hover on the li (not the a) keeps the tab while the pointer is in
   the dropdown; :focus-within does the same for keyboard users. */
body.home:has(#hero) #masthead .site-main-header-wrap:not(.item-is-stuck) .primary-menu-container > ul > li.menu-item:is(:hover, :focus-within) > a {
  background: var(--color-neutral-light);
  color: var(--color-neutral-dark);
}
/* Kadence's "underline" nav style draws a 2px bar (a::after) at the bottom on hover, i.e. right on
   the seam between tab and dropdown. Hide it in this state. */
body.home:has(#hero) #masthead .site-main-header-wrap:not(.item-is-stuck) .primary-menu-container > ul > li.menu-item:is(:hover, :focus-within) > a::after {
  display: none;
}
/* Clip the dropdown's shadow at its top edge, or it draws a grey line across the seam. */
body.home:has(#hero) #masthead .site-main-header-wrap:not(.item-is-stuck) .primary-menu-container > ul > li.menu-item > ul.sub-menu {
  clip-path: inset(0 -24px -24px -24px);
}

/* Hero title: one run of text since 2026-11-24 (the hard <br>s after each "de" are gone from the
   block; it wraps to 2 lines in the 1040px row on desktop). On phones balance the lines so no word
   is left alone on the last one. */
@media (max-width: 767px) {
  body.home #hero h1 {
    text-wrap: balance;
  }
}

/* Hero buttons (Ser Sócio / Ser Voluntário / Ajudar a Associação, kb-btns5_670ba3-c1): each has a
   fixed 250px width in the block (Ser Sócio repeats it for mobile). On phones drop that and stack
   them full-width so they share one clean edge. */
@media (max-width: 767px) {
  body.home #hero .kb-btns5_670ba3-c1 {
    flex-direction: column;
    align-items: stretch;
    align-self: stretch; /* the hero column centres its children, which shrank the group to fit */
  }
  body.home #hero .kb-btns5_670ba3-c1 .kb-button {
    width: 100%;
  }
}

/* Hero icon items (Disponíveis 24/7 · Formação & Prevenção · Próximos da Comunidade, row
   kb-row-layout-id5_8a4f0d-ba): the block sets row gap 0 and no icon/label gap. Small gap
   icon -> label on desktop/tablet (stacked icon over label). */
body.home #hero .kb-row-layout-id5_8a4f0d-ba .kt-inside-inner-col {
  row-gap: 8px;
}
/* Phones: one line per item, icon left of the label. The three lines form a centred block with
   the icons lined up in a column (max-content track, labels left-aligned, fixed-width icon box,
   since the three glyphs differ in width). */
@media (max-width: 767px) {
  body.home #hero .kb-row-layout-id5_8a4f0d-ba > .kt-row-column-wrap {
    grid-template-columns: max-content;
    justify-content: center;
    row-gap: 1rem;
  }
  body.home #hero .kb-row-layout-id5_8a4f0d-ba .kt-inside-inner-col {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start; /* the column is set to centre its content */
    column-gap: 12px;
  }
  body.home #hero .kb-row-layout-id5_8a4f0d-ba .wp-block-kadence-icon {
    flex: 0 0 36px;
    justify-content: center;
  }
  body.home #hero .kb-row-layout-id5_8a4f0d-ba .kt-inside-inner-col p {
    margin: 0;
    text-align: left;
  }
}

/* Hero parallax (2026-10-10), same recipe as cinca's parallax-media: a gentle drift, the video
   layer moves -9% -> +9% while the hero crosses the viewport (about 23% of its height in total).
   - The frame (#hero) clips and declares the timeline; a bare view() on the layer would bind to
     the nearest scroll container, which overflow: hidden makes #hero itself, and never move.
   - inset: -14% 0 is the headroom: a Y% shift of a layer inset by H% moves Y x (1 + 2H/100)% of
     the frame, so 9 x 1.28 = 11.5 <= 14 and no edge is ever exposed. Raise both together.
   - Longhands: the animation shorthand resets the duration to 0s and the animation never advances.
   - The hero starts at the page top, already half through its cover range, so at rest the video
     sits close to centred. Unsupported browsers and reduced-motion visitors get the static hero. */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    body.home:has(#hero) #hero {
      overflow: hidden; /* also keeps the shifted video off the next (non-positioned) row */
      view-timeline-name: --ahbvvc-hero;
    }
    body.home:has(#hero) #hero > .kb-blocks-bg-video-container {
      inset: -14% 0;
      animation-name: ahbvvc-parallax;
      animation-duration: auto;
      animation-timing-function: linear;
      animation-fill-mode: both;
      animation-timeline: --ahbvvc-hero;
      animation-range: cover 0% cover 100%;
    }
    /* Static image hero (2026-10-19, replaced the video): Kadence paints the image as #hero's own
       background, so there's no layer to translate; slide background-position instead (the image
       stays editable in the block). It needs vertical slack: at least 128% of the frame's height,
       and at least the image's cover height (66vw = 100vw / 1.54, the 2560x1664 photo's ratio).
       100% -> 0% = the image drifts down as the page scrolls up, like the video did. */
    body.home:has(#hero) #hero.kt-row-has-bg {
      background-size: auto max(128%, 66vw) !important; /* Kadence's per-block CSS prints after ours */
      animation-name: ahbvvc-parallax-bg;
      animation-duration: auto;
      animation-timing-function: linear;
      animation-fill-mode: both;
      animation-timeline: --ahbvvc-hero;
      animation-range: cover 0% cover 100%;
    }
  }
}
@keyframes ahbvvc-parallax-bg {
  from {
    background-position: 50% 100%;
  }
  to {
    background-position: 50% 0%;
  }
}
@keyframes ahbvvc-parallax {
  from {
    transform: translate3d(0, -9%, 0);
  }
  to {
    transform: translate3d(0, 9%, 0);
  }
}

/* Notícias + Eventos card images parallax on the home (2026-10-10), same recipe as the hero:
   each image box is the clipping frame and declares the timeline, the image inside is the layer,
   14% headroom above and below, -9% -> 9% drift while the card crosses the viewport.
   Every frame uses the same timeline name; a layer binds to its nearest ancestor's.
   - Notícias = Kadence post loop: a.post-thumbnail (relative, overflow hidden, ratio by
     padding-bottom) > .post-thumbnail-inner (absolute, inset 0) > img.
   - Eventos = [ahbvvc_upcoming_events]: a.ahbvvc-event-thumb > img (16/10). The 16/10 moves to
     the frame and the img is absolutely placed 128% tall: an absolute <img> with auto height keeps
     its intrinsic ratio instead of stretching to top/bottom insets, so the height is explicit. */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    body.home #noticias a.post-thumbnail,
    body.home #eventos a.ahbvvc-event-thumb {
      view-timeline-name: --ahbvvc-card;
    }
    body.home #eventos a.ahbvvc-event-thumb {
      display: block;
      position: relative;
      overflow: hidden;
      aspect-ratio: 16 / 10;
    }
    body.home #eventos a.ahbvvc-event-thumb img {
      position: absolute;
      top: -14%;
      left: 0;
      height: 128%;
      aspect-ratio: auto;
    }
    body.home #noticias a.post-thumbnail > .post-thumbnail-inner {
      inset: -14% 0;
    }
    body.home #noticias a.post-thumbnail > .post-thumbnail-inner,
    body.home #eventos a.ahbvvc-event-thumb img {
      animation-name: ahbvvc-parallax;
      animation-duration: auto;
      animation-timing-function: linear;
      animation-fill-mode: both;
      animation-timeline: --ahbvvc-card;
      animation-range: cover 0% cover 100%;
    }
  }
}

/* Page titles (2026-10-10): no more full-width red band. Customizer: Page Title layout "normal"
   (title sits in the content column, so it lines up with the text, right of the sidebar on
   sidebar pages), breadcrumb above the title, title 40/36/32px, breadcrumb grey (palette6).
   A short red rule under the title is the only accent. */
/* Archive titles (Notícias, Calendário) match: Kadence has no font-size setting for them. */
.wp-site-blocks .post-archive-title h1,
.wp-site-blocks .event-archive-title h1 {
  font-size: 40px;
  line-height: 1.2;
}
@media (max-width: 1024px) {
  .wp-site-blocks .post-archive-title h1,
  .wp-site-blocks .event-archive-title h1 {
    font-size: 36px;
  }
}
@media (max-width: 767px) {
  .wp-site-blocks .post-archive-title h1,
  .wp-site-blocks .event-archive-title h1 {
    font-size: 32px;
  }
}
.wp-site-blocks .post-archive-title h1::after,
.wp-site-blocks .event-archive-title h1::after,
.wp-site-blocks .page-title .entry-title::after {
  content: "";
  display: block;
  width: 48px;
  height: 3px;
  margin-top: 0.75rem;
  background: var(--color-primary);
}
/* Space between the red rule and the content below (cards started right under it). */
.wp-site-blocks .post-archive-title,
.wp-site-blocks .event-archive-title,
.wp-site-blocks .page-title {
  margin-bottom: 2.5rem;
}
/* Breadcrumb colour (#555 = 7.5:1 on white, WCAG AAA) is set in the Customizer
   (*_breadcrumb_color, hover palette3), like the rest of the title settings. */
.wp-site-blocks .post-archive-title .kadence-breadcrumbs,
.wp-site-blocks .event-archive-title .kadence-breadcrumbs,
.wp-site-blocks .page-title .kadence-breadcrumbs {
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

/* Footer contacts ([ahbvvc_contacts], footer2 block widget, 2026-10-19): emergency and
   administrative lines apart. Labels #555 (7.4:1 on the footer's #F7FAFC, AAA); the emergency
   number is red but large + bold, where AAA needs 4.5:1. */
.ahbvvc-contacts__group {
  margin: 0 0 1.25rem;
}
.ahbvvc-contacts__label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #555;
}
.ahbvvc-contacts__phone {
  display: block;
  font-size: 1.125rem;
  font-weight: 600;
  text-decoration: none;
}
.ahbvvc-contacts__group--emergency .ahbvvc-contacts__phone {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
}
.ahbvvc-contacts__hours {
  display: block;
  font-size: 0.9375rem;
  color: #555;
}

/* Comandantes + Direções pages (2026-10-19): each name with its photo on the same line.
   Markup (plain core blocks, editable in the editor; the two Kadence galleries are gone):
   every dated list is a core/list with the extra class "ahbvvc-people". A list item with a photo
   starts with Gutenberg's inline image (thumbnail 150x150, class wp-image-ID) wrapped in a link to
   the large size, so a click opens the photo (plain link: Kadence's lightbox is a global theme
   option and is off). Items without a photo are plain text and sit flush left (client request
   2026-11-03); only items with a photo are padded by the thumb width, so name sits beside the thumb. */
.single-content ul.ahbvvc-people {
  --ahbvvc-face: 60px;
  list-style: none;
  padding-left: 0;
}
.ahbvvc-people > li {
  position: relative;
  display: flex; /* the item holds only text + the photo link (taken out of flow): this centres the text */
  align-items: center;
  margin-bottom: 0.375rem;
}
.ahbvvc-people > li:has(> a > img) {
  padding-left: calc(var(--ahbvvc-face) + 0.875rem);
  min-height: var(--ahbvvc-face);
}
.ahbvvc-people > li > a:first-child {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  display: block;
  width: var(--ahbvvc-face);
  height: var(--ahbvvc-face);
  line-height: 0;
  border-radius: 50%;
  cursor: zoom-in;
}
.ahbvvc-people > li > a:first-child:focus-visible {
  outline: 2px solid var(--global-palette1);
  outline-offset: 2px;
}
/* !important beats the inline style="width:64px" the editor's inline-image format writes. */
.single-content .ahbvvc-people img {
  display: block;
  width: 100% !important;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  border-radius: 50%;
  background: #eee;
}
@media (max-width: 480px) {
  .single-content ul.ahbvvc-people {
    --ahbvvc-face: 56px;
  }
}
/* Date headings (h3 right before a people list) are 1.25rem so they stay below the century h2s (1.4rem);
   the theme's h3 is 24px. :has scopes it to these lists, not every h3. */
.single-content h3:has(+ ul.ahbvvc-people) {
  font-size: 1.25rem;
}
/* Century sub-headings (Século XXI/XX/XIX; h2.toc-item so the sidebar TOC lists them) are smaller than
   the section label above them (Comandantes/Presidentes, 2rem): ~70% of it. Kadence prints the 2rem
   per block (0,3,0), hence the longer selector. */
.single-content h2.wp-block-kadence-advancedheading.toc-item[id^="seculo-"] {
  font-size: 1.4rem;
}

/* Post cards (home Notícias posts block + Notícias archive): "Ler mais" pinned to the card bottom,
   so it lines up across a row whatever the title/excerpt length (2026-10-19). The card fills its
   grid cell; the content area grows and the footer takes the leftover space above it. */
.kb-post-list-item > .loop-entry,
.entry-list-item > .loop-entry {
  height: 100%;
  display: flex;
  flex-direction: column;
}
.loop-entry > .entry-content-wrap {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}
.loop-entry > .entry-content-wrap > .entry-footer {
  margin-top: auto;
  padding-top: 1em; /* minimum gap above "Ler mais" */
}
/* Flex items don't collapse margins: header 17px + summary 17px + its first p 17px would stack
   to ~50px. Rebuild the original single 1em gaps by hand. */
.loop-entry > .entry-content-wrap > .entry-header,
.loop-entry > .entry-content-wrap > .entry-header > :last-child,
.loop-entry > .entry-content-wrap > .entry-summary > :last-child {
  margin-bottom: 0;
}
.loop-entry > .entry-content-wrap > .entry-summary {
  margin-top: 1em;
}
.loop-entry > .entry-content-wrap > .entry-summary > :first-child {
  margin-top: 0;
}

/* ==========================================================================
   Retificações 3 (2026-11-03)
   ========================================================================== */

/* Footer menus (#1): Kadence gives each link ~0.6em of vertical padding plus line-height 1.6;
   tighten both, and set the link size a notch below body text (client asked for smaller). Only the
   link lists inside .collapse-sub-navigation, not the social icons list (its text is hidden by its own rules) nor the Contactos block. */
.site-footer .collapse-sub-navigation ul.menu li.menu-item > a {
  padding-top: 0.35em; /* 0.15em was too tight (Nuno, 2026-11-03) */
  padding-bottom: 0.35em;
  font-size: 0.9rem;
  line-height: 1.4;
}
.site-footer .collapse-sub-navigation ul.menu ul.sub-menu {
  margin-top: 0.1em;
  margin-bottom: 0.3em;
}
.site-footer .collapse-sub-navigation ul.menu,
.site-footer .collapse-sub-navigation ul.menu li {
  margin-bottom: 0;
}

/* Emergência (#17/#18). Header copy lives in the desktop nav (hidden by Kadence at <=1024px);
   .ahbvvc-emergency-bar is the mobile copy, fixed to the viewport bottom. Hidden above 1024px so the
   button never shows twice. */
.ahbvvc-emergency-bar {
  display: none;
}
@media (max-width: 1024px) {
  .ahbvvc-emergency-button {
    display: none; /* header copy: the bar below replaces it */
  }
  .ahbvvc-emergency-bar {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    /* z-index 900: above page content and the sticky header (~100-ish), below a future cookie
       banner / modal (GDPR Cookie Compliance uses 99999+). */
    z-index: 900;
    padding: 0; /* the button itself is the bar: full width, no frame (Nuno, 2026-11-03) */
  }
  .ahbvvc-emergency-bar .emergency-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    /* the safe-area inset goes inside the red, so the bar reaches the screen edge on iPhones */
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px));
    border-radius: 0;
    background: var(--color-primary);
    color: var(--color-neutral-light);
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
  }
  .ahbvvc-emergency-bar .emergency-text {
    text-align: left;
  }
  .ahbvvc-emergency-bar .emergency-text br {
    display: none; /* one line on the bar: "Emergências 258 800 840" */
  }
  .ahbvvc-emergency-bar .emergency-phone {
    margin-left: 0.4em;
    font-weight: 700;
  }
  .ahbvvc-emergency-bar .emergency-icon svg {
    width: 20px;
    height: 20px;
  }
  /* The bar must never cover the end of the footer: reserve its height (~52px, a little slack) + the inset. */
  body {
    padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px));
  }
}

/* News cards without a featured image (#21). Kadence omits .post-thumbnail then (and FE-12 above
   hides any empty wrapper), which left text-only cards of a different height from their neighbours.
   Switch between two variants with ONE body class (set via the `body_class` filter, see functions.php
   `ahbvvc_card_variant`, or just add the class in the browser to preview):
   A (default, active): a neutral placeholder block in the image slot, same 3:2 ratio as the photos,
     brand colour (palette3) with the emblem, so the grid stays aligned.
   B (body.ahbvvc-cards-textonly): text-only card, no image slot; "Ler mais" is still pinned to the
     bottom by the flex rules in "Post cards" below. */
.loop-entry:not(.has-post-thumbnail) {
  position: relative;
}
body:not(.ahbvvc-cards-textonly) .loop-entry:not(.has-post-thumbnail)::before {
  content: "";
  display: block;
  aspect-ratio: 3 / 2; /* same ratio as the cropped photos (Kadence thumbnail ratio 2-3 = 3:2) */
  background-color: var(--global-palette3, #1a202c);
}
/* Emblem on top of the block (second pseudo-element, absolutely placed over the ::before block). */
body:not(.ahbvvc-cards-textonly) .loop-entry:not(.has-post-thumbnail)::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  aspect-ratio: 3 / 2;
  background: url("/app/uploads/2025/09/cropped-logo.webp") center / auto 62% no-repeat; /* full-colour emblem on the dark block */
  pointer-events: none;
}
body:not(.ahbvvc-cards-textonly) .loop-entry:not(.has-post-thumbnail) .entry-content-wrap {
  padding-top: 1.5rem; /* back to the normal inner padding (FE-12 gave text-only cards 2rem) */
}
body.ahbvvc-cards-textonly .loop-entry:not(.has-post-thumbnail) {
  border-top: 4px solid var(--color-primary); /* text-only variant keeps a brand accent */
}

/* Ser Voluntário (page 236): the portrait photo next to each section's text would render ~772px
   tall at full column width, taller than the text. Cap the height but never crop (client, 2026-11-09:
   photos shown whole): the image scales down proportionally and is centred in its column. */
.ahbvvc-section-image {
  margin: 0;
}
.ahbvvc-section-image img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 28rem;
  margin-inline: auto;
}
@media (max-width: 767px) {
  .ahbvvc-section-image {
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* Galeria (page 28). The 2026 Arquivo carousel (Kadence gallery 28_gb-2026-145) has 93 slides, so
   93 dots: hide them (arrows + swipe stay). Scoped to that gallery; the vehicle carousels keep theirs. */
.kb-gallery-id-28_gb-2026-145 .splide__pagination {
  display: none;
}
/* "Comando" vehicle carousel has one photo, shown at the 2-column slide width and left-aligned:
   centre it. Scoped to that gallery. */
.kb-gallery-id-28_gv-comando .splide__list {
  justify-content: center;
}

/* Donativos (page 25): bank details as a label/value grid. Labels small, muted (#555 = 7.4:1 on white);
   values larger; the IBAN in tabular figures with letter-spacing so the groups read easily. Stacks
   (label above value) on narrow screens. */
dl.ahbvvc-iban {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.9rem 2rem;
  margin: 1.5rem 0 1rem;
  padding: 1.5rem 1.75rem;
  background: #F7FAFC;
  border-left: 4px solid var(--color-primary);
  border-radius: 6px;
}
dl.ahbvvc-iban dt {
  margin: 0;
  align-self: baseline;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #555;
}
dl.ahbvvc-iban dd {
  margin: 0;
  align-self: baseline;
  font-size: 1.125rem;
  overflow-wrap: anywhere;
}
dl.ahbvvc-iban #ahbvvc-iban-text {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.375rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}
#ahbvvc-iban-copy {
  margin-right: 0.75rem;
}
#ahbvvc-iban-ok {
  font-weight: 600;
  color: #1a6b2f;
}
@media (max-width: 600px) {
  dl.ahbvvc-iban {
    grid-template-columns: 1fr;
    gap: 0.15rem;
    padding: 1.25rem;
  }
  dl.ahbvvc-iban dd {
    margin-bottom: 0.75rem;
  }
  dl.ahbvvc-iban #ahbvvc-iban-text {
    font-size: 1.1rem; /* 'PT50 0036 0056 9910 0099 7554 2' must fit 390px without breaking mid-group */
    letter-spacing: 0.02em;
  }
}

/* Footer nav parents (História, Colaborar, Sobre Nós) look like the widget titles (CONTACTOS, LEGAL):
   the footer menus have no widget title, so the parent link is the heading. Leaf top-level items
   (Notícias, Galeria, Contactos) stay plain links. Values copied from Kadence's footer .widget-title. */
.site-footer .collapse-sub-navigation ul.menu > li.menu-item-has-children > .drawer-nav-drop-wrap > a {
  font-family: Oswald, sans-serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 30px;
  text-transform: uppercase;
  color: #111;
  padding-top: 0;
  padding-bottom: 0;
  border-bottom: 0; /* Kadence draws a row divider under every footer link; not under a heading */
}
.site-footer .collapse-sub-navigation ul.menu > li.menu-item-has-children > .drawer-nav-drop-wrap {
  border-bottom: 0; /* a heading, not a list row */
  margin-bottom: 10px;
}
.site-footer .collapse-sub-navigation ul.menu > li.menu-item-has-children + li.menu-item-has-children {
  margin-top: 1.5em; /* gap between groups, like CONTACTOS → LEGAL */
}
