:root {
  --tm-primary: #007cba;
  --tm-primary-dark: #005a87;
  --tm-secondary: #6c757d;
  --tm-secondary-dark: #545b62;
  --tm-text: #333;
  --tm-text-light: #666;
  --tm-light-bg: #f8f9fa;
  --tm-border: #e9ecef;
  --tm-border-dark: #ddd;
  --tm-white: #fff;
  --tm-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --tm-shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.15);
  --tm-transition: all 0.3s ease;
}

/* Reset and Base Styles */
.team-members-container *,
.team-member-single *,
.team-carousel-container * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Container Styles */
.team-members-container {
  margin: 2rem 0;
  position: relative;
}

.team-members-archive-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Filters and Search */
.team-members-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: var(--tm-light-bg);
  border-radius: 8px;
  border: 1px solid var(--tm-border);
}

.team-search {
  flex: 1;
  min-width: 250px;
}

.team-search input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--tm-border-dark);
  border-radius: 6px;
  font-size: 14px;
  transition: var(--tm-transition);
}

.team-search input:focus {
  outline: none;
  border-color: var(--tm-primary);
  box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.1);
}

.team-filters {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.team-filters select {
  padding: 0.75rem 1rem;
  border: 1px solid var(--tm-border-dark);
  border-radius: 6px;
  font-size: 14px;
  min-width: 150px;
  background: var(--tm-white);
  cursor: pointer;
  transition: var(--tm-transition);
}

.team-filters select:focus {
  outline: none;
  border-color: var(--tm-primary);
  box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.1);
}

/* Grid Layout */
.team-members-grid {
  display: grid;
  gap: 2rem;
  margin-bottom: 2rem;
}

.team-members-grid.columns-1 { grid-template-columns: 1fr; }
.team-members-grid.columns-2 { grid-template-columns: repeat(2, 1fr); }
.team-members-grid.columns-3 { grid-template-columns: repeat(3, 1fr); }
.team-members-grid.columns-4 { grid-template-columns: repeat(4, 1fr); }
.team-members-grid.columns-5 { grid-template-columns: repeat(5, 1fr); }
.team-members-grid.columns-6 { grid-template-columns: repeat(6, 1fr); }

/* Team Member Card */
.team-member-card {
  background: var(--tm-white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--tm-shadow);
  transition: var(--tm-transition);
  position: relative;
  border: 1px solid var(--tm-border);
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Hover Animation Classes */
.team-member-card.elementor-animation-grow:hover {
  transform: scale(1.05);
}
.team-member-card.elementor-animation-shrink:hover {
  transform: scale(0.95);
}
.team-member-card.elementor-animation-pulse:hover {
  animation: pulse 1.5s ease infinite;
}
.team-member-card.elementor-animation-push:hover {
  transform: translateY(-5px);
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.team-member-card:hover {
  box-shadow: var(--tm-shadow-hover);
}

/* Card Image */
.team-member-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  background: var(--tm-light-bg);
}

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

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

/* Lazy Loading */
.team-member-image img.lazy {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.team-member-image img.lazy-loaded {
  opacity: 1;
}

.team-member-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  color: var(--tm-white);
  padding: 1.5rem 1rem 1rem;
  transform: translateY(100%);
  transition: var(--tm-transition);
}

.team-member-card:hover .team-member-overlay {
  transform: translateY(0);
}

.team-member-overlay p {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
}

/* Card Content */
.team-member-content {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.team-member-name {
  margin: 0 0 0.5rem 0;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--tm-text);
}

.team-member-name a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

.team-member-name a:hover {
  color: var(--tm-primary);
}

.team-member-position {
  margin: 0 0 1rem 0;
  color: var(--tm-text-light);
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.team-member-department {
  margin-bottom: 1rem;
}

.department-tag,
.service-tag,
.skill-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: #e3f2fd;
  color: #1976d2;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  margin: 0 0.5rem 0.5rem 0;
  border: 1px solid #bbdefb;
}

.team-member-experience {
  margin-bottom: 1rem;
  font-size: 14px;
  color: var(--tm-text-light);
}

.team-member-services {
  margin-bottom: 1rem;
  font-size: 14px;
}

.team-member-services strong {
  color: var(--tm-text);
  margin-bottom: 0.5rem;
  display: block;
}

/* Social Links */
.team-member-social {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--tm-white);
  text-decoration: none;
  transition: var(--tm-transition);
  font-size: 16px;
}

