@import url("../styles/components/base.css");

/* Define CSS Variables */
:root {
  
  /* Card Dimensions */
  --profile-size: 140px;
  
  /* Layout */
  --header-height: 80px;
}

/* Global Styles */
body {
  margin: 0;
  background: var(--bg-dark);
  color: var(--text-primary);
  overflow-x: hidden;
}

/* Animated Background Particles */
.background-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.particle {
  position: absolute;
  border-radius: 50%;
  opacity: 0.1;
  background: linear-gradient(45deg, var(--primary-light), var(--primary-dark));
  animation: particleFloat 20s linear infinite;
  box-shadow: 0 0 20px rgba(108, 50, 172, 0.3);
}

.particle:nth-child(1) { width: 100px; height: 100px; top: 15%; left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { width: 140px; height: 140px; top: 60%; left: 75%; animation-delay: -5s; }
.particle:nth-child(3) { width: 80px; height: 80px; top: 80%; left: 25%; animation-delay: -10s; }
.particle:nth-child(4) { width: 120px; height: 120px; top: 30%; left: 70%; animation-delay: -15s; }

@keyframes particleFloat {
  0% { transform: translateY(0) rotate(0deg); opacity: 0.05; }
  50% { opacity: 0.15; }
  100% { transform: translateY(-100vh) rotate(360deg); opacity: 0; }
}

/* Hero Section */
.hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  overflow: hidden;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a0a2e 50%, #0a0a0a 100%);
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 30% 70%, rgba(108, 50, 172, 0.3) 0%, transparent 50%);
  animation: heroPulse 8s ease-in-out infinite alternate;
}

@keyframes heroPulse {
  0% { opacity: 0.5; }
  100% { opacity: 1; }
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 2rem 1rem;
  max-width: 900px;
}

.title h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 800;
  margin-bottom: 1.5rem;
  background: linear-gradient(45deg, var(--primary-color), var(--primary-light), #9d50bb);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  animation: titleGlow 3s ease-in-out infinite alternate, gradientShift 3s ease infinite;
  line-height: 1.2;
}

@keyframes titleGlow {
  0% { filter: drop-shadow(0 0 20px rgba(108, 50, 172, 0.5)); }
  100% { filter: drop-shadow(0 0 40px rgba(139, 93, 207, 0.8)); }
}

@keyframes gradientShift {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.description p {
  font-size: clamp(1.05rem, 4vw, 1.3rem);
  color: var(--text-secondary);
  line-height: 1.8;
  animation: fadeInUp 1s ease-out 0.3s both;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Team Section */
.team-section {
  padding: 8rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.section-title {
  text-align: center;
  font-size: clamp(2.2rem, 5vw, 3rem);
  font-weight: 800;
  margin-bottom: 1rem;
  background: linear-gradient(45deg, var(--primary-color), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  padding-bottom: 0.8rem;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 6px;
  background: linear-gradient(90deg, transparent, var(--primary-color), var(--primary-light), transparent);
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(108, 50, 172, 0.4);
}

.section-title::before {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%) scaleX(1.1);
  width: 130px;
  height: 4px;
  background: linear-gradient(90deg, transparent, rgba(157, 80, 187, 0.3), rgba(108, 50, 172, 0.3), transparent);
  border-radius: 10px;
  filter: blur(3px);
}

/* Team Grid */
.team-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 320px));
  gap: 2.5rem;
  justify-content: center;
  margin-top: 4rem;
}

/* Team Card */
.team-member {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 30px;
  padding: 2.5rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  animation: slideInUp 0.8s ease-out both;
  cursor: pointer;
  min-height: 380px;
}

.team-member::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(108, 50, 172, 0.15), transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  border-radius: 30px;
}

.team-member:hover::before {
  opacity: 1;
}

.team-member:hover {
  transform: translateY(-12px);
  border-color: var(--primary-color);
  box-shadow: 0 25px 50px rgba(108, 50, 172, 0.3);
  background: rgba(255, 255, 255, 0.05);
}

/* Profile Picture */
.team-image-container {
  position: relative;
  margin-bottom: 1.5rem;
  width: var(--profile-size);
  height: var(--profile-size);
  border-radius: 50%;
  overflow: hidden;
}

.team-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--primary-color);
  transition: all 0.4s ease;
  z-index: 2;
  position: relative;
  box-shadow: 0 8px 24px rgba(108, 50, 172, 0.3);
}

.team-member:hover .team-image {
  transform: scale(1.08) rotate(5deg);
  border-color: var(--primary-light);
  box-shadow: 0 12px 32px rgba(108, 50, 172, 0.5);
}

/* Text Styles */
.name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  text-align: center;
  position: relative;
  z-index: 2;
}

.position {
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 1rem;
  position: relative;
  z-index: 2;
  line-height: 1.4;
}

