/* Global */
* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', sans-serif;
  background: linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%);
  min-height: 100%;
}

/* Prevent scroll with mobile menu open */
body.no-scroll {
  overflow: hidden;
}

/* Header / Nav */
.header {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(5, 150, 105, 0.15);
}

.main-logo {
  height: 36px;
  width: auto;
  border-radius: 9999px;
}

.brand-title {
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
}

/* Desktop nav */
.desktop-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.desktop-nav a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  display: inline-block;
}

.desktop-nav a:hover {
  color: #e5e7eb;
  transform: scale(1.05);
}

/* Dropdown */
.dropdown {
  position: relative;
}

.dropdown-toggle {
  background: none;
  border: none;
  color: #ffffff;
  font-weight: 500;
  cursor: pointer;
  font-size: 0.95rem;
  padding: 0;
}

.dropdown-content {
  position: absolute;
  top: 120%;
  right: 0;
  min-width: 220px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  margin-top: 4px;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.2s ease;
  z-index: 1010;
}

.dropdown-content a {
  color: #4a5568;
  padding: 12px 18px;
  text-decoration: none;
  display: block;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.dropdown-content a:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #ffffff;
  padding-left: 24px;
}

/* Dropdown open state (desktop JS adds .open) */
.dropdown.open .dropdown-content {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Mobile menu */
.mobile-menu-btn {
  display: none;
  background: none;
  border: 2px solid rgba(255, 255, 255, 0.65);
  color: #ffffff;
  font-size: 1.2rem;
  border-radius: 999px;
  padding: 4px 10px;
  cursor: pointer;
}

.mobile-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform-origin: top;
  transform: scaleY(0);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.2s ease, opacity 0.2s ease, visibility 0.2s ease;
  z-index: 1005;
}

.mobile-menu-inner {
  display: flex;
  flex-direction: column;
  padding: 12px 20px 16px;
}

.mobile-menu-inner a {
  color: #ecfdf5;
  text-decoration: none;
  padding: 10px 4px;
  font-size: 0.96rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-menu-inner a:last-child {
  border-bottom: none;
}

/* Open state */
.mobile-menu.open {
  transform: scaleY(1);
  opacity: 1;
  visibility: visible;
}

/* Overlay for mobile */
.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 900;
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Page Header */
.page-header {
  background: linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%);
  color: #ffffff;
  padding: 80px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120"><path d="M0,0 Q300,60 600,30 T1200,0 L1200,120 L0,120 Z" fill="rgba(255,255,255,0.05)"/></svg>')
    repeat-x bottom;
  background-size: 1200px 120px;
  opacity: 0.3;
}

.page-header h1 {
  font-size: 3rem;
  font-weight: 900;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.page-header p {
  font-size: 1.25rem;
  opacity: 0.95;
  position: relative;
  z-index: 1;
}

/* Float animation */
@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-18px);
  }
}

.float-animation {
  animation: float 3s ease-in-out infinite;
}

/* Calculator Layout */
.calculator-container {
  max-width: 1400px;
  margin: -60px auto 60px;
  padding: 0 20px;
  position: relative;
  z-index: 10;
}

.calculator-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.calculator-card {
  background: #ffffff;
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.card-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: #7c3aed;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Inputs */
.input-section {
  margin-bottom: 22px;
}

.input-label {
  display: block;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 8px;
  font-size: 0.94rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.input-wrapper {
  position: relative;
}

.input-field {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid #cbd5e0;
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.2s ease;
  font-weight: 600;
}

.input-field:focus {
  outline: none;
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

.input-prefix {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #4b5563;
  font-weight: 600;
  font-size: 1rem;
  pointer-events: none;
}

.input-field.with-prefix {
  padding-left: 38px;
}

/* Button */
.calculate-btn {
  width: 100%;
  padding: 18px;
  background: linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 26px;
}

.calculate-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(124, 58, 237, 0.4);
}

.calculate-btn:active {
  transform: scale(0.98);
}

/* Results */
.results-section {
  display: none;
}

.results-section.show {
  display: block;
}

.result-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

.result-box {
  background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
  padding: 22px;
  border-radius: 16px;
  border-left: 4px solid #7c3aed;
  transition: all 0.2s ease;
}

.result-box:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(124, 58, 237, 0.15);
}

.result-box-main {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%);
  border: none;
}

.result-box-main .result-label {
  color: rgba(255, 255, 255, 0.92);
}

.result-box-main .result-subtext {
  color: rgba(255, 255, 255, 0.85);
}

.result-label {
  font-weight: 600;
  color: #4a5568;
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.result-value {
  font-weight: 800;
  color: #7c3aed;
  font-size: 2.25rem;
}

.result-value.small {
  font-size: 1.9rem;
}

.result-box-main .result-value {
  color: #ffffff;
  font-size: 2.8rem;
}

.result-subtext {
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 4px;
}

/* Status badge */
.status-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.8rem;
  margin-top: 10px;
}

.status-excellent {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
}

.status-good {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: #ffffff;
}

.status-fair {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff;
}

.status-poor {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff;
}

/* Charts / Progress bars */
.chart-container {
  background: #ffffff;
  padding: 26px;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  margin-bottom: 22px;
}

.chart-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #2d3748;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.progress-bar-container {
  margin-bottom: 18px;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-weight: 600;
  color: #4a5568;
  font-size: 0.9rem;
}

.progress-bar {
  width: 100%;
  height: 28px;
  background: #e2e8f0;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%);
  border-radius: 18px;
  transition: width 0.9s ease;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 10px;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.8rem;
}

