/*
Theme Name:   WPDean
Theme URI:    https://wpdean.com/
Author:       WPDean
Author URI:   https://wpdean.com/
Description:  Custom theme for WPDean — free tools, tutorials and resources for web designers and developers.
Version:      1.0.0
Requires PHP: 7.4
Text Domain:  wpdean
*/

/* ==========================================================================
   DESIGN TOKENS
   ========================================================================== */
:root {
  --blue: #1847F0;
  --blue-dark: #1038d0;
  --blue-light: #4066f5;
  --black: #080C14;
  --white: #FFFFFF;
  --gray: #F2F4FA;
  --text-muted: #8892A4;
  --text-body: #232A3B;
  --green: #2CFF6E;
  --border: rgba(24,71,240,0.12);
}

/* ==========================================================================
   RESET & BASE
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--white);
  color: var(--black);
  overflow-x: hidden;
  font-weight: 400;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 48px; }
section { padding: 100px 0; }
code, .mono { font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace; }
.visually-hidden { position: absolute; left: -9999px; }
h1, h2, h3 { font-family: 'Fraunces', serif; color: var(--black); letter-spacing: -0.02em; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--blue); color: white; padding: 14px 24px;
  z-index: 1000; border-radius: 0 0 8px 0; font-weight: 600; text-decoration: none;
}
.skip-link:focus { left: 0; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ==========================================================================
   NAVIGATION (shared — header.php)
   ========================================================================== */
nav#navbar {
  position: sticky; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .3s;
}
nav#navbar.scrolled { box-shadow: 0 4px 40px rgba(24,71,240,0.08); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.nav-logo { font-family: 'Fraunces', serif; font-size: 22px; font-weight: 800; color: var(--black); letter-spacing: -0.5px; text-decoration: none; flex-shrink: 0; }
.nav-logo span { color: var(--blue); }
.nav-links { display: flex; align-items: center; gap: 32px; list-style: none; }
.nav-links > li { position: relative; }
.nav-links > li > a {
  display: flex; align-items: center; gap: 5px; font-size: 14px; font-weight: 500;
  color: var(--black); text-decoration: none; position: relative; transition: color .2s;
}
.nav-links > li > a::after {
  content: ''; position: absolute; bottom: -22px; left: 0; right: 0; height: 2px;
  background: var(--blue); transform: scaleX(0); transform-origin: left; transition: transform .3s;
}
.nav-links > li > a:hover { color: var(--blue); }
.nav-links > li > a:hover::after { transform: scaleX(1); }
.nav-chevron {
  display: inline-block; width: 7px; height: 7px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px); transition: transform .2s; flex-shrink: 0;
}
.nav-links > li:hover .nav-chevron { transform: rotate(-135deg) translateY(-2px); }
.dropdown {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  background: white; border: 1px solid var(--border); border-radius: 14px; padding: 16px 8px 8px; min-width: 220px;
  box-shadow: 0 20px 60px rgba(24,71,240,0.12); opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .2s, visibility .2s; z-index: 200; list-style: none;
}
.dropdown::before { content: ''; position: absolute; top: -16px; left: 0; right: 0; height: 16px; }
.nav-links > li:hover .dropdown { opacity: 1; visibility: visible; pointer-events: all; }
.dropdown li { position: relative; }
.dropdown a {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 14px; border-radius: 8px;
  font-size: 13px; font-weight: 500; color: var(--black); white-space: nowrap; text-decoration: none; transition: background .15s, color .15s;
}
.dropdown a:hover { background: var(--gray); color: var(--blue); }
.dropdown li:hover > a { color: var(--blue); }
.subdropdown {
  position: absolute; top: 0; left: 100%; margin-left: 6px; background: white; border: 1px solid var(--border);
  border-radius: 14px; padding: 8px; min-width: 190px; box-shadow: 0 20px 60px rgba(24,71,240,0.12);
  opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .2s, visibility .2s; list-style: none; z-index: 201;
}
.subdropdown::before { content: ''; position: absolute; top: 0; left: -6px; width: 6px; height: 100%; }
.dropdown li:hover > .subdropdown { opacity: 1; visibility: visible; pointer-events: all; }
.subdropdown a { font-size: 13px; }
.nav-cta {
  color: var(--blue) !important; padding: 9px 22px; border-radius: 100px; font-weight: 600 !important; font-size: 14px;
  border: 2px solid var(--blue); text-decoration: none; transition: background .2s, color .2s, transform .2s; white-space: nowrap;
}
.nav-cta:hover { background: var(--blue); color: var(--white) !important; transform: translateY(-1px); }
.nav-links > li > .nav-cta::after { display: none; }
.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; flex-shrink: 0; }
.hamburger span { width: 22px; height: 2px; background: var(--black); transition: all .25s; display: block; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav panel */
.mobile-nav {
  display: none; position: fixed; top: 72px; left: 0; right: 0; bottom: 0; background: white; z-index: 90;
  padding: 24px 24px 40px; overflow-y: auto; transform: translateY(-10px); opacity: 0; visibility: hidden;
  transition: opacity .25s, transform .25s, visibility .25s;
}
.mobile-nav.open { opacity: 1; visibility: visible; transform: translateY(0); }
.mobile-nav > ul { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.mobile-nav > ul > li { border-bottom: 1px solid var(--border); }
.mobile-nav > ul > li > a { display: block; padding: 16px 4px; font-size: 18px; font-weight: 600; text-decoration: none; color: var(--black); }
.mobile-nav details > summary {
  display: flex; align-items: center; justify-content: space-between; padding: 16px 4px; font-size: 18px; font-weight: 600;
  color: var(--black); cursor: pointer; list-style: none;
}
.mobile-nav details > summary::-webkit-details-marker { display: none; }
.mobile-nav details > summary::after {
  content: ''; width: 8px; height: 8px; border-right: 1.5px solid var(--text-muted); border-bottom: 1.5px solid var(--text-muted);
  transform: rotate(45deg); transition: transform .2s; flex-shrink: 0;
}
.mobile-nav details[open] > summary::after { transform: rotate(-135deg); }
.mobile-nav .sub-list { list-style: none; padding: 0 4px 12px 12px; display: flex; flex-direction: column; }
.mobile-nav .sub-list a { display: block; padding: 10px 0; font-size: 15px; font-weight: 500; color: var(--text-muted); text-decoration: none; }
.mobile-nav .sub-list a:hover { color: var(--blue); }
.mobile-nav details details summary { font-size: 14.5px; font-weight: 600; color: var(--black); padding: 10px 0; }
.mobile-nav .nav-cta { display: block; margin-top: 20px; text-align: center; }
.mobile-nav > ul > li:has(> a.nav-cta) { border-bottom: none; padding-top: 8px; }

/* ==========================================================================
   BUTTONS (shared)
   ========================================================================== */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px; background: var(--blue); color: var(--white);
  font-size: 15px; font-weight: 600; padding: 15px 30px; border-radius: 100px; text-decoration: none;
  transition: all .25s; border: 2px solid var(--blue);
}
.btn-primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); transform: translateY(-2px); box-shadow: 0 14px 40px rgba(24,71,240,0.3); }
.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px; background: transparent; color: var(--black);
  font-size: 15px; font-weight: 600; padding: 15px 30px; border-radius: 100px; text-decoration: none;
  transition: all .25s; border: 2px solid var(--border);
}
.btn-secondary:hover { border-color: var(--blue); color: var(--blue); transform: translateY(-2px); }

