.team-member {
  display: flex;
  gap: 25px;
  margin-bottom: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(45, 106, 79, 0.1);
}

.team-member.featured {
  background: linear-gradient(
    135deg,
    rgba(248, 249, 250, 0.8) 0%,
    rgba(233, 236, 239, 0.6) 100%
  );
  padding: 25px;
  border-radius: 12px;
  border: 1px solid rgba(45, 106, 79, 0.15);
  position: relative;
  overflow: hidden;
}

.team-member.featured::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(
    90deg,
    var(--primary-green),
    var(--accent-green),
    var(--bamboo-gold)
  );
}

.team-member:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.member-avatar {
  flex-shrink: 0;
  position: relative;
  width: 150px;
  height: 150px;
}

.member-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--accent-green);
  box-shadow: 0 8px 25px rgba(27, 67, 50, 0.2);
  transition: all 0.3s ease;
}

.team-member:hover .member-avatar img {
  transform: scale(1.05);
  box-shadow: 0 12px 30px rgba(27, 67, 50, 0.3);
}

.avatar-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 40px;
  height: 40px;
  background: var(--bamboo-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
  border: 3px solid var(--accent-green);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  z-index: 10;
  transform: translate(25%, 25%);
}

.avatar-badge .fa-crown {
  color: #ffd700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.avatar-badge .fa-clipboard-check {
  color: #4caf50;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.avatar-badge .fa-paint-brush,
.avatar-badge .fa-video,
.avatar-badge .fa-photo-video {
  color: #2196f3;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.member-info {
  flex: 1;
}

.member-info h3 {
  color: var(--primary-green);
  font-size: 1.8rem;
  margin-bottom: 5px;
}

.member-role {
  color: var(--accent-green);
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 15px;
}

.member-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 15px;
}

.skill-tag {
  background: rgba(64, 145, 108, 0.1);
  color: var(--accent-green);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.skill-tag:hover {
  background: rgba(64, 145, 108, 0.2);
  transform: translateY(-2px);
}

.member-social {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.member-social .social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--accent-green);
  color: white;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.3s ease;
  text-decoration: none;
  border: 2px solid transparent;
  box-shadow: 0 4px 12px rgba(27, 67, 50, 0.2);
  min-width: 120px;
  text-align: center;
}

.member-social .social-btn:hover {
  background: var(--primary-green);
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(27, 67, 50, 0.3);
  border-color: rgba(255, 255, 255, 0.2);
}

.member-social .social-btn:active {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(27, 67, 50, 0.2);
}

