/* ─── Apulia Smart Point – Custom CSS ──────────────────────────────────────── */

/* ─── Pastel Design Tokens ─────────────────────────────────────────────────── */
:root {
  --asp-green:       #5B9B76;   /* sage green pastel — primario */
  --asp-green-dark:  #3E7A57;   /* verde scuro hover */
  --asp-green-light: #EDF7F2;   /* superficie verde pallidissima */
  --asp-green-pale:  #C8E6D8;   /* accent decorativo */
  --asp-accent:      #4A9E8A;   /* teal complementare */
  --asp-dark:        #1C2B24;   /* dark forest per sidebar admin */
  --asp-text:        #1E3A2E;   /* testo su sfondo chiaro */
  --asp-surface:     #F6FBF8;   /* sfondo pagina principale */
  --asp-border:      #D4EDDF;   /* bordi card pastello */

  /* Shadow leggere stile Dialpad */
  --shadow-card:   0 1px 4px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.04);
  --shadow-hover:  0 4px 20px rgba(0,0,0,0.10), 0 2px 8px rgba(0,0,0,0.06);
}

/* Smooth scrolling */
html { scroll-behavior: smooth; }

/* Custom scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f0f7f3; }
::-webkit-scrollbar-thumb { background: var(--asp-green); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--asp-green-dark); }

/* Hide scrollbar for horizontal scroll */
.scrollbar-hide::-webkit-scrollbar { display: none; }
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }

/* Active nav link highlight */
.nav-link.active { color: var(--asp-green); background-color: var(--asp-green-light); }

/* Blog content typography */
.blog-content h1, .blog-content h2, .blog-content h3 {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-weight: 700;
  color: #2D2D2D;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}
.blog-content h2 { font-size: 1.5rem; }
.blog-content h3 { font-size: 1.25rem; }
.blog-content p { margin-bottom: 1rem; line-height: 1.75; }
.blog-content ul, .blog-content ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.blog-content li { margin-bottom: 0.4rem; }
.blog-content a { color: var(--asp-green); text-decoration: underline; }
.blog-content strong { color: #2D2D2D; font-weight: 600; }
.blog-content blockquote {
  border-left: 3px solid var(--asp-green);
  padding-left: 1rem;
  color: #6B7280;
  font-style: italic;
  margin: 1.5rem 0;
}

/* Line clamp */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* FAQ animation */
.faq-answer {
  transition: max-height 0.25s ease, opacity 0.2s ease;
}

/* FAQ icon rotation */
.faq-btn.open .faq-icon { transform: rotate(180deg); }

/* Hero gradient text */
.text-gradient {
  background: linear-gradient(135deg, var(--asp-green), var(--asp-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Card hover lift */
.card-hover {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card-hover:hover {
  transform: translateY(-4px);
}

/* Button pulse animation */
@keyframes pulse-green {
  0%, 100% { box-shadow: 0 0 0 0 rgba(91, 155, 118, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(91, 155, 118, 0); }
}
.btn-pulse { animation: pulse-green 2s infinite; }

/* Legacy fade-in (AOS replaces this on pages that use it) */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Lucide icon alignment */
[data-lucide] { display: inline-block; vertical-align: middle; }

/* ─── Hero animations ─────────────────────────────────────────────────────── */

/* Staggered text reveal */
@keyframes hero-slide-up {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-reveal {
  opacity: 0;
  animation: hero-slide-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.hero-reveal-1 { animation-delay: 0.1s; }
.hero-reveal-2 { animation-delay: 0.3s; }
.hero-reveal-3 { animation-delay: 0.5s; }
.hero-reveal-4 { animation-delay: 0.7s; }
.hero-reveal-5 { animation-delay: 0.9s; }

/* Hero image float */
@keyframes hero-float {
  0%, 100% { transform: translateY(0px); }
  50%      { transform: translateY(-12px); }
}
.hero-float {
  animation: hero-float 6s ease-in-out infinite;
}

/* Badge bounce-in */
@keyframes badge-pop {
  0%   { opacity: 0; transform: scale(0.5) rotate(-10deg); }
  60%  { transform: scale(1.15) rotate(2deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); }
}
.badge-pop {
  opacity: 0;
  animation: badge-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  animation-delay: 1.2s;
}

/* Gradient background shift */
@keyframes bg-shift {
  0%, 100% { opacity: 0.10; transform: translate(0, 0) scale(1); }
  50%      { opacity: 0.18; transform: translate(-20px, 10px) scale(1.05); }
}
.bg-animate {
  animation: bg-shift 8s ease-in-out infinite;
}

/* Text highlight shimmer */
@keyframes text-shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}
.text-shimmer {
  background: linear-gradient(90deg, #3E7A57 0%, #5B9B76 40%, #A8D5BE 50%, #5B9B76 60%, #3E7A57 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: text-shimmer 4s linear infinite;
}

/* Counter glow */
@keyframes stat-glow {
  0%, 100% { text-shadow: 0 0 0px transparent; }
  50%      { text-shadow: 0 0 20px rgba(91, 155, 118, 0.35); }
}
.stat-glow { animation: stat-glow 3s ease-in-out infinite; }

/* Smooth scale on scroll */
@keyframes scale-in {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}

/* Music button pulse ring */
@keyframes music-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(91, 155, 118, 0.4); }
  70%  { box-shadow: 0 0 0 10px rgba(91, 155, 118, 0); }
  100% { box-shadow: 0 0 0 0 rgba(91, 155, 118, 0); }
}

/* ─── Admin KPI counters ─────────────────────────────────────────────────── */
@keyframes count-up { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.kpi-count { animation: count-up 0.4s ease-out both; }

/* ─── CRM Kanban pastel ─────────────────────────────────────────────────── */
.crm-card { box-shadow: var(--shadow-card); transition: box-shadow 0.18s ease, transform 0.18s ease; }
.crm-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.music-btn.playing { animation: music-pulse 2s ease-out infinite; }

/* Mobile touch improvements */
@media (max-width: 768px) {
  .nav-link { padding: 0.75rem 1rem; }
}

/* Print styles */
@media print {
  nav, footer { display: none; }
}
