/* ============================================
   TEAM PAGE STYLES - CALENDAR INSPIRED
   ============================================ */

   :root {
    --primary: #1e88e5;
    --primary-dark: #1565c0;
    --text-primary: #212121;
    --text-secondary: #757575;
    --background: #ffffff;
    --background-hover: #f5f5f5;
    --surface: #ffffff;
    --border: #e0e0e0;
    --error: #f44336;
    --ukraine-blue: #0057b7;
    --ukraine-yellow: #ffd700;
  }
  
  /* Dark mode */
  [data-theme="dark"] {
    --text-primary: #e0e0e0;
    --text-secondary: #bbbbbb;
    --background: #121212;
    --background-hover: #1e1e1e;
    --surface: #1e1e1e;
    --border: #444444;
  }
  
  .team-page {
    padding: 2rem 0;
    background: var(--background);
  }
  
  /* Page Header - Calendar Style */
  .page-header {
    margin-bottom: 2rem;
    padding: 2rem 0 1.5rem 0;
    border-bottom: 2px solid #e7ebf3;
    position: relative;
  }
  
  .page-header::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, #135bec, #3b82f6);
  }
  
  .page-title {
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1.2;
    color: #0d121b;
    margin: 0 0 0.5rem 0;
    letter-spacing: -0.02em;
  }
  
  .page-subtitle {
    font-size: 1.05rem;
    color: #6b7280;
    margin: 0;
    font-weight: 400;
  }
  
  /* Tabs - Calendar Style */
  .team-tabs {
    margin: 1.5rem 0;
    border-bottom: 2px solid #f3f4f6;
    padding-bottom: 0;
  }
  
  .tab-button {
    background: none;
    border: none;
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    font-size: 0.95rem;
    border-bottom: 3px solid transparent;
    color: #6b7280;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 8px 8px 0 0;
    font-weight: 600;
    letter-spacing: 0.01em;
  }
  
  .tab-button:hover {
    color: #135bec;
    background-color: #f8f9fc;
    border-bottom-color: #93c5fd;
  }
  
  .tab-button.active {
    border-bottom: 3px solid #135bec;
    color: #135bec;
    font-weight: 700;
    background-color: #f0f5ff;
  }
  
  /* Grid Layout */
  .content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    margin-top: 2rem;
  }
  
  @media (min-width: 768px) {
    .content-grid {
      grid-template-columns: 280px 1fr;
      gap: 2.5rem;
    }
  }
  
  .sidebar {
    width: 100%;
  }
  
  .athletes-section {
    width: 100%;
  }
  
  /* Sticky Sidebar */
  .sticky-sidebar {
    position: sticky;
    top: 1.5rem;
    align-self: flex-start;
  }
  
  /* Search section - Calendar Style */
  .search-section {
    margin-bottom: 1.5rem;
  }
  
  .search-container {
    display: block;
    position: relative;
  }
  
  .search-input-wrapper {
    display: flex;
    align-items: center;
    border: 2px solid #e7ebf3;
    border-radius: 10px;
    background-color: #fff;
    height: 48px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  .search-input-wrapper:focus-within {
    border-color: #135bec;
    box-shadow: 0 0 0 4px rgba(19, 91, 236, 0.12);
  }
  
  .search-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    color: #6b7280;
    transition: color 0.2s;
  }
  
  .search-input-wrapper:focus-within .search-icon {
    color: #135bec;
  }
  
  .search-input {
    flex: 1;
    border: none;
    background-color: transparent;
    padding: 0.5rem 0.5rem 0.5rem 0;
    font-size: 0.95rem;
    color: #0d121b;
    outline: none;
  }
  
  .search-input::placeholder {
    color: #9ca3af;
  }
  
  /* Filter options - Calendar Style */
  .filter-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: #0d121b;
    margin: 0 0 0rem 0;
    padding-bottom: 0rem;
    border-bottom: 2px solid #f3f4f6;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }
  
  .filter-subtitle {
    font-size: 0.75rem;
    font-weight: 700;
    color: #6b7280;
    margin: 1rem 0 0.75rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #f3f4f6;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }
  
  .filter-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .filter-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border: 2px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: #f9fafb;
    position: relative;
  }
  
  .filter-option:hover {
    background-color: #f0f5ff;
    border-color: #93c5fd;
    transform: translateX(3px);
  }
  
  .filter-option.selected {
    background: linear-gradient(135deg, #dbeafe 0%, #e6f0ff 100%);
    border-color: #135bec;
    box-shadow: 0 4px 12px rgba(19, 91, 236, 0.15);
    transform: translateX(3px);
  }
  
  .filter-option:has(input:checked) {
    background: linear-gradient(135deg, #dbeafe 0%, #e6f0ff 100%);
    border-color: #135bec;
    box-shadow: 0 4px 12px rgba(19, 91, 236, 0.15);
    transform: translateX(3px);
  }
  
  .filter-option input[type="radio"] {
    width: 1.125rem;
    height: 1.125rem;
    border: 2px solid #d1d5db;
    background-color: #fff;
    appearance: none;
    position: relative;
    border-radius: 50%;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
  }
  
  .filter-option input[type="radio"]:checked {
    border-color: #135bec;
    background-color: #135bec;
    box-shadow: 0 0 0 3px rgba(19, 91, 236, 0.1);
  }
  
  .filter-option input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    background-color: white;
    border-radius: 50%;
  }
  
  .filter-text {
    font-size: 0.9rem;
    color: #374151;
    margin: 0;
    font-weight: 500;
  }
  
  /* Athletes grid */
  .athletes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
  }
  
  @media (min-width: 768px) {
    .athletes-grid {
      grid-template-columns: repeat(2, 1fr);
    }
  }
  
  @media (min-width: 1024px) {
    .athletes-grid {
      grid-template-columns: repeat(4, 1fr);
    }
  }
  
  /* Athlete card - Calendar Style Enhanced */
  .athlete-card {
    background: white;
    border: 2px solid #f3f4f6;
    border-radius: 14px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    position: relative;
  }
  
  .athlete-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #135bec, #3b82f6, #60a5fa);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 3;
  }
  
  .athlete-card:hover {
    border-color: #dbeafe;
    box-shadow: 0 8px 24px rgba(19, 91, 236, 0.12);
    transform: translateY(-4px);
  }
  
  .athlete-card:hover::before {
    opacity: 1;
  }
  
  .athlete-card:hover .athlete-card-image img {
    transform: scale(1.08);
  }
  
  .athlete-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
  }
  
  .athlete-card-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    position: relative;
  }
  
  .athlete-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  /* Gradient overlay */
  .athlete-card:not(.loading) .athlete-card-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 140px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent);
    z-index: 1;
  }
  
  .athlete-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.25rem;
    z-index: 2;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  .athlete-card:hover .athlete-card-content {
    transform: translateY(-4px);
  }
  
  .athlete-name {
    font-size: 1.125rem;
    font-weight: 700;
    color: white;
    margin: 0 0 0.375rem 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
    letter-spacing: -0.01em;
  }
  
  .athlete-category {
    font-size: 0.875rem;
    color: #e2e8f0;
    margin: 0;
    font-weight: 500;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  }
  
  /* Coach card - Calendar Style Enhanced */
  .coach-card {
    background: white;
    border: 2px solid #f3f4f6;
    border-radius: 14px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    position: relative;
  }
  
  .coach-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #135bec, #3b82f6, #60a5fa);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 3;
  }
  
  .coach-card:hover {
    border-color: #dbeafe;
    box-shadow: 0 8px 24px rgba(19, 91, 236, 0.12);
    transform: translateY(-4px);
  }
  
  .coach-card:hover::before {
    opacity: 1;
  }
  
  .coach-card:hover .coach-card-image img {
    transform: scale(1.08);
  }
  
  .coach-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
  }
  
  .coach-card-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    position: relative;
  }
  
  .coach-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  /* Gradient overlay */
  .coach-card:not(.loading) .coach-card-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 140px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent);
    z-index: 1;
  }
  
  .coach-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.25rem;
    z-index: 2;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  .coach-card:hover .coach-card-content {
    transform: translateY(-4px);
  }
  
  .coach-name {
    font-size: 1.125rem;
    font-weight: 700;
    color: white;
    margin: 0 0 0.375rem 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
    letter-spacing: -0.01em;
  }
  
  .coach-category {
    font-size: 0.875rem;
    color: #e2e8f0;
    margin: 0 0 0.25rem 0;
    font-weight: 500;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  }
  
  .coach-position {
    font-size: 0.8125rem;
    color: #f1f5f9;
    margin: 0;
    font-weight: 400;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  }
  
  /* Loading animations */
  @keyframes loading-shimmer {
    0% {
      background-position: -200% 0;
    }
    100% {
      background-position: 200% 0;
    }
  }
  
  .athlete-card.loading,
  .coach-card.loading {
    border: 2px solid #f3f4f6;
    pointer-events: none;
  }
  
  .athlete-card.loading .athlete-card-image,
  .coach-card.loading .coach-card-image {
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: loading-shimmer 1.8s infinite;
  }
  
  .athlete-card.loading .athlete-card-content,
  .coach-card.loading .coach-card-content {
    color: transparent;
    text-shadow: none;
  }
  
  .athlete-card.loading .athlete-name,
  .coach-card.loading .coach-name {
    width: 70%;
    height: 1.2rem;
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: loading-shimmer 1.8s infinite;
    border-radius: 6px;
    display: block;
  }
  
  .athlete-card.loading .athlete-category,
  .coach-card.loading .coach-position {
    width: 50%;
    height: 0.9rem;
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: loading-shimmer 1.8s infinite;
    border-radius: 6px;
    display: block;
    margin-top: 0.5rem;
  }
  
  .coach-card.loading .coach-category {
    width: 60%;
    height: 0.85rem;
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: loading-shimmer 1.8s infinite;
    border-radius: 6px;
    display: block;
  }
  
  /* Fade-in animation */
  @keyframes fadeIn {
    from {
      opacity: 0;
      transform: translateY(20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  .athlete-card:not(.loading).fade-in,
  .coach-card:not(.loading).fade-in {
    animation: fadeIn 0.5s ease-out forwards;
  }
  
  /* Pagination - Calendar Style */
  .pagination-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid #f3f4f6;
    flex-wrap: wrap;
    max-width: 100%;
  }
  
  .pagination-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    color: #6b7280;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    background: #f9fafb;
  }
  
  .pagination-link:hover:not(.disabled) {
    background-color: #f0f5ff;
    color: #135bec;
    border-color: #93c5fd;
    transform: translateY(-2px);
  }
  
  .pagination-link.active {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border-color: #2563eb;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
  }
  
  .pagination-link.disabled {
    color: #d1d5db;
    cursor: not-allowed;
    opacity: 0.5;
    background: #f9fafb;
  }
  
  .pagination-ellipsis {
    font-size: 0.9rem;
    color: #9ca3af;
    padding: 0 0.5rem;
  }
  
  /* Results count */
  .results-count {
    font-size: 0.9rem;
    color: #6b7280;
    margin-top: 0.5rem;
    font-weight: 600;
    padding: 0.75rem 0;
    letter-spacing: 0.01em;
  }
  
  /* Empty and error states */
  .no-results {
    text-align: center;
    padding: 3rem;
    color: #9ca3af;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border-radius: 14px;
    border: 2px dashed #d1d5db;
    margin: 1rem 0;
  }
  
  .no-results p:first-child {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #374151;
  }
  
  .error-message {
    text-align: center;
    padding: 2rem;
    color: #dc2626;
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 2px solid #fecaca;
    border-radius: 14px;
    margin: 1rem 0;
  }
  
  .error-message h3 {
    margin-top: 0;
    color: #991b1b;
    font-weight: 700;
  }
  
  .error-message ul {
    text-align: left;
    max-width: 600px;
    margin: 1rem auto;
    padding-left: 1.5rem;
  }
  
  .error-message li {
    margin-bottom: 0.5rem;
  }
  
  /* Mobile responsiveness */
  @media (max-width: 768px) {
    .page-header {
      text-align: center;
      padding: 1.5rem 0 1rem 0;
    }
  
    .page-header::before {
      left: 50%;
      transform: translateX(-50%);
    }
  
    .page-title {
      font-size: 1.875rem;
    }
  
    .page-subtitle {
      font-size: 0.95rem;
    }
  
    .sidebar {
      order: 2;
      width: 100%;
      margin-top: 1.5rem;
    }
  
    .sticky-sidebar {
      position: static;
    }
  
    .filter-panel {
      position: relative;
      border: 2px solid #e7ebf3;
      border-radius: 10px;
      background-color: #fff;
      overflow: hidden;
    }
  
    .filter-panel-header {
      padding: 1rem;
      background-color: #f8f9fc;
      border-bottom: 1px solid #e7ebf3;
      cursor: pointer;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
  
    .filter-panel-header h3 {
      margin: 0;
      font-size: 1rem;
      font-weight: 700;
      color: #0d121b;
    }
  
    .filter-panel-toggle {
      background: none;
      border: none;
      cursor: pointer;
      padding: 0.25rem;
      border-radius: 4px;
      transition: transform 0.2s ease;
    }
  
    .filter-panel-toggle.expanded {
      transform: rotate(180deg);
    }
  
    .filter-panel-header-text {
      flex: 1;
      margin-left: 1rem;
      font-size: 0.8rem;
      color: #9ca3af;
      font-style: italic;
    }
  
    .filter-options-container {
      max-height: 0;
      overflow: hidden;
      transition: max-height 0.3s ease;
    }
  
    .filter-options-container.expanded {
      max-height: none;
    }
  
    .filter-options {
      padding: 1rem;
    }
  
    .search-section {
      padding: 1rem;
      border-bottom: 1px solid #e7ebf3;
    }
  
    .content-grid {
      display: flex;
      flex-direction: column;
    }
  
    .athletes-section {
      order: 2;
    }
  
    .sidebar {
      order: 1;
      margin-bottom: 0.5rem;
    }
  
    .team-tabs {
      margin-top: 0;
      display: flex;
      justify-content: center;
      padding: 0 0 1.5rem 0;
    }
  
    .tab-button {
      padding: 0.4rem 0.75rem;
      font-size: 0.9rem;
    }
  
    .athletes-grid {
      grid-template-columns: 1fr;
    }
  }
  
  @media (max-width: 767px) {
    .team-title {
      font-size: 1.75rem;
    }
  }
  