/* ============================================================
   EMAIL GENERATOR THEME — assets/theme.css
   ============================================================ */

/* ── Google Fonts imported via functions.php ── */

/* ── Design Tokens ──────────────────────────────────────── */
:root {
  /* Brand */
  --brand:         #F37120;
  --brand-dark:    #D45F0F;
  --brand-light:   #FF8C42;

  /* Light Mode */
  --bg:            #ffffff;
  --bg-2:          #f7f7f7;
  --surface:       #f0f0f0;
  --border:        #e2e2e2;
  --text:          #111111;
  --text-2:        #444444;
  --text-3:        #888888;
  --nav-active:    #eeeeee;
  --btn-border:    #d0d0d0;

  /* Dark Mode vars (applied via [data-theme=dark]) */
  --radius:        8px;
  --radius-lg:     14px;
  --shadow-sm:     0 1px 4px rgba(0,0,0,.08);
  --shadow-md:     0 4px 20px rgba(0,0,0,.12);
  --nav-h:         64px;
  --font-head:     'Sora', sans-serif;
  --font-body:     'DM Sans', sans-serif;

  --transition:    0.2s ease;
}

[data-theme="dark"] {
  --bg:            #1a1a1a;
  --bg-2:          #111111;
  --surface:       #2a2a2a;
  --border:        #333333;
  --text:          #f0f0f0;
  --text-2:        #bbbbbb;
  --text-3:        #777777;
  --nav-active:    #333333;
  --btn-border:    #444444;
  --shadow-sm:     0 1px 4px rgba(0,0,0,.4);
  --shadow-md:     0 4px 20px rgba(0,0,0,.5);
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background var(--transition), color var(--transition);
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }

