/* PetCalculatorHub.com - Premium Design System & Stylesheet */
:root {
  --primary: #0d9488;
  --primary-hover: #0f766e;
  --primary-light: #ccfbf1;
  --primary-gradient: linear-gradient(135deg, #0d9488 0%, #14b8a6 100%);
  --secondary: #3b82f6;
  --secondary-hover: #2563eb;
  --accent: #f59e0b;
  --accent-hover: #d97706;
  --dark: #0f172a;
  --dark-light: #1e293b;
  --text-main: #334155;
  --text-muted: #64748b;
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --border: #e2e8f0;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-lg: 0 12px 24px -4px rgba(0,0,0,0.08), 0 6px 12px -6px rgba(0,0,0,0.04);
  --shadow-glow: 0 0 25px rgba(13, 148, 136, 0.25);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  color: var(--text-main);
  background-color: var(--bg-main);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  color: var(--primary-hover);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header & Navbar */
header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 76px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--dark);
  letter-spacing: -0.02em;
}

.logo span {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-badge {
  background: var(--primary-light);
  color: var(--primary-hover);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 8px;
  align-items: center;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--dark-light);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
  background: var(--primary-light);
  text-decoration: none;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.7rem;
  cursor: pointer;
  color: var(--dark);
}

/* Hero Section */
.hero {
  padding: 56px 0 40px;
  text-align: center;
  background: radial-gradient(circle at 50% 0%, #ccfbf1 0%, var(--bg-main) 70%);
  border-bottom: 1px solid var(--border);
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid #b2f5ea;
  padding: 6px 16px;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary-hover);
  box-shadow: var(--shadow-sm);
  margin-bottom: 18px;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 900;
  color: var(--dark);
  line-height: 1.15;
  margin-bottom: 18px;
  letter-spacing: -0.03em;
}

.hero h1 span {
  background: linear-gradient(135deg, #0d9488 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 720px;
  margin: 0 auto 24px;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--dark-light);
  background: #ffffff;
  padding: 6px 14px;
  border-radius: 9999px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.stat-item .icon {
  color: var(--primary);
  font-weight: 800;
}

/* Master Interactive Calculator Suite (Tabbed Interface) */
.hub-suite {
  background: #ffffff;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  margin: -30px auto 48px;
  position: relative;
  z-index: 10;
  overflow: hidden;
}

.suite-tabs {
  display: flex;
  background: #f1f5f9;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}

.suite-tabs::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  flex: 1;
  min-width: 170px;
  padding: 18px 16px;
  border: none;
  background: none;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--primary);
  background: rgba(255, 255, 255, 0.6);
}

.tab-btn.active {
  color: var(--primary-hover);
  background: #ffffff;
  border-bottom-color: var(--primary);
}

.tab-btn .tab-icon {
  font-size: 1.25rem;
}

.tab-panel {
  display: none;
  padding: 40px;
}

.tab-panel.active {
  display: block;
  animation: fadeIn 0.3s ease-in-out;
}

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

/* Calculator Grid */
.calc-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 36px;
  align-items: start;
}

@media (max-width: 900px) {
  .calc-grid {
    grid-template-columns: 1fr;
  }
}

.calc-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--dark);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.form-control {
  padding: 13px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 1rem;
  background: #ffffff;
  color: var(--dark);
  transition: all 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.range-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
}

.range-slider {
  flex: 1;
  accent-color: var(--primary);
  height: 8px;
  cursor: pointer;
}

.range-bubble {
  background: var(--dark-light);
  color: #ffffff;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 0.85rem;
  min-width: 60px;
  text-align: center;
}

.radio-group {
  display: flex;
  gap: 12px;
}

.radio-card {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 700;
  background: var(--bg-main);
  transition: all 0.2s ease;
  user-select: none;
}

.radio-card input {
  display: none;
}

.radio-card.active {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary-hover);
  box-shadow: 0 2px 4px rgba(13, 148, 136, 0.1);
}

/* Results Box */
.calc-results {
  background: linear-gradient(145deg, #f0fdfa 0%, #e6fffa 100%);
  border: 2px solid var(--primary);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 100px;
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #b2f5ea;
  padding-bottom: 12px;
  margin-bottom: 20px;
}

.results-header h3 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--dark);
}

.live-badge {
  background: #10b981;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.live-badge::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #ffffff;
  border-radius: 50%;
  animation: pulseDot 1.5s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.4); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

.result-metric {
  margin-bottom: 24px;
  text-align: center;
  background: #ffffff;
  padding: 20px;
  border-radius: var(--radius-md);
  border: 1px solid #b2f5ea;
}

.result-metric .label {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.result-metric .value {
  font-size: 3.25rem;
  font-weight: 900;
  color: var(--primary-hover);
  line-height: 1.1;
  margin: 6px 0;
  letter-spacing: -0.02em;
}

.result-metric .sub {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--dark-light);
}