.social-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.social-facebook { background: #1877f2; }
.social-twitter { background: #1da1f2; }
.social-linkedin { background: #0077b5; }
.social-instagram { background: #e4405f; }
.social-youtube { background: #ff0000; }
.social-github { background: #333; }
.social-behance { background: #1769ff; }
.social-dribbble { background: #ea4c89; }

/* Contact Info */
.team-member-contact {
  margin-bottom: 1rem;
}

.contact-email,
.contact-phone {
  display: block;
  color: var(--tm-text-light);
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 0.5rem;
  transition: color 0.3s ease;
}

.contact-email:hover,
.contact-phone:hover {
  color: var(--tm-primary);
}

.contact-email i,
.contact-phone i {
  margin-right: 0.5rem;
  width: 16px;
}

/* Actions */
.team-member-actions {
  margin-top: auto;
  background: #ffc000;
  padding-top: 1rem;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  text-align: center;
  transition: var(--tm-transition);
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--tm-primary);
  color: var(--tm-white);
}

.btn-primary:hover {
  background: var(--tm-primary-dark);
}

.btn-secondary {
  background: var(--tm-secondary);
  color: var(--tm-white);
}

.btn-secondary:hover {
  background: var(--tm-secondary-dark);
}

/* List Style */
.team-members-list .team-member-card {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-direction: row;
}

.team-members-list .team-member-image {
  width: 120px;
  height: 120px;
  flex-shrink: 0;
  margin-right: 1.5rem;
  border-radius: 50%;
  aspect-ratio: 1;
}

.team-members-list .team-member-content {
  flex: 1;
  padding: 1rem 0;
}

/* Carousel Styles */
.team-carousel-container {
  margin: 2rem 0;
  position: relative;
}

.team-carousel .team-member-card {
  margin: 0 0.5rem;
}

.slick-dots {
  display: flex !important;
  justify-content: center;
  list-style: none;
  padding: 0;
  margin: 2rem 0 0 0;
  gap: 0.5rem;
}

.slick-dots li {
  margin: 0;
}

.slick-dots button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  background: var(--tm-border-dark);
  cursor: pointer;
  transition: background 0.3s ease;
  font-size: 0;
}

.slick-dots .slick-active button {
  background: var(--tm-primary);
}

.slick-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.7);
  color: var(--tm-white);
  cursor: pointer;
  transition: var(--tm-transition);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slick-arrow:hover {
  background: rgba(0, 0, 0, 0.9);
}

.slick-prev {
  left: -20px;
}

.slick-next {
  right: -20px;
}

.slick-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Pagination */
.team-members-pagination {
  margin-top: 2rem;
  text-align: center;
}

.team-members-pagination .page-numbers {
  display: inline-flex;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 0.5rem;
}

.team-members-pagination .page-numbers li {
  margin: 0;
}

.team-members-pagination .page-numbers a,
.team-members-pagination .page-numbers span {
  display: block;
  padding: 0.75rem 1rem;
  border: 1px solid var(--tm-border-dark);
  border-radius: 6px;
  text-decoration: none;
  color: var(--tm-text);
  transition: var(--tm-transition);
}

.team-members-pagination .page-numbers a:hover,
.team-members-pagination .page-numbers .current {
  background: var(--tm-primary);
  color: var(--tm-white);
  border-color: var(--tm-primary);
}

/* Single Team Member Page */
.team-member-single-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 20px;
}

.team-member-header {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--tm-border);
}

.team-member-image-large {
  position: relative;
}

.team-member-photo {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.default-avatar {
  background: var(--tm-light-bg);
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--tm-text-light);
  aspect-ratio: 1;
}

.team-member-basic-info h1 {
  margin: 0 0 0.5rem 0;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--tm-text);
  line-height: 1.2;
}

.team-member-basic-info h2 {
  margin: 0 0 1.5rem 0;
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--tm-text-light);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.team-member-departments,
.team-member-experience {
  margin-bottom: 1rem;
}

.team-member-departments strong,
.team-member-experience strong {
  color: var(--tm-text);
  margin-right: 0.5rem;
}

.department-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--tm-primary);
  color: var(--tm-white);
  border-radius: 25px;
  font-size: 14px;
  font-weight: 500;
  margin-left: 0.5rem;
}

.team-member-introduction {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: var(--tm-light-bg);
  border-radius: 8px;
  border-left: 4px solid var(--tm-primary);
}

.team-member-introduction p {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--tm-text-light);
  font-style: italic;
}

/* Content Layout */
.team-member-main-content section {
  margin-bottom: 3rem;
}

.team-member-main-content h3 {
  margin: 0 0 1.5rem 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--tm-text);
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--tm-primary);
}

