/* ========= Team Page ========= */
.teams-list-hero {
  background: var(--sections-bg); 
  color: white;
  padding: 3rem 0;
  text-align: center;
}

.teams-list-hero .hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.teams-list-hero .hero-description {
  font-size: 1.125rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.teams-search {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.search-box {
  position: relative;
  margin-bottom: 1rem;
}

.search-btn-main {
  background-color: white;
  border: none;
  border-radius: 50%;
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent-primary);
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
[dir="rtl"] .search-btn-main {
  right: auto;
  left: 0.5rem;
}

.search-filters {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.filter-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding: 0.5rem 1rem 0.5rem 2rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 1rem;
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 0.875rem;
  cursor: pointer;
  background-image: url('data:image/svg+xml;utf8,<svg fill="white" height="14" viewBox="0 0 24 24" width="14" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
  background-repeat: no-repeat;
  background-position: left 0.5rem center;
  background-size: 1rem;
  direction: rtl;
}

.filter-select:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.6);
}

.filter-select option {
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.page-link {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  background-color: #f3f4f6;
  color: #333;
  text-decoration: none;
  border-radius: 0.5rem;
  font-size: 1rem;
  border: 1px solid #ddd;
  transition: background-color 0.2s ease;
}

.page-link:hover {
  background-color: #e2e8f0;
}

.page-link.active {
  background-color: var(--accent-primary, #007bff);
  color: white;
  font-weight: bold;
  border-color: var(--accent-primary, #007bff);
}

.hero-section {
  background: var(--sections-bg);
  color: white;
  padding: 30px 0;
  text-align: center;
  margin-bottom: 40px;
}

.search-input-main {
  width: 100%;
  padding: 1rem 4rem 1rem 1rem;
  border: none;
  border-radius: 2rem;
  font-size: 1.125rem;
  background-color: white;
  color: var(--text-primary);
  box-shadow: var(--shadow-lg);
}

.search-input-main:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

[dir="rtl"] .search-input-main {
  padding: 1rem 1rem 1rem 23rem;
}

.hero-section h1 {
  font-size: 2.5em;
  margin-bottom: 15px;
  color: var(--color-primary-dark);
}

.hero-section p {
  font-size: 1.2em;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.6;
}

.teams-list-section {
  padding: 20px 0;
}

.filter-sort-bar {
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.filter-sort-bar input[type="text"],
.filter-sort-bar select {
  padding: 10px 15px;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  font-size: 1em;
  flex-grow: 1;
  max-width: 300px;
}

.teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.team-card {
  background-color: var(--color-background-light);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  padding: 25px;
  text-align: center;
  box-shadow: var(--shadow-md);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-sm);
  align-items: center;
}

.team-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.team-card img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 15px;
  border: 3px solid var(--color-primary);
}

.team-card h3 {
  font-size: 1.5em;
  margin-bottom: 10px;
  color: var(--color-primary-dark);
}

.team-card p {
  font-size: 0.95em;
  color: var(--color-text-secondary);
  margin-bottom: 15px;
  line-height: 1.5;
  flex-grow: 1;
}

.team-card .btn {
  display: inline-block;
  padding: 10px 20px;
  background-color: var(--color-primary);
  color: var(--color-text-dark);
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.2s ease;
}

.team-card .btn:hover {
  background-color: var(--color-primary-dark);
}

/* ======== Responsive adjustments ==========*/
@media (max-width: 768px) {
  .hero-section h1 {
    font-size: 2.5em;
  }

  .hero-section p {
    font-size: 1em;
  }

  .filter-sort-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-sort-bar input[type="text"],
  .filter-sort-bar select {
    max-width: 100%;
  }

  .teams-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
  .filter-select {
    width: 100%;
    max-width: 200px;
  }
  
  .search-input-main {
    font-size: 1rem;
    padding: 0.875rem 3.5rem 0.875rem 0.875rem;
  }

  [dir="rtl"] .search-input-main {
    padding: 0.875rem 0.875rem 0.875rem 3.5rem;
  }
}

@media (max-width: 480px) {
  .teams-grid {
    grid-template-columns: 1fr;
  }
  .search-btn-main {
    width: 2.5rem;
    height: 2.5rem;
  }
}
