/* Import Font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* CSS Variables */
:root {
  --primary-color: #3b82f6;
  --primary-dark: #1d4ed8;
  --primary-light: #dbeafe;
  --secondary-color: #64748b;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --error-color: #ef4444;
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --border-color: #e2e8f0;
  --border-radius: 16px;
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-secondary);
  overflow-x: hidden;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  font-weight: 700;
  color: var(--primary-color);
  white-space: nowrap;
}

.logo i {
  font-size: clamp(1.5rem, 3vw, 2rem);
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav {
  display: flex;
  gap: clamp(1rem, 2vw, 2rem);
}

.nav-link {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: var(--transition);
  position: relative;
  font-size: clamp(0.9rem, 1.2vw, 1rem);
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-color);
  background: var(--primary-light);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 70%;
  height: 2px;
  background: var(--primary-color);
}

/* Hero Section */
.hero {
  padding: clamp(100px, 12vw, 120px) 0 clamp(80px, 10vw, 100px);
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 400px;
  background: radial-gradient(circle at 20% 80%, rgba(59, 130, 246, 0.1) 0%, transparent 50%);
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  hyphens: auto;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary-color), #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 1.8vw, 1.25rem);
  color: var(--text-secondary);
  margin-bottom: 3rem;
  max-width: 500px;
  line-height: 1.7;
}

.hero-stats {
  display: flex;
  gap: clamp(1.5rem, 3vw, 3rem);
  margin-bottom: 3rem;
  flex-wrap: wrap;
  justify-content: center;
}

.stat {
  text-align: center;
  min-width: 80px;
}

.stat-number {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--primary-color);
  line-height: 1;
}

.stat-label {
  color: var(--text-muted);
  font-size: clamp(0.85rem, 1.2vw, 0.95rem);
  margin-top: 0.25rem;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  border: none;
  border-radius: var(--border-radius);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  font-size: clamp(0.95rem, 1.2vw, 1rem);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn-large {
  padding: 1.25rem 2.5rem;
  font-size: clamp(1rem, 1.3vw, 1.1rem);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  box-shadow: var(--shadow-lg);
}

.btn-primary:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.btn-secondary {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-light);
}

.btn-secondary:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

/* Calculator Mockup */
.hero-image {
  display: flex;
  justify-content: center;
}

.calculator-mockup {
  width: clamp(280px, 30vw, 320px);
  height: clamp(440px, 48vw, 500px);
  background: white;
  border-radius: 32px;
  box-shadow: var(--shadow-xl);
  position: relative;
  padding: clamp(1.5rem, 3vw, 2rem);
  transform: perspective(1000px) rotateX(5deg);
}

