/* ============================================================
   Smart Tools Daily — Shared Stylesheet
   Link this in every tool page. Tool-specific styles stay
   inline in each page's <style> tag.
   ============================================================ */

/* ── DESIGN TOKENS ────────────────────────────────────────── */
:root {
  --bg:      #0b1220;
  --card:    #0f1a2e;
  --card2:   #0c1528;
  --text:    #eef2ff;
  --muted:   rgba(238, 242, 255, .65);
  --muted2:  rgba(238, 242, 255, .40);
  --line:    rgba(255, 255, 255, .10);
  --line2:   rgba(255, 255, 255, .06);
  --accent:  #38bdf8;
  --accent2: #22c55e;
  --danger:  #fb7185;
  --warn:    #fbbf24;
  --radius:  22px;
  --shadow:  0 24px 80px rgba(0,0,0,.55), 0 4px 20px rgba(0,0,0,.3);
}

/* ── BASE RESET ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; }

body {
  min-height: 100%;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background:
    radial-gradient(ellipse 1000px 650px at 15% -10%, rgba(56,189,248,.13), transparent 60%),
    radial-gradient(ellipse 700px  500px at 85%  15%, rgba(34,197, 94,.10), transparent 55%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── HEADER ───────────────────────────────────────────────── */
header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(11,18,32,.80);
  border-bottom: 1px solid var(--line);
  /* thin accent gradient at the very top */
  background-image: linear-gradient(
    to bottom,
    rgba(56,189,248,.18) 0px,
    rgba(56,189,248,.18) 2px,
    transparent 2px
  );
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* ── brand ── */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.brand-icon {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, rgba(56,189,248,.14), rgba(34,197,94,.14));
  border: 1px solid rgba(56,189,248,.24);
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.brand-icon svg { width: 18px; height: 18px; }

.brand-icon--sm {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.brand-icon--sm svg { width: 14px; height: 14px; }

.brand-text {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .1px;
  white-space: nowrap;
}

/* ── nav ── */
.header-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.header-nav a {
  padding: 7px 11px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 13.5px;
  border-radius: 8px;
  transition: background .15s, color .15s;
}

.header-nav a:hover {
  background: rgba(255,255,255,.07);
  color: var(--text);
}

/* active state */
.header-nav a.nav-active {
  background: rgba(56,189,248,.13);
  color: var(--accent);
}

.header-nav a.nav-active:hover {
  background: rgba(56,189,248,.18);
}

/* ── lang pill ── */
.lang-pill {
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.04);
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: .3px;
  white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s;
}

.lang-pill:hover {
  background: rgba(56,189,248,.10);
  color: var(--text);
  border-color: rgba(56,189,248,.3);
}

/* ── hamburger ── */
.menu-btn {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 9px;
  cursor: pointer;
  color: var(--muted);
  line-height: 0;
  transition: background .15s, color .15s;
}

.menu-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}

.menu-btn:hover { background: rgba(255,255,255,.07); color: var(--text); }

@media (max-width: 720px) {
  .header-nav {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: rgba(11,18,32,.98);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: 8px 16px 14px;
    gap: 2px;
  }
  .header-nav.open { display: flex; }
  .header-nav a { padding: 10px 12px; }
  .menu-btn { display: inline-flex; }
}

/* ── BREADCRUMB ───────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--muted2);
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.breadcrumb a { color: var(--muted); text-decoration: none; transition: color .15s; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb-sep { color: var(--muted2); }
.breadcrumb-curr { color: var(--text); font-weight: 600; }

/* ── PAGE HEADER (tool title + subtitle above the card) ───── */
.page-header { text-align: center; margin-bottom: 24px; }

.page-header h1 {
  font-size: clamp(26px, 5.5vw, 34px);
  font-weight: 900;
  letter-spacing: -.5px;
  line-height: 1.1;
  margin-bottom: 8px;
}

.page-header p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

/* ── SECTION DIVIDER ──────────────────────────────────────── */
.section-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--line) 30%, var(--line) 70%, transparent);
  margin: 52px 0;
}

