/*
Theme Name: Silenccio-General
Theme URI:
Author: Silenccio Cyberprevention
Author URI:
Description:
Requires at least: 6.9
Tested up to: 6.9
Requires PHP: 5.7
Version: 1.2.11
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: silenccio-general
Tags:
*/
:root {
  /* Brand */
  --axa-blue: #00008f;
  --axa-blue-dark: #00005b;

  /* Neutrals */
  --axa-grey: #fafafa;
  --axa-border: #ccc;
  --axa-dark-border: #e5e5e5;
  --axa-grey-text: #7f7f7f;
  --white: #fff;
  --light-grey: #f5f5f5;

  /* Accent (burnt sienna) */
  --burnt-sienna: #f07662;
  --burnt-sienna-light: #e76049;
  --burnt-sienna-dark: #ec4d33;

  --divider: #999;
}

* {
  box-sizing: border-box;
  outline: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
}

/* hack to force corporate business to be always selected */
[aria-label="axa-menu"] li.js-corporate-root.current-menu-item > a {
  /* active styles */
  color: var(--axa-blue-dark);
  background: var(--white);
  margin-bottom: -2px;
  border-bottom: 2px solid var(--white);
}
/* 1) Utility Bar */

.utility-bar {
  background: var(--axa-grey);
  border-top: 2px solid var(--axa-blue);
  border-bottom: 1px solid var(--axa-border);
}

.utility-bar__container {
  padding: 0 0 0 15px;
}

.utility-bar__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.utility-bar__row,
.utility-bar__row * {
  margin-top: 0;
  margin-bottom: 0;
}

.utility-bar__col--right {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 !important;
}

.utility-bar__nav .wp-block-navigation__container,
.utility-bar__col--left .wp-block-navigation__container {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -15px;
  padding: 0;
  list-style: none;
  gap: 0 !important;
}

.utility-bar__nav .wp-block-navigation-item,
.utility-bar__col--left .wp-block-navigation-item {
  border-right: 1px solid var(--axa-border);
}

.utility-bar__nav .wp-block-navigation-item:first-child,
.utility-bar__col--left .wp-block-navigation-item:first-child {
  border-left: 1px solid var(--axa-border);
}

.utility-bar__nav .wp-block-navigation-item__content,
.utility-bar__col--left .wp-block-navigation-item__content {
  display: block;
  padding: 10px 15px;
  font-size: var(--wp--preset--font-size--small);
  line-height: 17.94px;
  font-weight: 600;
  letter-spacing: 0.26px;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--axa-grey-text);
  text-decoration: none;
}

.utility-bar__col--left .current-menu-item > .wp-block-navigation-item__content,
.utility-bar__col--left .current_page_item > .wp-block-navigation-item__content {
  color: var(--axa-blue-dark);
  background: var(--white);
  margin-bottom: -2px;
  border-bottom: 2px solid var(--white);
}

.utility-bar__col--right .wpml-language-switcher-block {
  width: auto !important;
  flex: 0 0 auto;
  height: 40px;
}

.utility-bar .utility-bar__col--right > .wpml-language-switcher-block {
  border-left: 1px solid var(--axa-border);
}
.utility-bar .wpml-language-switcher-block ul.wp-block-navigation__submenu-container {
  display: block !important; /* kills "isHorizontal" flex */
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 6px;

  min-width: 120px;
  padding: 6px 0;

  background: var(--white) !important;
  border: 1px solid var(--axa-border) !important;
  border-radius: 0 !important;
  box-shadow: 0 3px 10px -2px rgba(0, 0, 0, 0.3);

  z-index: 9999;
}

.utility-bar .wpml-language-switcher-block ul.wp-block-navigation__submenu-container .wp-block-navigation-item {
  width: 100%;
  margin: 0 !important;
}
.utility-bar .wpml-language-switcher-block ul.wp-block-navigation__submenu-container .wp-block-navigation-item div {
  width: 100%;
}
.utility-bar
  .wpml-language-switcher-block
  ul.wp-block-navigation__submenu-container
  .wp-block-navigation-item:last-child
  > div
  > a {
  border-bottom: 2px solid var(--axa-border);
}
.utility-bar
  .wpml-language-switcher-block
  ul.wp-block-navigation__submenu-container
  a.wp-block-navigation-item__content {
  display: block;
  width: 100%;

  padding: 8px 20px;

  font-family: var(--wp--preset--font-family--body);
  font-size: var(--wp--preset--font-size--small);
  line-height: 18px;
  font-weight: 600;
  letter-spacing: 0.26px;
  text-transform: uppercase;

  color: var(--axa-grey-text) !important; /* overrides inline color */
  background: transparent !important;
  text-decoration: none;
}
.utility-bar
  .wpml-language-switcher-block
  ul.wp-block-navigation__submenu-container
  a.wp-block-navigation-item__content
  .wp-block-navigation-item__label {
  color: inherit !important; /* inherits from the <a> */
}
.utility-bar
  .wpml-language-switcher-block
  ul.wp-block-navigation__submenu-container
  a.wp-block-navigation-item__content:hover {
  color: var(--axa-blue) !important; /* AXA blue */
}

