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

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

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

/* Header */
.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);
}

.site-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

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

/* Desktop Nav */
.desktop-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

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

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

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

.dropdown-toggle {
  cursor: pointer;
}

.dropdown-content {
  position: absolute;
  top: 100%;
  left: 0;
  background: #ffffff;
  min-width: 220px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  border-radius: 12px;
  margin-top: 8px;
  overflow: hidden;
  display: none;
  animation: fadeInDown 0.25s ease;
  z-index: 1001;
}

.dropdown.open .dropdown-content {
  display: block;
}

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

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

/* Mobile Nav */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 24px;
  cursor: pointer;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  padding: 8px 24px 16px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.mobile-menu.open {
  display: flex;
  animation: slideDown 0.2s ease-out;
}

.mobile-nav-link {
  color: #ffffff;
  text-decoration: none;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  font-weight: 500;
  font-size: 0.95rem;
}

.mobile-nav-link:last-child {
  border-bottom: none;
}

.mobile-nav-link:hover {
  color: #e5e7eb;
}

/* Hero / Page Header */
.page-header {
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 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: 2.9rem;
  font-weight: 900;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
  animation: slideInDown 0.6s ease;
}

.page-header p {
  font-size: 1.2rem;
  opacity: 0.95;
  position: relative;
  z-index: 1;
  animation: slideInUp 0.6s ease;
}

.hero-emoji {
  font-size: 64px;
  margin-bottom: 16px;
}

/* 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;
}

/* Cards */
.calculator-card {
  background: #ffffff;
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  animation: slideUp 0.6s ease;
}

.card-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: #1e40af;
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.card-title-sub {
  font-size: 1.25rem;
  margin-top: 32px;
  margin-bottom: 24px;
}

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

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

.input-wrapper {
  position: relative;
}

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

.input-field:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

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

.input-prefix {
  left: 20px;
}

.input-suffix {
  right: 20px;
}

.with-prefix {
  padding-left: 40px;
}

.with-suffix {
  padding-right: 50px;
}

/* Button */
.calculate-btn {
  width: 100%;
  padding: 18px 20px;
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}

.calculate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(30, 64, 175, 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, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.result-box {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  padding: 24px;
  border-radius: 16px;
  border-left: 4px solid #3b82f6;
  transition: all 0.3s ease;
}

.result-box:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.15);
}

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

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

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

.result-value {
  font-weight: 800;
  color: #1e40af;
  font-size: 2rem;
}

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

.result-small {
  font-size: 1.45rem;
}

.result-smaller {
  font-size: 1.35rem;
}

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

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

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

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

.pie-chart {
  width: 300px;
  height: 300px;
  margin: 0 auto;
}

.chart-legend {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 32px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.legend-color {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}

.legend-text {
  flex: 1;
  font-weight: 600;
  color: #4a5568;
}

.legend-value {
  font-weight: 700;
  color: #1e40af;
  font-size: 1rem;
}

/* Benefits */
.chart-benefits {
  margin-top: 32px;
}

.benefits-wrap {
  background: #f0fdf4;
  padding: 24px;
  border-radius: 12px;
  margin-top: 20px;
  display: grid;
  gap: 16px;
}

.benefit-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: #ffffff;
  border-radius: 8px;
}

.benefit-label {
  font-weight: 600;
  color: #2d3748;
}

.benefit-value {
  font-weight: 700;
  color: #10b981;
  font-size: 1.2rem;
}

.benefit-note {
  font-size: 0.95rem;
}

.benefit-waiver {
  display: none;
  padding: 12px;
  background: #ffffff;
  border-radius: 8px;
  border-left: 4px solid #10b981;
}

.benefit-waiver-title {
  font-weight: 700;
  color: #10b981;
  font-size: 1.1rem;
}

.benefit-waiver-text {
  margin-top: 8px;
  color: #4a5568;
}

.benefit-waiver-amount {
  font-weight: 700;
  color: #10b981;
}

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

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

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

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

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

.info-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(59, 130, 246, 0.2);
}

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

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

.benefit-badge {
  display: inline-block;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-top: 12px;
}

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

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

.blog-content h2 {
  font-size: 2.4rem;
  font-weight: 900;
  color: #1a202c;
  margin-bottom: 32px;
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.blog-content h3 {
  font-size: 1.7rem;
  font-weight: 700;
  color: #2d3748;
  margin-top: 40px;
  margin-bottom: 20px;
}

.blog-content p {
  color: #4a5568;
  font-size: 1rem;
  margin-bottom: 24px;
  line-height: 1.9;
}

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

.blog-content li {
  margin-bottom: 10px;
  line-height: 1.8;
}

.blog-content strong {
  color: #1e40af;
  font-weight: 700;
}

.blog-content a {
  color: #2563eb;
  text-decoration: none;
  border-bottom: 1px solid rgba(37, 99, 235, 0.4);
}

.blog-content a:hover {
  color: #1d4ed8;
  border-bottom-color: rgba(37, 99, 235, 0.8);
}

/* Highlight / Example Boxes */
.highlight-box {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  padding: 24px;
  border-radius: 12px;
  border-left: 4px solid #3b82f6;
  margin: 32px 0;
}

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

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

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

.faq-inner h2 {
  font-size: 1.9rem;
  font-weight: 800;
  color: #1a202c;
  margin-bottom: 24px;
}

.faq-item + .faq-item {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
}

.faq-item h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 6px;
}

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

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

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

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

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

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

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

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

/* Animations */
@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

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

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 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: block;
  }

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

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

  .calculator-card {
    padding: 24px;
  }

  .blog-content {
    padding: 32px 24px;
  }

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

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

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

  .faq-inner {
    padding: 28px 20px;
  }
}