.member-social .social-btn.roblox {
  background: linear-gradient(135deg, #e2352d, #c12a22);
}

.member-social .social-btn.roblox:hover {
  background: linear-gradient(135deg, #c12a22, #a02018);
}

.member-social .social-btn.discord {
  background: linear-gradient(135deg, #5865f2, #4752c4);
}

.member-social .social-btn.discord:hover {
  background: linear-gradient(135deg, #4752c4, #3a46b8);
}

.member-social .social-btn.instagram {
  background: linear-gradient(135deg, #e1306c, #c13584);
}

.member-social .social-btn.instagram:hover {
  background: linear-gradient(135deg, #c13584, #a02a6f);
}

.member-social .social-btn.twitter {
  background: linear-gradient(135deg, #1da1f2, #0d8bd9);
}

.member-social .social-btn.twitter:hover {
  background: linear-gradient(135deg, #0d8bd9, #0a7bc2);
}

.member-social .social-btn.youtube {
  background: linear-gradient(135deg, #ff0000, #cc0000);
}

.member-social .social-btn.youtube:hover {
  background: linear-gradient(135deg, #cc0000, #b30000);
}


.member-social .social-btn i {
  font-size: 1.1rem;
}

.member-description {
  color: #495057;
  line-height: 1.6;
  margin-bottom: 15px;
}

.member-contribution {
  background: rgba(248, 249, 250, 0.8);
  padding: 15px;
  border-radius: 8px;
  border-left: 4px solid var(--accent-green);
  transition: all 0.3s ease;
}

.member-contribution:hover {
  background: rgba(248, 249, 250, 1);
}

.member-contribution h4 {
  color: var(--primary-green);
  margin-bottom: 10px;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.member-contribution ul {
  margin-left: 20px;
  margin-bottom: 0;
}

.member-contribution li {
  margin-bottom: 5px;
  color: #495057;
  position: relative;
  padding-left: 5px;
}

.member-contribution li::before {
  content: "•";
  color: var(--accent-green);
  font-weight: bold;
  display: inline-block;
  width: 1em;
  margin-left: -1em;
}

.editors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 20px;
}

.editors-grid .team-member {
  flex-direction: column;
  align-items: center;
  text-align: center;
  border: 1px solid rgba(45, 106, 79, 0.1);
  border-radius: 12px;
  padding: 25px;
  margin-bottom: 0;
  background: white;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.editors-grid .team-member::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-green), var(--accent-green));
  opacity: 0.7;
}

.editors-grid .team-member:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.editors-grid .member-avatar {
  width: 120px;
  height: 120px;
}

.editors-grid .member-avatar img {
  width: 100%;
  height: 100%;
}

.special-mention {
  display: flex;
  align-items: center;
  gap: 30px;
  background: linear-gradient(
    135deg,
    rgba(27, 67, 50, 0.05) 0%,
    rgba(45, 106, 79, 0.05) 100%
  );
  padding: 30px;
  border-radius: 12px;
  border-left: 5px solid var(--bamboo-gold);
  position: relative;
  overflow: hidden;
}

.special-mention::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 100px;
  height: 100px;
  background: radial-gradient(
    circle,
    rgba(212, 175, 55, 0.1) 0%,
    transparent 70%
  );
  z-index: 0;
}

.mention-icon {
  flex-shrink: 0;
  color: var(--bamboo-gold);
  position: relative;
  z-index: 1;
}

.mention-content {
  position: relative;
  z-index: 1;
}

.mention-content h3 {
  color: var(--primary-green);
  margin-bottom: 15px;
  font-size: 1.5rem;
}

.mention-content p {
  color: #495057;
  margin-bottom: 10px;
  line-height: 1.6;
}


.tech-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.tech-info .tech-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
  transition: all 0.3s ease;
}

.tech-info .tech-item:hover {
  background: #e9ecef;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.tech-info .tech-item i {
  font-size: 1.8rem;
  color: var(--accent-green);
}

.tech-info .tech-item h4 {
  color: var(--primary-green);
  margin-bottom: 5px;
  font-size: 1.1rem;
}

.tech-info .tech-item p {
  color: #6c757d;
  margin: 0;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.team-member {
  animation: fadeInUp 0.6s ease forwards;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 30px;
  font-weight: 600;
  background: linear-gradient(
    135deg,
    var(--light-green) 0%,
    var(--accent-green) 100%
  );
  color: var(--primary-green);
  box-shadow: 0 4px 15px rgba(64, 145, 108, 0.2);
  transition: all 0.3s ease;
}

.badge:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(64, 145, 108, 0.3);
}

.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding-left: 30px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(
    to bottom,
    var(--primary-green),
    var(--accent-green)
  );
}

.timeline-item {
  position: relative;
  margin-bottom: 40px;
  padding-left: 30px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -10px;
  top: 5px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-green);
  border: 3px solid white;
  box-shadow: 0 0 0 3px var(--accent-green);
}

.timeline-date {
  font-weight: bold;
  color: var(--primary-green);
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.timeline-content h4 {
  color: var(--primary-green);
  margin-bottom: 8px;
}


.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 25px;
  margin-top: 20px;
}

.stat-item {
  text-align: center;
  padding: 25px;
  background: linear-gradient(
    135deg,
    rgba(27, 67, 50, 0.05) 0%,
    rgba(45, 106, 79, 0.05) 100%
  );
  border-radius: 10px;
  border: 1px solid rgba(45, 106, 79, 0.1);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary-green);
  margin-bottom: 10px;
  background: linear-gradient(
    135deg,
    var(--primary-green) 0%,
    var(--accent-green) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat-label {
  color: #6c757d;
  font-size: 0.95rem;
  font-weight: 500;
}


.team-gallery-improved {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
  margin-top: 20px;
}

.gallery-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(27, 67, 50, 0.1);
  transition: all 0.3s ease;
  border: 1px solid rgba(45, 106, 79, 0.1);
}

.gallery-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(27, 67, 50, 0.15);
  border-color: var(--accent-green);
}

.gallery-image {
  position: relative;
  height: 220px;
  overflow: hidden;
}

.gallery-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.4s ease;
}

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

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(27, 67, 50, 0.2) 0%,
    rgba(27, 67, 50, 0) 70%
  );
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 15px;
  opacity: 0;
  transition: all 0.3s ease;
}

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

