/* ensoul-blocks css vars overrides */

strong,
b {
  font-weight: 700;
}

/* Content block: fill parent when nested inside a column */
.wp-block-ensoul-column .wp-block-ensoul-content {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

:root {
  /* PRIMARY — Fantoni Navy #1a2d4e */
  --color-primary-50: #f0f3f7;
  --color-primary-100: #d4dce8;
  --color-primary-200: #a9b9d1;
  --color-primary-300: #7e96ba;
  --color-primary-400: #4b6590;
  --color-primary-500: #1a2d4e;
  --color-primary-600: #152644;
  --color-primary-700: #111e38;
  --color-primary-800: #0c162b;
  --color-primary-900: #080f1e;

  /* SECONDARY — Navy (same brand, single-accent theme) */
  --color-secondary-50: #f0f3f7;
  --color-secondary-100: #d4dce8;
  --color-secondary-200: #a9b9d1;
  --color-secondary-300: #7e96ba;
  --color-secondary-400: #4b6590;
  --color-secondary-500: #1a2d4e;
  --color-secondary-600: #152644;
  --color-secondary-700: #111e38;
  --color-secondary-800: #0c162b;
  --color-secondary-900: #080f1e;

  /* NEUTRAL */
  --color-neutral-50: #fafafa;
  --color-neutral-100: #f8f8f8;
  --color-neutral-200: #eeeeee;
  --color-neutral-300: #d5d5d0;
  --color-neutral-400: #a3a3a3;
  --color-neutral-500: #747474;
  --color-neutral-600: #525252;
  --color-neutral-700: #404040;
  --color-neutral-800: #262626;
  --color-neutral-900: #212121;

  /* SEMANTIC COLORS */
  --color-white: #ffffff;
  --color-black: #212121;
  --color-base: #1a2d4e;

  /* UTILITY COLORS */
  --color-mid-black: #4c4c4c;
  --color-soft-black: #7f7f7f;
  --color-soft-gray: #f1f1f1;

  /* HEADING SIZES — matched to production fantoni-theme Tailwind values
     Mobile (default): h1=base(30), h2=sm(30), h3=xs(18)
     Desktop (≥768px): h1=xl(72), h2=lg(48), h3=sm(30) */
  --text-heading-xs: 18px;
  --text-heading-sm: 30px;
  --text-heading-base: 30px;
  --text-heading-lg: 48px;
  --text-heading-xl: 72px;

  /* PARAGRAPH SIZES */
  --text-xs: 12px;
  --text-sm: 14px;
  --text-base: 16px;
  --text-lg: 18px;
  --text-xl: 20px;
  --text-2xl: 24px;
  --text-3xl: 30px;
  --text-4xl: 36px;
  --text-5xl: 48px;

  /* LINE HEIGHTS */
  --leading-tight: 1.25;
  --leading-normal: 1.5;
  --leading-loose: 1.75;

  /* HEADING LINE HEIGHTS */
  --text-heading-xs--line-height: 1.2;
  --text-heading-sm--line-height: 1.15;
  --text-heading-base--line-height: 1.15;
  --text-heading-lg--line-height: 1.15;
  --text-heading-xl--line-height: 1.1;

  /* SCALE */
  --spacing-0: 0;
  --spacing-xs: 8px;
  --spacing-sm: 12px;
  --spacing-md: 16px;
  --spacing-lg: 20px;
  --spacing-xl: 24px;
  --spacing-2xl: 32px;
  --spacing-3xl: 40px;
  --spacing-4xl: 48px;

  /* COMPONENT SPACING — columns */
  --spacing-columns: 30px;
  --spacing-columns-dk: 20px;
  --spacing-columns-y: 5px;
  --spacing-columns-y-dk: 12px;
  --spacing-content-padding: 80px;
  --spacing-content-padding-mobile: 32px;

  /* CONTAINER WIDTHS */
  --container-xs: 480px;
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1280px;
  --container-2xl: 1536px;

  /* SPACING CONTAINER */
  --spacing-container-heading: 960px;
  --spacing-container-columns: 768px;
  --spacing-container-content: var(--wp--style--global--content-size);

  /* GLOBAL BUTTON */
  --btn-padding-x: 24px;
  --btn-padding-y: 10px;
  --btn-font-size: 14px;
  --btn-font-weight: 500;
  --btn-border-width: 1px;
  --btn-border-radius: 0;
  --btn-text-transform: uppercase;

  /* Editor inline-style compatibility: the editor RichText applies these
     as inline styles on the child <div>, so they must be set at :root
     to ensure correct inheritance when .ens-btn overrides them */
  --font-weight-button: var(--btn-font-weight);
  --text-button-font-size: var(--btn-font-size);

  /* BUTTON ICON */
  --spacing-button-icon-width: 20px;
  --spacing-button-icon-width-dk: 20px;

  /* BUTTON COLORS */
  --btn-primary-color: var(--color-primary-500);
  --btn-primary-bg: transparent;
  --btn-primary-border: var(--color-primary-500);
  --btn-secondary-color: var(--color-primary-500);
  --btn-secondary-bg: transparent;
  --btn-secondary-border: transparent;

  /* GAP SCALE */
  --gap-xs: 8px;
  --gap-sm: 12px;
  --gap-md: 16px;
  --gap-lg: 20px;
  --gap-xl: 24px;
  --gap-2xl: 32px;

  /* BORDER RADIUS */
  --border-radius-sm: 4px;
  --border-radius-md: 8px;
  --border-radius-lg: 16px;
  --border-radius-full: 1000px;

  /* SCROLLBAR */
  --scrollbar-width: 8px;

  /* TRANSITIONS */
  --transition-fast: 200ms;
  --transition-base: 300ms;
  --transition-slow: 500ms;
  --transition-ease: ease-in-out;

  /* ACCORDION */
  --spacing-accordion-x: 32px;
  --spacing-accordion-x-dk: 32px;
  --spacing-accordion-y: 32px;
  --spacing-accordion-y-dk: 32px;
  --spacing-gap-accordion: 32px;
  --spacing-dimension-icon-accordion: 20px;
  --spacing-dimension-icon-accordion-dk: 40px;
  --color-border-accordion: #000000;
  --spacing-dimension-border: 1px;

  /* MAP */
  --spacing-height-map: 300px;
  --spacing-height-map-dk: 600px;

  /* LIST */
  --spacing-dimension-icon-list: 16px;
  --spacing-dimension-icon-list-dk: 20px;

  /* CAPTION */
  --text-caption-text: 14px;
  --color-caption: var(--color-black);
  --spacing-caption: 16px;
  --spacing-caption-dk: 20px;

  /* SLIDER */
  --slider-space-between: 28;
  --slider-space-between-mobile: 14;
  --slider-arrow-icon-size: 44px;
  --slider-arrow-icon-size-mobile: 35px;
  --color-slide-background: var(--color-black);

  /* VIDEO SCROLLER */
  --spacing-vscroller-max-width: 350px;
  --color-vscroller-slide-background: var(--color-black);
  --color-vscroller-subtitle: #ffffff;
  --color-vscroller-title: #ffffff;
  --color-vscroller-paragraph: #ffffff;
  --color-vscroller-cta: #ffffff;
  --color-vscroller-cta-hover: #cccccc;
  --text-vscroller-subtitle-mobile: 1rem;
  --text-vscroller-title-mobile: 1.5rem;
  --text-vscroller-paragraph-mobile: 0.75rem;
  --text-vscroller-cta-mobile: 0.75rem;
  --text-vscroller-subtitle-desktop: 1.5rem;
  --text-vscroller-title-desktop: 2rem;
  --text-vscroller-paragraph-desktop: 1rem;
  --text-vscroller-cta-desktop: 1rem;

  /* TIMELINE */
  --color-timeline: var(--color-secondary-500);
  --text-timeline-title: 14px;
  --text-timeline-title--line-height: 1.15em;
  --spacing-timeline-margin: 40px 0px 50px;
  --spacing-timeline-padding: 0 0;

  /* FILTER */
  --color-filter: var(--color-secondary-500);
  --color-filter-hover: var(--color-primary-500);
  --color-filter-active: var(--color-primary-500);
  --spacing-gap-filter: 24px;
  --text-filter-size: 16px;
  --text-filter--line-height: 20px;

  /* PROGRESS BAR */
  --color-progress-bar: #ffffff;
  --color-fill-progress-bar: #000000;
  --spacing-progress-bar: 10px;

  /* CONTENT */
  --spacing-content-top: 0;
  --spacing-content-top-dk: 0;

  /* HEADER */
  --spacing-hamburger-width: auto;
  --spacing-hamburger-height: 1.5rem;

  /* GROUP SPACING */
  --spacing-group: 48px;
  --spacing-group-dk: 64px;
  --spacing-group-y: 15px;
  --spacing-group-y-dk: 64px;

  /* GALLERY */
  --spacing-gallery-x: 16px;
  --spacing-gallery-y: 16px;

  /* CONTAINER PER COMPONENT */
  --spacing-container-video: 986px;
  --spacing-container-image: 400px;
  --spacing-container-slider: 886px;
  --spacing-container-gallery: 986px;
  --spacing-container-paragraph: 768px;
  --spacing-container-accordion: 768px;
  --spacing-container-list: 768px;
  --spacing-container-divider: 200px;

  --wp--preset--color--base: var(--color-base);
}

/* Desktop: bump content-padding-left to match --spacing-content-padding (80px)
   The compiled global.css only sets it to mobile (32px) — missing this override */
@media (min-width: 769px) {
  :root {
    --spacing-content-padding-left: var(--spacing-content-padding);
  }
}

@media (max-width: 768px) {
  :root {
    --scrollbar-width: 0px;
  }
}

/* Scrollbar & selection styling*/
::-webkit-scrollbar {
  width: var(--scrollbar-width);
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--color-mid-black);
}