/* ==========================================================================
   SECTION COMMON (shared)
   ========================================================================== */
.section-header { max-width: 640px; margin-bottom: 56px; }
.section-label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--blue); margin-bottom: 14px; display: block;
}
.section-title { font-size: clamp(26px, 3vw, 40px); font-weight: 800; line-height: 1.12; }
.section-desc { font-size: 16px; color: var(--text-muted); line-height: 1.7; margin-top: 14px; }
.section-footer-link {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 44px;
  font-size: 14px; font-weight: 600; color: var(--blue); text-decoration: none; transition: gap .2s;
}
.section-footer-link:hover { gap: 12px; }

/* ==========================================================================
   HOME: HERO
   ========================================================================== */
.hero { padding: 72px 0 90px; position: relative; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.hero::before {
  content: ''; position: absolute; top: -200px; right: -200px; width: 560px; height: 560px;
  background: radial-gradient(circle, rgba(24,71,240,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.hero-content { position: relative; z-index: 2; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--blue); margin-bottom: 20px;
}
.hero-eyebrow::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
h1 { font-size: clamp(34px, 4.4vw, 56px); font-weight: 800; line-height: 1.06; margin-bottom: 22px; max-width: 620px; }
.hero-desc { font-size: 17px; color: var(--text-muted); line-height: 1.7; max-width: 480px; margin-bottom: 36px; }
.hero-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 44px; }

/* Ambient CSS-snippet cloud — decorative hero visual */
.demo-card {
  position: relative; z-index: 2; background: var(--white); border-radius: 20px;
  box-shadow: 0 40px 100px rgba(8,12,20,0.16); border: 1px solid var(--border); overflow: hidden;
}
.demo-header { background: var(--black); height: 40px; display: flex; align-items: center; padding: 0 16px; gap: 20px; }
.demo-dots { display: flex; gap: 6px; }
.demo-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.35); }
.demo-title { font-size: 12px; color: rgba(255,255,255,0.6); font-weight: 500; }
.demo-body {
  padding: 40px 30px; min-height: 340px; display: flex; flex-wrap: wrap; align-content: center; justify-content: center;
  gap: 12px 10px; position: relative; background: var(--gray);
}
.demo-body::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(24,71,240,0.08), transparent 60%),
              radial-gradient(circle at 75% 70%, rgba(44,255,110,0.10), transparent 55%);
}
.chip {
  position: relative; background: var(--white); border-radius: 9px; padding: 9px 13px; box-shadow: 0 10px 26px rgba(8,12,20,0.09);
  font-size: 12px; font-weight: 500; color: var(--black); white-space: nowrap; border-left: 3px solid var(--blue);
  animation: chipFloat 5s ease-in-out infinite;
}
.chip .chip-prop { color: var(--blue-dark); }
.chip .chip-val { color: var(--text-muted); }
.chip:nth-child(1) { border-left-color: var(--blue); transform: rotate(-2deg); animation-delay: 0s; }
.chip:nth-child(2) { border-left-color: var(--green); transform: rotate(1.5deg); animation-delay: .6s; }
.chip:nth-child(3) { border-left-color: var(--black); transform: rotate(-1deg); animation-delay: 1.2s; }
.chip:nth-child(4) { border-left-color: var(--blue); transform: rotate(2deg); animation-delay: 1.8s; }
.chip:nth-child(5) { border-left-color: var(--green); transform: rotate(-1.5deg); animation-delay: 2.4s; }
.chip:nth-child(6) { border-left-color: var(--black); transform: rotate(1deg); animation-delay: 3s; }
.chip:nth-child(7) { border-left-color: var(--blue); transform: rotate(-2.5deg); animation-delay: 3.6s; }
.chip:nth-child(8) { border-left-color: var(--green); transform: rotate(1.5deg); animation-delay: 4.2s; }
.chip:nth-child(9) { border-left-color: var(--black); transform: rotate(-1deg); animation-delay: 4.8s; }
@keyframes chipFloat { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
.demo-footer-link {
  display: block; text-align: center; padding: 14px; font-size: 13px; font-weight: 600; color: var(--blue);
  text-decoration: none; border-top: 1px solid var(--border);
}
.demo-footer-link:hover { background: var(--gray); }

/* ==========================================================================
   HOME: TOOLS GRID
   ========================================================================== */
.tools-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.tool-card {
  border: 1px solid var(--border); border-radius: 18px; padding: 26px; text-decoration: none; color: inherit;
  display: block; transition: all .25s; background: var(--white);
}
.tool-card:hover { transform: translateY(-4px); box-shadow: 0 20px 50px rgba(24,71,240,0.12); border-color: var(--blue); }
.tool-icon {
  width: 44px; height: 44px; border-radius: 12px; background: rgba(24,71,240,0.08);
  display: flex; align-items: center; justify-content: center; color: var(--blue); margin-bottom: 18px; transition: all .25s;
}
.tool-card:hover .tool-icon { background: var(--blue); color: white; }
.tool-name { font-family: 'Fraunces', serif; font-size: 16px; font-weight: 700; margin-bottom: 8px; letter-spacing: -0.01em; }
.tool-desc { font-size: 13.5px; color: var(--text-muted); line-height: 1.6; margin-bottom: 16px; }
.tool-link { font-size: 13px; font-weight: 600; color: var(--blue); }

/* ==========================================================================
   HOME: TUTORIALS
   ========================================================================== */
.tutorials-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.tutorial-tile { border: 1px solid var(--border); border-radius: 18px; padding: 32px; transition: border-color .2s; }
.tutorial-tile:hover { border-color: var(--blue); }
.tutorial-tile-head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.tutorial-icon {
  width: 40px; height: 40px; border-radius: 10px; background: var(--black); color: white;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.tutorial-cat-name { font-family: 'Fraunces', serif; font-size: 18px; font-weight: 700; }
.tutorial-links { list-style: none; display: flex; flex-direction: column; gap: 4px; margin-bottom: 18px; }
.tutorial-links a {
  display: block; padding: 9px 0; font-size: 14.5px; color: var(--black); text-decoration: none;
  border-bottom: 1px solid var(--border); transition: color .2s, padding-left .2s;
}
.tutorial-links li:last-child a { border-bottom: none; }
.tutorial-links a:hover { color: var(--blue); padding-left: 6px; }
.tutorial-browse { font-size: 13px; font-weight: 600; color: var(--blue); text-decoration: none; }

/* ==========================================================================
   NEWSLETTER (home — black full section) + SIDEBAR SIGNUP (shared widget)
   ========================================================================== */
.newsletter { background: var(--black); color: white; position: relative; overflow: hidden; }
.newsletter::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 15% 30%, rgba(24,71,240,0.3) 0%, transparent 55%),
              radial-gradient(ellipse at 85% 75%, rgba(44,255,110,0.08) 0%, transparent 50%);
  pointer-events: none;
}
.newsletter-inner { position: relative; z-index: 2; max-width: 620px; margin: 0 auto; text-align: center; }
.newsletter .section-label { color: var(--green); }
.newsletter h2 { color: white; font-size: clamp(26px, 3vw, 38px); }
.newsletter p { color: rgba(255,255,255,0.6); font-size: 16px; line-height: 1.7; margin-top: 16px; max-width: 480px; margin-left: auto; margin-right: auto; }
.signup-form { display: flex; gap: 10px; margin-top: 36px; }
.signup-form input[type="email"] {
  flex: 1; padding: 15px 18px; border-radius: 100px; border: 1.5px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.06); color: white; font-size: 15px; font-family: 'DM Sans', sans-serif; outline: none; transition: border-color .2s;
}
.signup-form input[type="email"]::placeholder { color: rgba(255,255,255,0.4); }
.signup-form input[type="email"]:focus { border-color: var(--blue-light); }
.signup-form button {
  background: var(--green); color: var(--black); border: none; border-radius: 100px; padding: 0 30px; font-size: 15px;
  font-weight: 700; cursor: pointer; white-space: nowrap; font-family: 'DM Sans', sans-serif; transition: transform .2s, background .2s;
  display: flex; align-items: center; gap: 8px;
}
.signup-form button:hover { transform: translateY(-2px); }
.signup-form button:disabled { opacity: 0.7; cursor: default; transform: none; }
.signup-spinner {
  width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(8,12,20,0.25); border-top-color: var(--black);
  animation: spin 0.7s linear infinite; display: none;
}
.signup-form button.loading .signup-spinner { display: inline-block; }
.signup-form button.loading .signup-label { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.signup-error { color: #ff8080; font-size: 13px; margin-top: 10px; text-align: left; display: none; }
.signup-error.visible { display: block; }
.signup-trust { font-size: 12.5px; color: rgba(255,255,255,0.4); margin-top: 18px; line-height: 1.6; }
.signup-trust a { color: rgba(255,255,255,0.6); text-decoration: underline; }
.signup-success { display: none; text-align: left; background: rgba(44,255,110,0.08); border: 1px solid rgba(44,255,110,0.25); border-radius: 14px; padding: 20px 24px; margin-top: 36px; }
.signup-success.visible { display: block; }
.signup-success p:first-child { color: white; font-weight: 600; margin-top: 0; font-size: 15px; }
.signup-success a { color: var(--green); font-weight: 600; text-decoration: none; }
.signup-form-wrap.hidden { display: none; }

/* Sidebar subscribe widget variant (single/page/category/archive/search) */
/* .widget.subscribe-widget (not just .subscribe-widget) so this reliably
   overrides the base .widget background/border/padding regardless of
   where either rule sits in the cascade. */
.widget.subscribe-widget {
  background: linear-gradient(155deg, var(--blue-light) 0%, var(--blue) 45%, var(--blue-dark) 100%)!important;
  border: none; position: relative; overflow: hidden; color: white;
  padding: 30px 26px; box-shadow: 0 24px 60px rgba(24,71,240,0.35);
}
.subscribe-widget::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 88% -8%, rgba(255,255,255,0.22) 0%, transparent 45%),
              radial-gradient(circle at -10% 115%, rgba(44,255,110,0.28) 0%, transparent 50%);
  pointer-events: none;
}
.subscribe-widget::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12); pointer-events: none; }
.subscribe-widget > * { position: relative; z-index: 2; }
.subscribe-icon {
  width: 44px; height: 44px; border-radius: 12px; background: rgba(255,255,255,0.16); border: 1px solid rgba(255,255,255,0.18);
  display: flex; align-items: center; justify-content: center; color: white; margin-bottom: 18px;
}
.subscribe-widget .widget-title { color: white; border-bottom: none; padding-bottom: 0; margin-bottom: 10px; font-size: 17px; }
.subscribe-desc { font-size: 13.5px; color: rgba(255,255,255,0.78); line-height: 1.65; margin-bottom: 22px; }
.signup-form-sidebar { display: flex; flex-direction: column; gap: 10px; }
.signup-form-sidebar input[type="email"] {
  padding: 13px 16px; border-radius: 100px; border: 1.5px solid rgba(255,255,255,0.28);
  background: rgba(255,255,255,0.1); color: white; font-size: 14px; font-family: 'DM Sans', sans-serif; outline: none; transition: border-color .2s, background .2s;
}
.signup-form-sidebar input[type="email"]::placeholder { color: rgba(255,255,255,0.55); }
.signup-form-sidebar input[type="email"]:focus { border-color: white; background: rgba(255,255,255,0.16); }
.signup-form-sidebar button {
  background: var(--green); color: var(--black); border: none; border-radius: 100px; padding: 13px; font-size: 14px;
  font-weight: 700; cursor: pointer; font-family: 'DM Sans', sans-serif; transition: transform .2s, box-shadow .2s;
  display: flex; align-items: center; justify-content: center; gap: 8px; box-shadow: 0 10px 24px rgba(44,255,110,0.3);
}
.signup-form-sidebar button:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(44,255,110,0.4); }
.signup-form-sidebar button:disabled { opacity: 0.7; cursor: default; transform: none; }
.signup-form-sidebar button.loading .signup-spinner { display: inline-block; }
.signup-form-sidebar button.loading .signup-label { display: none; }
.subscribe-widget .signup-error { color: #ffd1d1; font-size: 12.5px; margin-top: 10px; text-align: left; }
.subscribe-widget .signup-success { font-size: 13.5px; color: rgba(255,255,255,0.9); line-height: 1.6; padding: 0; background: none; border: none; margin-top: 0; }
.subscribe-trust { font-size: 11.5px; color: rgba(255,255,255,0.6); margin-top: 16px; line-height: 1.5; }

/* ==========================================================================
   HOME: FAQ
   ========================================================================== */
.faq { background: var(--black); position: relative; overflow: hidden; }
.faq::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 75% 40%, rgba(24,71,240,0.22) 0%, transparent 55%); pointer-events: none; }
.faq-inner { position: relative; z-index: 2; max-width: 780px; margin: 0 auto; }
.faq .section-title { color: white; text-align: center; }
.faq .section-label { color: var(--green); display: block; text-align: center; }
.faq-list { display: flex; flex-direction: column; margin-top: 48px; }
.faq-item { border-bottom: 1px solid rgba(255,255,255,0.1); }
.faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px; background: none; border: none;
  padding: 22px 4px; text-align: left; cursor: pointer; font-family: 'DM Sans', sans-serif;
}
.faq-q-text { font-family: 'Fraunces', serif; font-size: 16.5px; font-weight: 600; color: rgba(255,255,255,0.88); }
.faq-q:hover .faq-q-text { color: white; }
.faq-icon {
  width: 30px; height: 30px; min-width: 30px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,0.18);
  display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.55); transition: all .3s; flex-shrink: 0;
}
.faq-item.open .faq-icon { background: var(--blue); border-color: var(--blue); color: white; transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.faq-item.open .faq-a { max-height: 220px; }
.faq-a-inner { padding: 0 4px 22px; font-size: 14.5px; color: rgba(255,255,255,0.5); line-height: 1.75; max-width: 640px; }

/* ==========================================================================
   BLOG CARD (shared — home latest posts, 404 discover, related posts)
   ========================================================================== */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.blog-card { text-decoration: none; color: inherit; display: block; }
.blog-thumb {
  aspect-ratio: 16/9; border-radius: 14px; margin-bottom: 16px; overflow: hidden;
  background: linear-gradient(135deg, var(--gray), #e6eaf7); position: relative;
}
.blog-thumb::after {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(24,71,240,0.12) 1.5px, transparent 1.5px);
  background-size: 18px 18px;
}
.blog-thumb img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; display: block; }
.blog-thumb-fallback { display: flex; align-items: center; justify-content: center; padding: 20px; text-align: center; }
.blog-thumb-fallback span { position: relative; z-index: 1; font-family: 'Fraunces', serif; font-weight: 700; font-size: 14px; color: var(--blue-dark); }
.blog-tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--blue); margin-bottom: 8px; }
.blog-title { font-family: 'Fraunces', serif; font-size: 17px; font-weight: 700; line-height: 1.35; margin-bottom: 8px; }
.blog-card:hover .blog-title { color: var(--blue); }
.blog-date { font-size: 12.5px; color: var(--text-muted); }

