/* ========================================
   NUEVO DISEÑO PARA QUIÉNES SOMOS
   ======================================== */

#departments {
  background: linear-gradient(135deg, #f5f9fc 0%, #eef5f9 100%);
  padding: 60px 0;
}

.quienes-somos-modern {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  box-shadow: none !important;
}

/* Título principal */
.quienes-somos-title {
  font-size: 2.8rem;
  font-weight: 800;
  color: #1f3a72;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.quienes-somos-subtitle {
  font-size: 1.1rem;
  color: #64748b;
  margin-bottom: 40px;
  font-weight: 500;
}

/* Contenedor principal */
.quienes-somos-modern .row {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  align-items: start;
  background: transparent;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

#departments .nav-tabs {
  border: none;
  background: transparent;
  border-radius: 0;
  padding: 20px 0;
  gap: 10px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  box-shadow: none;
  border-right: 3px solid #3fbbc0;
  padding-right: 20px;
}

#departments .nav-tabs .nav-link {
  background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
  color: #475569;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 18px;
  margin: 2px 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 10px;
}

#departments .nav-tabs .nav-link:hover {
  background: linear-gradient(135deg, #2a7d9c 0%, #2d87aa 100%);
  color: white;
  border-color: #2a7d9c;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(63, 187, 192, 0.3);
}

#departments .nav-tabs .nav-link.active {
  background: linear-gradient(135deg, #1f3a72 0%, #2a4a7a 100%);
  color: white;
  border-color: #1f3a72;
  box-shadow: 0 8px 24px rgba(31, 58, 114, 0.4);
  animation: pulse-active 1.5s ease-in-out infinite;
}

#departments .nav-tabs .nav-link:not(.active) {
  background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
  color: #475569;
  border-color: #e2e8f0;
}
@keyframes pulse-active {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 8px 24px rgba(63, 187, 192, 0.4);
  }
  50% {
    transform: scale(1.02);
    box-shadow: 0 12px 32px rgba(63, 187, 192, 0.6);
  }
}

#departments .nav-tabs .nav-link i {
  margin-right: 8px;
  font-size: 1.2rem;
}

/* Contenido de tabs */
.quienes-somos-modern .tab-content {
  width: 100%;
  min-width: 0;
}

.quienes-somos-modern .row > .col-lg-3 {
  padding: 0;
}

.quienes-somos-modern .row > .col-lg-12 {
  padding: 0;
}

.quienes-somos-modern .tab-pane {
  animation: fadeInScale 0.5s ease-out;
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.content-box-dinamico {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.98) 100%);
  border-radius: 20px;
  border: 2px solid #e2e8f0;
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.08);
  padding: 50px 40px;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.content-box-dinamico::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, #1f3a72 0%, #3fbbc0 50%, #1f3a72 100%);
}

.icon-header {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #1f3a72 0%, #3fbbc0 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 25px;
  box-shadow: 0 8px 20px rgba(31, 58, 114, 0.3);
  font-size: 2.5rem;
  color: white;
}

.content-box-dinamico h3 {
  color: #1f3a72;
  font-size: 1.8rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 25px;
  position: relative;
}

.content-box-dinamico h3::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, #3fbbc0, #1f3a72);
  border-radius: 2px;
}

.content-box-dinamico p {
  color: #475569;
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 20px;
  text-align: justify;
}

/* Tarjetas de valores/políticas */
.valores-cards,
.politicas-cards,
.seguridad-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 30px;
  width: 100%;
}

.value-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
  border-radius: 16px;
  border: 2px solid #e2e8f0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
  padding: 22px 18px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  text-align: center;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.value-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(63, 187, 192, 0.15), transparent);
  transition: left 0.6s ease;
}

.value-card:hover::before {
  left: 100%;
}

.value-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(63, 187, 192, 0.25);
  border-color: #3fbbc0;
}

.value-card .card-content {
  display: grid;
  gap: 0.75rem;
  position: relative;
  z-index: 1;
}

