/* =============================================================
   StarlineCart — global stylesheet
   Mobile-first. No external fonts/frameworks -> zero extra requests.
   ============================================================= */

:root {
  --navy: #0d1b34;
  --navy-soft: #33415c;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --blue-light: #eaf2ff;
  --gray-900: #111827;
  --gray-600: #4b5563;
  --gray-500: #6b7280;
  --gray-300: #d1d5db;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --surface: #f8fafc;
  --white: #ffffff;

  --green-bg: #dcfce7;  --green-fg: #16a34a;
  --blue-bg: #dbeafe;   --blue-fg: #2563eb;
  --pink-bg: #fde2ec;   --pink-fg: #db2777;
  --purple-bg: #f3e8ff; --purple-fg: #9333ea;
  --orange-bg: #ffedd5; --orange-fg: #ea580c;
  --indigo-bg: #e0e7ff; --indigo-fg: #4f46e5;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 999px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 16px 40px rgba(15, 23, 42, 0.12);
  --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--gray-900);
  background: var(--white);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { color: var(--navy); margin: 0 0 0.5em; line-height: 1.2; }
p { margin: 0 0 1em; color: var(--gray-600); }
button { font: inherit; cursor: pointer; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.icon { width: 20px; height: 20px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-full);
  font-weight: 600;
  border: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn-primary {
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  color: var(--white);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-outline {
  background: var(--white);
  color: var(--navy);
  border: 1px solid var(--gray-200);
}
.btn-outline:hover { border-color: var(--blue); color: var(--blue); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--gray-200);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 16px;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue), var(--navy));
  color: var(--white);
  flex-shrink: 0;
}
.logo-badge .logo-icon { width: 22px; height: 22px; }
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-name { font-size: 1.3rem; font-weight: 800; color: var(--navy); }
.logo-name .accent { color: var(--blue); }
.logo-tagline { font-size: 0.72rem; color: var(--gray-500); font-weight: 500; }

.main-nav ul { display: flex; align-items: center; gap: 28px; }
.main-nav a {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--gray-900);
  padding: 8px 0;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover { color: var(--blue); }
.main-nav > ul > li:first-child > a { color: var(--blue); border-color: var(--blue); }
.main-nav .chevron { width: 14px; height: 14px; }

.has-dropdown { position: relative; }
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 10px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 220px;
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: 0.15s ease;
}
.has-dropdown:hover .dropdown-menu,
.has-dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown-menu li a { padding: 10px 12px; border-radius: var(--radius-sm); display: block; font-weight: 500; }
.dropdown-menu li a:hover { background: var(--surface); color: var(--blue); }

.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  border: 1px solid var(--gray-200);
  background: var(--white);
  color: var(--navy);
}
.icon-btn:hover { border-color: var(--blue); color: var(--blue); }
.menu-toggle { display: none; }

@media (max-width: 900px) {
  .main-nav {
    position: fixed;
    inset: 76px 0 0 0;
    background: var(--white);
    padding: 20px;
    transform: translateX(100%);
    transition: transform 0.2s ease;
    overflow-y: auto;
  }
  .main-nav.open { transform: translateX(0); }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 4px; }
  .main-nav a { padding: 14px 4px; border-bottom: 1px solid var(--gray-100); }
  .dropdown-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: none; display: none; margin: 0 0 0 12px; }
  .has-dropdown.open .dropdown-menu { display: block; }
  .menu-toggle { display: inline-flex; }
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(180deg, var(--blue-light) 0%, #ffffff 100%);
  padding: 64px 0 48px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  max-width: 900px;
  margin: 0 auto 18px;
}
.hero-subtitle {
  max-width: 620px;
  margin: 0 auto 32px;
  font-size: 1.05rem;
  color: var(--gray-600);
}
.search-form {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 680px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-md);
  padding: 6px 6px 6px 22px;
}
.search-form .icon { color: var(--gray-500); flex-shrink: 0; }
.search-form input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1rem;
  padding: 12px 6px;
  background: transparent;
}
.search-form button { flex-shrink: 0; padding: 12px 26px; }

.popular-searches {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  max-width: 780px;
  margin: 28px auto 0;
}
.popular-searches .label { font-weight: 700; color: var(--navy); margin-right: 4px; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: var(--radius-full);
  background: var(--white);
  border: 1px solid var(--gray-200);
  font-weight: 600;
  font-size: 0.9rem;
}
.pill .icon { width: 16px; height: 16px; }
.pill:hover { border-color: var(--blue); color: var(--blue); }

/* ---------- Section heading ---------- */
.section {
  padding: 56px 0;
}
.section-header { text-align: center; max-width: 640px; margin: 0 auto 36px; }
.section-header h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.section-header p { font-size: 1rem; }

/* ---------- Category grid ---------- */
.category-grid, .tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}
.category-card, .tool-card {
  position: relative;
  display: block;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 26px 22px 22px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.category-card:hover, .tool-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--gray-300);
}
.category-icon, .tool-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  margin-bottom: 16px;
}
.category-icon .icon, .tool-icon .icon { width: 26px; height: 26px; }
.category-card h3, .tool-card h3 { font-size: 1.05rem; margin-bottom: 6px; }
.category-card p, .tool-card p { font-size: 0.9rem; margin-bottom: 0; }
.card-arrow {
  position: absolute;
  top: 26px;
  right: 22px;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
}
.card-arrow .icon { width: 16px; height: 16px; }

.tool-card { display: flex; align-items: flex-start; gap: 16px; padding-right: 56px; }
.tool-card .tool-icon { margin-bottom: 0; flex-shrink: 0; }
.tool-card-body h3 { margin-bottom: 4px; }
.tool-card-body p { font-size: 0.88rem; }

