/**
 * 24H Content Widgets — Frontend Styles
 *
 * All rules scoped under .fc-widget to prevent
 * interference with header, footer, sidebar, or Elementor components.
 *
 * Mobile-first with breakpoint at 768px.
 *
 * @package 24H_Content_Widgets
 */

/* ═══════════════════════════════════════════════════════════════════
   Brand tokens
   ═══════════════════════════════════════════════════════════════════ */

.fc-widget {
  --fc-dark-blue: #022D53;
  --fc-blue: #0761AF;
  --fc-light-blue: #E4F1FC;
  --fc-gold: #FFC850;
  --fc-text: #212529;
  --fc-text-light: #6c757d;
  --fc-bg-light: #F5F7FA;
  --fc-border: #DEE2E6;
  --fc-success: #16A34A;
  --fc-danger: #DC2626;
  --fc-radius: 8px;
  --fc-shadow: 0 1px 3px rgba(2, 45, 83, 0.08);
  font-family: 'Source Sans 3', system-ui, -apple-system, sans-serif;
  margin: 2rem 0;
  color: var(--fc-text);
  line-height: 1.6;
  box-sizing: border-box;
}

.fc-widget *,
.fc-widget *::before,
.fc-widget *::after {
  box-sizing: inherit;
}


/* ═══════════════════════════════════════════════════════════════════
   FAQ Accordion
   ═══════════════════════════════════════════════════════════════════ */

.fc-faq {
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius);
  overflow: hidden;
  box-shadow: var(--fc-shadow);
}

.fc-faq__title {
  margin: 0;
  padding: 1rem 1.25rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--fc-dark-blue);
  background: var(--fc-bg-light);
  border-bottom: 1px solid var(--fc-border);
}

.fc-faq__list {
  margin: 0;
  padding: 0;
}

.fc-faq__item {
  border-bottom: 1px solid var(--fc-border);
}

.fc-faq__item:last-child {
  border-bottom: none;
}

.fc-faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1.25rem;
  font-weight: 600;
  font-size: 1rem;
  color: var(--fc-dark-blue);
  cursor: pointer;
  list-style: none;
  transition: background-color 0.15s ease;
}

.fc-faq__q:hover {
  background: var(--fc-bg-light);
}

/* Remove default marker */
.fc-faq__q::-webkit-details-marker {
  display: none;
}

.fc-faq__q::marker {
  content: '';
}

/* Chevron */
.fc-faq__q::after {
  content: '';
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid var(--fc-blue);
  border-bottom: 2px solid var(--fc-blue);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  flex-shrink: 0;
  margin-left: 1rem;
}

.fc-faq__item[open] > .fc-faq__q::after {
  transform: rotate(-135deg);
}

.fc-faq__a {
  padding: 0 1.25rem 1rem;
  color: var(--fc-text);
  font-size: 0.95rem;
}

.fc-faq__a > div {
  margin: 0;
}


/* ═══════════════════════════════════════════════════════════════════
   Table
   ═══════════════════════════════════════════════════════════════════ */

.fc-table {
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius);
  overflow: hidden;
  box-shadow: var(--fc-shadow);
  padding: 0;
}

.fc-table__caption {
  padding: 0.75rem 1rem;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--fc-dark-blue);
  background: var(--fc-bg-light);
  border-bottom: 1px solid var(--fc-border);
}

.fc-table__scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.fc-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.fc-table th,
.fc-table td {
  padding: 0.625rem 0.875rem;
  text-align: left;
  vertical-align: top;
  border: none;
}

.fc-table thead th {
  font-weight: 700;
  color: #fff;
  background: var(--fc-dark-blue);
  white-space: nowrap;
}

/* Striped variant */
.fc-table--striped tbody tr:nth-child(even) {
  background: var(--fc-bg-light);
}

/* Bordered variant */
.fc-table--bordered th,
.fc-table--bordered td {
  border: 1px solid var(--fc-border);
}

