/* ==========================================================================
   AllToolsPlace - Core Desktop & Design System Stylesheet
   Official Obsidian & Emerald Theme + Light Mode Support
   ========================================================================== */

:root {
  --bg-body: #060a13;
  --bg-surface: #0b1220;
  --bg-card: #0e1729;
  --bg-card-hover: #131f36;
  --bg-elevated: #111c31;
  --bg-input-dark: #080e1a;
  --bg-header: rgba(6, 10, 19, 0.88);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --border-accent: rgba(34, 197, 94, 0.42);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent: #22c55e;
  --accent-bright: #34d399;
  --accent-dark: #16a34a;
  --accent-glow: rgba(34, 197, 94, 0.25);
  --shadow-card: 0 12px 30px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 10px 30px rgba(34, 197, 94, 0.2);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --container-max: 1320px;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --transition: 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="light"] {
  --bg-body: #f1f5f9;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-elevated: #e2e8f0;
  --bg-input-dark: #f8fafc;
  --bg-header: rgba(255, 255, 255, 0.92);
  --border-subtle: rgba(15, 23, 42, 0.09);
  --border-strong: rgba(15, 23, 42, 0.16);
  --border-accent: rgba(22, 163, 74, 0.45);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --shadow-card: 0 8px 24px rgba(15, 23, 42, 0.07);
  --shadow-glow: 0 8px 24px rgba(22, 163, 74, 0.15);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font-family: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

.text-green {
  color: var(--accent);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-header);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  gap: 20px;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.32rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.brand-logo-img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  object-fit: cover;
  box-shadow: 0 0 14px rgba(34, 197, 94, 0.35);
}

.brand-logo-text {
  display: inline-flex;
  align-items: center;
}

.brand-logo-text .brand-green {
  color: var(--accent);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 15px;
  border-radius: 10px;
  font-size: 0.93rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.nav-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .nav-link:hover {
  background: rgba(15, 23, 42, 0.05);
}

.nav-link.active {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(34, 197, 94, 0.3);
}

/* Tools Mega Dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  width: 560px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.2s ease;
  z-index: 1200;
}

.nav-dropdown.open .nav-dropdown-menu,
.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.dropdown-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.dropdown-tool-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  transition: background var(--transition);
}

.dropdown-tool-item:hover {
  background: rgba(34, 197, 94, 0.1);
}

.dropdown-tool-item img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.dropdown-tool-name {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-primary);
  display: block;
}

.dropdown-tool-cat {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.dropdown-footer {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
}

.dropdown-footer a {
  color: var(--accent);
  font-weight: 600;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-search-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.header-search-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-accent);
}

[data-theme="light"] .header-search-btn {
  background: rgba(15, 23, 42, 0.05);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 64px;
  height: 34px;
  padding: 4px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  position: relative;
  transition: all var(--transition);
}

.theme-toggle-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  z-index: 2;
  color: var(--text-secondary);
}

.theme-toggle-thumb {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  transition: transform 0.25s ease;
}

[data-theme="light"] .theme-toggle-thumb {
  transform: translateX(-30px);
  background: #0f172a;
}

.mobile-menu-btn {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
}

/* ==========================================================================
   Hero Section (Matches Official Screenshot Aesthetic)
   ========================================================================== */

.hero-section {
  position: relative;
  padding: 58px 0 52px;
  min-height: 445px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #060a13;
  border-bottom: 1px solid var(--border-subtle);
}

.hero-bg-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero-bg-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 78% center;
}

.hero-bg-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    #060a13 0%,
    rgba(6, 10, 19, 0.94) 36%,
    rgba(6, 10, 19, 0.65) 55%,
    rgba(6, 10, 19, 0.14) 82%,
    rgba(6, 10, 19, 0.05) 100%
  );
}

[data-theme="light"] .hero-section {
  background: #f1f5f9;
}

[data-theme="light"] .hero-bg-media::after {
  background: linear-gradient(
    90deg,
    #f1f5f9 0%,
    rgba(241, 245, 249, 0.94) 40%,
    rgba(241, 245, 249, 0.68) 60%,
    rgba(241, 245, 249, 0.18) 85%,
    rgba(241, 245, 249, 0.05) 100%
  );
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  align-items: center;
  gap: 32px;
  position: relative;
  z-index: 2;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.28);
  color: var(--accent-bright);
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 18px;
}