/* current language */
.utility-bar .wpml-language-switcher-block ul.wp-block-navigation__submenu-container a[aria-current="page"] {
  color: var(--axa-blue) !important;
}

.utility-bar .wpml-language-switcher-block .wp-block-navigation-submenu__toggle .current-language-item {
  position: relative;
  display: inline-flex;
  align-items: center;

  font-family: var(--wp--preset--font-family--body);
  font-size: var(--wp--preset--font-size--small);
  line-height: 17.94px;
  font-weight: 600;
  letter-spacing: 0.26px;
  text-transform: uppercase;

  color: var(--axa-grey-text);
  padding: 10.5px 50px 10.5px 20px;

  /* match button-y feel */
  background: transparent;
  border: 0;
  cursor: pointer;
}

/* 2) Stop Gutenberg’s submenu icon sizing from messing with layout */
.utility-bar .wpml-language-switcher-block .wp-block-navigation-submenu__toggle .wp-block-navigation__submenu-icon {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);

  width: 16px;
  height: 16px;
  margin: 0;
  padding: 0;

  display: block;
  line-height: 0;
}
/* hide WPML/Gutenberg SVG */
.utility-bar .wpml-language-switcher-block .wp-block-navigation__submenu-icon svg {
  display: none;
}

/* our chevron */
.utility-bar .wpml-language-switcher-block .wp-block-navigation__submenu-icon {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  background-color: var(--divider);
  transition: transform 0.25s ease;

  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><path d='M16 28.067c-.533 0-1-.2-1.4-.6l-14-14c-1.8-1.8 1-4.667 2.8-2.8L16 23.2l12.6-12.533c1.8-1.8 4.667 1 2.8 2.8l-14 14c-.333.4-.867.6-1.4.6z'/></svg>")
    no-repeat center;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><path d='M16 28.067c-.533 0-1-.2-1.4-.6l-14-14c-1.8-1.8 1-4.667 2.8-2.8L16 23.2l12.6-12.533c1.8-1.8 4.667 1 2.8 2.8l-14 14c-.333.4-.867.6-1.4.6z'/></svg>")
    no-repeat center;
}

/* rotate when open (hover-open OR click-open) */
.utility-bar .wpml-language-switcher-block li.wp-block-navigation-submenu:hover .wp-block-navigation__submenu-icon,
.utility-bar
  .wpml-language-switcher-block
  .wp-block-navigation-submenu__toggle[aria-expanded="true"]
  .wp-block-navigation__submenu-icon {
  transform: translateY(-50%) rotate(180deg);
}

.site-main-header {
  border-bottom: 2px solid #e5e5e5;
}

/* Make link positioning context */
.site-main-header .wp-block-navigation-item__content {
  position: relative;
  height: 73px;
  display: flex;
  align-items: center;
  padding: 0 10px;
}

/* Active underline bar */
.site-main-header .current-menu-item > .wp-block-navigation-item__content::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0; /* always bottom of link */
  width: 100%; /* exactly link width */
  height: 4px;
  background: var(--burnt-sienna);
}

/* FOOTER languages */
.site-footer .wpml-language-switcher-block {
  width: auto !important; /* override WPML */
  flex: 0 0 auto;
}

.site-footer .wp-block-navigation__container,
.site-footer .wpml-language-switcher-block ul.horizontal-list {
  margin: 0;
  padding: 0 5px 0 0;
  list-style: none;
  display: block; /* closer to old footer */
  white-space: nowrap;
}

.site-footer .wpml-language-switcher-block li {
  display: inline;
  line-height: 17px;
  opacity: 0.65;
  font-weight: 700; /* old footer */
}

.site-footer .wp-block-navigation__container .wp-block-navigation-item,
.site-footer .wp-block-navigation__container .wp-block-navigation-item a,
.site-footer .wpml-language-switcher-block li {
  display: inline;
}
/* separator */

