:root {
  --primary-navy: #102C57;
  --secondary-blue: #1679AB;
  --accent-gold: #FFB703;
  --accent-gold-dark: #D97706;
  --bg-gradient-start: #0B192C;
  --bg-gradient-mid: #102C57;
  --bg-gradient-end: #1679AB;
  --card-bg: rgba(255, 255, 255, 0.96);
  --card-border: rgba(255, 255, 255, 0.6);
  --text-dark: #0F172A;
  --text-muted: #64748B;
  --link-hover-bg: #F0F7FF;
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 15px -3px rgba(16, 44, 87, 0.1), 0 4px 6px -4px rgba(16, 44, 87, 0.05);
  --shadow-lg: 0 20px 25px -5px rgba(16, 44, 87, 0.2), 0 8px 10px -6px rgba(16, 44, 87, 0.1);
  --shadow-glow: 0 0 20px rgba(220, 38, 38, 0.55), 0 0 35px rgba(255, 183, 3, 0.35);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  min-height: 100vh;
  background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-mid) 50%, var(--bg-gradient-end) 100%);
  background-attachment: fixed;
  color: var(--text-dark);
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

/* Background Animated Particle Overlay */
.bg-decorations {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.decor-blob-1 {
  position: absolute;
  top: -10%;
  right: -10%;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(22, 121, 171, 0.4) 0%, rgba(22, 121, 171, 0) 70%);
  filter: blur(40px);
  animation: floatSlow 12s ease-in-out infinite alternate;
}

.decor-blob-2 {
  position: absolute;
  bottom: 5%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 183, 3, 0.25) 0%, rgba(255, 183, 3, 0) 70%);
  filter: blur(40px);
  animation: floatSlow 16s ease-in-out infinite alternate-reverse;
}

@keyframes floatSlow {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(30px, 40px) scale(1.1); }
}

/* Container */
.microsite-container {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 32px 18px 48px;
  position: relative;
  z-index: 1;
}

/* Top Action Bar (Admin Link & Share) */
.top-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.top-btn {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #FFFFFF;
  padding: 8px 14px;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.25s ease;
  cursor: pointer;
}

.top-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  color: #FFFFFF;
  transform: translateY(-2px);
}

/* Header Section */
.header-card {
  text-align: center;
  margin-bottom: 24px;
  padding: 10px 10px;
}

.avatar-wrapper {
  position: relative;
  display: inline-block;
  margin-bottom: 14px;
}

.avatar-img {
  width: 110px;
  height: 110px;
  object-fit: contain;
  border-radius: 50%;
  padding: 6px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3), 0 0 0 4px rgba(255, 183, 3, 0.8);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.avatar-wrapper:hover .avatar-img {
  transform: scale(1.06) rotate(3deg);
}

.verified-badge {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: #2563EB;
  color: #FFFFFF;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  border: 3px solid #FFFFFF;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.smart-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #FFB703 0%, #F59E0B 100%);
  color: #102C57;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 9999px;
  margin-bottom: 8px;
  box-shadow: 0 4px 12px rgba(255, 183, 3, 0.4);
}

