/* Additional styles for blog animations and interactive elements */

/* Animated Firewall Diagram */
.firewall-diagram {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 40px;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border-radius: 15px;
  margin: 30px 0;
  overflow: hidden;
}

.firewall-diagram::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%23e2e8f0" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
  opacity: 0.5;
  z-index: 1;
}

.network-element {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 20px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border: 2px solid #e2e8f0;
  transition: all 0.3s ease;
}

.network-element:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border-color: #3b82f6;
}

.network-element i {
  font-size: 2.5rem;
  margin-bottom: 10px;
  color: #3b82f6;
}

.network-element h4 {
  font-size: 1rem;
  margin-bottom: 5px;
  color: #1e293b;
}

.network-element p {
  font-size: 0.8rem;
  color: #64748b;
  margin: 0;
}

.connection-line {
  position: relative;
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, #3b82f6, #06b6d4, #3b82f6);
  background-size: 200% 100%;
  animation: dataFlow 2s linear infinite;
  margin: 0 20px;
}

.connection-line::before,
.connection-line::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 8px;
  height: 8px;
  background: #3b82f6;
  border-radius: 50%;
  transform: translateY(-50%);
  animation: pulse 1.5s ease-in-out infinite;
}

.connection-line::before {
  left: -4px;
}

.connection-line::after {
  right: -4px;
}

@keyframes dataFlow {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 200% 50%;
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: translateY(-50%) scale(1);
    opacity: 1;
  }
  50% {
    transform: translateY(-50%) scale(1.5);
    opacity: 0.7;
  }
}

/* Comparison Containers */
.comparison-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin: 40px 0;
}

.comparison-item {
  padding: 30px;
  border-radius: 15px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.comparison-item.secure {
  background: linear-gradient(135deg, #dcfdf4 0%, #a7f3d0 100%);
  border: 2px solid #10b981;
}

.comparison-item.unsecure {
  background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
  border: 2px solid #ef4444;
}

.comparison-item::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
  transform: rotate(45deg);
  transition: all 0.5s ease;
  opacity: 0;
}

.comparison-item:hover::before {
  opacity: 1;
  animation: shimmer 1.5s ease-in-out;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
  }
  100% {
    transform: translateX(100%) translateY(100%) rotate(45deg);
  }
}

.comparison-header {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.comparison-header i {
  font-size: 2rem;
  margin-right: 15px;
}

.secure .comparison-header i {
  color: #10b981;
}

.unsecure .comparison-header i {
  color: #ef4444;
}

.comparison-header h3 {
  margin: 0;
  font-size: 1.3rem;
}

.secure h3 {
  color: #065f46;
}

.unsecure h3 {
  color: #991b1b;
}

/* Dashboard Preview */
.dashboard-preview {
  background: #1e293b;
  border-radius: 15px;
  padding: 20px;
  margin: 30px 0;
  position: relative;
  overflow: hidden;
}

.dashboard-preview::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, transparent 30%, rgba(59, 130, 246, 0.1) 50%, transparent 70%);
  animation: scanLine 3s linear infinite;
}

@keyframes scanLine {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: between;
  margin-bottom: 20px;
  position: relative;
  z-index: 2;
}

.dashboard-title {
  color: #f1f5f9;
  font-size: 1.2rem;
  margin: 0;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #10b981;
  font-size: 0.9rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.2);
  }
}

.dashboard-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
  position: relative;
  z-index: 2;
}

.metric-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  padding: 15px;
  text-align: center;
  transition: all 0.3s ease;
}

.metric-card:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.metric-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #3b82f6;
  margin-bottom: 5px;
}

.metric-label {
  font-size: 0.8rem;
  color: #cbd5e1;
  margin: 0;
}

/* Case Study Boxes */
.case-study-box {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border-radius: 15px;
  padding: 30px;
  margin: 30px 0;
  position: relative;
  border-left: 5px solid #3b82f6;
  transition: all 0.3s ease;
}