::selection {
  background-color: var(--color-primary-500);
  color: var(--color-white);
}

::-moz-selection {
  background-color: var(--color-primary-500);
}

::-webkit-selection {
  background-color: var(--color-primary-500);
  color: var(--color-white);
}

/* Container width utilities - use !important to override WordPress editor defaults */
.max-w-container-columns {
  max-width: var(--spacing-container-columns) !important;
}

.max-w-container-content {
  max-width: var(--spacing-container-content) !important;
}

.dark {
  /* DARK MODE - PRIMARY COLORS */
  --color-primary-50: #080f1e;
  --color-primary-100: #0c162b;
  --color-primary-200: #111e38;
  --color-primary-300: #152644;
  --color-primary-400: #1a2d4e;
  --color-primary-500: #4b6590;
  --color-primary-600: #7e96ba;
  --color-primary-700: #a9b9d1;
  --color-primary-800: #d4dce8;
  --color-primary-900: #f0f3f7;

  /* DARK MODE - SECONDARY COLORS */
  --color-secondary-50: #080f1e;
  --color-secondary-100: #0c162b;
  --color-secondary-200: #111e38;
  --color-secondary-300: #152644;
  --color-secondary-400: #1a2d4e;
  --color-secondary-500: #4b6590;
  --color-secondary-600: #7e96ba;
  --color-secondary-700: #a9b9d1;
  --color-secondary-800: #d4dce8;
  --color-secondary-900: #f0f3f7;

  /* DARK MODE - NEUTRAL COLORS */
  --color-neutral-50: #171717;
  --color-neutral-100: #262626;
  --color-neutral-200: #404040;
  --color-neutral-300: #525252;
  --color-neutral-400: #737373;
  --color-neutral-500: #a3a3a3;
  --color-neutral-600: #d4d4d4;
  --color-neutral-700: #e5e5e5;
  --color-neutral-800: #f5f5f5;
  --color-neutral-900: #fafafa;

  /* DARK MODE - SEMANTIC COLORS COLORS */
  --color-white: #202020;
  --color-black: #fefefe;
  --color-base: #4b6590;

  /* DARK MODE - UTILITY COLORS COLORS */
  --color-mid-black: #b3b3b3;
  --color-soft-black: #808080;
  --color-soft-gray: #2a2a2a;

  --wp--preset--color--base: var(--color-base);
}

