/* ============================================ */
/* FEET TO CM CONVERTER - COMPLETE STANDALONE CSS */
/* ============================================ */

:root {
  --bg: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-card: #ffffff;
  --text: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
  --accent: #2563eb;
  --accent-light: #dbeafe;
  --accent-dark: #1d4ed8;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] {
  --bg: #0f172a;
  --bg-secondary: #1e293b;
  --bg-card: #1e293b;
  --text: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --border: #334155;
  --accent: #3b82f6;
  --accent-light: #1e3a8a;
  --accent-dark: #60a5fa;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

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

img { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================ */
/* NAVBAR */
/* ============================================ */
.navbar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--accent);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.hamburger {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  position: relative;
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 2px;
  background: var(--text);
  left: 0;
}

.hamburger::before { top: -8px; }
.hamburger::after { top: 8px; }

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

.nav-menu li { list-style: none; }

.nav-menu a {
  padding: 8px 14px;
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: var(--radius);
  transition: all 0.15s ease;
  text-decoration: none;
  display: inline-block;
}

.nav-menu a:hover,
.nav-menu a.active {
  background: var(--bg-secondary);
  color: var(--accent);
  text-decoration: none;
}

.nav-dropdown { position: relative; }
.dropdown-toggle { cursor: pointer; }

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  min-width: 260px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  display: none;
  z-index: 100;
}

.nav-dropdown:hover .dropdown-menu { display: block; }

.dropdown-category { padding: 8px 0; }

.category-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 8px;
  margin-bottom: 4px;
}

.dropdown-tools { list-style: none; }
.dropdown-tools li { list-style: none; }

.dropdown-tools a {
  display: block;
  padding: 6px 12px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.dropdown-tools a:hover {
  background: var(--bg-secondary);
  color: var(--accent);
}

.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 0;
}

.view-all {
  display: block;
  padding: 8px 12px;
  font-weight: 600;
  color: var(--accent);
  text-align: center;
}

.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  font-size: 1.1rem;
  border-radius: var(--radius);
  transition: background 0.15s ease;
}

.theme-toggle:hover { background: var(--bg-secondary); }
.nav-theme-item { list-style: none; }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  
  .nav-menu {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-card);
    flex-direction: column;
    padding: 20px;
    border-top: 1px solid var(--border);
    display: none;
    align-items: stretch;
    gap: 4px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  }

  .nav-menu.active { display: flex; }
  .nav-dropdown:hover .dropdown-menu { position: static; display: block; box-shadow: none; border: none; padding-left: 16px; }
  .nav-menu a { display: block; width: 100%; }
}

/* ============================================ */
/* HERO */
/* ============================================ */
.ftc-hero {
  padding: 60px 0 40px;
  text-align: center;
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
}

.ftc-hero h1 {
  font-size: 2.5rem;
  margin-bottom: 16px;
  color: var(--text);
  font-weight: 800;
}

.ftc-hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 720px;
  margin: 0 auto 24px;
  line-height: 1.6;
}

.ftc-hero-badge {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* ============================================ */
/* CONVERTER */
/* ============================================ */
.ftc-converter-section { padding: 60px 0; }

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

.ftc-form-card,
.ftc-result-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

.ftc-form-title,
.ftc-result-title {
  font-size: 1.3rem;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
  color: var(--text);
  font-weight: 700;
}

.ftc-field { margin-bottom: 20px; }

.ftc-field label {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 8px;
  color: var(--text);
}

.ftc-height-input {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.ftc-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.ftc-input-wrap input {
  width: 100%;
  padding: 12px 16px;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  transition: border-color 0.15s ease;
  font-family: inherit;
}

.ftc-input-wrap input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.ftc-input-suffix {
  position: absolute;
  right: 16px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-secondary);
  pointer-events: none;
}

.ftc-input-wrap:has(.ftc-input-suffix) input { padding-right: 55px; }

.ftc-quick-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 20px;
  padding: 12px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
}

.ftc-quick-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-right: 4px;
}

.ftc-quick-btn {
  padding: 6px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text);
  transition: all 0.15s ease;
  font-family: inherit;
}

.ftc-quick-btn:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.ftc-btn-group {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.ftc-btn {
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  flex: 1;
  font-family: inherit;
}

.ftc-btn.primary {
  background: var(--accent);
  color: white;
}

.ftc-btn.primary:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.ftc-btn.secondary {
  background: var(--bg-secondary);
  color: var(--text);
  border: 1px solid var(--border);
}

.ftc-btn.secondary:hover {
  background: var(--bg);
  border-color: var(--accent);
}

/* Result Card */
.ftc-highlight-box {
  padding: 32px 24px;
  border-radius: var(--radius);
  text-align: center;
  margin-bottom: 24px;
  color: white;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.ftc-result-label {
  font-size: 0.9rem;
  opacity: 0.9;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ftc-result-value {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 4px;
}

.ftc-result-unit {
  font-size: 1rem;
  opacity: 0.85;
}

.ftc-breakdown-list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
}

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

.ftc-breakdown-item:last-child { border-bottom: none; }
.ftc-breakdown-label { color: var(--text-secondary); }
.ftc-breakdown-value { font-weight: 700; color: var(--text); }

.ftc-formula-box {
  background: var(--bg-secondary);
  padding: 14px 16px;
  border-radius: var(--radius);
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  border-left: 3px solid var(--accent);
}

.ftc-formula-box code {
  display: block;
  margin-top: 6px;
  font-family: 'Courier New', monospace;
  font-size: 0.92rem;
  color: var(--text);
  font-weight: 600;
}

.ftc-copy-bar { text-align: center; }

.ftc-copy-btn {
  padding: 10px 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  transition: all 0.15s ease;
  font-family: inherit;
}

.ftc-copy-btn:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* ============================================ */
/* CHART SECTION */
/* ============================================ */
.ftc-chart-section {
  padding: 60px 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.ftc-chart-section h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 12px;
  font-weight: 700;
}

.ftc-chart-desc {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 32px;
  font-size: 1rem;
}

.ftc-chart-wrap {
  overflow-x: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 900px;
  margin: 0 auto;
}

.ftc-chart-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.ftc-chart-table th {
  background: var(--bg-secondary);
  padding: 14px 16px;
  text-align: left;
  font-weight: 700;
  color: var(--text);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

.ftc-chart-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

.ftc-chart-table tbody tr:hover {
  background: var(--bg-secondary);
}

.ftc-chart-table tbody tr:last-child td {
  border-bottom: none;
}

/* ============================================ */
/* POPULAR CONVERSIONS */
/* ============================================ */
.ftc-popular-section {
  padding: 60px 0;
}

.ftc-popular-section h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 12px;
  font-weight: 700;
}

.ftc-popular-desc {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 32px;
  font-size: 1rem;
}

.ftc-popular-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.ftc-popular-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  transition: all 0.2s ease;
  cursor: pointer;
}

.ftc-popular-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  border-color: var(--accent);
}

