/* article-styles.css */
:root {
  --primary-color: #2563eb;
  --primary-dark: #1e40af;
  --secondary-color: #64748b;
  --danger-color: #ef4444;
  --card-bg: #ffffff;
  --text-color: #1e293b;
  --hover-bg: #f1f5f9;
}

.articles-main {
  background-color: var(--cyber-dark);
  position: relative;
  overflow: hidden;
  padding: 60px 0;
  min-height: 600px;

  animation: fadeIn 1.2s ease-out;
}

/* Animations */
@keyframes fadeIn {

    from { opacity: 0; }
    to { opacity: 1; }
}

.container {
  position: relative;
  background-color: rgba(0, 27, 61, 0.8);
  border: 1px solid var(--cyber-primary);
  box-shadow: var(--cyber-glow);
  padding: 40px 30px;
  z-index: 2;
}

/* Shield Emblem */
.cyber-shield-emblem {
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, 
      rgba(0, 163, 255, 0.05) 0%, 
      rgba(0, 255, 179, 0.03) 30%, 
      transparent 70%);
  border-radius: 50%;
  z-index: 0;
}

.cyber-shield-emblem::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  height: 500px;
  background: conic-gradient(
      from 0deg, 
      transparent 0deg, 
      var(--cyber-primary) 10deg, 
      transparent 30deg,
      transparent 60deg,
      var(--cyber-accent) 70deg,
      transparent 90deg,
      transparent 120deg,
      var(--cyber-primary) 130deg,
      transparent 150deg,
      transparent 180deg,
      var(--cyber-accent) 190deg,
      transparent 210deg,
      transparent 240deg,
      var(--cyber-primary) 250deg,
      transparent 270deg,
      transparent 300deg,
      var(--cyber-accent) 310deg,
      transparent 330deg
  );
  border-radius: 50%;
  opacity: 0.5;
  animation: rotate 30s linear infinite;
}

@keyframes rotate {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Network Nodes */
.secure-network-nodes {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.secure-network-nodes span {
  position: absolute;
  width: 10px;
  height: 10px;
  background: var(--cyber-primary);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--cyber-primary);
}

.secure-network-nodes span:nth-child(1) {
  top: 20%;
  left: 15%;
  animation: pulse 3s infinite;
}

.secure-network-nodes span:nth-child(2) {
  top: 70%;
  left: 25%;
  animation: pulse 4s infinite 0.5s;
}

.secure-network-nodes span:nth-child(3) {
  top: 30%;
  right: 20%;
  animation: pulse 3.5s infinite 1s;
}

.secure-network-nodes span:nth-child(4) {
  bottom: 15%;
  right: 15%;
  animation: pulse 4.5s infinite 1.5s;
}

.secure-network-nodes span:nth-child(5) {
  top: 50%;
  left: 50%;
  animation: pulse 5s infinite 2s;
}

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


.articles-header {
  text-align: center;
  margin-bottom: 40px;
}

.articles-header h1 {
  font-size: 2.5rem;
  color: var(--cyber-light);
  margin-bottom: 10px;
}

.articles-header p {
  font-size: 1.1rem;
  color: #c2c2c2;
}

.articles-grid {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 30px;
}

.article-card {
  width: 100%;
  max-width: 400px;
  background-color: var(--card-bg);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;

  opacity: 0;
  animation: slideInUp 0.6s ease-out forwards;
}

.article-card:nth-child(1) { animation-delay: 0.1s; }
.article-card:nth-child(2) { animation-delay: 0.2s; }
.article-card:nth-child(3) { animation-delay: 0.3s; }
.article-card:nth-child(4) { animation-delay: 0.4s; }
.article-card:nth-child(5) { animation-delay: 0.5s; }
.article-card:nth-child(6) { animation-delay: 0.6s; }

@keyframes slideInUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}


.article-card:hover {
  cursor: pointer;
  transform: translateY(-5px);
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.article-thumbnail {
  height: 200px;
  overflow: hidden;
}

.article-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.article-card:hover .article-thumbnail img {
  transform: scale(1.05);
}

.article-info {
  padding: 20px;
}

.article-info h2 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: var(--text-color);
}

.article-info p {
  margin: 0;
  margin-top: 10px;
}

.article-info h6 {
  margin: 0;
  margin-top: 10px;
}

.article-meta {
  font-size: 0.9rem;
  color: var(--secondary-color);
  margin-bottom: 15px;
}

.article-excerpt {
  font-size: 1rem;
  color: var(--text-color);
  margin-bottom: 20px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.read-more {
  display: inline-block;
  padding: 8px 16px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 4px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.3s;
}

.read-more:hover {
  background-color: var(--primary-dark);
}

.loading {
  text-align: center;
  padding: 40px;
  color: var(--secondary-color);
  grid-column: 1 / -1;
}

.no-articles, .error {
  text-align: center;
  padding: 60px 20px;
  color: var(--secondary-color);
  grid-column: 1 / -1;
}

.error {
  color: var(--danger-color);
}

/* Single Article View Styles */
.article-content {
  background-color: var(--card-bg);
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.article-header {
  margin-bottom: 30px;
}

.article-header h1 {
  font-size: 2.5rem;
  color: var(--text-color);
  margin-bottom: 15px;
}

.article-featured-image {
  margin-bottom: 30px;
  border-radius: 8px;
  overflow: hidden;
}

.article-featured-image img {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
}

.article-body {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-color);
}

.article-body h2 {
  font-size: 1.8rem;
  margin: 30px 0 15px;
}

.article-body h3 {
  font-size: 1.5rem;
  margin: 25px 0 15px;
}

.article-body p {
  margin-bottom: 20px;
}

.article-body ul, .article-body ol {
  margin-bottom: 20px;
  padding-left: 30px;
}

.article-body li {
  margin-bottom: 10px;
}

.article-body img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 20px 0;
}

.article-body blockquote {
  border-left: 4px solid var(--primary-color);
  padding-left: 20px;
  margin: 20px 0;
  font-style: italic;
  color: var(--secondary-color);
}

.article-body pre {
  background-color: var(--hover-bg);
  padding: 15px;
  border-radius: 4px;
  overflow-x: auto;
  margin: 20px 0;
}

.article-body code {
  background-color: var(--hover-bg);
  padding: 3px 5px;
  border-radius: 4px;
  font-family: monospace;
}

.article-navigation {
  margin-top: 30px;
  text-align: center;
}

.back-btn {
  display: inline-block;
  padding: 10px 20px;
  background-color: var(--secondary-color);
  color: white;
  border: none;
  border-radius: 4px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s;
}

.back-btn:hover {
  background-color: #475569;
}

.article-error {
  text-align: center;
  padding: 60px 20px;
}

.article-error h2 {
  font-size: 1.8rem;
  color: var(--danger-color);
  margin-bottom: 15px;
}

.article-error p {
  font-size: 1.1rem;
  color: var(--secondary-color);
  margin-bottom: 20px;
}

/* Responsive Styles */
@media (max-width: 768px) {

  .article-header h1 {
    font-size: 2rem;
  }

  .article-body {
    font-size: 1rem;
  }
}