/* ==========================================================================
   POST HEADER (single.php / page.php)
   ========================================================================== */
.post-header { padding: 48px 0 0; }
.post-header-inner { padding-bottom: 40px; border-bottom: 1px solid var(--border); max-width: 860px; }
.post-category-tag {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--blue); background: rgba(24,71,240,0.08); padding: 7px 16px; border-radius: 100px; margin-bottom: 22px;
  text-decoration: none; transition: background .2s;
}
.post-category-tag:hover { background: rgba(24,71,240,0.14); }
.post-title { max-width: none; margin-bottom: 22px; }
.post-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 14px; color: var(--text-muted); margin-bottom: 24px; }
.post-meta strong { color: var(--black); font-weight: 600; }
.post-author-link { text-decoration: none; color: inherit; transition: color .2s; }
.post-author-link:hover { color: var(--blue); }
.post-meta-dot { opacity: .6; }
.share-buttons { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.share-label { font-size: 13px; font-weight: 600; color: var(--text-muted); margin-right: 4px; }
.share-btn {
  width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--border); display: flex; align-items: center;
  justify-content: center; color: var(--black); text-decoration: none; background: none; cursor: pointer; transition: all .2s; position: relative;
}
.share-btn:hover { border-color: var(--blue); color: var(--blue); transform: translateY(-2px); }
.share-tooltip {
  position: absolute; bottom: 46px; left: 50%; transform: translateX(-50%); background: var(--black); color: white;
  font-size: 12px; font-weight: 600; padding: 6px 10px; border-radius: 6px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .2s;
}
.share-btn.copied .share-tooltip { opacity: 1; }