/* Plain variant — minimal */
.fc-table--plain tbody tr {
  border-bottom: 1px solid var(--fc-border);
}

.fc-table--plain tbody tr:last-child {
  border-bottom: none;
}


/* ═══════════════════════════════════════════════════════════════════
   Box evidenza
   ═══════════════════════════════════════════════════════════════════ */

.fc-box {
  display: flex;
  gap: 0.875rem;
  padding: 1rem 1.25rem;
  border-radius: var(--fc-radius);
  border-left: 4px solid;
}

/* Type variants */
.fc-box--info {
  background: var(--fc-light-blue);
  border-left-color: var(--fc-blue);
}

.fc-box--warning {
  background: #FFF8E1;
  border-left-color: var(--fc-gold);
}

.fc-box--success {
  background: #F0FDF4;
  border-left-color: var(--fc-success);
}

.fc-box--danger {
  background: #FEF2F2;
  border-left-color: var(--fc-danger);
}

.fc-box__icon {
  flex-shrink: 0;
  font-size: 1.25rem;
  line-height: 1.5;
}

.fc-box--info .fc-box__icon { color: var(--fc-blue); }
.fc-box--warning .fc-box__icon { color: #D97706; }
.fc-box--success .fc-box__icon { color: var(--fc-success); }
.fc-box--danger .fc-box__icon { color: var(--fc-danger); }

.fc-box__body {
  flex: 1;
  min-width: 0;
}

.fc-box__title {
  margin: 0 0 0.25rem;
  font-weight: 700;
  font-size: 1rem;
}

.fc-box--info .fc-box__title { color: var(--fc-dark-blue); }
.fc-box--warning .fc-box__title { color: #92400E; }
.fc-box--success .fc-box__title { color: #166534; }
.fc-box--danger .fc-box__title { color: #991B1B; }

.fc-box__content {
  font-size: 0.95rem;
  color: var(--fc-text);
}

.fc-box__content p:last-child {
  margin-bottom: 0;
}

/* Box CTA (link inline o bottone dentro box) */
.fc-box__cta {
  margin: 0.75rem 0 0;
}

.fc-box__link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 700;
  text-decoration: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.fc-box__link--text {
  color: var(--fc-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.fc-box--info .fc-box__link--text    { color: var(--fc-blue); }
.fc-box--warning .fc-box__link--text { color: #92400E; }
.fc-box--success .fc-box__link--text { color: #166534; }
.fc-box--danger .fc-box__link--text  { color: #991B1B; }

.fc-box__link--text:hover { opacity: 0.75; }

.fc-box__link--button {
  padding: 0.55rem 1.1rem;
  border-radius: var(--fc-radius);
  background: var(--fc-blue);
  color: #fff;
  font-size: 0.9rem;
}

.fc-box--info .fc-box__link--button    { background: var(--fc-blue); color: #fff; }
.fc-box--warning .fc-box__link--button { background: #B45309; color: #fff; }
.fc-box--success .fc-box__link--button { background: var(--fc-success); color: #fff; }
.fc-box--danger .fc-box__link--button  { background: var(--fc-danger); color: #fff; }

.fc-box__link--button:hover { opacity: 0.9; transform: translateY(-1px); color: #fff; }

.fc-box__link-arrow {
  font-weight: 700;
  display: inline-block;
  transition: transform 0.15s ease;
}

.fc-box__link--button:hover .fc-box__link-arrow { transform: translateX(2px); }


/* ═══════════════════════════════════════════════════════════════════
   Pros / Cons
   ═══════════════════════════════════════════════════════════════════ */

.fc-proscons {
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius);
  overflow: hidden;
  box-shadow: var(--fc-shadow);
}

.fc-proscons__title {
  margin: 0;
  padding: 1rem 1.25rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--fc-dark-blue);
  background: var(--fc-bg-light);
  border-bottom: 1px solid var(--fc-border);
}

.fc-proscons__grid {
  display: grid;
  grid-template-columns: 1fr;
}

.fc-proscons__pros,
.fc-proscons__cons {
  padding: 1rem 1.25rem;
}

.fc-proscons__pros {
  border-bottom: 1px solid var(--fc-border);
}

.fc-proscons__pros h4,
.fc-proscons__cons h4 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  font-weight: 700;
}

.fc-proscons__pros h4 {
  color: var(--fc-success);
}

.fc-proscons__cons h4 {
  color: var(--fc-danger);
}

.fc-proscons__pros ul,
.fc-proscons__cons ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.fc-proscons__pros li,
.fc-proscons__cons li {
  padding: 0.375rem 0 0.375rem 1.5rem;
  position: relative;
  font-size: 0.95rem;
}

.fc-proscons__pros li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: var(--fc-success);
  font-weight: 700;
}

.fc-proscons__cons li::before {
  content: '\2717';
  position: absolute;
  left: 0;
  color: var(--fc-danger);
  font-weight: 700;
}

/* Desktop: 2-column grid */
@media (min-width: 768px) {
  .fc-proscons__grid {
    grid-template-columns: 1fr 1fr;
  }

  .fc-proscons__pros {
    border-bottom: none;
    border-right: 1px solid var(--fc-border);
  }
}


/* ═══════════════════════════════════════════════════════════════════
   Steps (Stepper numerato)
   ═══════════════════════════════════════════════════════════════════ */

.fc-steps {
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius);
  overflow: hidden;
  box-shadow: var(--fc-shadow);
}

.fc-steps__title {
  margin: 0;
  padding: 1rem 1.25rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--fc-dark-blue);
  background: var(--fc-bg-light);
  border-bottom: 1px solid var(--fc-border);
}

.fc-steps__list {
  margin: 0;
  padding: 1rem 1.25rem;
  list-style: none;
  counter-reset: step-counter;
}

.fc-steps__item {
  display: flex;
  gap: 1rem;
  position: relative;
  padding-bottom: 1.5rem;
}

.fc-steps__item:last-child {
  padding-bottom: 0;
}

/* Vertical connector line */
.fc-steps__item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 17px;
  top: 36px;
  bottom: 0;
  width: 2px;
  background: var(--fc-border);
}

/* Numbered circle */
.fc-steps__num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--fc-blue);
  color: #fff;
  font-weight: 700;
  font-size: 0.875rem;
  line-height: 1;
  position: relative;
  z-index: 1;
}

.fc-steps__body {
  flex: 1;
  min-width: 0;
  padding-top: 0.375rem;
}

.fc-steps__step-title {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--fc-dark-blue);
}

.fc-steps__text {
  font-size: 0.95rem;
  color: var(--fc-text);
}

.fc-steps__text p:last-child {
  margin-bottom: 0;
}


/* ═══════════════════════════════════════════════════════════════════
   Checklist (Steps senza numeri, con icona ✓ in cerchio)
   ═══════════════════════════════════════════════════════════════════ */

.fc-checklist {
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius);
  overflow: hidden;
  box-shadow: var(--fc-shadow);
}

.fc-checklist__title {
  margin: 0;
  padding: 1rem 1.25rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--fc-dark-blue);
  background: var(--fc-bg-light);
  border-bottom: 1px solid var(--fc-border);
}

.fc-checklist__list {
  margin: 0;
  padding: 1rem 1.25rem;
  list-style: none;
}

.fc-checklist__item {
  display: flex;
  gap: 0.875rem;
  padding-bottom: 1rem;
}

.fc-checklist__item:last-child {
  padding-bottom: 0;
}

.fc-checklist__icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--fc-success);
  color: #fff;
  margin-top: 2px;
}

