/**
 * eContact Docs & Features - Frontend Styles
 * Consistent with eContact Cloud theme design tokens
 *
 * @package eContact
 * @version 1.0.0
 */

/* ============================================
   DOCS LIST (Manuali / Guide)
   ============================================ */
.ec-docs__list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 800px;
  margin: 0 auto;
}

.ec-docs__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ec-docs__item:hover {
  background: #fff;
  border-color: #25D366;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.12);
  transform: translateY(-2px);
}

.ec-docs__item-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 4px;
}

.ec-docs__item-desc {
  font-size: 0.85rem;
  color: #6b7280;
  line-height: 1.5;
  margin-bottom: 8px;
}

.ec-docs__item-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ec-docs__badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ec-docs__badge--base {
  background: #e8f8ee;
  color: #1da851;
}

.ec-docs__badge--intermedio {
  background: #fef3c7;
  color: #d97706;
}

.ec-docs__badge--avanzato {
  background: #fee2e2;
  color: #dc2626;
}

.ec-docs__time {
  font-size: 0.75rem;
  color: #9ca3af;
}

.ec-docs__arrow {
  font-size: 1.2rem;
  color: #d1d5db;
  transition: all 0.3s ease;
  flex-shrink: 0;
  margin-left: 16px;
}

.ec-docs__item:hover .ec-docs__arrow {
  color: #25D366;
  transform: translateX(4px);
}

/* Sub-items (child guides) */
.ec-docs__subitems {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-left: 32px;
  margin-bottom: 8px;
}

.ec-docs__subitem {
  display: block;
  padding: 10px 16px;
  font-size: 0.88rem;
  color: #4b5563;
  text-decoration: none;
  border-left: 2px solid #e5e7eb;
  transition: all 0.25s ease;
}

.ec-docs__subitem:hover {
  border-left-color: #25D366;
  color: #25D366;
  background: rgba(37, 211, 102, 0.04);
}

/* ============================================
   FEATURES GRID
   ============================================ */
.ec-feature-card {
  position: relative;
  padding: 28px 24px;
  border-radius: 16px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ec-feature-card:hover {
  background: #fff;
  border-color: rgba(37, 211, 102, 0.3);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  transform: translateY(-4px);
}

.ec-feature-card__badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: #25D366;
  color: #fff;
}

.ec-feature-card__icon {
  font-size: 2rem;
  margin-bottom: 16px;
  line-height: 1;
}

.ec-feature-card__title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #111827;
  letter-spacing: -0.02em;
}

.ec-feature-card__desc {
  font-size: 0.88rem;
  color: #6b7280;
  line-height: 1.65;
  margin-bottom: 16px;
}

.ec-feature-card__stat {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  color: #25D366;
  padding: 4px 12px;
  background: rgba(37, 211, 102, 0.08);
  border-radius: 9999px;
}

/* ============================================
   CHANGELOG
   ============================================ */
.ec-changelog {
  max-width: 800px;
  margin: 0 auto;
}

.ec-changelog__item {
  position: relative;
  padding: 28px 0;
  border-bottom: 1px solid #e5e7eb;
}

.ec-changelog__item:last-child {
  border-bottom: none;
}

/* Timeline dot */
.ec-changelog__item::before {
  content: '';
  position: absolute;
  left: -28px;
  top: 36px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #25D366;
  border: 2px solid #fff;
  box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.15);
}

.ec-changelog__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.ec-changelog__version {
  display: inline-block;
  padding: 3px 12px;
  background: #0a0a0a;
  color: #25D366;
  font-size: 0.78rem;
  font-weight: 800;
  font-family: 'SF Mono', 'Fira Code', monospace;
  border-radius: 6px;
  letter-spacing: 0.03em;
}

.ec-changelog__title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.02em;
}

.ec-changelog__date {
  font-size: 0.8rem;
  color: #9ca3af;
}

.ec-changelog__tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 9999px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: #e8f8ee;
  color: #1da851;
}

.ec-changelog__content {
  font-size: 0.9rem;
  color: #4b5563;
  line-height: 1.7;
}

