/* ==========================================================================
   Alumni Connect - Core Design System & Custom Styles
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,500;0,600;0,700;1,400&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  --primary: #0F172A;          /* Deep Navy */
  --primary-light: #1E293B;    /* Lighter Navy */
  --accent: #D97706;           /* Warm Gold / Soft Amber */
  --accent-hover: #B45309;
  --accent-light: #FEF3C7;     /* Gold Tint */
  --bg-app: #F8FAFC;           /* Off-White */
  --surface: #FFFFFF;          /* Pure White */
  --text-main: #0F172A;        /* Dark Slate */
  --text-muted: #64748B;       /* Muted Slate */
  --border-color: #E2E8F0;     /* Soft Border */
  --success: #10B981;          /* Emerald Green */
  --warning: #F59E0B;          /* Soft Amber */
  --danger: #EF4444;           /* Soft Red */
  
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;

  --shadow-subtle: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03);
  --shadow-card: 0 4px 6px -1px rgba(15, 23, 42, 0.04), 0 2px 4px -2px rgba(15, 23, 42, 0.02);
  --shadow-hover: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
  --shadow-modal: 0 20px 25px -5px rgba(15, 23, 42, 0.2), 0 8px 10px -6px rgba(15, 23, 42, 0.1);
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.font-serif-heading {
  font-family: var(--font-heading);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #F1F5F9;
}
::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

/* Glass & Card Effects */
.bg-surface {
  background-color: var(--surface);
}

.border-subtle {
  border-color: var(--border-color);
}

.card-elevated {
  background: var(--surface);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-card);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-elevated:hover {
  box-shadow: var(--shadow-hover);
  border-color: #CBD5E1;
}

.gold-badge {
  background-color: var(--accent-light);
  color: #92400E;
  border: 1px solid #FDE68A;
}

/* Animation utilities */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.animate-fade-in {
  animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Glassmorphism & Modern Visual Effects */
.glass-card {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.glass-dark {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.glow-amber {
  box-shadow: 0 10px 30px -5px rgba(217, 119, 6, 0.4);
}

.glow-blue {
  box-shadow: 0 10px 30px -5px rgba(37, 99, 235, 0.35);
}

.gradient-text-gold {
  background: linear-gradient(135deg, #FBBF24 0%, #F59E0B 50%, #D97706 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gradient-text-hero {
  background: linear-gradient(135deg, #FFFFFF 40%, #CBD5E1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

@keyframes floatSlow {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}

.animate-float {
  animation: floatSlow 4s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}

.animate-pulse-glow {
  animation: pulseGlow 3s ease-in-out infinite;
}


/* Modal styling */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--surface);
  border-radius: 1rem;
  box-shadow: var(--shadow-modal);
  width: 100%;
  max-width: 32rem;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95);
  transition: transform 0.2s ease;
}

.modal-backdrop.active .modal-content {
  transform: scale(1);
}

/* Toast styling */
#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

.toast-item {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.25rem;
  background: var(--primary);
  color: white;
  border-radius: 0.75rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
  font-size: 0.875rem;
  font-weight: 500;
  animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 24rem;
}

.toast-item.success { border-left: 4px solid var(--success); }
.toast-item.warning { border-left: 4px solid var(--warning); }
.toast-item.danger { border-left: 4px solid var(--danger); }
.toast-item.info { border-left: 4px solid var(--accent); }

/* Navigation Active State */
.nav-link-active {
  color: var(--accent) !important;
  font-weight: 600;
  position: relative;
}

.nav-link-active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--accent);
  border-radius: 2px;
}

.sidebar-link-active {
  background-color: #F1F5F9;
  color: var(--primary);
  font-weight: 600;
  border-left: 3px solid var(--accent);
}

/* Timeline component */
.timeline-container {
  position: relative;
  padding-left: 1.75rem;
}

.timeline-container::before {
  content: '';
  position: absolute;
  left: 0.4375rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 2px;
  background-color: #E2E8F0;
}

.timeline-dot {
  position: absolute;
  left: 0;
  top: 0.4rem;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background-color: var(--accent);
  border: 3px solid var(--surface);
  box-shadow: 0 0 0 2px var(--accent-light);
}

/* Lightbox Modal */
.lightbox-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.92);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.lightbox-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 0.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* ==========================================================================
   GLOBAL LIGHT MODE STYLES & OVERRIDES (DEFAULT THEME)
   ========================================================================== */
html.light-mode {
  color-scheme: light;
}

html.light-mode body {
  background-color: #F8FAFC !important;
  color: #0F172A !important;
}

html.light-mode .bg-slate-950,
html.light-mode .bg-slate-900 {
  background-color: #FFFFFF !important;
  color: #0F172A !important;
}

html.light-mode .bg-slate-800 {
  background-color: #F1F5F9 !important;
  color: #0F172A !important;
}

html.light-mode .hover\:bg-slate-700:hover,
html.light-mode .hover\:bg-slate-800:hover {
  background-color: #F1F5F9 !important;
}

html.light-mode .border-slate-800,
html.light-mode .border-slate-700,
html.light-mode .border-slate-900 {
  border-color: #E2E8F0 !important;
}

html.light-mode .text-white {
  color: #0F172A !important;
}

html.light-mode .text-slate-100,
html.light-mode .text-slate-200 {
  color: #0F172A !important;
}

html.light-mode a.bg-pink-500,
html.light-mode a.bg-blue-600,
html.light-mode .bg-pink-500.text-white,
html.light-mode .bg-blue-600.text-white {
  color: #ffffff !important;
}

html.light-mode .text-slate-300,
html.light-mode .text-slate-400 {
  color: #334155 !important;
}