.fc-checklist__icon svg {
  display: block;
}

.fc-checklist__body {
  flex: 1;
  min-width: 0;
}

.fc-checklist__item-title {
  margin: 0 0 0.2rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--fc-dark-blue);
  line-height: 1.4;
}

.fc-checklist__text {
  font-size: 0.95rem;
  color: var(--fc-text);
}

.fc-checklist__text p:last-child {
  margin-bottom: 0;
}


/* ═══════════════════════════════════════════════════════════════════
   CTA (Call-to-Action box)
   ═══════════════════════════════════════════════════════════════════ */

.fc-cta {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem 1.5rem;
  border-radius: var(--fc-radius);
  border: 1px solid transparent;
  box-shadow: var(--fc-shadow);
}

.fc-cta__body {
  flex: 1;
  min-width: 0;
}

.fc-cta__title {
  margin: 0 0 0.4rem;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.3;
}

.fc-cta__text {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
}

.fc-cta__text p:last-child { margin-bottom: 0; }

.fc-cta__action {
  flex-shrink: 0;
}

.fc-cta__button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.4rem;
  border-radius: var(--fc-radius);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
  white-space: nowrap;
}

.fc-cta__button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(2, 45, 83, 0.18);
}

.fc-cta__button-arrow {
  display: inline-block;
  transition: transform 0.15s ease;
  font-weight: 700;
}

