/*
Theme Name: Biblioteca Stigliani
Description: Child theme per il sito Biblioteca Stigliani basato su Design Comuni Italia.
Author: Biblioteca Stigliani
Template: design-comuni-wordpress-theme
Version: 0.1.6
Text Domain: biblioteca-stigliani
*/

:root {
  --bs-primary: #17324d;
  --bs-primary-rgb: 23, 50, 77;
  --bs-link-color: #005eab;
  --bs-link-hover-color: #003f80;
  --stigliani-blue: #005eab;
  --stigliani-blue-deep: #17324d;
  --stigliani-warm: #9f6b36;
  --stigliani-warm-light: #f4ece3;
  --stigliani-surface: #f5f7fa;
  --stigliani-surface-strong: #eef4fa;
  --stigliani-ink: #17324d;
  --stigliani-muted: #5d7083;
  --stigliani-yellow: #ffcc00;
  --stigliani-yellow-hover: #e6b800;
  --stigliani-card-border: #d8e5f0;
  --stigliani-shadow-sm: 0 0.25rem 0.75rem rgba(23, 50, 77, 0.08);
  --stigliani-shadow-md: 0 1rem 2.5rem rgba(23, 50, 77, 0.12);
  --stigliani-shadow-lg: 0 1.5rem 4rem rgba(23, 50, 77, 0.18);
}

html {
  scroll-behavior: auto;
}

