/* -------------------------------------------------------------
 * KitChuan - Modern Web App Style Sheets
 * Design: Premium, Mobile-First, Forest Green & Gold/Amber
 * ------------------------------------------------------------- */

/* 1. Core Variables & Design System */
:root {
  --font-main: 'Plus Jakarta Sans', sans-serif;
  
  /* Color Palette (Reverted to Gojek-like Emerald Green & Orange/Amber) */
  --primary: #0FA958;
  --primary-hover: #078241;
  --primary-light: #E8F7F0;
  
  --accent: #FF9F1C;
  --accent-hover: #E58E15;
  --accent-light: #FFF6E8;
  
  --danger: #EF4444;
  --danger-light: #FEE2E2;
  --success: #10B981;
  --success-light: #D1FAE5;
  
  --dark: #0F172A;
  --dark-soft: #334155;
  --muted: #64748B;
  --light: #F8FAFC;
  --border: #E2E8F0;
  --white: #FFFFFF;
  
  /* Shadow Systems */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 0 20px rgba(15, 169, 88, 0.15);
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 30px;
}

/* 2. Global Resets */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Accessibility: Support prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-delay: -1ms !important;
    animation-duration: -1ms !important;
    animation-iteration-count: 1 !important;
    background-attachment: initial !important;
    scroll-behavior: auto !important;
    transition-duration: 0s !important;
    transition-delay: 0s !important;
  }
}

body {
  font-family: var(--font-main);
  background-color: var(--light);
  color: var(--dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* 3. Accessibility Skip Link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--primary);
  color: var(--white);
  padding: 8px 16px;
  z-index: 1000;
  font-weight: 700;
  text-decoration: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  box-shadow: var(--shadow-md);
  transition: top 0.2s ease-in-out;
}

.skip-link:focus-visible {
  top: 0;
}

/* 4. Typography Utility */
h1, h2, h3, h4 {
  font-weight: 700;
  color: var(--dark);
  line-height: 1.3;
  text-wrap: balance; /* Prevents typographic widows */
}

.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.font-bold { font-weight: 700; }
.tabular-nums { font-variant-numeric: tabular-nums; } /* Tabular numbers for clean alignments */

/* 5. App Header */
.app-header {
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 16px 0;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-image {
  display: block;
  width: 32px;
  height: 32px;
  object-fit: contain;
  filter: hue-rotate(110deg) saturate(1.4) brightness(1.05); /* Rotates the logo gold color to match the emerald green theme */
}

.logo-text {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.logo-highlight {
  color: var(--primary); /* Highlight logo text with emerald green */
}

.badge-teaser {
  background-color: var(--primary-light);
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-xl);
}

/* 6. Hero Section */
.hero-section {
  padding: 48px 0 32px 0;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero-title {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 16px;
}

.hero-subtitle {
  font-size: 18px;
  color: var(--dark-soft);
  max-width: 650px;
  margin: 0 auto;
  font-weight: 500;
}

/* 7. Card Foundations */
.card {
  background-color: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 32px;
  transition: box-shadow 0.25s ease-in-out;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-title {
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
}

.card-title span.material-icons-round {
  color: var(--accent);
}

/* 8. Calculator Grid */
.calculator-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 40px;
}

/* Forms styling */
.form-group {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--dark-soft);
  margin-bottom: 8px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-prefix {
  position: absolute;
  left: 16px;
  font-weight: 700;
  color: var(--muted);
}

.form-control {
  width: 100%;
  padding: 16px 16px 16px 44px;
  font-size: 18px;
  font-weight: 700;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  font-family: var(--font-main);
  color: var(--dark);
  transition: border-color 0.25s, box-shadow 0.25s;
}

.form-control:focus-visible {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30, 77, 53, 0.15);
}

.form-hint {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
}

/* Sliders */
.label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.value-badge {
  background-color: var(--primary-light);
  color: var(--primary);
  padding: 4px 10px;
  font-weight: 700;
  font-size: 14px;
  border-radius: var(--radius-sm);
}

.range-wrapper {
  margin: 16px 0 8px 0;
}

.form-range {
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: var(--border);
  outline: none;
}

.form-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: 3px solid var(--white);
  box-shadow: var(--shadow-md);
  transition: transform 0.2s, background-color 0.2s;
}