.ec-changelog__content ul {
  list-style: none;
  padding: 0;
  margin: 8px 0;
}

.ec-changelog__content ul li {
  position: relative;
  padding: 4px 0 4px 20px;
}

.ec-changelog__content ul li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: #25D366;
  font-weight: 700;
  font-size: 0.85rem;
}

/* ============================================
   CTA SHORTCODE BUTTON
   ============================================ */
.ec-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border: none;
  letter-spacing: -0.01em;
}

.ec-btn--primary {
  background: #25D366;
  color: #fff;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.3);
}

.ec-btn--primary:hover {
  background: #1da851;
  box-shadow: 0 6px 28px rgba(37, 211, 102, 0.45);
  transform: translateY(-2px);
}

.ec-btn--dark {
  background: #0a0a0a;
  color: #fff;
}

.ec-btn--dark:hover {
  background: #1f2937;
  transform: translateY(-2px);
}

.ec-btn--lg {
  padding: 16px 36px;
  font-size: 1rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .ec-docs__item {
    padding: 16px;
  }

  .ec-docs__subitems {
    padding-left: 16px;
  }

  .ec-features__grid {
    grid-template-columns: 1fr !important;
  }

  .ec-changelog__item::before {
    display: none;
  }

  .ec-changelog__header {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ═══ Layout documentazione con sidebar (Funzionalità / Manuale) ═══ */
.page-id-9000 .wp-block-post-content,.page-id-9282 .wp-block-post-content{max-width:1280px;margin:0 auto;padding:40px 24px}
.ec-doc-layout{display:grid;grid-template-columns:300px minmax(0,1fr);gap:40px;align-items:start;text-align:left}
.ec-doc-main{min-width:0}
.ec-doc-sidebar{position:sticky;top:100px;background:#0b0f0d;border:1px solid #1c2b22;border-radius:14px;padding:18px 18px 8px;max-height:calc(100vh - 120px);overflow-y:auto}
.ec-doc-sidebar__head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px;padding-bottom:10px;border-bottom:1px solid #1c2b22}
.ec-doc-sidebar__head h3{margin:0;font-size:.95rem;color:#fff}
.ec-acc-expandall{font-size:.75rem;color:#25D366;cursor:pointer;text-decoration:none;white-space:nowrap;border:1px solid #25D366;padding:4px 10px;border-radius:999px;transition:.15s}
.ec-acc-expandall:hover{background:#25D366;color:#04120b}
.ec-acc-list{list-style:none;margin:0;padding:0}
.ec-acc-item{border-bottom:1px solid #16241c}
.ec-acc-item:last-child{border-bottom:none}
.ec-acc-trigger{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;padding:11px 2px;cursor:pointer;color:#d7e5dd;font-size:.88rem;font-weight:600;text-decoration:none;line-height:1.35}
.ec-acc-trigger:hover{color:#25D366}
.ec-acc-trigger::after{content:"+";font-size:1.15rem;color:#25D366;line-height:1;flex:0 0 auto}
.ec-acc-item.is-open>.ec-acc-trigger::after{content:"–"}
.ec-acc-panel{display:none;padding:0 2px 12px}
.ec-acc-item.is-open>.ec-acc-panel{display:block}
.ec-acc-panel p{margin:0 0 8px;font-size:.8rem;color:#9db3a8;line-height:1.5}
.ec-acc-panel>a{font-size:.8rem;color:#25D366;text-decoration:none;font-weight:600}
.ec-acc-panel>a:hover{text-decoration:underline}
.ec-acc-panel ul{list-style:none;margin:0;padding:0}
.ec-acc-panel ul li{margin:0}
.ec-acc-panel ul li a{display:block;color:#cfe0d7;font-size:.84rem;padding:5px 0;text-decoration:none;border-bottom:1px dashed #14201a}
.ec-acc-panel ul li:last-child a{border-bottom:none}
.ec-acc-panel ul li a:hover{color:#25D366}
@media(max-width:900px){.ec-doc-layout{grid-template-columns:1fr;gap:24px}.ec-doc-sidebar{position:static;max-height:none}}