.site-title {
  color: #FFFFFF;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.site-tagline {
  color: #E2E8F0;
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.site-bio {
  color: #CBD5E1;
  font-size: 0.85rem;
  line-height: 1.45;
  max-width: 480px;
  margin: 0 auto;
}

/* School Photo Banner */
.school-photo-banner {
  position: relative;
  margin-top: 18px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  border: 2px solid rgba(255, 255, 255, 0.3);
  max-height: 200px;
}

.school-photo-img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.school-photo-banner:hover .school-photo-img {
  transform: scale(1.03);
}

.school-photo-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 8px 14px;
  background: linear-gradient(to top, rgba(16, 44, 87, 0.9) 0%, rgba(16, 44, 87, 0) 100%);
  color: #FFFFFF;
  font-size: 0.78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* Quick Search & Filter */
.search-filter-box {
  margin-bottom: 20px;
}

.search-input-wrapper {
  position: relative;
  margin-bottom: 12px;
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #94A3B8;
  font-size: 1.1rem;
}

.search-input {
  width: 100%;
  padding: 12px 18px 12px 46px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 14px;
  font-size: 0.9rem;
  color: var(--text-dark);
  box-shadow: var(--shadow-sm);
  outline: none;
  transition: all 0.25s ease;
}

.search-input:focus {
  background: #FFFFFF;
  border-color: var(--secondary-blue);
  box-shadow: 0 0 0 3px rgba(22, 121, 171, 0.35);
}

.search-clear-btn {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: #E2E8F0;
  border: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: #64748B;
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  line-height: 1;
  transition: all 0.2s ease;
  padding: 0;
}

.search-clear-btn:hover {
  background: #CBD5E1;
  color: #0F172A;
}

.search-empty-state {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  padding: 32px 20px;
  text-align: center;
  color: #102C57;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
  margin: 12px 0;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.btn-clear-search {
  background: #1679AB;
  color: #FFFFFF;
  border: none;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  box-shadow: 0 2px 6px rgba(22, 121, 171, 0.3);
}

.btn-clear-search:hover {
  background: #102C57;
  transform: translateY(-1px);
}

/* Category Filter Container & Swipe Gestures */
.category-filter-container {
  position: relative;
  display: flex;
  align-items: center;
  margin-top: 4px;
}

.category-filter-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 4px 8px 4px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  cursor: grab;
  user-select: none;
  width: 100%;
}

.category-filter-pills.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
}

.category-filter-pills::-webkit-scrollbar {
  display: none;
}

.pill-nav-btn {
  position: absolute;
  top: calc(50% - 2px);
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(16, 44, 87, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  font-size: 0.85rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
  transition: all 0.2s ease;
  opacity: 0;
  pointer-events: none;
}

.pill-nav-btn.visible {
  opacity: 1;
  pointer-events: auto;
}

.pill-nav-btn:hover {
  background: #1679AB;
  transform: translateY(-50%) scale(1.12);
}

.pill-nav-left {
  left: -10px;
}

.pill-nav-right {
  right: -10px;
}

.filter-pill {
  white-space: nowrap;
  padding: 7px 15px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #FFFFFF;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.filter-pill:hover,
.filter-pill.active {
  background: #FFFFFF;
  color: var(--primary-navy);
  border-color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  font-weight: 700;
  transform: translateY(-1px);
}

/* Links List */
.links-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.link-card {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 14px 18px;
  text-decoration: none;
  color: var(--text-dark);
  box-shadow: var(--shadow-md);
  transition: all 0.28s cubic-bezier(0.34, 1.4, 0.64, 1);
  overflow: hidden;
  cursor: pointer;
}

.link-card:hover {
  transform: translateY(-3px) scale(1.015);
  box-shadow: var(--shadow-lg);
  background: #FFFFFF;
  border-color: rgba(22, 121, 171, 0.4);
}

.link-card:active {
  transform: translateY(0) scale(0.99);
}

/* PPDB Animated Highlight Glowing Button */
.link-card.highlight-ppdb {
  background: linear-gradient(135deg, #FFFFFF 0%, #FEF2F2 100%);
  border: 2px solid #EF4444;
  box-shadow: var(--shadow-glow);
  animation: pulseGlow 2.2s infinite ease-in-out;
}

@keyframes pulseGlow {
  0% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7), 0 0 15px rgba(255, 183, 3, 0.4);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(239, 68, 68, 0), 0 0 25px rgba(255, 183, 3, 0.7);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0), 0 0 15px rgba(255, 183, 3, 0.4);
  }
}

.link-icon-box {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  margin-right: 14px;
  background: #F1F5F9;
  transition: all 0.25s ease;
}

.link-card:hover .link-icon-box {
  transform: scale(1.12);
}

.link-content {
  flex: 1;
  min-width: 0;
}

.link-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 2px;
}

.link-title {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--primary-navy);
  line-height: 1.3;
}

.link-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}

