/* Main Container */
.blog-page {
  background-color: #ffffff;
  padding: 0;
}

.view-content.row {
  grid-column-gap: 1.5rem;
  grid-row-gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  display: grid;
  max-width: 100%;
  margin: 0 auto;
}

@media (min-width: 640px) {
  .view-content.row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .view-content.row {
    grid-template-columns: repeat(3, 1fr);
  }
}

.blog-container {
  max-width: 100%;
  margin: 0 auto;
  padding: 0;
}

/* Header Section */
.blog-header {
  margin-bottom: 2rem;
  background-color: #ffffff;
  border-radius: 1rem;
}

.blog-title {
  font-size: 2.5rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 2rem;
  line-height: 1.2;
}

/* Controls Section */
.blog-controls {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.search-container {
  position: relative;
  max-width: 20rem;
  width: 20rem;
}

.search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  font-size: 1rem;
  background-color: #ffffff;
  transition: border-color 0.2s ease;
}

.search-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #6b7280;
  pointer-events: none;
}

/* Filter Container */
.filter-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.filter-pills {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-pill {
  padding: 0.5rem 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 2rem;
  background-color: #ffffff;
  color: #374151;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-pill:hover {
  border-color: #3b82f6;
  color: #3b82f6;
}

.filter-pill.active {
  background-color: var(--taevas-blue);
  border-color: var(--taevas-blue);
  color: #ffffff;
}

/* Category Dropdown */
.category-dropdown {
  position: relative;
}

.dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  background-color: #ffffff;
  color: #374151;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dropdown-toggle:hover {
  border-color: #3b82f6;
  color: #3b82f6;
}

.dropdown-icon {
  transition: transform 0.2s ease;
}

.dropdown-toggle.active .dropdown-icon {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  z-index: 50;
  display: none;
  margin-top: 0.25rem;
}

.dropdown-menu.active {
  display: block;
}

.dropdown-item {
  display: block;
  padding: 0.75rem 1rem;
  color: #374151;
  text-decoration: none;
  font-size: 0.875rem;
  transition: background-color 0.2s ease;
}

.dropdown-item:hover {
  background-color: #f3f4f6;
}

/* Blog Grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
  align-items: stretch;
}

@media (min-width: 768px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .blog-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Blog Cards - Gynger Screenshot Style */
.blog-card {
  background-color: #ffffff;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border: 1px solid #f3f4f6;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.15);
}

.blog-card-link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

/* Visual Section - Match Screenshot Style */
.blog-card-visual {
  height: 220px;
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Blog Card Image */
.blog-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.visual-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  opacity: 0.7;
  font-size: 0.875rem;
}

/* Content Section - Clean Layout */
.blog-card-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-card-meta {
  margin-bottom: 0.75rem;
}

.blog-category {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background-color: #f3f4f6;
  color: #6b7280;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 0.375rem;
}

.blog-card-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1f2937;
  line-height: 1.4;
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 3.15rem;
}

.blog-card-excerpt {
  color: #6b7280;
  font-size: 0.875rem;
  line-height: 1.5;
  margin-bottom: 1.25rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Author Section - Clean Design */
.blog-card-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: auto;
}

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

.author-info {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.author-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  line-height: 1.2;
}

.publish-date {
  font-size: 0.75rem;
  color: #9ca3af;
  margin-top: 0.125rem;
}