h1,
.h1 {
  font-size: var(--text-heading-base);
  line-height: var(--text-heading-base--line-height);
}

h2,
.h2 {
  font-size: var(--text-heading-sm);
  line-height: var(--text-heading-sm--line-height);
}

h3,
.h3 {
  font-size: var(--text-heading-xs);
  line-height: var(--text-heading-xs--line-height);
}

:where(.wp-site-blocks *:focus) {
  outline: none !important;
}

a {
  text-decoration: none !important;
  transition: color 0.1s ease-in;
}
a:hover {
  color: var(--color-secondary-400) !important;
}

/* ===========================
   BUTTON BASE — Fix editor/frontend parity.
   Editor JS misses text-button!, hover states, text-decoration, cursor.
   These rules ensure buttons look the same in editor and frontend.
   =========================== */
.ens-btn {
  cursor: pointer;
  color: var(--color-button);
  text-decoration: var(--decoration-button, none);
  transition:
    color 200ms ease-out,
    background-color 200ms ease-out,
    border-color 200ms ease-out;
}

.ens-btn:hover {
  color: var(--color-button-hover);
  background-color: var(--color-button-background-hover);
  text-decoration: var(--decoration-button-hover, none);
}

/* PRIMARY — CTA text link (old Sage: inline-block text-xl font-bold no-underline hover:underline + arrow icon) */
.ens-btn.ens-btn-primary {
  --spacing-padding-button: 0;
  text-transform: none;
  font-size: 20px;
  font-weight: 700;
  --font-weight-button: 700;
  border: none;
  --border-width-button-width: 0;
  --decoration-button: none;
  --decoration-button-hover: underline;
  --color-button: var(--color-primary-500);
  --color-button-hover: var(--color-primary-500);
  --color-button-background: transparent;
  --color-button-background-hover: transparent;
  svg {
    margin-right: var(--spacing-xs);
  }
}

