@import 'variables.css';

/* =============================================
   BASE RESET & TYPOGRAPHY
   ============================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family-base);
  background-color: var(--color-bg);
  color: var(--color-text-main);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-heading);
  color: var(--color-primary-dark);
  line-height: 1.3;
  font-weight: 700;
}

h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }

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

img { max-width: 100%; height: auto; display: block; }

/* =============================================
   UTILITY CLASSES
   ============================================= */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.text-center { text-align: center; }
.text-muted { color: var(--color-text-muted); }

.section {
  padding: 70px 0;
}
.section-sm { padding: 40px 0; }

.section-header {
  text-align: center;
  margin-bottom: 50px;
}
.section-header h2 { margin-bottom: 12px; }
.section-header p {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
}

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--border-radius-pill);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.badge-accent { background: var(--color-accent-light); color: var(--color-accent-dark); }
.badge-primary { background: var(--color-primary-light); color: var(--color-primary); }
.badge-success { background: #dcfce7; color: var(--color-success); }

/* =============================================
   BUTTONS
   ============================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: var(--border-radius-pill);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
  text-decoration: none;
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(26, 111, 168, 0.30);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(26, 111, 168, 0.40);
  color: #fff;
}

.btn-accent {
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(245, 130, 10, 0.30);
}
.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 130, 10, 0.40);
  color: #fff;
}

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

.btn-white {
  background: #fff;
  color: var(--color-primary);
  border-color: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.btn-white:hover {
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
}

.btn-sm {
  padding: 8px 18px;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 15px 35px;
  font-size: 1.05rem;
}

/* =============================================
   CARDS
   ============================================= */
.card {
  background: var(--color-surface);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-body { padding: 24px; }

/* =============================================
   PROGRESS BAR
   ============================================= */
.progress {
  background: #e9ecef;
  border-radius: 10px;
  height: 8px;
  overflow: hidden;
  margin: 10px 0;
}

.progress-bar {
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-dark));
  height: 100%;
  border-radius: 10px;
  transition: width 1s ease;
}

/* =============================================
   NAVBAR — DESKTOP & MOBILE
   ============================================= */
.navbar {
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 0 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-xs);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 1100;
  height: 68px;
}

.navbar-brand a {
  font-family: var(--font-family-heading);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: -0.5px;
}
.navbar-brand a span { color: var(--color-accent); }

.navbar-menu {
  display: flex;
  gap: 4px;
  list-style: none;
  align-items: center;
}

.navbar-menu > li > a {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  color: var(--color-text-main);
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: var(--border-radius-sm);
  transition: var(--transition);
}
.navbar-menu > li > a:hover,
.navbar-menu > li > a.active {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

/* Dropdown */
.dropdown-nav { position: relative; }
.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: #fff;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  padding: 8px;
  z-index: 200;
  border: 1px solid var(--color-border);
  list-style: none;
}
.dropdown-nav:hover .dropdown-menu { display: block; }
.dropdown-menu li a {
  display: block;
  padding: 10px 16px;
  color: var(--color-text-main);
  border-radius: var(--border-radius-sm);
  font-size: 0.92rem;
  transition: var(--transition);
}
.dropdown-menu li a:hover {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.navbar-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Hamburger Toggle */
.navbar-toggler {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--border-radius-sm);
  color: var(--color-text-main);
  font-size: 1.4rem;
  transition: var(--transition);
}
.navbar-toggler:hover { background: var(--color-primary-light); color: var(--color-primary); }

/* =============================================
   HERO SECTION
   ============================================= */
.hero-section {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, #1a6fa8 60%, #0a8f8a 100%);
  color: white;
  padding: 90px 5% 120px;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: rgba(255,255,255,0.04);
  border-radius: 50%;
}

.hero-section::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: rgba(255,255,255,0.03);
  border-radius: 50%;
}

.hero-content {
  max-width: 700px;
  position: relative;
  z-index: 2;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  padding: 6px 16px;
  border-radius: var(--border-radius-pill);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 20px;
  backdrop-filter: blur(5px);
}

.hero-content h1 {
  color: #fff;
  font-size: clamp(2rem, 5vw, 3.2rem);
  margin-bottom: 18px;
  line-height: 1.2;
}

.hero-content p {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 32px;
  max-width: 550px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* =============================================
   STATISTICS STRIP
   ============================================= */
.stats-strip {
  background: #fff;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-xl);
  padding: 32px 40px;
  margin-top: -50px;
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  text-align: center;
}

.stat-item {
  padding: 10px;
  border-right: 1px solid var(--color-border);
}
.stat-item:last-child { border-right: none; }
.stat-item .number {
  font-family: var(--font-family-heading);
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1;
  margin-bottom: 6px;
}
.stat-item .label {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

/* =============================================
   PROGRAM CARDS
   ============================================= */
.program-card {
  background: var(--color-surface);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}
.program-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.program-card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: linear-gradient(135deg, #e2e8f0, #cbd5e0);
}
.program-card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.program-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 10px 0 8px;
  color: var(--color-primary-dark);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.program-card-meta {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  display: flex;
  gap: 15px;
  margin-bottom: 14px;
}
.program-card-footer { margin-top: auto; }

/* Grid layouts */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  background: linear-gradient(180deg, var(--color-primary-dark) 0%, #071e33 100%);
  color: #fff;
  padding: 64px 5% 24px;
  margin-top: 80px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 50px;
  max-width: 1200px;
  margin: 0 auto 48px;
}

.footer-brand h3 {
  color: #fff;
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 14px;
}
.footer-brand p {
  color: #94a3b8;
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 20px;
}
.footer-social {
  display: flex;
  gap: 12px;
}
.footer-social a {
  width: 38px;
  height: 38px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #cbd5e1;
  font-size: 0.9rem;
  transition: var(--transition);
  border: 1px solid rgba(255,255,255,0.1);
}
.footer-social a:hover {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
  transform: translateY(-2px);
}

.footer-heading {
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 18px;
  font-family: var(--font-family-heading);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: #94a3b8;
  font-size: 0.9rem;
  transition: var(--transition);
}
.footer-links a:hover { color: #fff; padding-left: 4px; }

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: #94a3b8;
  font-size: 0.9rem;
  margin-bottom: 12px;
}
.footer-contact-item i { margin-top: 3px; color: var(--color-accent); width: 14px; }

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #64748b;
  font-size: 0.88rem;
  flex-wrap: wrap;
  gap: 10px;
}

/* =============================================
   MODAL (Login / Register)
   ============================================= */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  z-index: 3000;
  justify-content: center;
  align-items: center;
  padding: 20px;
}
.modal-overlay.active { display: flex; }

