/* Inherit variables from main styles */
:root {
  --primary: #ff4655; /* Valorant Red */
  --primary-hover: #ff6b77; /* Lighter Red for hovers */
  --bg-dark: #0f1217;
  --bg-panel: #1a1d24; /* Slightly lighter background for cards/tables */
  --text-main: #f0f0f0; /* Almost white for better readability */
  --text-muted: #a0aebf; /* Lightened for better contrast against dark bg */
  --border: rgba(255, 255, 255, 0.12);
  --link-color: #ff4655;
}

body {
  overflow-y: auto !important;
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
  line-height: 1.6;
}

/* --- Navigation --- */
.blog-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 5%;
  background: rgba(15, 18, 23, 0.95);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.blog-logo {
  font-size: 1.5rem;
  font-weight: 800;
  text-transform: uppercase;
  color: white;
  text-decoration: none;
  letter-spacing: 1px;
}

.blog-logo span {
  color: var(--primary);
}

.back-btn {
  padding: 10px 24px;
  background: rgba(255, 255, 255, 0.05);
  color: white;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 600;
  border: 1px solid var(--border);
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.back-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: translateY(-1px);
}

/* --- Layout --- */
.blog-container {
  max-width: 900px; /* Slightly narrower for better reading experience */
  margin: 40px auto;
  padding: 0 20px;
  min-height: 80vh;
}

/* --- Grid View (Home) --- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
}

.blog-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.blog-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: #222;
  border-bottom: 1px solid var(--border);
}

.card-content {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-date {
  font-size: 0.75rem;
  color: var(--primary);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.card-title {
  font-size: 1.4rem;
  margin: 0 0 12px 0;
  line-height: 1.3;
  color: #fff;
}

.card-excerpt {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 20px;
}

.read-more {
  color: var(--primary);
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: auto;
}

/* --- Article View --- */
.article-view {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  padding: 40px 50px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.article-header {
  margin-bottom: 40px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 30px;
}

.article-title {
  font-size: 2.5rem;
  line-height: 1.2;
  margin: 0 0 15px 0;
  color: white;
}

.article-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  display: flex;
  gap: 20px;
}

/* --- Article Body Typography --- */
.article-body {
  font-size: 1.125rem; /* 18px for better readability */
  line-height: 1.8;
  color: #e6e6e6; /* High contrast off-white */
}

/* Headings inside article */
.article-body h2 {
  color: white;
  margin-top: 50px;
  margin-bottom: 20px;
  font-size: 1.8rem;
  border-left: 4px solid var(--primary);
  padding-left: 15px;
}

.article-body h3 {
  color: #fff;
  margin-top: 30px;
  font-size: 1.4rem;
}

/* Paragraphs */
.article-body p {
  margin-bottom: 24px;
}

/* Strong/Bold text */
.article-body strong {
  color: white;
  font-weight: 700;
}

/* Links inside the body */
.article-body a {
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.2s;
  font-weight: 600;
}

.article-body a:hover {
  color: var(--primary-hover);
  border-bottom: 1px solid var(--primary-hover);
}

/* Images */
.blog-img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 30px 0;
  border: 1px solid var(--border);
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* --- Lists Styles --- */
.article-body ul, 
.article-body ol {
  margin-bottom: 24px;
  padding-left: 25px;
  color: var(--text-muted);
}

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

/* --- Table Styles (For Pro Settings) --- */
.article-body table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 30px 0;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  font-size: 0.95rem;
}

.article-body th {
  background: var(--primary);
  color: white;
  font-weight: bold;
  padding: 15px;
  text-align: left;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 1px;
}

.article-body td {
  padding: 15px;
  border-bottom: 1px solid var(--border);
  color: #ddd;
}

.article-body tr:last-child td {
  border-bottom: none;
}

.article-body tr:hover td {
  background: rgba(255, 255, 255, 0.05);
}

/* --- Footer --- */
.blog-footer {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  margin-top: 60px;
  font-size: 0.9rem;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }
  
  .article-view {
    padding: 25px 20px;
  }
  
  .article-title {
    font-size: 1.8rem;
  }
  
  .article-body {
    font-size: 1rem;
  }
  
  .article-body table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}