[data-theme="light"] .hero-badge {
  color: #15803d;
  background: rgba(34, 197, 94, 0.14);
}

.hero-title {
  font-size: clamp(2.2rem, 4.1vw, 3.35rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.hero-subtitle {
  font-size: 1.03rem;
  color: var(--text-secondary);
  max-width: 540px;
  margin-bottom: 26px;
  line-height: 1.65;
}

.hero-search-wrapper {
  position: relative;
  max-width: 560px;
  margin-bottom: 22px;
}

.hero-search-box {
  display: flex;
  align-items: center;
  background: #ffffff;
  border-radius: 12px;
  padding: 5px 5px 5px 16px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  border: 2px solid transparent;
  transition: border-color var(--transition);
}

.hero-search-box:focus-within {
  border-color: var(--accent);
}

.hero-search-icon {
  color: #64748b;
  flex-shrink: 0;
  margin-right: 10px;
  display: flex;
}

.hero-search-input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  color: #0f172a;
  font-size: 0.95rem;
  padding: 10px 6px;
}

.hero-search-input::placeholder {
  color: #64748b;
}

.hero-search-submit {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 11px 24px;
  border-radius: 9px;
  transition: all var(--transition);
  flex-shrink: 0;
}

.hero-search-submit:hover {
  filter: brightness(1.08);
  box-shadow: 0 6px 18px rgba(34, 197, 94, 0.35);
}

.search-results-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.55);
  padding: 8px;
  z-index: 900;
  display: none;
  max-height: 320px;
  overflow-y: auto;
}

.search-results-dropdown.active {
  display: block;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  transition: background var(--transition);
}

.search-result-item:hover {
  background: rgba(34, 197, 94, 0.12);
}

.search-result-item img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  object-fit: cover;
}

.search-result-meta strong {
  display: block;
  font-size: 0.92rem;
  color: var(--text-primary);
}

.search-result-meta span {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.hero-trust-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 22px;
  font-size: 0.87rem;
  color: var(--text-secondary);
}

.hero-trust-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.hero-trust-item svg {
  color: var(--accent);
}

/* Hero Visual Right Column */
.hero-visual-wrap {
  position: relative;
  min-height: 310px;
}

.hero-callout {
  position: absolute;
  top: -12px;
  right: 10px;
  text-align: center;
  color: #e2e8f0;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.3;
  pointer-events: none;
  text-shadow: 0 4px 14px rgba(0, 0, 0, 0.8);
}

.hero-callout span {
  color: var(--accent-bright);
  display: block;
}

.hero-callout-arrow {
  display: block;
  margin: 4px auto 0;
  color: #cbd5e1;
}

/* ==========================================================================
   Main Tools & Sidebar Section
   ========================================================================== */

.tools-articles-section {
  padding: 46px 0 36px;
}

.section-heading-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 24px;
}

.section-heading-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(34, 197, 94, 0.14);
  border: 1px solid rgba(34, 197, 94, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 2px;
}

.section-heading-title {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.section-heading-sub {
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin-top: 3px;
}

.home-main-layout {
  display: grid;
  grid-template-columns: 1fr 325px;
  gap: 22px;
  align-items: stretch;
}

/* 5x2 Tools Grid */
.tools-grid-10 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 15px;
}

.tool-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 18px 15px 15px;
  transition: all var(--transition);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.tool-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(34, 197, 94, 0.08), transparent 60%);
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}

.tool-card:hover {
  transform: translateY(-4px);
  background: var(--bg-card-hover);
  border-color: var(--border-accent);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(34, 197, 94, 0.15);
}

.tool-card:hover::before {
  opacity: 1;
}

.tool-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
}

.tool-num-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-secondary);
}

[data-theme="light"] .tool-num-badge {
  background: rgba(15, 23, 42, 0.06);
}

.tool-icon-box {
  width: 60px;
  height: 60px;
  border-radius: 15px;
  overflow: hidden;
  margin: 0 auto 14px;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
}

