#mega-preloader {
  position: fixed; inset: 0; z-index: 99999;
  background: linear-gradient(135deg, #3a0a2e 0%, #1a0840 40%, #0d1a3a 100%);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column;
  transition: opacity .8s ease, transform .8s cubic-bezier(.4,0,.2,1);
}
#mega-preloader.hide { opacity: 0; transform: scale(1.05); pointer-events: none; }
.pl-logo-ring {
  position: relative; width: 120px; height: 120px;
  display: flex; align-items: center; justify-content: center; margin-bottom: 28px;
}
.pl-logo-ring::before {
  content: ''; position: absolute; inset: -6px; border-radius: 50%;
  background: conic-gradient(#c89b2c, #e8b83d, #9b2a7e, #4a1240, #c89b2c);
  animation: plRingSpin 2s linear infinite;
}
.pl-logo-ring::after {
  content: ''; position: absolute; inset: 4px; border-radius: 50%;
  background: #0d1a3a;
}
@keyframes plRingSpin { to { transform: rotate(360deg); } }
.pl-logo-ring img {
  width: 96px; height: 96px; border-radius: 50%;
  object-fit: contain; background: white; padding: 8px;
  position: relative; z-index: 1;
  animation: plLogoPulse 1.5s ease-in-out infinite;
}
@keyframes plLogoPulse {
  0%,100% { transform: scale(1); box-shadow: 0 0 20px rgba(200,155,44,.4); }
  50%      { transform: scale(1.06); box-shadow: 0 0 40px rgba(200,155,44,.7), 0 0 80px rgba(200,155,44,.3); }
}
.pl-title {
  font-family: 'Playfair Display', serif; font-size: 22px; font-weight: 800;
  color: #fff; letter-spacing: 3px; margin-bottom: 6px;
  animation: plFadeUp 1s ease .2s both;
}
.pl-sub {
  font-size: 12px; color: rgba(200,155,44,.8); letter-spacing: 2px;
  text-transform: uppercase; margin-bottom: 32px;
  animation: plFadeUp 1s ease .4s both;
}
@keyframes plFadeUp { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:translateY(0); } }
.pl-bar-wrap { width: 200px; height: 3px; background: rgba(255,255,255,.1); border-radius: 3px; overflow: hidden; }
.pl-bar-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--vino), var(--dorado), var(--dorado-light));
  border-radius: 3px;
  animation: plBarFill 2s cubic-bezier(.4,0,.2,1) .3s forwards;
}
@keyframes plBarFill { to { width: 100%; } }