.modal-box {
  background: #fff;
  border-radius: var(--border-radius-lg);
  width: 100%;
  max-width: 460px;
  padding: 40px;
  position: relative;
  animation: modalIn 0.3s ease;
  box-shadow: var(--shadow-xl);
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--color-text-muted);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--transition);
}
.modal-close:hover { background: var(--color-bg); color: var(--color-text-main); }

.modal-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 6px;
  color: var(--color-primary-dark);
}
.modal-subtitle {
  color: var(--color-text-muted);
  font-size: 0.92rem;
  margin-bottom: 28px;
}

/* Form Inputs inside modals */
.form-floating {
  position: relative;
  margin-bottom: 18px;
}
.form-input {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--border-radius);
  font-size: 0.95rem;
  font-family: inherit;
  transition: var(--transition);
  background: #f8fafc;
  color: var(--color-text-main);
}
.form-input:focus {
  outline: none;
  border-color: var(--color-primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(26,111,168,0.1);
}
.form-input::placeholder { color: #a0aec0; }
.form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-text-main);
  margin-bottom: 6px;
}

/* =============================================
   FLASH MESSAGES
   ============================================= */
.flash-message {
  padding: 14px 20px;
  border-radius: var(--border-radius);
  margin-bottom: 20px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: flashIn 0.4s ease;
  font-size: 0.9rem;
}
@keyframes flashIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.flash-success { background: #dcfce7; color: #15803d; border-left: 4px solid #16a34a; }
.flash-error { background: #fee2e2; color: #b91c1c; border-left: 4px solid #dc2626; }
.flash-info { background: #e0f2fe; color: #0369a1; border-left: 4px solid #0284c7; }

/* =============================================
   RESPONSIVE — MOBILE FIRST
   ============================================= */

/* Tablet */
@media (max-width: 992px) {
  .stats-strip {
    grid-template-columns: repeat(2, 1fr);
    margin: -30px 24px 0;
    padding: 24px;
  }
  .stat-item:nth-child(2) { border-right: none; }
  .stat-item { border-right: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); padding-bottom: 16px; }
  .stat-item:nth-child(3), .stat-item:nth-child(4) { border-bottom: none; }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

/* Mobile */
@media (max-width: 768px) {
  /* Navbar mobile */
  .navbar-toggler { display: flex; }
  .navbar-menu {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    padding: 12px 16px;
    box-shadow: var(--shadow-lg);
    gap: 2px;
  }
  .navbar-menu.open { display: flex; }
  .navbar-menu > li > a { padding: 12px 16px; border-radius: var(--border-radius); }
  .dropdown-nav:hover .dropdown-menu { display: none; }
  .dropdown-nav.open .dropdown-menu {
    display: block;
    position: static;
    box-shadow: none;
    border: none;
    background: var(--color-bg);
    margin-top: 4px;
    border-radius: var(--border-radius);
  }

  .navbar-actions .btn-outline { display: none; }
  .navbar {
    position: sticky;
    top: 0;
    flex-wrap: wrap;
    height: auto;
    padding: 14px 5%;
  }

  .hero-section { padding: 60px 5% 90px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }

  .stats-strip {
    grid-template-columns: repeat(2, 1fr);
    margin: -30px 16px 0;
    padding: 20px 16px;
  }

  .section { padding: 50px 0; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .footer-bottom { flex-direction: column; text-align: center; }

  .modal-box { padding: 28px 22px; }
}

@media (max-width: 480px) {
  .stats-strip { grid-template-columns: 1fr 1fr; gap: 16px; padding: 16px; }
  .stat-item .number { font-size: 1.5rem; }
  .btn-lg { padding: 13px 28px; font-size: 1rem; }
}

/* =============================================
   FLOATING WHATSAPP BUTTON
   ============================================= */
#whatsapp-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: #25D366;
  color: #fff;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  box-shadow: 0 4px 16px rgba(37,211,102,0.4);
  z-index: 9999;
  text-decoration: none;
  transition: var(--transition);
}
#whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(37,211,102,0.5);
  color: #fff;
}

/* =============================================
   PAGE — INNER PAGES (Berita, Program, dll)
   ============================================= */
.page-hero {
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
  color: #fff;
  padding: 48px 5% 60px;
}
.page-hero h1 { color: #fff; margin-bottom: 8px; }
.page-hero p { color: rgba(255,255,255,0.8); }

.breadcrumb {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.65);
  margin-bottom: 14px;
}
.breadcrumb a { color: rgba(255,255,255,0.75); }
.breadcrumb a:hover { color: #fff; }
.breadcrumb span { opacity: 0.5; }

/* =============================================
   SIDEBAR OVERLAY (mobile navbar)
   ============================================= */
.navbar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 1099;
}
.navbar-backdrop.show { display: block; }
