/* ===================================
   Global base
   =================================== */

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

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

body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #111827;
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
}

a:hover {
  color: #0f766e;
}

img {
  max-width: 100%;
  display: block;
}

.no-scroll {
  overflow: hidden;
}

/* ===================================
   Header & navigation
   =================================== */

.site-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Brand */

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo {
  width: 44px;
  height: auto;
  border-radius: 999px;
  background: #fff;
  padding: 4px;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

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

.brand-subtitle {
  font-size: 0.8rem;
  color: #e5e7eb;
}

/* Desktop nav */

.desktop-nav {
  display: block;
}

.nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-link {
  font-size: 0.95rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  color: #ffffff;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.nav-link:hover {
  background-color: rgba(15, 23, 42, 0.15);
  transform: translateY(-1px);
}

/* Desktop "More" dropdown */

.nav-more {
  position: relative;
}

.nav-more-toggle {
  background: transparent;
  border: none;
  cursor: pointer;
  font: inherit;
}

.desktop-more-dropdown {
  position: absolute;
  top: 110%;
  right: 0;
  min-width: 220px;
  background-color: #ffffff;
  border-radius: 0.6rem;
  border: 1px solid #e5e7eb;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
  padding: 0.4rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
  z-index: 1100;
}

.desktop-more-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-link {
  display: block;
  padding: 0.5rem 0.9rem;
  font-size: 0.9rem;
  color: #111827;
}

.dropdown-link:hover {
  background-color: #f3f4f6;
  color: #16a34a;
}

/* Mobile hamburger */

.mobile-menu-btn {
  display: none;
  background-color: #16a34a;
  color: #ffffff;
  border: none;
  padding: 0.45rem 0.9rem;
  border-radius: 0.5rem;
  font-size: 1.25rem;
  cursor: pointer;
  line-height: 1;
}

/* Mobile overlay + slide menu */

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

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

.mobile-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background-color: #166534;
  color: #f9fafb;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease-out;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.45);
  z-index: 950;
}

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

.mobile-menu-list {
  list-style: none;
  padding: 0.75rem 1rem 1rem;
  margin: 0;
}

.mobile-menu-list li + li {
  margin-top: 0.35rem;
}

.mobile-menu-list a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 0.45rem;
  font-size: 0.95rem;
  color: #f9fafb;
}

.mobile-menu-list a:hover {
  background-color: rgba(22, 163, 74, 0.45);
}

/* Desktop vs mobile visibility */

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

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

/* ===================================
   Page header / hero
   =================================== */

.page-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 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,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120'%3E%3Cpath d='M0,0 Q300,60 600,30 T1200,0 L1200,120 L0,120 Z' fill='rgba(255,255,255,0.12)'/%3E%3C/svg%3E") repeat-x bottom;
  background-size: 1200px 120px;
  opacity: 0.4;
}

.page-header h1 {
  font-size: 2.8rem;
  font-weight: 900;
  margin-bottom: 0.75rem;
  position: relative;
  z-index: 1;
  text-shadow: 2px 2px 4px rgba(15, 23, 42, 0.35);
  animation: slideInDown 0.6s ease;
}

.page-header p {
  max-width: 720px;
  margin: 0 auto;
  font-size: 1.1rem;
  position: relative;
  z-index: 1;
  animation: slideInUp 0.6s ease;
}

@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(-12px) rotate(3deg);
  }
}

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

/* ===================================
   Calculator layout
   =================================== */

.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(15, 23, 42, 0.18);
  margin-bottom: 24px;
}

.card-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: #4f46e5;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.input-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}

.input-group {
  background: linear-gradient(135deg, #f0f4ff 0%, #e9d5ff 100%);
  padding: 22px;
  border-radius: 16px;
  border: 2px solid #667eea;
  transition: all 0.25s ease;
}

.input-group:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(102, 126, 234, 0.25);
}

.input-label {
  font-weight: 700;
  color: #4c1d95;
  margin-bottom: 10px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.input-field,
.select-field {
  width: 100%;
  padding: 13px;
  border-radius: 10px;
  border: 2px solid #667eea;
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
  background: #ffffff;
  transition: all 0.25s ease;
}

.input-field:focus,
.select-field:focus {
  outline: none;
  border-color: #764ba2;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.18);
  transform: scale(1.02);
}

/* Calculate button */

.calculate-btn {
  width: 100%;
  padding: 18px;
  margin-top: 4px;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 50%, #15803d 100%);
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.calculate-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 25px rgba(22, 163, 74, 0.45);
}

/* Results block */

.result-display {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 32px;
  border-radius: 20px;
  color: #ffffff;
}

.bmr-value {
  font-size: 3.6rem;
  font-weight: 900;
  text-align: center;
  margin-bottom: 0.15rem;
}

.bmr-label {
  text-align: center;
  font-size: 1.1rem;
  opacity: 0.95;
  margin-bottom: 22px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.13);
  border-radius: 16px;
  padding: 18px 16px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.32);
  backdrop-filter: blur(10px);
  transition: all 0.25s ease;
}