.tool-icon-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tool-card-title {
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.tool-card-desc {
  font-size: 0.8rem;
  line-height: 1.48;
  color: var(--text-secondary);
  margin-bottom: 16px;
  flex-grow: 1;
}

.tool-level-pill {
  display: block;
  width: 100%;
  text-align: center;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.01em;
}

.pill-medium {
  background: linear-gradient(135deg, #7c3aed, #5b21b6);
}

.pill-very-easy {
  background: linear-gradient(135deg, #22c55e, #15803d);
}

.pill-easy {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

/* Latest Articles Sidebar */
.articles-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
}

.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.sidebar-head-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.02rem;
  font-weight: 700;
}

.sidebar-head-title svg {
  color: var(--accent);
}

.sidebar-view-all {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  transition: opacity var(--transition);
}

.sidebar-view-all:hover {
  opacity: 0.8;
}

.sidebar-articles-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

.sidebar-article-card {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  overflow: hidden;
  transition: all var(--transition);
}

[data-theme="light"] .sidebar-article-card {
  background: #f8fafc;
}

.sidebar-article-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-2px);
}

.sidebar-article-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.sidebar-article-body {
  padding: 11px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-article-date {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
}

.sidebar-article-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}

.sidebar-article-title {
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-primary);
}

.circle-arrow-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  flex-shrink: 0;
  transition: all var(--transition);
}

.sidebar-article-card:hover .circle-arrow-btn {
  background: var(--accent);
  color: #ffffff;
}

/* ==========================================================================
   Why Choose Us Banner
   ========================================================================== */

.why-choose-section {
  padding: 20px 0 36px;
}

.why-banner {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  align-items: center;
  gap: 32px;
  background: linear-gradient(135deg, #071916 0%, #0b2d22 50%, #0a1826 100%);
  border: 1px solid rgba(34, 197, 94, 0.28);
  border-radius: 22px;
  padding: 28px 36px;
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.38);
  overflow: hidden;
  position: relative;
}

[data-theme="light"] .why-banner {
  background: linear-gradient(135deg, #06281e 0%, #0a3d2d 50%, #0b2135 100%);
  color: #f8fafc;
}

.why-banner-visual img {
  width: 100%;
  border-radius: 14px;
  object-fit: cover;
}

.why-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-bright);
  margin-bottom: 8px;
}

.why-heading {
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  font-weight: 800;
  color: #ffffff;
  line-height: 1.15;
  margin-bottom: 12px;
}

.why-desc {
  font-size: 0.96rem;
  color: #cbd5e1;
  max-width: 560px;
  margin-bottom: 24px;
}

.why-features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.why-feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.why-feature-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.16);
  border: 1px solid rgba(34, 197, 94, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-bright);
  flex-shrink: 0;
}

.why-feature-text strong {
  display: block;
  font-size: 0.85rem;
  color: #ffffff;
  line-height: 1.25;
}

.why-feature-text span {
  font-size: 0.75rem;
  color: #94a3b8;
}

/* ==========================================================================
   Newsletter Section
   ========================================================================== */

.newsletter-section {
  padding: 6px 0 46px;
}

.newsletter-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 26px 32px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.newsletter-card::after {
  content: "";
  position: absolute;
  right: -30px;
  bottom: -40px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.2), transparent 70%);
  pointer-events: none;
}

.newsletter-left {
  display: flex;
  align-items: center;
  gap: 18px;
}

.newsletter-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #38bdf8;
  flex-shrink: 0;
}

.newsletter-left h2 {
  font-size: 1.22rem;
  font-weight: 700;
  margin-bottom: 3px;
}

.newsletter-left p {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.newsletter-form {
  display: flex;
  align-items: center;
  background: #ffffff;
  border-radius: 999px;
  padding: 5px 5px 5px 18px;
  width: 100%;
  max-width: 450px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  z-index: 1;
}

.newsletter-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  color: #64748b;
}

.newsletter-form input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  color: #0f172a;
  font-size: 0.9rem;
  padding: 8px 4px;
}

.newsletter-form button {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 10px 22px;
  border-radius: 999px;
  flex-shrink: 0;
  transition: filter var(--transition);
}