.role-badge {
  display: inline-block;
  padding: 0.5rem 1.2rem;
  border-radius: 25px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: auto;
  position: relative;
  z-index: 2;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.team-member:hover .role-badge {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(108, 50, 172, 0.4);
}

/* Role Badge Variants */
.director {
  background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
  color: var(--text-primary);
  box-shadow: 0 4px 15px rgba(108, 50, 172, 0.3);
}

.executive {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-light));
  color: var(--text-primary);
  box-shadow: 0 4px 15px rgba(74, 34, 118, 0.3);
}

.manager {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  color: var(--text-primary);
  box-shadow: 0 4px 15px rgba(108, 50, 172, 0.3);
}

.support {
  background: rgba(255, 255, 255, 0.05);
  color: var(--primary-light);
  border: 2px solid var(--primary-light);
  backdrop-filter: blur(10px);
}

/* Staggered Animation */
.team-member:nth-child(1) { animation-delay: 0s; }
.team-member:nth-child(2) { animation-delay: 0.1s; }
.team-member:nth-child(3) { animation-delay: 0.2s; }
.team-member:nth-child(4) { animation-delay: 0.3s; }
.team-member:nth-child(5) { animation-delay: 0.4s; }
.team-member:nth-child(6) { animation-delay: 0.5s; }
.team-member:nth-child(7) { animation-delay: 0.6s; }
.team-member:nth-child(8) { animation-delay: 0.7s; }
.team-member:nth-child(9) { animation-delay: 0.8s; }
.team-member:nth-child(10) { animation-delay: 0.9s; }
.team-member:nth-child(11) { animation-delay: 1s; }
.team-member:nth-child(12) { animation-delay: 1.1s; }

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Design */

/* Large Desktop */
@media (max-width: 1400px) {
  .team-section {
    max-width: 1200px;
  }
}

/* Tablet Landscape */
@media (max-width: 1024px) {
  .team-section {
    padding: 6rem 2rem;
  }
  
  .team-container {
    grid-template-columns: repeat(auto-fit, minmax(260px, 300px));
    gap: 2rem;
  }
  
  :root {
    --profile-size: 120px;
  }
  
  .team-member {
    min-height: 360px;
  }
}

/* Tablet Portrait and Mobile Landscape */
@media (max-width: 768px) {
  .hero {
    min-height: 100vh;
    padding: calc(var(--header-height) + 2rem) 1rem 4rem;
  }
  
  .title h1 {
    font-size: 2.5rem;
  }
  
  .description p {
    font-size: 1rem;
    padding: 0 1rem;
  }
  
  .team-section {
    padding: 4rem 1rem;
  }
  
  .section-title {
    font-size: 2.2rem;
  }
  
  .team-container {
    grid-template-columns: repeat(auto-fit, minmax(240px, 280px));
    gap: 1.5rem;
  }
  
  :root {
    --profile-size: 110px;
  }
  
  .team-member {
    padding: 2rem 1.5rem;
    min-height: 340px;
  }
  
  .name {
    font-size: 1.3rem;
  }
  
  .position {
    font-size: 1rem;
  }
  
  .role-badge {
    font-size: 0.8rem;
    padding: 0.4rem 1rem;
  }
}

/* Mobile Portrait */
@media (max-width: 480px) {
  .hero {
    padding: calc(var(--header-height) + 1rem) 0.5rem 3rem;
  }
  
  .title h1 {
    font-size: 2rem;
    padding: 0 1rem;
  }
  
  .description p {
    font-size: 0.95rem;
  }
  
  .team-section {
    padding: 3rem 1rem;
  }
  
  .section-title {
    font-size: 1.8rem;
  }
  
  .team-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: 320px;
    margin: 3rem auto 0;
  }
  
  :root {
    --profile-size: 100px;
  }
  
  .team-member {
    padding: 2rem 1.5rem;
    border-radius: 24px;
    width: 100%;
    min-height: 320px;
  }
  
  .team-image {
    border-width: 3px;
  }
  
  .name {
    font-size: 1.25rem;
    margin-bottom: 0.4rem;
  }
  
  .position {
    font-size: 0.95rem;
    margin-bottom: 0.8rem;
  }
  
  .role-badge {
    font-size: 0.75rem;
    padding: 0.4rem 1rem;
  }
}

/* Extra Small Devices */
@media (max-width: 360px) {
  .title h1 {
    font-size: 1.75rem;
  }
  
  .section-title {
    font-size: 1.6rem;
  }
  
  :root {
    --profile-size: 90px;
  }
  
  .team-member {
    padding: 1.5rem 1.25rem;
    min-height: 300px;
  }
  
  .name {
    font-size: 1.15rem;
  }
  
  .position {
    font-size: 0.9rem;
  }
  
  .role-badge {
    font-size: 0.7rem;
    padding: 0.35rem 0.9rem;
  }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
  .team-member:hover {
    transform: translateY(-8px);
  }
  
  .team-member:hover .team-image {
    transform: scale(1.05);
  }
  
  .team-member:hover .role-badge {
    transform: translateY(-2px);
  }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .team-image {
    image-rendering: -webkit-optimize-contrast;
  }
}