/* ═══════════════════════════════════════════════
   institucional.css — Sección Identidad Institucional
   Compatible con global.css y pastoral.css
═══════════════════════════════════════════════ */

/* ─── SECCIÓN CONTENEDOR ─────────────────────── */
#identidad-institucional {
  padding: 6rem 0;
  background: #fff;
}

/* ─── TABS DE NAVEGACIÓN ─────────────────────── */
.inst-tabs-bar {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: center;
  margin-bottom: 3.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.5rem;
}
.inst-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  font-family: 'DM Sans', sans-serif;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .04em;
  padding: .55rem 1.1rem;
  border-radius: 99px;
  cursor: pointer;
  transition: all .25s ease;
  white-space: nowrap;
}
.inst-tab-btn i { font-size: .9rem; }
.inst-tab-btn:hover {
  border-color: var(--navy);
  color: var(--navy);
  box-shadow: var(--shadow-sm);
}
.inst-tab-btn.active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
  box-shadow: var(--shadow-md);
}
.inst-tab-btn.active i { color: var(--green-lt); }

/* ─── PANELES ────────────────────────────────── */
.inst-panel {
  display: none;
  animation: instFadeIn .4s ease;
}
.inst-panel.active { display: block; }
@keyframes instFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── PANEL: OBJETIVOS ───────────────────────── */
.inst-obj-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}
.inst-obj-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  transition: box-shadow .3s, transform .3s;
  position: relative;
  overflow: hidden;
}
.inst-obj-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  border-radius: 99px 99px 0 0;
}
.inst-obj-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.inst-obj-icon {
  width: 3rem; height: 3rem;
  border-radius: .875rem;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.1rem;
}
.inst-obj-icon i { font-size: 1.3rem; }
.inst-obj-num {
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: .5rem;
  display: block;
}
.inst-obj-text {
  font-size: .875rem;
  color: #475569;
  line-height: 1.7;
}

/* Objetivo General — tarjeta destacada */
.inst-obj-general {
  background: linear-gradient(135deg, var(--navy-dk) 0%, #1a3a6c 100%);
  border-radius: var(--radius-xl);
  padding: 2.5rem 2rem;
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  margin-top: 2rem;
}
.inst-obj-general-icon {
  width: 3.5rem; height: 3.5rem;
  background: rgba(52,211,153,.15);
  border: 1px solid rgba(52,211,153,.35);
  border-radius: .875rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.inst-obj-general-icon i { font-size: 1.5rem; color: var(--green-lt); }
.inst-obj-general-body {}
.inst-obj-general-label {
  font-size: .7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .12em;
  color: var(--green-lt); margin-bottom: .6rem; display: block;
}
.inst-obj-general-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 700; color: #fff;
  line-height: 1.3; margin-bottom: .75rem;
}
.inst-obj-general-text {
  font-size: .9rem;
  color: rgba(255,255,255,.72);
  line-height: 1.75;
}

/* ─── PANEL: SÍMBOLOS (Escudo + Bandera) ─────── */
.inst-simbolos-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
@media (max-width: 640px) { .inst-simbolos-grid { grid-template-columns: 1fr; } }

.inst-simbolo-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: box-shadow .3s;
}
.inst-simbolo-card:hover { box-shadow: var(--shadow-lg); }

.inst-simbolo-img {
  background: linear-gradient(135deg, #f8fafc, #e8edf4);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  min-height: 280px;
  position: relative;
}
.inst-simbolo-img img {
  max-height: 220px;
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 24px rgba(26,58,108,.18));
  transition: transform .4s ease;
}
.inst-simbolo-card:hover .inst-simbolo-img img { transform: scale(1.04); }

/* Placeholder cuando no hay imagen */
.inst-simbolo-placeholder {
  width: 160px; height: 200px;
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
  border-radius: var(--radius-md);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: .75rem;
  color: #94a3b8;
}
.inst-simbolo-placeholder i { font-size: 3rem; }
.inst-simbolo-placeholder span { font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }

.inst-simbolo-body {
  padding: 1.5rem 1.75rem;
  border-top: 1px solid var(--border);
}
.inst-simbolo-tag {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .68rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: #fff;
  padding: .22rem .7rem; border-radius: 99px;
  margin-bottom: .75rem;
}
.inst-simbolo-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem; font-weight: 700;
  color: #0f1e3d; margin-bottom: .5rem;
}
.inst-simbolo-desc {
  font-size: .84rem; color: var(--text-muted); line-height: 1.65;
}

/* ─── PANEL: TRADICIONES ─────────────────────── */
/* Acordeón de El Rosario, Oración, Lema, Salve, Himno */
.inst-trad-accordion { display: flex; flex-direction: column; gap: .9rem; }

.inst-trad-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow .3s;
}
.inst-trad-item:hover { box-shadow: var(--shadow-sm); }