.site-footer .wp-block-navigation__container .wp-block-navigation-item::after,
.site-footer .wpml-language-switcher-block li::after {
  content: "|";
  margin: 0 8px;
  opacity: 0.65;
}
.site-footer .wp-block-navigation__container .wp-block-navigation-item:last-child::after,
.site-footer .wpml-language-switcher-block li:last-child::after {
  content: "";
  margin: 0;
  opacity: 0;
}

/* current language full opacity (your markup uses li[data-wpml="current-language-item"]) */
.site-footer .wpml-language-switcher-block li[data-wpml="current-language-item"] {
  opacity: 1 !important;
}

/* make wrappers not affect layout */
.site-footer .wpml-language-switcher-block li > div {
  display: inline;
}

/* links */
.site-footer .wpml-language-switcher-block a {
  color: #fff;
  text-decoration: none;
  font-size: var(--wp--preset--font-size--small);
  letter-spacing: .28px;
  line-height: 17px;
  font-family: var(--wp--preset--font-family--body);
  font-weight: 700;
}
@media (max-width: 991px) {
  .site-footer {
    padding: 0 var(--wp--preset--spacing--40);
  }

  .site-footer > .language-switcher {
    display: flex;
    flex-flow: row wrap;
    gap: 16px;
  }
}

@media (max-width: 630px) {
  .site-footer {
    padding: var(--wp--preset--spacing--40) !important;
  }
  .site-footer > .language-switcher {
    justify-content: center;
  }
  .site-footer > .language-switcher > div:last-child {
    display: flex;
    flex-flow: row wrap;
    gap: 16px;
    justify-content: center;
  }
}

/* =============================================================
   PAGE CONTENT STYLES
   Added to complement the block plugin's own style-index.css.
   The plugin handles .btn, .hero-cta, .service-card, .cta-banner
   etc. This section handles the theme-side concerns only.
   ============================================================= */

/* ------------------------------------------------------------------
   Section rhythm
   Top-level core/group blocks used as page sections.
   Hero opt-out via :has(.hero-cta).
   ------------------------------------------------------------------ */

.wp-block-post-content > .wp-block-group {
  padding-top: 3.38rem;
  padding-bottom: 69px;
  padding-left: 4rem;
  padding-right: 4rem;
}
.wp-block-post-content > .wp-block-group:nth-child(even):nth-child(n + 2) {
  background-color: var(--light-grey);
}

.wp-block-post-content > .wp-block-group:has(.hero-cta) {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  background-color: transparent !important;
}

/* ------------------------------------------------------------------
   FAQ — core/details with className="faq-entry"
   Inline mask replaces the old theme's external SVG path.
   ------------------------------------------------------------------ */

.faq-entry {
  width: 100%;
  max-width: 690px;
  margin: 0;
  border-bottom: 1px solid var(--axa-border);
}

.faq-entry:first-of-type {
  border-top: 1px solid var(--axa-border);
}

.faq-entry summary {
  padding: 10px 4px;
  font-weight: 600;
  font-family: var(--wp--preset--font-family--body);
  list-style: none;
  display: flex;
  min-height: 58px;
  align-items: center;
  cursor: pointer;
}

.faq-entry summary::-webkit-details-marker {
  display: none;
}

.faq-entry summary::after {
  content: "";
  flex-shrink: 0;
  display: inline-block;
  width: 24px;
  height: 24px;
  margin-left: auto;
  background-color: var(--axa-blue);
  transition: transform 0.3s ease;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z'/></svg>")
    no-repeat center / contain;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z'/></svg>")
    no-repeat center / contain;
}

.faq-entry[open] summary::after {
  transform: rotate(180deg);
}

.faq-entry p {
  padding: 10px 4px;
  margin: 0;
  hyphens: auto;
  word-wrap: break-word;
}

/* ------------------------------------------------------------------
   Accent banner — core/group with className="hero-banner__accent"
   ------------------------------------------------------------------ */

.hero-banner__accent img {
  transform: scaleX(-1);
}

.hero-banner__accent ul {
  padding-left: calc(var(--wp--preset--spacing--50) + 7.5em) !important;
}

@media (max-width: 1140px) {
  .hero-banner__accent ul {
    padding-left: calc(var(--wp--preset--spacing--50) + 4.5em) !important;
  }
}

@media (max-width: 768px) {
  .hero-banner__accent ul {
    padding-left: calc(var(--wp--preset--spacing--50) + 2.5em) !important;
  }
}

/* ------------------------------------------------------------------
   Swiper slider — da/wp-swiper-slides plugin
   Only layout + brand overrides.
   ------------------------------------------------------------------ */

.wp-swiper__wrapper {
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 8px 0 rgba(0, 0, 0, 0.15);
  padding: 15px;
}