/* ── SEO / CONTENT TEXT ───────────────────────────────────── */
.seo { color: var(--muted); font-size: 14.5px; line-height: 1.75; }
.seo h2 { font-size: 20px; font-weight: 800; color: var(--text); margin-bottom: 12px; }
.seo h3 { font-size: 15.5px; font-weight: 700; color: var(--text); margin: 24px 0 8px; }
.seo p  { margin-bottom: 14px; }
.seo a  { color: var(--accent); text-decoration: none; font-weight: 700; }
.seo a:hover { text-decoration: underline; }

.section-title { font-size: 20px; font-weight: 800; margin-bottom: 16px; }
.section-intro { color: var(--muted); font-size: 14px; margin-bottom: 16px; }

/* ── FAQ ──────────────────────────────────────────────────── */
.faq-list { display: grid; gap: 8px; }

.faq-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(255,255,255,.025), rgba(255,255,255,.01));
  overflow: hidden;
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 13px 16px;
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  user-select: none;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  font-size: 19px;
  color: var(--muted);
  line-height: 1;
  flex-shrink: 0;
}

.faq-item[open] summary::after { content: "−"; }

.faq-body {
  padding: 0 16px 14px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.65;
}

/* ── RELATED CARDS ────────────────────────────────────────── */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.related-card {
  display: block;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(255,255,255,.035), rgba(255,255,255,.01));
  text-decoration: none;
  color: var(--text);
  transition: border-color .2s, transform .2s, background .2s;
}

.related-card:hover {
  border-color: rgba(56,189,248,.3);
  background: linear-gradient(160deg, rgba(56,189,248,.06), rgba(255,255,255,.01));
  transform: translateY(-2px);
}

.related-card strong { display: block; font-size: 14.5px; font-weight: 700; margin-bottom: 5px; }
.related-card span   { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.4; }

/* ── AUTHOR BOX ───────────────────────────────────────────── */
.author-box {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 20px 24px;
  margin-top: 40px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(56,189,248,.06), rgba(34,197,94,.06));
  border: 1px solid var(--line);
}

.author-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(56,189,248,.2), rgba(34,197,94,.2));
  border: 1px solid rgba(56,189,248,.2);
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 17px;
  color: var(--accent);
  flex-shrink: 0;
}

.author-info strong { display: block; font-size: 14.5px; margin-bottom: 2px; }
.author-info span   { display: block; color: var(--muted); font-size: 13px; margin-bottom: 5px; }
.author-info a      { color: var(--accent); text-decoration: none; font-size: 12.5px; font-weight: 600; }
.author-info a:hover { text-decoration: underline; }

/* ── FOOTER ───────────────────────────────────────────────── */
footer { border-top: 1px solid var(--line); }

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px 32px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
}

.footer-brand { flex-shrink: 0; max-width: 240px; }

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  margin-bottom: 14px;
}

.footer-tagline { color: var(--muted2); font-size: 13px; line-height: 1.65; }

.footer-nav { display: flex; gap: 48px; }

.footer-nav-col { display: flex; flex-direction: column; gap: 10px; }

.footer-nav-col a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  transition: color .15s;
}

.footer-nav-col a:hover { color: var(--text); }

.footer-legal a { color: var(--muted2); font-size: 13px; }

.footer-copy {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 24px 24px;
  font-size: 12px;
  color: var(--muted2);
  border-top: 1px solid var(--line2);
}

@media (max-width: 640px) {
  .footer-inner { flex-direction: column; gap: 28px; }
  .footer-nav { gap: 28px; }
  .footer-brand { max-width: 100%; }
}

/* ── DATE TRIO ────────────────────────────────────────────── */
/* Three-part date input: Year / Month / Day                  */
/* Pair with assets/js/date-trio.js                           */
.date-trio {
  display: grid;
  grid-template-columns: 2fr 2.5fr 1.5fr;
  gap: 10px;
}