.form-range::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  background: var(--accent-hover);
}

.form-range:focus-visible::-webkit-slider-thumb {
  transform: scale(1.1);
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

/* Presets Buttons */
.calculator-presets {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.preset-title {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

.preset-btn {
  background-color: var(--light);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-main);
  transition: border-color 0.2s, color 0.2s, background-color 0.2s;
}

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

.preset-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.preset-btn.active {
  background-color: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

/* Results Formatting */
.result-highlight-box {
  background: linear-gradient(135deg, var(--primary-light) 0%, rgba(232, 247, 240, 0.4) 100%);
  border: 1px dashed var(--primary);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  margin-bottom: 24px;
}

.result-label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.result-value {
  font-size: 38px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.2;
}

.result-label-sub {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
  font-weight: 500;
}

/* Output Table list */
.results-table {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.table-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--light);
}

.table-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--dark-soft);
}

.table-label span.material-icons-round {
  color: var(--muted);
  font-size: 20px;
}

.table-val {
  font-size: 16px;
  font-weight: 700;
}

.highlight-row {
  background-color: var(--light);
  border-radius: var(--radius-sm);
  border-bottom: none;
}

.cuan-row {
  background-color: var(--success-light);
  color: var(--success);
  border-radius: var(--radius-sm);
  border-bottom: none;
}

.cuan-row .table-label span.material-icons-round {
  color: var(--success);
}

/* 8. Visual Money Flow Section */
.flow-section {
  margin-bottom: 40px;
}

.section-desc {
  color: var(--muted);
  font-size: 15px;
  max-width: 600px;
  margin: -12px auto 32px auto;
}

.flow-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 32px;
  position: relative;
  gap: 16px;
}

.flow-step {
  flex: 1;
  text-align: center;
  background-color: var(--light);
  border-radius: var(--radius-md);
  padding: 20px 16px;
  border: 1px solid var(--border);
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.step-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.step-icon-wrapper.normal {
  background-color: #E0E7E2;
  color: var(--dark-soft);
}

.step-icon-wrapper.promo {
  background-color: rgba(192, 148, 64, 0.15);
  color: var(--accent);
}

.step-icon-wrapper.cut {
  background-color: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

.step-icon-wrapper.cuan {
  background-color: var(--success-light);
  color: var(--success);
}

.step-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--dark-soft);
  margin-bottom: 4px;
}

.step-value {
  font-size: 18px;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 8px;
}

.step-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.flow-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  color: var(--muted);
}

/* Alert Info Info */
.info-alert {
  display: flex;
  gap: 12px;
  background-color: #ECEFF1;
  border-left: 4px solid var(--muted);
  padding: 16px 20px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  align-items: flex-start;
}

.info-alert span.material-icons-round {
  color: var(--muted);
}

.alert-content {
  font-size: 14px;
  color: var(--dark-soft);
}

/* 9. Premium Call to Action (CTA) Section */
.cta-section {
  position: relative;
  background: linear-gradient(135deg, var(--dark) 0%, #1E293B 100%);
  color: var(--white);
  border: none;
  overflow: hidden;
  padding: 48px;
}

.cta-section .card-title {
  border-bottom: none;
  color: var(--white);
}

.cta-badge {
  position: absolute;
  top: 18px;
  right: 18px;
  background-color: var(--accent);
  color: var(--white);
  font-weight: 800;
  font-size: 11px;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.5px;
}

.cta-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
}

.cta-title {
  color: var(--white);
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
  line-height: 1.25;
}

.cta-desc {
  color: var(--border);
  font-size: 15px;
  margin-bottom: 24px;
  line-height: 1.6;
}

.cta-features {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
}

.feature-item span.material-icons-round {
  font-size: 20px;
}

.social-proof {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--border);
  background-color: rgba(255, 255, 255, 0.05);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  display: inline-flex;
}

/* Pricing Card Box */
.cta-pricing-box {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 32px 24px;
  text-align: center;
  backdrop-filter: blur(8px);
}

.pricing-label {
  display: block;
  font-size: 10px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 1.5px;
  margin-bottom: 8px;
}

.pricing-values {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 12px;
}

.price-original {
  font-size: 16px;
  text-decoration: line-through;
  color: var(--muted);
  font-weight: 600;
}

