/*
Theme Name: DoctorFixIt Appliance
Theme URI: https://example.com/doctorfixit-appliance
Author: OpenAI
Description: WordPress theme version of the uploaded DoctorFixItAppliance design, with static directory content, customizer-powered ad slots, customizable footer links, logo support, and favicon support.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: doctorfixit-appliance
*/

:root {
  --dfi-bg: #f8fafc;
  --dfi-surface: #ffffff;
  --dfi-surface-soft: #f8fafc;
  --dfi-border: #e2e8f0;
  --dfi-border-soft: #f1f5f9;
  --dfi-text: #0f172a;
  --dfi-text-soft: #475569;
  --dfi-text-muted: #94a3b8;
  --dfi-accent: #059669;
  --dfi-accent-soft: #ecfdf5;
  --dfi-accent-dark: #047857;
  --dfi-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
  --dfi-radius-xl: 24px;
  --dfi-radius-lg: 16px;
  --dfi-radius-md: 12px;
  --dfi-max: 1280px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--dfi-bg);
  color: var(--dfi-text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

img { max-width: 100%; height: auto; }

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0);
  border: 0;
}

.dfi-container {
  width: min(calc(100% - 32px), var(--dfi-max));
  margin: 0 auto;
}

.dfi-main { min-height: calc(100vh - 81px); }

.dfi-site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--dfi-border-soft);
}

.dfi-header-inner {
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.dfi-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.dfi-brand-icon {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  background: var(--dfi-accent);
  color: white;
  font-weight: 800;
  font-size: 24px;
  box-shadow: 0 10px 24px rgba(5, 150, 105, 0.24);
}

.dfi-brand-logo .custom-logo-link img {
  max-height: 52px;
  width: auto;
}

.dfi-brand-name {
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--dfi-text);
}

.dfi-brand-name span { color: var(--dfi-accent); }

.dfi-main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.dfi-main-nav > a {
  font-size: 0.95rem;
  font-weight: 700;
  color: #475569;
  transition: color .2s ease;
}

.dfi-main-nav > a:hover { color: var(--dfi-accent); }

.dfi-cta,
.dfi-inline-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  background: var(--dfi-text);
  color: #fff !important;
  border-radius: 14px;
  font-weight: 800;
  border: 0;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.dfi-cta:hover,
.dfi-inline-cta:hover {
  background: #1e293b;
}

.dfi-directory-hero {
  padding: 48px 0 20px;
}

.dfi-directory-intro {
  text-align: center;
  margin: 0 auto 32px;
  max-width: 840px;
}

.dfi-directory-intro h1 {
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1.1;
  margin: 0 0 18px;
  letter-spacing: -0.03em;
}

.dfi-directory-intro p {
  margin: 0;
  color: var(--dfi-text-soft);
  font-size: 1.1rem;
}

.dfi-search-wrap {
  position: relative;
  max-width: 720px;
  margin: 0 auto 28px;
}

.dfi-search-input {
  width: 100%;
  border: 1px solid var(--dfi-border);
  background: #fff;
  border-radius: 24px;
  padding: 18px 20px;
  color: var(--dfi-text);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
}

.dfi-search-input:focus {
  outline: 0;
  border-color: var(--dfi-accent);
  box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.12);
}

.dfi-search-results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 10px);
  background: #fff;
  border: 1px solid var(--dfi-border);
  border-radius: 18px;
  box-shadow: var(--dfi-shadow);
  padding: 8px;
  z-index: 30;
}

.dfi-search-result {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  transition: background .2s ease;
}

.dfi-search-result:hover { background: var(--dfi-accent-soft); }

.dfi-search-result strong {
  display: block;
  color: var(--dfi-text);
  font-size: 0.95rem;
}

.dfi-search-result span {
  display: block;
  color: var(--dfi-text-muted);
  font-size: 0.8rem;
}

.dfi-letter-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.dfi-letter-pill {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  background: #f1f5f9;
  color: #64748b;
  font-weight: 700;
  transition: all .2s ease;
}

.dfi-letter-pill:hover,
.dfi-letter-pill.is-active {
  background: var(--dfi-accent-soft);
  color: var(--dfi-accent-dark);
}

.dfi-directory-listing {
  padding: 16px 0 56px;
}

.dfi-listing-head {
  display: flex;
  gap: 20px;
  align-items: end;
  justify-content: space-between;
  margin: 0 0 24px;
}

.dfi-listing-head h2 {
  margin: 0;
  font-size: clamp(1.6rem, 2.2vw, 2.3rem);
  letter-spacing: -0.03em;
}

.dfi-listing-head p {
  margin: 0;
  color: var(--dfi-text-muted);
  font-weight: 600;
}

.dfi-topic-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.dfi-topic-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--dfi-border-soft);
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.03);
  transition: all .2s ease;
  min-height: 112px;
}

.dfi-topic-card:hover {
  transform: translateY(-1px);
  border-color: #a7f3d0;
  background: #f0fdf4;
  box-shadow: var(--dfi-shadow);
}

.dfi-topic-card h3 {
  margin: 0;
  color: #334155;
  font-size: 0.96rem;
  line-height: 1.45;
  text-transform: capitalize;
}

.dfi-topic-category,
.dfi-related-card span,
.dfi-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--dfi-accent-soft);
  color: var(--dfi-accent-dark);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.dfi-empty-state {
  text-align: center;
  background: #fff;
  border: 1px solid var(--dfi-border);
  border-radius: var(--dfi-radius-xl);
  padding: 56px 24px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.dfi-empty-state h1 { margin-top: 0; }

.dfi-article-page {
  padding: 48px 0 64px;
}

.dfi-article-wrap {
  max-width: 960px;
}

.dfi-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #64748b;
  font-size: 0.95rem;
  margin-bottom: 28px;
}