.ftc-popular-height {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 6px;
}

.ftc-popular-arrow {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin: 4px 0;
}

.ftc-popular-cm {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text);
}

.ftc-popular-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ============================================ */
/* FORMULA SECTION */
/* ============================================ */
.ftc-formula-section {
  padding: 60px 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.ftc-formula-section h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 40px;
  font-weight: 700;
}

.ftc-formula-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.ftc-formula-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.ftc-formula-card h3 {
  font-size: 1.15rem;
  margin-bottom: 16px;
  color: var(--text);
  font-weight: 700;
}

.ftc-formula-box-large {
  background: var(--bg-secondary);
  padding: 20px;
  border-radius: var(--radius);
  text-align: center;
  margin-bottom: 16px;
  border: 1px solid var(--border);
}

.ftc-formula-box-large code {
  font-family: 'Courier New', monospace;
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.6;
  display: block;
}

.ftc-formula-card p {
  color: var(--text-secondary);
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.ftc-formula-card ul {
  margin-left: 20px;
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 0.95rem;
}

.ftc-formula-card li { padding: 2px 0; }

/* ============================================ */
/* CONTENT ARTICLE */
/* ============================================ */
.ftc-content-article {
  padding: 60px 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
}

.ftc-content-article h2 {
  font-size: 2rem;
  margin-bottom: 20px;
  font-weight: 700;
}

.ftc-content-article h3 {
  font-size: 1.4rem;
  margin: 32px 0 16px;
  color: var(--text);
  font-weight: 700;
}

.ftc-content-article p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
}

.ftc-content-article ul,
.ftc-content-article ol {
  margin-left: 24px;
  color: var(--text-secondary);
  line-height: 1.9;
  margin-bottom: 16px;
}

.ftc-internal-links {
  margin-top: 40px;
  padding: 24px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.ftc-internal-links h3 { margin-top: 0; }
.ftc-internal-links ul { list-style: none; margin: 0; padding: 0; }
.ftc-internal-links li { padding: 8px 0; border-bottom: 1px solid var(--border); }
.ftc-internal-links li:last-child { border-bottom: none; }
.ftc-internal-links a { color: var(--accent); font-weight: 600; }

/* ============================================ */
/* FAQ */
/* ============================================ */
.ftc-faq { padding: 60px 0; }

.ftc-faq h2 {
  text-align: center;
  margin-bottom: 40px;
  font-size: 2rem;
  font-weight: 700;
}

.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:last-child { border-bottom: none; }

.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: 18px 0;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  font-family: inherit;
  transition: color 0.15s ease;
}

.faq-question:hover { color: var(--accent); }

.faq-icon {
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--accent);
  transition: transform 0.2s ease;
  flex-shrink: 0;
  line-height: 1;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-answer p {
  padding: 0 0 18px;
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 0.98rem;
}

/* ============================================ */
/* FOOTER */
/* ============================================ */
.footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 48px 0 24px;
}

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

.footer-brand p {
  color: var(--text-secondary);
  margin-top: 12px;
  font-size: 0.95rem;
  line-height: 1.6;
}

.footer-logo {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--accent);
}

.footer-tagline {
  font-weight: 600;
  color: var(--accent);
  margin-top: 8px;
}

.footer-nav ul { list-style: none; padding: 0; }
.footer-nav li { margin-bottom: 8px; list-style: none; }

.footer-nav a {
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.footer-nav a:hover { color: var(--accent); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.footer-privacy {
  margin-top: 6px;
  font-size: 0.82rem;
}

/* ============================================ */
/* RESPONSIVE */
/* ============================================ */
@media (max-width: 900px) {
  .ftc-converter-grid,
  .ftc-formula-grid {
    grid-template-columns: 1fr;
  }

  .ftc-hero h1 { font-size: 2rem; }
  .ftc-result-value { font-size: 2.5rem; }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

@media (max-width: 640px) {
  .ftc-hero { padding: 40px 0 30px; }
  .ftc-hero h1 { font-size: 1.75rem; }

  .ftc-btn-group { flex-direction: column; }
  .ftc-form-card, .ftc-result-card { padding: 20px; }

  .ftc-chart-table th,
  .ftc-chart-table td {
    padding: 10px 12px;
    font-size: 0.85rem;
  }

  .ftc-result-value { font-size: 2.2rem; }
  .ftc-height-input { grid-template-columns: 1fr; }

  .ftc-popular-grid { grid-template-columns: repeat(2, 1fr); }
}