.gallery-badge {
  background: rgba(27, 67, 50, 0.85);
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}

.gallery-zoom {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  color: var(--primary-green);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.gallery-zoom:hover {
  background: white;
  transform: scale(1.1);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.gallery-content {
  padding: 20px;
}

.gallery-title {
  color: var(--primary-green);
  font-size: 1.3rem;
  margin-bottom: 8px;
  font-weight: 600;
}

.gallery-role {
  color: var(--accent-green);
  font-size: 0.95rem;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.gallery-description {
  color: #495057;
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gallery-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 15px;
  border-top: 1px solid rgba(45, 106, 79, 0.1);
}

.gallery-meta span {
  color: #6c757d;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 5px;
}

.gallery-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
  margin-top: 30px;
  padding: 20px;
  background: linear-gradient(
    135deg,
    rgba(27, 67, 50, 0.05) 0%,
    rgba(45, 106, 79, 0.05) 100%
  );
  border-radius: 10px;
}

.gallery-stats .stat {
  text-align: center;
  padding: 15px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.gallery-stats .stat i {
  font-size: 1.5rem;
  color: var(--accent-green);
  margin-bottom: 8px;
}

.gallery-stats .stat span {
  display: block;
  color: #495057;
  font-size: 0.9rem;
}

.gallery-stats .stat strong {
  color: var(--primary-green);
  font-size: 1.2rem;
}


.gallery-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  padding: 15px;
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}

.gallery-modal.active {
  display: flex;
}

.gallery-modal-content {
  max-width: 800px;
  width: 100%;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  max-height: 95vh;
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.gallery-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: var(--primary-green);
  color: white;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.gallery-modal-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin: 0;
  flex: 1;
  padding-right: 10px;
}

.gallery-modal-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.gallery-modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

.gallery-modal-body {
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex: 1;
}

.gallery-modal-image-container {
  position: relative;
  width: 100%;
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
  flex-shrink: 0;
  max-height: 50vh;
  overflow: hidden;
}

.gallery-modal-image {
  width: 100%;
  height: 100%;
  min-height: 300px;
  max-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.gallery-modal-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.gallery-modal-info {
  padding: 25px;
  background: white;
  flex: 1;
  overflow-y: auto;
  max-height: calc(50vh - 50px);
}

.gallery-modal-role {
  color: var(--accent-green);
  font-size: 1.1rem;
  margin-bottom: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(64, 145, 108, 0.2);
}

.gallery-modal-description {
  color: #495057;
  line-height: 1.7;
  margin-bottom: 20px;
  font-size: 1rem;
}

.gallery-modal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 20px;
  padding: 15px;
  background: linear-gradient(
    135deg,
    rgba(27, 67, 50, 0.05) 0%,
    rgba(45, 106, 79, 0.05) 100%
  );
  border-radius: 8px;
}

.gallery-modal-meta span {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #495057;
  font-size: 0.95rem;
  flex: 1;
  min-width: 120px;
}

.gallery-modal-meta i {
  color: var(--accent-green);
  font-size: 1.1rem;
  width: 20px;
}

.gallery-modal-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bamboo-gold);
  color: white;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 15px;
}