.progress-fill-warning {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.progress-fill-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

/* Debt items */
.debt-item {
  background: #f8fafc;
  padding: 15px 16px;
  border-radius: 12px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 2px solid #e2e8f0;
  transition: all 0.2s ease;
}

.debt-item:hover {
  border-color: #7c3aed;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.1);
}

.debt-item-label {
  font-weight: 600;
  color: #2d3748;
  font-size: 0.9rem;
}

.debt-item-value {
  font-weight: 700;
  color: #7c3aed;
  font-size: 1.05rem;
}

.debt-item-available {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border-color: #10b981;
}

.debt-item-available .available {
  color: #059669;
}

/* Recommendations */
.recommendation-card {
  background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
  padding: 20px;
  border-radius: 16px;
  margin-top: 20px;
  border-left: 4px solid #7c3aed;
}

.recommendation-card h4 {
  font-size: 1rem;
  font-weight: 700;
  color: #7c3aed;
  margin-bottom: 10px;
}

.recommendation-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.recommendation-card li {
  padding: 6px 0;
  color: #4a5568;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.9rem;
}

.recommendation-card li::before {
  content: '✓';
  color: #10b981;
  font-weight: 700;
  font-size: 1rem;
}

/* Download buttons */
.download-buttons {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.download-btn {
  flex: 1;
  padding: 14px 18px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.95rem;
}

.download-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Info cards */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 34px;
}

.info-card {
  background: #ffffff;
  padding: 24px;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.2s ease;
  border-left: 4px solid #7c3aed;
}

.info-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 26px rgba(124, 58, 237, 0.18);
}

.info-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #2d3748;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.info-card p {
  color: #4a5568;
  line-height: 1.7;
  font-size: 0.92rem;
}

.info-card a {
  color: #7c3aed;
  text-decoration: underline;
}

.info-badge {
  display: inline-block;
  background: linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%);
  color: #ffffff;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-top: 10px;
}

/* Blog / SEO section */
.blog-section {
  max-width: 900px;
  margin: 70px auto 60px;
  padding: 0 20px;
}

.blog-content {
  background: #ffffff;
  border-radius: 24px;
  padding: 40px 50px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  line-height: 1.8;
}

.blog-content h2 {
  font-size: 2.2rem;
  font-weight: 900;
  color: #1a202c;
  margin-bottom: 26px;
  background: linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.blog-content h3 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #2d3748;
  margin-top: 32px;
  margin-bottom: 16px;
}

.blog-content h4 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #4a5568;
  margin-top: 26px;
  margin-bottom: 14px;
}

.blog-content p {
  color: #4a5568;
  font-size: 0.98rem;
  margin-bottom: 18px;
}

.blog-content a {
  color: #7c3aed;
  text-decoration: underline;
}

.blog-content ul,
.blog-content ol {
  color: #4a5568;
  margin-left: 24px;
  margin-bottom: 18px;
}

.blog-content li {
  margin-bottom: 8px;
  line-height: 1.7;
}

.blog-content strong {
  color: #7c3aed;
  font-weight: 700;
}

.highlight-box {
  background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
  padding: 20px;
  border-radius: 12px;
  border-left: 4px solid #7c3aed;
  margin: 24px 0;
  font-size: 0.95rem;
}

.example-box {
  background: #f0fdf4;
  padding: 18px;
  border-radius: 12px;
  border-left: 4px solid #10b981;
  margin: 20px 0;
  font-size: 0.95rem;
}

/* Comparison table */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  font-size: 0.9rem;
}

.comparison-table th {
  background: linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%);
  color: #ffffff;
  padding: 12px 14px;
  text-align: left;
  font-weight: 700;
}

.comparison-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #e2e8f0;
}

.comparison-table tr:last-child td {
  border-bottom: none;
}

.comparison-table tr:hover {
  background: #f8fafc;
}

/* FAQ */
.faq-section {
  max-width: 900px;
  margin: 0 auto 70px;
  padding: 0 20px;
}

.faq-wrapper {
  background: #ffffff;
  border-radius: 24px;
  padding: 32px 26px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.faq-wrapper h2 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 20px;
  color: #1f2933;
}

.faq-item + .faq-item {
  margin-top: 16px;
}

.faq-item h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #2d3748;
  margin-bottom: 6px;
}

.faq-item p {
  font-size: 0.95rem;
  color: #4a5568;
  margin: 0;
}

.faq-item a {
  color: #7c3aed;
  text-decoration: underline;
}

/* Footer */
.footer {
  background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
  color: #ffffff;
  padding: 50px 0 18px;
  margin-top: 60px;
}

.footer-column h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: #a0aec0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.footer-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-column ul li {
  margin-bottom: 10px;
}

.footer-column ul li a {
  color: #cbd5e0;
  text-decoration: none;
  transition: all 0.2s ease;
  display: inline-block;
  font-size: 0.9rem;
}

.footer-column ul li a:hover {
  color: #14b8a6;
  transform: translateX(4px);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 26px;
  padding-top: 20px;
  text-align: center;
  color: #a0aec0;
  font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 1024px) {
  .calculator-grid {
    grid-template-columns: 1fr;
  }

  .result-summary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .desktop-nav {
    display: none;
  }

  .mobile-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .page-header {
    padding: 60px 16px;
  }

  .page-header h1 {
    font-size: 2.1rem;
  }

  .page-header p {
    font-size: 1rem;
  }

  .calculator-card {
    padding: 24px;
  }

  .blog-content {
    padding: 28px 20px;
  }

  .blog-content h2 {
    font-size: 1.8rem;
  }

  .blog-content h3 {
    font-size: 1.25rem;
  }

  .download-buttons {
    flex-direction: column;
  }

  .calculator-container {
    margin-top: -40px;
  }
}