.biography-content,
.description-content,
.education-content,
.achievements-content {
  line-height: 1.7;
  color: var(--tm-text-light);
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.services-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Sidebar */
.team-member-sidebar {
  position: sticky;
  top: 2rem;
  height: fit-content;
}

.contact-card,
.social-links-card {
  background: var(--tm-white);
  border: 1px solid var(--tm-border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.contact-card h3,
.social-links-card h3 {
  margin: 0 0 1.5rem 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--tm-text);
}

.contact-item {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: var(--tm-light-bg);
  border-radius: 8px;
  transition: background 0.3s ease;
}

.contact-item:hover {
  background: var(--tm-border);
}

.contact-item i {
  margin-right: 1rem;
  width: 20px;
  color: var(--tm-primary);
  font-size: 16px;
}

.contact-item a {
  color: var(--tm-text);
  text-decoration: none;
  transition: color 0.3s ease;
}

.contact-item a:hover {
  color: var(--tm-primary);
}

.contact-item address {
  font-style: normal;
  margin: 0;
}

.social-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.social-links .social-link {
  display: flex;
  align-items: center;
  width: 100%;
  height: auto;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  text-decoration: none;
  transition: var(--tm-transition);
}

.social-links .social-link i {
  margin-right: 1rem;
  width: 20px;
  font-size: 18px;
}

.social-links .social-link span {
  font-weight: 500;
}

/* Navigation */
.team-member-navigation {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--tm-border);
}

.nav-links {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.nav-previous,
.nav-next {
  flex: 1;
  max-width: 45%;
}

.nav-next {
  text-align: right;
}

.nav-links a {
  display: block;
  padding: 1rem;
  background: var(--tm-light-bg);
  border-radius: 8px;
  text-decoration: none;
  color: var(--tm-text);
  transition: var(--tm-transition);
  border: 1px solid var(--tm-border);
}

.nav-links a:hover {
  background: var(--tm-primary);
  color: var(--tm-white);
  border-color: var(--tm-primary);
}

.nav-subtitle {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
  opacity: 0.7;
}

.nav-title {
  display: block;
  font-weight: 600;
  font-size: 16px;
}

.back-to-team {
  text-align: center;
}

/* Loading and States */
.team-members-loading {
  text-align: center;
  padding: 3rem;
  color: var(--tm-text-light);
}

.no-team-members {
  text-align: center;
  padding: 3rem;
  color: var(--tm-text-light);
  font-style: italic;
}

/* Custom Class Support */
.tm-custom-class .team-member-card {
  /* Custom styles will be applied here */
}

/* Responsive Design */
@media (max-width: 1024px) {
  .team-members-grid.columns-4 { grid-template-columns: repeat(3, 1fr); }
  .team-members-grid.columns-5 { grid-template-columns: repeat(3, 1fr); }
  .team-members-grid.columns-6 { grid-template-columns: repeat(3, 1fr); }
  
  .team-member-header {
    grid-template-columns: 250px 1fr;
    gap: 2rem;
  }
  
  .team-carousel .team-member-card {
    margin: 0 0.25rem;
  }
}

@media (max-width: 768px) {
  .team-members-grid.columns-2,
  .team-members-grid.columns-3,
  .team-members-grid.columns-4,
  .team-members-grid.columns-5,
  .team-members-grid.columns-6 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .team-members-filters {
    flex-direction: column;
    gap: 1rem;
  }
  
  .team-filters {
    flex-direction: column;
  }
  
  .team-filters select {
    width: 100%;
  }
  
  .team-member-header {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    text-align: center;
  }
  
  .team-member-image-large {
    max-width: 300px;
    margin: 0 auto;
  }
  
  .nav-links {
    flex-direction: column;
    gap: 1rem;
  }
  
  .nav-previous,
  .nav-next {
    max-width: 100%;
    text-align: left;
  }
  
  .team-members-list .team-member-card {
    flex-direction: column;
    text-align: center;
  }
  
  .team-members-list .team-member-image {
    margin-right: 0;
    margin-bottom: 1rem;
    width: 100px;
    height: 100px;
    align-self: center;
  }
  
  .slick-arrow {
    width: 30px;
    height: 30px;
    font-size: 14px;
  }
  
  .slick-prev {
    left: -10px;
  }
  
  .slick-next {
    right: -10px;
  }
}

@media (max-width: 480px) {
  .team-members-grid {
    grid-template-columns: 1fr;
  }
  
  .team-member-single-container,
  .team-members-archive-container {
    padding: 1rem 15px;
  }
  
  .team-member-basic-info h1 {
    font-size: 1.75rem;
  }
  
  .team-member-card {
    margin-bottom: 1.5rem;
  }
  
  .slick-dots {
    margin-top: 1rem;
  }
}

/* Print Styles */
@media print {
  .team-members-filters,
  .team-member-navigation,
  .team-member-actions,
  .slick-dots,
  .slick-arrow {
    display: none !important;
  }
  
  .team-member-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
  }
  
  .team-member-single-container {
    max-width: none;
    padding: 0;
  }
  
  a::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    font-weight: normal;
  }
}