.inst-trad-header {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: 1.15rem 1.4rem;
  cursor: pointer;
  list-style: none;
  background: #fff;
  transition: background .2s;
}
.inst-trad-header::-webkit-details-marker { display: none; }
.inst-trad-header:hover { background: #f8fafc; }

.inst-trad-icon {
  width: 2.5rem; height: 2.5rem;
  border-radius: .65rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.inst-trad-icon i { font-size: 1.1rem; color: #fff; }

.inst-trad-meta { flex: 1; }
.inst-trad-name {
  font-size: .9rem; font-weight: 700;
  color: #0f1e3d; line-height: 1.2;
  margin-bottom: .12rem;
}
.inst-trad-sub {
  font-size: .72rem; color: var(--text-muted); font-weight: 500;
}

.inst-trad-chevron {
  width: 1.9rem; height: 1.9rem;
  border-radius: 50%;
  background: var(--bg-gray);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: transform .3s, background .2s;
}
.inst-trad-chevron i { font-size: .95rem; color: var(--text-muted); }
details[open] .inst-trad-chevron {
  transform: rotate(180deg);
  background: var(--navy);
}
details[open] .inst-trad-chevron i { color: #fff; }

.inst-trad-body {
  padding: 0 1.5rem 1.5rem;
  border-top: 1px solid var(--border);
}

/* Texto de tradición (rosario, oración, lema) */
.inst-trad-text {
  font-size: .9rem;
  color: #475569;
  line-height: 1.85;
  padding-top: 1.25rem;
}
.inst-trad-text p { margin-bottom: .85rem; }
.inst-trad-text p:last-child { margin-bottom: 0; }

/* Lema — destacado */
.inst-lema-box {
  margin-top: 1.25rem;
  text-align: center;
  padding: 2rem 1.5rem;
  background: linear-gradient(135deg, #0f1e3d, #1a3a6c);
  border-radius: var(--radius-lg);
}
.inst-lema-quote {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.2rem, 3vw, 1.75rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.4;
  margin-bottom: .75rem;
}
.inst-lema-quote span {
  background: linear-gradient(135deg, #34d399, #5eead4);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.inst-lema-attr {
  font-size: .78rem; color: rgba(255,255,255,.5);
  text-transform: uppercase; letter-spacing: .1em; font-weight: 600;
}

/* Himno y Salve — estilo verso */
.inst-himno-wrap { padding-top: 1.25rem; }
.inst-himno-estrofa {
  background: #f8fafc;
  border-left: 3px solid var(--navy);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}
.inst-himno-estrofa:last-child { margin-bottom: 0; }
.inst-himno-tag {
  font-size: .65rem; font-weight: 800;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--navy); margin-bottom: .5rem; display: block;
}
.inst-himno-versos {
  font-size: .875rem; color: #475569;
  line-height: 1.85; font-style: italic;
  white-space: pre-line;
}
.inst-himno-estrofa.coro {
  border-left-color: var(--green);
  background: #f0fdf7;
}
.inst-himno-estrofa.coro .inst-himno-tag { color: var(--green); }

/* ─── PANEL: CONGREGACIÓN ────────────────────── */
.inst-congre-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}
@media (max-width: 768px) { .inst-congre-layout { grid-template-columns: 1fr; gap: 2rem; } }

.inst-congre-img-wrap {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  position: relative;
}
.inst-congre-img-wrap img {
  width: 100%; height: 380px;
  object-fit: cover; object-position: top;
  display: block;
}
.inst-congre-img-caption {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(15,30,61,.85), transparent);
  padding: 1.5rem 1.25rem .9rem;
  color: rgba(255,255,255,.85);
  font-size: .78rem; font-weight: 500;
}

.inst-congre-content {}
.inst-congre-badge {
  display: inline-flex; align-items: center; gap: .4rem;
  background: rgba(5,150,105,.1); border: 1px solid rgba(5,150,105,.3);
  color: var(--green); font-size: .7rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  padding: .35rem .9rem; border-radius: 99px;
  margin-bottom: 1rem;
}
.inst-congre-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  font-weight: 700; color: #0f1e3d;
  line-height: 1.3; margin-bottom: 1rem;
}
.inst-congre-text {
  font-size: .9rem; color: #475569;
  line-height: 1.8; margin-bottom: 1rem;
}
.inst-congre-text:last-of-type { margin-bottom: 1.5rem; }

.inst-congre-values {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: .75rem; margin-top: 1.5rem;
}
.inst-congre-value {
  display: flex; align-items: center; gap: .6rem;
  background: var(--bg-gray);
  border-radius: var(--radius-md);
  padding: .75rem 1rem;
  font-size: .82rem; font-weight: 600; color: var(--navy);
}
.inst-congre-value i { color: var(--green); font-size: 1rem; flex-shrink: 0; }

/* ─── RESPONSIVE ─────────────────────────────── */
@media (max-width: 767px) {
  #identidad-institucional { padding: 4rem 0; }
  .inst-tabs-bar { gap: .35rem; }
  .inst-tab-btn { font-size: .72rem; padding: .44rem .88rem; }
  .inst-obj-grid { grid-template-columns: 1fr; }
  .inst-obj-general { flex-direction: column; gap: 1rem; }
  .inst-congre-values { grid-template-columns: 1fr; }
}
