/*
Theme Name: AIToolkit Dark
Theme URI: https://yoursite.com
Author: Your Name
Author URI: https://yoursite.com
Description: A modern dark AI tools directory theme with left sidebar navigation, inspired by Sedehoo. Features fixed sidebar, header navigation, footer, and full menu customizer support.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: aitoolkit-dark
Tags: dark, sidebar, one-column, custom-menu, custom-logo, footer-widgets, translation-ready
*/

/* ===================================================
   CSS VARIABLES
=================================================== */
:root {
  --bg: #0e0f11;
  --bg2: #13151a;
  --bg3: #1a1d24;
  --border: #2a2d35;
  --accent: #7fff5f;
  --accent2: #4ade80;
  --text: #e8eaf0;
  --muted: #7a7f8e;
  --sidebar-w: 220px;
  --header-h: 60px;
}

/* ===================================================
   RESET & BASE
=================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; height: auto; }

/* ===================================================
   LAYOUT WRAPPER
=================================================== */
.site-wrapper {
  display: flex;
  min-height: 100vh;
}

/* ===================================================
   SIDEBAR
=================================================== */
#sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 200;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.sidebar-logo {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo-icon {
  width: 32px; height: 32px;
  background: var(--accent);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.logo-icon svg { width: 18px; height: 18px; }
.logo-text {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: .5px;
  color: var(--text);
}
.logo-sub {
  font-size: 9px;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.sidebar-section { padding: 16px 12px 8px; }
.sidebar-section-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: 0 8px 8px;
}

/* WordPress Nav Menu items in sidebar */
.sidebar-nav ul { list-style: none; padding: 0; margin: 0; }
.sidebar-nav ul li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 500;
  transition: all .18s;
  position: relative;
}
.sidebar-nav ul li a:hover,
.sidebar-nav ul li.current-menu-item > a,
.sidebar-nav ul li.current-page-ancestor > a {
  color: var(--text);
  background: var(--bg3);
}
.sidebar-nav ul li.current-menu-item > a {
  border: 1px solid var(--border);
}
.sidebar-nav ul li.current-menu-item > a::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 60%;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
}

.sidebar-footer {
  margin-top: auto;
  padding: 16px 12px;
  border-top: 1px solid var(--border);
}

/* ===================================================
   HEADER
=================================================== */
#site-header {
  position: fixed;
  top: 0;
  left: var(--sidebar-w);
  right: 0;
  height: var(--header-h);
  background: rgba(14,15,17,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  z-index: 100;
  gap: 16px;
}

/* WordPress header nav menu */
.header-nav ul { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0; }
.header-nav ul li a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 20px;
  border: 1px solid transparent;
  transition: all .2s;
  letter-spacing: .3px;
  display: block;
}
.header-nav ul li a:hover,
.header-nav ul li.current-menu-item > a {
  color: var(--text);
  border-color: var(--border);
  background: var(--bg3);
}

.header-actions { display: flex; gap: 10px; align-items: center; flex-shrink: 0; }
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  transition: all .2s;
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-accent {
  background: var(--accent);
  border: none;
  color: #0a0f06;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all .2s;
}
.btn-accent:hover { background: var(--accent2); }

/* Hamburger (mobile) */
#hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--text);
  flex-shrink: 0;
}
#sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 190;
}

/* ===================================================
   MAIN CONTENT
=================================================== */
#main-wrap {
  margin-left: var(--sidebar-w);
  margin-top: var(--header-h);
  min-height: calc(100vh - var(--header-h));
  display: flex;
  flex-direction: column;
  width: 100%;
}

#main-content {
  flex: 1;
  padding: 40px 40px 60px;
  animation: pageIn .35s ease;
}

@keyframes pageIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===================================================
   HERO HEADING
=================================================== */
.hero-heading { margin-bottom: 10px; }
.hero-heading h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -.5px;
}
.hero-heading h1 .accent { color: var(--accent); }
.hero-heading p {
  color: var(--muted);
  font-size: 14.5px;
  margin-top: 10px;
  max-width: 480px;
  line-height: 1.6;
}

/* ===================================================
   SEARCH BOX
=================================================== */
.search-wrap { text-align: center; margin-bottom: 32px; }
.search-box {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 20px;
  width: 100%;
  max-width: 520px;
  transition: border-color .2s;
}
.search-box:focus-within { border-color: var(--accent); }
.search-box input {
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  flex: 1;
}
.search-box input::placeholder { color: var(--muted); }
.search-box kbd {
  background: var(--bg3);
  border: 1px solid var(--border);
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 11px;
  color: var(--muted);
  font-family: inherit;
}

/* ===================================================
   ACTION ROW
=================================================== */
.action-row { display: flex; justify-content: center; gap: 12px; margin-bottom: 48px; flex-wrap: wrap; }
.action-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  transition: all .2s;
  border: 1.5px solid var(--border);
  background: var(--bg2);
  color: var(--text);
}
.action-btn:hover { border-color: var(--accent); color: var(--accent); }
.action-btn .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }

/* ===================================================
   TOOL GRID
=================================================== */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 32px;
}

.tool-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px 20px 22px;
  text-decoration: none;
  color: inherit;
  transition: all .22s;
  display: flex;
  flex-direction: column;
  gap: 12px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.tool-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 0% 0%, rgba(127,255,95,.05) 0%, transparent 60%);
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}
.tool-card:hover {
  border-color: rgba(127,255,95,.35);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,.3);
}
.tool-card:hover::after { opacity: 1; }

.card-icon {
  width: 42px; height: 42px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-icon svg { width: 20px; height: 20px; }
.card-title {
  font-family: 'Syne', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .3px;
  color: var(--text);
  text-transform: uppercase;
}
.card-desc {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.55;
}

/* ===================================================
   ENTRY CONTENT (pages/posts)
=================================================== */
.entry-content {
  max-width: 760px;
  line-height: 1.7;
  font-size: 15px;
}
.entry-content h1, .entry-content h2, .entry-content h3 {
  font-family: 'Syne', sans-serif;
  margin-bottom: 16px;
  margin-top: 32px;
}
.entry-content p { margin-bottom: 16px; color: var(--muted); }
.entry-content a { color: var(--accent); }
.entry-content a:hover { text-decoration: underline; }

/* ===================================================
   FOOTER
=================================================== */
#site-footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 24px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
}
.footer-nav ul { display: flex; gap: 20px; list-style: none; padding: 0; margin: 0; flex-wrap: wrap; }
.footer-nav ul li a { color: var(--muted); text-decoration: none; transition: color .2s; }
.footer-nav ul li a:hover { color: var(--text); }

/* ===================================================
   RESPONSIVE
=================================================== */
@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }
  #site-header { left: 0; padding-left: 16px; }
  #hamburger { display: flex; }
  #sidebar { transform: translateX(-220px); width: 220px; transition: transform .25s; }
  #sidebar.open { transform: translateX(0); }
  #sidebar-overlay.open { display: block; }
  #main-content { padding: 24px 16px 40px; }
  #site-footer { padding: 20px 16px; flex-direction: column; align-items: flex-start; }
  .tool-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .header-nav { display: none; }
}
@media (max-width: 480px) {
  .action-row { flex-direction: column; align-items: center; }
}