.screen {
  background: linear-gradient(145deg, #1e293b, #334155);
  border-radius: 20px;
  padding: clamp(1.5rem, 3vw, 2rem);
  height: clamp(240px, 28vw, 280px);
  display: flex;
  flex-direction: column;
  color: white;
}

.screen-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: clamp(0.85rem, 1.5vw, 0.95rem);
  font-weight: 500;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.screen-result {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-size: clamp(2rem, 4vw, 2.5rem);
  flex-wrap: wrap;
}

.currency {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  opacity: 0.8;
}

.amount {
  background: linear-gradient(135deg, #10b981, #34d399);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  flex-shrink: 0;
}

.unit {
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  opacity: 0.8;
  margin-left: auto;
}

.buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.btn-group {
  display: flex;
  gap: 0.75rem;
}

.btn-small {
  width: clamp(50px, 8vw, 60px);
  height: clamp(50px, 8vw, 60px);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: clamp(0.8rem, 1.5vw, 1rem);
  justify-content: center;
}

/* tombol login di navbar */
.nav-login {
  width: auto !important;
  height: auto !important;
  padding: 0.5rem 0.9rem;
  border-radius: 10px;
  gap: 0.6rem;
}

.nav-login span {
  display: inline;
}


.btn-small.primary {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}

/* Section Headers */
.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header h2 {
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.section-header p {
  font-size: clamp(1.1rem, 1.5vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* Calculator Section */
.calculator-section {
  padding: clamp(80px, 10vw, 100px) 0;
  background: var(--bg-primary);
}

.calculator-container {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: clamp(2rem, 4vw, 4rem);
  margin-top: 4rem;
}

.calculator-card,
.result-card {
  background: var(--bg-primary);
  border-radius: var(--border-radius);
  padding: clamp(2rem, 4vw, 2.5rem);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  height: fit-content;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.card-header i {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  color: var(--primary-color);
  width: clamp(24px, 3vw, 32px);
}

.card-header h3 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 600;
}

.calculator-form {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.form-group {
  position: relative;
}

.form-group label {
  display: block;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  font-size: clamp(0.9rem, 1.2vw, 0.95rem);
}

.form-group input {
  width: 100%;
  padding: 1rem 1rem 1rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  font-size: 1rem;
  background: var(--bg-secondary);
  transition: var(--transition);
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgb(59 130 246 / 0.1);
  transform: translateY(-1px);
}


.rincian-section { 
  padding: clamp(100px, 10vw, 110px) 0;
  background: var(--bg-secondary);
  min-height: 100vh;
}

/* Login Page */
.login-section {
  padding: clamp(80px, 10vw, 100px) 0;
  background: var(--bg-primary);
}

.login-card {
  max-width: 520px;
  margin: 0 auto;
}

.login-subtitle {
  margin-bottom: 18px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.login-provider {
  margin-top: 8px;
}

.login-actions {
  margin-top: 18px;
}

.login-back {
  width: 100%;
  justify-content: center;
}

.login-debug {
  margin-top: 16px;
  background: #f1f5f9;
  padding: 12px;
  border-radius: 12px;
  overflow: auto;
  color: var(--text-secondary);
  font-size: 0.9rem;
} 


/* Override global section-header agar konsisten dengan page rincian */
.rincian-section .section-header {
  margin-bottom: 2.5rem;
  text-align: center;
  padding-top: 20px;
}

.rincian-section .section-header .back-btn {
  position: absolute;
  left: 20px;
  top: 0;
  margin: 0;
  text-align: left;
}

.rincian-section .section-header {
  position: relative;
}



.rincian-section .section-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}


.rincian-section .section-header h2 {
  text-align: left;
  margin: 0;
}


.back-btn {
  position: sticky;
  top: 90px;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0.75rem 1rem;
  width: fit-content;
}

@media (max-width: 768px) {
  .back-btn {
    position: relative;
    top: auto;
    left: auto;
    margin: 16px 0 0;
  }
}

.cost-section {
  background: var(--bg-tertiary);
  padding: 1.5rem;
  border-radius: 12px;
  border-left: 4px solid var(--primary-color);
  margin-bottom: 18px;
}

.rincian-section .calculator-card .cost-section:last-child {
  margin-bottom: 0;
}


.cost-section h4 {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  font-size: clamp(1rem, 1.3vw, 1.1rem);
  font-weight: 600;
  color: var(--primary-color);
}

/* Result Card */
.result-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  background: var(--bg-secondary);
  border-radius: 12px;
  flex-wrap: wrap;
  gap: 1rem;
}

.result-item.highlight {
  background: linear-gradient(135deg, var(--primary-light) 0%, #eff6ff 100%);
  border: 2px solid var(--primary-color);
  transform: scale(1.02);
}

.result-label {
  font-weight: 500;
  color: var(--text-secondary);
  flex: 1;
  min-width: 120px;
}

.result-value {
  font-size: clamp(1.5rem, 2.5vw, 1.75rem);
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}

.result-value.primary {
  color: var(--primary-color);
  font-size: clamp(1.75rem, 3vw, 2rem);
}

.result-breakdown h4 {
  margin-bottom: 1.5rem;
  color: var(--text-primary);
  font-size: clamp(1.1rem, 1.5vw, 1.25rem);
}

.breakdown-bars {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  background: var(--bg-secondary);
  border-radius: 8px;
  flex-wrap: wrap;
}

.bar-label {
  min-width: 100px;
  font-weight: 500;
  flex: 1;
  min-width: 80px;
}

.bar-fill {
  flex: 1;
  min-width: 150px;
  height: 8px;
  background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
  border-radius: 4px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.bar-value {
  min-width: 70px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: right;
  font-size: 0.95rem;
}

/* Features Section */
.features-section {
  padding: clamp(80px, 12vw, 120px) 0;
  background: var(--bg-gradient);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 4rem;
}

.feature-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  padding: clamp(2rem, 4vw, 2.5rem) 2rem;
  border-radius: var(--border-radius);
  text-align: center;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-12px);
  box-shadow: var(--shadow-xl);
}

.feature-icon {
  width: clamp(64px, 10vw, 80px);
  height: clamp(64px, 10vw, 80px);
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: white;
  box-shadow: var(--shadow-lg);
}

.feature-card h3 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.feature-card p {
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: clamp(0.95rem, 1.3vw, 1rem);
}

/* CTA Section */
.cta-section {
  padding: clamp(80px, 10vw, 100px) 0;
  background: var(--primary-color);
  color: white;
}

.cta-content {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.cta-content h2 {
  font-size: clamp(2.25rem, 5vw, 2.75rem);
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.cta-content p {
  font-size: clamp(1.1rem, 1.5vw, 1.25rem);
  margin-bottom: 2.5rem;
  opacity: 0.95;
  line-height: 1.7;
}

/* Footer */
.footer {
  background: var(--text-primary);
  color: white;
  padding: clamp(3rem, 8vw, 4rem) 0 1.5rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 2rem;
}

.footer-brand .logo {
  margin-bottom: 1rem;
}

.footer-brand p {
  opacity: 0.8;
  line-height: 1.7;
  font-size: clamp(0.9rem, 1.2vw, 1rem);
}

.footer-links h4,
.footer-contact h4 {
  margin-bottom: 1.5rem;
  font-weight: 600;
  font-size: clamp(1rem, 1.5vw, 1.125rem);
}

.footer-links a,
.footer-contact p {
  display: block;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  margin-bottom: 0.75rem;
  transition: var(--transition);
  font-size: clamp(0.9rem, 1.2vw, 0.95rem);
  line-height: 1.6;
  hyphens: auto;
}

.footer-links a:hover {
  color: var(--primary-color);
}

.footer-contact i {
  width: 20px;
  margin-right: 0.75rem;
  opacity: 0.8;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: clamp(0.85rem, 1.1vw, 0.9rem);
}

/* Enhanced Responsive Design */
@media (max-width: 1024px) {
  .container {
    padding: 0 clamp(1rem, 2vw, 1.5rem);
  }
  
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3rem;
  }
  
  .calculator-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .hero-stats {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .header-content {
    padding: clamp(0.75rem, 2vw, 1rem);
  }
  
  .nav {
    display: none;
  }
  
  .hero {
    text-align: center;
  }
  
  .form-grid {
    grid-template-columns: 1fr;
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .calculator-card,
  .result-card {
    padding: clamp(1.5rem, 4vw, 2rem);
  }
  
  .result-item {
    flex-direction: column;
    text-align: center;
  }
  
  .result-label {
    min-width: auto;
    order: 2;
  }
  
  .result-value {
    order: 1;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }
  
  .calculator-mockup {
    width: 90vw;
    height: 50vh;
    padding: 1.25rem;
    margin: 0 auto;
  }
  
  .screen {
    padding: 1.25rem;
  }
  
  .btn-group {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .bar {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  
  .bar-fill {
    order: 2;
    margin: 0.5rem 0;
    min-width: auto;
  }
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.8s ease-out forwards;
}

/* Scroll Animations */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-left { animation: slideInLeft 0.8s ease-out; }
.animate-right { animation: slideInRight 0.8s ease-out; }

.detail-button-wrapper {
  margin: 25px 0 30px;
}
.detail-button-wrapper .btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  padding: 16px 20px;
  border-radius: 18px;
}

.result-breakdown h4 {
  margin-bottom: 25px;
}

.breakdown-bars {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.bar {
  padding: 22px;
  border-radius: 18px;
  background: #f5f7fb;
}

.bar-label {
  margin-bottom: 14px;
  font-weight: 600;
}

.bar-fill {
  margin-bottom: 16px;
}

.bar-value {
  margin-top: 10px;
  font-size: 1.1rem;
  font-weight: 700;
}

.currency-input {
  display: flex;
  align-items: center;
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  border-radius: 14px;
  overflow: hidden;
  transition: var(--transition);
}

.currency-input:focus-within {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgb(59 130 246 / 0.1);
}

.currency-prefix {
  padding: 0 18px;
  font-weight: 600;
  color: var(--text-muted);
  border-right: 2px solid var(--border-color);
  height: 100%;
  display: flex;
  align-items: center;
  font-size: 1rem;
}

.currency-input input {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  padding-left: 16px;
}

.currency-input input:focus {
  transform: none !important;
}

.input-unit {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-weight: 500;
  pointer-events: none;
  font-size: 0.95rem;
}