/*
 * WordPress-side styles for the Webora Plus theme: skip link, blog article body (Elementor content),
 * generic pages and small WordPress defaults. Colours and type match assets/css/site.css.
 */

:root {
  --wp-ink: #140b2e;
  --wp-cream: #fcfbff;
  --wp-violet: #7c3aed;
  --wp-lilac: #d8ccff;
  --wp-plum: #4c1d95;
}

.contents {
  display: contents;
}

/* Skip link */
a[href="#contenuto"] {
  position: absolute;
  left: -9999px;
}
a[href="#contenuto"]:focus {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 200;
  border-radius: 9999px;
  background: var(--wp-ink);
  color: var(--wp-cream);
  padding: 0.75rem 1.25rem;
}

/* Admin bar offset for the fixed header */
.admin-bar [data-navbar] {
  top: 32px;
}
@media (max-width: 782px) {
  .admin-bar [data-navbar] {
    top: 46px;
  }
}

/* ------------------------------------------------------------------ article body (Elementor) */
.webora-post-body {
  --wb-section-gap: 3rem;
}
.webora-post-body .elementor {
  --e-con-gap: 0;
}
.webora-post-body .e-con,
.webora-post-body .e-con-inner,
.webora-post-body .elementor-section .elementor-container,
.webora-post-body .elementor-column > .elementor-widget-wrap {
  --padding-top: 0;
  --padding-right: 0;
  --padding-bottom: 0;
  --padding-left: 0;
  --margin-top: 0;
  --margin-bottom: 0;
  padding: 0 !important;
  max-width: none !important;
}
.webora-post-body .e-con {
  --gap: 1.25rem;
  --row-gap: 1.25rem;
  --widgets-spacing: 1.25rem;
  gap: 1.25rem;
}
.webora-post-body .elementor > .e-con + .e-con,
.webora-post-body .elementor > .elementor-element + .elementor-element {
  margin-top: var(--wb-section-gap) !important;
}
.webora-post-body .elementor-widget:not(:last-child) {
  margin-bottom: 0;
}
.webora-post-body .elementor-widget-container > *:first-child {
  margin-top: 0;
}
.webora-post-body .elementor-widget-container > *:last-child {
  margin-bottom: 0;
}

/* Headings */
.webora-post-body h2,
.webora-post-body .elementor-heading-title.elementor-size-default {
  font-family: var(--font-bricolage), system-ui, sans-serif;
  color: var(--wp-ink);
  font-weight: 500;
  letter-spacing: -0.025em;
  font-size: 1.875rem;
  line-height: 1.2;
  margin: 0;
}
@media (min-width: 768px) {
  .webora-post-body h2,
  .webora-post-body .elementor-heading-title.elementor-size-default {
    font-size: 2.25rem;
    line-height: 1.12;
  }
}
.webora-post-body h3 {
  font-family: var(--font-bricolage), system-ui, sans-serif;
  color: var(--wp-ink);
  font-weight: 500;
  letter-spacing: -0.025em;
  font-size: 1.25rem;
  line-height: 1.4;
  padding-top: 1rem;
  margin: 0;
}
@media (min-width: 768px) {
  .webora-post-body h3 {
    font-size: 1.5rem;
  }
}

/* Text */
.webora-post-body .elementor-widget-text-editor,
.webora-post-body .elementor-widget-html {
  color: rgba(20,11,46, 0.75);
  font-size: inherit;
  line-height: inherit;
}
.webora-post-body .elementor-widget-text-editor .elementor-widget-container > * + *,
.webora-post-body .elementor-widget-text-editor > * + * {
  margin-top: 1.25rem;
}
.webora-post-body p {
  margin: 0;
}
.webora-post-body a {
  text-decoration: underline;
  text-decoration-color: rgba(124,58,237, 0.5);
  text-underline-offset: 4px;
}
.webora-post-body a:hover {
  text-decoration-color: var(--wp-violet);
}
.webora-post-body strong {
  color: var(--wp-ink);
  font-weight: 500;
}
.webora-post-body .webora-note {
  font-size: 0.875rem;
  color: rgba(20,11,46, 0.6);
}

/* Bullet list: hairline rows with an orange dot */
.webora-post-body ul {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid rgba(20,11,46, 0.1);
  border-bottom: 1px solid rgba(20,11,46, 0.1);
}
.webora-post-body ul > li {
  position: relative;
  padding: 0.75rem 0 0.75rem 1.125rem;
}
.webora-post-body ul > li + li {
  border-top: 1px solid rgba(20,11,46, 0.1);
}
.webora-post-body ul > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: calc(0.75rem + 0.625rem);
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 9999px;
  background: var(--wp-violet);
}

/* Numbered list: 01, 02 ... in mono orange */
.webora-post-body ol {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: wb;
}
.webora-post-body ol > li {
  counter-increment: wb;
  position: relative;
  padding-left: 2.5rem;
}
.webora-post-body ol > li + li {
  margin-top: 0.75rem;
}
.webora-post-body ol > li::before {
  content: counter(wb, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0.15em;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.875rem;
  color: var(--wp-violet);
}

/* Tables */
.webora-post-body figure.webora-table,
.webora-post-body .webora-table {
  overflow-x: auto;
  margin: 0;
}
.webora-post-body table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
  line-height: 1.5;
}
.webora-post-body table caption {
  caption-side: top;
  margin-bottom: 0.5rem;
  text-align: left;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  color: rgba(20,11,46, 0.6);
}
.webora-post-body thead tr {
  border-bottom: 1px solid rgba(20,11,46, 0.2);
}
.webora-post-body th {
  padding: 0.5rem 1rem 0.5rem 0;
  font-weight: 500;
  color: var(--wp-ink);
  border: 0;
  background: none;
}
.webora-post-body tbody tr {
  border-bottom: 1px solid rgba(20,11,46, 0.1);
  vertical-align: top;
}
.webora-post-body td {
  padding: 0.75rem 1rem 0.75rem 0;
  color: rgba(20,11,46, 0.7);
  border: 0;
  background: none;
}
.webora-post-body td:first-child {
  font-weight: 500;
  color: var(--wp-ink);
}
.webora-post-body figcaption {
  margin-top: 0.75rem;
  font-size: 0.75rem;
  line-height: 1.6;
  color: rgba(20,11,46, 0.6);
}

