/* Agencies Page Styles */

.agencies-section {
  padding: 4rem 1rem;
  background: #f8f9fa;
}

.agencies-content {
  display: flex;
  gap: 2rem;
}

.agencies-main {
  flex: 1;
}

/* Agency Cards */
.agencies-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.agency-card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
  border: 1px solid #eee;
}

.agency-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.agency-header {
  padding: 1.25rem;
  border-bottom: 1px solid #eee;
  background-color: #f9f9f9;
  display: flex;
  flex-wrap: wrap;
  /* align-items: center; */
  gap: 1rem;
}

.agency-rating-stars {
  font-size: 1.5rem;
  color: #ccc;
  line-height: 1;
  flex-shrink: 0;
}

.star.filled {
  color: #FFD700;
}

.star.half-filled {
  position: relative;
  display: inline-block;
}

.star.half-filled::after {
  content: "★";
  position: absolute;
  left: 0;
  top: 0;
  width: 50%;
  color: #FFD700;
  overflow: hidden;
}

.agency-name {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-color);
  flex: 1;
}

.agency-name-rus {
  display: block;
  font-size: 0.9rem;
  font-weight: normal;
  color: #666;
  margin-top: 0.25rem;
}

.reviews-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
}

.reviews-link:hover {
  text-decoration: underline;
}

.agency-info {
  padding: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.agency-contacts {
  flex: 1;
  min-width: 300px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
  color: #555;
  font-size: 0.95rem;
}

.contact-item:last-child {
  margin-bottom: 0;
}

.contact-item svg {
  flex-shrink: 0;
  color: var(--primary-color);
  margin-top: 0.25rem;
}

.contact-item a {
  color: var(--primary-color);
  text-decoration: none;
}

.contact-item a:hover {
  text-decoration: underline;
}

/* Agency Trust Section */
.agency-trust {
  width: 300px;
  background-color: #f9f9fa;
  border-radius: 8px;
  padding: 1.25rem;
  border: 1px solid #eee;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.trust-title {
  font-weight: 600;
  margin: 0 0 1.25rem;
  text-align: center;
  color: var(--text-color);
}

.trust-charts {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.25rem;
  width: 100%;
}

.trust-chart {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.chart-circle {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  position: relative;
  margin-bottom: 0.75rem;
  background: conic-gradient(
    currentColor var(--percentage-deg, calc(var(--percentage) * 3.6deg)), 
    #eaeaea var(--percentage-deg, calc(var(--percentage) * 3.6deg))
  );
  display: flex;
  align-items: center;
  justify-content: center;
}

.chart-circle::before {
  content: '';
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background-color: white;
}

.chart-circle.yes {
  color: #1a8d4c;
}

.chart-circle.no {
  color: #E74C3C;
}

.chart-percentage {
  position: relative;
  z-index: 1;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-color);
}

.chart-label {
  font-weight: 500;
  margin: 0;
  color: var(--text-color);
}

.rating-button {
  width: 100%;
  padding: 0.75rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.2s ease;
  margin-top: 0.75rem;
}

.rating-button:hover {
  background: #3955a3;
}

/* Blacklist Sidebar */
.blacklist-sidebar {
  width: 300px;
  flex-shrink: 0;
}

.blacklist-container {
  background-color: #222;
  color: white;
  border-radius: 8px;
  padding: 1.5rem;
  position: sticky;
  top: 2rem;
}

.blacklist-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  text-align: center;
}

.blacklist-subtitle {
  font-size: 0.9rem;
  margin: 0 0 1.5rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
}

.blacklist-items {
  list-style: none;
  padding: 0;
  margin: 0;
}

.blacklist-items li {
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.blacklist-items li:last-child {
  margin-bottom: 0;
}

.blacklist-items .bullet {
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: #E74C3C;
  border-radius: 50%;
}

.blacklist-items a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.blacklist-items a:hover {
  color: white;
  text-decoration: underline;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2rem;
}

.page-link {
  display: inline-block;
  padding: 0.5rem 1rem;
  text-decoration: none;
  color: var(--text-color);
  border: 1px solid #ddd;
  border-radius: 4px;
  transition: all 0.2s ease;
  min-width: 2.5rem;
  text-align: center;
}

.page-link:hover, 
.page-link.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.page-link.next {
  padding: 0.5rem 1.5rem;
}

/* Responsive Styles */
@media (max-width: 992px) {
  .agencies-content {
    flex-direction: column;
  }
  
  .blacklist-sidebar {
    width: 100%;
  }
  
  .blacklist-container {
    position: static;
    margin-bottom: 2rem;
  }
  
  .agencies-content {
    flex-direction: column-reverse;
  }
}

@media (max-width: 768px) {
  .agency-info {
    flex-direction: column;
  }
  
  .agency-trust {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .agencies-section {
    padding: 2rem 1rem;
  }
  
  .agency-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .pagination {
    gap: 0.35rem;
  }
  
  .page-link {
    padding: 0.5rem;
    min-width: 2rem;
    font-size: 0.9rem;
  }
  
  .page-link.next {
    width: 100%;
    order: 10;
    margin-top: 0.5rem;
    padding: 0.75rem;
  }
  
  .trust-charts {
    gap: 1rem;
  }
  
  .chart-circle {
    width: 80px;
    height: 80px;
  }
  
  .chart-percentage {
    font-size: 1rem;
  }
}