.badge-red {
  background: #FEE2E2;
  color: #DC2626;
  border: 1px solid #FECACA;
}

.badge-blue {
  background: #E0F2FE;
  color: #0284C7;
}

.badge-green {
  background: #DCFCE7;
  color: #16A34A;
}

.badge-purple {
  background: #F3E8FF;
  color: #9333EA;
}

.badge-gold {
  background: #FEF3C7;
  color: #D97706;
}

.link-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: normal;
  line-height: 1.35;
}

.link-arrow {
  margin-left: 10px;
  color: #94A3B8;
  font-size: 1.25rem;
  transition: transform 0.2s ease, color 0.2s ease;
}

.link-card:hover .link-arrow {
  color: var(--secondary-blue);
  transform: translateX(4px);
}

/* Category Subheader */
.category-group-title {
  color: #E2E8F0;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 16px 0 6px 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.category-group-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.2);
}

/* Footer Section */
.footer-card {
  margin-top: 36px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 20px;
  padding: 24px 20px;
  color: #FFFFFF;
  text-align: center;
}

.footer-section-title {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 14px;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #FFB703;
}

.footer-info-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.84rem;
  color: #E2E8F0;
  text-align: left;
  margin-bottom: 20px;
}

.footer-info-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.4;
}

.footer-info-item i {
  font-size: 1.1rem;
  color: #38BDF8;
  margin-top: 2px;
}

.footer-social-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 18px;
}

.social-pill-btn {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #FFFFFF;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  text-decoration: none;
  transition: all 0.25s ease;
}

.social-pill-btn:hover {
  background: #FFFFFF;
  color: var(--primary-navy);
  transform: translateY(-3px);
}

.footer-copyright {
  font-size: 0.76rem;
  color: #94A3B8;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 14px;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-box {
  background: #FFFFFF;
  border-radius: 20px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  transform: translateY(20px) scale(0.95);
  transition: all 0.25s cubic-bezier(0.34, 1.3, 0.64, 1);
  position: relative;
}

.modal-overlay.active .modal-box {
  transform: translateY(0) scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  background: #F1F5F9;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #64748B;
  cursor: pointer;
  transition: all 0.2s;
}

.modal-close-btn:hover {
  background: #E2E8F0;
  color: #0F172A;
}

.modal-header {
  margin-bottom: 20px;
  padding-right: 32px;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary-navy);
  margin-bottom: 4px;
}

.modal-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* WhatsApp Option Cards */
.wa-options-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wa-option-card {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border: 1.5px solid #E2E8F0;
  border-radius: 14px;
  text-decoration: none;
  color: var(--text-dark);
  transition: all 0.2s ease;
}

.wa-option-card:hover {
  border-color: #25D366;
  background: #F0FDF4;
  transform: translateY(-2px);
}

.wa-icon-pill {
  width: 44px;
  height: 44px;
  background: #DCFCE7;
  color: #16A34A;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-right: 14px;
}

/* Form Controls */
.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary-navy);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #CBD5E1;
  border-radius: 10px;
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color 0.2s;
  background: #F8FAFC;
}

.form-control:focus {
  outline: none;
  border-color: var(--secondary-blue);
  background: #FFFFFF;
}

.btn-primary-action {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, var(--primary-navy) 0%, var(--secondary-blue) 100%);
  color: #FFFFFF;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.25s ease;
  margin-top: 10px;
}

.btn-primary-action:hover {
  opacity: 0.95;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Prestasi Showcase Tabs & Cards */
.prestasi-item-card {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
}

.prestasi-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary-navy);
  margin-bottom: 4px;
}

.prestasi-meta {
  display: flex;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.prestasi-meta span {
  background: #E2E8F0;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
}

.prestasi-desc {
  font-size: 0.82rem;
  color: #475569;
}

/* Toast Notification */
.toast-msg {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #0F172A;
  color: #FFFFFF;
  padding: 10px 20px;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  z-index: 1000;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.toast-msg.show {
  transform: translateX(-50%) translateY(0);
}