html.light-mode .text-slate-500 {
  color: #64748B !important;
}

html.light-mode .bg-slate-900\/90,
html.light-mode .bg-slate-950\/90,
html.light-mode .bg-slate-950\/80,
html.light-mode .bg-slate-900\/80,
html.light-mode .bg-slate-900\/60 {
  background-color: rgba(255, 255, 255, 0.95) !important;
}

html.light-mode input,
html.light-mode select,
html.light-mode textarea {
  background-color: #F8FAFC !important;
  color: #0F172A !important;
  border-color: #CBD5E1 !important;
}

html.light-mode header {
  background-color: rgba(255, 255, 255, 0.96) !important;
  border-bottom-color: #E2E8F0 !important;
  box-shadow: 0 4px 20px -5px rgba(0, 0, 0, 0.05);
}

html.light-mode footer {
  background-color: #F1F5F9 !important;
  border-top-color: #E2E8F0 !important;
  color: #475569 !important;
}

html.light-mode .theme-toggle-btn {
  background-color: #F1F5F9 !important;
  border-color: #CBD5E1 !important;
  color: #0F172A !important;
}

/* NAVBAR & ACTIVE MENU LINKS IN LIGHT MODE */
html.light-mode nav a {
  color: #334155;
}

html.light-mode nav a.text-amber-400,
html.light-mode nav a.text-amber-300,
html.light-mode nav a.text-pink-400,
html.light-mode nav a.text-blue-400,
html.light-mode nav a.text-emerald-400,
html.light-mode .text-amber-400,
html.light-mode .text-amber-300 {
  color: #B45309 !important; /* Rich Dark Amber Gold for 100% readability */
  font-weight: 700 !important;
}

html.light-mode nav a.border-amber-400,
html.light-mode nav a.border-amber-300,
html.light-mode nav a.border-pink-400,
html.light-mode nav a.border-blue-400,
html.light-mode nav a.border-emerald-400 {
  border-color: #D97706 !important;
}

html.light-mode nav a:hover,
html.light-mode .hover\:text-white:hover {
  color: #0F172A !important;
}

/* Tombol Alumni di header/menu saja, bukan kartu beranda */
html.light-mode header a[href*="alumni"],
html.light-mode nav a[href*="alumni"] {
  background-color: #FEF3C7 !important;
  color: #92400E !important;
  border-color: #FCD34D !important;
}

html.light-mode header a[href*="alumni"]:hover,
html.light-mode nav a[href*="alumni"]:hover {
  background-color: #F59E0B !important;
  color: #FFFFFF !important;
}

/* TOPBAR IN LIGHT MODE */
html.light-mode .sticky.top-0 {
  background-color: #F1F5F9 !important;
  border-bottom-color: #CBD5E1 !important;
  color: #1E293B !important;
}

/* BADGES & PILLS IN LIGHT MODE */
html.light-mode .bg-amber-500\/20,
html.light-mode .bg-amber-500\/10 {
  background-color: #FEF3C7 !important;
  color: #92400E !important;
  border-color: #FCD34D !important;
}

html.light-mode .bg-pink-500\/20,
html.light-mode .bg-pink-500\/10 {
  background-color: #FCE7F3 !important;
  color: #9D174D !important;
  border-color: #FBCFE8 !important;
}

html.light-mode .bg-blue-500\/20,
html.light-mode .bg-blue-500\/10 {
  background-color: #DBEAFE !important;
  color: #1E40AF !important;
  border-color: #BFDBFE !important;
}

html.light-mode .bg-emerald-500\/20,
html.light-mode .bg-emerald-500\/10 {
  background-color: #D1FAE5 !important;
  color: #065F46 !important;
  border-color: #A7F3D0 !important;
}

/* Dark slate gradients (unit heroes, overlays) must not stay navy in light mode */
html.light-mode [class*="bg-gradient-to"][class*="from-slate-950"],
html.light-mode [class*="bg-gradient-to"][class*="from-slate-900"],
html.light-mode [class*="bg-gradient-to"][class*="via-slate-950"],
html.light-mode [class*="bg-gradient-to"][class*="via-slate-900"] {
  background-image: none !important;
  background-color: #FFFFFF !important;
}

html.light-mode .carousel-slide .bg-gradient-to-r {
  background: linear-gradient(to right, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.85) 60%, rgba(255, 255, 255, 0.3) 100%) !important;
}

html.light-mode .bg-gradient-to-t.from-slate-950,
html.light-mode .bg-gradient-to-t[class*="from-slate-950"] {
  background-image: linear-gradient(to top, rgba(248, 250, 252, 0.55), transparent) !important;
  background-color: transparent !important;
}

html.light-mode .bg-indigo-500\/20,
html.light-mode .bg-indigo-500\/10 {
  background-color: #E0E7FF !important;
  color: #3730A3 !important;
  border-color: #C7D2FE !important;
}

html.light-mode .text-pink-400,
html.light-mode .text-pink-300 {
  color: #9D174D !important;
}

html.light-mode .text-blue-400,
html.light-mode .text-blue-300 {
  color: #1E40AF !important;
}

html.light-mode .text-emerald-400,
html.light-mode .text-emerald-300 {
  color: #047857 !important;
}

.cms-body p + p {
  margin-top: 0.85rem;
}

.cms-body ul {
  list-style: disc;
  padding-left: 1.25rem;
  margin: 0.75rem 0;
}

.cms-body a {
  color: #fbbf24;
  text-decoration: underline;
}

html.light-mode .cms-body a {
  color: #b45309;
}

html.light-mode .file\:bg-amber-500 {
  color: #0f172a;
}

