/* 
 * Infographics Page Styles
 * Contains all styles specific to the infographics listing and single infographic pages
 */

/* Infographics hero section */
.infographics-hero {
  background-color: #f8f9fa;
  padding: 5rem 0;
  text-align: center;
}

.infographics-hero h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.infographics-hero p {
  font-size: 1.25rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 2rem;
}

/* Infographics filters */
.infographics-filters {
  padding: 3rem 0;
  background-color: #fff;
}

.filter-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.filter-button {
  padding: 0.5rem 1.5rem;
  border-radius: 2rem;
  background-color: #f8f9fa;
  color: #495057;
  border: none;
  font-weight: 500;
  transition: all 0.2s ease;
}

.filter-button:hover {
  background-color: #e9ecef;
}

.filter-button.active {
  background-color: #0056b3;
  color: #fff;
}

.search-container {
  max-width: 500px;
  margin: 0 auto;
}

.search-form {
  display: flex;
}

.search-form .form-control {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-right: none;
}

.search-form .btn {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

/* Infographics grid */
.infographics-grid {
  padding: 3rem 0 5rem;
}

/* Load More functionality - Initially hide content after first 6 */
.content1 {
  display: none !important;
}

/* Show first 6 items by default - using data-index attributes */
#infographicsContainer .content1[data-index="0"],
#infographicsContainer .content1[data-index="1"],
#infographicsContainer .content1[data-index="2"],
#infographicsContainer .content1[data-index="3"],
#infographicsContainer .content1[data-index="4"],
#infographicsContainer .content1[data-index="5"] {
  display: block !important;
}

/* Override for visible items - JavaScript will add this class */
.content1.show {
  display: block !important;
}

/* Load More button */
.load-more-container {
  text-align: center;
  margin-top: 3rem;
  margin-bottom: 2rem;
}

.load-more-btn {
  padding: 0.75rem 2rem;
  font-weight: 500;
  transition: all 0.3s ease;
  border: none;
  border-radius: 0.375rem;
}

.load-more-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 86, 179, 0.3);
}

.load-more-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Hide Load More button when no more content */
.noContent1 {
  display: none !important;
}

.infographic-card {
  margin-bottom: 2rem;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  height: 100%;
  position: relative;
}

.infographic-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.infographic-image {
  position: relative;
  height: 350px;
  overflow: hidden;
}

.infographic-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.infographic-card:hover .infographic-image img {
  transform: scale(1.05);
}

.infographic-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.7));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  color: #fff;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.infographic-card:hover .infographic-overlay {
  opacity: 1;
}

.infographic-category {
  display: inline-block;
  background-color: #0056b3;
  color: #fff;
  font-size: 0.8rem;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  margin-bottom: 0.75rem;
}

.infographic-overlay h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.infographic-overlay p {
  margin-bottom: 1rem;
}

.infographic-actions {
  display: flex;
  gap: 1rem;
}

.infographic-actions .btn {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

/* Single infographic page */
.single-infographic {
  padding: 5rem 0;
}

.infographic-header {
  margin-bottom: 3rem;
  text-align: center;
}

.infographic-header .infographic-category {
  margin-bottom: 1rem;
}

.infographic-header h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.infographic-header .infographic-meta {
  color: #6c757d;
  margin-bottom: 2rem;
}

.infographic-header .infographic-meta span {
  margin: 0 0.5rem;
}

.infographic-content {
  margin-bottom: 3rem;
}

.infographic-full-image {
  margin-bottom: 3rem;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.infographic-full-image img {
  width: 100%;
}

.infographic-description {
  max-width: 800px;
  margin: 0 auto 3rem;
}

.infographic-description h2 {
  margin-bottom: 1.5rem;
}

.infographic-description p {
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.infographic-stats {
  background-color: #f8f9fa;
  padding: 3rem;
  border-radius: 0.5rem;
  margin-bottom: 3rem;
}

.infographic-stats h2 {
  margin-bottom: 2rem;
  text-align: center;
}

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

.stat-card {
  background-color: #fff;
  padding: 2rem;
  border-radius: 0.5rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.stat-card .stat-value {
  font-size: 3rem;
  font-weight: 700;
  color: #0056b3;
  margin-bottom: 1rem;
}

.stat-card .stat-label {
  font-weight: 500;
}

.infographic-sources {
  margin-bottom: 3rem;
}

.infographic-sources h2 {
  margin-bottom: 1.5rem;
}

.infographic-sources ul {
  list-style: none;
  padding-left: 0;
}

.infographic-sources li {
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e9ecef;
}

.infographic-sources li:last-child {
  border-bottom: none;
}

.infographic-sources a {
  color: #0056b3;
  text-decoration: none;
  transition: color 0.2s ease;
}

.infographic-sources a:hover {
  color: #004494;
  text-decoration: underline;
}

.infographic-share {
  margin-bottom: 3rem;
  text-align: center;
}

.infographic-share h2 {
  margin-bottom: 1.5rem;
}

.share-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.share-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: #f8f9fa;
  color: #495057;
  font-size: 1.5rem;
  transition: all 0.2s ease;
}

.share-button:hover {
  transform: translateY(-3px);
}

.share-button.facebook {
  color: #4267B2;
}

.share-button.facebook:hover {
  background-color: #4267B2;
  color: #fff;
}

.share-button.twitter {
  color: #1DA1F2;
}

.share-button.twitter:hover {
  background-color: #1DA1F2;
  color: #fff;
}

.share-button.linkedin {
  color: #0077B5;
}

.share-button.linkedin:hover {
  background-color: #0077B5;
  color: #fff;
}

.share-button.pinterest {
  color: #E60023;
}

.share-button.pinterest:hover {
  background-color: #E60023;
  color: #fff;
}

.download-section {
  background-color: #0056b3;
  color: #fff;
  padding: 3rem;
  border-radius: 0.5rem;
  text-align: center;
  margin-bottom: 3rem;
}

.download-section h2 {
  margin-bottom: 1.5rem;
}

.download-section p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.download-section .btn-light {
  padding: 0.75rem 2rem;
  font-weight: 500;
}

.related-infographics {
  margin-bottom: 3rem;
}

.related-infographics h2 {
  margin-bottom: 2rem;
  text-align: center;
}

/* Responsive styles */
@media (max-width: 991.98px) {
  .infographic-header h1 {
    font-size: 2.5rem;
  }
  
  .infographic-stats {
    padding: 2rem;
  }
  
  .stats-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
  
  .stat-card .stat-value {
    font-size: 2.5rem;
  }
  
  .download-section {
    padding: 2rem;
  }
}

@media (max-width: 767.98px) {
  .infographics-hero h1 {
    font-size: 2.5rem;
  }
  
  .infographics-hero p {
    font-size: 1.1rem;
  }
  
  .infographic-header h1 {
    font-size: 2rem;
  }
  
  .infographic-image {
    height: 300px;
  }
  
  .download-section p {
    font-size: 1.1rem;
  }
}