.newsletter-form button:hover {
  filter: brightness(1.08);
}

.newsletter-msg {
  font-size: 0.84rem;
  margin-top: 8px;
  color: var(--accent-bright);
  display: none;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  margin-top: auto;
  background: #04070e;
  border-top: 1px solid var(--border-subtle);
  padding: 48px 0 24px;
  color: #cbd5e1;
}

[data-theme="light"] .site-footer {
  background: #0f172a;
  color: #cbd5e1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.85fr 0.9fr 1fr;
  gap: 36px;
  padding-bottom: 34px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-brand-desc {
  font-size: 0.88rem;
  color: #94a3b8;
  margin: 14px 0 20px;
  max-width: 280px;
  line-height: 1.6;
}

.social-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.social-btn {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 700;
  transition: transform var(--transition);
}

.social-btn:hover {
  transform: translateY(-2px);
}

.social-fb { background: #1877f2; }
.social-x { background: #1e293b; border: 1px solid rgba(255,255,255,0.14); }
.social-ig { background: linear-gradient(135deg, #f58529, #dd2a7b, #8134af); }
.social-yt { background: #ef4444; }
.social-pi { background: #e11d48; }

.footer-col h3 {
  font-size: 0.98rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 16px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.87rem;
  color: #94a3b8;
  transition: color var(--transition);
}

.footer-links a::before {
  content: "›";
  color: var(--accent);
  font-weight: 700;
  font-size: 1rem;
}

.footer-links a:hover {
  color: #ffffff;
}

.footer-bottom {
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.83rem;
  color: #64748b;
}

.footer-legal-links {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.footer-legal-links a {
  color: #94a3b8;
  transition: color var(--transition);
}

.footer-legal-links a:hover {
  color: var(--accent);
}

/* ==========================================================================
   Inner Tool Pages & Workspace Styles
   ========================================================================== */

.page-hero {
  padding: 34px 0 26px;
  background: radial-gradient(circle at 80% 20%, rgba(34, 197, 94, 0.12), transparent 50%),
              linear-gradient(180deg, #09101f 0%, var(--bg-body) 100%);
  border-bottom: 1px solid var(--border-subtle);
}

[data-theme="light"] .page-hero {
  background: linear-gradient(180deg, #e2e8f0 0%, var(--bg-body) 100%);
}

.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.83rem;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.breadcrumbs a:hover {
  color: var(--accent);
}

.tool-page-header {
  display: flex;
  align-items: center;
  gap: 18px;
}

.tool-page-icon {
  width: 68px;
  height: 68px;
  border-radius: 17px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.45);
  flex-shrink: 0;
}

.tool-page-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tool-page-title {
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 6px;
}

.tool-page-sub {
  font-size: 0.96rem;
  color: var(--text-secondary);
  max-width: 700px;
}

.tool-meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.28);
  color: var(--accent-bright);
}

[data-theme="light"] .meta-chip {
  color: #15803d;
}

/* Tool Workspace Grid */
.tool-workspace-section {
  padding: 30px 0 48px;
}

.tool-layout-grid {
  display: grid;
  grid-template-columns: 1fr 310px;
  gap: 24px;
  align-items: start;
}

.tool-app-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 26px;
  box-shadow: var(--shadow-card);
}

.tool-panel-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Reusable Interactive Controls inside Tools */
.dropzone {
  border: 2px dashed var(--border-strong);
  border-radius: 16px;
  padding: 36px 20px;
  text-align: center;
  background: rgba(255, 255, 255, 0.02);
  transition: all var(--transition);
  cursor: pointer;
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--accent);
  background: rgba(34, 197, 94, 0.07);
}

.dropzone-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 12px;
  border-radius: 14px;
  background: rgba(34, 197, 94, 0.15);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all var(--transition);
}

.btn-primary {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(34, 197, 94, 0.25);
}

.btn-primary:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
}

.btn-secondary:hover {
  border-color: var(--accent);
}

.btn-sm {
  padding: 7px 13px;
  font-size: 0.8rem;
  border-radius: 8px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-control {
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  background: var(--bg-input-dark);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  font-size: 0.94rem;
  outline: none;
  transition: border-color var(--transition);
}

.form-control:focus {
  border-color: var(--accent);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 12px;
}

.stat-box {
  background: var(--bg-input-dark);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
}

.stat-value {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--accent-bright);
  line-height: 1.2;
}

[data-theme="light"] .stat-value {
  color: #16a34a;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Tool Guide Article (~350-450 words on every tool page) */
.tool-guide-article {
  margin-top: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 28px 30px;
}

.tool-guide-article h2 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.tool-guide-article h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 20px 0 8px;
  color: var(--accent-bright);
}

[data-theme="light"] .tool-guide-article h3 {
  color: #15803d;
}

.tool-guide-article p, .tool-guide-article li {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 12px;
}

.tool-guide-article ul, .tool-guide-article ol {
  padding-left: 22px;
  margin-bottom: 14px;
}

/* Right Quick Switcher Sidebar on Tool Pages */
.tool-side-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 18px;
}

.side-tool-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  font-size: 0.87rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--transition);
  margin-bottom: 4px;
}

