/* AMAUTA — Custom styles complementarios a Tailwind */

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

/* Marquee anim safety (in case Tailwind config doesn't load) */
@keyframes marqueeRTL {
  0%   { transform: translateX(0%); }
  100% { transform: translateX(-50%); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg,#002CFF,#DC2626); border-radius: 10px; }

/* Selection */
::selection { background: #002CFF; color: white; }

/* Reduce reflows on float anims */
.area-card, .event-card, .benefit-card { will-change: transform; }

/* Aos custom timing */
[data-aos] { transition-timing-function: cubic-bezier(.2,.8,.2,1); }

/* Buttons base softening */
button, a { -webkit-tap-highlight-color: transparent; }

/* Cuando un area-card ha sido clickeado */
.area-card:active { transform: scale(0.95); }

/* Marquee pause-on-hover hint */
.animate-marquee-rtl { animation: marqueeRTL 40s linear infinite; }
.animate-marquee-rtl:hover { animation-play-state: paused; }

/* Hero text shadow for legibility */
#inicio h1 { text-shadow: 0 4px 30px rgba(0,0,0,0.2); }

/* Modal centering fallback */
#areaModal.flex { display: flex !important; }

/* Page transitions soft fade */
body { animation: fadeIn .4s ease-out; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ═══════════════════════════════════════════════════════════════
   FILE PICKER — wrapper uniforme para inputs de archivos
   ═══════════════════════════════════════════════════════════════ */
.file-picker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.85rem;
  border: 2px solid #e2e8f0;
  border-radius: 0.65rem;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  color: #475569;
  background: white;
  transition: all .15s;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
.file-picker:hover { border-color: #002CFF; color: #002CFF; background: #f8fafc; }
.file-picker .fp-icon { flex-shrink: 0; color: #002CFF; }
.file-picker .fp-label { flex-shrink: 0; white-space: nowrap; }
.file-picker .fp-name {
  color: #94a3b8;
  font-weight: 500;
  font-size: 0.72rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 220px;
}
.file-picker.fp-has-file { border-color: #002CFF; background: #002CFF10; }
.file-picker.fp-has-file .fp-name { color: #001A8A; font-weight: 700; }
.file-picker input[type="file"] { display: none !important; }

.file-picker.fp-block {
  display: flex;
  width: 100%;
  justify-content: center;
}

/* ═══════════════════════════════════════════════════════════════
   UPLOAD PROGRESS MODAL — barra de subida
   ═══════════════════════════════════════════════════════════════ */
.upload-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  animation: fadeIn .2s ease-out;
}
.upload-modal {
  background: white;
  border-radius: 1.5rem;
  padding: 2rem;
  max-width: 460px;
  width: 100%;
  box-shadow: 0 30px 80px rgba(0,0,0,.4);
  text-align: center;
}
.upload-modal .up-icon {
  width: 70px; height: 70px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #002CFF, #DC2626);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  animation: pulse 1.5s ease-in-out infinite;
}
.upload-modal h3 { font-size: 1.25rem; font-weight: 800; color: #001A8A; margin-bottom: 0.25rem; }
.upload-modal .up-msg { font-size: 0.85rem; color: #64748b; margin-bottom: 1.5rem; }
.upload-modal .up-bar {
  height: 12px;
  background: #f1f5f9;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.6rem;
  position: relative;
}
.upload-modal .up-bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #002CFF, #DC2626);
  border-radius: 999px;
  width: 0;
  transition: width .15s linear;
  background-size: 30px 30px;
  background-image: linear-gradient(90deg, #002CFF, #DC2626), repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(255,255,255,0.15) 10px, rgba(255,255,255,0.15) 20px);
}
.upload-modal .up-stats { display: flex; justify-content: space-between; font-size: 0.75rem; color: #64748b; font-variant-numeric: tabular-nums; }
.upload-modal .up-stats strong { color: #001A8A; font-size: 1.1rem; }
.upload-modal.up-success .up-icon { background: linear-gradient(135deg, #10b981, #059669); animation: none; }
.upload-modal.up-error .up-icon   { background: linear-gradient(135deg, #DC2626, #991B1B); animation: none; }
.upload-modal .up-bar .up-indet { animation: indetbar 60s cubic-bezier(.25,.1,.25,1) forwards; }
@keyframes indetbar {
  0%   { width: 0%; }
  10%  { width: 20%; }
  30%  { width: 50%; }
  60%  { width: 75%; }
  80%  { width: 88%; }
  100% { width: 95%; }
}
