/* cards.css — Card, card-header, alumni card styles
   Extracted from components.css (R4 split) */

/* ==================== ALUMNI CARD ==================== */
.alumni-card {
  padding: 0.75rem 1rem;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  transition: all 0.2s ease;
  animation: rowSlideIn 0.25s ease-out;
}

.alumni-card:hover {
  border-color: #c7d2fe;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.08);
}

/* ==================== CARDS ==================== */
.card {
  background-color: white;
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  padding: 1.5rem;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 1rem;
}

/* ==================== YEARBOOK CARDS ==================== */
.scale-102 {
  transform: scale(1.02);
}

/* Premium card shadow glow */
.yearbook-card {
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.yearbook-card:hover {
  transform: translateY(-6px);
}

/* Image zoom transition inside polaroid frame */
.yearbook-card img {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.yearbook-card:hover img {
  transform: scale(1.06);
}

/* Slide in animation for yearbook cards grid loading */
@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#genlogPortalGrid > div {
  animation: fadeSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Stagger animation delay for first 15 cards */
#genlogPortalGrid > div:nth-child(1) { animation-delay: 0.03s; }
#genlogPortalGrid > div:nth-child(2) { animation-delay: 0.06s; }
#genlogPortalGrid > div:nth-child(3) { animation-delay: 0.09s; }
#genlogPortalGrid > div:nth-child(4) { animation-delay: 0.12s; }
#genlogPortalGrid > div:nth-child(5) { animation-delay: 0.15s; }
#genlogPortalGrid > div:nth-child(6) { animation-delay: 0.18s; }
#genlogPortalGrid > div:nth-child(7) { animation-delay: 0.21s; }
#genlogPortalGrid > div:nth-child(8) { animation-delay: 0.24s; }
#genlogPortalGrid > div:nth-child(9) { animation-delay: 0.27s; }
#genlogPortalGrid > div:nth-child(10) { animation-delay: 0.30s; }
#genlogPortalGrid > div:nth-child(11) { animation-delay: 0.33s; }
#genlogPortalGrid > div:nth-child(12) { animation-delay: 0.36s; }
#genlogPortalGrid > div:nth-child(13) { animation-delay: 0.39s; }
#genlogPortalGrid > div:nth-child(14) { animation-delay: 0.42s; }
#genlogPortalGrid > div:nth-child(15) { animation-delay: 0.45s; }


/* ==================== 3D FLIP CARD ==================== */
.flip-card {
  perspective: 1000px;
  -webkit-perspective: 1000px;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
}

.flip-card.flipped .flip-card-inner {
  transform: rotateY(180deg);
  -webkit-transform: rotateY(180deg);
}

.flip-card-front {
  position: relative;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.flip-card-back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: rotateY(180deg);
  -webkit-transform: rotateY(180deg);
}

/* ==================== PHOTO CAROUSEL ==================== */
.carousel-container {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
}

.carousel-track {
  display: flex;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.carousel-slide {
  flex: 0 0 100%;
  min-width: 100%;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.5rem 0;
}

.carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.4);
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  padding: 0;
}

.carousel-dot.active {
  background: #6366f1;
  width: 18px;
  border-radius: 3px;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid rgba(226, 232, 240, 0.8);
  z-index: 2;
  opacity: 0;
}

.carousel-container:hover .carousel-arrow {
  opacity: 1;
}

.carousel-arrow:hover {
  background: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.carousel-arrow.prev {
  left: 6px;
}

.carousel-arrow.next {
  right: 6px;
}

/* ==================== THEN/NOW TOGGLE ==================== */
.then-now-toggle {
  display: inline-flex;
  background: #f1f5f9;
  border-radius: 0.5rem;
  padding: 2px;
  gap: 2px;
}

.then-now-toggle button {
  padding: 4px 12px;
  font-size: 10px;
  font-weight: 700;
  border-radius: 0.375rem;
  transition: all 0.25s ease;
  border: none;
  cursor: pointer;
  color: #64748b;
  background: transparent;
}

.then-now-toggle button.active {
  background: #6366f1;
  color: white;
  box-shadow: 0 1px 3px rgba(99, 102, 241, 0.3);
}

/* ==================== BADGES ==================== */

/* Birthday badge */
.badge-birthday {
  background: linear-gradient(135deg, #f472b6, #ec4899);
  color: white;
  padding: 4px 8px;
  border-radius: 0.5rem;
  font-size: 8px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  animation: birthdayPulse 2s ease-in-out infinite;
  border: 1px solid rgba(236, 72, 153, 0.3);
}

@keyframes birthdayPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(236, 72, 153, 0.4); }
  50% { transform: scale(1.05); box-shadow: 0 0 0 6px rgba(236, 72, 153, 0); }
}

/* Superlative badge */
.badge-superlative {
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: white;
  padding: 3px 8px;
  border-radius: 0.5rem;
  font-size: 8px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

/* Flip hint */
.flip-hint {
  font-size: 9px;
  color: #94a3b8;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.flip-hint:hover {
  color: #6366f1;
}


/* ==================== HERO CAROUSEL ==================== */
.hero-carousel {
  position: relative;
  overflow: hidden;
  border-radius: 1.5rem;
  margin-bottom: 2rem;
  aspect-ratio: 16 / 9;
}

.hero-carousel-track {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.hero-carousel-slide {
  flex: 0 0 100%;
  min-width: 100%;
  position: relative;
  overflow: hidden;
}

.hero-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-carousel-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem 1.5rem 1.25rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75), transparent);
  color: white;
  font-size: 13px;
  font-weight: 600;
}

