/* =============================================
   IDENTIDAD MERLINA
   Tabs verticales (izq.) + panel de contenido (der.)
   Estilo minimalista, paleta celeste/azul institucional
============================================= */

#identidadMerlina {
  background: #f4f4f4 !important;
  padding-top: 40px;
}

p.destacado {
  font-weight: 600;
  color: var(--color-primary);
}

.identity-tabs {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  max-width: 1100px;
  margin-inline: auto;
  padding-bottom: var(--space-10);
}

/* --- Navegación de tabs --- */
.identity-tabs-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.identity-tab {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: transparent;
  border: none;
  border-left: 3px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: left;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
}
.identity-tab:hover {
  background: rgba(0,179,230,0.08);
  transform: translateX(2px);
}

.identity-tab-icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #4dd0f0, #00b3e6);
  color: #fff;
  box-shadow: 0 2px 6px rgba(0,179,230,0.35);
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}
.identity-tab-icon svg {
  width: 18px;
  height: 18px;
}

.identity-tab-label {
  flex: 1;
  min-width: 0;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--color-gray-500);
  line-height: 1.35;
  transition: color 0.2s ease;
}

.identity-tab-arrow {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: var(--color-gray-400);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.identity-tab-arrow svg {
  width: 100%;
  height: 100%;
}

.identity-tab--active {
  border-left-color: var(--color-secondary);
  background: rgba(0,179,230,0.1);
}
.identity-tab--active .identity-tab-icon {
  background: linear-gradient(135deg, #f0c674, #d4a24c);
  color: #fff;
  transform: scale(1.05);
}
.identity-tab--active .identity-tab-label {
  color: var(--color-primary);
  font-weight: 600;
}
.identity-tab--active .identity-tab-arrow {
  color: var(--color-secondary);
  opacity: 1;
  transform: translateX(2px);
}

/* --- Panel de contenido --- */
.identity-tabs-content {
  position: relative;
}

.identity-tab-panel {
  display: none;
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: var(--space-5);
}
.identity-tab-panel--active {
  display: block;
  animation: identityFadeIn 0.4s ease;
}

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

.identity-panel-body::-webkit-scrollbar { width: 6px; }
.identity-panel-body::-webkit-scrollbar-track { background: transparent; }
.identity-panel-body::-webkit-scrollbar-thumb {
  background: var(--color-secondary-light);
  border-radius: var(--radius-full);
}

.identity-panel-title {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-gray-200);
}

.identity-panel-body {
  max-height: 460px;
  overflow-y: auto;
  padding-right: var(--space-2);
  animation: identityFadeIn 0.6s ease;
}
.identity-panel-body p {
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--color-gray-500);
  line-height: 1.7;
  margin-top: 0;
  margin-bottom: 0;
}

/* --- Galería Ex Intendentes --- */
.mayors-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}

.mayor-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-4);
  background: var(--color-gray-100);
  border-radius: var(--radius-lg);
  transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.mayor-card:hover {
  background: var(--color-white);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.mayor-avatar {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--color-secondary);
  margin-bottom: var(--space-3);
  transition: transform 0.25s ease;
}
.mayor-card:hover .mayor-avatar {
  transform: scale(1.05);
}

.mayor-name {
  font-size: var(--text-sm);
  font-weight: 600 !important;
  color: var(--color-primary) !important;
  margin: 0;
}
.mayor-period {
  font-size: var(--text-xs);
  color: var(--color-gray-500);
  margin: var(--space-1) 0 0;
}

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

/* --- Símbolos: bandera + escudo + himno --- */
.symbol-video {
  display: block;
  width: 100%;
  max-width: 420px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
}

.symbol-shield {
  display: block;
  width: 100%;
  max-width: 180px;
  margin: 0 auto var(--space-4);
}

.shield-parts,
.dot-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}
.shield-parts li,
.dot-list li {
  font-size: var(--text-sm);
  color: var(--color-gray-500);
  line-height: 1.6;
  padding-left: var(--space-4);
  position: relative;
}
.shield-parts li::before,
.dot-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-secondary);
}
.shield-parts li strong,
.dot-list li strong {
  color: var(--color-primary);
}

.himno-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.himno-video {
  position: relative;
  width: 100%;
  max-width: 420px;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  overflow: hidden;
}
.himno-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}
.himno-info p {
  margin-top: 0;
}

.himno-author {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}
.himno-author-photo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--color-secondary);
  flex-shrink: 0;
}
.himno-author p {
  margin: 0;
}

@media (min-width: 768px) {
  .himno-grid {
    flex-direction: row;
    align-items: center;
  }
  .himno-video {
    flex: 0 0 420px;
  }
  .himno-info {
    flex: 1;
    min-width: 0;
  }
}

/* --- Tablet/Escritorio: 900px ---
   Tabs a la izquierda, contenido a la derecha */
@media (min-width: 900px) {
  .identity-tabs {
    flex-direction: row;
    align-items: flex-start;
    gap: var(--space-6);
  }
  .identity-tabs-nav {
    flex: 0 0 280px;
    position: sticky;
    top: var(--space-6);
    border-right: 1px solid var(--color-gray-200);
  }
  .identity-tabs-content {
    flex: 1;
    min-width: 0;
  }
  .identity-tab {
    padding: var(--space-4);
  }
  .identity-tab-icon {
    width: 38px;
    height: 38px;
  }
  .identity-tab-icon svg {
    width: 20px;
    height: 20px;
  }
  .identity-tab-label {
    font-size: var(--text-sm);
  }
  .identity-tab-panel {
    padding: var(--space-6);
  }
}