/* Summary box ("Cosa trovi in questa guida") */
.webora-post-body .webora-takeaways {
  border: 1px solid rgba(20,11,46, 0.1);
  background: rgba(255, 255, 255, 0.6);
  border-radius: 1rem;
  padding: 1.5rem;
}
.webora-post-body .webora-takeaways .webora-box-title {
  font-family: var(--font-bricolage), system-ui, sans-serif;
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--wp-ink);
}
.webora-post-body .webora-takeaways ul {
  border: 0;
  margin-top: 0.75rem;
}
.webora-post-body .webora-takeaways ul > li {
  padding: 0 0 0 1.125rem;
  border: 0;
}
.webora-post-body .webora-takeaways ul > li + li {
  margin-top: 0.5rem;
  border: 0;
}
.webora-post-body .webora-takeaways ul > li::before {
  top: 0.625rem;
}

/* Callout */
.webora-post-body .webora-callout {
  border: 1px solid rgba(124,58,237, 0.3);
  background: rgba(216,204,255, 0.1);
  border-radius: 1rem;
  padding: 1.5rem;
}
.webora-post-body .webora-callout .webora-box-title {
  font-family: var(--font-bricolage), system-ui, sans-serif;
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--wp-ink);
}
.webora-post-body .webora-callout .webora-box-title + p {
  margin-top: 0.5rem;
}

/* "What to do next" dark card */
.webora-post-body .webora-donext {
  background: var(--wp-ink);
  color: var(--wp-cream);
  border-radius: 1rem;
  padding: 2rem;
}
.webora-post-body .webora-donext h2 {
  color: var(--wp-cream);
  font-size: 1.5rem;
  line-height: 1.33;
}
.webora-post-body .webora-donext p {
  margin-top: 0.75rem;
  color: rgba(255, 250, 246, 0.75);
}
.webora-post-body .webora-donext .webora-button {
  margin-top: 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 9999px;
  background: var(--wp-lilac);
  color: var(--wp-ink);
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.3s;
}
.webora-post-body .webora-donext .webora-button:hover {
  background: var(--wp-cream);
}

/* FAQ (details/summary inside an HTML widget) */
.webora-post-body details {
  border: 1px solid rgba(20,11,46, 0.1);
  background: rgba(255, 255, 255, 0.7);
  border-radius: 1rem;
  padding: 1rem 1.25rem;
  transition: border-color 0.3s, background-color 0.3s;
}
.webora-post-body details + details {
  margin-top: 0.75rem;
}
.webora-post-body details[open] {
  border-color: rgba(124,58,237, 0.4);
  background: #fff;
}
@media (min-width: 768px) {
  .webora-post-body details {
    padding: 1.25rem 1.75rem;
  }
}
.webora-post-body summary {
  display: flex;
  cursor: pointer;
  list-style: none;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--wp-ink);
}
@media (min-width: 768px) {
  .webora-post-body summary {
    font-size: 1.125rem;
  }
}
.webora-post-body summary::-webkit-details-marker {
  display: none;
}
.webora-post-body summary::after {
  content: "+";
  display: flex;
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  border: 1px solid rgba(20,11,46, 0.15);
  font-size: 1.125rem;
  font-weight: 400;
  transition: all 0.3s;
}
.webora-post-body details[open] summary::after {
  content: "−";
  border-color: var(--wp-violet);
  background: var(--wp-violet);
  color: #fff;
}
.webora-post-body details > p {
  margin-top: 0.75rem;
  max-width: 48rem;
  padding-right: 2.5rem;
  color: rgba(20,11,46, 0.65);
}

/* ------------------------------------------------------------------ generic pages */
.webora-prose {
  color: rgba(20,11,46, 0.7);
  line-height: 1.7;
}
.webora-prose > * + * {
  margin-top: 1rem;
}
.webora-prose h2 {
  font-family: var(--font-bricolage), system-ui, sans-serif;
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--wp-ink);
  margin-top: 2.5rem;
}
.webora-prose a {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.webora-prose ul {
  list-style: disc;
  padding-left: 1.25rem;
}

/* WordPress core bits */
.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

/* Sources list under the article */
.webora-post-body .webora-sources ul {
  border: 0;
  font-size: 0.875rem;
}
.webora-post-body .webora-sources ul > li {
  padding: 0.25rem 0 0.25rem 1.125rem;
  border: 0;
}
.webora-post-body .webora-sources ul > li::before {
  top: calc(0.25rem + 0.55rem);
}
/* Plain (non-Elementor) fallback spacing */
.webora-post-body > * + * {
  margin-top: 1.25rem;
}
.webora-post-body > * + h2,
.webora-post-body > * + aside,
.webora-post-body > * + section {
  margin-top: var(--wb-section-gap);
}