.icon-green   { background: var(--green-bg);  color: var(--green-fg); }
.icon-blue    { background: var(--blue-bg);   color: var(--blue-fg); }
.icon-pink    { background: var(--pink-bg);   color: var(--pink-fg); }
.icon-purple  { background: var(--purple-bg); color: var(--purple-fg); }
.icon-orange  { background: var(--orange-bg); color: var(--orange-fg); }
.icon-indigo  { background: var(--indigo-bg); color: var(--indigo-fg); }
.icon-green-text   { color: var(--green-fg); }
.icon-blue-text    { color: var(--blue-fg); }
.icon-pink-text    { color: var(--pink-fg); }
.icon-purple-text  { color: var(--purple-fg); }
.icon-orange-text  { color: var(--orange-fg); }
.icon-indigo-text  { color: var(--indigo-fg); }

/* ---------- Why / trust strip ---------- */
.trust-strip { background: var(--surface); }
.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  text-align: center;
}
.trust-item { padding: 12px; }
.trust-item .icon-circle {
  width: 52px; height: 52px; margin: 0 auto 14px;
  border-radius: var(--radius-full);
  background: var(--blue-light);
  color: var(--blue);
  display: flex; align-items: center; justify-content: center;
}
.trust-item h3 { font-size: 1rem; }
.trust-item p { font-size: 0.88rem; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(135deg, var(--navy), var(--blue-dark));
  border-radius: var(--radius-lg);
  padding: 48px 32px;
  text-align: center;
  color: var(--white);
}
.cta-band h2 { color: var(--white); }
.cta-band p { color: rgba(255,255,255,0.85); max-width: 520px; margin-left: auto; margin-right: auto; }
.cta-band .btn-outline { background: transparent; border-color: rgba(255,255,255,0.4); color: var(--white); }
.cta-band .btn-outline:hover { border-color: var(--white); }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { padding: 18px 0 0; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 6px; font-size: 0.85rem; color: var(--gray-500); }
.breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: 6px; color: var(--gray-300); }
.breadcrumbs a:hover { color: var(--blue); }

/* ---------- Tool page ---------- */
.tool-hero { padding: 32px 0 8px; }
.tool-hero-head { display: flex; align-items: center; gap: 16px; margin-bottom: 8px; }
.tool-hero-head .tool-icon { width: 56px; height: 56px; }
.tool-hero h1 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); margin-bottom: 4px; }
.tool-hero .lede { font-size: 1rem; max-width: 640px; }

.tool-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  padding: 20px 0 40px;
}
@media (min-width: 800px) {
  .tool-layout { grid-template-columns: 1.1fr 1fr; align-items: start; }
}
.calc-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 28px;
}
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; color: var(--navy); }
.field .hint { font-size: 0.78rem; color: var(--gray-500); margin-top: 4px; }
.field input[type="number"],
.field input[type="text"],
.field input[type="date"],
.field select {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-300);
  font-size: 1rem;
  background: var(--white);
  color: var(--gray-900);
}
.field input:focus, .field select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-light);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.calc-actions { display: flex; gap: 10px; margin-top: 6px; }

.result-card {
  background: linear-gradient(160deg, var(--blue-light), #ffffff);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 28px;
  min-height: 100%;
}
.result-card h2 { font-size: 1.05rem; }
.result-value { font-size: 2.2rem; font-weight: 800; color: var(--blue-dark); margin: 6px 0 2px; }
.result-sub { font-size: 0.88rem; color: var(--gray-500); margin-bottom: 18px; }
.result-breakdown { display: flex; flex-direction: column; gap: 10px; }
.result-breakdown .row { display: flex; justify-content: space-between; font-size: 0.92rem; padding: 10px 0; border-bottom: 1px dashed var(--gray-200); }
.result-breakdown .row span:first-child { color: var(--gray-600); }
.result-breakdown .row span:last-child { font-weight: 700; color: var(--navy); }
.result-placeholder { color: var(--gray-500); font-size: 0.92rem; }

.info-block { padding: 8px 0 48px; }
.info-block h2 { font-size: 1.3rem; margin-top: 1.2em; }
.info-block ul { list-style: disc; padding-left: 20px; margin-bottom: 1em; }
.info-block li { color: var(--gray-600); margin-bottom: 6px; }

.related-tools { padding: 8px 0 56px; }
.related-tools h2 { font-size: 1.3rem; margin-bottom: 18px; }

/* ---------- Listing pages ---------- */
.page-hero { padding: 40px 0 16px; }
.page-hero h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
.page-hero p { max-width: 620px; }
.listing { padding: 24px 0 56px; }

/* ---------- Simple pages (about/contact) ---------- */
.prose { padding: 20px 0 56px; max-width: 760px; }
.prose h2 { margin-top: 1.4em; }
.prose p { color: var(--gray-600); }

.contact-grid { display: grid; grid-template-columns: 1fr; gap: 24px; padding: 20px 0 56px; }
@media (min-width: 800px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
.contact-info .icon-row { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.contact-info .icon-row .icon-circle { width: 40px; height: 40px; border-radius: var(--radius-full); background: var(--blue-light); color: var(--blue); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: rgba(255,255,255,0.75); margin-top: 40px; }
.footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  padding: 56px 0 32px;
}
@media (min-width: 700px) {
  .footer-inner { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
}
.footer-brand .logo-name { color: var(--white); }
.footer-tagline { font-size: 0.9rem; margin-top: 14px; max-width: 320px; }
.footer-col h3 { color: var(--white); font-size: 0.95rem; margin-bottom: 14px; }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 0.9rem; }
.footer-col a:hover { color: var(--white); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); }
.footer-bottom-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 18px 0; font-size: 0.82rem; }

/* ---------- 404 ---------- */
.error-page { text-align: center; padding: 90px 0; }
.error-page h1 { font-size: 5rem; }