.dt-part {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dt-lbl {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--muted);
}

.date-trio input[type="number"],
.date-trio select {
  width: 100%;
  padding: 14px 14px;
  font-size: 17px;
  font-weight: 600;
  font-family: inherit;
  color: var(--text);
  background: rgba(255,255,255,.045);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
  color-scheme: dark;
}

.date-trio input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.date-trio input[type="number"]::-webkit-outer-spin-button,
.date-trio input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; }

.date-trio select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpolyline points='1 1.5 6 6.5 11 1.5' fill='none' stroke='rgba(238,242,255,0.4)' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

.date-trio select option { background: #0f1a2e; color: #eef2ff; }

.date-trio input[type="number"]:hover,
.date-trio select:hover {
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.18);
}

.date-trio input[type="number"]:focus,
.date-trio select:focus {
  border-color: rgba(56,189,248,.65);
  box-shadow: 0 0 0 4px rgba(56,189,248,.12);
  background: rgba(56,189,248,.04);
}

/* Subtle green tint once a field has a valid value */
.date-trio .dt-filled {
  border-color: rgba(34,197,94,.3);
  background: rgba(34,197,94,.03);
}

.date-trio .dt-filled:focus {
  border-color: rgba(56,189,248,.65);
  box-shadow: 0 0 0 4px rgba(56,189,248,.12);
  background: rgba(56,189,248,.04);
}

@media (max-width: 400px) {
  .date-trio input[type="number"],
  .date-trio select {
    padding: 12px 10px;
    font-size: 15px;
  }
  .date-trio select {
    padding-right: 28px;
    background-position: right 10px center;
  }
}

/* ── UTILITY ──────────────────────────────────────────────── */
.hidden { display: none !important; }

/* ── LISTING PAGES: TOOL ROWS ──────────────────────────── */
/* Used on homepage, tools index, and category pages        */

.tools-list {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(255,255,255,.025), rgba(255,255,255,.01));
  overflow: hidden;
}

.tool-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  text-decoration: none;
  color: var(--text);
  position: relative;
  border-bottom: 1px solid var(--line2);
  transition: background .12s;
}

.tool-row:last-child { border-bottom: none; }
.tool-row:hover { background: rgba(255,255,255,.04); }

.tool-row::before {
  content: '';
  position: absolute;
  left: 0; top: 20%; bottom: 20%;
  width: 2.5px;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
  opacity: 0;
  transition: opacity .15s;
}

.tool-row:hover::before { opacity: 1; }

.tool-row-icon {
  font-size: 17px;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  flex-shrink: 0;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.tool-row-body { flex: 1; min-width: 0; }

.tool-row-name {
  font-weight: 700;
  font-size: 14px;
  display: block;
  margin-bottom: 2px;
}

.tool-row-desc {
  color: var(--muted);
  font-size: 12.5px;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tool-row-arrow {
  color: var(--muted2);
  flex-shrink: 0;
  width: 15px; height: 15px;
  stroke: currentColor; fill: none;
  stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity .15s, transform .15s, color .15s;
}

.tool-row:hover .tool-row-arrow {
  opacity: 1;
  transform: translateX(0);
  color: var(--accent);
}

.badge-new {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .5px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(34,197,94,.13);
  color: var(--accent2);
  flex-shrink: 0;
}

/* Category section divider header */
.cat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 0 10px;
}

.cat-label {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: var(--muted2);
  white-space: nowrap;
}

.cat-line { flex: 1; height: 1px; background: var(--line2); }

.cat-count {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted2);
  white-space: nowrap;
}

.cat-view-all {
  display: flex;
  justify-content: flex-end;
  padding: 6px 0 16px;
}

.cat-view-all a {
  color: var(--muted2);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color .15s;
}

.cat-view-all a:hover { color: var(--accent); }

.cat-view-all svg {
  width: 12px; height: 12px;
  stroke: currentColor; fill: none;
  stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round;
}

@media (max-width: 520px) {
  .tool-row-desc { display: none; }
}