.side-tool-link:hover, .side-tool-link.current {
  background: rgba(34, 197, 94, 0.12);
  color: var(--text-primary);
}

.side-tool-link.current {
  border-left: 3px solid var(--accent);
}

.side-tool-link img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  object-fit: cover;
}

/* ==========================================================================
   Long-Form Articles & Legal Content Pages
   ========================================================================== */

.article-container {
  max-width: 900px;
  margin: 0 auto;
}

.article-hero-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid var(--border-subtle);
  margin-bottom: 26px;
}

.article-prose {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 36px 40px;
  box-shadow: var(--shadow-card);
}

.article-prose h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 28px 0 12px;
  color: var(--text-primary);
}

.article-prose h3 {
  font-size: 1.18rem;
  font-weight: 700;
  margin: 22px 0 10px;
  color: var(--accent-bright);
}

[data-theme="light"] .article-prose h3 {
  color: #15803d;
}

.article-prose p {
  font-size: 1.02rem;
  line-height: 1.82;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.article-prose ul, .article-prose ol {
  padding-left: 24px;
  margin-bottom: 18px;
}

.article-prose li {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.article-callout {
  background: rgba(34, 197, 94, 0.08);
  border-left: 4px solid var(--accent);
  padding: 16px 20px;
  border-radius: 0 12px 12px 0;
  margin: 22px 0;
}

.article-callout strong {
  color: var(--text-primary);
  display: block;
  margin-bottom: 4px;
}

/* Articles Archive Grid */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.article-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  overflow: hidden;
  transition: all var(--transition);
  box-shadow: var(--shadow-card);
}

.article-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-accent);
}

.article-card-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.article-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.article-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--accent-bright);
  margin-bottom: 10px;
  font-weight: 600;
}

[data-theme="light"] .article-card-meta {
  color: #15803d;
}

.article-card-title {
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 10px;
}

.article-card-excerpt {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
  flex: 1;
}

/* Toast Notification */
.toast-notice {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #10b981;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 12px 20px;
  border-radius: 12px;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.4);
  z-index: 9999;
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: all 0.25s ease;
}

.toast-notice.show {
  opacity: 1;
  transform: translateY(0);
}

/* Cookie Consent Bar (AdSense Compliance) */
.cookie-banner {
  position: fixed;
  bottom: 18px;
  left: 18px;
  max-width: 430px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.55);
  z-index: 950;
  display: none;
  gap: 12px;
  flex-direction: column;
}

.cookie-banner.visible {
  display: flex;
}

.cookie-banner p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.cookie-banner p a {
  color: var(--accent);
  text-decoration: underline;
}

.cookie-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* Tablet Breakpoint */
@media (max-width: 1180px) {
  .tools-grid-10 {
    grid-template-columns: repeat(3, 1fr);
  }
  .home-main-layout {
    grid-template-columns: 1fr 295px;
  }
  .why-features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1.2fr 1fr 1fr 1fr;
    gap: 24px;
  }
}

@media (max-width: 960px) {
  .home-main-layout,
  .tool-layout-grid,
  .why-banner,
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .newsletter-card {
    flex-direction: column;
    align-items: stretch;
  }
  .newsletter-form {
    max-width: 100%;
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
