/* ===== Reset & Base ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(135deg, #f8f9fa 0%, #f0f4f8 100%);
  color: #1e2530;
  line-height: 1.6;
  min-height: 100vh;
}

/* ===== Container & Layout ===== */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

@media (max-width: 768px) {
  .container {
    padding: 1.5rem 1rem;
  }
}

/* ===== Header ===== */
.header {
  background: linear-gradient(135deg, #1f8a82 0%, #21958c 100%);
  color: white;
  padding: 3rem 2.5rem;
  border-radius: 12px;
  margin-bottom: 3rem;
  box-shadow: 0 8px 24px rgba(31, 138, 130, 0.15);
  animation: slideDown 0.6s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  gap: 2rem;
}

.header-left h1.title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.header-left p.subtitle {
  font-size: 1.1rem;
  opacity: 0.95;
  font-weight: 500;
}

.header-right {
  display: flex;
  align-items: center;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.15);
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  backdrop-filter: blur(10px);
}

.status-dot {
  width: 10px;
  height: 10px;
  background: #8dc63f;
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.15);
  }
}

.status-text {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.description {
  font-size: 1rem;
  opacity: 0.92;
  line-height: 1.7;
}

@media (max-width: 768px) {
  .header {
    padding: 2rem 1.5rem;
  }

  .header-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-left h1.title {
    font-size: 2rem;
  }

  .header-left p.subtitle {
    font-size: 1rem;
  }
}

/* ===== Sections ===== */
.section {
  margin-bottom: 3.5rem;
  animation: fadeInUp 0.7s ease-out;
}

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

.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.65rem;
  font-weight: 600;
  color: #1f8a82;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 3px solid #8dc63f;
  letter-spacing: -0.01em;
}

@media (max-width: 768px) {
  .section-title {
    font-size: 1.35rem;
  }
}

/* ===== Team Grid ===== */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.75rem;
}

.team-grid.conducing {
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  max-width: 800px;
}

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

  .team-grid.conducing {
    grid-template-columns: 1fr;
  }
}

/* ===== Cards ===== */
.card {
  background: white;
  border-radius: 10px;
  padding: 1.75rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid #eef2f7;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #1f8a82, #8dc63f);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease-out;
}

.card:hover {
  box-shadow: 0 8px 28px rgba(31, 138, 130, 0.15);
  transform: translateY(-4px);
  border-color: #1f8a82;
}

.card:hover::before {
  transform: scaleX(1);
}

.card-director {
  background: linear-gradient(135deg, #f0f8f7 0%, #f5fbfa 100%);
  border: 2px solid #1f8a82;
}

.card-director .card-name {
  color: #1f8a82;
}

.card-orchestrator {
  background: linear-gradient(135deg, #fff9f0 0%, #fffbf7 100%);
  border: 2px solid #8dc63f;
}

.card-orchestrator .card-name {
  color: #1f8a82;
}

.card-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
  position: relative;
}

.card-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: #1e2530;
  margin: 0;
  letter-spacing: -0.01em;
  flex: 1;
}

.card-role {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: #1f8a82;
  margin-top: 0.4rem;
}