/* Visual Progress Bar */
.progress-container {
  margin: 16px 0 24px;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--dark-light);
  margin-bottom: 6px;
}

.progress-bar-bg {
  width: 100%;
  height: 10px;
  background: #e2e8f0;
  border-radius: 9999px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--primary-gradient);
  border-radius: 9999px;
  transition: width 0.4s ease;
}

.result-breakdown {
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 20px;
  border: 1px solid #b2f5ea;
}

.breakdown-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

.breakdown-row:last-child {
  border-bottom: none;
}

.breakdown-row span.bold {
  font-weight: 700;
  color: var(--dark);
}

/* Affiliate Callout Banner */
.affiliate-box {
  background: #fffbeb;
  border: 1.5px solid #fde68a;
  border-radius: var(--radius-md);
  padding: 18px;
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.affiliate-box-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: #92400e;
  display: flex;
  align-items: center;
  gap: 6px;
}

.affiliate-box p {
  font-size: 0.88rem;
  color: #78350f;
  line-height: 1.45;
}

.affiliate-btn {
  display: inline-block;
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.92rem;
  text-align: center;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(245, 158, 11, 0.2);
}

.affiliate-btn:hover {
  background: var(--accent-hover);
  color: #ffffff;
  transform: translateY(-1px);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary-gradient);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.25);
}

.btn-primary:hover {
  background: var(--primary-hover);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(13, 148, 136, 0.35);
}

.btn-secondary {
  background: var(--dark-light);
  color: #ffffff;
}

.btn-secondary:hover {
  background: var(--dark);
  color: #ffffff;
}

.btn-outline {
  background: #ffffff;
  border: 1.5px solid var(--border);
  color: var(--dark-light);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

/* Tool Cards Grid */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin: 40px 0;
}

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}

.tool-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.tool-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 9999px;
  margin-bottom: 14px;
  width: fit-content;
}

.badge-featured { background: #dbeafe; color: #1e40af; }
.badge-emergency { background: #fee2e2; color: #991b1b; }
.badge-popular { background: #fef3c7; color: #92400e; }
.badge-essential { background: #ccfbf1; color: #0f766e; }

.tool-card h3 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 10px;
}

.tool-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 20px;
  flex-grow: 1;
}

/* Content Sections */
.content-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 44px;
  margin: 40px 0;
  box-shadow: var(--shadow-sm);
}

.content-section h2 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--dark);
  margin: 32px 0 16px;
  line-height: 1.3;
}

.content-section h2:first-child {
  margin-top: 0;
}

.content-section h3 {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--dark-light);
  margin: 24px 0 12px;
}

.content-section p {
  margin-bottom: 18px;
  font-size: 1.05rem;
  color: #334155;
  line-height: 1.7;
}

.formula-box {
  background: #f8fafc;
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 22px;
  margin: 24px 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 1.05rem;
  color: var(--dark);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 0.95rem;
}

.data-table th, .data-table td {
  padding: 14px 18px;
  border: 1px solid var(--border);
  text-align: left;
}

.data-table th {
  background: #f1f5f9;
  font-weight: 700;
  color: var(--dark);
}

.data-table tr:nth-child(even) {
  background: #f8fafc;
}

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}

.faq-question {
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 8px;
}

.faq-answer {
  font-size: 1.02rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.disclaimer-banner {
  background: #fff1f2;
  border-left: 4px solid var(--danger);
  padding: 18px 22px;
  border-radius: var(--radius-sm);
  margin: 28px 0;
  font-size: 0.95rem;
  color: #9f1239;
}

.disclaimer-banner strong {
  color: #881337;
}

/* Ad Placement Slots */
.ad-slot-wrapper {
  margin: 32px 0;
  text-align: center;
  background: #ffffff;
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
}

.ad-slot-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.ad-placeholder {
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  border-radius: var(--radius-sm);
  color: #94a3b8;
  font-size: 0.85rem;
  font-weight: 600;
}

/* Footer */
footer {
  background: var(--dark);
  color: #cbd5e1;
  padding: 60px 0 28px;
  margin-top: 60px;
  border-top: 1px solid #334155;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 580px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.footer-col h4 {
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 18px;
}

.footer-col ul {
  list-style: none;
}

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

.footer-col a {
  color: #94a3b8;
  font-size: 0.95rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-col a:hover {
  color: #ffffff;
}

.footer-bottom {
  border-top: 1px solid #334155;
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.88rem;
  color: #64748b;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .navbar {
    height: auto;
    padding: 16px 0;
    flex-wrap: wrap;
  }
  .menu-toggle {
    display: block;
  }
  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 10px;
    padding-top: 16px;
  }
  .nav-links.active {
    display: flex;
  }
  .hero h1 {
    font-size: 2.2rem;
  }
  .tab-panel {
    padding: 24px 16px;
  }
  .content-section {
    padding: 24px;
  }
  .calc-results {
    position: static;
  }
}