.hero-carousel-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 3;
}

.hero-carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  padding: 0;
}

.hero-carousel-dot.active {
  background: white;
  width: 24px;
  border-radius: 4px;
}

.hero-carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 3;
  border: none;
}

.hero-carousel-arrow:hover {
  background: white;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.hero-carousel-arrow.prev { left: 12px; }
.hero-carousel-arrow.next { right: 12px; }


/* ==================== ANNIVERSARY COUNTDOWN ==================== */
.anniversary-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(239, 68, 68, 0.2));
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  color: #fbbf24;
}


/* ==================== YEARBOOK THEMES ==================== */
.theme-classic .yearbook-card {
  border-radius: 1.5rem;
}

.theme-modern .yearbook-card {
  border-radius: 0.75rem;
  border-width: 2px;
}

.theme-vintage .yearbook-card {
  border-radius: 0.25rem;
  border-color: #d4c5a0;
  background: linear-gradient(to bottom, #faf6ef, #fff);
}

.theme-sport .yearbook-card {
  border-radius: 1rem;
  border-color: #0ea5e9;
  border-width: 2px;
}

.theme-science .yearbook-card {
  border-radius: 1rem;
  border-color: #10b981;
  border-width: 2px;
}


/* ==================== COMPLETION SCORE BAR ==================== */
.completion-bar {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 9999px;
  overflow: hidden;
}

.completion-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #34d399);
  border-radius: 9999px;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==================== PHASE 2: WALL OF MEMORIES ==================== */
.wall-message-card {
  animation: rowSlideIn 0.3s ease-out;
}

.wall-message-card:hover {
  border-color: #c7d2fe;
}

/* ==================== PHASE 2: VOTING CARDS ==================== */
.voting-active-card {
  animation: rowSlideIn 0.3s ease-out;
}

.voting-result-card {
  animation: rowSlideIn 0.3s ease-out;
}

.voting-candidate-btn:active {
  transform: scale(0.97);
}

/* ==================== PHASE 2: REUNION CARDS ==================== */
.reunion-card {
  animation: rowSlideIn 0.3s ease-out;
}

.reunion-countdown-badge {
  animation: pulse-soft 2s ease-in-out infinite;
}

@keyframes pulse-soft {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.rsvp-btn:active {
  transform: scale(0.97);
}

/* ==================== PHASE 2: SCROLLBAR NONE ==================== */
.scrollbar-none {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.scrollbar-none::-webkit-scrollbar {
  display: none;
}

/* ==================== LATIHAN SOAL LEVEL CARDS ==================== */
.latihan-level-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 1rem;
  border-radius: 1rem;
  border-width: 1px;
  transition: all 0.2s ease;
  text-align: left;
}

.latihan-level-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* ==================== LATIHAN MATERI SELECTORS ==================== */
.latihan-selector-btn {
  padding: 0.625rem 0.75rem;
  border-radius: 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  text-align: center;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  background-color: #f8fafc;
  color: #64748b;
}

.latihan-selector-btn:hover {
  background-color: #f1f5f9;
  color: #475569;
}

.latihan-selector-btn.active {
  background-color: #ffffff;
  color: #4f46e5;
  border-color: #4f46e5;
}

.latihan-kelas-btn {
  padding: 0.625rem 0.75rem;
  border-radius: 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  text-align: center;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  background-color: #f8fafc;
  color: #64748b;
}

.latihan-kelas-btn:hover {
  background-color: #f1f5f9;
  color: #475569;
}

.latihan-kelas-btn.active {
  background-color: #4f46e5;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

.latihan-jurusan-btn {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  text-align: left;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  background-color: #f8fafc;
  color: #475569;
}

.latihan-jurusan-btn:hover {
  background-color: #f1f5f9;
}

.latihan-jurusan-btn.active {
  background-color: #4f46e5;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

/* ==================== LATIHAN SUBJECT CARDS ==================== */
.latihan-subject-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 1rem;
  background-color: #ffffff;
  border: 1px solid #f1f5f9;
  border-radius: 1rem;
  transition: all 0.2s ease;
  text-align: left;
}

.latihan-subject-card:hover {
  border-color: #e2e8f0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  transform: translateY(-2px);
}

.latihan-subject-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.latihan-subject-title {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.25;
}

.latihan-subject-label {
  font-size: 0.6875rem;
  color: #94a3b8;
  margin-top: 0.25rem;
}

.latihan-subject-dot {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 7px;
  height: 7px;
  background-color: #f59e0b;
  border-radius: 9999px;
  border: 2px solid #ffffff;
}

/* ==================== LATIHAN MODAL OPTION ROWS ==================== */
.latihan-modal-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem;
  border-radius: 0.75rem;
  background-color: #ffffff;
  border: 1px solid #f1f5f9;
  transition: all 0.2s ease;
  cursor: pointer;
  text-align: left;
}

.latihan-modal-option:hover {
  background-color: #f8fafc;
  border-color: #e2e8f0;
}

.latihan-modal-option-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.625rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.latihan-modal-option-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
}