.value-card .icon {
  width: 54px;
  height: 54px;
  background: linear-gradient(135deg, #1f3a72 0%, #3fbbc0 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  box-shadow: 0 4px 12px rgba(31, 58, 114, 0.2);
  transition: all 0.3s ease;
}

.value-card:hover .icon {
  transform: scale(1.1) rotate(-6deg);
  box-shadow: 0 6px 16px rgba(31, 58, 114, 0.35);
}

.value-card .icon i {
  font-size: 1.6rem;
  color: white;
}

.value-card h3 {
  color: #1f3a72;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.3;
  word-break: break-word;
  overflow-wrap: break-word;
}

.value-card p {
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0;
  text-align: center;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Listas de derechos y deberes */
.rights-list,
.duties-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 30px;
  width: 100%;
}

.right-item,
.duty-item {
  background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
  border-radius: 14px;
  border-left: 5px solid #3fbbc0;
  padding: 18px 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  display: flex;
  gap: 15px;
  align-items: flex-start;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.right-item:hover,
.duty-item:hover {
  transform: translateX(8px) translateY(-4px);
  box-shadow: 0 8px 24px rgba(63, 187, 192, 0.2);
  border-left-color: #1f3a72;
}

.right-item i,
.duty-item i {
  color: #3fbbc0;
  font-size: 1.4rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.right-item p,
.duty-item p {
  color: #1f3a72;
  font-size: 0.9rem;
  line-height: 1.65;
  margin: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}

.right-item strong,
.duty-item strong {
  color: #1f3a72;
  display: block;
  margin-bottom: 4px;
}

/* Cajas destacadas */
.highlight-box {
  background: linear-gradient(135deg, rgba(63, 187, 192, 0.1) 0%, rgba(31, 58, 114, 0.05) 100%);
  border: 2px solid rgba(63, 187, 192, 0.3);
  border-radius: 12px;
  padding: 20px;
  margin-top: 25px;
}

.highlight-box p {
  color: #1f3a72;
  font-weight: 600;
  margin: 0;
  font-size: 1rem;
}

/* Textos introductorios */
.politicas-intro,
.seguridad-intro {
  background: linear-gradient(135deg, rgba(63, 187, 192, 0.08) 0%, rgba(31, 58, 114, 0.05) 100%);
  border: 2px solid rgba(63, 187, 192, 0.2);
  border-radius: 12px;
  padding: 20px;
  margin-top: 25px;
  font-style: italic;
  color: #475569;
  text-align: center;
  font-size: 0.95rem;
}

/* Responsive */
@media (max-width: 1200px) {
  .quienes-somos-modern .row {
    grid-template-columns: 250px 1fr;
    gap: 30px;
  }

  .value-card,
  .right-item,
  .duty-item {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
}

@media (max-width: 992px) {
  .quienes-somos-modern .row {
    grid-template-columns: 1fr;
  }

  #departments .nav-tabs {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    border-right: none;
    border-bottom: 3px solid #3fbbc0;
    padding-right: 0;
    padding-bottom: 20px;
  }

  #departments .nav-tabs .nav-link {
    width: auto;
    min-width: 120px;
    text-align: center;
  }
}

@media (max-width: 768px) {
  .quienes-somos-title {
    font-size: 2rem;
  }

  .quienes-somos-subtitle {
    font-size: 0.95rem;
  }

  #departments .nav-tabs {
    flex-direction: column;
    align-items: stretch;
    padding: 15px 0;
  }

  #departments .nav-tabs .nav-link {
    width: 100%;
    text-align: left;
  }

  .content-box-dinamico {
    padding: 30px 20px;
  }

  .icon-header {
    width: 70px;
    height: 70px;
    font-size: 2rem;
  }

  .content-box-dinamico h3 {
    font-size: 1.4rem;
  }

  .valores-cards,
  .politicas-cards,
  .seguridad-cards,
  .rights-list,
  .duties-list {
    gap: 15px;
  }

  .value-card,
  .right-item,
  .duty-item {
    flex: 1 1 calc(50% - 7.5px);
  }

  .right-item,
  .duty-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .right-item i,
  .duty-item i {
    margin-top: 0;
  }
}

@media (max-width: 480px) {
  .quienes-somos-title {
    font-size: 1.6rem;
  }

  .value-card,
  .right-item,
  .duty-item {
    flex: 1 1 100%;
  }

  #departments .nav-tabs .nav-link {
    padding: 10px 15px;
    font-size: 0.9rem;
  }

  .content-box-dinamico {
    padding: 20px 15px;
  }

  .content-box-dinamico p {
    font-size: 0.95rem;
  }
}
