/* ===== LogicalDOC ES · Gestión documental (articolo 192) ===== */
.ldgd-cream { background: #FFF4EC; }
.ldgd-accent { color: #B4500A; }
.ldgd-featured { box-shadow: inset 0 0 0 2px #F47920; }
.ldgd-step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  border: 2px solid #B4500A; color: #B4500A; font-weight: 700;
}

/* Spunte della lista: in CSS, perché l'editor elimina gli <span uk-icon> vuoti */
.ldgd-check { list-style: none; padding-left: 0; }
.ldgd-check li { position: relative; padding-left: 30px; }
.ldgd-check li::before {
  content: ""; position: absolute; left: 2px; top: .45em;
  width: 7px; height: 13px;
  border: solid #B4500A; border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

/* Video con pulsante play in CSS (lo span vuoto .ldgd-play veniva eliminato) */
.ldgd-video { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 12px; background: #1B2638; }
.ldgd-video img { display: block; width: 100%; height: 100%; object-fit: cover; opacity: .85; transition: opacity .2s; }
.ldgd-video::before {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 84px; height: 84px; margin: -42px 0 0 -42px; border-radius: 50%;
  background: #B4500A; transition: transform .15s;
}
.ldgd-video::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  margin: -14px 0 0 -8px;
  border-style: solid; border-width: 14px 0 14px 24px;
  border-color: transparent transparent transparent #fff;
}
.ldgd-video:hover img { opacity: 1; }
.ldgd-video:hover::before, .ldgd-video:focus-visible::before { transform: scale(1.08); }

.ldgd-meta-table th { width: 45%; }

/* FAQ: separatori tra le domande */
.ldgd-faq > li { padding-bottom: 20px; border-bottom: 1px solid #e5e5e5; }

/* Sezioni a tutta larghezza dentro l'articolo (senza sidebar) */
.ldgd > .uk-section {
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}
html { overflow-x: hidden; }

/* Toglie lo spazio bianco che il tema mette sopra e sotto l'articolo */
.tm-main:has(.ldgd) { padding-top: 0; padding-bottom: 0; }
.uk-article [property="text"]:has(> .ldgd) { margin-top: 0 !important; }
.ldgd { margin-top: 0; }

/* Hero: immagine cliccabile con lightbox e icona lente */
.ldgd-zoom { position: relative; display: block; cursor: zoom-in; }
.ldgd-zoom img { display: block; width: 100%; height: auto; transition: transform .2s; }
.ldgd-zoom::after {
  content: ""; position: absolute; right: 14px; bottom: 14px;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(27,38,56,.8) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5 21 21M10.5 7.5v6M7.5 10.5h6'/%3E%3C/svg%3E") center / 22px no-repeat;
  transition: background-color .2s;
}
.ldgd-zoom:hover::after, .ldgd-zoom:focus-visible::after { background-color: #B4500A; }
.ldgd-zoom:hover img { transform: scale(1.01); }

/* Lightbox: pulsante di chiusura sempre visibile anche sopra immagini chiare */
body:has(.ldgd) .uk-lightbox .uk-close,
body:has(.ldgd) .uk-lightbox [uk-close],
body:has(.ldgd) .uk-lightbox .uk-lightbox-close {
  width: 44px; height: 44px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(27,38,56,.85) !important;
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(0,0,0,.35);
  opacity: 1;
  transition: background-color .2s;
}
body:has(.ldgd) .uk-lightbox .uk-close:hover,
body:has(.ldgd) .uk-lightbox [uk-close]:hover,
body:has(.ldgd) .uk-lightbox .uk-lightbox-close:hover { background: #B4500A !important; }
body:has(.ldgd) .uk-lightbox .uk-close svg { width: 18px; height: 18px; }
/* La barra in alto non scompare quando il mouse è fermo */
body:has(.ldgd) .uk-lightbox-toolbar.uk-transition-slide-top,
body:has(.ldgd) .uk-lightbox .uk-position-top { opacity: 1 !important; transform: none !important; background: none; }


/* ===== Estetica card (ispirata a logicaldoc.it/soluzioni/gestione-documentale) ===== */
.ldgd .uk-card-default {
  background: #fff;
  border: 1px solid #E4E8EF;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(16,24,40,.04);
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.ldgd .uk-card-default:hover {
  border-color: #F4B48A;
  box-shadow: 0 10px 24px rgba(16,24,40,.08);
  transform: translateY(-2px);
}
.ldgd .uk-card-default.ldgd-featured { border-color: #F47920; box-shadow: 0 0 0 1px #F47920; }
.ldgd .uk-card-default .uk-card-title { font-size: 1.15rem; font-weight: 600; }
.ldgd .ldgd-cream { border-radius: 12px; border: 1px solid #F8DCC6; }

/* Funcionalidades: icona in alto in ogni card */
.ldgd-features .uk-card-default::before {
  content: ""; display: block; width: 44px; height: 44px; margin-bottom: 16px;
  border-radius: 10px; background: #FFF4EC center / 24px no-repeat;
}
.ldgd-features .uk-grid > div:nth-child(1) .uk-card-default::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B4500A' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 7V5a2 2 0 0 1 2-2h2M17 3h2a2 2 0 0 1 2 2v2M21 17v2a2 2 0 0 1-2 2h-2M7 21H5a2 2 0 0 1-2-2v-2M7 12h10'/%3E%3C/svg%3E"); }
.ldgd-features .uk-grid > div:nth-child(2) .uk-card-default::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B4500A' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cellipse cx='12' cy='5' rx='9' ry='3'/%3E%3Cpath d='M21 12c0 1.66-4 3-9 3s-9-1.34-9-3M3 5v14c0 1.66 4 3 9 3s9-1.34 9-3V5'/%3E%3C/svg%3E"); }
.ldgd-features .uk-grid > div:nth-child(3) .uk-card-default::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B4500A' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82z'/%3E%3Ccircle cx='7' cy='7' r='1'/%3E%3C/svg%3E"); }
.ldgd-features .uk-grid > div:nth-child(4) .uk-card-default::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B4500A' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='M21 21l-4.35-4.35'/%3E%3C/svg%3E"); }
.ldgd-features .uk-grid > div:nth-child(5) .uk-card-default::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B4500A' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12a9 9 0 1 0 3-6.7L3 8M3 3v5h5M12 7v5l3 3'/%3E%3C/svg%3E"); }
.ldgd-features .uk-grid > div:nth-child(6) .uk-card-default::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B4500A' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E"); }
.ldgd-features .uk-grid > div:nth-child(7) .uk-card-default::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B4500A' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3v12'/%3E%3Ccircle cx='18' cy='6' r='3'/%3E%3Ccircle cx='6' cy='18' r='3'/%3E%3Cpath d='M18 9a9 9 0 0 1-9 9'/%3E%3C/svg%3E"); }
.ldgd-features .uk-grid > div:nth-child(8) .uk-card-default::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B4500A' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6h11M9 12h11M9 18h11M4 6h.01M4 12h.01M4 18h.01'/%3E%3C/svg%3E"); }
.ldgd-features .uk-grid > div:nth-child(9) .uk-card-default::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B4500A' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M23 21v-2a4 4 0 0 0-3-3.87M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E"); }
.ldgd-features .uk-grid > div:nth-child(10) .uk-card-default::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B4500A' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 8v13H3V8M1 3h22v5H1zM10 12h4'/%3E%3C/svg%3E"); }
.ldgd-features .uk-grid > div:nth-child(11) .uk-card-default::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B4500A' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71'/%3E%3C/svg%3E"); }
.ldgd-features .uk-grid > div:nth-child(12) .uk-card-default::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B4500A' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='2' width='14' height='20' rx='2'/%3E%3Cpath d='M12 18h.01'/%3E%3C/svg%3E"); }

/* Colaborar: passaggi collegati da una linea */
.ldgd .uk-card-default:has(.ldgd-step-num) { padding-top: 28px; }
.ldgd .ldgd-step-num { background: #FFF4EC; }
@media (min-width: 960px) {
  .ldgd .uk-grid > div:not(:last-child) > .uk-card-default:has(.ldgd-step-num)::after {
    content: ""; position: absolute; top: 46px; left: 100%; width: 15px;
    border-top: 2px dashed #F4B48A;
  }
}

/* Ventajas: ogni vantaggio in un box con spunta */
.ldgd-benefit {
  position: relative; height: 100%; box-sizing: border-box;
  padding: 24px 24px 24px 72px;
  border: 1px solid rgba(255,255,255,.14); border-radius: 12px;
  background: rgba(255,255,255,.05);
  transition: background-color .2s, border-color .2s;
}
.ldgd-benefit:hover { background: rgba(255,255,255,.09); border-color: rgba(244,121,32,.6); }
.ldgd-benefit::before {
  content: ""; position: absolute; left: 24px; top: 24px;
  width: 32px; height: 32px; border-radius: 50%;
  background: #F47920 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center / 16px no-repeat;
}

/* LogicalDOC solution pages (.ldgd) – phone tweaks (< 640px)
   YOOtheme Pro: Customizer > Advanced > Custom CSS (or the template custom CSS file) */
@media (max-width: 639px) {
  /* side margins: the article sits inside the template's container, so UIkit's
     ".uk-container .uk-container { padding: 0 }" rule removes them entirely */
  .ldgd .uk-container { padding-left: 24px !important; padding-right: 24px !important; }
  .ldgd .uk-heading-small { font-size: 2rem; line-height: 1.2; }
  .ldgd h2, .ldgd .uk-h2 { font-size: 1.55rem; line-height: 1.25; }
  .ldgd h3.uk-h3, .ldgd .uk-h3 { font-size: 1.3rem; }
  .ldgd .uk-text-lead { font-size: 1.15rem; line-height: 1.5; }
  .ldgd .uk-section { padding-top: 40px; padding-bottom: 40px; }
  .ldgd .uk-card-body { padding: 20px; }
  .ldgd .uk-card-title { font-size: 1.1rem; }
  .ldgd .uk-list-large > li:nth-child(n+2) { margin-top: 12px; }
  .ldgd nav .uk-subnav { margin-left: -24px !important; margin-right: -24px !important; padding: 0 24px; }
  .ldgd nav .uk-subnav::-webkit-scrollbar { display: none; }
  .ldgd .ldgd-meta-table th { white-space: nowrap; }
}