.status-pulse {
  width: 10px;
  height: 10px;
  background: #8dc63f;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
  animation: pulse 2s ease-in-out infinite;
  box-shadow: 0 0 8px rgba(141, 198, 63, 0.5);
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.card-detail {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.5;
  margin: 0;
}

.card-detail strong {
  color: #1e2530;
  font-weight: 600;
}

.card-badge {
  align-self: flex-start;
  display: inline-block;
  padding: 0.4rem 0.9rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-top: 0.5rem;
}

.badge-ai {
  background: #e8f5e9;
  color: #1f8a82;
}

.badge-director {
  background: #f0f8f7;
  color: #1f8a82;
}

/* ===== Footer ===== */
.footer {
  margin-top: 4rem;
  padding: 2rem;
  background: #1e2530;
  color: white;
  text-align: center;
  border-radius: 10px;
  animation: fadeInUp 0.8s ease-out 0.3s both;
}

.footer p {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.footer-meta {
  font-size: 0.85rem;
  opacity: 0.7;
}

@media (max-width: 768px) {
  .footer {
    padding: 1.5rem;
  }

  .footer p {
    font-size: 0.9rem;
  }
}

/* ===== Print Styles ===== */
@media print {
  body {
    background: white;
  }

  .header {
    break-after: avoid;
  }

  .card {
    break-inside: avoid;
  }

  .status-pulse,
  .status-indicator {
    display: none;
  }
}

/* ===== Accessibility ===== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (prefers-color-scheme: dark) {
  body {
    background: #0f1419;
    color: #e0e6ec;
  }

  .card {
    background: #1a1f28;
    border-color: #2a3038;
    color: #e0e6ec;
  }

  .card-detail {
    color: #a8b2c0;
  }

  .card-director,
  .card-orchestrator {
    background: #1f2a28;
  }

  .footer {
    background: #0a0e14;
    border-top: 1px solid #2a3038;
  }
}

@keyframes card-fade-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Logo în header ===== */
.header-left { display: flex; align-items: center; gap: 16px; }
.header-logo { width: 56px; height: 56px; object-fit: contain; flex-shrink: 0; }

/* ===== Linia de specializare pe carduri ===== */
.card-spec {
  font-size: 0.82rem;
  line-height: 1.5;
  color: #4a5568;
  margin-top: 6px;
}
.card-spec strong { color: #1F8A82; font-weight: 600; }

/* ===== Organigramă ierarhică ===== */
.orgchart {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 0 4px;
}
.org-level { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }
.org-node {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 14px 26px;
  border-radius: 14px;
  text-align: center;
  min-width: 200px;
}
.org-node-director {
  background: linear-gradient(135deg, #1F8A82, #21958C);
  color: #fff;
}
.org-node-coo {
  background: #fff;
  border: 2px solid #8DC63F;
  color: #1E2530;
}
.org-node-name { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 1.05rem; }
.org-node-director .org-node-role { color: rgba(255,255,255,0.85); font-size: 0.8rem; }
.org-node-coo .org-node-role { color: #5a6b7b; font-size: 0.8rem; }
.org-pulse {
  position: absolute; top: 12px; left: 14px;
  width: 9px; height: 9px; border-radius: 50%;
  background: #8DC63F; box-shadow: 0 0 0 0 rgba(141,198,63,0.6);
  animation: org-pulse-anim 2s infinite;
}
@keyframes org-pulse-anim {
  0% { box-shadow: 0 0 0 0 rgba(141,198,63,0.6); }
  70% { box-shadow: 0 0 0 8px rgba(141,198,63,0); }
  100% { box-shadow: 0 0 0 0 rgba(141,198,63,0); }
}
.org-connector-v { width: 2px; height: 26px; background: #8DC63F; }
.org-departments { gap: 16px; margin-top: 4px; }
.org-dept {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: #f0f4f3;
  border: 1px solid #d7e3e0;
  border-top: 3px solid #1F8A82;
  border-radius: 12px;
  padding: 14px 22px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  color: #1E2530;
  font-size: 0.95rem;
  min-width: 190px;
  text-align: center;
}
.org-dept span {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 0.78rem;
  color: #1F8A82;
}
.org-departments::before {
  content: "";
  position: absolute;
  margin-top: -16px;
  width: 66%;
  height: 2px;
  background: #8DC63F;
}

@media (prefers-color-scheme: dark) {
  .card-spec { color: #9fb0bd; }
  .card-spec strong { color: #4ec9be; }
  .org-node-coo { background: #1a1f28; color: #e8edf2; }
  .org-node-coo .org-node-role { color: #9fb0bd; }
  .org-dept { background: #161b22; border-color: #2a3038; color: #e8edf2; }
}

@media (max-width: 640px) {
  .org-departments::before { display: none; }
  .header-logo { width: 44px; height: 44px; }
}

/* Fix contrast: numele agenților lizibile pe carduri închise (dark mode) */
@media (prefers-color-scheme: dark) {
  .card .card-name { color: #e8edf2; }
  .card-director .card-name,
  .card-orchestrator .card-name { color: #4ec9be; }
}
