/* ==================================================
   A.T.L.G — Custom Styles
   Complementa Tailwind + GSAP + Lenis
   ================================================== */

/* Lenis overrides */
html.lenis, html.lenis body {
  height: auto;
}
.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}
.lenis.lenis-stopped {
  overflow: hidden;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Scrollbar sutil */
::-webkit-scrollbar {
  width: 4px;
}
::-webkit-scrollbar-track {
  background: #060606;
}
::-webkit-scrollbar-thumb {
  background: #222;
  border-radius: 2px;
}
::-webkit-scrollbar-thumb:hover {
  background: #0066FF;
}

/* ---- Header glassmorphism al scrollear ---- */
.header-scrolled {
  background-color: rgba(6, 6, 6, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

/* ---- Nav links: underline sutil animada ---- */
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, #0066FF, #EF3340);
  transition: width 0.4s ease;
}
.nav-link:hover::after {
  width: 100%;
}

/* ---- Panel wipe shadow ---- */
.panel-wipe {
  box-shadow: 0 -30px 80px rgba(0, 0, 0, 0.6);
}

/* ---- School card hover glow ---- */
.school-card {
  transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1), 
              border-color 0.5s ease, 
              box-shadow 0.5s ease;
}
.school-card:hover {
  transform: translateY(-6px);
  box-shadow: 
    0 20px 60px rgba(0, 102, 255, 0.08),
    0 0 0 1px rgba(0, 102, 255, 0.15);
}


/* ---- Custom overflow for hero text mask ---- */
.overflow-hidden {
  overflow: hidden;
}

/* ---- Event cards ---- */
.event-card {
  transition: transform 0.45s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.45s ease, border-color 0.45s ease;
}

.event-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 70px rgba(0, 36, 125, 0.18);
  border-color: rgba(255, 204, 0, 0.35);
}

.lightbox-open {
  overflow: hidden;
}

.event-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.88);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 100;
}

.event-lightbox.is-active {
  display: flex;
}

.event-lightbox-content {
  width: min(960px, 100%);
}

.event-lightbox-content img {
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.1);
}

.event-lightbox-meta {
  margin-top: 16px;
  color: #fff;
}

.event-lightbox-meta p {
  margin: 0 0 6px;
  color: #FFCC00;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.event-lightbox-meta h3 {
  margin: 0;
  font-size: clamp(1.4rem, 2vw, 2rem);
  font-weight: 900;
}

.event-lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 42px;
  line-height: 1;
  cursor: pointer;
}

/* ---- Carnet de Afiliación ---- */
.carnet-afiliacion {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 380px;
  margin: 0;
  flex-shrink: 0;
  -webkit-scroll-snap-align: center;
  scroll-snap-align: center;
}

.custom-scrollbar::-webkit-scrollbar {
  height: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 10px;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #0066FF;
  border-radius: 10px;
}

.carnet-header {
  background: #0066FF;
  padding: 12px 20px;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.carnet-body {
  padding: 24px;
  display: flex;
  gap: 20px;
  align-items: center;
}

.carnet-photo-container {
  width: 100px;
  height: 125px;
  border-radius: 12px;
  border: 3px solid #f1f5f9;
  overflow: hidden;
  background: #f8fafc;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.carnet-photo-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carnet-info h4 {
  color: #0f172a;
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.carnet-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #64748b;
  font-weight: 700;
  margin-bottom: 2px;
}

.carnet-value {
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 10px;
}

.carnet-footer {
  background: #f1f5f9;
  padding: 8px 20px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.carnet-watermark {
  position: absolute;
  bottom: -10px;
  right: -10px;
  opacity: 0.03;
  width: 150px;
  pointer-events: none;
}

/* ---- Ambient pulse for glows ---- */
@keyframes ambientPulse {
  0%, 100% { opacity: 0.08; }
  50% { opacity: 0.15; }
}