/* =============================================
   IDENTIDAD MERLINA — 2026
   Tabs verticales (izq.) + panel de contenido (der.)
   Estilo moderno: glassmorphism, acentos por color,
   micro-interacciones y gradientes suaves.
============================================= */

#identidadMerlina {
  background:
    radial-gradient(1100px 420px at 8% -10%, rgba(0,179,230,0.10), transparent 60%),
    radial-gradient(900px 380px at 100% 0%, rgba(238,123,0,0.08), transparent 55%),
    #fff !important;
  padding-top: 40px;
}

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

/* --- Paleta de acento por pestaña --- */
.identity-tab--green  { --accent: #16a34a; --accent-soft: rgba(22,163,74,0.12); }
.identity-tab--orange { --accent: var(--color-orange); --accent-soft: rgba(238,123,0,0.12); }
.identity-tab--cyan   { --accent: var(--color-secondary); --accent-soft: rgba(0,179,230,0.12); }
.identity-tab--pink   { --accent: #ec4899; --accent-soft: rgba(236,72,153,0.12); }
.identity-tab--purple { --accent: #8b5cf6; --accent-soft: rgba(139,92,246,0.12); }
.identity-tab--blue   { --accent: var(--color-primary); --accent-soft: rgba(3,62,140,0.12); }

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

/* --- Navegación de tabs --- */
.identity-tabs-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-2);
  background: rgba(249,250,251,0.7);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(6px);
}

.identity-tab {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: left;
  isolation: isolate;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
}
.identity-tab::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12%;
  bottom: 12%;
  width: 3px;
  border-radius: var(--radius-full);
  background: var(--accent);
  opacity: 0;
  transform: scaleY(0.4);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.identity-tab:hover {
  background: var(--accent-soft);
  border-color: transparent;
  transform: translateX(3px);
}
.identity-tab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.identity-tab-icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-gray-100);
  color: var(--color-gray-400);
  box-shadow: none;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.identity-tab-icon svg {
  width: 18px;
  height: 18px;
}

.identity-tab-label {
  flex: 1;
  min-width: 0;
  font-size: 13px !important;
  font-weight: 500;
  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;
  transform: translateX(-4px);
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.identity-tab-arrow svg {
  width: 100%;
  height: 100%;
}

.identity-tab--active {
  background: var(--accent-soft);
  box-shadow: 0 6px 16px -8px var(--accent);
}
.identity-tab--active::before {
  opacity: 1;
  transform: scaleY(1);
}
.identity-tab--active .identity-tab-icon {
  background: var(--accent);
  color: #fff;
  transform: scale(1.06);
  box-shadow: 0 4px 10px -2px var(--accent);
}
.identity-tab--active .identity-tab-label {
  color: var(--accent);
  font-weight: 700;
}
.identity-tab--active .identity-tab-arrow {
  color: var(--accent);
  opacity: 1;
  transform: translateX(0);
}

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

.identity-tab-panel {
  display: none;
  background: var(--color-white);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-5);
}
.identity-tab-panel--active {
  display: block;
  animation: identityFadeIn 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes identityFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  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 {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-lg);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--color-primary);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-gray-200);
}
.identity-tab-panel--active .identity-panel-title::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent, var(--color-secondary));
  box-shadow: 0 0 0 4px var(--accent-soft, transparent);
}

.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: var(--space-3);
}

/* --- Tercer Microclima del Mundo: galería --- */
.microclima-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  margin: var(--space-4) 0;
}
.microclima-gallery img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
}
.microclima-gallery img:hover {
  transform: scale(1.04);
  box-shadow: var(--shadow-lg);
}
@media (max-width: 640px) {
  .microclima-gallery {
    grid-template-columns: 1fr;
  }
  .microclima-gallery img {
    height: 200px;
  }
}

/* --- Tercer Microclima del Mundo: destacados --- */
.microclima-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.microclima-highlight {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--color-gray-50);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-primary);
  transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.microclima-highlight:hover {
  background: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.microclima-highlight-icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ffb347, var(--color-orange));
  color: #fff;
}

.microclima-highlight-icon svg {
  width: 18px;
  height: 18px;
}

/* --- Galería Ex Intendentes --- */
.mayors-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}
.mayors-grid p.mayor-name {
  line-height: normal;
  font-size: 13px;
  margin-bottom: 0 !important;
}

.mayor-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-4);
  background: var(--color-gray-50);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-lg);
  transition: background 0.25s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease, border-color 0.25s ease;
}
.mayor-card:hover {
  background: var(--color-white);
  border-color: var(--color-secondary);
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

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

.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);
  box-shadow: var(--shadow-md);
  margin-bottom: var(--space-4);
}

.symbol-shield {
  display: block;
  width: 100%;
  max-width: 180px;
  margin: 0 auto var(--space-4);
  filter: drop-shadow(0 10px 20px rgba(3,62,140,0.15));
}

.shield-parts {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}
.shield-parts 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 {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-secondary);
}
.shield-parts 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;
  box-shadow: var(--shadow-md);
}
.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);
  }
  .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);
  }
}
