@view-transition {
  navigation: auto;
}

* {
  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, #f5f7fa 0%, #c3cfe2 100%);
}

/* Header styles */
.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-nav-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

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

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

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

.dropdown-toggle {
  cursor: pointer;
}

.dropdown-content {
  display: none;
  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;
  animation: fadeInDown 0.3s 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: 14px;
}

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

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

/* Mobile Nav Overlay */
.mobile-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 900;
}

.mobile-nav-overlay.active {
  display: block;
}

.mobile-nav-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  margin-top: 64px; /* approx header height */
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  padding: 16px 24px 24px;
  transform: translateY(-100%);
  transition: transform 0.3s ease;
}

.mobile-nav-overlay.active .mobile-nav-panel {
  transform: translateY(0);
}

.mobile-nav-links a {
  display: block;
  color: #ffffff;
  text-decoration: none;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 15px;
}

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

.mobile-nav-links a:hover {
  opacity: 0.9;
}

.mobile-nav-label {
  display: block;
  color: #bbf7d0;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 10px 0 4px;
}

/* Page Header */
.page-header {
  background: linear-gradient(135deg, #3b82f6 0%, #1e40af 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: 56px;
  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: 22px;
  opacity: 0.95;
  position: relative;
  z-index: 1;
}

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

.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;
}

/* Tab Navigation */
.tab-navigation {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
  flex-wrap: wrap;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 16px;
}

.tab-btn {
  padding: 12px 24px;
  border: none;
  background: #f7fafc;
  color: #4a5568;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 15px;
}

.tab-btn:hover {
  background: #e2e8f0;
  transform: translateY(-2px);
}

.tab-btn.active {
  background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.tab-content {
  display: none;
  animation: fadeIn 0.4s ease;
}

.tab-content.active {
  display: block;
}

.section-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #2d3748;
}

.tab-intro {
  color: #6b7280;
  margin-bottom: 20px;
}

/* Form Styles */
.form-group {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 8px;
  font-size: 15px;
}

.form-input {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 16px;
  transition: all 0.3s ease;
  font-family: 'Inter', sans-serif;
}

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

.calculate-btn {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.calculate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

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

/* Result Display */
.result-container {
  margin-top: 32px;
  padding: 32px;
  background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
  border-radius: 16px;
  color: #ffffff;
  display: none;
  animation: resultSlide 0.5s ease;
}

.result-container.show {
  display: block;
}

.result-value {
  font-size: 56px;
  font-weight: 900;
  margin-bottom: 16px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.result-label {
  font-size: 18px;
  opacity: 0.95;
  margin-bottom: 24px;
}

.result-formula {
  background: rgba(255, 255, 255, 0.15);
  padding: 16px;
  border-radius: 12px;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  margin-top: 16px;
  backdrop-filter: blur(10px);
}

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

.download-btn {
  flex: 1;
  min-width: 140px;
  padding: 12px 24px;
  background: #ffffff;
  color: #3b82f6;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 16px;
}

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

/* Info Cards */
.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: 20px;
  font-weight: 700;
  color: #2d3748;
  margin-bottom: 12px;
}

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

.info-card a {
  color: #2563eb;
  text-decoration: underline;
}

/* Blog Section */
.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: 42px;
  font-weight: 900;
  color: #1a202c;
  margin-bottom: 32px;
  background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.blog-content h4 {
  font-size: 22px;
  font-weight: 600;
  color: #4a5568;
  margin-top: 32px;
  margin-bottom: 16px;
}

.blog-content p {
  color: #4a5568;
  font-size: 17px;
  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: 12px;
  line-height: 1.8;
}

.blog-content strong {
  color: #3b82f6;
  font-weight: 700;
}

.blog-content em {
  font-style: italic;
  color: #1e40af;
}

.blog-content a {
  color: #2563eb;
  text-decoration: underline;
}

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

.formula-box {
  background: #2d3748;
  color: #e2e8f0;
  padding: 20px;
  border-radius: 12px;
  font-family: 'Courier New', monospace;
  margin: 24px 0;
  overflow-x: auto;
}

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

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

.faq-inner h2 {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 24px;
  background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.faq-item h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
  color: #111827;
}

.faq-item p {
  font-size: 15px;
  color: #4b5563;
  margin: 0 0 6px;
}

.faq-item a {
  color: #2563eb;
  text-decoration: underline;
}

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

.footer-column h3 {
  font-size: 18px;
  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;
}

.footer-column ul li a:hover {
  color: #3b82f6;
  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;
}

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

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

/* Responsive */
@media (max-width: 1024px) {
  .main-nav-center {
    position: static;
    transform: none;
  }
}

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

  .mobile-menu-btn {
    display: block;
  }

  .page-header h1 {
    font-size: 36px;
  }

  .page-header p {
    font-size: 18px;
  }

  .calculator-card {
    padding: 24px;
  }

  .result-value {
    font-size: 42px;
  }

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

  .blog-content h2 {
    font-size: 32px;
  }

  .blog-content h3 {
    font-size: 24px;
  }

  .tab-navigation {
    gap: 8px;
  }

  .tab-btn {
    padding: 10px 16px;
    font-size: 14px;
  }

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

  .download-btn {
    width: 100%;
  }

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

/* ===========================
   Mobile fixes for header/nav
   ============================ */
@media (max-width: 768px) {

  /* Make header a bit tighter on small screens */
  .header {
    padding: 8px 12px;
  }

  /* Stop centering nav with absolute positioning on mobile */
  .main-nav-center {
    position: static;
    left: auto;
    transform: none;
    top: auto;

    /* Lay out links nicely on 2 lines if needed */
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 8px;
    text-align: center;
  }

  /* Slightly smaller nav text so it fits better */
  .nav-link {
    font-size: 0.9rem;
  }

  /* If you have a site title / logo text, make it a bit smaller too */
  .site-title,
  .logo-text {
    font-size: 1.1rem;
    white-space: nowrap;
  }
  
  @media (max-width: 768px) {
  .main-nav-center {
    display: none !important;
  }
}

}