.stat-card:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-3px);
}

.stat-title {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.9;
  margin-bottom: 6px;
}

.stat-value {
  font-size: 1.6rem;
  font-weight: 800;
}

.stat-note {
  font-size: 0.78rem;
  margin-top: 4px;
  opacity: 0.9;
}

/* Formula info */

.formula-info-box {
  background: linear-gradient(135deg, #f0f4ff 0%, #e9d5ff 100%);
  padding: 20px;
  border-radius: 12px;
  margin-top: 24px;
  border-left: 4px solid #667eea;
}

.formula-info-title {
  font-weight: 600;
  color: #4c1d95;
  margin-bottom: 6px;
}

.formula-info-text {
  font-size: 0.9rem;
  color: #6b21a8;
}

/* Downloads */

.download-buttons {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.download-btn {
  flex: 1 1 180px;
  padding: 14px 22px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(102, 126, 234, 0.35);
}

/* Ad slot */

.adsense-container {
  background: linear-gradient(135deg, #e0e7ff 0%, #f3e8ff 100%);
  border-radius: 16px;
  padding: 20px;
  margin: 24px 0;
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed #a5b4fc;
}

.adsense-placeholder {
  text-align: center;
  color: #4c1d95;
  font-size: 0.9rem;
}

/* Formula + activity cards */

.formula-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 18px;
  border: 2px solid #667eea;
  cursor: pointer;
  transition: all 0.25s ease;
  margin-bottom: 12px;
}

.formula-card:hover {
  transform: translateX(4px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.25);
}

.formula-card.selected {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
  border-color: transparent;
}

.formula-name {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 4px;
}

.formula-desc {
  font-size: 0.85rem;
  opacity: 0.9;
}

.activity-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 8px;
}

.activity-option {
  background: #ffffff;
  border-radius: 10px;
  border: 2px solid #667eea;
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.activity-option:hover {
  transform: translateX(4px);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.25);
}

.activity-option.selected {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
  border-color: transparent;
}

.activity-name {
  font-weight: 700;
  font-size: 0.98rem;
  margin-bottom: 4px;
}

.activity-desc {
  font-size: 0.8rem;
  opacity: 0.9;
}

/* ===================================
   Blog content
   =================================== */

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

.blog-content {
  background: #ffffff;
  border-radius: 24px;
  padding: 48px 40px;
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.12);
}

.blog-content h2 {
  font-size: 2.1rem;
  font-weight: 900;
  margin-bottom: 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

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

.blog-content ul,
.blog-content ol {
  font-size: 0.96rem;
  color: #4b5563;
  margin-bottom: 18px;
  padding-left: 1.4rem;
}

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

.blog-content strong {
  font-weight: 700;
  color: #4f46e5;
}

/* Highlight & example boxes */

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

.example-box {
  background: #f0f4ff;
  padding: 18px;
  border-radius: 12px;
  border-left: 4px solid #667eea;
  margin: 24px 0;
  font-size: 0.94rem;
}

/* ===================================
   FAQ section
   =================================== */

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

.faq-card {
  background: #ffffff;
  border-radius: 24px;
  padding: 32px 26px;
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.1);
}

.faq-card h2 {
  font-size: 1.7rem;
  font-weight: 800;
  margin-bottom: 18px;
}

.faq-item {
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background-color: #f9fafb;
  padding: 0.65rem 0.85rem;
  margin-bottom: 0.6rem;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.96rem;
  color: #111827;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

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

/* ===================================
   Footer
   =================================== */

.footer {
  background: linear-gradient(135deg, #1f2937 0%, #020617 100%);
  color: #ffffff;
  padding: 60px 0 20px;
  margin-top: 80px;
}

.footer 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;
  margin: 0;
  padding: 0;
}

.footer-column li + li {
  margin-top: 0.35rem;
}

.footer-column a {
  font-size: 0.9rem;
  color: #cbd5e0;
  display: inline-block;
  transition: color 0.2s ease, transform 0.2s ease;
}

.footer-column a:hover {
  color: #8b5cf6;
  transform: translateX(4px);
}

.footer-about p {
  font-size: 0.9rem;
  color: #9ca3af;
}

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  margin-top: 32px;
  padding-top: 20px;
  text-align: center;
  font-size: 0.82rem;
  color: #9ca3af;
}

/* ===================================
   Responsive adjustments
   =================================== */

@media (max-width: 900px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 768px) {
  .page-header {
    padding: 60px 18px;
  }

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

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

  .calculator-card {
    padding: 26px 20px;
  }

  .input-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

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

  .bmr-value {
    font-size: 2.4rem;
  }
}

@media (max-width: 640px) {
  .footer {
    padding-top: 44px;
  }

  .blog-section {
    margin-top: 60px;
  }

  .faq-section {
    margin-bottom: 60px;
  }

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