/* ── HEADER ─────────────────────────────────────────────── */
#site-header {
     justify-content: space-around!important;
  position: sticky; top: 0; z-index: 1000;
  height: var(--nav-h);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 28px;
  transition: background var(--transition), border-color var(--transition);
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-head);
  font-size: 16px; font-weight: 700;
  color: var(--text);
  flex-shrink: 0;
}
.logo-icon {
  width: 38px; height: 38px;
  background: var(--brand);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.logo-icon svg { color: #fff; }

/* desktop nav */
.desktop-nav {
  display: flex; align-items: center; gap: 4px;
  margin-left: 36px;
}
.desktop-nav a {
  font-size: 14px; font-weight: 500;
  color: var(--text-2);
  padding: 7px 14px;
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}
.desktop-nav a:hover { background: var(--surface); color: var(--text); }
.desktop-nav a.active { background: var(--nav-active); color: var(--text); font-weight: 600; }
.desktop-nav a.active-orange { color: var(--brand); font-weight: 600; }

.hdr-spacer { flex: 1; }

.right-controls { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  width: 36px; height: 36px;
  border: none; background: transparent;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-2);
  transition: background var(--transition), color var(--transition);
}
.icon-btn:hover { background: var(--surface); color: var(--text); }

.outline-btn {
  padding: 7px 16px;
  border: 1px solid var(--btn-border);
  background: transparent;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 14px; font-weight: 500;
  color: var(--text); cursor: pointer; white-space: nowrap;
  transition: background var(--transition), border-color var(--transition);
}
.outline-btn:hover { background: var(--surface); border-color: #aaa; }

.hamburger {
  display: none;
  width: 36px; height: 36px;
  border: 1px solid var(--btn-border);
  background: transparent;
  border-radius: var(--radius);
  align-items: center; justify-content: center;
  cursor: pointer; color: var(--text);
}

/* ── MOBILE DRAWER ───────────────────────────────────────── */
.mobile-overlay {
  display: none; position: fixed; inset: 0; z-index: 2000;
}
.mobile-overlay.open { display: block; }
.mobile-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.25);
}
.mobile-drawer {
  position: absolute; top: 0; left: 0; right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
  animation: slideDown .22s ease;
}
@keyframes slideDown {
  from { transform: translateY(-10px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.mobile-drawer-top {
  height: var(--nav-h);
  display: flex; align-items: center;
  padding: 0 16px; gap: 10px;
  border-bottom: 1px solid var(--border);
}
.mobile-drawer-top .spacer { flex: 1; }
.close-btn {
  width: 36px; height: 36px;
  border: 1px solid var(--btn-border);
  background: transparent;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-2);
}
.mobile-nav { padding: 8px 12px 0; display: flex; flex-direction: column; gap: 2px; }
.mobile-nav a {
  display: flex; align-items: center; gap: 14px;
  font-size: 15px; font-weight: 500;
  color: var(--text);
  padding: 13px 14px;
  border-radius: var(--radius);
  transition: background var(--transition);
}
.mobile-nav a svg { color: var(--text-3); flex-shrink: 0; }
.mobile-nav a:hover { background: var(--surface); }
.mobile-nav a.active { background: var(--nav-active); }
.mobile-nav a.active svg { color: var(--text); }
.mobile-nav a.active-orange { color: var(--brand); }

/* ── FOOTER ─────────────────────────────────────────────── */
#site-footer {
  background: #1a1a1a;
  color: #cccccc;
  padding: 64px 0 0;
}
[data-theme="dark"] #site-footer { background: #111111; border-top: 1px solid #2a2a2a; }

.footer-grid {
  max-width: 1200px; margin: 0 auto;
  padding: 0 28px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr 1.4fr;
  gap: 40px;
}
.footer-brand .logo { color: #f0f0f0; }
.footer-brand p {
  font-size: 13.5px; color: #999; line-height: 1.65;
  margin: 16px 0 22px;
}
.footer-socials { display: flex; gap: 14px; }
.footer-socials a {
  color: #aaa;
  transition: color var(--transition);
}
.footer-socials a:hover { color: var(--brand); }

.footer-col h4 {
  font-family: var(--font-head);
  font-size: 15px; font-weight: 700;
  color: #f0f0f0;
  margin-bottom: 20px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col ul li a {
  font-size: 13.5px; color: #999;
  transition: color var(--transition);
}
.footer-col ul li a:hover { color: #f0f0f0; }
.footer-col ul li a.orange { color: var(--brand); }

/* subscribe */
.footer-sub p { font-size: 13.5px; color: #999; margin-bottom: 18px; line-height: 1.6; }
.subscribe-row { display: flex; gap: 0; }
.subscribe-row input {
  flex: 1;
  background: #2a2a2a;
  border: 1px solid #3a3a3a;
  border-right: none;
  border-radius: var(--radius) 0 0 var(--radius);
  padding: 10px 14px;
  font-family: var(--font-body);
  font-size: 13.5px;
  color: #f0f0f0;
  outline: none;
  transition: border-color var(--transition);
}
.subscribe-row input::placeholder { color: #666; }
.subscribe-row input:focus { border-color: var(--brand); }
.subscribe-btn {
  background: #f0f0f0;
  color: #111;
  border: none;
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 10px 20px;
  font-family: var(--font-head);
  font-size: 13.5px; font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
  white-space: nowrap;
}
.subscribe-btn:hover { background: #fff; }

.footer-divider {
  max-width: 1200px; margin: 48px auto 0;
  padding: 0 28px;
  border-top: 1px solid #2a2a2a;
}
.footer-bottom {
  max-width: 1200px; margin: 0 auto;
  padding: 20px 28px;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
}
.footer-bottom p { font-size: 13px; color: #666; }
.footer-bottom-links { display: flex; gap: 20px; }
.footer-bottom-links a { font-size: 13px; color: #999; transition: color var(--transition); }
.footer-bottom-links a:hover { color: #f0f0f0; }

/* ── HOME HERO ───────────────────────────────────────────── */
.home-hero {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d1a0a 50%, #1a1a1a 100%);
  padding: 90px 28px;
  text-align: center;
}
[data-theme="dark"] .home-hero { background: linear-gradient(135deg, #111 0%, #261508 50%, #111 100%); }
.home-hero .hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(243,113,32,.15);
  border: 1px solid rgba(243,113,32,.3);
  color: var(--brand-light);
  font-size: 12px; font-weight: 600; letter-spacing: .06em;
  padding: 5px 14px; border-radius: 20px;
  margin-bottom: 22px; text-transform: uppercase;
}
.home-hero h1 {
  font-family: var(--font-head);
  font-size: clamp(32px, 5vw, 58px);
  font-weight: 700; color: #f0f0f0;
  line-height: 1.18; margin-bottom: 18px;
}
.home-hero h1 span { color: var(--brand); }
.home-hero p {
  font-size: 17px; color: #aaa;
  max-width: 560px; margin: 0 auto 36px;
}
.hero-ctas { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.btn-primary {
  background: var(--brand);
  color: #fff; border: none;
  padding: 13px 30px;
  border-radius: var(--radius);
  font-family: var(--font-head);
  font-size: 15px; font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}
.btn-primary:hover { background: var(--brand-dark); transform: translateY(-1px); }
.btn-outline-light {
  background: transparent;
  color: #f0f0f0;
  border: 1px solid #444;
  padding: 13px 30px;
  border-radius: var(--radius);
  font-family: var(--font-head);
  font-size: 15px; font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}
.btn-outline-light:hover { background: rgba(255,255,255,.07); border-color: #888; }

/* ── ARCHIVE / BLOG SECTION ─────────────────────────────── */
.archive-section {
  max-width: 1200px; margin: 0 auto;
  padding: 60px 28px;
}
.section-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 32px; flex-wrap: wrap; gap: 16px;
}
.section-header h2 {
  font-family: var(--font-head);
  font-size: 28px; font-weight: 700;
}
.section-header h2 span { color: var(--brand); }

/* Search bar */
.archive-search {
  display: flex; align-items: center; gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
  max-width: 280px; width: 100%;
}
.archive-search input {
  flex: 1; border: none; outline: none;
  background: transparent;
  padding: 9px 14px;
  font-family: var(--font-body);
  font-size: 13.5px; color: var(--text);
}
.archive-search input::placeholder { color: var(--text-3); }
.archive-search button {
  border: none; background: transparent;
  padding: 0 12px; cursor: pointer;
  color: var(--text-3);
  transition: color var(--transition);
}
.archive-search button:hover { color: var(--brand); }

/* Category filter tabs */
.category-filters {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}
.cat-btn {
  padding: 7px 16px;
  border: 1px solid var(--border);
  background: transparent;
  border-radius: 20px;
  font-family: var(--font-body);
  font-size: 13px; font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  transition: all var(--transition);
}
.cat-btn:hover { border-color: var(--brand); color: var(--brand); }
.cat-btn.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

/* Posts grid */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  min-height: 300px;
  position: relative;
}
.posts-grid.loading::after {
  content: '';
  position: absolute; inset: 0;
  background: rgba(var(--bg), .6);
  display: flex; align-items: center; justify-content: center;
}

/* Post Card */
.post-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.post-card:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.post-card__thumb {
  display: block; position: relative;
  aspect-ratio: 16/9; overflow: hidden;
}
.post-card__thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.post-card:hover .post-card__thumb img { transform: scale(1.04); }
.post-card__badge {
  position: absolute; top: 12px; left: 12px;
  background: var(--brand);
  color: #fff;
  font-size: 11px; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase;
  padding: 3px 10px; border-radius: 4px;
}
.post-card__body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.post-card__meta {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text-3);
  margin-bottom: 10px;
}
.post-card__meta .dot { color: var(--text-3); }
.post-card__title {
  font-family: var(--font-head);
  font-size: 16px; font-weight: 700;
  line-height: 1.35; margin-bottom: 10px;
}
.post-card__title a { color: var(--text); transition: color var(--transition); }
.post-card__title a:hover { color: var(--brand); }
.post-card__excerpt { font-size: 13.5px; color: var(--text-2); line-height: 1.55; flex: 1; }
.post-card__read {
  display: inline-block;
  margin-top: 16px;
  font-size: 13px; font-weight: 600;
  color: var(--brand);
  transition: gap var(--transition);
}
.post-card__read:hover { color: var(--brand-dark); }

/* no posts */
.no-posts {
  grid-column: 1 / -1;
  text-align: center; padding: 60px 20px;
  color: var(--text-3);
}

/* AJAX loader spinner */
.ajax-loader {
  grid-column: 1 / -1;
  display: flex; justify-content: center; align-items: center;
  padding: 60px;
}
.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Pagination */
.archive-pagination {
  display: flex; justify-content: center;
  align-items: center; gap: 8px;
  margin-top: 48px; flex-wrap: wrap;
}
.page-btn {
  min-width: 36px; height: 36px;
  border: 1px solid var(--border);
  background: transparent;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 13.5px; color: var(--text-2);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  padding: 0 12px;
  transition: all var(--transition);
}
.page-btn:hover { border-color: var(--brand); color: var(--brand); }
.page-btn.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ── SINGLE POST ─────────────────────────────────────────── */
.single-wrap {
  max-width: 800px; margin: 0 auto;
  padding: 60px 28px;
}
.single-breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-3);
  margin-bottom: 28px;
}
.single-breadcrumb a { color: var(--text-3); transition: color var(--transition); }
.single-breadcrumb a:hover { color: var(--brand); }
.single-breadcrumb span { color: var(--text-3); }
.single-cat {
  display: inline-block;
  background: rgba(243,113,32,.12);
  color: var(--brand);
  font-size: 12px; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase;
  padding: 4px 12px; border-radius: 4px;
  margin-bottom: 18px;
}
.single-title {
  font-family: var(--font-head);
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 700; line-height: 1.22;
  margin-bottom: 20px;
}
.single-meta {
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap;
  font-size: 13.5px; color: var(--text-3);
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 36px;
}
.single-meta .author { font-weight: 600; color: var(--text-2); }
.single-featured-img {
  width: 100%; border-radius: var(--radius-lg);
  overflow: hidden; margin-bottom: 40px;
  aspect-ratio: 16/7;
}
.single-featured-img img { width: 100%; height: 100%; object-fit: cover; }

/* Post content typography */
.post-content { font-size: 16.5px; color: var(--text-2); line-height: 1.75; }
.post-content h2 {
  font-family: var(--font-head);
  font-size: 24px; font-weight: 700;
  color: var(--text);
  margin: 36px 0 14px;
}
.post-content h3 {
  font-family: var(--font-head);
  font-size: 20px; font-weight: 600;
  color: var(--text);
  margin: 28px 0 12px;
}
.post-content p { margin-bottom: 18px; }
.post-content ul, .post-content ol {
  margin: 0 0 18px 24px;
}
.post-content li { margin-bottom: 8px; }
.post-content a { color: var(--brand); border-bottom: 1px solid transparent; transition: border-color var(--transition); }
.post-content a:hover { border-color: var(--brand); }
.post-content blockquote {
  border-left: 3px solid var(--brand);
  margin: 28px 0;
  padding: 16px 24px;
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--text-2);
}
.post-content code {
  background: var(--surface);
  padding: 2px 7px; border-radius: 4px;
  font-size: 14px; color: var(--brand);
}
.post-content pre {
  background: #111; color: #f0f0f0;
  padding: 20px; border-radius: var(--radius);
  overflow-x: auto; margin-bottom: 20px;
}
.post-content img { border-radius: var(--radius); margin: 20px 0; }

/* Post tags */
.single-tags {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 40px; padding-top: 28px;
  border-top: 1px solid var(--border);
}
.single-tags a {
  padding: 5px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 12.5px; color: var(--text-2);
  transition: all var(--transition);
}
.single-tags a:hover { border-color: var(--brand); color: var(--brand); }

/* Related posts */
.related-posts {
  max-width: 1200px; margin: 0 auto;
  padding: 0 28px 60px;
  border-top: 1px solid var(--border);
  padding-top: 48px;
}
.related-posts h3 {
  font-family: var(--font-head);
  font-size: 22px; font-weight: 700;
  margin-bottom: 28px;
}

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .posts-grid  { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .desktop-nav  { display: none !important; }
  .outline-btn  { display: none !important; }
  .hamburger    { display: flex !important; }

  .home-hero { padding: 60px 20px; }

  .archive-section { padding: 40px 16px; }
  .section-header  { flex-direction: column; align-items: flex-start; }
  .archive-search  { max-width: 100%; }

  .posts-grid { grid-template-columns: 1fr; }

  .footer-grid { grid-template-columns: 1fr; gap: 36px; padding: 0 20px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }

  .single-wrap { padding: 40px 16px; }
  .related-posts { padding: 40px 16px; }
}

@media (max-width: 480px) {
  :root { --nav-h: 58px; }
  .home-hero h1 { font-size: 28px; }
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .btn-primary, .btn-outline-light { text-align: center; }
}