.wp-swiper__wrapper .swiper-container {
  margin-bottom: 66px;
}

.wp-swiper__wrapper .wp-swiper__slide-content img {
  max-width: 100%;
  width: -webkit-fill-available;
  width: -moz-available;
  display: block;
}

.wp-swiper__wrapper .wp-swiper__slide-content h4 {
  max-width: 50%;
  margin: 24px auto;
  font-size: 28px;
}

.wp-swiper__wrapper .wp-swiper__slide-content p {
  max-width: 66%;
  margin: 0 auto;
  color: var(--wp--preset--color--dark-grey);
  text-align: center;
  font-size: 28px;
  font-weight: 400;
  line-height: 36px;
}

.swiper-pagination {
  margin: 28px auto;
}

.wp-swiper__slide-content figure {
  position: relative;
  margin-bottom: 40px !important;
}

/* Step badge: outer ring */
.wp-swiper__slide-content figure::before {
  content: "";
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translate(-50%, 23%);
  width: 62px;
  height: 62px;
  border: 2px solid var(--axa-blue);
  border-radius: 50%;
  background-color: #fff;
  z-index: 1;
}

/* Step badge: inner circle + number */
.wp-swiper__slide-content figure::after {
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translate(-50%, 17%);
  width: 54px;
  height: 54px;
  background-color: var(--axa-blue);
  border-radius: 50%;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-family: var(--wp--preset--font-family--body);
  font-weight: 700;
  z-index: 2;
}

[data-swiper] {
  counter-reset: slide;
}

[data-swiper] [data-tab^="slide-"] figure::after {
  counter-increment: slide;
  content: counter(slide);
}

.wp-block-post-content :where(.is-layout-constrained) > * {
  margin-block-start: 1.2rem;
}

.security-assessment-detail > section {
  max-width: 1024px;
}

.o-header,
.m-header-burger {
  display: none;
}

.m-header-mobile__backdrop,
.m-header-mobile__canvas {
  display: none;
}

@media (max-width: 991px) {
  header {
    display: none;
  }
  .o-header {
    display: block;
  }

  .m-header-mobile__backdrop,
  .m-header-mobile__canvas {
    display: unset;
  }
  .m-header-navigation {
    display: none;
  }

  .m-header-burger {
    display: block;
  }

  .m-header-mobile__backdrop {
    display: block;
    opacity: 0;
    pointer-events: none;
    position: fixed;
    inset: 0;
    transition: opacity 0.2s ease;
  }

  .m-header-mobile__canvas {
    display: block;
    position: fixed;
    top: 0;
    right: 0;
    height: 100dvh;
    width: min(90vw, 380px);
    transform: translateX(100%);
    transition: transform 0.2s ease;
    overflow-y: auto;
  }

  body.is-mobile-menu-open .m-header-mobile__backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  body.is-mobile-menu-open .m-header-mobile__canvas {
    transform: translateX(0);
  }

  body.is-body-frozen {
    overflow: hidden;
  }
}

/* ============================================================
   404 Page
   ============================================================ */

.error404 .wp-site-blocks {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--wp-admin--admin-bar--height, 0px));
}

@media (max-width: 991px) {
  .error404 .wp-site-blocks {
    min-height: calc(100vh - 75px - var(--wp-admin--admin-bar--height, 0px));
  }
}
/* ============================================================
   404 Page
   ============================================================ */

.error404 .wp-site-blocks {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--wp-admin--admin-bar--height, 0px));
  background-color: var(--light-grey);
}

@media (max-width: 991px) {
  .error404 .wp-site-blocks {
    min-height: calc(100vh - 75px - var(--wp-admin--admin-bar--height, 0px));
  }
}

/* .error404 .wp-site-blocks > .wp-block-group:not(.wp-block-template-part) {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
} */

.error404-content {
  display: flex;
  flex-grow: 1;
  flex-direction: column;
  align-items: center;
  color: var(--wp--preset--color--dark-grey);
}

.error404-content .error404-explanation {
  display: flex;
  flex-flow: column nowrap;
  align-items: center;
  justify-content: stretch;
}
.error404-content .error404-explanation > p {
  display: none; /* hide the extra p caused by php echo nl2br() */
}
.error404-content .wp-block-heading {
  padding-top: var(--wp--preset--spacing--60);
  padding-bottom: var(--wp--preset--spacing--60);
  margin: 0;
}

.error404-content .has-medium-font-size {
  padding-top: var(--wp--preset--spacing--40);
  padding-bottom: var(--wp--preset--spacing--40);
  margin: 0;
}