.case-study-box:hover {
  transform: translateX(5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.case-study-header {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.case-study-icon {
  width: 50px;
  height: 50px;
  background: #3b82f6;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  color: white;
  font-size: 1.2rem;
}

.case-study-title {
  margin: 0;
  color: #1e293b;
  font-size: 1.3rem;
}

.case-study-content {
  color: #475569;
  line-height: 1.6;
}

.case-study-stats {
  display: flex;
  gap: 20px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e2e8f0;
}

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

.stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: #3b82f6;
  display: block;
}

.stat-label {
  font-size: 0.8rem;
  color: #64748b;
}

/* CTA Boxes */
.cta-box {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: white;
  border-radius: 15px;
  padding: 40px;
  text-align: center;
  margin: 40px 0;
  position: relative;
  overflow: hidden;
}

.cta-box::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  animation: rotate 10s linear infinite;
}

@keyframes rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.cta-content {
  position: relative;
  z-index: 2;
}

.cta-title {
  font-size: 2rem;
  margin-bottom: 15px;
  color: white;
}

.cta-description {
  font-size: 1.1rem;
  margin-bottom: 25px;
  opacity: 0.9;
}

.cta-button {
  display: inline-block;
  background: white;
  color: #3b82f6;
  padding: 12px 30px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  color: #1d4ed8;
}

/* Code Blocks */
.code-block {
  background: #1e293b;
  border-radius: 10px;
  padding: 20px;
  margin: 20px 0;
  position: relative;
  overflow-x: auto;
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: between;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #334155;
}

.code-language {
  color: #94a3b8;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.copy-button {
  background: #3b82f6;
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.copy-button:hover {
  background: #2563eb;
}

.code-content {
  color: #e2e8f0;
  font-family: "Courier New", monospace;
  font-size: 0.9rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

/* Network Diagrams */
.network-diagram {
  background: #f8fafc;
  border-radius: 15px;
  padding: 30px;
  margin: 30px 0;
  position: relative;
  overflow: hidden;
}

.network-nodes {
  display: flex;
  justify-content: space-around;
  align-items: center;
  position: relative;
}

.network-node {
  width: 60px;
  height: 60px;
  background: #3b82f6;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  position: relative;
  z-index: 2;
  animation: nodeGlow 3s ease-in-out infinite;
}

.network-node:nth-child(2n) {
  animation-delay: 1s;
}

.network-node:nth-child(3n) {
  animation-delay: 2s;
}

@keyframes nodeGlow {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
  }
  50% {
    box-shadow: 0 0 40px rgba(59, 130, 246, 0.8);
  }
}

.network-connections {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #3b82f6, transparent);
  animation: connectionPulse 2s ease-in-out infinite;
}

@keyframes connectionPulse {
  0%,
  100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

/* Screenshot Gallery */
.screenshot-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 30px 0;
}

.screenshot-item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.screenshot-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.screenshot-item img {
  width: 100%;
  height: auto;
  display: block;
}

.screenshot-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.7) 100%);
  display: flex;
  align-items: flex-end;
  padding: 20px;
  opacity: 0;
  transition: all 0.3s ease;
}

.screenshot-item:hover .screenshot-overlay {
  opacity: 1;
}

.screenshot-caption {
  color: white;
  font-size: 0.9rem;
  margin: 0;
}

/* Video Container */
.video-container {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  margin: 30px 0;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Responsive Design */
@media (max-width: 768px) {
  .firewall-diagram {
    flex-direction: column;
    gap: 20px;
  }

  .connection-line {
    width: 2px;
    height: 30px;
    margin: 10px 0;
  }

  .comparison-container {
    grid-template-columns: 1fr;
  }

  .dashboard-metrics {
    grid-template-columns: repeat(2, 1fr);
  }

  .case-study-stats {
    flex-direction: column;
    gap: 10px;
  }

  .network-nodes {
    flex-direction: column;
    gap: 30px;
  }

  .network-connections {
    width: 2px;
    height: 100%;
    left: 50%;
    top: 0;
    background: linear-gradient(to bottom, transparent, #3b82f6, transparent);
  }

  .screenshot-gallery {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .dashboard-metrics {
    grid-template-columns: 1fr;
  }

  .cta-title {
    font-size: 1.5rem;
  }

  .cta-description {
    font-size: 1rem;
  }
}