#aurora-bg {
  position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden;
}
.aurora-wave {
  position: absolute; width: 200%; height: 200%;
  border-radius: 50%; opacity: 0.03;
  animation: auroraDrift linear infinite;
}
.aurora-wave:nth-child(1) { background: radial-gradient(ellipse, #6f1d5a, transparent 60%); top: -50%; left: -30%; animation-duration: 20s; }
.aurora-wave:nth-child(2) { background: radial-gradient(ellipse, #c89b2c, transparent 60%); top: -30%; right: -40%; animation-duration: 28s; animation-delay: -8s; }
.aurora-wave:nth-child(3) { background: radial-gradient(ellipse, #0d2140, transparent 60%); bottom: -60%; left: -20%; animation-duration: 24s; animation-delay: -14s; }
@keyframes auroraDrift {
  0%,100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(3%, 2%) scale(1.05); }
  66%      { transform: translate(-2%, 3%) scale(.97); }
}

#back-to-top {
  position: fixed; bottom: 100px; right: 26px; z-index: 900;
  width: 48px; height: 48px; border-radius: 14px; border: none;
  background: linear-gradient(135deg, var(--vino), var(--vino-dark));
  color: white; font-size: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(111,29,90,.35);
  opacity: 0; transform: translateY(16px);
  transition: all .4s cubic-bezier(.34,1.56,.64,1);
  pointer-events: none;
}
#back-to-top.visible { opacity: 1; transform: translateY(0); pointer-events: all; }
#back-to-top:hover { background: linear-gradient(135deg, var(--dorado), var(--dorado-light)); color: var(--vino-dark); transform: translateY(-4px); }
#back-to-top i { transition: transform .3s ease; }
#back-to-top:hover i { transform: translateY(-2px); }

.ripple-circle {
  position: fixed; border-radius: 50%; pointer-events: none; z-index: 99990;
  width: 8px; height: 8px;
  background: radial-gradient(circle, rgba(200,155,44,.6), rgba(200,155,44,.1));
  transform: translate(-50%, -50%) scale(0);
  animation: rippleExpand .6s cubic-bezier(0,0,.2,1) forwards;
}
@keyframes rippleExpand {
  to { transform: translate(-50%, -50%) scale(40); opacity: 0; }
}

.btn-vermas, nav a, .modal-btn-ver {
  transition: transform .2s ease, box-shadow .2s ease, background .3s ease, color .3s ease !important;
}

.nosotros-foto-frame.animated-border {
  position: relative; padding: 6px; border-radius: 22px;
  background: transparent; border: none;
  overflow: visible;
}
.nosotros-foto-frame.animated-border::before {
  content: ''; position: absolute;
  inset: -4px; border-radius: 26px; z-index: -1;
  background: conic-gradient(
    from 0deg,
    var(--vino) 0%, var(--dorado) 25%,
    var(--vino-light) 50%, var(--dorado-light) 75%,
    var(--vino) 100%
  );
  animation: frameSpinNew 4s linear infinite;
}
.nosotros-foto-frame.animated-border::after {
  content: ''; position: absolute; inset: 2px;
  border-radius: 20px; background: #fff; z-index: -1;
}
@keyframes frameSpinNew { to { transform: rotate(360deg); } }
.nosotros-foto-frame.animated-border img {
  border-radius: 16px; display: block; width: 100%; height: 100%;
  position: relative; z-index: 1;
}

.nosotros-foto-wrapper { perspective: 800px; }
.nosotros-foto-frame { transform-style: preserve-3d; transition: transform .1s ease; }

.tramite-card { perspective: 800px; cursor: pointer; }
.tramite-card-inner {
  width: 100%; height: 220px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform .7s cubic-bezier(.4,0,.2,1);
}
.tramite-card.flipped .tramite-card-inner { transform: rotateY(180deg); }
.tramite-face {
  position: absolute; inset: 0; backface-visibility: hidden;
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 20px 12px;
}
.tramite-face-front {
  background: var(--blanco);
  border: 1px solid var(--gris-medio);
  box-shadow: 0 8px 28px var(--sombra);
}
.tramite-face-back {
  background: linear-gradient(135deg, var(--vino-dark), #4a1240);
  transform: rotateY(180deg);
}
.tramite-back-title {
  font-family: 'Playfair Display', serif; font-size: 16px; font-weight: 700;
  color: var(--dorado-light); margin-bottom: 14px; text-align: center;
}
.tramite-back-list {
  list-style: none; width: 100%;
}
.tramite-back-list li {
  font-size: 12px; color: rgba(255,255,255,.85); padding: 5px 0;
  border-bottom: 1px solid rgba(255,255,255,.1);
  display: flex; align-items: center; gap: 8px;
}
.tramite-back-list li::before { content: '✦'; color: var(--dorado); font-size: 8px; }
.tramite-back-hint {
  font-size: 10px; color: rgba(255,255,255,.4);
  margin-top: 10px; letter-spacing: .5px;
}
.tramite-flip-indicator {
  position: absolute; bottom: 8px; right: 8px;
  font-size: 10px; color: var(--dorado); opacity: .6;
}

.card {
  position: relative; overflow: hidden;
  backdrop-filter: blur(2px);
}
.card-glass-shine {
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(135deg, rgba(255,255,255,.18) 0%, transparent 50%, rgba(255,255,255,.05) 100%);
  opacity: 0; transition: opacity .3s ease; z-index: 10;
}
.card:hover .card-glass-shine { opacity: 1; }

.eventos-mes-filtro {
  margin-bottom: 38px; text-align: center;
  animation: fadeUp .6s ease both;
}
.filtro-label {
  font-size: 13px; font-weight: 700; color: var(--texto-suave);
  letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 16px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.filtro-label i { color: var(--dorado); }
.meses-pills {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
}
.mes-pill {
  display: flex; flex-direction: column; align-items: center;
  padding: 10px 20px; border-radius: 40px; border: none; cursor: pointer;
  background: rgba(111,29,90,.07); border: 1.5px solid var(--gris-medio);
  color: var(--texto-suave); font-size: 13px; font-weight: 600;
  letter-spacing: .5px; transition: all .35s cubic-bezier(.34,1.56,.64,1);
  position: relative; overflow: hidden;
}
.mes-pill .pill-count {
  font-size: 9px; font-weight: 800; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--dorado); opacity: .7;
  margin-top: 2px;
}
.mes-pill::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--vino), var(--dorado));
  opacity: 0; transition: opacity .3s ease; border-radius: 40px;
}
.mes-pill.active {
  border-color: var(--dorado); color: white;
  box-shadow: 0 8px 24px rgba(111,29,90,.25);
  transform: translateY(-3px);
}
.mes-pill.active::before { opacity: 1; }
.mes-pill span { position: relative; z-index: 1; }
.mes-pill .pill-count { position: relative; z-index: 1; }
.mes-pill.active .pill-count { color: rgba(255,255,255,.75); }
.mes-pill:hover:not(.active) { border-color: var(--vino); color: var(--vino); transform: translateY(-2px); }

.evento-card {
  transition: opacity .4s ease, transform .4s cubic-bezier(.34,1.3,.64,1), max-height .5s ease !important;
}
.evento-card.filtrado-out {
  opacity: 0; transform: scale(.94) translateY(10px);
  pointer-events: none; position: absolute; visibility: hidden;
}
.eventos-empty-msg {
  text-align: center; padding: 60px 20px;
  color: var(--texto-suave); font-size: 15px;
  display: none;
}
.eventos-empty-msg i { font-size: 40px; color: var(--dorado); opacity: .4; display: block; margin-bottom: 16px; }

.evento-expand-btn {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 12px;
  background: none; border: 1.5px solid rgba(111,29,90,.2);
  color: var(--vino); font-size: 12px; font-weight: 700;
  padding: 6px 16px; border-radius: 20px; cursor: pointer;
  transition: all .3s ease; letter-spacing: .4px;
}
.evento-expand-btn:hover { background: var(--vino); color: white; border-color: var(--vino); }
.evento-expand-btn i { transition: transform .4s cubic-bezier(.34,1.56,.64,1); font-size: 10px; }
.evento-card.expanded .evento-expand-btn i { transform: rotate(180deg); }
.evento-info p {
  max-height: 66px; overflow: hidden;
  transition: max-height .5s cubic-bezier(.4,0,.2,1);
}
.evento-card.expanded .evento-info p { max-height: 400px; }

.confetti-piece {
  position: fixed; width: 8px; height: 8px; border-radius: 2px;
  pointer-events: none; z-index: 99995;
  animation: confettiFall var(--dur) ease-in var(--delay) forwards;
}
@keyframes confettiFall {
  0%   { transform: translate(0,0) rotate(0deg); opacity: 1; }
  100% { transform: translate(var(--tx), var(--ty)) rotate(var(--rot)); opacity: 0; }
}

#neural-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 1;
  opacity: .65;
}

#section-transition {
  position: fixed; inset: 0; z-index: 8888;
  background: linear-gradient(135deg, var(--vino-dark), #0d1a3a);
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease;
}
#section-transition.active { opacity: 1; }

.overlay-content .title .char {
  display: inline-block;
  opacity: 0; transform: translateY(-22px);
  animation: charDrop .4s cubic-bezier(.34,1.3,.64,1) both;
}
@keyframes charDrop {
  to { opacity: 1; transform: translateY(0); }
}

.eventos-timeline {
  perspective: 1000px;
}
.timeline-item {
  transform-origin: left center;
  transition: all .5s cubic-bezier(.34,1.3,.64,1);
}
.timeline-item:hover {
  transform: translateZ(12px) scale(1.01);
  box-shadow: 0 24px 60px rgba(111,29,90,.2) !important;
}

html { scroll-behavior: smooth; }

.nosotros-texto p {
  transition: opacity .3s ease, padding-left .3s ease, border-left-color .3s ease;
}
.nosotros-texto p.reading { opacity: 1 !important; border-left-color: var(--dorado) !important; }
.nosotros-texto.has-reading p:not(.reading) { opacity: .45; }

#presentation-btn {
  position: fixed; bottom: 165px; right: 26px; z-index: 900;
  width: 48px; height: 48px; border-radius: 14px; border: none;
  background: linear-gradient(135deg, #0d2140, #1a3a6a);
  color: white; font-size: 15px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(13,33,64,.4);
  opacity: .7; transition: all .4s cubic-bezier(.34,1.56,.64,1);
  title: 'Modo Presentación';
}
#presentation-btn:hover { opacity: 1; transform: translateY(-3px) scale(1.08); background: linear-gradient(135deg, var(--dorado), var(--dorado-light)); color: var(--vino-dark); }
#presentation-btn.active { background: linear-gradient(135deg, var(--vino), var(--vino-light)); opacity: 1; }

#presentation-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 8000;
  background: rgba(13,10,30,.9); backdrop-filter: blur(12px);
  border-top: 1px solid rgba(200,155,44,.2);
  padding: 12px 30px; display: flex; align-items: center;
  justify-content: space-between; gap: 20px;
  transform: translateY(100%); transition: transform .4s ease;
}
#presentation-bar.visible { transform: translateY(0); }
.pres-label { font-size: 12px; color: rgba(255,255,255,.6); letter-spacing: 1px; }
.pres-title { font-family: 'Playfair Display',serif; font-size: 16px; font-weight:700; color: var(--dorado-light); }
.pres-controls { display: flex; gap: 10px; }
.pres-btn {
  padding: 7px 18px; border-radius: 20px; border: 1px solid rgba(200,155,44,.3);
  background: rgba(200,155,44,.1); color: rgba(255,255,255,.85);
  font-size: 12px; font-weight: 600; cursor: pointer;
  transition: all .3s ease; letter-spacing: .5px;
}
.pres-btn:hover { background: var(--dorado); color: var(--vino-dark); border-color: var(--dorado); }
.pres-progress {
  position: fixed; bottom: 56px; left: 0; height: 2px; z-index: 8001;
  background: linear-gradient(90deg, var(--dorado), var(--dorado-light));
  transition: width 5s linear;
}