body {
  background:
    linear-gradient(180deg, #f8fbfd 0, #fff 22rem),
    #fff;
  color: #1b1f23;
  text-rendering: optimizeLegibility;
}

main {
  overflow: hidden;
}

body.page .cmp-hero,
body.page .cmp-breadcrumbs {
  display: none;
}

.article-wrapper .stigliani-hero,
.article-wrapper .stigliani-section {
  margin-left: calc(50% - 50vw);
  width: 100vw;
}

.it-header-slim-wrapper {
  background: var(--stigliani-blue-deep) !important;
}

.it-header-center-wrapper {
  background: var(--stigliani-blue) !important;
  box-shadow: 0 0.5rem 1.5rem rgba(23, 50, 77, 0.14);
}

.it-header-navbar-wrapper,
.it-header-wrapper .it-nav-wrapper .it-header-navbar-wrapper,
.it-header-wrapper .navbar,
.it-header-wrapper .navbar .navbar-collapsable,
.it-header-wrapper .navbar .navbar-collapsable .menu-wrapper,
.it-header-wrapper .navbar .navbar-collapsable .navbar-nav {
  background: var(--stigliani-blue) !important;
}

.it-header-navbar-wrapper {
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.it-header-wrapper .navbar .navbar-collapsable .navbar-nav li a.nav-link,
.it-header-wrapper .navbar .navbar-collapsable .navbar-nav li a.nav-link span {
  color: #fff !important;
  font-weight: 700;
}

.it-header-wrapper .navbar .navbar-collapsable .navbar-nav li a.nav-link {
  border-radius: 4px 4px 0 0;
  margin-inline: 0.05rem;
  min-height: 48px;
}

.it-header-wrapper .navbar .navbar-collapsable .navbar-nav li a.nav-link:hover,
.it-header-wrapper .navbar .navbar-collapsable .navbar-nav li a.nav-link:focus {
  background: var(--stigliani-blue-deep) !important;
  box-shadow: inset 0 -4px 0 var(--stigliani-yellow);
  color: #fff !important;
}

.it-header-wrapper li:has(> a[href*="/argomento/"]),
.it-header-wrapper li:has(> a[data-element="all-topics"]) {
  display: none !important;
}

.it-header-wrapper li:has(> a[href*="/prenota-chiedi-supporto/"]) {
  display: none !important;
}

.cmp-rating,
[data-element="feedback"],
main > .bg-primary:has(.cmp-rating) {
  display: none !important;
}

.btn-primary,
.btn-primary.disabled,
.btn-primary:disabled {
  background-color: var(--stigliani-yellow) !important;
  border-color: var(--stigliani-yellow) !important;
  box-shadow: 0 0.5rem 1.2rem rgba(23, 50, 77, 0.14);
  color: var(--stigliani-blue-deep) !important;
  font-weight: 700;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary:not(:disabled):not(.disabled):active {
  background-color: var(--stigliani-yellow-hover) !important;
  border-color: var(--stigliani-yellow-hover) !important;
  color: var(--stigliani-blue-deep) !important;
}

.btn-outline-primary {
  background: #fff;
  border-color: var(--stigliani-blue);
  color: var(--stigliani-blue);
  font-weight: 700;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background-color: var(--stigliani-blue);
  border-color: var(--stigliani-blue);
  color: #fff;
}

.stigliani-hero {
  background:
    linear-gradient(115deg, rgba(23, 50, 77, 0.98) 0%, rgba(0, 94, 171, 0.94) 58%, rgba(0, 94, 171, 0.78) 100%),
    #17324d;
  color: #fff;
  isolation: isolate;
  min-height: clamp(360px, 48vw, 560px);
  padding-block: clamp(4rem, 8vw, 7rem);
  position: relative;
}

.stigliani-hero::before,
.stigliani-hero::after {
  content: "";
  pointer-events: none;
  position: absolute;
  z-index: -1;
}

.stigliani-hero::before {
  background:
    linear-gradient(135deg, rgba(255, 204, 0, 0.26), rgba(255, 204, 0, 0)),
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0));
  clip-path: polygon(62% 0, 100% 0, 100% 100%, 45% 100%);
  inset: 0;
}

.stigliani-hero::after {
  background: rgba(255, 255, 255, 0.14);
  bottom: 2rem;
  height: 8px;
  left: max(1rem, calc((100vw - 1140px) / 2));
  width: min(7rem, 35vw);
}

.stigliani-kicker {
  color: var(--stigliani-blue);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.stigliani-hero .stigliani-kicker {
  color: #d7e8f8;
}

.stigliani-hero h1,
.stigliani-hero h2 {
  font-weight: 800;
  max-width: 52rem;
}

.stigliani-hero .lead {
  color: #f5f7fa;
  font-size: clamp(1.125rem, 2vw, 1.35rem);
  max-width: 58rem;
}

.stigliani-hero .btn {
  min-height: 48px;
  padding-inline: 1.2rem;
}

.stigliani-hero .btn-outline-primary {
  background: transparent;
  box-shadow: inset 0 0 0 2px #fff;
  color: #fff;
}

.stigliani-hero .btn-outline-primary:hover,
.stigliani-hero .btn-outline-primary:focus {
  background: #fff;
  color: var(--stigliani-blue-deep);
}

.stigliani-card {
  background: #fff;
  border: 1px solid var(--stigliani-card-border);
  border-radius: 8px;
  box-shadow: var(--stigliani-shadow-sm);
  height: 100%;
  overflow: hidden;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.stigliani-card:hover {
  border-color: rgba(0, 94, 171, 0.35);
  box-shadow: var(--stigliani-shadow-md);
  transform: translateY(-3px);
}

.stigliani-card .card-body {
  padding: clamp(1.25rem, 2.4vw, 1.75rem);
}

.stigliani-card .card-title {
  color: var(--stigliani-ink);
}

.stigliani-band {
  background:
    linear-gradient(180deg, var(--stigliani-surface) 0%, #fff 100%);
  border-block: 1px solid #e4edf5;
}

.stigliani-section {
  padding-block: clamp(3.5rem, 6vw, 5.75rem);
}

.stigliani-section > .container > h2 {
  color: var(--stigliani-blue-deep);
  font-size: clamp(1.75rem, 3vw, 2.45rem);
  font-weight: 800;
  margin-bottom: 1rem;
  max-width: 52rem;
}

.stigliani-section > .container > p {
  color: var(--stigliani-muted);
  font-size: 1.05rem;
  max-width: 54rem;
}

.stigliani-quick-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stigliani-service-tile {
  background:
    linear-gradient(180deg, #fff 0%, #fbfdff 100%);
  border: 1px solid var(--stigliani-card-border);
  border-radius: 8px;
  box-shadow: var(--stigliani-shadow-sm);
  display: flex;
  flex-direction: column;
  min-height: 230px;
  padding: clamp(1.25rem, 2vw, 1.75rem);
  position: relative;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.stigliani-service-tile::before {
  background: var(--stigliani-yellow);
  border-radius: 999px;
  content: "";
  height: 5px;
  left: 1.5rem;
  position: absolute;
  top: 1rem;
  width: 44px;
}

.stigliani-service-tile:hover {
  border-color: rgba(0, 94, 171, 0.35);
  box-shadow: var(--stigliani-shadow-md);
  transform: translateY(-3px);
}

.stigliani-service-tile h3 {
  color: var(--stigliani-blue-deep);
  font-size: 1.25rem;
  font-weight: 800;
  margin-top: 0.85rem;
}

.stigliani-service-tile p {
  color: #394b5c;
  flex: 1;
}

.stigliani-service-tile .read-more,
.stigliani-card .read-more,
.stigliani-project-panel .read-more {
  align-items: center;
  color: var(--stigliani-blue);
  display: inline-flex;
  font-weight: 800;
  gap: 0.35rem;
  text-decoration: none;
}

.stigliani-service-tile .read-more::after,
.stigliani-card .read-more::after,
.stigliani-project-panel .read-more::after {
  content: ">";
  line-height: 1;
}

.stigliani-service-tile .read-more:hover,
.stigliani-service-tile .read-more:focus,
.stigliani-card .read-more:hover,
.stigliani-card .read-more:focus,
.stigliani-project-panel .read-more:hover,
.stigliani-project-panel .read-more:focus {
  color: var(--stigliani-blue-deep);
  text-decoration: underline;
}

.stigliani-callout {
  background:
    linear-gradient(135deg, #fff8d6 0%, #fff 72%);
  border: 1px solid rgba(255, 204, 0, 0.65);
  border-left: 8px solid var(--stigliani-yellow);
  border-radius: 8px;
  box-shadow: var(--stigliani-shadow-sm);
  padding: clamp(1.5rem, 4vw, 2.5rem);
}

.stigliani-project-panel {
  background:
    linear-gradient(145deg, #fff 0%, #f7fbff 100%);
  border: 1px solid var(--stigliani-card-border);
  border-top: 6px solid var(--stigliani-blue);
  border-radius: 8px;
  box-shadow: var(--stigliani-shadow-md);
  padding: clamp(1.5rem, 4vw, 2.5rem);
}

.stigliani-fixed-support {
  bottom: 1.25rem;
  position: fixed;
  right: 1.25rem;
  z-index: 1030;
}

.stigliani-fixed-support .btn {
  border-radius: 999px;
  box-shadow: var(--stigliani-shadow-lg);
  font-weight: 700;
  min-height: 48px;
  padding-inline: 1.4rem;
}

.it-footer {
  background:
    linear-gradient(180deg, var(--stigliani-blue-deep) 0%, #0f263a 100%);
}

.stigliani-footer-main {
  color: #fff;
  padding-block: clamp(3rem, 5vw, 4rem);
}

.stigliani-footer-main a {
  color: #fff;
  text-decoration: underline;
}

.stigliani-footer-brand {
  align-items: center;
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}

.stigliani-footer-logo {
  background: var(--stigliani-yellow);
  border-radius: 6px;
  color: var(--stigliani-blue-deep);
  display: grid;
  font-weight: 800;
  height: 56px;
  place-items: center;
  width: 56px;
}

.stigliani-footer-main h2,
.stigliani-footer-main h3 {
  color: #fff;
}

.stigliani-footer-main h3 {
  font-size: 1.125rem;
}

.stigliani-footer-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.stigliani-footer-list li + li {
  margin-top: 0.35rem;
}

.stigliani-footer-small {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  color: #d7e8f8;
  font-size: 0.875rem;
  padding-block: 1rem;
}

@media (max-width: 991.98px) {
  .stigliani-quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stigliani-hero {
    min-height: 0;
  }
}

@media (max-width: 575.98px) {
  .stigliani-hero {
    padding-block: 3rem;
  }

  .stigliani-quick-grid {
    grid-template-columns: 1fr;
  }

  .stigliani-fixed-support {
    bottom: 0.75rem;
    left: 0.75rem;
    right: 0.75rem;
  }

  .stigliani-fixed-support .btn {
    width: 100%;
  }
}

a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus,
[tabindex]:focus {
  outline: 3px solid #ffcc00;
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
