/* ==========================================================================
   Hub Diffuso Appennino Reggiano — Custom Styles
   ========================================================================== */

/* --- Base --- */
body {
  background-color: #f8faff;
  scroll-behavior: smooth;
}

::selection {
  background: #0d6efd;
  color: #fff;
}

/* --- Hero --- */
.hero {
  background: linear-gradient(135deg, #f0f4ff 0%, #e8edf8 50%, #fdf6e3 100%);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(13,110,253,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,193,7,0.05) 0%, transparent 70%);
  pointer-events: none;
}

/* --- Cards --- */
.card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: none;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 0.5rem 1.5rem rgba(0,0,0,0.08) !important;
}
.card .card-header {
  border-bottom: 1px solid rgba(0,0,0,0.04);
}

/* Card with hover lift — small variant */
.card-sm-hover:hover {
  transform: translateY(-2px);
}

/* Card with coloured top border accent */
.card-accent-top {
  border-top: 3px solid #0d6efd;
}

/* --- Navigation --- */
.navbar {
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.navbar-dark.bg-dark {
  background: linear-gradient(135deg, #1a1d23 0%, #2c303a 100%) !important;
}
.navbar .nav-link {
  font-weight: 500;
  padding: 0.5rem 0.9rem;
  border-radius: 0.4rem;
  transition: background 0.15s ease, color 0.15s ease;
}
.navbar .nav-link:hover {
  background: rgba(255,255,255,0.08);
}

/* --- Buttons --- */
.btn {
  border-radius: 0.5rem;
  font-weight: 500;
  transition: all 0.2s ease;
}
.btn-sm {
  border-radius: 0.4rem;
}
.btn-primary {
  --bs-btn-hover-bg: #0b5ed7;
}
.btn-outline-dark:hover i,
.btn-outline-primary:hover i {
  color: #fff !important;
}
.btn-outline-secondary:hover {
  background: #6c757d;
  color: #fff;
}

/* --- Badges with more pop --- */
.badge {
  font-weight: 500;
  padding: 0.35em 0.7em;
}

/* --- Tables --- */
.table th {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  color: #6c757d;
  border-top: none;
}
.table-hover tbody tr {
  transition: background 0.15s ease;
}

/* --- Stats cards (operator dashboard) --- */
.stat-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 0.75rem 2rem rgba(0,0,0,0.12) !important;
}

/* --- KPI cards --- */
.kpi-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

/* --- List group items --- */
.list-group-item {
  transition: background 0.15s ease;
  border-left: none;
  border-right: none;
}
.list-group-item:first-child {
  border-top: none;
}
.list-group-item:last-child {
  border-bottom: none;
}

/* --- Breadcrumb --- */
.breadcrumb {
  background: transparent;
  padding: 0;
}
.breadcrumb-item a {
  text-decoration: none;
  color: #6c757d;
  transition: color 0.15s ease;
}
.breadcrumb-item a:hover {
  color: #0d6efd;
}

/* --- Footer --- */
.site-footer {
  background: linear-gradient(135deg, #1a1d23 0%, #2c303a 100%);
  color: rgba(255,255,255,0.7);
}
.site-footer h6 {
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.site-footer a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  transition: color 0.15s ease;
}
.site-footer a:hover {
  color: #fff;
}
.site-footer .social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.7);
  transition: all 0.2s ease;
}
.site-footer .social-link:hover {
  background: #0d6efd;
  color: #fff;
  transform: translateY(-2px);
}

/* --- Chatbot --- */
.chatbot-fab {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 56px;
  height: 56px;
  z-index: 1040;
  box-shadow: 0 4px 16px rgba(13,110,253,0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.chatbot-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 24px rgba(13,110,253,0.4);
}

.chat-msg {
  max-width: 80%;
  padding: 0.5rem 0.75rem;
  border-radius: 0.75rem;
  font-size: 0.95rem;
  line-height: 1.4;
}
.chat-msg--bot {
  background: #eef2f7;
  align-self: flex-start;
  border-bottom-left-radius: 0.25rem;
}
.chat-msg--user {
  background: #d1e7ff;
  align-self: flex-end;
  margin-left: auto;
  border-bottom-right-radius: 0.25rem;
}

/* --- Feedback stars --- */
.star-rating .fa-star,
.star-rating .fa-star-half-alt {
  cursor: pointer;
  transition: color 0.15s ease, transform 0.15s ease;
}
.star-rating .fa-star:hover,
.star-rating .fa-star-half-alt:hover {
  transform: scale(1.2);
}

/* --- Kanban --- */
.kanban-column {
  min-height: 300px;
}

/* --- Section titles --- */
.section-title {
  position: relative;
  padding-bottom: 0.75rem;
}
.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 48px;
  height: 3px;
  background: #0d6efd;
  border-radius: 2px;
}

