/* =============================
================================ */
:root {
  --neust-green: #012e6a;
  --neust-green-dark: #001c45;
  --neust-gold: #ffb400;
  --neust-gold-soft: rgba(255,180,0,.35);
  --bg-light: #f3f4f6;
  --text-dark: #111827;
  --border-light: #e5e7eb;
  
  --gold: #ffb400;
  --silver: #9ea2a7;
  --bronze: #b87333;
  --rank-up: #16a34a;
  --rank-down: #dc2626;
}


.page-template-page-scuaa2026 header,
.page-template-page-scuaa2026 footer,
.page-template-page-scuaa2026 #main-nav,
.page-template-page-scuaa2026 .site-footer,
.page-template-page-scuaa2026 .main-footer,
.page-template-page-scuaa2026 .standard-footer,
.page-template-page-scuaa2026 .aside#sidebar-left,
.page-template-page-scuaa2026 .aside#sidebar-right,
.page-template-page-scuaa2026 #footer.anchor,
.page-template-page-scuaa2026 iframe[src*="gwhs.i.gov.ph"] {
  display: none !important;
}

body {
  margin: 0;
  padding: 0;
  background-image: url("https://scuaa-iii-2026-medal-tally.neust.edu.ph/assets/images/scuaabg.webp");
  background-size: cover;
  background-position: center top;
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-color: #f3f4f6;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}


.scuaa2026 {
  min-height: 100vh;
  padding: 1rem;
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
}


.scuaa-title-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
  padding-top: .3rem;
}

.scuaa-title-center {
  position: relative;
  display: inline-flex;
}

.scuaa-title-img {
  width: 320px;
  max-width: 100%;
  height: auto;
  z-index: 2;
  animation: titleEnter 0.9s ease forwards;
}

.scuaa-live {
  position: absolute;
  top: 5px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.25);
  animation: pulseGlow 1.6s infinite, liveTilt 3s ease-in-out infinite alternate;
  z-index: 3;
}

.scuaa-live::before {
  content: "";
  width: 7px;
  height: 7px;
  background: #fff;
  border-radius: 50%;
}


#podiumTop3 {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 16px;
  margin: 1.5rem 0;
  width: 100%;
}

.podium-block {
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  padding: 8px;
  transition: all 0.4s ease;
  overflow: hidden;
}

.podium-block img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: contain;
  background: white;
}

