/* =========================================================
   Portal Informática — UEP Apóstol San Judas Tadeo
   Estilos compartidos (complementa Tailwind CDN)
   ========================================================= */

/* --- Evitar scroll horizontal global --- */
html, body { overflow-x: hidden; }

/* --- Tipografía base --- */
body { font-family: 'Roboto', sans-serif; }
h1,h2,h3,h4,h5,h6 { font-family: 'Ubuntu', sans-serif; }

.text-color1{ color: #d1d2d2; }
.text-color2{ color: #95efa5; }
.text-color3{ color: #b1dddf; }
.text-color4{ color: #032657; }
.text-orange{ color: #f5a134; }
.text-red{ color: #f04242; }
.text-red2 {  color: #f77777}
.to-orange-600 { --tw-gradient-to: #27ef59 var(--tw-gradient-to-position) !important; }
.bg-color1 { --tw-bg-opacity: 1; background-color: rgb(237 237 237);}
.bg-color2 { --tw-bg-opacity: 1; background-color: #006d4ee6; }
.bg-orange{ --tw-bg-opacity: 1; background-color: #722f02e6; }
.bg-red{ --tw-bg-opacity: 1; background-color: #720202e6; } 
.bg-red2{ background-color: rgb(95 22 22 / 20%); }
.border-red{ border-color: rgb(243 7 7 / 40%); }   

/* --- Sidebar --- */
.sidebar {
  background: linear-gradient(180deg, #0f2c54 0%, #1d6fb8 100%);
}

/* --- Navegación lateral --- */
.nav-item {
  transition: all .2s ease;
  border-left: 3px solid transparent;
}
.nav-item:hover,
.nav-item.active {
  background: rgba(255,255,255,.15);
  border-left-color: #03fcc6;
}

/* --- Cards con hover --- */
.card-hover {
  transition: transform .3s ease, box-shadow .3s ease;
}
.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(15,44,84,.12);
}

/* --- Campo de formulario estándar --- */
.input-field {
  width: 100%;
  padding: .625rem 1rem;
  border: none;
  border-radius: .75rem;
  font-size: .875rem;
  outline: none;
  transition: box-shadow .2s;
  background: #f8fafc;
  box-shadow: 0 0 0 1.5px #e2e8f0;
}
.input-field:focus {
  background: #fff;
  box-shadow: 0 0 0 2px #1d6fb8, 0 0 0 4px rgba(29,111,184,.15);
}

/* --- Preloader --- */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}
#preloader.hidden {
  opacity: 0;
  visibility: hidden;
  transition: opacity 1s ease-out, visibility 1s ease-out;
}
.loader {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 10;
  width: 160px;
  height: 100px;
  margin-left: -80px;
  margin-top: -50px;
  border-radius: 5px;
  background: #1e3f57;
  animation: dot1_ 3s cubic-bezier(0.55, 0.3, 0.24, 0.99) infinite;
}
.loader:nth-child(2) {
  z-index: 11;
  width: 150px;
  height: 90px;
  margin-top: -45px;
  margin-left: -75px;
  border-radius: 3px;
  background: #3c517d;
  animation-name: dot2_;
}
.loader:nth-child(3) {
  z-index: 12;
  width: 40px;
  height: 20px;
  margin-top: 50px;
  margin-left: -20px;
  border-radius: 0 0 5px 5px;
  background: #6bb2cd;
  animation-name: dot3_;
}
@keyframes dot1_ {
  3%,  97% { width: 160px; height: 100px; margin-top: -50px; margin-left: -80px; }
  30%, 36% { width:  80px; height: 120px; margin-top: -60px; margin-left: -40px; }
  63%, 69% { width:  40px; height:  80px; margin-top: -40px; margin-left: -20px; }
}
@keyframes dot2_ {
  3%,  97% { height: 90px; width: 150px; margin-left: -75px; margin-top: -45px; }
  30%, 36% { width:  70px; height: 96px; margin-left: -35px; margin-top: -48px; }
  63%, 69% { width:  32px; height: 60px; margin-left: -16px; margin-top: -30px; }
}
@keyframes dot3_ {
  3%,  97% { height: 20px; width: 40px; margin-left: -20px; margin-top:  50px; }
  30%, 36% { width:   8px; height: 8px; margin-left:  -5px; margin-top:  49px; border-radius: 8px;  }
  63%, 69% { width:  16px; height: 4px; margin-left:  -8px; margin-top: -37px; border-radius: 10px; }
}

/* --- Hero pública --- */
.hero-gradient {
  background: linear-gradient(135deg, #0f2c54 0%, #1d6fb8 50%, #0f2c54 100%);
}
.hero-pattern {
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* --- Galería --- */
.gallery-img  { transition: transform .4s ease; }
.gallery-item:hover .gallery-img { transform: scale(1.05); }

/* --- Tarjeta de cumpleaños --- */
.birthday-card {
  background: linear-gradient(135deg, #fff 0%, #f0f7ff 100%);
  border-left: 4px solid #1d6fb8;
}

/* --- Tarjeta de herramientas --- */
.tool-card { border-top: 3px solid #1d6fb8; }

/* --- Animaciones --- */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}
.float-anim { animation: float 4s ease-in-out infinite; }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeInUp .6s ease forwards; }

@keyframes slideIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.card-anim { animation: slideIn .5s ease forwards; }

/* --- Lightbox --- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.92);
  z-index: 9000;
  align-items: center;
  justify-content: center;
}
.lightbox.open { display: flex; }

/* --- Sección divisor --- */
.section-divider {
  height: 3px;
  background: linear-gradient(90deg, #0f2c54, #1d6fb8, #1d6fb8);
  border-radius: 2px;
}

/* --- Pill de etiquetas --- */
.tag-pill {
  background: rgba(29,111,184,.1);
  color: #1d6fb8;
}

/* --- Scrollbar del nav lateral --- */
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); border-radius: 2px; }
.sidebar-nav::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.35); }

/* --- Login panel --- */
.bg-panel {
  background: linear-gradient(135deg, #0f2c54 0%, #1d6fb8 100%);
}

/* --- Estrellas fugaces en sidebars --- */
/* rotate(-35deg) primero inclina el elemento,
   luego translateX lo mueve a lo largo de esa diagonal */
@keyframes star-fly {
  0%   { opacity: 0; transform: rotate(-35deg) translateX(320px); }
  5%   { opacity: 1; transform: rotate(-35deg) translateX(285px); }
  90%  { opacity: 0; transform: rotate(-35deg) translateX(-60px);  }
  100% { opacity: 0; transform: rotate(-35deg) translateX(320px); }
}

.star-streak {
  position: absolute;
  left: 0;
  height: 2px;
  border-radius: 999px;
  transform-origin: left center;
  background: linear-gradient(
    to right,
    rgba(255,255,255,0.98) 0%,
    rgba(255,255,255,0.75) 20%,
    rgba(255,255,255,0.20) 65%,
    transparent 100%
  );
  filter: drop-shadow(0 0 4px rgba(255,255,255,0.55));
  pointer-events: none;
  animation: star-fly linear infinite;
  opacity: 0;
}
