/* Blog Page Styles */
:root {
  --primary: #2C3E50;
  --secondary: #34495E;
  --accent: #6BB73A; /* Green from logo */
  --accent-hover: #5da332;
  --text-dark: #333333;
  --text-light: #666666;
  --white: #ffffff;
  --light-gray: #f8f9fa;
  --border-color: #e2e8f0;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --radius: 12px;
}

/* Reusing Global Styles from index.css where possible, but defining specific blog needs */
body {
  background-color: var(--white);
}

/* Blog Hero */
.blog-hero {
  background-color: var(--secondary);
  background-image: 
    radial-gradient(circle at 20% 50%, rgba(107, 183, 58, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(83, 152, 218, 0.15) 0%, transparent 50%),
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 40px 40px, 40px 40px;
  animation: techPulse 8s ease-in-out infinite alternate;
  padding: 180px 5% 80px;
  position: relative;
  overflow: hidden;
  color: var(--white);
}

@keyframes techPulse {
  0% { background-position: 0 0, 0 0, 0 0, 0 0; }
  100% { background-position: 20px 20px, -20px -20px, 0 0, 0 0; }
}

.blog-hero-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.blog-hero-text h1 {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.blog-hero-text .highlight {
  color: var(--accent);
}

.blog-hero-text p {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2.5rem;
  max-width: 500px;
}

.subscribe-form {
  display: flex;
  gap: 1rem;
  max-width: 500px;
  background: var(--white);
  padding: 0.5rem;
  border-radius: 50px;
  box-shadow: var(--shadow);
}

.subscribe-form input {
  flex: 1;
  border: none;
  padding: 1rem 1.5rem;
  border-radius: 50px;
  outline: none;
  font-size: 1rem;
}

.subscribe-form button {
  background: #3b82f6;
  color: var(--white);
  border: none;
  padding: 0.8rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
}

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

.blog-hero-visual {
  position: relative;
  height: 400px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* 3D Shape Container */
#hero-3d-container {
  width: 100%;
  height: 400px; /* Adjust as needed */
  display: block;
  /* Fade out edges to prevent symbol clipping */
  -webkit-mask-image: radial-gradient(ellipse at center, black 60%, transparent 100%);
  mask-image: radial-gradient(ellipse at center, black 60%, transparent 100%);
}

/* Remove old CSS shape styles */
.hero-shape {
  display: none;
}

/* Category Quick Links */
.blog-categories-nav {
  padding: 4rem 5%;
  background: var(--white);
}

.categories-container {
  max-width: 1200px;
  margin: 0 auto;
}

.categories-header {
  margin-bottom: 2rem;
}

.categories-header h2 {
  font-size: 1.5rem;
  color: var(--primary);
  font-weight: 700;
}

.categories-header p {
  color: var(--text-light);
}

.categories-grid {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.category-nav-card {
  flex: 1;
  min-width: 250px;
  background: var(--white);
  padding: 2rem;
  border-radius: 20px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
  color: inherit;
}

.category-nav-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.cat-icon {
  width: 50px;
  height: 50px;
  background: rgba(83, 152, 218, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.category-nav-card h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--primary);
}

.category-link {
  color: var(--text-dark);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Featured Section */
.featured-section {
  padding: 4rem 5%;
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  font-size: 1.5rem;
  color: var(--primary);
  margin-bottom: 2rem;
  font-weight: 800;
}

.featured-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 2rem;
}

.featured-main-card {
  background: var(--white);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.featured-main-card:hover {
  transform: translateY(-5px);
}

.featured-image {
  width: 100%;
  height: 350px;
  object-fit: cover;
}

.featured-content {
  padding: 2rem;
}

.tag {
  background: rgba(107, 183, 58, 0.1);
  color: var(--accent);
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 600;
  display: inline-block;
  margin-bottom: 1rem;
}

.featured-main-card h2 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
  color: var(--primary);
  line-height: 1.3;
}

.meta-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-light);
  font-size: 0.9rem;
  margin-top: auto;
}

.featured-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sidebar-card {
  background: var(--white);
  padding: 1.5rem;
  border-radius: 16px;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease;
}

.sidebar-card:hover {
  transform: translateX(5px);
}

.sidebar-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--primary);
  line-height: 1.4;
}

/* Category Sections */
.category-section {
  padding: 4rem 5%;
  background: var(--white);
}

.category-section.alt-bg {
  background: var(--white); /* Was var(--light-gray) */
}

.cat-container {
  max-width: 1200px;
  margin: 0 auto;
}

.cat-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.cat-badge {
  width: 40px;
  height: 40px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.article-card {
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
  color: var(--text-dark); /* Ensure black text */
  display: flex;
  flex-direction: column;
  height: 100%;
}

.article-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.article-img-thumb {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.article-card-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.article-card h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--primary);
  line-height: 1.4;
}

.explore-btn-container {
  margin-top: 2rem;
  text-align: right;
}

.explore-btn {
  background: var(--accent);
  color: var(--white);
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  display: inline-block;
  transition: background 0.3s ease;
}

.explore-btn:hover {
  background: var(--accent-hover);
}

/* Single Article Page */
.article-page-container {
  max-width: 800px;
  margin: 150px auto 4rem;
  padding: 0 5%;
  background: var(--white);
}

.article-header {
  margin-bottom: 2rem;
  text-align: left;
}

.article-breadcrumbs {
  margin-bottom: 1rem;
  color: var(--text-light);
  font-size: 0.9rem;
}

.article-breadcrumbs a {
  color: #3b82f6;
  text-decoration: none;
}

.article-title {
  font-size: 2.5rem;
  color: var(--primary);
  font-weight: 800;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.author-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--secondary);
}

.author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #ddd;
  object-fit: cover;
}

.article-date {
  color: var(--text-light);
}

.article-featured-image {
  width: 100%;
  height: auto;
  border-radius: 20px;
  margin-bottom: 3rem;
  box-shadow: var(--shadow-lg);
}

.article-body {
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--text-dark);
}

.article-body p {
  margin-bottom: 1.5rem;
}

.article-body h2 {
  font-size: 1.8rem;
  color: var(--primary);
  margin-top: 3rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
}

.article-body ul {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.article-body li {
  margin-bottom: 0.5rem;
}

/* Responsive */
@media (max-width: 1024px) {
  .blog-hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3rem;
  }

  .blog-hero-visual {
    order: -1; /* Visual first on tablets/mobile */
    height: 350px;
  }

  #hero-3d-container {
    height: 350px;
  }

  .blog-hero-text p, .subscribe-form {
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 768px) {
  .blog-hero {
    padding-top: 120px;
    padding-bottom: 4rem;
  }

  .blog-hero-text h1 {
    font-size: 2.5rem;
  }

  .blog-hero-visual {
    height: 300px;
  }

  #hero-3d-container {
    height: 300px;
  }
  
  .featured-grid {
    grid-template-columns: 1fr;
  }
  
  .article-title {
    font-size: 2rem;
  }
}
