/* Global */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  min-height: 100%;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

/* Header & Navigation */
.header {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.15);
}

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

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

.brand-name:hover {
  text-decoration: none;
  opacity: 0.9;
}

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

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

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

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

.dropdown-toggle {
  background: none;
  border: none;
  cursor: pointer;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 115%;
  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;
  z-index: 1200;
}

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

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

.dropdown-content a:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 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 {
  background: #059669;
  border-radius: 0 0 12px 12px;
  margin-top: 0.75rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.mobile-menu.open {
  max-height: 320px;
}

.mobile-menu-link {
  display: block;
  padding: 0.75rem 0.5rem;
  color: #ffffff;
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

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

.mobile-menu-link:hover {
  background-color: rgba(15, 118, 110, 0.9);
}

/* Hero */
.page-header {
  background: linear-gradient(135deg, #10b981 0%, #059669 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.8rem;
  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.25rem;
  position: relative;
  z-index: 1;
  opacity: 0.95;
  max-width: 800px;
  margin: 0 auto;
  animation: slideInUp 0.6s ease;
}

/* 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(0) rotate(0);
  }
  50% {
    transform: translateY(-20px) rotate(5deg);
  }
}

.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-card {
  background: #ffffff;
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  animation: slideUp 0.6s ease;
  margin-bottom: 24px;
}

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

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

.converter-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

.input-group {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  padding: 24px;
  border-radius: 16px;
  border: 2px solid #10b981;
  transition: all 0.3s ease;
}

.input-group:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.2);
}

.input-label {
  font-weight: 700;
  color: #065f46;
  margin-bottom: 12px;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.input-field {
  width: 100%;
  padding: 14px;
  border: 2px solid #10b981;
  border-radius: 10px;
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  color: #1e293b;
  margin-bottom: 12px;
  transition: all 0.3s ease;
}

.input-field:focus {
  outline: none;
  border-color: #059669;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
  transform: scale(1.02);
}

.unit-select {
  width: 100%;
  padding: 12px;
  border: 2px solid #10b981;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  color: #065f46;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.3s ease;
}

.unit-select:focus {
  outline: none;
  border-color: #059669;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

/* Results grid */
.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

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

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

.result-label {
  font-weight: 600;
  color: #1e3a8a;
  font-size: 0.75rem;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.result-value {
  font-weight: 900;
  color: #1e293b;
  font-size: 1.25rem;
}

/* Tables */
.table-heading {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e293b;
  margin: 32px 0 16px;
}

.conversion-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  font-size: 0.875rem;
}

.conversion-table th {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  padding: 12px;
  text-align: left;
  font-weight: 600;
}

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

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

/* History */
.history-item {
  background: #f8fafc;
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-left: 4px solid #10b981;
  transition: all 0.3s ease;
}

.history-item:hover {
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

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

/* Blog / SEO Content */
.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, #10b981 0%, #059669 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

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

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

.blog-content li {
  margin-bottom: 12px;
}

.blog-content strong {
  color: #10b981;
  font-weight: 700;
}

.blog-content a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
}

.blog-content a:hover {
  text-decoration: underline;
}

/* Highlight boxes */
.highlight-box {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  padding: 24px;
  border-radius: 12px;
  border-left: 4px solid #10b981;
  margin: 32px 0;
}

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

/* FAQ section */
.calculator-faq {
  margin-top: 48px;
}

.calculator-faq h2 {
  font-size: 1.8rem;
  margin-bottom: 20px;
  color: #1a202c;
}

.faq-item {
  border-top: 1px solid #e2e8f0;
  padding: 16px 0;
}

.faq-item h3 {
  font-size: 1.1rem;
  margin: 0 0 6px;
  color: #2d3748;
}

.faq-item p {
  margin: 0;
  color: #4a5568;
}

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

.footer-column h3 {
  font-size: 0.95rem;
  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: #10b981;
  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;
}

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

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

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

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

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

  .calculator-card {
    padding: 24px;
  }

  .converter-section {
    grid-template-columns: 1fr;
  }

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

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

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

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