/*
Theme Name: CATV Veneto Elementor
Theme URI: https://albertogrimaldi.it
Author: Alberto Grimaldi
Author URI: https://albertogrimaldi.it
Description: Tema completo per Camera degli Avvocati Tributaristi del Veneto, ottimizzato per Elementor Free. Include header, footer, contenuti dinamici e widget Elementor senza plugin companion.
Version: 1.4.25
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: catv-elementor
Tags: custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, full-width-template
*/

:root {
  --catv-navy: #062b55;
  --catv-navy-deep: #032346;
  --catv-gold: #c79a3b;
  --catv-ink: #132b49;
  --catv-muted: #667085;
  --catv-surface: #ffffff;
  --catv-soft: #f5f7fa;
  --catv-line: #e6e9ee;
  --catv-max: 1320px;
  --catv-radius: 4px;
  --catv-shadow: 0 12px 30px rgba(6, 43, 85, .08);
}

html { scroll-behavior: smooth; overflow-x: clip; }
body { overflow-x: clip; }
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--catv-ink);
  background: #fff;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--catv-navy); text-decoration: none; }
a:hover { color: var(--catv-gold); }
button, input, textarea, select { font: inherit; }
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}
.screen-reader-text:focus {
  position: fixed !important;
  z-index: 100000;
  top: 10px; left: 10px;
  width: auto; height: auto;
  padding: 12px 16px;
  clip: auto;
  background: #fff;
  color: #000;
  box-shadow: var(--catv-shadow);
}
.catv-container { width: min(calc(100% - 40px), var(--catv-max)); margin-inline: auto; }
.catv-site-main { min-height: 50vh; }
.catv-content-narrow { width: min(calc(100% - 40px), 920px); margin: 60px auto; }
.catv-page-title, .catv-entry-title {
  font-family: Georgia, 'Times New Roman', serif;
  color: var(--catv-navy);
  line-height: 1.15;
}

/* Header */
.catv-site-header {
  position: relative;
  z-index: 999;
  background: var(--catv-header-bg, #fff);
  border-bottom: 1px solid rgba(6, 43, 85, .10);
}
.catv-site-header.is-sticky { position: sticky; top: 0; }
.admin-bar .catv-site-header.is-sticky { top: 32px; }
.catv-header-inner {
  min-height: 88px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  align-items: center;
  gap: 36px;
}
.catv-brand { display: inline-flex; align-items: center; gap: 14px; min-width: 0; }
.catv-brand .custom-logo-link { display: flex; align-items: center; }
.catv-brand .custom-logo { max-height: 66px; width: auto; }
.catv-brand-text { display: block; color: var(--catv-header-text, var(--catv-navy)); }
.catv-brand-title {
  display: block;
  font: 700 18px/1.05 Georgia, 'Times New Roman', serif;
  max-width: 250px;
}
.catv-primary-nav ul { list-style: none; padding: 0; margin: 0; display: flex; align-items: center; gap: 32px; }
.catv-primary-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--catv-header-text, var(--catv-navy));
  font-size: 14px;
  font-weight: 700;
  position: relative;
}
.catv-primary-nav a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 2px;
  height: 2px;
  background: var(--catv-header-accent, var(--catv-gold));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s ease;
}
.catv-primary-nav a:hover::after,
.catv-primary-nav .current-menu-item > a::after { transform: scaleX(1); }
.catv-header-cta, .catv-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: var(--catv-radius);
  background: var(--catv-header-accent, var(--catv-gold));
  color: #fff;
  font-weight: 700;
  line-height: 1;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.catv-header-cta:hover, .catv-button:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 8px 22px rgba(6, 43, 85, .18); }
.catv-menu-toggle {
  display: none;
  width: 44px; height: 44px;
  padding: 0;
  border: 1px solid var(--catv-line);
  border-radius: 4px;
  background: #fff;
  color: var(--catv-navy);
  cursor: pointer;
}
.catv-menu-toggle span,
.catv-menu-toggle::before,
.catv-menu-toggle::after {
  content: '';
  display: block;
  width: 20px; height: 2px;
  margin: 4px auto;
  background: currentColor;
  transition: transform .2s ease, opacity .2s ease;
}
.catv-menu-toggle[aria-expanded='true'] span { opacity: 0; }
.catv-menu-toggle[aria-expanded='true']::before { transform: translateY(6px) rotate(45deg); }
.catv-menu-toggle[aria-expanded='true']::after { transform: translateY(-6px) rotate(-45deg); }

