/* =============================================
   MONITORAGGIO.CSS
   Pagina Monitoraggio IT e Threat Shield
   ============================================= */

/* Griglia threat cards */
.threat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-md);
  margin-top: var(--sp-lg);
}

.threat-card {
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--sp-lg);
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
  position: relative;
  overflow: hidden;
  transition: transform .4s cubic-bezier(.22,1,.36,1), box-shadow .4s cubic-bezier(.22,1,.36,1), border-color .4s ease;
}

.threat-card__img-wrapper {
  width: 100%;
  height: 140px;
  border-radius: var(--r-md);
  overflow: hidden;
  margin-bottom: var(--sp-sm);
  background: var(--c-bg);
}

.threat-card__img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}

.threat-card:hover .threat-card__img-wrapper img {
  transform: scale(1.05);
}

.threat-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,.2) 50%, transparent 100%);
  transform: translateX(-120%);
  transition: transform .7s ease;
  pointer-events: none;
}

@media (hover: hover) {
  .threat-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--sh-lg);
    border-color: rgba(240,90,26,.30);
  }
  .threat-card:hover::after {
    transform: translateX(120%);
  }
}

.threat-card__icon { font-size: 32px; margin-bottom: var(--sp-xs); }

/* Monitoraggio Feature Cards with images */
.feature-card__img-wrapper {
  width: 100%;
  height: 120px;
  border-radius: var(--r-md);
  overflow: hidden;
  margin-bottom: var(--sp-sm);
  background: var(--c-bg);
}

.feature-card__img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}

.feature-card:hover .feature-card__img-wrapper img {
  transform: scale(1.05);
}

.threat-card__title {
  font-size: var(--t-lg);
  font-weight: 700;
  color: var(--c-dark);
  margin: 0;
}

.threat-card__desc {
  font-size: var(--t-base);
  color: var(--c-gray);
  line-height: 1.65;
  margin: 0;
}

/* Griglia process steps */
.process__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-md);
}

.process-step {
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--sp-lg);
}

.process-step__dot {
  width: 36px;
  height: 36px;
  background: var(--c-orange);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: var(--c-white);
  margin-bottom: var(--sp-md);
  font-size: var(--t-base);
}

.process-step__title {
  font-size: var(--t-base);
  font-weight: 700;
  color: var(--c-dark);
  margin-bottom: 8px;
}

.process-step__desc {
  font-size: var(--t-sm);
  color: var(--c-gray);
  line-height: 1.6;
  margin: 0;
}

/* Tech tags */
.tech__grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-sm);
  justify-content: center;
}

.tech-tag {
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: 20px;
  padding: 6px 16px;
  font-size: var(--t-sm);
  font-weight: 600;
  color: var(--c-dark);
}

/* Intro Card */
.threat-intro-card {
  background: #f0f7ff;
  border: 1px solid #dbeafe;
  border-radius: var(--r-lg);
  padding: var(--sp-lg);
  display: flex;
  gap: var(--sp-md);
  align-items: center;
  text-align: left;
  max-width: 860px;
  margin: var(--sp-md) auto 0 auto;
  transition: transform .4s ease, box-shadow .4s ease;
}

.threat-intro-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(30,64,175,0.08);
}

.threat-intro-card__icon {
  font-size: 32px;
  background: #fff;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.threat-intro-card p {
  margin: 0;
  font-size: var(--t-base);
  color: #1e40af;
  line-height: 1.6;
  font-weight: 500;
}

/* Hero visual and animations */
.monitoraggio-visual {
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
  padding: var(--sp-lg);
  position: relative;
  overflow: hidden;
  transition: transform .4s ease, box-shadow .4s ease;
  animation: monitoraggioFloat 6s ease-in-out infinite;
}

@keyframes monitoraggioFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.monitoraggio-visual__img-wrapper {
  width: 100%;
  height: 220px;
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: var(--sp-md);
  background: var(--c-bg);
  cursor: zoom-in;
  position: relative;
}

.monitoraggio-visual__zoom-hint {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: var(--c-orange);
  color: #fff;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 4px 10px rgba(240,90,26,0.3);
  z-index: 5;
  pointer-events: none;
  transition: transform .3s ease;
}

.monitoraggio-visual:hover .monitoraggio-visual__zoom-hint {
  transform: scale(1.1);
}

.monitoraggio-visual__img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}

.monitoraggio-visual:hover img {
  transform: scale(1.05);
}

/* Lightbox styles */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity .4s ease, visibility .4s ease;
  padding: var(--pad-x);
  cursor: zoom-out;
}

.lightbox-overlay.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-overlay img {
  max-width: 90%;
  max-height: 90vh;
  border-radius: var(--r-md);
  box-shadow: 0 0 50px rgba(0,0,0,0.5);
  transform: scale(0.9);
  transition: transform .4s cubic-bezier(.22,1,.36,1);
}

.lightbox-overlay.active img {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 30px;
  right: 30px;
  color: #fff;
  font-size: 40px;
  cursor: pointer;
  line-height: 1;
}

/* Responsive */
@media (max-width: 1024px) {
  .threat-grid   { grid-template-columns: 1fr; }
  .process__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .process__grid { grid-template-columns: 1fr; }
}