/* Featured image — full-width banner above the two-column layout */
.post-featured-hero { padding: 40px 0 8px; }
.post-featured-image { border-radius: 24px; overflow: hidden; aspect-ratio: 21/9; box-shadow: 0 40px 90px rgba(8,12,20,0.16); position: relative; }
.post-featured-image img { width: 100%; height: 100%; object-fit: cover; }
.post-featured-image::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(8,12,20,0.06); pointer-events: none; }

/* ==========================================================================
   POST LAYOUT (content + sidebar — single.php / page.php)
   ========================================================================== */
.post-layout, .related-layout, .archive-layout, .search-layout {
  display: grid; grid-template-columns: 1fr 360px; gap: 64px; align-items: start;
}
.post-layout { padding: 16px 0 0; }

/* Article typography */
.post-content { font-size: 17px; line-height: 1.85; color: var(--text-body); max-width: 720px; }
.post-content > p { margin-bottom: 24px; }
.post-content h2 { font-size: clamp(22px, 2.4vw, 28px); font-weight: 800; margin: 52px 0 20px; line-height: 1.25; }
.post-content h3 { font-size: 19px; font-weight: 700; margin: 36px 0 16px; }
.post-content ul, .post-content ol { margin: 0 0 26px; padding-left: 24px; display: flex; flex-direction: column; gap: 11px; }
.post-content li { line-height: 1.75; }
.post-content ul li::marker { color: var(--blue); }
.post-content ol li::marker { color: var(--blue); font-weight: 700; }
.post-content a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.post-content a:hover { color: var(--blue-dark); }
.post-content code { background: var(--gray); padding: 3px 7px; border-radius: 6px; font-size: 0.87em; color: var(--blue-dark); }
.post-content figure { margin: 40px 0; }
.post-content figure img { border-radius: 14px; width: 100%; }
.post-content figcaption { margin-top: 12px; font-size: 13px; color: var(--text-muted); text-align: center; }
.post-content blockquote {
  border-left: 3px solid var(--blue); background: var(--gray); padding: 22px 26px; border-radius: 0 14px 14px 0;
  margin: 36px 0; font-style: italic; color: var(--black); font-size: 16.5px;
}
.table-wrap { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; margin: 36px 0; }
.post-content table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14.5px; }
.post-content thead th { background: var(--gray); text-align: left; padding: 14px 18px; font-family: 'Fraunces', serif; font-weight: 700; font-size: 14px; color: var(--black); }
.post-content td { padding: 14px 18px; border-top: 1px solid var(--border); color: var(--text-body); }
.post-content tbody tr:hover { background: rgba(24,71,240,0.03); }