/* SECONDARY — Plain text link (old Sage: inline-block no-underline hover:underline) */
.ens-btn.ens-btn-secondary {
  text-transform: var(--btn-text-transform);
  font-size: var(--btn-font-size);
  font-weight: var(--btn-font-weight);
  padding-left: 0;
  padding-right: 0;
  --decoration-button: none;
  --decoration-button-hover: underline;
  --color-button: var(--color-primary-500);
  --color-button-hover: var(--color-primary-500);
  --color-button-background: none;
  --color-button-background-hover: transparent;
  svg {
    margin-right: var(--spacing-xs);
  }
}

/* TERTIARY — Inverted for dark backgrounds (old Sage: text-white on bg-fantoni sections) */
.ens-btn.ens-btn-tertiary {
  --spacing-padding-button: 0 0;
  border: none;
  text-transform: var(--btn-text-transform);
  font-size: var(--btn-font-size);
  font-weight: var(--btn-font-weight);
  --decoration-button: none;
  --decoration-button-hover: underline;
  --color-button: var(--color-white);
  --color-button-hover: var(--color-white);
  --color-button-background: none;
  --color-button-background-hover: transparent;
  svg {
    margin-right: var(--spacing-xs);
  }
}

/* QUATERNARY — Solid filled button (old Sage: .button--primary → bg-fantoni text-white rounded) */
.ens-btn.ens-btn-quaternary {
  --spacing-padding-button: var(--btn-padding-y) var(--btn-padding-x);
  text-transform: var(--btn-text-transform);
  font-size: var(--btn-font-size);
  font-weight: var(--btn-font-weight);
  --decoration-button: none;
  --decoration-button-hover: none;
  --border-color-button-color: var(--color-primary-500);
  --border-width-button-width: var(--btn-border-width);
  --color-button: var(--color-white);
  --color-button-hover: var(--color-white);
  --color-button-background: var(--color-primary-500);
  --color-button-background-hover: rgba(26, 45, 78, 0.9);
  --radius-button: var(--border-radius-sm);
  svg {
    margin-right: var(--spacing-xs);
  }
}

