/* Solutions Portal Styles */

.page-hero {
  height: 40vh;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  position: relative;
  color: #fff;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
}
.page-hero .hero-content {
  position: relative;
  z-index: 1;
}

/* Layout */
.solutions-layout {
  display: flex;
  gap: 3rem;
  align-items: flex-start;
}
.solutions-sidebar {
  flex: 0 0 250px;
  position: sticky;
  top: 100px;
  background: #f8f9fa;
  padding: 2rem;
  border-radius: var(--radius-lg);
}
.sidebar-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--color-dark);
}
.category-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.cat-btn {
  width: 100%;
  text-align: left;
  padding: 0.75rem 1rem;
  border: none;
  background: transparent;
  color: var(--color-text);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1rem;
}
.cat-btn:hover {
  background: rgba(0,0,0,0.05);
}
.cat-btn.active {
  background: var(--color-primary);
  color: #fff;
  font-weight: 600;
}

.solutions-main {
  flex: 1;
}

/* Article Cards */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}
.article-card {
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
.article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.article-card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}
.article-card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.article-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--color-gray);
  margin-bottom: 0.5rem;
}
.article-category {
  color: var(--color-primary);
  font-weight: 600;
}
.article-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.4;
  color: var(--color-dark);
}
.article-card-summary {
  font-size: 0.95rem;
  color: var(--color-text);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex: 1;
}
.article-card-footer {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.article-tag {
  background: #f1f3f5;
  color: var(--color-gray);
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

/* Modal Article Reader */
.article-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.8);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 2rem;
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.article-modal.open {
  opacity: 1;
  pointer-events: auto;
}
.article-modal-content {
  background: #fff;
  width: 100%;
  max-width: 800px;
  border-radius: var(--radius-lg);
  position: relative;
  margin: 2rem auto;
  transform: translateY(20px);
  transition: transform 0.3s ease;
  min-height: 80vh;
}
.article-modal.open .article-modal-content {
  transform: translateY(0);
}
.close-article {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 2rem;
  background: none;
  border: none;
  color: var(--color-gray);
  cursor: pointer;
  z-index: 10;
}
.close-article:hover {
  color: var(--color-dark);
}

/* Reader Typography */
.reader-header {
  padding: 3rem 3rem 1.5rem 3rem;
  text-align: center;
  border-bottom: 1px solid #eee;
}
.reader-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.3;
}
.reader-meta {
  color: var(--color-gray);
  font-size: 0.9rem;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}
.reader-cover {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  display: block;
}
.reader-body {
  padding: 2rem 3rem 4rem 3rem;
  font-size: 1.1rem;
  line-height: 1.8;
  color: #333;
}
.reader-body p {
  margin-bottom: 1.5rem;
}
.reader-body h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 2rem 0 1rem 0;
  color: var(--color-dark);
}
.reader-body h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 1.5rem 0 1rem 0;
}
.reader-body img {
  max-width: 100%;
  border-radius: var(--radius-md);
  margin: 1.5rem 0;
}
.reader-body .img-caption {
  text-align: center;
  font-size: 0.85rem;
  color: var(--color-gray);
  margin-top: -1rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
  .solutions-layout {
    flex-direction: column;
  }
  .solutions-sidebar {
    width: 100%;
    position: static;
  }
  .category-list {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .cat-btn {
    width: auto;
  }
  .reader-header, .reader-body {
    padding: 1.5rem;
  }
  .reader-title {
    font-size: 1.5rem;
  }
  .article-modal {
    padding: 0;
  }
  .article-modal-content {
    margin: 0;
    border-radius: 0;
    min-height: 100vh;
  }
  .close-article {
    top: 0.5rem;
    right: 1rem;
    background: rgba(255,255,255,0.8);
    border-radius: 50%;
    width: 40px;
    height: 40px;
  }
}
