/* =============================================
   DESCENTRALIZACIÓN
============================================= */

#descentralizacion {
  background: white !important;
  padding-top: 40px;
  padding-bottom: var(--space-10);
}

#descentralizacionTitle {
  overflow: hidden;
}

.desc-title-drop {
  display: inline-block;
  animation: descDropBounce 1.3s cubic-bezier(0.28, 0.84, 0.42, 1) both;
}

.desc-title-drop--delay {
  animation-delay: 0.15s;
}

@keyframes descDropBounce {
  0%   { transform: translateY(-160%); opacity: 0; }
  45%  { transform: translateY(0);     opacity: 1; }
  60%  { transform: translateY(-16px); }
  75%  { transform: translateY(0); }
  87%  { transform: translateY(-7px); }
  100% { transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .desc-title-drop {
    animation: none;
  }
}

/* Introducción */
.desc-lead {
  max-width: 900px;
  margin: var(--space-6) auto 0;
  padding: var(--space-6) var(--space-7);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  background: linear-gradient(135deg, rgba(0,179,230,0.07), rgba(3,62,140,0.03));
  border: 1px solid rgba(0,179,230,0.18);
  border-radius: 20px;
  box-shadow: 0 6px 20px rgba(3,62,140,0.1);
}

.desc-lead p {
  font-size: var(--text-base);
  color: var(--color-gray-500);
  line-height: 1.7;
  margin: 0;
}
.desc-lead p:first-child {
  color: var(--color-primary-dark);
}
.desc-lead + .desc-section-title {
  margin-top: var(--space-10);
}

/* Títulos de sección */
.desc-section-title {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-primary-dark);
  max-width: 1100px;
  margin-inline: auto;
  margin-top: var(--space-9);
  margin-bottom: var(--space-5);
}

.desc-section-title--spaced {
  margin-top: var(--space-10);
}

.desc-section-title svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: #fff;
}
.desc-section-title svg:first-of-type {
  padding: 8px;
  box-sizing: content-box;
  border-radius: 50%;
  background: linear-gradient(135deg, #0db6dd, #033e8c);
  box-shadow: 0 6px 14px -6px rgba(3,62,140,0.5);
}

/* Grilla de funciones */
.desc-func-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  max-width: 1100px;
  margin-inline: auto;
}

@media (min-width: 640px) {
  .desc-func-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.desc-func-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  background: var(--color-white);
  border: 1px solid rgba(3,62,140,0.06);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease, border-color 0.25s ease;
}

.desc-func-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px rgba(3,62,140,0.12);
  border-color: rgba(13,182,221,0.3);
}

.desc-func-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  color: #fff;
  background: linear-gradient(135deg, #0557c2 0%, var(--color-primary) 100%);
  box-shadow: 0 6px 14px -6px rgba(3,62,140,0.5);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.desc-func-item:hover .desc-func-icon {
  transform: rotate(-6deg) scale(1.08);
}

.desc-func-icon svg {
  width: 100%;
  height: 100%;
}

.desc-func-item span:last-child {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-primary-dark);
  padding-top: 6px;
}

.desc-func-item:nth-child(1)  .desc-func-icon { background: linear-gradient(135deg, #4fc3f7, #0288d1); box-shadow: 0 6px 14px -6px rgba(2,136,209,0.5); }
.desc-func-item:nth-child(2)  .desc-func-icon { background: linear-gradient(135deg, #ffb347, #ee7b00); box-shadow: 0 6px 14px -6px rgba(238,123,0,0.5); }
.desc-func-item:nth-child(3)  .desc-func-icon { background: linear-gradient(135deg, #4dd0e1, #00838f); box-shadow: 0 6px 14px -6px rgba(0,131,143,0.5); }
.desc-func-item:nth-child(4)  .desc-func-icon { background: linear-gradient(135deg, #81c784, #2e7d32); box-shadow: 0 6px 14px -6px rgba(46,125,50,0.5); }
.desc-func-item:nth-child(5)  .desc-func-icon { background: linear-gradient(135deg, #ff8a65, #d84315); box-shadow: 0 6px 14px -6px rgba(216,67,21,0.5); }
.desc-func-item:nth-child(6)  .desc-func-icon { background: linear-gradient(135deg, #ba68c8, #6a1b9a); box-shadow: 0 6px 14px -6px rgba(106,27,154,0.5); }
.desc-func-item:nth-child(7)  .desc-func-icon { background: linear-gradient(135deg, #f06292, #ad1457); box-shadow: 0 6px 14px -6px rgba(173,20,87,0.5); }
.desc-func-item:nth-child(8)  .desc-func-icon { background: linear-gradient(135deg, #aed581, #689f38); box-shadow: 0 6px 14px -6px rgba(104,159,56,0.5); }
.desc-func-item:nth-child(9)  .desc-func-icon { background: linear-gradient(135deg, #4db6ac, #00695c); box-shadow: 0 6px 14px -6px rgba(0,105,92,0.5); }
.desc-func-item:nth-child(10) .desc-func-icon { background: linear-gradient(135deg, #7986cb, #303f9f); box-shadow: 0 6px 14px -6px rgba(48,63,159,0.5); }

/* Grilla de descentralizadores */
.desc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
  max-width: 1100px;
  margin-inline: auto;
}

@media (min-width: 640px) {
  .desc-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .desc-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.desc-card {
  position: relative;
  background: linear-gradient(160deg, #f0faff 0%, #fff 45%);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-md);
  text-align: center;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
}
.desc-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #0db6dd, #033e8c);
}

.desc-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 36px rgba(3,62,140,0.16);
}

.desc-grid .desc-card:nth-child(6n+1)::before { background: linear-gradient(90deg, #4fc3f7, #0288d1); }
.desc-grid .desc-card:nth-child(6n+2)::before { background: linear-gradient(90deg, #ffb347, #ee7b00); }
.desc-grid .desc-card:nth-child(6n+3)::before { background: linear-gradient(90deg, #81c784, #2e7d32); }
.desc-grid .desc-card:nth-child(6n+4)::before { background: linear-gradient(90deg, #ba68c8, #6a1b9a); }
.desc-grid .desc-card:nth-child(6n+5)::before { background: linear-gradient(90deg, #f06292, #ad1457); }
.desc-grid .desc-card:nth-child(6n+6)::before { background: linear-gradient(90deg, #4db6ac, #00695c); }

.desc-card-photo-wrap {
  width: 112px;
  height: 112px;
  margin: 0 auto var(--space-4);
  border-radius: 50%;
  overflow: hidden;
  background: var(--color-primary);
  box-shadow: 0 8px 18px -6px rgba(3,62,140,0.4);
}

.desc-card-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.desc-card-placeholder {
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.desc-card-placeholder svg {
  width: 46px;
  height: 46px;
}

.desc-card-name {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-primary-dark);
  margin-bottom: var(--space-1);
}

.desc-card-zone {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--color-primary-dark);
  background: rgba(0,179,230,0.1);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: var(--space-4);
  line-height: 1.5;
}

.desc-card-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-gray-200);
  text-align: left;
}

.desc-card-info li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-gray-500);
}

.desc-card-info svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--color-primary);
}

.desc-card-info a {
  color: var(--color-gray-500);
  transition: color 0.15s;
}

.desc-card-info a:hover {
  color: var(--color-primary);
}
