/* =========================================================
   Plan de Gobierno — tarjetas 3D + acordeón
   ========================================================= */

.plan-card {
  background-color: transparent;
  perspective: 1200px;
  height: 340px;
  width: 100%;
  cursor: pointer;
  position: relative;
  animation: plan-card-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.plan-card:nth-child(1) { animation-delay: 0.05s; }
.plan-card:nth-child(2) { animation-delay: 0.12s; }
.plan-card:nth-child(3) { animation-delay: 0.19s; }
.plan-card:nth-child(4) { animation-delay: 0.26s; }
.plan-card:nth-child(5) { animation-delay: 0.33s; }
.plan-card:nth-child(6) { animation-delay: 0.4s; }
.plan-card:nth-child(7) { animation-delay: 0.47s; }
.plan-card:nth-child(8) { animation-delay: 0.54s; }
.plan-card:nth-child(9) { animation-delay: 0.61s; }

@keyframes plan-card-in {
  from { opacity: 0; transform: translateY(28px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.plan-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.7s cubic-bezier(0.4, 0.2, 0.2, 1);
  transform-style: preserve-3d;
}

.plan-card.is-flipped .plan-inner {
  transform: rotateY(180deg);
}

.plan-face {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 1.25rem;
  padding: 1.75rem 1.25rem;
  display: flex;
  flex-direction: column;
  box-shadow: 0 12px 28px -8px rgba(15, 37, 64, 0.28);
}

.plan-front {
  background: linear-gradient(160deg, #ffffff 0%, #f3f9fc 100%);
  border: 1px solid rgba(0, 120, 165, 0.18);
  text-align: center;
  justify-content: center;
  z-index: 2;
  transition: box-shadow 0.35s ease, transform 0.35s ease;
}

.plan-card:not(.is-flipped):hover .plan-front {
  box-shadow: 0 22px 40px -12px rgba(0, 120, 165, 0.35);
}



.plan-card:not(.is-flipped):hover 

.plan-front .mt-auto,
.plan-front span.text-xs {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin-top: auto;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: rgba(0, 120, 165, 0.1);
  animation: plan-pulse 2.2s ease-in-out infinite;
}

@keyframes plan-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 120, 165, 0.35); }
  50% { box-shadow: 0 0 0 8px rgba(0, 120, 165, 0); }
}

.plan-back {
  background: linear-gradient(165deg, #f5fafc 0%, #e8f2f6 55%, #dde9ef 100%);
  color: #ffffff;
  transform: rotateY(180deg);
  border: 1px solid rgba(255, 255, 255, 0.12);
  justify-content: flex-start;
  text-align: left;
  z-index: 1;
}

.plan-tag {
  display: inline-block;
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  margin: 0.25rem;
  backdrop-filter: blur(4px);
}

/* Scrollbar cara trasera */
.custom-scrollbar {
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 120, 165, 0.55) rgba(255, 255, 255, 0.05);
}
.custom-scrollbar::-webkit-scrollbar { width: 4px; }
.custom-scrollbar::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(0, 120, 165, 0.5);
  border-radius: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 120, 165, 0.8);
}

/* Acordeón */
.accordion-item {
  overflow: hidden;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.accordion-item:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(92, 196, 240, 0.45);
}

.accordion-btn {
  cursor: pointer;
  text-align: left;
}

.accordion-btn .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  background: rgba(0, 120, 165, 0.25);
  font-size: 0.95rem;
  line-height: 1;
  transition: transform 0.3s ease, background 0.25s ease;
  flex-shrink: 0;
}

.accordion-btn.active .icon {
  transform: rotate(45deg);
  background: rgba(92, 196, 240, 0.55);
}

.accordion-content {
  max-height: 0 !important;
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.3s ease, padding-bottom 0.3s ease;
  opacity: 0;
}

.accordion-content.is-open {
  max-height: 220px !important;
  opacity: 1;
}

@media (max-width: 768px) {
  .plan-card { height: 400px; }
}

/* =========================================================
   Tarjetas de Valores (flip-grid)
   ========================================================= */