/* DSO Chart Visual */
.visual-dso-chart {
  width: 100%;
  height: 100%;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.dso-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dso-paid {
  background-color: #10b981;
  color: #ffffff;
  padding: 0.25rem 0.75rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.dso-amount {
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: 700;
}

.dso-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #ffffff;
  font-size: 0.75rem;
}

.dso-percentage {
  color: #ef4444;
  font-weight: bold;
}

.dso-arrow {
  color: #ef4444;
  font-weight: bold;
}

/* Network Chart Visual */
.visual-network-chart {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.network-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #ffffff;
  z-index: 2;
}

.network-top {
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  color: #ffffff;
  opacity: 0.7;
}

.network-left {
  position: absolute;
  top: 50%;
  left: 20%;
  transform: translateY(-50%);
  color: #ffffff;
  opacity: 0.7;
}

.network-right {
  position: absolute;
  top: 50%;
  right: 20%;
  transform: translateY(-50%);
  color: #ffffff;
  opacity: 0.7;
}

/* Cashflow Chart Visual */
.visual-cashflow-chart {
  width: 100%;
  height: 100%;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.cashflow-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cashflow-label {
  color: #ffffff;
  font-size: 0.875rem;
  opacity: 0.8;
}

.cashflow-amount {
  color: #10b981;
  font-size: 1.25rem;
  font-weight: 700;
}

.cashflow-bars {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  height: 60px;
}

.cashflow-bar {
  flex: 1;
  background-color: #ffffff;
  border-radius: 0.25rem 0.25rem 0 0;
  opacity: 0.8;
  min-height: 20px;
}

/* Filter Widget Visual */
.visual-filter-widget {
  width: 100%;
  height: 100%;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.filter-toggles {
  display: flex;
  gap: 0.5rem;
}

.filter-toggle {
  padding: 0.25rem 0.75rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  color: #ffffff;
  opacity: 0.7;
  cursor: pointer;
}

.filter-toggle.active {
  background-color: #ffffff;
  color: #1e293b;
  opacity: 1;
}

.filter-options {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-option {
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  color: #ffffff;
  opacity: 0.7;
  cursor: pointer;
}

.filter-option.active {
  background-color: #ffffff;
  color: #1e293b;
  opacity: 1;
}

/* Growth Nodes Visual */
.visual-growth-nodes {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.growth-node {
  position: absolute;
  border-radius: 50%;
  background-color: #10b981;
  opacity: 0.8;
}

.growth-node.large {
  width: 60px;
  height: 60px;
  top: 20%;
  left: 20%;
}

.growth-node.medium {
  width: 40px;
  height: 40px;
  top: 60%;
  right: 20%;
}

.growth-node.small {
  width: 25px;
  height: 25px;
  bottom: 20%;
  left: 50%;
  transform: translateX(-50%);
}

.growth-node.tiny {
  width: 15px;
  height: 15px;
  top: 40%;
  right: 40%;
}

/* Blog Card Image */
.blog-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.visual-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  opacity: 0.5;
}

/* Content Section */
.blog-card-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-card-meta {
  margin-bottom: 1rem;
}

.blog-category {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background-color: #cbcbcb;
  color: #374151;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 0.5rem;
}

.blog-card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.4;
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 5.25rem; /* Ensure minimum height for 3 lines (1.25rem * 1.4 * 3) */
}

.blog-card-excerpt {
  color: #6b7280;
  font-size: 0.875rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 4.2em;
}

/* Author Section */
.blog-card-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.author-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.author-info {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  flex: 1;
}

.author-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
}

.publish-date {
  font-size: 0.75rem;
  color: #6b7280;
}

/* Load More */
.load-more-container {
  display: flex;
  justify-content: center;
  margin-top: 3rem;
}

.load-more-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  color: #374151;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.load-more-btn:hover {
  border-color: #3b82f6;
  color: #3b82f6;
}

.load-more-icon {
  transition: transform 0.2s ease;
}

.load-more-btn:hover .load-more-icon {
  transform: translateY(2px);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem;
  color: #6b7280;
}

/* Responsive Design - Match Screenshots */
@media (max-width: 768px) {
  .blog-page {
    padding: 0;
  }
  
  .blog-container {
    padding: 0;
  }
  
  .blog-header {
    padding: 0;
    margin-bottom: 1.5rem;
  }
  
  .search-filter-row {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .search-container {
    max-width: 100%;
    width: 100%;
  }
  
  .filter-container {
    padding: 1.25rem;
  }
  
  .filter-dropdowns {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  
  .view-content.row {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 0;
  }
  
  .blog-card-visual {
    height: 200px;
  }
  
  .blog-card-content {
    padding: 1.25rem;
  }
  
  .blog-card-title {
    font-size: 1rem;
    min-height: 2.8rem;
  }
  
  .load-more-container {
    margin-top: 2rem;
  }
  
  .pagination-dots {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
  }
}

@media (max-width: 480px) {
  .blog-page {
    padding: 0;
  }
  
  .blog-header {
    padding: 0;
    border-radius: 0.75rem;
  }
  
  .search-input,
  .filter-toggle-btn {
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    font-size: 0.875rem;
  }
  
  .search-input {
    padding-left: 2.5rem;
  }
  
  .blog-card-content {
    padding: 1rem;
  }
  
  .blog-card-title {
    font-size: 0.95rem;
    line-height: 1.3;
  }
  
  .blog-card-excerpt {
    font-size: 0.8rem;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }
  
  .author-avatar {
    width: 32px;
    height: 32px;
  }
  
  .author-name {
    font-size: 0.8rem;
  }
  
  .publish-date {
    font-size: 0.7rem;
  }
}

/* Updated Filter Styles - Screenshot Design */
.search-filter-row {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

@media (min-width: 640px) {
  .search-filter-row {
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
  }
}

.search-container {
  position: relative;
  flex: 1;
  max-width: 100%;
}

@media (min-width: 640px) {
  .search-container {
    max-width: 300px;
    width: 300px;
    flex: none;
  }
}

.search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  background-color: #f9fafb;
  transition: all 0.2s ease;
  color: #6b7280;
}

.search-input:focus {
  outline: none;
  border-color: #3b82f6;
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  color: #1f2937;
}

.search-input::placeholder {
  color: #9ca3af;
}

.search-icon {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  pointer-events: none;
}

.filter-toggle-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  background-color: #f9fafb;
  color: #6b7280;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  min-width: fit-content;
}

.filter-toggle-btn:hover {
  border-color: #9ca3af;
  background-color: #ffffff;
  color: #374151;
}

.filter-toggle-btn.active {
  background-color: var(--taevas-blue);
  border-color: var(--taevas-blue);
  color: #ffffff;
}

.filter-chevron {
  transition: transform 0.2s ease;
  width: 16px;
  height: 16px;
}

.filter-toggle-btn.active .filter-chevron {
  transform: rotate(180deg);
}

.filter-container {
  display: none;
  padding: 0.5rem;
  background-color: #f2f2f2;
  border: 1px solid #f3f4f6;
  border-radius: 1rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.filter-container.active {
  display: block;
}

.filter-dropdowns {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .filter-dropdowns {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .filter-dropdowns {
    grid-template-columns: repeat(3, 1fr);
  }
}

.filter-dropdown {
  width: 100%;
}

.filter-select {
  width: 100%;
  padding: 0.75rem 2.5rem 0.75rem 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  background-color: #ffffff;
  color: #374151;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.75rem center;
  background-repeat: no-repeat;
  background-size: 1em 1em;
}

.filter-select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.filter-select:hover {
  border-color: #9ca3af;
}

/* Load More Button - Screenshot Style */
.load-more-container {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.load-more-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  background-color: #ffffff;
  color: #6b7280;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.load-more-btn:hover {
  border-color: #3b82f6;
  color: #3b82f6;
  background-color: #f8fafc;
}

.load-more-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.load-more-icon {
  transition: transform 0.2s ease;
  width: 16px;
  height: 16px;
}

.load-more-btn:hover .load-more-icon {
  transform: translateY(2px);
}

/* Pagination Dots - Like Screenshot */
.pagination-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.pagination-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #d1d5db;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pagination-dots .dot.active {
  background-color: #1f2937;
  width: 10px;
  height: 10px;
}

.pagination-dots .dot:hover {
  background-color: #9ca3af;
}

/* Hide the default Drupal pager for blog grid */
ul.js-pager__items.pagination {
  display: none !important;
}