/*
Theme Name: ToolBites
Theme URI: https://toolbites.com
Author: ToolBites Team
Description: Custom WordPress theme for ToolBites.com — 500+ Online Tools
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2
Text Domain: toolbites
*/

/* ============================================================
   CSS VARIABLES
============================================================ */
:root {
  --brand:        #534AB7;
  --brand-dark:   #3C3489;
  --brand-light:  #EEEDFE;
  --brand-xlight: #F7F6FF;
  --teal:         #0F6E56;
  --teal-dark:    #085041;
  --teal-light:   #E1F5EE;
  --text-primary: #2C2C2A;
  --text-secondary:#5F5E5A;
  --text-muted:   #888780;
  --border:       #E8E6DF;
  --border-dark:  #D3D1C7;
  --bg:           #FFFFFF;
  --bg-secondary: #F7F6F2;
  --bg-tertiary:  #F1EFE8;
  --radius-sm:    6px;
  --radius-md:    10px;
  --radius-lg:    14px;
  --shadow-sm:    0 1px 3px rgba(44,44,42,0.08);
  --shadow-md:    0 4px 16px rgba(44,44,42,0.10);
  --font-sans:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', monospace;
  --transition:   0.18s ease;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--brand-dark); }

img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

/* ============================================================
   TYPOGRAPHY
============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.25;
  color: var(--text-primary);
}
h1 { font-size: clamp(26px, 4vw, 40px); }
h2 { font-size: clamp(20px, 3vw, 28px); }
h3 { font-size: clamp(16px, 2vw, 20px); }
h4 { font-size: 16px; }

p { color: var(--text-secondary); line-height: 1.7; }

/* ============================================================
   LAYOUT
============================================================ */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
.container--narrow { max-width: 800px; }
.container--wide   { max-width: 1400px; }

.section { padding: 60px 0; }
.section--sm { padding: 36px 0; }
.section--lg { padding: 90px 0; }

/* ============================================================
   BUTTONS
============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  border: 1.5px solid transparent;
  text-decoration: none;
  white-space: nowrap;
}
.btn--primary {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}
.btn--primary:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(83,74,183,0.3);
}
.btn--teal {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
}
.btn--teal:hover {
  background: var(--teal-dark);
  color: #fff;
  transform: translateY(-1px);
}
.btn--outline {
  background: transparent;
  color: var(--brand);
  border-color: var(--brand);
}
.btn--outline:hover {
  background: var(--brand-light);
  color: var(--brand);
}
.btn--ghost {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border-color: rgba(255,255,255,0.25);
}
.btn--ghost:hover {
  background: rgba(255,255,255,0.22);
  color: #fff;
}
.btn--sm { padding: 7px 14px; font-size: 13px; }
.btn--lg { padding: 14px 30px; font-size: 16px; }

/* ============================================================
   BADGES
============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.badge--brand  { background: var(--brand-light); color: var(--brand-dark); }
.badge--teal   { background: var(--teal-light);  color: var(--teal-dark); }
.badge--free   { background: var(--teal-light);  color: var(--teal-dark); }
.badge--hot    { background: #FAECE7; color: #993C1D; }
.badge--new    { background: var(--brand-light); color: var(--brand-dark); }

/* ============================================================
   CARDS
============================================================ */
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: all var(--transition);
}
.card:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.card--flat { box-shadow: none; }
.card--flat:hover { transform: none; }

/* ============================================================
   FORM ELEMENTS
============================================================ */
input[type="text"],
input[type="email"],
input[type="search"],
input[type="url"],
textarea,
select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: var(--bg);
  transition: border-color var(--transition);
  outline: none;
}
input:focus,
textarea:focus,
select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(83,74,183,0.12);
}

/* ============================================================
   ADSEN SLOTS
============================================================ */
.ad-slot {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px dashed var(--border-dark);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.ad-slot::before {
  content: 'Advertisement';
  position: absolute;
  top: 4px;
  right: 8px;
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}
.ad-slot--leaderboard { height: 90px; }
.ad-slot--rectangle   { height: 280px; max-width: 336px; }
.ad-slot--banner      { height: 60px; }
.ad-slot--sidebar     { height: 600px; }

/* ============================================================
   UTILITIES
============================================================ */
.text-center  { text-align: center; }
.text-muted   { color: var(--text-muted); }
.text-brand   { color: var(--brand); }
.text-teal    { color: var(--teal); }
.bg-brand     { background: var(--brand); }
.bg-secondary { background: var(--bg-secondary); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ============================================================
   SECTION HEADERS
============================================================ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}
.section-header__title { font-size: 22px; font-weight: 600; }
.section-header__link  { font-size: 14px; color: var(--brand); font-weight: 500; }
.section-header__link:hover { text-decoration: underline; }

/* ============================================================
   DIVIDER
============================================================ */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}

/* ============================================================
   SKELETON LOADING
============================================================ */
.skeleton {
  background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-tertiary) 50%, var(--bg-secondary) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-md);
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============================================================
   SCROLLBAR
============================================================ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--border-dark); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--brand); }