.flip-card {
  height: 140px;
  perspective: 1000px;
  cursor: pointer;
  animation: plan-card-in 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1);
  transform-style: preserve-3d;
}
.flip-card.is-flipped .flip-inner {
  transform: rotateY(180deg);
}
.flip-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  box-shadow: 0 10px 22px -10px rgba(15, 37, 64, 0.3);
}
.flip-front {
  background: linear-gradient(165deg, #ffffff, #eef7fb);
  border: 1px solid rgba(0, 120, 165, 0.18);
}
.flip-back {
  background: linear-gradient(165deg, #f5fafc 0%, #e8f2f6 55%, #dde9ef 100%);
  color: #fff;
  transform: rotateY(180deg);
  border: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
}
.flip-card:hover .flip-front {
  box-shadow: 0 16px 28px -10px rgba(0, 120, 165, 0.35);
}

/* Iconos animados */
@keyframes plan-icon-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes plan-icon-pulse {
  from { transform: scale(1) rotate(-4deg); }
  to { transform: scale(1.12) rotate(4deg); }
}

/* hint "Voltea la tarjeta" eliminado */

.plan-front {
  background: linear-gradient(160deg, #ffffff 0%, #e8f6fb 100%) !important;
  border: 1px solid rgba(0, 120, 165, 0.22) !important;
}
.plan-back {
  background: linear-gradient(165deg, #f5fafc 0%, #e8f2f6 55%, #dde9ef 100%) !important;
}

.plan-front {
  background: linear-gradient(165deg, #eef8fc 0%, #ffffff 45%, #e7f4f9 100%);
  border: 1px solid rgba(0, 120, 165, 0.22);
  text-align: center;
  justify-content: flex-start;
  gap: 0.55rem;
  padding: 1.15rem 1.1rem 1.25rem;
  z-index: 2;
  transition: box-shadow 0.35s ease, transform 0.35s ease;
}

.plan-card:not(.is-flipped):hover .plan-front {
  box-shadow: 0 22px 40px -12px rgba(0, 120, 165, 0.35);
}

/* Icono emoji + órbita punteada girando */
.plan-icon-wrap {
  position: relative;
  width: 84px;
  height: 84px;
  margin: 0.1rem auto 0.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.plan-icon-orbit {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2.5px dotted #0078a5;
  box-shadow: 0 0 0 6px rgba(0, 120, 165, 0.08);
  animation: orbit-spin 10s linear infinite;
}
.plan-card:not(.is-flipped):hover .plan-icon-orbit {
  border-color: #00677f;
  animation-duration: 5s;
}
.plan-emoji {
  font-size: 2.35rem;
  line-height: 1;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 4px 8px rgba(0, 103, 127, 0.25));
  transition: transform 0.35s ease;
}
.plan-card:not(.is-flipped):hover .plan-emoji {
  transform: scale(1.1);
}
@keyframes orbit-spin {
  to { transform: rotate(360deg); }
}

.plan-front-title {
  color: #0078a5 !important;
  font-size: 1.28rem !important;
  font-weight: 800 !important;
  line-height: 1.25 !important;
  margin: 0.15rem 0 0.1rem !important;
  letter-spacing: -0.01em;
}
@media (min-width: 768px) {
  .plan-front-title { font-size: 1.38rem !important; }
}

.plan-front-desc {
  color: #3c536b;
  font-size: 0.82rem;
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* CTA tocá */
.plan-front .mt-auto,
.plan-front span.text-xs {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin-top: auto;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: rgba(0, 120, 165, 0.12);
  color: #00677f !important;
  animation: plan-pulse 2.2s ease-in-out infinite;
}

.plan-back {
  background: linear-gradient(165deg, #f5fafc 0%, #e8f2f6 55%, #dde9ef 100%);
  color: #ffffff;
  transform: rotateY(180deg);
  border: 1px solid rgba(255, 255, 255, 0.14);
  justify-content: flex-start;
  text-align: left;
  z-index: 1;
  padding: 1.2rem 1.05rem;
}

/* Acordeones de colores distintos + hint de clic */
.accordion-item {
  overflow: hidden;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.accordion-item.acc-c1 { background: rgba(255,255,255,0.12); border-color: rgba(92,196,240,0.55); }
.accordion-item.acc-c2 { background: rgba(0, 103, 127, 0.35); border-color: rgba(255,255,255,0.28); }
.accordion-item.acc-c3 { background: rgba(232, 164, 58, 0.22); border-color: rgba(232,164,58,0.55); }
.accordion-item.acc-c4 { background: rgba(46, 204, 113, 0.18); border-color: rgba(46,204,113,0.45); }
.accordion-item.acc-c5 { background: rgba(155, 89, 182, 0.2); border-color: rgba(187,143,206,0.5); }
.accordion-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.18);
}

.accordion-btn {
  cursor: pointer;
  text-align: left;
  position: relative;
  gap: 0.5rem;
}
.accordion-btn .acc-hint {
  margin-left: auto;
  margin-right: 0.35rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
  background: rgba(255,255,255,0.12);
  border: 1px dashed rgba(255,255,255,0.45);
  border-radius: 999px;
  padding: 0.15rem 0.45rem;
  white-space: nowrap;
  animation: hint-pulse 1.8s ease-in-out infinite;
}
.accordion-btn.active .acc-hint {
  display: none;
}
@keyframes hint-pulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

.accordion-btn .acc-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
  flex-shrink: 0;
}
.plan-back h4 {
  color: #e8f7fc !important;
  border-color: rgba(255,255,255,0.25) !important;
}
.plan-section-overlay,
#plan-gobierno .absolute.inset-0.bg-\[\#049ad7\],
#plan-gobierno .absolute.inset-0.bg-\[\#0078a5\] {
  /* handled in HTML if present */
}

/* ===== Ajuste grande: icono + órbita de puntitos + título ===== */
.plan-card {
  height: 380px;
}
.plan-front {
  padding: 1.25rem 1.15rem 1.35rem !important;
  gap: 0.65rem !important;
}
.plan-icon-wrap {
  position: relative !important;
  width: 102px !important;
  height: 102px !important;
  margin: 0.15rem auto 0.5rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}
.plan-icon-orbit {
  position: absolute !important;
  inset: 0 !important;
  border-radius: 50% !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  /* anillo de puntitos */
  background-image: repeating-conic-gradient(
    from 0deg,
    #0078a5 0deg 8deg,
    transparent 8deg 18deg
  ) !important;
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px)) !important;
  mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px)) !important;
  animation: orbit-spin 9s linear infinite !important;
}
.plan-card:not(.is-flipped):hover .plan-icon-orbit {
  animation-duration: 4.5s !important;
  background-image: repeating-conic-gradient(
    from 0deg,
    #00677f 0deg 8deg,
    transparent 8deg 18deg
  ) !important;
}
.plan-emoji {
  font-size: 3.1rem !important;
  line-height: 1 !important;
  position: relative !important;
  z-index: 2 !important;
  filter: drop-shadow(0 6px 12px rgba(0, 103, 127, 0.28)) !important;
  transition: transform 0.35s ease !important;
}
.plan-card:not(.is-flipped):hover .plan-emoji {
  transform: scale(1.12) !important;
}
.plan-front-title {
  color: #0078a5 !important;
  font-size: 1.55rem !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  margin: 0.2rem 0 0.15rem !important;
  letter-spacing: -0.015em !important;
}
@media (min-width: 768px) {
  .plan-front-title {
    font-size: 1.7rem !important;
  }
  .plan-emoji {
    font-size: 3.35rem !important;
  }
  .plan-icon-wrap {
    width: 112px !important;
    height: 112px !important;
  }
}
.plan-front-desc {
  font-size: 0.8rem !important;
  line-height: 1.35 !important;
  color: #5a6f82 !important;
  font-weight: 500 !important;
}
@keyframes orbit-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Sin texto "voltea / toca" al hover */
.plan-front .mt-auto,
.plan-front span.text-xs:not(.plan-flip-hint) {
  display: none !important;
}