/* ==========================================================================
   SIDEBAR (shared — single/page/category/archive/search)
   ========================================================================== */
.sidebar { display: flex; flex-direction: column; gap: 32px; position: sticky; top: 96px; }
.widget { border: 1px solid var(--border); border-radius: 18px; padding: 26px; background: var(--white); }
.widget-title { font-size: 15px; font-weight: 700; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }

.featured-post-card { text-decoration: none; color: inherit; display: block; }
.featured-post-thumb { aspect-ratio: 16/9; border-radius: 12px; overflow: hidden; margin-bottom: 14px; background: var(--gray); }
.featured-post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.featured-post-title { font-family: 'Fraunces', serif; font-size: 15.5px; font-weight: 700; line-height: 1.4; }
.featured-post-card:hover .featured-post-title { color: var(--blue); }

.latest-posts-list { list-style: none; display: flex; flex-direction: column; gap: 16px; }
.latest-post-item { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.latest-post-thumb { width: 60px; height: 60px; border-radius: 10px; overflow: hidden; flex-shrink: 0; background: var(--gray); }
.latest-post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.latest-post-info { min-width: 0; }
.latest-post-title {
  font-size: 13.5px; font-weight: 600; line-height: 1.4; margin-bottom: 4px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.latest-post-item:hover .latest-post-title { color: var(--blue); }
.latest-post-date { font-size: 11.5px; color: var(--text-muted); }

/* ==========================================================================
   RELATED POSTS (single.php)
   ========================================================================== */
.related-posts-section { padding: 96px 0 100px; }
.related-title { margin-bottom: 36px; }

/* ==========================================================================
   ARCHIVE HEADER + GRID (category.php / archive.php / index.php / home.php)
   ========================================================================== */
.archive-header { padding: 48px 0 40px; border-bottom: 1px solid var(--border); }
.archive-eyebrow {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--blue); background: rgba(24,71,240,0.08); padding: 7px 16px; border-radius: 100px; margin-bottom: 20px;
}
.archive-title { font-size: clamp(32px, 4.4vw, 48px); font-weight: 800; line-height: 1.08; margin-bottom: 12px; }
.archive-count { font-size: 14px; color: var(--text-muted); margin-bottom: 20px; }
.archive-description { font-size: 16px; line-height: 1.75; color: var(--text-body); max-width: 720px; }

/* Quick category filters — used on the general blog index (home.php/index.php) */
.archive-filters { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.filter-chip {
  font-size: 13px; font-weight: 600; color: var(--blue); padding: 8px 16px; border: 1px solid var(--border);
  border-radius: 100px; text-decoration: none; transition: all .2s;
}
.filter-chip:hover { background: rgba(24,71,240,0.08); }
.filter-chip.active { background: var(--blue); color: white; border-color: var(--blue); }

.archive-layout { padding: 48px 0 100px; }
.archive-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px 28px; }
.archive-card { text-decoration: none; color: inherit; display: block; }
.archive-thumb { aspect-ratio: 16/9; border-radius: 14px; margin-bottom: 16px; overflow: hidden; background: var(--gray); }
.archive-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.archive-card:hover .archive-thumb img { transform: scale(1.04); }
.archive-tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--blue); margin-bottom: 8px; }
.archive-post-title { font-family: 'Fraunces', serif; font-size: 18px; font-weight: 700; line-height: 1.35; margin-bottom: 8px; }
.archive-card:hover .archive-post-title { color: var(--blue); }
.archive-excerpt {
  font-size: 14px; color: var(--text-muted); line-height: 1.65; margin-bottom: 10px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.archive-date { font-size: 12.5px; color: var(--text-muted); }

/* ==========================================================================
   PAGINATION (shared — category/archive/index/search)
   ========================================================================== */
.pagination { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 56px; }
.page-btn {
  min-width: 40px; height: 40px; padding: 0 4px; border-radius: 10px; border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; color: var(--black);
  text-decoration: none; transition: all .2s; background: white;
}
.page-btn:hover { border-color: var(--blue); color: var(--blue); }
.page-btn.active { background: var(--blue); border-color: var(--blue); color: white; }
.page-btn.disabled { opacity: 0.35; pointer-events: none; }
.page-btn-nav { width: auto; padding: 0 18px; gap: 6px; }

/* ==========================================================================
   SEARCH (search.php)
   ========================================================================== */
.search-header { padding: 48px 0 36px; border-bottom: 1px solid var(--border); }
.search-eyebrow {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--blue); background: rgba(24,71,240,0.08); padding: 7px 16px; border-radius: 100px; margin-bottom: 20px;
}
.search-title { font-size: clamp(28px, 3.8vw, 42px); font-weight: 800; line-height: 1.15; margin-bottom: 10px; }
.search-title .query { color: var(--blue); }
.search-count { font-size: 14px; color: var(--text-muted); margin-bottom: 28px; }