.dfi-back-link:hover { color: var(--dfi-accent); }

.dfi-article-header {
  margin-bottom: 34px;
}

.dfi-article-meta-top {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}

.dfi-read-time {
  color: var(--dfi-text-muted);
  font-size: 0.92rem;
  font-weight: 600;
}

.dfi-article-header h1 {
  margin: 0 0 20px;
  font-size: clamp(2.3rem, 4vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.dfi-keyword-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.dfi-keyword-tag {
  padding: 8px 12px;
  border-radius: 12px;
  background: #f8fafc;
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 700;
}

.dfi-keyword-tag.is-primary {
  background: var(--dfi-accent-soft);
  color: var(--dfi-accent-dark);
}

.dfi-share-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.dfi-share-row > span {
  color: var(--dfi-text-muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.dfi-share-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.dfi-share-links a,
.dfi-copy-link {
  padding: 10px 14px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.86rem;
  font-weight: 700;
  border: 0;
  cursor: pointer;
  transition: all .2s ease;
}

.dfi-share-links a:hover,
.dfi-copy-link:hover {
  background: var(--dfi-accent-soft);
  color: var(--dfi-accent-dark);
}

.dfi-copy-link.is-copied {
  background: var(--dfi-accent);
  color: #fff;
}

.dfi-article-content {
  background: #fff;
  border: 1px solid var(--dfi-border-soft);
  border-radius: 28px;
  padding: clamp(24px, 4vw, 44px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.dfi-article-content h2 {
  margin: 38px 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--dfi-border-soft);
  font-size: 1.75rem;
  line-height: 1.2;
}

.dfi-article-content h3 {
  margin: 26px 0 10px;
  font-size: 1.18rem;
  line-height: 1.3;
}

.dfi-article-content p {
  margin: 0 0 20px;
  color: var(--dfi-text-soft);
  font-size: 1rem;
}

.dfi-article-content strong { color: var(--dfi-text); }

.dfi-article-content ul,
.dfi-keyword-panel ul {
  margin: 0 0 18px 18px;
  padding: 0;
  color: var(--dfi-text-soft);
}

.dfi-article-content li,
.dfi-keyword-panel li {
  margin-bottom: 10px;
}

.dfi-keyword-panel {
  margin-top: 28px;
  padding: 28px;
  border-radius: 24px;
  background: #f8fafc;
  border: 1px solid var(--dfi-border);
}

.dfi-keyword-panel h3 {
  margin: 0 0 20px;
  font-size: 1.25rem;
}

.dfi-keyword-panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.dfi-panel-title {
  margin: 0 0 12px;
  color: #334155;
  font-weight: 800;
}

.dfi-related-articles {
  margin-top: 36px;
  padding-top: 32px;
  border-top: 1px solid var(--dfi-border);
}

.dfi-related-articles h3 {
  margin: 0 0 18px;
  font-size: 1.3rem;
}

.dfi-related-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.dfi-related-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid var(--dfi-border);
  background: #fff;
  transition: all .2s ease;
}

.dfi-related-card:hover {
  border-color: #a7f3d0;
  background: #f0fdf4;
}

.dfi-related-card strong {
  color: var(--dfi-text);
  font-size: 0.95rem;
  line-height: 1.4;
}

.dfi-ad-slot {
  width: min(calc(100% - 32px), var(--dfi-max));
  margin: 18px auto;
  padding: 16px;
  border-radius: 18px;
  border: 1px dashed #cbd5e1;
  background: #fff;
  overflow-x: auto;
}

.dfi-site-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 56px 0 32px;
  margin-top: 30px;
}

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

.dfi-footer-brand {
  display: block;
  margin-bottom: 14px;
  color: #fff;
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.dfi-footer-about p {
  max-width: 540px;
  margin: 0;
  line-height: 1.8;
}

.dfi-footer-links h4 {
  margin: 0 0 16px;
  color: #fff;
  font-size: 1rem;
}

.dfi-footer-links ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.dfi-footer-links li + li { margin-top: 10px; }

.dfi-footer-links a {
  color: #94a3b8;
  transition: color .2s ease;
}

.dfi-footer-links a:hover { color: #6ee7b7; }

.dfi-footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  padding-top: 20px;
  text-align: center;
  font-size: 0.86rem;
}

.dfi-generic-page {
  padding: 48px 0 64px;
}

.dfi-default-article {
  background: #fff;
  border: 1px solid var(--dfi-border);
  border-radius: 24px;
  padding: 28px;
}

@media (max-width: 1080px) {
  .dfi-topic-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .dfi-header-inner {
    min-height: auto;
    padding: 18px 0;
    flex-direction: column;
    align-items: flex-start;
  }

  .dfi-main-nav {
    width: 100%;
    justify-content: flex-start;
    gap: 16px;
  }

  .dfi-topic-grid,
  .dfi-related-grid,
  .dfi-keyword-panel-grid,
  .dfi-footer-grid {
    grid-template-columns: 1fr;
  }

  .dfi-listing-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .dfi-topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dfi-article-content { border-radius: 22px; }
  .dfi-site-footer { padding-top: 42px; }
}

@media (max-width: 420px) {
  .dfi-topic-grid { grid-template-columns: 1fr; }
  .dfi-main-nav { gap: 12px; }
  .dfi-main-nav > a { font-size: 0.9rem; }
}
