/**
 * Modern Design System - Public Apps (eKelulusan & eVote)
 * Light Mode Only - Clean, Elegant, Human-designed
 */

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

:root {
  --font-sans: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --bg-app: #F8FAFC;
  --bg-surface: #FFFFFF;
  --bg-subtle: #F1F5F9;
  --border-main: #E2E8F0;
  --border-subtle: #F1F5F9;
  
  --primary: #2563EB;
  --primary-hover: #1D4ED8;
  --primary-subtle: #EFF6FF;
  --primary-border: #BFDBFE;

  --text-main: #0F172A;
  --text-body: #334155;
  --text-muted: #64748B;
  --text-subtle: #94A3B8;

  --success: #059669;
  --danger: #DC2626;
  --warning: #D97706;

  --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 2px 4px -2px rgba(15, 23, 42, 0.03);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.05), 0 4px 6px -4px rgba(15, 23, 42, 0.03);
  --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.08);

  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-body);
  font-size: 0.9375rem; /* 15px, comfortable reading size */
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography Utility Classes */
.fs-7 {
  font-size: 0.875rem !important;
}

.fs-8 {
  font-size: 0.8125rem !important;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.15s ease-in-out;
}

a:hover {
  color: var(--primary-hover);
  text-decoration: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  color: var(--text-main);
  font-weight: 700;
  letter-spacing: -0.025em;
}

/* Header */
#header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-main);
  transition: all 0.3s;
  z-index: 997;
  padding: 14px 0;
  box-shadow: var(--shadow-sm);
}

#header.header-scrolled {
  padding: 10px 0;
  box-shadow: var(--shadow-md);
}

#header .logo {
  font-size: 1.25rem;
  margin: 0;
  padding: 0;
  font-weight: 700;
  letter-spacing: -0.02em;
}

#header .logo a {
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 10px;
}

#header .logo img {
  max-height: 36px;
}

/* Navbar */
.navbar ul {
  margin: 0;
  padding: 0;
  display: flex;
  list-style: none;
  align-items: center;
  gap: 4px;
}

.navbar a,
.navbar a:focus {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-body);
  white-space: nowrap;
  border-radius: var(--radius-md);
  transition: all 0.15s ease;
}

.navbar a i,
.navbar a:focus i {
  font-size: 12px;
  line-height: 0;
  margin-left: 5px;
}

.navbar a:hover,
.navbar .active,
.navbar .active:focus,
.navbar li:hover > a {
  color: var(--primary);
  background-color: var(--primary-subtle);
  font-weight: 600;
}

/* Mobile Nav Toggle */
.mobile-nav-toggle {
  color: var(--text-main);
  font-size: 24px;
  cursor: pointer;
  display: none;
  line-height: 0;
  transition: 0.3s;
}

@media (max-width: 991px) {
  .mobile-nav-toggle {
    display: block;
  }
  .navbar ul {
    display: none;
  }
}

.navbar-mobile {
  position: fixed;
  overflow: hidden;
  top: 0;
  right: 0;
  left: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.4);
  transition: 0.3s;
  z-index: 999;
}

.navbar-mobile .mobile-nav-toggle {
  position: absolute;
  top: 15px;
  right: 15px;
  color: #fff;
}

.navbar-mobile ul {
  display: block;
  position: absolute;
  top: 55px;
  right: 15px;
  bottom: 15px;
  left: 15px;
  padding: 20px;
  background-color: #fff;
  overflow-y: auto;
  transition: 0.3s;
  border-radius: var(--radius-lg);
}

/* Hero Section */
#hero {
  width: 100%;
  padding: 120px 0 60px 0;
  background: linear-gradient(180deg, #FFFFFF 0%, var(--bg-app) 100%);
  border-bottom: 1px solid var(--border-main);
}

#hero h1 {
  margin: 0 0 16px 0;
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-main);
  letter-spacing: -0.035em;
}

#hero h2 {
  color: var(--text-muted);
  margin-bottom: 28px;
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.6;
}

#hero .btn-get-started {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: var(--radius-md);
  transition: 0.2s;
  color: #fff;
  background: var(--primary);
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.25);
}

#hero .btn-get-started:hover {
  background: var(--primary-hover);
  color: #fff;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35);
  transform: translateY(-1px);
}

#hero .hero-img img {
  max-height: 380px;
  object-fit: contain;
}

/* Section Common */
section {
  padding: 60px 0;
  overflow: hidden;
}

.section-bg {
  background-color: var(--bg-surface);
}

.section-title {
  text-align: center;
  padding-bottom: 30px;
}

.section-title h2 {
  font-size: 1.875rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 12px;
  color: var(--text-main);
  position: relative;
  z-index: 2;
}

.section-title span {
  position: absolute;
  top: -20px;
  color: var(--bg-subtle);
  left: 0;
  right: 0;
  z-index: 1;
  font-weight: 800;
  font-size: 48px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  user-select: none;
}

.section-title p {
  margin-bottom: 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Team / Candidates Cards */
.team {
  background: var(--bg-app);
  padding: 60px 0;
}

.team .member {
  background: var(--bg-surface);
  border: 1px solid var(--border-main);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  text-align: center;
  transition: all 0.2s ease-in-out;
  padding: 24px;
}

.team .member:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-border);
}

.team .member .pic {
  overflow: hidden;
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
  background: var(--bg-subtle);
}

.team .member .pic img {
  transition: 0.3s;
  width: 100%;
  height: 240px;
  object-fit: cover;
}

.team .member h4 {
  font-weight: 700;
  margin-bottom: 4px;
  font-size: 1.125rem;
  color: var(--text-main);
}

.team .member span {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 10px;
}

.team .member p {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* Testimonials / Quotes */
.testimonials .testimonial-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-main);
  box-shadow: var(--shadow-sm);
  padding: 28px;
  border-radius: var(--radius-lg);
  margin: 15px;
}

.testimonials .testimonial-item p {
  font-style: italic;
  margin: 0;
  color: var(--text-body);
}

/* Cards & Modals for Public Portal */
.card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-main);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.modal-content {
  border: 1px solid var(--border-main);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
}

.modal-header {
  border-bottom: 1px solid var(--border-subtle);
  padding: 16px 20px;
}

.modal-footer {
  border-top: 1px solid var(--border-subtle);
  background-color: var(--bg-subtle);
  padding: 14px 20px;
}

.form-control, .form-select {
  border: 1px solid #CBD5E1;
  border-radius: var(--radius-md);
  padding: 9px 14px;
  font-size: 0.9375rem;
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  outline: none;
}

.btn {
  font-family: var(--font-sans);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 8px 18px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
}

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

/* Back to top */
.back-to-top {
  position: fixed;
  visibility: hidden;
  opacity: 0;
  right: 20px;
  bottom: 20px;
  z-index: 996;
  background: var(--primary);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  transition: all 0.2s;
}

.back-to-top i {
  font-size: 20px;
  color: #fff;
  line-height: 0;
}

.back-to-top:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
}

.back-to-top.active {
  visibility: visible;
  opacity: 1;
}