/* QUINARY — Outlined button (old Sage: .button → border-neutral-300 text-black rounded) */
.ens-btn.ens-btn-quinary {
  --spacing-padding-button: var(--btn-padding-y) var(--btn-padding-x);
  text-transform: var(--btn-text-transform);
  font-size: var(--btn-font-size);
  font-weight: var(--btn-font-weight);
  --decoration-button: none;
  --decoration-button-hover: none;
  --border-color-button-color: var(--color-neutral-300);
  --border-width-button-width: var(--btn-border-width);
  --color-button: var(--color-black);
  --color-button-hover: var(--color-black);
  --color-button-background: transparent;
  --color-button-background-hover: var(--color-neutral-100);
  --radius-button: var(--border-radius-sm);
  svg {
    margin-right: var(--spacing-xs);
  }
}

.ens-btn.ens-btn-sextuary {
  display: none;
}

@media (width >= 48rem /* 768px */) {
  h1,
  .h1 {
    font-size: var(--text-heading-xl);
    line-height: var(--text-heading-xl--line-height);
  }

  h2,
  .h2 {
    font-size: var(--text-heading-lg);
    line-height: var(--text-heading-lg--line-height);
  }

  h3,
  .h3 {
    font-size: var(--text-heading-sm);
    line-height: var(--text-heading-sm--line-height);
  }
}

/* fix default style */
/* eventualmente modificare da theme.json */
:where(figure) {
  margin-bottom: 0;
}

:where(.wp-site-blocks) > main {
  margin-top: 0;
}

/* Header styles moved to /header/megamenu.css */

/* Maps */
.image-location-maps,
.text-location-maps {
  display: none !important;
}
.leaflet-popup-content {
  width: var(--container-xs);
  max-width: 160px;
}

/* Slider */
@media (width <= 48rem) {
  .content-slider {
    padding-bottom: var(--spacing-4xl);
  }
  .content-slider-next,
  .content-slider-prev {
    top: auto;
    bottom: 0;
  }
}

.content-slider.autoscroll .swiper-slide figure {
  max-height: 60vh;
}

@media (max-width: 1024px) {
  .content-slider.autoscrol .swiper-slide figure {
    height: 45vh;
  }
}

/* rimuovi questa parte per mostrare gli index sulle slide */
.slide-index-display {
  display: none;
}

.wpml-language-switcher-block,
.wpml-language-switcher-block .block-editor-block-list__block,
.wpml-language-switcher-block .wp-block-navigation-submenu,
.wpml-language-switcher-block .is-layout-flex {
  width: fit-content !important;
  max-width: fit-content !important;
}
.wpml-language-switcher-block {
  flex: 0 0 auto !important;
  text-transform: uppercase;
}

/* Independent Y-gap for columns and group */
.gap-y-columns {
  row-gap: var(--spacing-columns-y);
}
.gap-y-group {
  row-gap: var(--spacing-group-y);
}
@media (min-width: 768px) {
  :root {
    --spacing-columns-y: var(--spacing-columns-y-dk);
    --spacing-group-y: var(--spacing-group-y-dk);
  }
}