@media (hover: none) {
  .tramite-card { cursor: pointer; }
  .mes-pill { min-height: 48px; }
}

@media (max-width: 768px) {
  .eventos-mes-filtro { margin-bottom: 24px; }
  .mes-pill { padding: 8px 14px; font-size: 12px; }
  #presentation-btn, #back-to-top { right: 14px; }
  .tramite-card-inner { height: 190px; }
}

.tramite-back-whatsapp-msg {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  text-align: center;
}
.tramite-wa-icon {
  font-size: 38px;
  color: #25D366;
  filter: drop-shadow(0 0 12px rgba(37,211,102,0.6));
  animation: waPulse 2s ease-in-out infinite;
}
@keyframes waPulse {
  0%,100% { transform: scale(1); filter: drop-shadow(0 0 10px rgba(37,211,102,0.5)); }
  50%      { transform: scale(1.12); filter: drop-shadow(0 0 20px rgba(37,211,102,0.9)); }
}
.tramite-back-whatsapp-msg p {
  color: rgba(255,255,255,0.9);
  font-size: 13.5px;
  line-height: 1.55;
  font-weight: 500;
  margin: 0;
}
.tramite-wa-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #25D366;
  color: #fff;
  border-radius: 50px;
  padding: 8px 18px;
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(37,211,102,0.35);
  transition: transform 0.2s, box-shadow 0.2s;
  margin-top: 4px;
}
.tramite-wa-btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 24px rgba(37,211,102,0.55);
  color: #fff;
}
