/*
Theme Name: Measurements India Theme
Theme URI: https://measurements.in
Author: Measurements.in
Description: India's #1 Measurement Converter Hub - Navy Blue & Saffron Orange
Version: 1.0
*/

:root {
  --navy: #0B1F4A;
  --navy-mid: #162E6B;
  --navy-light: #1E3F94;
  --saffron: #FF8C00;
  --saffron-light: #FFB347;
  --saffron-pale: #FFF3E0;
  --white: #ffffff;
  --bg: #F7F9FC;
  --text: #1a1a2e;
  --text-muted: #5a6375;
  --border: #e0e6f0;
  --success: #1a7a4a;
  --radius: 10px;
  --shadow: 0 2px 12px rgba(11,31,74,0.10);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: 'Segoe UI', Arial, sans-serif; background: var(--bg); color: var(--text); line-height: 1.7; }
a { color: var(--navy-light); text-decoration: none; }
a:hover { color: var(--saffron); }
img { max-width: 100%; height: auto; }

/* ===== HEADER ===== */
#site-header {
  background: var(--navy);
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 16px rgba(0,0,0,0.3);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.site-branding { display: flex; align-items: center; gap: 12px; }
.logo-icon {
  width: 40px; height: 40px;
  background: var(--saffron);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 800; color: var(--navy);
}
.site-name {
  font-size: 20px; font-weight: 700; color: var(--white);
  letter-spacing: -0.3px;
}
.site-name span { color: var(--saffron); }
.site-tagline { font-size: 10px; color: #aab8d4; letter-spacing: 0.8px; text-transform: uppercase; }

/* NAV */
#site-nav ul { list-style: none; display: flex; gap: 4px; }
#site-nav a {
  color: #cdd7ee;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}
#site-nav a:hover, #site-nav a.active {
  background: rgba(255,140,0,0.15);
  color: var(--saffron);
}
.hamburger { display: none; background: none; border: none; cursor: pointer; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--white); margin: 4px 0; border-radius: 2px; transition: 0.3s; }

