
/* ==================================================
   INDEX2 CUSTOM STYLES
   Prodotti Tech Card & 3D Globe Styles
   ================================================== */

/* ------------------------------------------
   PRODUCT CARDS - Tech/AI Theme
   ------------------------------------------ */
.product-card {
  background: linear-gradient(145deg, var(--bg-card) 0%, var(--bg-tertiary) 100%);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at top, rgba(59, 130, 246, 0.1) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.product-card:hover::before {
  opacity: 1;
}

.product-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: var(--accent-blue);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.4),
    0 0 40px rgba(59, 130, 246, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.product-card-header {
  position: relative;
  padding: 2rem;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
  border-bottom: 1px solid var(--border-color);
  overflow: hidden;
}

.product-card-header::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, var(--accent-blue) 0%, transparent 70%);
  opacity: 0.05;
  animation: productGlow 8s ease-in-out infinite;
}

@keyframes productGlow {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(-10%, -10%) rotate(180deg); }
}

.product-icon-wrapper {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-icon-bg {
  position: absolute;
  width: 100%;
  height: 100%;
  background: var(--gradient-blue);
  border-radius: 20px;
  opacity: 0.2;
  animation: iconPulse 3s ease-in-out infinite;
}

@keyframes iconPulse {
  0%, 100% { transform: scale(1); opacity: 0.2; }
  50% { transform: scale(1.1); opacity: 0.3; }
}

.product-icon {
  position: relative;
  font-size: 2.5rem;
  background: var(--gradient-blue);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.product-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-blue-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.product-card-body {
  padding: 1.5rem 2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-card-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.product-card-title::after {
  content: '';
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-blue), transparent);
  border-radius: 1px;
}

.product-card-description {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.product-features {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.product-feature {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.product-feature i {
  color: var(--accent-green);
  font-size: 0.75rem;
}

.product-tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.product-tech-pill {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.3s ease;
}

.product-tech-pill:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.1);
}

.product-card-footer {
  padding: 1.25rem 2rem;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: auto;
}

.product-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--gradient-blue);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.product-btn:hover {
  transform: translateX(4px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

.product-link-icon {
  transition: transform 0.3s ease;
}

.product-btn:hover .product-link-icon {
  transform: translateX(4px);
}

/* Product Card Variants */
.product-card.ai-product .product-icon-bg {
  background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-pink) 100%);
}

.product-card.ai-product .product-icon {
  background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-pink) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.product-card.cloud-product .product-icon-bg {
  background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-blue) 100%);
}

.product-card.cloud-product .product-icon {
  background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.product-card.data-product .product-icon-bg {
  background: linear-gradient(135deg, var(--accent-green) 0%, var(--accent-cyan) 100%);
}

.product-card.data-product .product-icon {
  background: linear-gradient(135deg, var(--accent-green) 0%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ------------------------------------------
   3D GLOBE SECTION
   ------------------------------------------ */
.globe-section {
  position: relative;
  padding: 120px 0;
  background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-primary) 100%);
  overflow: hidden;
}

.globe-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(59, 130, 246, 0.05) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(139, 92, 246, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.globe-wrapper {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

.globe-canvas-container {
  position: relative;
  width: 100%;
  height: 600px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  overflow: hidden;
  box-shadow:
    0 25px 80px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

#globeCanvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
}

#globeCanvas:active {
  cursor: grabbing;
}

.globe-overlay-info {
  position: absolute;
  bottom: 2rem;
  left: 2rem;
  background: rgba(22, 22, 31, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.5rem;
  max-width: 280px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.globe-overlay-info h6 {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-primary);
}

.globe-overlay-info h6 i {
  color: var(--accent-blue);
}

.globe-overlay-info p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin: 0;
  line-height: 1.5;
}

.globe-stats {
  display: flex;
  gap: 1.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.globe-stat {
  text-align: center;
}

.globe-stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--gradient-cyan);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.globe-stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.globe-controls {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.globe-control-btn {
  width: 44px;
  height: 44px;
  background: rgba(22, 22, 31, 0.9);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.globe-control-btn:hover {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: var(--text-primary);
  transform: scale(1.05);
}

.globe-control-btn.active {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: var(--text-primary);
}

/* Globe Loading State */
.globe-loading {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  z-index: 10;
  transition: opacity 0.5s ease;
}

.globe-loading.hidden {
  opacity: 0;
  pointer-events: none;
}

.globe-loading-spinner {
  width: 60px;
  height: 60px;
  border: 3px solid var(--border-color);
  border-top-color: var(--accent-blue);
  border-radius: 50%;
  animation: globeSpin 1s linear infinite;
}

@keyframes globeSpin {
  to { transform: rotate(360deg); }
}

.globe-loading-text {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* ------------------------------------------
   RESPONSIVE ADJUSTMENTS
   ------------------------------------------ */
@media (max-width: 991px) {
  .product-card {
    margin-bottom: 1.5rem;
  }

  .globe-canvas-container {
    height: 450px;
  }

  .globe-overlay-info {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    max-width: none;
  }

  .globe-controls {
    top: 1rem;
    right: 1rem;
  }
}

@media (max-width: 767px) {
  .product-card-header {
    padding: 1.5rem;
  }

  .product-card-body {
    padding: 1.25rem 1.5rem;
  }

  .product-card-footer {
    flex-direction: column;
    padding: 1rem 1.5rem;
  }

  .product-btn {
    width: 100%;
    justify-content: center;
  }

  .globe-canvas-container {
    height: 350px;
    border-radius: 16px;
  }

  .globe-section {
    padding: 80px 0;
  }

  .globe-stats {
    gap: 1rem;
  }

  .globe-stat-value {
    font-size: 1.25rem;
  }
}

/* ------------------------------------------
   ANIMATIONS
   ------------------------------------------ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.product-card {
  animation: fadeInUp 0.6s ease-out forwards;
}

.product-card:nth-child(1) { animation-delay: 0.1s; }
.product-card:nth-child(2) { animation-delay: 0.2s; }
.product-card:nth-child(3) { animation-delay: 0.3s; }