.podium-block.top1 { height: 140px; width: 100px; background: linear-gradient(135deg, #FFD700, #FFC200); }
.podium-block.top2 { height: 110px; width: 85px; background: linear-gradient(135deg, #C0C0C0, #AFAFAF); }
.podium-block.top3 { height: 90px; width: 80px; background: linear-gradient(135deg, #CD7F32, #B06A3C); }




.podium-item {
  display: flex;
  align-items: flex-end;
  transition: transform 0.4s ease, opacity 0.4s ease;
}


.podium-block.bounce {
  animation: podiumBounce 0.6s ease;
}









.scuaa-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  font-size: 0.9rem;
}

.scuaa-table th {
  background: linear-gradient(135deg, var(--neust-green), var(--neust-green-dark));
  color: #fff;
  padding: 12px;
  font-weight: 600;
  text-align: center;
}

.scuaa-table td {
  padding: 10px 8px;
  text-align: center;
  border-bottom: 1px solid var(--border-light);
}

.scuaa-university {
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left !important;

}


.scuaa-table td:nth-child(2) {
    text-align: left;
    vertical-align: middle;
    padding: 10px 8px;

}


.scuaa-university {
    display: inline-flex; 
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    width: 100%;
    min-height: 32px; 
}


.scuaa-university img {
    width: 26px;
    height: 26px;
    min-width: 26px; 
    object-fit: contain;
    flex-shrink: 0;
    display: block;
}


.scuaa-university:empty::before {
    content: "—"; 
    color: var(--silver);
    margin-left: 38px;
}


@media (max-width: 480px) {
    .scuaa-university {
        gap: 6px;
        min-height: 28px;
    }
    .scuaa-university img {
        width: 20px;
        height: 20px;
        min-width: 20px;
    }
}








.scuaa-university img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}


.medal-gold::before   { content: "🥇 "; }
.medal-silver::before { content: "🥈 "; }
.medal-bronze::before { content: "🥉 "; }


.chart-wrap {
  width: 100%;
  padding: 1rem 0;

}

canvas#medalChart {
  background: white;
  border-radius: 12px;
  padding: 12px;
  max-height: 400px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}



.venue-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: linear-gradient(135deg, #0b2c5f, #081f45);
  color: #fff;
  border: none;
  padding: 12px 18px;
  border-radius: 30px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,0.2);
  z-index: 999;
  transition: transform 0.2s ease;
}

.venue-btn:hover {
  transform: translateY(-2px);
}


.venue-modal {
  position: fixed;

  top: -10vh; 
  bottom: -10vh;
  left: 0;
  right: 0;
  

  height: 120vh; 
  
  background: rgba(0,0,0,0.6);
  display: none;
  justify-content: center;
  align-items: center;
  padding: 20px;
  z-index: 1000;
  

  will-change: transform; 
}

.venue-modal.is-active {
  display: flex !important;
}

.venue-card {
 
  margin-top: 10vh; 
  margin-bottom: 10vh;
  


  
 
}


.venue-card {
  background: #fff;
  width: 95vw;
  max-width: 1100px;
  max-height: 80vh;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
    -webkit-overflow-scrolling: touch; 
    overflow-y: auto;
}


.venue-header {
  background: linear-gradient(135deg, #0b2c5f, #123d82);
  color: #fff;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.venue-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
}


.venue-table-wrapper {
  overflow: auto;
  padding: 1px;
    overflow-y: auto;
  -webkit-overflow-scrolling: touch; 
}


.venue-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.venue-table th,
.venue-table td {
  border: 1px solid #e5e7eb;
  padding: 8px;
  text-align: center;
  white-space: nowrap;
}

.venue-table th {
  background: #0b2c5f;
  color: #fff;
  position: sticky;
  top: 0;
}


@media (max-width: 768px) {
  .venue-card {
    max-height: 95vh;
  }

  .venue-table {
    font-size: 0.75rem;
  }

  .venue-btn {
    bottom: 15px;
    right: 15px;
    padding: 10px 14px;
  }
}




@keyframes titleEnter { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulseGlow { 0% { box-shadow: 0 0 0 0 rgba(239,68,68,0.7); } 70% { box-shadow: 0 0 0 10px rgba(239,68,68,0); } 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); } }
@keyframes liveTilt { from { transform: rotate(-3deg); } to { transform: rotate(2deg); } }


@media (max-width: 480px) {
  :root { font-size: 14px; }
  
  body {
    background-attachment: scroll; 
  }

  .scuaa2026 { padding: 0.5rem; }

  .scuaa-title-img { width: 220px; }


  #podiumTop3 { gap: 8px; }
  .podium-block.top1 { height: 100px; width: 80px; }
  .podium-block.top2 { height: 80px; width: 70px; }
  .podium-block.top3 { height: 65px; width: 65px; }
  .podium-block img { width: 32px; height: 32px; }


  .scuaa-table { font-size: 0.75rem; }
  .scuaa-table td, .scuaa-table th { padding: 8px 4px; }
  .scuaa-university img { width: 18px; height: 18px; }

  canvas#medalChart { max-height: 250px; }
  
  .section-event-title { font-size: 1.4rem; margin: 15px 0; }
}

.scuaa-watermark {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
  opacity: 0.04;
  z-index: 0;
}
.scuaa-watermark img { width: 80%; height: auto; }



.section-event-title {
  text-align: center;
  font-weight: 600;
  font-size: 1.9rem;
  margin: 30px 0 30px;
  color: #0b2c5f;
  position: relative;

}

.section-event-title::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -10px;
  transform: translateX(-50%);
  width: 160px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, #d4af37, transparent);

}


.rank-arrow {
  margin-left: 4px;
  font-size: 14px;
}

.scuaa-rank-up .rank-arrow {
  color: var(--rank-up);
}

.scuaa-rank-down .rank-arrow {
  color: var(--rank-down);
}





.scuaa-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-top: 20px;
  padding-bottom: 20px;
}

.scuaa-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.3s;
}

.scuaa-btn:hover:not(:disabled) {
  background: #FFB400;
  color: #012e6a;
}

.scuaa-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.page-info {
  font-size: 0.9rem;
  color: white;
  font-weight: 500;
}


.event-swipe-container {
  overflow-x: auto;
  cursor: grab;
  touch-action: pan-y; /* Allows swiping left/right without scrolling the whole page */
  position: relative;
  padding: 10px;
}

.event-swipe-container:active {
  cursor: grabbing;
}

.swipe-indicators {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 15px;
}

.pagination-dot {
  width: 10px;
  height: 10px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
}

.pagination-dot.active {
  background: #FFB400; /* NEUST Gold */
  transform: scale(1.3);
  box-shadow: 0 0 10px rgba(255, 180, 0, 0.5);
}

/* Add a smooth fade-in when switching pages */
#eventTable tr {
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateX(10px); }
  to { opacity: 1; transform: translateX(0); }
}

.event-swipe-area {
position: relative;
overflow: hidden; /* Hide the long list */
touch-action: pan-y pinch-zoom; /* Allow vertical scroll, but we handle horizontal */
user-select: none;
}

.scuaa-table {
width: 100%;
transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Pagination Dots */
.swipe-indicators {
display: flex;
justify-content: center;
align-items: center;
gap: 10px;
margin: 20px 0;
}

.dot {
width: 8px;
height: 8px;
background-color: #001c45;
border-radius: 50%;
transition: all 0.3s ease;
cursor: pointer;
}

.dot.active {
background: #ffb400;
transform: scale(1.5);
box-shadow: 0 0 10px rgba(255, 180, 0, 0.6);
}
