/*
Theme Name: Electric Fan Hub Breeze
Theme URI: https://electricfant.com
Description: Breezy light magazine-grid theme for Electric Fan Hub. Manrope font, flat cards, cyan accent, airy multi-column layout.
Author: Electric Fan Hub
Version: 2.0
Tested up to: 7.0
Requires PHP: 8.0
License: GNU GPLv2 or later
Text Domain: efan
*/

/* ===== Google Fonts: Manrope ===== */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

/* ===== Design tokens ===== */
:root {
  --cyan:   #00a8cc;
  --cyan-dk:#0089a8;
  --cyan-lt:#e0f7fd;
  --ink:    #0e1c26;
  --ink-2:  #3a4d5c;
  --muted:  #6b7e8d;
  --line:   #cde8f0;
  --bg:     #f7fbfd;
  --surface:#ffffff;
  --stripe: #00a8cc;
  --good:   #067a6f;
  --max:    780px;
  --wide:   1160px;
  --font:   'Manrope', system-ui, -apple-system, sans-serif;
  --radius: 6px;
}

/* ===== Reset / base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.72 var(--font);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font); line-height: 1.22; font-weight: 800; color: var(--ink); }
h1 { font-size: 2.15rem; margin: .15em 0 .4em; }
h2 { font-size: 1.55rem; margin: 1.8em 0 .5em; }
h3 { font-size: 1.18rem; margin: 1.4em 0 .4em; }
p, ul, ol { margin: 0 0 1.1em; }
ul, ol { padding-left: 1.4em; }
li { margin: .28em 0; }

/* ===== Top colour stripe ===== */
body::before {
  content: '';
  display: block;
  height: 4px;
  background: linear-gradient(90deg, var(--cyan) 0%, #7eddee 50%, var(--cyan) 100%);
  background-size: 200% 100%;
  animation: breeze 4s linear infinite;
}
@keyframes breeze {
  0%   { background-position: 0% 0; }
  100% { background-position: 200% 0; }
}

/* ===== HEADER — left brand + right nav (horizontal bar, not centered) ===== */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
}
.hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 22px;
  height: 62px;
  gap: 16px;
}
.brand {
  font-family: var(--font);
  font-weight: 800;
  font-size: 1.22rem;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: -.01em;
  flex-shrink: 0;
}
.brand .brand-fan { color: var(--cyan); }
.brand .brand-icon {
  display: inline-block;
  font-style: normal;
  animation: spin-fan 6s linear infinite;
  margin-right: 4px;
  font-size: 1.1em;
  line-height: 1;
}
@keyframes spin-fan {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ===== Primary navigation ===== */
.nav-primary { flex: 1; display: flex; justify-content: flex-end; }
.nav-primary .menu {
  display: flex;
  flex-wrap: nowrap;
  list-style: none;
  margin: 0; padding: 0;
  gap: 2px;
  align-items: center;
}
.nav-primary .menu li { list-style: none; margin: 0; }
.nav-primary .menu a {
  color: var(--ink-2);
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
  padding: 6px 13px;
  border-radius: var(--radius);
  display: inline-block;
  transition: background .13s, color .13s;
  white-space: nowrap;
}
.nav-primary .menu a:hover,
.nav-primary .menu .current-menu-item > a,
.nav-primary .menu .current-cat > a,
.nav-primary .menu .current-menu-parent > a,
.nav-primary .menu .current-post-parent > a {
  color: var(--cyan);
  background: var(--cyan-lt);
  text-decoration: none;
}

/* ===== Layout ===== */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.wrap-wide { max-width: var(--wide); margin: 0 auto; padding: 0 22px; }
.site-main { padding: 32px 0 56px; }

/* ===== HERO BANNER — horizontal split ===== */
.efan-hero {
  background: linear-gradient(110deg, #e9f8fd 0%, var(--surface) 60%);
  border-bottom: 1px solid var(--line);
  padding: 40px 22px 36px;
}
.efan-hero-inner {
  max-width: var(--wide);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 28px;
}
.efan-hero-text { flex: 1 1 auto; }
.efan-hero-badge {
  display: inline-block;
  background: var(--cyan);
  color: #fff;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.efan-hero h1 {
  font-size: 2.05rem;
  margin: 0 0 .35em;
  color: var(--ink);
  line-height: 1.15;
}
.efan-hero p {
  color: var(--ink-2);
  font-size: 1.05rem;
  margin: 0;
  max-width: 520px;
  font-weight: 500;
}
.efan-hero-icon {
  font-size: 5rem;
  line-height: 1;
  animation: wobble-fan 3s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes wobble-fan {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(15deg); }
  75% { transform: rotate(-15deg); }
}

/* ===== MAGAZINE GRID — home/archive ===== */
.efan-magazine {
  max-width: var(--wide);
  margin: 32px auto 0;
  padding: 0 22px;
}

/* Feature card (first post) — full-width horizontal */
.efan-feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--line);
  border-top: 3px solid var(--cyan);
  background: var(--surface);
  margin-bottom: 28px;
  border-radius: var(--radius);
  overflow: hidden;
}
.efan-feature:hover { box-shadow: 0 4px 18px rgba(0,168,204,.12); }
.efan-feature a { color: inherit; text-decoration: none; display: contents; }
.efan-feature-img {
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--cyan) 0%, #0089a8 100%) center/cover no-repeat;
  min-height: 220px;
}
.efan-feature-img.has-img { background-size: cover; background-color: var(--cyan-lt); }
.efan-feature-body {
  padding: 28px 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.efan-tag {
  display: inline-block;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 8px;
}
.efan-feature-body h2 {
  font-size: 1.45rem;
  margin: 0 0 .5em;
  border: none;
  padding: 0;
  line-height: 1.22;
  color: var(--ink);
}
.efan-feature-body .ex {
  font-size: .93rem;
  color: var(--muted);
  margin: 0;
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.efan-feature-body .efan-read {
  margin-top: 16px;
  color: var(--cyan);
  font-weight: 700;
  font-size: .88rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
}
.efan-feature-body .efan-read::after { content: ' →'; }

/* Secondary cards grid (remaining posts) */
.efan-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

/* Card — flat, cyan top-bar, clean */
.efan-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid transparent;
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-top-color .16s, box-shadow .16s;
  display: flex;
  flex-direction: column;
}
.efan-card:hover {
  border-top-color: var(--cyan);
  box-shadow: 0 3px 14px rgba(0,168,204,.1);
}
.efan-card a { color: inherit; text-decoration: none; display: flex; flex-direction: column; height: 100%; }
.efan-card .thumb {
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, #b3ecf7 0%, var(--cyan-lt) 100%) center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
}
.efan-card .thumb span {
  color: var(--cyan-dk);
  font-weight: 800;
  font-size: .82rem;
  text-align: center;
  padding: 8px;
  letter-spacing: .01em;
  line-height: 1.3;
}
.efan-card .thumb.has-img span { display: none; }
.efan-card .card-body {
  padding: 14px 16px 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.efan-card .efan-tag { margin-bottom: 6px; }
.efan-card h3 {
  font-size: 1.03rem;
  margin: 0 0 .4em;
  color: var(--ink);
  line-height: 1.3;
  font-weight: 700;
}
.efan-card .ex {
  font-size: .85rem;
  color: var(--muted);
  margin: 0;
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

/* Wider 2-col card in the grid (every 4th, nth-child tricks) */
.efan-grid .efan-card:nth-child(3n+1) {
  grid-column: span 1;
}

/* ===== Pagination ===== */
.efan-pagination {
  max-width: var(--wide);
  margin: 30px auto 0;
  padding: 0 22px;
}
.efan-pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.efan-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-weight: 700;
  font-size: .88rem;
  color: var(--ink-2);
  transition: background .12s, color .12s, border-color .12s;
}
.efan-pagination .page-numbers:hover,
.efan-pagination .page-numbers.current {
  background: var(--cyan);
  color: #fff;
  border-color: var(--cyan);
  text-decoration: none;
}

/* ===== SINGLE article ===== */
.efan-single { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.efan-single .breadcrumb {
  font-size: .78rem;
  color: var(--muted);
  margin: 0 0 1.1em;
  font-weight: 500;
}
.efan-single .breadcrumb a { color: var(--muted); }
.efan-single .breadcrumb a:hover { color: var(--cyan); text-decoration: none; }
.post-title {
  font-size: 2.1rem;
  margin: .1em 0 .3em;
  line-height: 1.15;
  color: var(--ink);
}
.meta-line {
  color: var(--muted);
  font-size: .84rem;
  margin-bottom: 1.4em;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}
.meta-line::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 2px;
  background: var(--cyan);
  border-radius: 2px;
  flex-shrink: 0;
}
.efan-feat-img {
  border-radius: var(--radius);
  margin: 0 0 1.6em;
  width: 100%;
  height: auto;
}

/* ===== .entry (article content) ===== */
.entry h2 {
  font-size: 1.48rem;
  border: none;
  margin: 1.9em 0 .5em;
  padding: 0;
  padding-left: 12px;
  border-left: 4px solid var(--cyan);
}
.entry h3 {
  font-size: 1.15rem;
  margin: 1.45em 0 .4em;
  color: var(--ink);
}
.entry p { margin: 0 0 1.1em; }
.entry a { color: var(--cyan); font-weight: 600; }
.entry a:hover { color: var(--cyan-dk); }

/* Custom bullets — wind-arrow style */
.entry ul { list-style: none; padding-left: 1.5em; }
.entry ul > li { position: relative; padding-left: .1em; margin: .38em 0; }
.entry ul > li::before {
  content: '›';
  position: absolute;
  left: -1.2em;
  top: 0;
  color: var(--cyan);
  font-weight: 800;
  font-size: 1.15em;
  line-height: 1.55;
}
.entry ol { padding-left: 1.5em; }
.entry ol > li::marker { color: var(--cyan); font-weight: 800; }

/* ===== .cmpc-disc (affiliate disclosure) ===== */
.cmpc-disc {
  background: var(--cyan-lt);
  border: 1px solid var(--line);
  border-left: none;
  border-right: none;
  padding: 9px 16px;
  font-size: .81rem;
  color: var(--ink-2);
  font-weight: 600;
  margin: 0 0 1.6em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cmpc-disc::before {
  content: '⚡';
  font-size: 1em;
  flex-shrink: 0;
}

/* ===== .cta-amz (Amazon CTA button) — sharp-cornered pill, gradient ===== */
.cta-amz {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(90deg, var(--cyan) 0%, #0089a8 100%);
  color: #fff !important;
  font-family: var(--font);
  font-weight: 800;
  font-size: .95rem;
  text-decoration: none;
  padding: 11px 26px;
  border-radius: 4px;
  margin: 8px 0 18px;
  letter-spacing: .01em;
  transition: filter .14s, transform .08s;
  box-shadow: 0 2px 0 rgba(0,0,0,.12);
}
.cta-amz::before { content: '→'; font-size: 1.05em; }
.cta-amz:hover {
  filter: brightness(1.08);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,168,204,.3);
}

/* ===== Tables (.efan-tablewrap) ===== */
.efan-tablewrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.5em 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.efan-tablewrap::-webkit-scrollbar { height: 6px; }
.efan-tablewrap::-webkit-scrollbar-thumb { background: var(--line); border-radius: 6px; }
.entry table {
  border-collapse: collapse;
  width: 100%;
  min-width: 520px;
  font-size: .93rem;
  margin: 0;
}
.entry th, .entry td {
  border: 1px solid var(--line);
  padding: 9px 13px;
  text-align: left;
  vertical-align: top;
}
.entry th {
  background: var(--cyan-lt);
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}
.entry tbody tr:nth-child(even) { background: #f5fbfd; }

/* ===== Related posts section ===== */
.efan-related { margin-top: 44px; }
.efan-related h2 {
  font-size: 1.25rem;
  margin: 0 0 18px;
  border-left: 4px solid var(--cyan);
  padding-left: 12px;
  border-bottom: none;
}

/* ===== page.php ===== */
.efan-page { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.efan-page .breadcrumb { font-size: .78rem; color: var(--muted); margin: 0 0 1em; font-weight: 500; }
.efan-page .breadcrumb a { color: var(--muted); }

/* ===== FOOTER ===== */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  margin-top: 48px;
}
.foot-inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 28px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.foot-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 24px;
}
.foot-brand {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--ink);
  text-decoration: none;
}
.foot-brand span { color: var(--cyan); }
.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  align-items: center;
}
.foot-links a {
  font-size: .84rem;
  font-weight: 600;
  color: var(--ink-2);
  text-decoration: none;
}
.foot-links a:hover { color: var(--cyan); text-decoration: none; }
.foot-bottom {
  font-size: .79rem;
  color: var(--muted);
  line-height: 1.5;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  font-weight: 500;
}

/* ===== RESPONSIVE ===== */

/* Tablet: 2-col grid */
@media (max-width: 900px) {
  .efan-grid { grid-template-columns: repeat(2, 1fr); }
  .efan-hero-icon { font-size: 3.5rem; }
}

/* Mobile: single col */
@media (max-width: 640px) {
  body { font-size: 16px; line-height: 1.65; }

  .hd { padding: 0 15px; height: 56px; }
  .brand { font-size: 1.08rem; }
  .nav-primary .menu a { font-size: .82rem; padding: 5px 9px; }

  .efan-hero { padding: 24px 15px 20px; }
  .efan-hero h1 { font-size: 1.55rem; }
  .efan-hero p { font-size: .97rem; }
  .efan-hero-icon { display: none; }

  .efan-magazine { padding: 0 15px; margin-top: 20px; }
  .efan-feature { grid-template-columns: 1fr; }
  .efan-feature-img { aspect-ratio: 16/8; min-height: 160px; }
  .efan-feature-body { padding: 18px 16px; }
  .efan-feature-body h2 { font-size: 1.2rem; }

  .efan-grid { grid-template-columns: 1fr; gap: 14px; }

  .efan-single, .efan-page { padding: 0 15px; }
  .post-title { font-size: 1.6rem; }
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }
  h3 { font-size: 1.08rem; }

  .cta-amz { display: block; text-align: center; padding: 12px 18px; }
  .entry table { font-size: .86rem; }
  .entry th, .entry td { padding: 7px 9px; }

  .foot-top { flex-direction: column; align-items: flex-start; }
  .foot-links { gap: 4px 12px; }

  /* mobile nav: swipeable single row */
  .nav-primary {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-right: -15px;
  }
  .nav-primary::-webkit-scrollbar { display: none; }
  .nav-primary .menu { flex-wrap: nowrap; width: max-content; }
}

/* ===== Archive/search page titles ===== */
.efan-archive-header {
  max-width: var(--wide);
  margin: 0 auto 4px;
  padding: 28px 22px 0;
}
.efan-archive-header h1 {
  font-size: 1.75rem;
  margin: 0 0 .2em;
  border-left: 4px solid var(--cyan);
  padding-left: 12px;
}
.efan-archive-header .arch-desc {
  color: var(--muted);
  font-size: .95rem;
  padding-left: 16px;
  margin: 0;
}

/* ===== Breadcrumb (shared) ===== */
.breadcrumb { font-size: .78rem; color: var(--muted); margin: 0 0 1em; font-weight: 500; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--cyan); text-decoration: none; }