@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes modalFadeOut {
  from {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
  to {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }
}

.gallery-modal.active .gallery-modal-content {
  animation: modalFadeIn 0.3s ease forwards;
}

.gallery-modal.closing .gallery-modal-content {
  animation: modalFadeOut 0.3s ease forwards;
}


.gallery-zoom:focus,
.gallery-modal-close:focus {
  outline: 2px solid var(--accent-green);
  outline-offset: 2px;
}


@media (max-width: 768px) {
  .team-member {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
  }

  .member-avatar {
    width: 120px;
    height: 120px;
  }

  .member-info h3 {
    font-size: 1.5rem;
  }

  .member-role {
    font-size: 1rem;
  }

  .member-skills {
    justify-content: center;
  }

  .member-social {
    justify-content: center;
    gap: 10px;
  }

  .member-social .social-btn {
    min-width: 110px;
    padding: 8px 15px;
    font-size: 0.9rem;
  }

  .member-social .social-btn i {
    font-size: 1rem;
  }

  .special-mention {
    flex-direction: column;
    text-align: center;
    padding: 20px;
    gap: 20px;
  }

  .mention-icon i {
    font-size: 2.5rem;
  }

  .tech-info {
    grid-template-columns: 1fr;
  }

  .editors-grid {
    grid-template-columns: 1fr;
  }

  .editors-grid .member-avatar {
    width: 100px;
    height: 100px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .stat-item {
    padding: 20px;
  }

  .stat-number {
    font-size: 2rem;
  }

  .timeline {
    padding-left: 20px;
  }

  .timeline-item {
    padding-left: 20px;
    margin-bottom: 25px;
  }

  .avatar-badge {
    width: 35px;
    height: 35px;
    font-size: 1rem;
    border: 2px solid var(--accent-green);
    transform: translate(20%, 20%);
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .stat-item {
    padding: 15px;
  }

  .stat-number {
    font-size: 1.8rem;
  }

  .team-member.featured {
    padding: 20px 15px;
  }

  .editors-grid .team-member {
    padding: 20px 15px;
  }

  .member-social {
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  .member-social .social-btn {
    width: 100%;
    max-width: 200px;
    min-width: auto;
    justify-content: center;
  }

  .avatar-badge {
    width: 30px;
    height: 30px;
    font-size: 0.9rem;
    border: 2px solid var(--accent-green);
    transform: translate(15%, 15%);
  }
}


@media (max-width: 992px) {
  .team-gallery-improved {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
  }

  .gallery-image {
    height: 180px;
  }

  .gallery-content {
    padding: 15px;
  }
}

@media (max-width: 768px) {
  .team-gallery-improved {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin: 15px 0;
  }

  .gallery-card {
    width: 100%;
    margin: 0 auto;
    max-width: 100%;
    box-sizing: border-box;
    border-radius: 10px;
  }

  .gallery-image {
    height: 160px;
  }

  .gallery-title {
    font-size: 1.1rem;
    margin-bottom: 6px;
  }

  .gallery-role {
    font-size: 0.85rem;
    margin-bottom: 8px;
  }

  .gallery-description {
    font-size: 0.8rem;
    line-height: 1.4;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    margin-bottom: 10px;
  }

  .gallery-meta {
    padding-top: 10px;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .gallery-meta span {
    font-size: 0.75rem;
  }

  .gallery-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 20px;
    padding: 15px;
  }

  .gallery-stats .stat {
    padding: 10px;
  }

  .gallery-stats .stat i {
    font-size: 1.2rem;
    margin-bottom: 5px;
  }

  .gallery-stats .stat span {
    font-size: 0.8rem;
  }

  .gallery-stats .stat strong {
    font-size: 1rem;
  }

  .gallery-overlay {
    padding: 10px;
  }

  .gallery-badge {
    font-size: 0.7rem;
    padding: 5px 10px;
  }

  .gallery-zoom {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .team-gallery-improved {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .gallery-card {
    margin: 0;
    width: 100%;
  }

  .gallery-image {
    height: 180px;
  }

  .gallery-content {
    padding: 12px;
  }

  .gallery-title {
    font-size: 1rem;
  }

  .gallery-role {
    font-size: 0.8rem;
  }

  .gallery-description {
    font-size: 0.75rem;
    -webkit-line-clamp: 3;
    line-clamp: 3;
  }

  .gallery-stats {
    grid-template-columns: 1fr;
    padding: 10px;
  }
}

@media (max-width: 360px) {
  .gallery-image {
    height: 150px;
  }

  .gallery-stats .stat {
    padding: 8px;
  }

  .gallery-stats .stat i {
    font-size: 1rem;
  }

  .gallery-stats .stat strong {
    font-size: 0.9rem;
  }
}


@media (max-width: 768px) and (orientation: landscape) {
  .team-gallery-improved {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-image {
    height: 140px;
  }

  .gallery-description {
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }
}


@media (max-width: 768px) {
  .gallery-modal {
    padding: 10px;
  }

  .gallery-modal-content {
    max-height: 90vh;
    width: 95%;
    border-radius: 10px;
  }

  .gallery-modal-header {
    padding: 15px;
  }

  .gallery-modal-title {
    font-size: 1.2rem;
  }

  .gallery-modal-close {
    width: 35px;
    height: 35px;
    font-size: 1rem;
  }

  .gallery-modal-image-container {
    max-height: 40vh;
  }

  .gallery-modal-image {
    min-height: 250px;
    max-height: 40vh;
    padding: 15px;
  }

  .gallery-modal-info {
    padding: 20px;
    max-height: calc(50vh - 40px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .gallery-modal-role {
    font-size: 1rem;
    margin-bottom: 12px;
  }

  .gallery-modal-description {
    font-size: 0.95rem;
    line-height: 1.6;
  }

  .gallery-modal-meta {
    flex-direction: column;
    gap: 10px;
    padding: 12px;
  }

  .gallery-modal-meta span {
    min-width: auto;
  }
}

@media (max-width: 480px) {
  .gallery-modal {
    padding: 5px;
  }

  .gallery-modal-content {
    width: 100%;
    max-height: 100vh;
    border-radius: 0;
    margin: 0;
  }

  .gallery-modal-image-container {
    max-height: 35vh;
  }

  .gallery-modal-image {
    min-height: 200px;
    max-height: 35vh;
    padding: 10px;
  }

  .gallery-modal-info {
    padding: 15px;
    max-height: calc(65vh - 40px);
  }

  .gallery-modal-header {
    padding: 12px 15px;
  }

  .gallery-modal-title {
    font-size: 1.1rem;
  }
}

@media (max-width: 768px) and (orientation: landscape) {
  .gallery-modal-content {
    flex-direction: row;
    max-height: 90vh;
  }

  .gallery-modal-image-container {
    flex: 1;
    max-height: 90vh;
    border-bottom: none;
    border-right: 1px solid #e9ecef;
  }

  .gallery-modal-image {
    max-height: 90vh;
    min-height: auto;
    height: 100%;
  }

  .gallery-modal-info {
    flex: 1;
    max-height: 90vh;
    padding: 20px;
  }

  .gallery-modal-body {
    flex-direction: row;
  }
}


@media (hover: none) and (pointer: coarse) {
  .gallery-card,
  .gallery-zoom,
  .gallery-stats .stat {
    min-height: 44px;
  }

  .gallery-card:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
  }

  .gallery-zoom,
  .gallery-modal-close {
    min-height: 44px;
    min-width: 44px;
  }

  .gallery-modal-info {
    padding-bottom: 20px;
  }

  .gallery-modal-content {
    -webkit-overflow-scrolling: touch;
  }
}


.gallery-card {
  break-inside: avoid;
  page-break-inside: avoid;
  -webkit-column-break-inside: avoid;
  word-break: break-word;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}


.gallery-image img {
  max-width: 100%;
  height: auto;
  object-fit: cover;
}


.gallery-title,
.gallery-role,
.gallery-description,
.gallery-meta span {
  overflow-wrap: break-word;
  word-wrap: break-word;
  hyphens: auto;
  max-width: 100%;
}



.gallery-container-mobile {
  padding: 0 5px;
  margin: 0 -5px;
  width: calc(100% + 10px);
}

@media (max-width: 480px) {
  .gallery-container-mobile {
    padding: 0;
    margin: 0;
    width: 100%;
  }
}


@media (max-width: 768px) and (prefers-reduced-motion: reduce) {
  .gallery-card,
  .gallery-image img,
  .gallery-zoom {
    transition: none;
    animation: none;
  }

  .gallery-card:hover {
    transform: none;
  }
}


.touch-active {
  transform: scale(0.98);
  transition: transform 0.15s ease;
  opacity: 0.95;
}


button, 
a, 
.gallery-card, 
.team-member, 
.tech-item,
.stat-item,
.timeline-item,
.roadmap-item,
.thank-item,
.social-btn,
.gallery-zoom {
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}


.gallery-card,
.team-member,
.tech-item,
.stat-item,
.social-btn,
.gallery-zoom {
  transition: transform 0.15s ease, opacity 0.15s ease, box-shadow 0.3s ease;
}