.error404-content .wp-block-group.has-medium-font-size {
  justify-content: center;
  display: flex;
}

.error404-content .wp-block-silenccio-axa-button {
  padding-top: var(--wp--preset--spacing--40);
  padding-bottom: var(--wp--preset--spacing--40);
}

.error404 .wp-site-blocks > .wp-block-group:not(.wp-block-template-part) {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.error404 .wp-site-blocks > .wp-block-group.has-medium-font-size {
  margin: 0 auto;
}
.error404 .wp-site-blocks > .wp-block-silenccio-axa-button {
  padding-top: var(--wp--preset--spacing--20);
  padding-bottom: var(--wp--preset--spacing--80);
}

.error404 .wp-block-heading {
  padding-top: var(--wp--preset--spacing--60);
  padding-bottom: var(--wp--preset--spacing--60);
}

.error404 .has-medium-font-size {
  padding-top: var(--wp--preset--spacing--40);
  padding-bottom: var(--wp--preset--spacing--40);
}

.error404 .wp-site-blocks > .wp-block-group:not(.wp-block-template-part) > .wp-block-group.has-medium-font-size {
  justify-content: center;
  display: flex;
}

.has-box-shadow > div {
  box-shadow: rgba(0, 0, 0, 0.15) 0px 0px 10px 0px;
}

.numbered-circle {
  width: 57px;
  height: 57px;
  border-radius: 50%; /* 50% is more conventional than 100% */
  box-sizing: border-box;
  flex-shrink: 0; /* prevents it from squishing in a row layout */
}

.numbered-circle > p {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  margin: 0; /* WP adds default paragraph margin */
}

/* =============================================================
   RESPONSIVE TYPOGRAPHY
   Matches design spec (screenshots):
   Publico (headings): large → small screen scale
   Source Sans Pro (body): same across all breakpoints
   Breakpoint: ≤991px (existing mobile breakpoint)
   ============================================================= */

@media (max-width: 991px) {
  /* Publico headline scale — small screen spec */
  h1,
  .wp-block-post-content h1,
  .wp-block-heading h1,
  .entry-content h1 {
    font-size: 48px !important;
    line-height: 56px !important;
  }

  h2,
  .wp-block-post-content h2,
  .wp-block-heading h2,
  .entry-content h2 {
    font-size: 40px !important;
    line-height: 48px !important;
  }

  h3,
  .wp-block-post-content h3,
  .wp-block-post-content .hero-cta > h2,
  .wp-block-heading h3,
  .entry-content h3 {
    font-size: 32px !important;
    line-height: 40px !important;
  }

  h4,
  .wp-block-post-content h4,
  .wp-block-heading h4,
  .entry-content h4 {
    font-size: 24px !important;
    line-height: 32px !important;
  }

  h5,
  .wp-block-post-content h5,
  .wp-block-heading h5,
  .entry-content h5 {
    font-size: 24px !important;
    line-height: 32px !important;
  }

  h6,
  .wp-block-post-content h6,
  .wp-block-heading h6,
  .entry-content h6 {
    font-size: 24px !important;
    line-height: 32px !important;
  }

  /* Section padding — reduce from desktop values */
  .wp-block-post-content > .wp-block-group {
    padding-left: var(--wp--preset--spacing--40) !important;
    padding-right: var(--wp--preset--spacing--40) !important;
  }
}

/* Extra breakpoint for small phones — scale down further */
@media (max-width: 480px) {
  h1,
  .wp-block-post-content h1,
  .wp-block-heading h1,
  .entry-content h1 {
    font-size: 36px !important;
    line-height: 44px !important;
  }

  h2,
  .wp-block-post-content h2,
  .wp-block-heading h2,
  .entry-content h2 {
    font-size: 28px !important;
    line-height: 36px !important;
  }

  h3,
  .wp-block-post-content h3,
  .wp-block-post-content .hero-cta > h2,
  .wp-block-heading h3,
  .entry-content h3 {
    font-size: 24px !important;
    line-height: 32px !important;
  }

  h4,
  .wp-block-post-content h4,
  .wp-block-heading h4,
  .entry-content h4,
  h5,
  .wp-block-post-content h5,
  .wp-block-heading h5,
  .entry-content h5,
  h6,
  .wp-block-post-content h6,
  .wp-block-heading h6,
  .entry-content h6 {
    font-size: 20px !important;
    line-height: 28px !important;
  }

  /* Tighter section padding on small phones */
  .wp-block-post-content > .wp-block-group {
    padding-left: var(--wp--preset--spacing--30) !important;
    padding-right: var(--wp--preset--spacing--30) !important;
  }
}
