/**
 * @file
 * Styling for the modern NIS2Secure packages block.
 */

/* Package Grid Container */
.nis2secure-package-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  margin: 30px 0;
  padding: 0;
}

/* Individual Package Cards */
.nis2secure-card {
  position: relative;
  background: #ffffff;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.nis2secure-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border-color: #667eea;
}

/* Package Card Link */
.package-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

.package-card-link:hover,
.package-card-link:focus {
  text-decoration: none;
  color: inherit;
}

/* Card Content */
.nis2secure-card-content {
  padding: 30px 25px;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Popular Badge */
.popular-badge {
  position: absolute;
  top: -2px;
  right: 20px;
  background: linear-gradient(135deg, #ff6b6b, #ee5a24);
  color: white;
  padding: 8px 16px;
  border-radius: 0 0 8px 8px;
  font-size: 0.85em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 10;
}

/* Package Header */
.package-header {
  text-align: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid #f8f9fa;
}

.package-title {
  font-size: 1.8em;
  font-weight: 700;
  color: #2c3e50;
  margin: 0 0 10px 0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.package-price {
  font-size: 1.4em;
  font-weight: 600;
  color: #667eea;
  margin: 0;
}

/* Package Description */
.package-description {
  font-size: 1.05em;
  line-height: 1.6;
  color: #495057;
  margin-bottom: 25px;
  text-align: center;
  font-style: italic;
}

/* Features List */
.package-features {
  list-style: none;
  padding: 0;
  margin: 0 0 25px 0;
  flex-grow: 1;
}

.package-features li {
  display: flex;
  align-items: flex-start;
  margin-bottom: 12px;
  font-size: 0.95em;
  line-height: 1.5;
  color: #495057;
}

.feature-checkmark {
  color: #28a745;
  font-weight: bold;
  margin-right: 10px;
  font-size: 1.1em;
  flex-shrink: 0;
}

/* Closing Message */
.package-closing {
  font-size: 0.95em;
  color: #6c757d;
  text-align: center;
  margin-bottom: 25px;
  font-style: italic;
  border-top: 1px solid #f8f9fa;
  padding-top: 20px;
}

/* Call-to-Action */
.package-cta {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 15px 20px;
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
  font-size: 1.05em;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: auto;
}

.cta-arrow {
  font-size: 1.2em;
  transition: transform 0.3s ease;
}

.nis2secure-card:hover .package-cta {
  background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

.nis2secure-card:hover .cta-arrow {
  transform: translateX(5px);
}

/* Package-Specific Styling */
.nis2secure-card-light {
  border-top: 4px solid #17a2b8;
}

.nis2secure-card-light .package-title {
  color: #17a2b8;
}

.nis2secure-card-light .package-price {
  color: #17a2b8;
}

.nis2secure-card-medium {
  border-top: 4px solid #28a745;
  position: relative;
}

.nis2secure-card-medium .package-title {
  color: #28a745;
}

.nis2secure-card-medium .package-price {
  color: #28a745;
}

.nis2secure-card-popular {
  border-color: #ff6b6b;
  box-shadow: 0 6px 20px rgba(255, 107, 107, 0.2);
}

.nis2secure-card-premium {
  border-top: 4px solid #6f42c1;
}

.nis2secure-card-premium .package-title {
  color: #6f42c1;
}

.nis2secure-card-premium .package-price {
  color: #6f42c1;
}

/* Hover Effects */
.nis2secure-card-light:hover {
  border-color: #17a2b8;
  box-shadow: 0 8px 25px rgba(23, 162, 184, 0.2);
}

.nis2secure-card-medium:hover {
  border-color: #28a745;
  box-shadow: 0 8px 25px rgba(40, 167, 69, 0.2);
}

.nis2secure-card-premium:hover {
  border-color: #6f42c1;
  box-shadow: 0 8px 25px rgba(111, 66, 193, 0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
  .nis2secure-package-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 20px 0;
  }
  
  .nis2secure-card-content {
    padding: 25px 20px;
  }
  
  .package-title {
    font-size: 1.5em;
  }
  
  .package-price {
    font-size: 1.2em;
  }
  
  .package-description {
    font-size: 1em;
  }
  
  .popular-badge {
    right: 15px;
    padding: 6px 12px;
    font-size: 0.8em;
  }
}

@media (max-width: 480px) {
  .nis2secure-package-grid {
    gap: 15px;
    margin: 15px 0;
  }
  
  .nis2secure-card-content {
    padding: 20px 15px;
  }
  
  .package-header {
    margin-bottom: 15px;
    padding-bottom: 10px;
  }
  
  .package-features li {
    font-size: 0.9em;
    margin-bottom: 10px;
  }
  
  .package-cta {
    padding: 12px 15px;
    font-size: 1em;
  }
}

/* Accessibility */
.nis2secure-card:focus-within {
  outline: 3px solid #667eea;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .nis2secure-card,
  .package-cta,
  .cta-arrow {
    transition: none;
  }
  
  .nis2secure-card:hover {
    transform: none;
  }
  
  .nis2secure-card:hover .cta-arrow {
    transform: none;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .nis2secure-card {
    border-width: 3px;
  }
  
  .package-features li {
    color: #000;
  }
  
  .package-description,
  .package-closing {
    color: #000;
  }
}

/* Print styles */
@media print {
  .nis2secure-package-grid {
    display: block;
  }
  
  .nis2secure-card {
    break-inside: avoid;
    margin-bottom: 20px;
    box-shadow: none;
    border: 2px solid #000;
  }
  
  .popular-badge {
    background: #000 !important;
    color: #fff !important;
  }
  
  .package-cta {
    background: #000 !important;
    color: #fff !important;
  }
}