.price-discount {
  font-size: 32px;
  font-weight: 800;
  color: var(--white);
}

.pricing-note {
  font-size: 12px;
  color: var(--border);
  margin-bottom: 20px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-main);
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease-in-out, background-color 0.2s, box-shadow 0.2s;
}

.btn-primary {
  background-color: var(--accent);
  color: var(--white);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 16px -4px rgba(255, 159, 28, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 2px;
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn-lg {
  padding: 16px 24px;
  font-size: 16px;
}

.payment-badges {
  margin-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 16px;
}

.payment-badges span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 8px;
}

.badges-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
}

.pay-badge {
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--border);
  font-size: 10px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
}

/* 10. Footer Section */
.app-footer {
  background-color: var(--white);
  padding: 32px 0;
  border-top: 1px solid var(--border);
  margin-top: 60px;
}

.footer-content {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-note {
  font-size: 11px;
  max-width: 700px;
  margin: 0 auto;
}

/* 11. Responsive Layout breakpoints */
@media (max-width: 868px) {
  .calculator-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .flow-container {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  
  .flow-arrow {
    transform: rotate(90deg);
    margin: 4px 0;
  }
  
  .flow-step {
    min-height: auto;
    flex-direction: row;
    text-align: left;
    gap: 16px;
    align-items: center;
    padding: 16px;
  }
  
  .step-icon-wrapper {
    margin-bottom: 0;
    flex-shrink: 0;
  }
  
  .step-desc {
    display: none; /* Hide detailed desc on mobile to save vertical space */
  }

  .cta-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  
  .cta-section {
    padding: 32px 24px;
  }
}

@media (max-width: 576px) {
  .hero-title {
    font-size: 28px;
  }
  
  .hero-subtitle {
    font-size: 15px;
  }
  
  .card {
    padding: 20px;
  }
  
  .result-value {
    font-size: 28px;
  }
  
  .cta-title {
    font-size: 22px;
  }
}

/* 12. Tips & Edukasi Section Styles */
.edukasi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.edukasi-item-card {
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.25s ease;
}

.edukasi-item-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(15, 169, 88, 0.3);
}

.edukasi-img-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 Aspect Ratio */
  overflow: hidden;
  background-color: var(--light);
}

.edukasi-item-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.edukasi-item-card:hover .edukasi-item-img {
  transform: scale(1.05);
}

.edukasi-item-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.edukasi-item-date {
  font-size: 11px;
  color: var(--primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.edukasi-item-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.4;
  color: var(--dark);
}

.edukasi-item-desc {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 16px;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
}

.edukasi-item-footer {
  margin-top: auto;
}

.edukasi-item-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  transition: color 0.2s ease;
}

.edukasi-item-btn:hover {
  color: var(--primary-hover);
}

.edukasi-item-btn .material-icons-round {
  font-size: 16px;
  transition: transform 0.2s ease;
}

.edukasi-item-btn:hover .material-icons-round {
  transform: translateX(4px);
}

/* 13. Blogpost Modal Styles */
.blog-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.blog-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 23, 42, 0.6); /* Glassmorphism backing */
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: opacity 0.25s ease;
}

.blog-modal-container {
  position: relative;
  background-color: var(--white);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  animation: modalFadeIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalFadeIn {
  from {
    transform: scale(0.95);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.blog-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background-color: var(--light);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--dark-soft);
  transition: background-color 0.2s, color 0.2s;
  z-index: 10;
}

.blog-modal-close:hover {
  background-color: var(--border);
  color: var(--dark);
}

.blog-modal-content {
  padding: 40px;
}

@media (max-width: 576px) {
  .blog-modal-content {
    padding: 24px;
  }
}

.blog-modal-date {
  font-size: 11px;
  color: var(--primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: inline-block;
  margin-bottom: 12px;
}

.blog-modal-title {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 24px;
  color: var(--dark);
}

@media (max-width: 576px) {
  .blog-modal-title {
    font-size: 22px;
  }
}

.blog-modal-carousel-container {
  margin-bottom: 28px;
}

.blog-modal-body {
  font-size: 16px;
  line-height: 1.7;
  color: var(--dark-soft);
}

.blog-modal-body p {
  margin-bottom: 20px;
}