.fc-cta__button:hover .fc-cta__button-arrow { transform: translateX(3px); }

/* Variant: Primary (blu scuro pieno) */
.fc-cta--primary {
  background: linear-gradient(135deg, var(--fc-dark-blue) 0%, var(--fc-blue) 100%);
  color: #fff;
  border-color: var(--fc-dark-blue);
}

.fc-cta--primary .fc-cta__title { color: #fff; }
.fc-cta--primary .fc-cta__text  { color: rgba(255, 255, 255, 0.92); }

.fc-cta--primary .fc-cta__button {
  background: var(--fc-gold);
  color: var(--fc-dark-blue);
}

/* Variant: Secondary (chiaro, brand soft) */
.fc-cta--secondary {
  background: var(--fc-light-blue);
  color: var(--fc-text);
  border-color: var(--fc-blue);
  border-left-width: 4px;
}

.fc-cta--secondary .fc-cta__title { color: var(--fc-dark-blue); }

.fc-cta--secondary .fc-cta__button {
  background: var(--fc-blue);
  color: #fff;
}

/* Variant: Gold (richiamo forte) */
.fc-cta--gold {
  background: linear-gradient(135deg, #FFE7A8 0%, var(--fc-gold) 100%);
  color: var(--fc-text);
  border-color: var(--fc-gold);
}

.fc-cta--gold .fc-cta__title { color: var(--fc-dark-blue); }

.fc-cta--gold .fc-cta__button {
  background: var(--fc-dark-blue);
  color: #fff;
}

/* Desktop: layout orizzontale */
@media (min-width: 768px) {
  .fc-cta {
    flex-direction: row;
    align-items: center;
    gap: 1.5rem;
    padding: 1.75rem 2rem;
  }

  .fc-cta__title {
    font-size: 1.4rem;
  }
}


/* ═══════════════════════════════════════════════════════════════════
   Print styles
   ═══════════════════════════════════════════════════════════════════ */

@media print {
  .fc-faq__item {
    display: block;
  }

  .fc-faq__item[open] > .fc-faq__a,
  .fc-faq__a {
    display: block;
  }

  .fc-faq__q::after {
    display: none;
  }

  .fc-table__scroll {
    overflow: visible;
  }

  .fc-proscons__grid {
    grid-template-columns: 1fr 1fr;
  }

  .fc-cta {
    box-shadow: none;
    background: #fff !important;
    color: var(--fc-text) !important;
    border: 1px solid var(--fc-border);
  }

  .fc-cta__title { color: var(--fc-dark-blue) !important; }
  .fc-cta__text  { color: var(--fc-text) !important; }

  .fc-cta__button {
    background: transparent !important;
    color: var(--fc-dark-blue) !important;
    border: 1px solid var(--fc-dark-blue);
  }
}