/* Footer */
.catv-footer-cta { background: var(--catv-footer-cta-bg, var(--catv-navy)); color: #fff; border-bottom: 2px solid var(--catv-gold); }
.catv-footer-cta-inner { min-height: 112px; display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.catv-footer-cta h2 { margin: 0 0 4px; color: #fff; font: 700 28px/1.15 Georgia, 'Times New Roman', serif; }
.catv-footer-cta p { margin: 0; color: rgba(255,255,255,.82); }
.catv-site-footer { background: var(--catv-footer-bg, var(--catv-navy-deep)); color: rgba(255,255,255,.84); }
.catv-footer-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr .82fr 1.05fr;
  gap: 56px;
  padding-block: 44px 36px;
}
.catv-footer-column h3, .catv-footer-column .widget-title {
  margin: 0 0 16px;
  color: #fff;
  font-size: 13px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.catv-footer-column p { margin: 0 0 10px; }
.catv-footer-column ul { list-style: none; margin: 0; padding: 0; }
.catv-footer-column li { margin: 0 0 7px; }
.catv-footer-column a { color: rgba(255,255,255,.86); }
.catv-footer-column a:hover { color: var(--catv-gold); }
.catv-footer-identity { align-self: start; }
.catv-footer-logo { display: inline-flex; align-items: center; margin-bottom: 17px; }
.catv-footer-logo:empty { display: none; }
.catv-footer-logo img { display: block; width: auto; max-width: 245px; max-height: 82px; object-fit: contain; object-position: left center; }
.catv-footer-brand-title { display: block; max-width: 280px; margin: 0 0 12px; color: #fff; font: 700 20px/1.15 Georgia, 'Times New Roman', serif; }
.catv-footer-description { max-width: 330px; color: rgba(255,255,255,.72); font-size: 14px; line-height: 1.65; }
.catv-footer-taxonomies { display: grid; align-content: start; gap: 26px; }
.catv-footer-list-block h3 { margin-bottom: 11px; }
.catv-footer-list-block li { font-size: 14px; line-height: 1.45; }
.catv-contact-line { display: flex; gap: 10px; align-items: flex-start; }
.catv-newsletter-form { display: flex; }
.catv-newsletter-form input { width: 100%; min-height: 44px; padding: 10px 12px; border: 0; border-radius: 3px 0 0 3px; }
.catv-newsletter-form button { min-height: 44px; padding: 10px 18px; border: 0; background: var(--catv-gold); color: #fff; font-weight: 700; border-radius: 0 3px 3px 0; }
.catv-footer-bottom { border-top: 1px solid rgba(255,255,255,.12); }
.catv-footer-bottom-inner { min-height: 64px; display: flex; justify-content: space-between; align-items: center; gap: 24px; font-size: 12px; }
.catv-footer-legal { display: flex; gap: 18px; flex-wrap: wrap; }

/* WordPress content */
.catv-post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin: 40px auto 70px; }
.catv-post-card { border: 1px solid var(--catv-line); background: #fff; box-shadow: 0 8px 22px rgba(6,43,85,.05); }
.catv-post-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.catv-post-card-body { padding: 22px; }
.catv-post-card h2 { margin: 0 0 10px; font: 700 22px/1.2 Georgia, 'Times New Roman', serif; }
.catv-entry-meta { color: var(--catv-muted); font-size: 13px; }
.catv-pagination { margin: 30px 0 70px; }

@media (max-width: 1100px) {
  .catv-header-inner { grid-template-columns: 1fr auto auto; gap: 18px; }
  .catv-menu-toggle { display: block; }
  .catv-primary-nav {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    padding: 18px 20px 24px;
    background: var(--catv-header-bg, #fff);
    border-bottom: 1px solid var(--catv-line);
    box-shadow: var(--catv-shadow);
  }
  .catv-primary-nav.is-open { display: block; }
  .catv-primary-nav ul { align-items: stretch; flex-direction: column; gap: 2px; }
  .catv-primary-nav a { width: 100%; padding: 8px 4px; }
  .catv-footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 782px) {
  .admin-bar .catv-site-header.is-sticky { top: 46px; }
  .catv-header-inner { min-height: 76px; }
  .catv-brand-title { font-size: 15px; max-width: 190px; }
  .catv-header-cta { display: none; }
  .catv-footer-cta-inner { padding-block: 26px; align-items: flex-start; flex-direction: column; }
  .catv-footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .catv-footer-bottom-inner { padding-block: 18px; align-items: flex-start; flex-direction: column; }
  .catv-post-grid { grid-template-columns: 1fr; }
}


/* Footer 1.4.10: identity + archives and categories */
.catv-footer-column .cat-item .count,
.catv-footer-column li .post-count { opacity: .65; }
.catv-footer-taxonomies ul { columns: 1; }
@media (max-width: 1100px) {
  .catv-footer-grid { grid-template-columns: 1.2fr 1fr; }
  .catv-footer-description { max-width: 430px; }
}
@media (max-width: 782px) {
  .catv-footer-logo img { max-width: 220px; max-height: 72px; }
  .catv-footer-taxonomies { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
}
@media (max-width: 520px) {
  .catv-footer-taxonomies { grid-template-columns: 1fr; }
}


/* -------------------------------------------------------------------------
 * Typography scale 1.4.14
 * Slightly larger, more uniform body copy throughout the theme. Headings keep
 * their hierarchy; supporting text, navigation and footer copy gain one step
 * in size and a calmer line-height.
 * ---------------------------------------------------------------------- */
:root {
  --catv-text-xs: 13px;
  --catv-text-sm: 15px;
  --catv-text-md: 16px;
  --catv-text-lg: 18px;
}
body {
  font-size: var(--catv-text-md);
  line-height: 1.65;
}
.catv-primary-nav a {
  font-size: var(--catv-text-sm);
}
.catv-header-cta,
.catv-button {
  font-size: var(--catv-text-sm);
}
.catv-footer-cta p,
.catv-footer-column,
.catv-footer-column p,
.catv-footer-column a,
.catv-contact-line {
  font-size: var(--catv-text-sm);
  line-height: 1.6;
}
.catv-footer-column h3,
.catv-footer-column .widget-title {
  font-size: 14px;
}
.catv-footer-description,
.catv-footer-list-block li {
  font-size: var(--catv-text-sm);
  line-height: 1.6;
}
.catv-footer-bottom-inner {
  font-size: var(--catv-text-xs);
}
.catv-entry-meta {
  font-size: 14px;
}
.catv-content-narrow,
.catv-entry-content,
.catv-post-card-body {
  font-size: 17px;
  line-height: 1.7;
}
@media (max-width: 782px) {
  body { font-size: 16px; }
  .catv-primary-nav a { font-size: 16px; }
}


/* -------------------------------------------------------------------------
 * Theme typography scale 1.4.14
 * Slightly larger global text for desktop readability.
 * ---------------------------------------------------------------------- */
:root {
  --catv-text-xs: 14px;
  --catv-text-sm: 16px;
  --catv-text-md: 17px;
  --catv-text-lg: 19px;
}
body {
  font-size: var(--catv-text-md);
  line-height: 1.65;
}
.catv-primary-nav a,
.catv-header-cta,
.catv-button {
  font-size: var(--catv-text-sm);
}
.catv-footer-cta p,
.catv-footer-column,
.catv-footer-column p,
.catv-footer-column a,
.catv-contact-line,
.catv-footer-description,
.catv-footer-list-block li {
  font-size: var(--catv-text-sm);
  line-height: 1.62;
}
.catv-footer-column h3,
.catv-footer-column .widget-title {
  font-size: 15px;
}
.catv-footer-bottom-inner {
  font-size: var(--catv-text-xs);
}
.catv-entry-meta {
  font-size: 15px;
}
.catv-content-narrow,
.catv-entry-content,
.catv-post-card-body {
  font-size: 18px;
  line-height: 1.72;
}
@media (max-width: 782px) {
  body { font-size: 17px; }
  .catv-primary-nav a { font-size: 17px; }
  .catv-content-narrow,
  .catv-entry-content,
  .catv-post-card-body { font-size: 17px; }
}

/* -------------------------------------------------------------------------
 * Elegant bidirectional reveal motion 1.4.14
 * Activated only when JavaScript is available. Individual translate is used
 * so existing card hover transforms remain untouched.
 * ---------------------------------------------------------------------- */
:root {
  --catv-motion-duration: 620ms;
  --catv-motion-distance: 22px;
  --catv-motion-easing: cubic-bezier(.22, 1, .36, 1);
}
.catv-motion-enabled .catv-reveal {
  opacity: 0;
  translate: 0 var(--catv-motion-distance);
  filter: blur(2.5px);
  transition:
    opacity var(--catv-motion-duration) var(--catv-motion-easing) var(--catv-reveal-delay, 0ms),
    translate var(--catv-motion-duration) var(--catv-motion-easing) var(--catv-reveal-delay, 0ms),
    filter calc(var(--catv-motion-duration) * .78) ease-out var(--catv-reveal-delay, 0ms);
  will-change: opacity, translate, filter;
}
.catv-motion-enabled .catv-reveal.catv-reveal--from-top {
  translate: 0 calc(var(--catv-motion-distance) * -1);
}
.catv-motion-enabled .catv-reveal.catv-reveal--from-bottom {
  translate: 0 var(--catv-motion-distance);
}
.catv-motion-enabled .catv-reveal.is-visible {
  opacity: 1;
  translate: 0 0;
  filter: blur(0);
  will-change: auto;
}
body.elementor-editor-active .catv-reveal,
.elementor-editor-preview .catv-reveal {
  opacity: 1 !important;
  translate: none !important;
  filter: none !important;
  transition: none !important;
}
@media (prefers-reduced-motion: reduce) {
  .catv-motion-enabled .catv-reveal {
    opacity: 1 !important;
    translate: none !important;
    filter: none !important;
    transition: none !important;
  }
}

/* -------------------------------------------------------------------------
 * Content hub sidebar for single and archive pages 1.4.24
 * Shared navigation and recent content for news, events and documents.
 * ---------------------------------------------------------------------- */
.catv-single-shell {
  padding-block: 60px 76px;
}
.catv-single-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(290px, 360px);
  align-items: start;
  gap: clamp(42px, 5vw, 74px);
}
.catv-single-main {
  min-width: 0;
  font-size: 18px;
  line-height: 1.72;
}
.catv-entry-header {
  margin-bottom: 28px;
}
.catv-single-main .catv-entry-title {
  max-width: 900px;
  margin: 8px 0 0;
  font-size: clamp(38px, 5vw, 64px);
}
.catv-entry-featured-image {
  margin: 0 0 34px;
}
.catv-entry-featured-image img {
  display: block;
  width: 100%;
  max-height: 620px;
  object-fit: cover;
}
.catv-entry-content > :first-child {
  margin-top: 0;
}
.catv-entry-content > :last-child {
  margin-bottom: 0;
}
.catv-entry-content a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.catv-archive-main {
  min-width: 0;
}
.catv-archive-header {
  margin: 0 0 30px;
}
.catv-archive-header .catv-page-title {
  margin: 0 0 12px;
}
.catv-archive-header > :last-child {
  margin-bottom: 0;
}
.catv-archive-layout .catv-post-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0 0 44px;
}
.catv-archive-layout .catv-pagination {
  margin: 0;
}
.catv-content-hub {
  position: sticky;
  top: 116px;
  display: grid;
  gap: 24px;
}
.admin-bar .catv-content-hub {
  top: 148px;
}
.catv-content-hub__sections,
.catv-content-hub__block {
  border: 1px solid var(--catv-line);
  background: #fff;
  box-shadow: 0 12px 30px rgba(6, 43, 85, .06);
}
.catv-content-hub__sections {
  display: grid;
  overflow: hidden;
  border-top: 3px solid var(--catv-gold);
}
.catv-content-hub__sections > a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 52px;
  padding: 11px 18px;
  color: var(--catv-navy);
  font-weight: 700;
  border-bottom: 1px solid var(--catv-line);
}
.catv-content-hub__sections > a:last-child {
  border-bottom: 0;
}
.catv-content-hub__sections > a:hover {
  color: var(--catv-gold);
  background: var(--catv-soft);
}
.catv-content-hub__block {
  padding: 20px;
}
.catv-content-hub__heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 10px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--catv-navy);
}
.catv-content-hub__heading h2 {
  margin: 0;
  color: var(--catv-navy);
  font: 700 22px/1.15 Georgia, 'Times New Roman', serif;
}
.catv-content-hub__heading > a {
  color: var(--catv-muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.catv-content-hub__heading > a:hover {
  color: var(--catv-gold);
}
.catv-content-hub__list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.catv-content-hub__list li {
  margin: 0;
  border-bottom: 1px solid var(--catv-line);
}
.catv-content-hub__list li:last-child {
  border-bottom: 0;
}
.catv-content-hub__list li > a {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 13px 0;
  color: var(--catv-ink);
}
.catv-content-hub__list li > a:hover strong {
  color: var(--catv-gold);
}
.catv-content-hub__item-body {
  display: grid;
  min-width: 0;
  gap: 5px;
}
.catv-content-hub__item-body strong {
  color: var(--catv-navy);
  font-size: 15px;
  line-height: 1.35;
  transition: color .2s ease;
}
.catv-content-hub__item-body small {
  color: var(--catv-muted);
  font-size: 12px;
  line-height: 1.35;
}
.catv-content-hub__date {
  flex: 0 0 48px;
  display: grid;
  place-items: center;
  min-height: 52px;
  padding: 5px 4px;
  color: #fff;
  background: var(--catv-navy);
  line-height: 1;
}
.catv-content-hub__date.is-past {
  background: #7b8797;
}
.catv-content-hub__date strong {
  font-size: 19px;
}
.catv-content-hub__date span {
  margin-top: 3px;
  font-size: 10px;
  font-weight: 700;
}
.catv-content-hub__file {
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  min-height: 42px;
  padding: 4px;
  color: #fff;
  background: var(--catv-gold);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
}
.catv-content-hub__empty {
  margin: 14px 0 4px;
  color: var(--catv-muted);
  font-size: 14px;
}
@media (max-width: 1024px) {
  .catv-single-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 36px;
  }
  .catv-content-hub {
    position: static;
  }
  .catv-single-main .catv-entry-title {
    font-size: clamp(34px, 5vw, 48px);
  }
}
@media (max-width: 820px) {
  .catv-single-shell {
    padding-block: 42px 60px;
  }
  .catv-single-layout {
    grid-template-columns: 1fr;
  }
  .catv-content-hub {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .catv-content-hub__sections {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .catv-content-hub__sections > a {
    border-right: 1px solid var(--catv-line);
    border-bottom: 0;
  }
  .catv-content-hub__sections > a:last-child {
    border-right: 0;
  }
  .catv-content-hub__block:last-child {
    grid-column: 1 / -1;
  }
}
@media (max-width: 620px) {
  .catv-archive-layout .catv-post-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 560px) {
  .catv-single-main {
    font-size: 17px;
  }
  .catv-content-hub {
    grid-template-columns: 1fr;
  }
  .catv-content-hub__sections,
  .catv-content-hub__block:last-child {
    grid-column: auto;
  }
  .catv-content-hub__sections {
    grid-template-columns: 1fr;
  }
  .catv-content-hub__sections > a {
    border-right: 0;
    border-bottom: 1px solid var(--catv-line);
  }
}

/*
 * Minimal PDF and gallery lightbox 1.4.19
 */
html.catv-lightbox-open,
body.catv-lightbox-open {
  overflow: hidden;
}
.catv-lightbox[hidden] {
  display: none !important;
}
.catv-lightbox {
  position: fixed;
  z-index: 999999;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(58px, 1fr) minmax(0, 1400px) minmax(58px, 1fr);
  align-items: center;
  padding: 32px;
  background: rgba(5, 12, 22, .94);
  opacity: 0;
  visibility: hidden;
  transition: opacity .18s ease, visibility .18s ease;
}
.catv-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}
.catv-lightbox__content {
  grid-column: 2;
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: calc(100vh - 64px);
  min-width: 0;
  overflow: hidden;
}
.catv-lightbox__image {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 18px 60px rgba(0, 0, 0, .35);
}
.catv-lightbox__pdf {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
  box-shadow: 0 18px 60px rgba(0, 0, 0, .35);
}
.catv-lightbox__image[hidden],
.catv-lightbox__pdf[hidden],
.catv-lightbox__nav[hidden] {
  display: none !important;
}
.catv-lightbox__close,
.catv-lightbox__nav {
  appearance: none;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, .10);
  cursor: pointer;
  line-height: 1;
  transition: background-color .2s ease, transform .2s ease;
}
.catv-lightbox__close:hover,
.catv-lightbox__close:focus-visible,
.catv-lightbox__nav:hover,
.catv-lightbox__nav:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, .22);
  outline: 2px solid rgba(255, 255, 255, .82);
  outline-offset: 3px;
}
.catv-lightbox__close {
  position: absolute;
  z-index: 2;
  top: 16px;
  right: 18px;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0 0 4px;
  font-size: 38px;
}
.catv-lightbox__nav {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  padding: 0 0 5px;
  font-size: 46px;
}
.catv-lightbox__nav--previous {
  grid-column: 1;
  justify-self: start;
}
.catv-lightbox__nav--next {
  grid-column: 3;
  justify-self: end;
}
.catv-lightbox--pdf {
  grid-template-columns: minmax(0, 1fr);
  padding: 56px 28px 24px;
}
.catv-lightbox--pdf .catv-lightbox__content {
  grid-column: 1;
  height: calc(100vh - 80px);
  max-width: 1500px;
  margin-inline: auto;
}

/* Fallback: suppress Elementor captions if its own lightbox is invoked. */
.elementor-lightbox .elementor-slideshow__title,
.elementor-lightbox .elementor-slideshow__description,
.elementor-lightbox .elementor-slideshow__footer,
.dialog-lightbox-widget-content .elementor-slideshow__title,
.dialog-lightbox-widget-content .elementor-slideshow__description {
  display: none !important;
}

@media (max-width: 767px) {
  .catv-lightbox {
    grid-template-columns: 46px minmax(0, 1fr) 46px;
    padding: 54px 8px 14px;
  }
  .catv-lightbox__content {
    height: calc(100vh - 68px);
  }
  .catv-lightbox__close {
    top: 8px;
    right: 10px;
    width: 40px;
    height: 40px;
    font-size: 34px;
  }
  .catv-lightbox__nav {
    width: 40px;
    height: 40px;
    font-size: 38px;
    background: rgba(5, 12, 22, .48);
  }
  .catv-lightbox--pdf {
    display: block;
    padding: 54px 8px 8px;
  }
  .catv-lightbox--pdf .catv-lightbox__content {
    height: calc(100vh - 62px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .catv-lightbox,
  .catv-lightbox__close,
  .catv-lightbox__nav {
    transition: none;
  }
}


/*
 * WordPress / Elementor gallery columns repair 1.4.24
 *
 * The HTML5 gallery markup does not receive WordPress' historical inline
 * column rules. Explicit grid styles make the selected 1–9 column setting
 * work both in post content and in Elementor's Basic Gallery widget.
 */
.gallery {
  --catv-gallery-columns: 1;
}
.gallery,
.elementor-image-gallery .gallery {
  display: grid !important;
  grid-template-columns: repeat(var(--catv-gallery-columns), minmax(0, 1fr)) !important;
  align-items: stretch;
  gap: clamp(10px, 1.5vw, 20px);
  width: 100%;
  margin: 0 0 28px;
}
.gallery-columns-1 { --catv-gallery-columns: 1; }
.gallery-columns-2 { --catv-gallery-columns: 2; }
.gallery-columns-3 { --catv-gallery-columns: 3; }
.gallery-columns-4 { --catv-gallery-columns: 4; }
.gallery-columns-5 { --catv-gallery-columns: 5; }
.gallery-columns-6 { --catv-gallery-columns: 6; }
.gallery-columns-7 { --catv-gallery-columns: 7; }
.gallery-columns-8 { --catv-gallery-columns: 8; }
.gallery-columns-9 { --catv-gallery-columns: 9; }

.gallery .gallery-item,
.elementor-image-gallery .gallery .gallery-item {
  float: none !important;
  display: block;
  width: auto !important;
  max-width: none !important;
  min-width: 0;
  margin: 0 !important;
  padding: 0;
  text-align: inherit;
}
.gallery .gallery-icon,
.gallery .gallery-icon a,
.elementor-image-gallery .gallery .gallery-icon,
.elementor-image-gallery .gallery .gallery-icon a {
  display: block;
  width: 100%;
  margin: 0;
}

/*
 * Uniform gallery previews 1.4.24
 * Keep every thumbnail frame the same size while opening the original full
 * image in the lightbox. The preview frame stays consistent; the lightbox
 * still uses the full asset referenced by the anchor href.
 */
.gallery,
.elementor-image-gallery .gallery,
.wp-block-gallery.has-nested-images,
.wp-block-gallery .blocks-gallery-grid {
  --catv-gallery-preview-ratio: 4 / 3;
}
.gallery .gallery-icon a,
.elementor-image-gallery .gallery .gallery-icon a,
.wp-block-gallery.has-nested-images figure.wp-block-image > a,
.wp-block-gallery .blocks-gallery-item > a,
.wp-block-gallery .blocks-gallery-item figure > a {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: var(--catv-gallery-preview-ratio);
  overflow: hidden;
  background: #f5f7fa;
}
.gallery .gallery-icon img,
.elementor-image-gallery .gallery .gallery-icon img,
.wp-block-gallery.has-nested-images figure.wp-block-image img,
.wp-block-gallery .blocks-gallery-item img {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: contain;
  object-position: center;
}
.gallery > br,
.elementor-image-gallery .gallery > br {
  display: none !important;
}

/* Gutenberg gallery fallback when the core block stylesheet is unavailable. */
.wp-block-gallery.has-nested-images,
.wp-block-gallery .blocks-gallery-grid {
  display: grid;
  grid-template-columns: repeat(var(--catv-block-gallery-columns, 3), minmax(0, 1fr));
  gap: clamp(10px, 1.5vw, 20px);
}
.wp-block-gallery.columns-1 { --catv-block-gallery-columns: 1; }
.wp-block-gallery.columns-2 { --catv-block-gallery-columns: 2; }
.wp-block-gallery.columns-3 { --catv-block-gallery-columns: 3; }
.wp-block-gallery.columns-4 { --catv-block-gallery-columns: 4; }
.wp-block-gallery.columns-5 { --catv-block-gallery-columns: 5; }
.wp-block-gallery.columns-6 { --catv-block-gallery-columns: 6; }
.wp-block-gallery.columns-7 { --catv-block-gallery-columns: 7; }
.wp-block-gallery.columns-8 { --catv-block-gallery-columns: 8; }
.wp-block-gallery.has-nested-images figure.wp-block-image,
.wp-block-gallery .blocks-gallery-item {
  width: auto !important;
  margin: 0 !important;
}
.wp-block-gallery.has-nested-images figure.wp-block-image,
.wp-block-gallery .blocks-gallery-item figure {
  display: block;
  margin: 0;
}

@media (max-width: 767px) {
  .gallery-columns-3,
  .gallery-columns-4,
  .gallery-columns-5,
  .gallery-columns-6,
  .gallery-columns-7,
  .gallery-columns-8,
  .gallery-columns-9 {
    --catv-gallery-columns: 2;
  }
  .wp-block-gallery.columns-3,
  .wp-block-gallery.columns-4,
  .wp-block-gallery.columns-5,
  .wp-block-gallery.columns-6,
  .wp-block-gallery.columns-7,
  .wp-block-gallery.columns-8 {
    --catv-block-gallery-columns: 2;
  }
}

@media (max-width: 480px) {
  .gallery,
  .elementor-image-gallery .gallery,
  .wp-block-gallery.has-nested-images,
  .wp-block-gallery .blocks-gallery-grid {
    --catv-gallery-columns: 1;
    --catv-block-gallery-columns: 1;
  }
}


/* Official board profiles 1.4.24 */
.catv-member__initials {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--catv-navy);
  background: linear-gradient(145deg, #f4f6f9, #e7ebf1);
  font: 700 1.1rem/1 Georgia, "Times New Roman", serif;
  letter-spacing: .08em;
}
.catv-member-profile-shell {
  padding-top: clamp(48px, 7vw, 100px);
  padding-bottom: clamp(64px, 8vw, 120px);
}
.catv-member-profile {
  display: grid;
  grid-template-columns: minmax(250px, 380px) minmax(0, 1fr);
  gap: clamp(36px, 6vw, 88px);
  align-items: start;
  max-width: 1120px;
  margin: 0 auto;
}
.catv-member-profile__portrait {
  overflow: hidden;
  min-height: 420px;
  aspect-ratio: 4 / 5;
  background: var(--catv-soft);
  border: 1px solid var(--catv-line);
  box-shadow: var(--catv-shadow);
}
.catv-member-profile__portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
.catv-member-profile__placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 420px;
  color: rgba(6, 43, 85, .36);
  background: radial-gradient(circle at 50% 35%, #fff 0, #eef2f6 72%);
  font: 700 clamp(2rem, 5vw, 4.5rem)/1 Georgia, "Times New Roman", serif;
  letter-spacing: .12em;
}
.catv-member-profile__body {
  padding-top: clamp(4px, 2vw, 24px);
}
.catv-member-profile__role {
  margin-bottom: 14px;
  color: var(--catv-gold);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.catv-member-profile__body .catv-entry-title {
  margin-bottom: clamp(26px, 4vw, 44px);
}
.catv-member-profile__body .catv-entry-content {
  color: var(--catv-ink);
  font-size: 1.06rem;
  line-height: 1.85;
}
.catv-member-profile__back {
  display: inline-block;
  margin-top: 18px;
  color: var(--catv-navy);
  font-weight: 700;
  text-decoration: none;
}
.catv-member-archive-card > a {
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--catv-soft);
}
.catv-member-archive-card > a img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
.catv-member-archive-card__placeholder {
  display: grid !important;
  place-items: center;
  color: rgba(6, 43, 85, .34);
  background: radial-gradient(circle at 50% 35%, #fff 0, #eef2f6 72%) !important;
  font: 700 clamp(1.8rem, 4vw, 3.4rem)/1 Georgia, "Times New Roman", serif;
  letter-spacing: .12em;
  text-decoration: none;
}
.catv-member-archive-card .catv-entry-meta {
  color: var(--catv-gold);
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
@media (max-width: 760px) {
  .catv-member-profile {
    grid-template-columns: 1fr;
  }
  .catv-member-profile__portrait {
    width: min(100%, 420px);
    min-height: 0;
  }
}


/* -------------------------------------------------------------------------
 * Direttivo in the shared content hub 1.4.24
 * ---------------------------------------------------------------------- */
.catv-member-profile-shell.catv-single-shell {
  padding-top: clamp(48px, 7vw, 88px);
  padding-bottom: clamp(64px, 8vw, 100px);
}
.catv-member-profile-layout .catv-member-profile {
  max-width: none;
  margin: 0;
}
.catv-member-profile-layout .catv-member-profile__portrait {
  min-width: 0;
}
.catv-content-hub__member-photo {
  flex: 0 0 48px;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  overflow: hidden;
  color: var(--catv-navy);
  background: linear-gradient(145deg, #f4f6f9, #e7ebf1);
  border: 1px solid var(--catv-line);
  border-radius: 50%;
  font: 700 13px/1 Georgia, "Times New Roman", serif;
  letter-spacing: .06em;
}
.catv-content-hub__member-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
@media (max-width: 820px) {
  .catv-content-hub__sections {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .catv-content-hub__block:last-child {
    grid-column: auto;
  }
}
@media (max-width: 700px) {
  .catv-member-profile-layout .catv-member-profile {
    grid-template-columns: 1fr;
  }
  .catv-member-profile-layout .catv-member-profile__portrait {
    width: min(100%, 420px);
    min-height: 0;
  }
}
@media (max-width: 560px) {
  .catv-content-hub__sections {
    grid-template-columns: 1fr;
  }
}