/* Reverso claro al voltear */
.plan-back {
  background: linear-gradient(165deg, #f7fcfe 0%, #eef8fc 45%, #e4f3f8 100%) !important;
  color: #0f2540 !important;
  border: 1px solid rgba(0, 120, 165, 0.2) !important;
}
.plan-back h4 {
  color: #0078a5 !important;
  border-color: rgba(0, 120, 165, 0.25) !important;
}
.plan-back .accordion-item.acc-c1 { background: rgba(0, 120, 165, 0.1); border-color: rgba(0, 120, 165, 0.35); }
.plan-back .accordion-item.acc-c2 { background: rgba(0, 103, 127, 0.12); border-color: rgba(0, 103, 127, 0.35); }
.plan-back .accordion-item.acc-c3 { background: rgba(232, 164, 58, 0.14); border-color: rgba(232, 164, 58, 0.4); }
.plan-back .accordion-item.acc-c4 { background: rgba(46, 204, 113, 0.12); border-color: rgba(46, 204, 113, 0.35); }
.plan-back .accordion-item.acc-c5 { background: rgba(155, 89, 182, 0.12); border-color: rgba(155, 89, 182, 0.35); }
.plan-back .accordion-btn,
.plan-back .accordion-btn span { color: #0f2540 !important; }
.plan-back .accordion-btn .acc-hint {
  color: #00677f !important;
  background: rgba(0, 120, 165, 0.08) !important;
  border-color: rgba(0, 120, 165, 0.35) !important;
}
.plan-back .accordion-btn .icon {
  background: rgba(0, 120, 165, 0.15) !important;
  color: #0078a5 !important;
}
.plan-back .accordion-content p,
.plan-back .accordion-content {
  color: #3c536b !important;
}
.plan-back .custom-scrollbar {
  scrollbar-color: rgba(0, 120, 165, 0.45) rgba(0, 120, 165, 0.08);
}

.plan-card::after,
.plan-card:hover::after,
.plan-card:not(.is-flipped)::after,
.plan-card:not(.is-flipped):hover::after {
  content: none !important;
  display: none !important;
  opacity: 0 !important;
}

/* ===== FIJO: Voltea + reverso claro ===== */
.plan-front .plan-flip-hint {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin-top: auto !important;
  padding: 0.4rem 0.95rem !important;
  border-radius: 999px !important;
  background: #0078a5 !important;
  color: #ffffff !important;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  box-shadow: 0 6px 14px rgba(0, 120, 165, 0.28) !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: none !important;
}

.plan-card .plan-face.plan-back {
  background: #eef5f8 !important;
  background-image: linear-gradient(165deg, #f7fbfd 0%, #eaf3f7 50%, #e0ebf0 100%) !important;
  color: #0f2540 !important;
  border: 1px solid rgba(0, 120, 165, 0.18) !important;
}
.plan-card .plan-face.plan-back h4 {
  color: #0078a5 !important;
  border-bottom: 1px solid rgba(0, 120, 165, 0.22) !important;
}
.plan-card .plan-face.plan-back .accordion-btn,
.plan-card .plan-face.plan-back .accordion-btn > span:first-child {
  color: #0f2540 !important;
}
.plan-card .plan-face.plan-back .accordion-content p,
.plan-card .plan-face.plan-back .text-gray-200,
.plan-card .plan-face.plan-back .text-xs {
  color: #3c536b !important;
}
.plan-card .plan-face.plan-back .accordion-item.acc-c1 { background: #d9eef7 !important; border-color: #7ebfd6 !important; }
.plan-card .plan-face.plan-back .accordion-item.acc-c2 { background: #d8ecef !important; border-color: #6aa8b3 !important; }
.plan-card .plan-face.plan-back .accordion-item.acc-c3 { background: #f3ebe0 !important; border-color: #d4b48a !important; }
.plan-card .plan-face.plan-back .accordion-item.acc-c4 { background: #e0f2e8 !important; border-color: #8fc9a8 !important; }
.plan-card .plan-face.plan-back .accordion-item.acc-c5 { background: #ebe3f2 !important; border-color: #b59bc9 !important; }
.plan-card .plan-face.plan-back .accordion-btn .acc-hint {
  color: #00677f !important;
  background: rgba(255,255,255,0.85) !important;
  border: 1px dashed rgba(0, 120, 165, 0.4) !important;
}
.plan-card .plan-face.plan-back .accordion-btn .icon {
  background: #0078a5 !important;
  color: #fff !important;
}