.search-box, .error-search {
  display: flex; align-items: center; gap: 6px; max-width: 460px;
  background: white; border: 1.5px solid var(--border); border-radius: 100px; padding: 6px 8px 6px 22px;
  box-shadow: 0 10px 30px rgba(24,71,240,0.06); transition: border-color .2s;
}
.search-box:focus-within, .error-search:focus-within { border-color: var(--blue); }
.search-box svg, .error-search svg { flex-shrink: 0; color: var(--text-muted); }
.search-box input, .error-search input {
  flex: 1; min-width: 0; border: none; outline: none; background: transparent;
  font-size: 14.5px; font-family: 'DM Sans', sans-serif; color: var(--black); padding: 11px 0;
}
.search-box input::placeholder, .error-search input::placeholder { color: var(--text-muted); }
.search-box button, .error-search button {
  background: var(--blue); color: white; border: none; border-radius: 100px; padding: 11px 22px;
  font-size: 14px; font-weight: 600; cursor: pointer; font-family: 'DM Sans', sans-serif; transition: background .2s; flex-shrink: 0;
}
.search-box button:hover, .error-search button:hover { background: var(--blue-dark); }

.search-layout { padding: 44px 0 100px; }
.search-results-list { display: flex; flex-direction: column; }
.search-result { display: flex; gap: 24px; padding: 28px 0; border-bottom: 1px solid var(--border); text-decoration: none; color: inherit; }
.search-result:first-child { padding-top: 0; }
.search-result:last-child { border-bottom: none; }
.search-result-thumb { width: 190px; flex-shrink: 0; aspect-ratio: 16/10; border-radius: 14px; overflow: hidden; background: var(--gray); }
.search-result-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.search-result-body { flex: 1; min-width: 0; }
.search-result-tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--blue); margin-bottom: 8px; }
.search-result-title { font-family: 'Fraunces', serif; font-size: 19px; font-weight: 700; line-height: 1.35; margin-bottom: 8px; }
.search-result:hover .search-result-title { color: var(--blue); }
.search-result-excerpt {
  font-size: 14.5px; color: var(--text-muted); line-height: 1.7; margin-bottom: 10px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.search-result-date { font-size: 12.5px; color: var(--text-muted); }
mark.search-hit { background: rgba(24,71,240,0.12); color: var(--blue-dark); padding: 1px 3px; border-radius: 4px; font-weight: 700; }

.no-results { padding: 8px 0 12px; }
.no-results p { font-size: 15px; color: var(--text-muted); line-height: 1.75; max-width: 480px; margin-bottom: 24px; }
.no-results-links { display: flex; flex-wrap: wrap; gap: 10px; }
.no-results-links a {
  font-size: 13px; font-weight: 600; color: var(--blue); padding: 8px 16px; border: 1px solid var(--border);
  border-radius: 100px; text-decoration: none; transition: all .2s;
}
.no-results-links a:hover { background: var(--blue); color: white; border-color: var(--blue); }

/* ==========================================================================
   404
   ========================================================================== */
.error-hero { position: relative; padding: 88px 0 24px; text-align: center; overflow: hidden; }
.error-hero::before {
  content: ''; position: absolute; top: -140px; left: 50%; transform: translateX(-50%);
  width: 900px; height: 560px; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at 30% 30%, rgba(24,71,240,0.09) 0%, transparent 60%),
              radial-gradient(ellipse at 75% 60%, rgba(44,255,110,0.10) 0%, transparent 55%);
}
.error-eyebrow {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--blue); background: rgba(24,71,240,0.08); padding: 7px 16px; border-radius: 100px; margin-bottom: 8px;
}
.error-code {
  font-family: 'Fraunces', serif; font-size: clamp(100px, 17vw, 180px); font-weight: 800; line-height: 1;
  letter-spacing: -0.03em; margin: 4px 0 4px;
  background: linear-gradient(135deg, var(--blue-light) 0%, var(--blue) 55%, var(--black) 120%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.error-title { font-size: clamp(24px, 3.2vw, 36px); font-weight: 800; margin-bottom: 14px; }
.error-desc { font-size: 16px; color: var(--text-muted); max-width: 500px; margin: 0 auto 36px; line-height: 1.7; }
.error-search { margin: 0 auto 32px; box-shadow: 0 16px 40px rgba(24,71,240,0.08); }
.error-actions { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; margin-bottom: 44px; }
.error-links { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; padding-bottom: 72px; }
.error-links-label { font-size: 13px; font-weight: 600; color: var(--text-muted); margin-right: 2px; }
.error-chip {
  font-size: 13px; font-weight: 600; color: var(--blue); padding: 8px 16px; border: 1px solid var(--border);
  border-radius: 100px; text-decoration: none; transition: all .2s;
}
.error-chip:hover { background: var(--blue); color: white; border-color: var(--blue); }
.discover-section { padding: 8px 0 100px; border-top: 1px solid var(--border); }
.discover-title { text-align: center; margin: 56px 0 40px; }

/* ==========================================================================
   FOOTER (shared — footer.php)
   ========================================================================== */
footer { background: var(--gray); padding: 72px 0 0; }
.footer-top { display: grid; grid-template-columns: 1.3fr 0.9fr 0.9fr 1.5fr; gap: 40px; padding-bottom: 56px; }
.footer-brand .nav-logo { display: inline-block; margin-bottom: 14px; }
.footer-tagline { font-size: 14px; color: var(--text-muted); line-height: 1.7; max-width: 260px; margin-bottom: 20px; }
.footer-col-title { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--black); margin-bottom: 18px; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.footer-links a { font-size: 14px; color: var(--text-muted); text-decoration: none; transition: color .2s; }
.footer-links a:hover { color: var(--blue); }
.footer-links-2col { list-style: none; columns: 2; column-gap: 24px; }
.footer-links-2col li { break-inside: avoid; margin-bottom: 12px; }
.footer-links-2col a { font-size: 14px; color: var(--text-muted); text-decoration: none; transition: color .2s; }
.footer-links-2col a:hover { color: var(--blue); }
.footer-bottom {
  border-top: 1px solid var(--border); padding: 24px 0; display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; color: var(--text-muted); flex-wrap: wrap; gap: 12px;
}
.footer-socials { display: flex; gap: 14px; }
.footer-socials a { color: var(--text-muted); transition: color .2s; }
.footer-socials a:hover { color: var(--blue); }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1080px) {
  .wrap { padding: 0 32px; }
  .tools-grid { grid-template-columns: repeat(3, 1fr); }
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1.4fr 1fr 1fr; row-gap: 40px; }
  .post-layout, .related-layout, .archive-layout, .search-layout { grid-template-columns: 1fr 320px; gap: 40px; }
}
@media (max-width: 900px) {
  nav#navbar .nav-links { display: none; }
  .hamburger { display: flex; }
  .mobile-nav { display: block; }
  .hero { padding: 48px 0 64px; }
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-desc { max-width: 100%; }
  .tutorials-grid { grid-template-columns: 1fr; }
  .post-layout, .related-layout, .archive-layout, .search-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; margin-top: 8px; flex-direction: row; flex-wrap: wrap; }
  .widget { flex: 1 1 280px; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 24px; }
  section { padding: 64px 0; }
  .tools-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .tool-card { padding: 18px; }
  .blog-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions a { justify-content: center; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .signup-form { flex-direction: column; }
  .signup-form button { justify-content: center; padding: 15px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .post-header { padding-top: 32px; }
  .post-featured-hero { padding-top: 24px; }
  .post-layout { padding-top: 24px; }
  .post-featured-image { aspect-ratio: 4/3; }
  .sidebar { flex-direction: column; }
  .related-posts-section { padding: 56px 0; }
  .archive-header { padding-top: 32px; }
  .archive-layout { padding: 24px 0 64px; }
  .archive-grid { grid-template-columns: 1fr; gap: 32px; }
  .search-result { flex-direction: column; gap: 14px; }
  .search-result-thumb { width: 100%; aspect-ratio: 16/9; }
  .error-hero { padding: 56px 0 16px; }
  .error-code { margin: 0; }
  .discover-title { margin: 44px 0 32px; }
}