/* ===== HOMEPAGE HERO ===== */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 60%, #1a2a5e 100%);
  padding: 60px 20px;
  text-align: center;
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(255,140,0,0.08) 0%, transparent 70%);
}
.hero-inner { max-width: 800px; margin: 0 auto; position: relative; }
.hero h1 { font-size: 2.4rem; font-weight: 800; line-height: 1.2; margin-bottom: 16px; }
.hero h1 span { color: var(--saffron); }
.hero p { font-size: 1.1rem; color: #c8d6f0; margin-bottom: 32px; }
.hero-search {
  display: flex; max-width: 560px; margin: 0 auto;
  background: var(--white); border-radius: 50px; overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.hero-search input {
  flex: 1; border: none; outline: none;
  padding: 14px 20px; font-size: 15px; color: var(--text);
}
.hero-search button {
  background: var(--saffron); color: var(--white);
  border: none; padding: 14px 24px; font-size: 15px;
  font-weight: 600; cursor: pointer; border-radius: 0 50px 50px 0;
  transition: background 0.2s;
}
.hero-search button:hover { background: #e07800; }
.hero-stats { display: flex; gap: 32px; justify-content: center; margin-top: 32px; }
.hero-stat { text-align: center; }
.hero-stat strong { display: block; font-size: 1.8rem; font-weight: 800; color: var(--saffron); }
.hero-stat span { font-size: 12px; color: #8fa3cc; text-transform: uppercase; letter-spacing: 0.5px; }

/* ===== CATEGORY GRID HOME ===== */
.section { padding: 60px 20px; }
.section-inner { max-width: 1200px; margin: 0 auto; }
.section-title {
  font-size: 1.6rem; font-weight: 700; color: var(--navy);
  text-align: center; margin-bottom: 8px;
}
.section-sub {
  text-align: center; color: var(--text-muted);
  margin-bottom: 36px; font-size: 15px;
}
.section-title span { color: var(--saffron); }

.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
.cat-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  padding: 24px 20px;
  text-align: center;
  transition: all 0.25s;
  cursor: pointer;
}
.cat-card:hover {
  border-color: var(--saffron);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}
.cat-icon {
  width: 54px; height: 54px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; margin: 0 auto 14px;
}
.cat-card h3 { font-size: 15px; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.cat-card p { font-size: 13px; color: var(--text-muted); line-height: 1.4; }
.cat-count {
  display: inline-block; margin-top: 10px;
  background: var(--saffron-pale); color: var(--saffron);
  font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 20px;
}

/* Land */
.cat-icon.land { background: #e8f0fe; }
/* Gold */
.cat-icon.gold { background: #fff8e1; }
/* Cooking */
.cat-icon.cooking { background: #fce4ec; }
/* Fabric */
.cat-icon.fabric { background: #f3e5f5; }
/* Construction */
.cat-icon.construction { background: #e8f5e9; }
/* Standard */
.cat-icon.standard { background: #e3f2fd; }
/* Health */
.cat-icon.health { background: #fbe9e7; }

/* ===== CALCULATOR PAGE ===== */
.calc-wrap {
  max-width: 900px;
  margin: 40px auto;
  padding: 0 20px;
}
.breadcrumb {
  font-size: 13px; color: var(--text-muted);
  margin-bottom: 20px;
}
.breadcrumb a { color: var(--navy-light); }
.breadcrumb span { color: var(--saffron); }

.calc-box {
  background: var(--white);
  border-radius: 16px;
  border: 1.5px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 32px;
}
.calc-header {
  background: var(--navy);
  padding: 24px 28px;
  color: var(--white);
}
.calc-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.calc-header p {
  font-size: 14px;
  color: #aab8d4;
}
.calc-body { padding: 28px; }

.calc-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: end;
  margin-bottom: 20px;
}
.calc-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.calc-field input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 20px;
  font-weight: 600;
  color: var(--navy);
  outline: none;
  transition: border-color 0.2s;
}
.calc-field input:focus { border-color: var(--saffron); }
.calc-field input[readonly] {
  background: var(--saffron-pale);
  border-color: var(--saffron);
  color: var(--navy);
}
.swap-btn {
  background: var(--saffron);
  color: var(--white);
  border: none;
  width: 44px; height: 44px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  transition: transform 0.3s, background 0.2s;
  margin-bottom: 2px;
}
.swap-btn:hover { background: var(--navy); transform: rotate(180deg); }

.calc-result-badge {
  background: var(--navy);
  color: var(--white);
  border-radius: 10px;
  padding: 18px 24px;
  text-align: center;
  margin-top: 4px;
}
.calc-result-badge .result-num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--saffron);
}
.calc-result-badge .result-label {
  font-size: 13px;
  color: #aab8d4;
  margin-top: 4px;
}

/* Special calcs (multi-input) */
.calc-inputs { display: flex; flex-direction: column; gap: 16px; }
.calc-btn {
  background: var(--saffron);
  color: var(--white);
  border: none;
  padding: 14px 32px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
  width: 100%;
  margin-top: 8px;
}
.calc-btn:hover { background: #e07800; }
.result-panel {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  margin-top: 16px;
  display: none;
}
.result-panel.show { display: block; }
.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.result-item { background: var(--white); border-radius: 8px; padding: 14px 16px; border: 1px solid var(--border); }
.result-item .r-label { font-size: 12px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.result-item .r-val { font-size: 1.3rem; font-weight: 700; color: var(--navy); margin-top: 4px; }
.result-item.highlight { background: var(--navy); }
.result-item.highlight .r-label { color: #aab8d4; }
.result-item.highlight .r-val { color: var(--saffron); }

/* ===== CONTENT BELOW CALCULATOR ===== */
.content-section {
  background: var(--white);
  border-radius: 12px;
  border: 1.5px solid var(--border);
  padding: 32px;
  margin-bottom: 24px;
}
.content-section h2 {
  font-size: 1.2rem; font-weight: 700;
  color: var(--navy); margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--saffron-pale);
}
.content-section p { font-size: 15px; line-height: 1.8; color: #3a4260; margin-bottom: 12px; }
.content-section ul { padding-left: 20px; }
.content-section li { font-size: 15px; line-height: 1.8; color: #3a4260; margin-bottom: 6px; }

/* FAQ */
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:last-child { border-bottom: none; }
.faq-q {
  font-size: 15px; font-weight: 600; color: var(--navy);
  padding: 16px 0; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
}
.faq-q::after { content: '+'; color: var(--saffron); font-size: 20px; font-weight: 400; }
.faq-item.open .faq-q::after { content: '−'; }
.faq-a { font-size: 15px; color: #3a4260; line-height: 1.7; padding-bottom: 14px; display: none; }
.faq-item.open .faq-a { display: block; }

/* ===== ALL CALCULATORS PAGE ===== */
.all-calcs-wrap { max-width: 1100px; margin: 40px auto; padding: 0 20px; }
.all-calcs-search {
  display: flex;
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: 50px;
  overflow: hidden;
  margin-bottom: 32px;
  box-shadow: var(--shadow);
}
.all-calcs-search input {
  flex: 1; border: none; outline: none;
  padding: 14px 20px; font-size: 15px;
}
.all-calcs-search button {
  background: var(--navy); color: var(--white);
  border: none; padding: 14px 24px; cursor: pointer;
  font-weight: 600;
}
.calc-filter-tabs {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px;
}
.filter-tab {
  background: var(--white); border: 1.5px solid var(--border);
  color: var(--text-muted); padding: 7px 16px;
  border-radius: 20px; font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all 0.2s;
}
.filter-tab:hover, .filter-tab.active {
  background: var(--navy); color: var(--white); border-color: var(--navy);
}
.calcs-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.calc-list-item {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex; align-items: center; gap: 12px;
  transition: all 0.2s;
}
.calc-list-item:hover {
  border-color: var(--saffron);
  box-shadow: var(--shadow);
  transform: translateX(3px);
}
.calc-list-icon {
  width: 36px; height: 36px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.calc-list-item h3 { font-size: 14px; font-weight: 600; color: var(--navy); margin-bottom: 2px; }
.calc-list-item p { font-size: 12px; color: var(--text-muted); }
.no-results { text-align: center; padding: 60px 20px; color: var(--text-muted); }

/* ===== NEWS SECTION ===== */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.news-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.25s;
}
.news-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}
.news-card img { width: 100%; height: 180px; object-fit: cover; }
.news-card-body { padding: 18px; }
.news-tag {
  display: inline-block;
  background: var(--saffron-pale); color: var(--saffron);
  font-size: 11px; font-weight: 700;
  padding: 3px 10px; border-radius: 20px;
  text-transform: uppercase; letter-spacing: 0.5px;
  margin-bottom: 10px;
}
.news-card h3 { font-size: 15px; font-weight: 700; color: var(--navy); line-height: 1.4; margin-bottom: 8px; }
.news-card p { font-size: 13px; color: var(--text-muted); line-height: 1.6; }
.news-meta { font-size: 12px; color: var(--text-muted); margin-top: 12px; }

/* Single news article */
.article-wrap { max-width: 760px; margin: 40px auto; padding: 0 20px; }
.article-header { margin-bottom: 28px; }
.article-header h1 { font-size: 1.9rem; font-weight: 800; color: var(--navy); line-height: 1.3; margin-bottom: 14px; }
.article-meta { font-size: 13px; color: var(--text-muted); padding-bottom: 20px; border-bottom: 2px solid var(--saffron-pale); }
.article-body h2 { font-size: 1.2rem; font-weight: 700; color: var(--navy); margin: 28px 0 12px; }
.article-body p { font-size: 15px; color: #3a4260; line-height: 1.85; margin-bottom: 16px; }
.article-body ul { padding-left: 20px; margin-bottom: 16px; }
.article-body li { font-size: 15px; color: #3a4260; line-height: 1.8; margin-bottom: 6px; }

/* ===== SIDEBAR & RELATED ===== */
.related-calcs { background: var(--white); border: 1.5px solid var(--border); border-radius: var(--radius); padding: 20px; margin-top: 24px; }
.related-calcs h3 { font-size: 14px; font-weight: 700; color: var(--navy); margin-bottom: 14px; text-transform: uppercase; letter-spacing: 0.5px; }
.related-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
  color: var(--navy-light); font-size: 14px;
  transition: color 0.2s;
}
.related-link:last-child { border-bottom: none; }
.related-link:hover { color: var(--saffron); }
.related-link::before { content: '→'; color: var(--saffron); }

/* ===== FOOTER ===== */
#site-footer {
  background: var(--navy);
  color: #8fa3cc;
  padding: 48px 20px 24px;
  margin-top: 60px;
}
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand .site-name { color: var(--white); font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.footer-brand p { font-size: 14px; line-height: 1.7; }
.footer-col h4 { color: var(--white); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 14px; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: #8fa3cc; font-size: 14px; transition: color 0.2s; }
.footer-col a:hover { color: var(--saffron); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px;
}
.footer-bottom a { color: #8fa3cc; }
.footer-bottom a:hover { color: var(--saffron); }
.footer-badge {
  background: rgba(255,140,0,0.15);
  color: var(--saffron);
  padding: 4px 12px; border-radius: 20px;
  font-size: 12px; font-weight: 600;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .hero h1 { font-size: 1.6rem; }
  .hero-stats { gap: 20px; }
  .hero-stat strong { font-size: 1.4rem; }
  .calc-row { grid-template-columns: 1fr; }
  .swap-btn { width: 100%; border-radius: 8px; margin: 0; }
  .result-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer-brand { grid-column: 1/-1; }
  #site-nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--navy); padding: 16px; }
  #site-nav.open { display: block; }
  #site-nav ul { flex-direction: column; }
  .hamburger { display: block; }
}
@media (max-width: 480px) {
  .cat-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 10px; text-align: center; }
}