/* --- Form focus rings --- */
.form-control:focus,
.form-select:focus {
  border-color: #86b7fe;
  box-shadow: 0 0 0 0.2rem rgba(13,110,253,0.15);
}

/* --- Alert animations --- */
.alert {
  border: none;
  border-radius: 0.6rem;
}
.alert-dismissible .btn-close {
  padding: 0.75rem;
}

/* --- Map container --- */
#map {
  border-radius: 0.75rem;
  overflow: hidden;
}

/* --- FullCalendar tweaks --- */
.fc .fc-toolbar-title {
  font-size: 1.1rem !important;
  font-weight: 600;
}
.fc .fc-button-primary {
  border-radius: 0.4rem !important;
  font-weight: 500 !important;
}

/* --- Misc utilities --- */
.text-truncate-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Page load fade-in */
.fade-in {
  animation: fadeIn 0.4s ease-in;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Gradient text for headings */
.text-gradient {
  background: linear-gradient(135deg, #0d6efd, #6610f2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- 8-points index bar --- */
.point-index-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}
.point-index-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 0.3rem 0.8rem rgba(0,0,0,0.1) !important;
}

/* --- 8-points feature grid --- */
.feature-card {
  border-left: 3px solid #0d6efd;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 0.5rem 1.5rem rgba(0,0,0,0.08) !important;
}

/* --- Event map sidebar --- */
.map-info-card {
  transition: background 0.15s ease;
  cursor: pointer;
}
.map-info-card:hover {
  background: #f0f4ff;
}
.map-info-card.active {
  background: #e8edf8;
  border-left: 3px solid #0d6efd;
}

/* --- Chat / Messaging --- */
.chat-channel {
  transition: background 0.15s ease;
  cursor: pointer;
  border-radius: 0.5rem;
}
.chat-channel:hover {
  background: rgba(13,110,253,0.06);
}
.chat-channel.active {
  background: rgba(13,110,253,0.1);
}
.chat-msg--system {
  background: #f0f4ff;
  align-self: center;
  max-width: 90%;
  font-size: 0.85rem;
}

/* Typing indicator */
.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 0.5rem 0.75rem;
  background: #eef2f7;
  border-radius: 0.75rem;
  max-width: 60px;
  align-self: flex-start;
  border-bottom-left-radius: 0.25rem;
}
.typing-indicator span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6c757d;
  animation: typing 1.4s infinite ease-in-out;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-4px); }
}

/* --- Quick-reply chips --- */
.quick-reply-chip {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border-radius: 1rem;
  border: 1px solid #0d6efd;
  color: #0d6efd;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s ease;
  margin: 0.15rem;
}
.quick-reply-chip:hover {
  background: #0d6efd;
  color: #fff;
}

/* --- Skill badges --- */
.skill-badge {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  border-radius: 2rem;
  font-size: 0.85rem;
  font-weight: 500;
  transition: transform 0.15s ease;
}
.skill-badge:hover {
  transform: scale(1.05);
}

/* --- Group cards --- */
.group-card .group-cover {
  height: 100px;
  border-radius: 0.5rem 0.5rem 0 0;
}
.group-card .group-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: -28px;
  border: 3px solid #fff;
  font-size: 1.5rem;
}

/* --- Catalog price badge --- */
.price-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  padding: 0.3rem 0.6rem;
  border-radius: 0.4rem;
  font-weight: 600;
  font-size: 0.85rem;
}

/* --- Event registration progress --- */
.registration-progress {
  height: 6px;
  border-radius: 3px;
}

/* --- Dropdown nav tweaks --- */
@media (max-width: 991.98px) {
  .navbar .dropdown-menu {
    border: none;
    background: rgba(255,255,255,0.05);
    padding-left: 1rem;
  }
  .navbar .dropdown-menu .dropdown-item {
    color: rgba(255,255,255,0.8);
  }
  .navbar .dropdown-menu .dropdown-item:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
  }
  .navbar .dropdown-menu small {
    color: rgba(255,255,255,0.5) !important;
  }
}
