/**
 * SMARTDOCIFY FOUNDATION COMPONENTS
 * Modular UI Components: Header, Search, Cards, Banners, Support, Cookie, Footer
 */

/* ==========================================================================
   1. SITE HEADER & NAVIGATION
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  height: var(--header-height);
  transition: background-color var(--transition-fast), border-color var(--transition-fast);
}

.header-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

/* Brand Logo */
.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  color: var(--text-main);
  flex-shrink: 0;
}

.logo-icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.logo-svg {
  width: 100%;
  height: 100%;
}

.logo-text {
  font-weight: 800;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Desktop Nav */
.desktop-nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 0.5rem;
}

.nav-link {
  padding: 0.5rem 0.85rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.nav-link:hover {
  color: var(--primary);
  background: var(--primary-light);
}

.nav-link.active {
  color: var(--primary);
  font-weight: 700;
}

/* Nav Item Dropdown */
.nav-item-dropdown {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-link-dropdown {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.dropdown-chevron {
  transition: transform var(--transition-fast);
}

.nav-item-dropdown:hover .dropdown-chevron,
.nav-item-dropdown.open .dropdown-chevron {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 320px;
  max-width: 440px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 45px -12px rgba(0, 0, 0, 0.2), 0 0 1px 1px rgba(0, 0, 0, 0.08);
  padding: 0.75rem;
  z-index: 2000;
  box-sizing: border-box;
}

.nav-item-dropdown:hover > .nav-dropdown-menu,
.nav-item-dropdown.open > .nav-dropdown-menu {
  display: block !important;
}

.dropdown-menu-header {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.35rem 0.65rem 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 0.5rem;
}

.dropdown-menu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem 0.5rem;
  max-height: 380px;
  overflow-y: auto;
}

.dropdown-item-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  text-decoration: none;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.dropdown-item-link:hover,
.dropdown-item-link:focus {
  background: var(--primary-light);
  color: var(--primary);
}

.dropdown-item-link svg {
  width: 16px;
  height: 16px;
  color: var(--primary);
  flex-shrink: 0;
}

.dropdown-menu-footer {
  border-top: 1px solid var(--border-subtle);
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  text-align: center;
}

.dropdown-footer-link {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.dropdown-footer-link:hover {
  text-decoration: underline;
}

/* Header Mega-Menu Configuration */
.site-header .header-container {
  position: relative;
}

.nav-item-dropdown.has-mega-menu {
  position: static;
}

.nav-dropdown-mega {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  margin: 0 auto;
  width: 100%;
  max-width: 1140px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl, 1rem);
  box-shadow: 0 20px 45px -12px rgba(0, 0, 0, 0.2), 0 0 1px 1px rgba(0, 0, 0, 0.08);
  padding: 1.5rem 1.65rem 1.25rem;
  z-index: 2000;
  box-sizing: border-box;
}

.nav-dropdown-mega::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 10px;
}

.nav-item-dropdown.has-mega-menu:hover > .nav-dropdown-mega,
.nav-item-dropdown.has-mega-menu.open > .nav-dropdown-mega {
  display: block !important;
}

.mega-menu-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem 1.5rem;
}

.mega-menu-col {
  display: flex;
  flex-direction: column;
}

.mega-col-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 0.6rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.mega-col-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}

.mega-col-icon svg {
  width: 17px;
  height: 17px;
}

.mega-col-title {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.mega-col-list {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.mega-tool-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.45rem 0.55rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.mega-tool-item:hover,
.mega-tool-item:focus {
  background: var(--bg-surface-alt);
}

[data-theme="dark"] .mega-tool-item:hover,
[data-theme="dark"] .mega-tool-item:focus {
  background: rgba(255, 255, 255, 0.06);
}

.mega-tool-icon {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  background: var(--bg-surface-alt);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 1px;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.mega-tool-item:hover .mega-tool-icon {
  background: var(--primary-light);
  border-color: var(--primary);
}

.mega-tool-icon svg {
  width: 16px;
  height: 16px;
}

.mega-tool-info {
  flex: 1;
  min-width: 0;
}

.mega-tool-name-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  line-height: 1.25;
}

.mega-tool-name {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mega-tool-item:hover .mega-tool-name {
  color: var(--primary);
}

.mega-tool-badge {
  font-size: 0.62rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 9999px;
  background: var(--primary-light);
  color: var(--primary);
  line-height: 1.2;
  letter-spacing: 0.03em;
}

.mega-tool-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.35;
  margin: 0.12rem 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mega-menu-footer {
  margin-top: 1.25rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
  display: flex;
  justify-content: center;
}

.mega-footer-link {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 1.25rem;
  border-radius: var(--radius-full, 9999px);
  background: var(--bg-surface-alt);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
}

.mega-footer-link:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  gap: 0.55rem;
}

/* Categories Dropdown */
.nav-dropdown-cats {
  min-width: 440px;
  max-width: 480px;
}

.dropdown-cats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem 0.5rem;
}

.dropdown-cat-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.7rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-main);
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.dropdown-cat-link:hover,
.dropdown-cat-link:focus {
  background: var(--primary-light);
  color: var(--primary);
}

.cat-link-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}

.cat-link-icon svg {
  width: 17px;
  height: 17px;
}

.cat-link-title {
  font-size: 0.84rem;
  font-weight: 600;
  flex-grow: 1;
}

.cat-link-count {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-surface-alt);
  border: 1px solid var(--border-subtle);
  padding: 2px 7px;
  border-radius: 9999px;
  white-space: nowrap;
}

/* Nav Link Badges */
.nav-link-badge {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #EF4444, #F59E0B);
  color: #FFFFFF;
  margin-left: 0.35rem;
  vertical-align: middle;
  line-height: 1.2;
}

.nav-link-badge.game-badge {
  background: linear-gradient(135deg, #8B5CF6, #3B82F6);
}

.nav-link-featured {
  display: inline-flex;
  align-items: center;
}

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

.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  background: var(--bg-surface-alt);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
  position: relative;
}

.action-btn:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-light);
}

.action-btn .ui-icon {
  width: 18px;
  height: 18px;
}

.btn-kbd-hint {
  position: absolute;
  right: 4px;
  bottom: 3px;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0 3px;
  border-radius: 3px;
  background: var(--border-subtle);
  color: var(--text-subtle);
  line-height: 1.2;
}

/* Theme Toggle Icons */
[data-theme="light"] .icon-moon { display: block; }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: block; }

/* Hamburger Button */
.menu-toggle {
  display: none;
}

.hamburger-box {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 18px;
  height: 14px;
}

.hamburger-line {
  display: block;
  width: 100%;
  height: 2px;
  background-color: currentColor;
  border-radius: 2px;
  transition: transform var(--transition-fast);
}

/* Mobile Nav Drawer */
.mobile-nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1050;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.mobile-nav-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: -320px;
  width: 300px;
  height: 100vh;
  background: var(--bg-surface);
  z-index: 1100;
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-normal);
  overflow-y: auto;
}

.mobile-nav-drawer.open {
  transform: translateX(-320px);
}

.mobile-drawer-header {
  padding: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}

.mobile-nav-body {
  padding: 1rem 0;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.mobile-nav-list {
  list-style: none;
  padding: 0 0.75rem;
}

.mobile-nav-link {
  display: block;
  padding: 0.75rem 1rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  color: var(--text-main);
}

.mobile-nav-link:hover {
  background: var(--primary-light);
  color: var(--primary);
}

/* Mobile Accordion Navigation */
.mobile-accordion {
  border-bottom: 1px solid var(--border-subtle);
}

.mobile-accordion-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-main);
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-sm);
  text-align: left;
}

.mobile-accordion-toggle:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.mobile-accordion-chevron {
  width: 16px;
  height: 16px;
  transition: transform var(--transition-fast);
}

.mobile-accordion.open .mobile-accordion-chevron {
  transform: rotate(180deg);
}

.mobile-subnav-list {
  list-style: none;
  padding: 0.25rem 0 0.5rem 0.75rem;
  display: none;
}

.mobile-accordion.open .mobile-subnav-list {
  display: block;
}

.mobile-subnav-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.mobile-subnav-link:hover {
  color: var(--primary);
  background: var(--primary-light);
}

.mobile-subnav-footer {
  font-weight: 700;
  color: var(--primary);
  border-top: 1px dashed var(--border-subtle);
  margin-top: 0.25rem;
  padding-top: 0.5rem;
}

.mobile-drawer-footer {
  padding: 1.25rem;
  border-top: 1px solid var(--border-subtle);
}

/* ==========================================================================
   2. HERO & SEARCH BOX
   ========================================================================== */
.hero-section {
  position: relative;
  padding: 5rem 0 3.5rem 0;
  text-align: center;
  background: radial-gradient(circle at 50% 10%, var(--primary-light) 0%, transparent 60%);
  overflow: hidden;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0.35rem 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-emerald);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.hero-title {
  font-size: 3.25rem;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 1.25rem;
  max-width: 840px;
  margin-left: auto;
  margin-right: auto;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 660px;
  margin: 0 auto 2rem auto;
}

.hero-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

/* Hero Search Component */
.hero-search-wrapper {
  max-width: 560px;
  margin: 1.5rem auto 0 auto;
  position: relative;
}

.search-input-box {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 0.15rem 0.4rem;
  transition: all var(--transition-normal);
}

.search-input-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow), var(--shadow-lg);
}

.search-icon-prefix {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.65rem;
  color: var(--text-subtle);
}

.search-icon-prefix svg {
  width: 18px;
  height: 18px;
}

.tool-search-input {
  flex-grow: 1;
  border: none;
  background: transparent;
  padding: 0.55rem 0.5rem;
  font-size: 0.95rem;
  outline: none;
  color: var(--text-main);
}

.search-clear-btn {
  padding: 0.5rem;
  color: var(--text-subtle);
  border-radius: var(--radius-full);
}

.search-clear-btn:hover {
  color: var(--text-main);
}

.search-clear-btn svg {
  width: 18px;
  height: 18px;
}

/* Dynamic Search Results Dropdown */
.search-results-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  z-index: 950;
  max-height: 440px;
  overflow-y: auto;
  text-align: left;
  display: block;
}

.search-results-dropdown[hidden] {
  display: none !important;
}

.search-results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--bg-surface-alt);
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.search-results-list {
  list-style: none;
}

.search-result-item a {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color var(--transition-fast);
}

.search-result-item:last-child a {
  border-bottom: none;
}

.search-result-item a:hover,
.search-result-item.selected a {
  background: var(--primary-light);
}

.search-result-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-alt);
  color: var(--primary);
  flex-shrink: 0;
}

.search-result-icon svg {
  width: 20px;
  height: 20px;
}

.search-result-info {
  flex-grow: 1;
  min-width: 0;
}

.search-result-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.search-result-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-action {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary);
  flex-shrink: 0;
}

/* Suggestion Chips */
.search-suggestion-chips {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.chips-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-subtle);
}

.search-chip {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.search-chip:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-light);
}

/* ==========================================================================
   3. TOOL CARDS & GRIDS
   ========================================================================= */
.tools-grid,
.tools-grid-popular,
#category-tools-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
}

@media (max-width: 1024px) {
  .tools-grid,
  .tools-grid-popular,
  #category-tools-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }
}

@media (max-width: 600px) {
  .tools-grid,
  .tools-grid-popular,
  #category-tools-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }
}

.tool-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(37, 99, 235, 0.4);
}

.tool-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.card-icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  color: var(--primary);
  flex-shrink: 0;
}

.card-icon-box svg {
  width: 24px;
  height: 24px;
}

/* Tool Card Image / Media Container */
.card-image-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 150px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-surface-alt);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.tool-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--transition-normal);
}

.tool-card:hover .tool-card-img {
  transform: scale(1.03);
}

.card-tag {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
  margin-bottom: 0.35rem;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.card-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.card-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--primary);
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.85rem;
  margin-top: auto;
}

.card-action .action-arrow {
  width: 16px;
  height: 16px;
  transition: transform var(--transition-fast);
}

.tool-card:hover .action-arrow {
  transform: translateX(4px);
}

/* Flagship Card Highlight */
.tool-card.flagship-card {
  border: 1.5px solid rgba(37, 99, 235, 0.4);
  background: linear-gradient(180deg, var(--bg-surface) 0%, var(--primary-light) 100%);
}

.card-pill-flagship {
  background: var(--primary);
  color: #FFFFFF;
}

/* ==========================================================================
   EXPAND / COLLAPSE (MORE TOOLS & MORE CATEGORIES)
   ========================================================================== */
.tool-card-hidden,
.cat-card-hidden {
  display: none !important;
}

.tools-expand-wrapper,
.cats-expand-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 2rem;
  width: 100%;
}

.btn-more-tools,
.btn-more-cats {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.75rem;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  color: var(--primary);
  border: 1.5px solid var(--primary);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.btn-more-tools:hover,
.btn-more-cats:hover {
  background: var(--primary);
  color: #FFFFFF;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.btn-more-tools .chevron-icon,
.btn-more-cats .chevron-icon {
  transition: transform var(--transition-fast);
}

.btn-more-tools.expanded .chevron-icon,
.btn-more-cats.expanded .chevron-icon {
  transform: rotate(180deg);
}

/* ==========================================================================
   POPULAR CATEGORIES GRID
   ========================================================================== */
.popular-cats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.popular-cat-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.25rem;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  position: relative;
  cursor: pointer;
}

.popular-cat-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.popular-cat-card.active {
  border-color: var(--primary) !important;
  background: var(--primary-light) !important;
  box-shadow: 0 0 0 2px var(--primary), var(--shadow-md) !important;
}

.popular-cat-card.active .pop-cat-title {
  color: var(--primary);
  font-weight: 800;
}

.popular-cat-card.active .pop-cat-arrow {
  transform: translateX(4px);
  color: var(--primary);
}

/* Category Filter Active Bar */
.category-active-bar {
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 0.85rem 1.35rem;
  margin-top: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
  box-sizing: border-box;
}

.cat-bar-left,
.cat-bar-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.cat-bar-badge {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 9999px;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid rgba(var(--primary-rgb, 37, 99, 235), 0.2);
}

.cat-bar-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
  line-height: 1.2;
}

.cat-bar-count {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  border: 1px solid rgba(var(--primary-rgb, 37, 99, 235), 0.25);
  padding: 2px 10px;
  border-radius: 9999px;
}

.btn-all-tools-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.15rem;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 9999px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface-alt);
  color: var(--text-main);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-all-tools-pill:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.btn-all-tools-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

@media (max-width: 640px) {
  .category-active-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 1rem 1.15rem;
  }
  .btn-all-tools-pill {
    width: 100%;
    justify-content: center;
  }
}

.pop-cat-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  color: var(--primary);
  flex-shrink: 0;
}

.pop-cat-icon svg {
  width: 22px;
  height: 22px;
}

.pop-cat-info {
  flex-grow: 1;
  min-width: 0;
}

.pop-cat-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 0.15rem 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pop-cat-count {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.pop-cat-arrow {
  font-size: 1.1rem;
  color: var(--text-subtle);
  transition: transform var(--transition-fast), color var(--transition-fast);
  margin-left: auto;
}

.popular-cat-card:hover .pop-cat-arrow {
  color: var(--primary);
  transform: translateX(3px);
}

/* ==========================================================================
   4. SMART PRINT NETWORK BANNER (smartdocify.in)
   ========================================================================== */
.smart-print-banner {
  background: var(--grad-accent-banner);
  color: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
  margin: 3.5rem auto;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform var(--transition-normal);
}

.smart-print-banner:hover {
  transform: translateY(-2px);
}

.smart-print-content {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.smart-print-icon {
  font-size: 2.2rem;
  flex-shrink: 0;
}

.smart-print-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: #FFFFFF;
  margin-bottom: 0.25rem;
}

.smart-print-sub {
  font-size: 0.9rem;
  color: #94A3B8;
}

.smart-print-btn {
  background: #2563EB;
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.smart-print-btn:hover {
  background: #1D4ED8;
}

/* ==========================================================================
   5. SUPPORT SMARTDOCIFY DIRECT UPI & CHARITY CAMPAIGN STYLES V3.0
   ========================================================================== */
.support-smartdocify-widget {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 1.35rem 1.5rem;
  box-shadow: var(--shadow-sm);
  max-width: 780px;
  width: 100%;
  margin: 2rem auto;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.support-smartdocify-widget:hover {
  box-shadow: var(--shadow-md);
}

.support-smartdocify-widget::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--grad-primary);
}

/* Horizontal Main Row (Desktop) */
.support-card-main-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  text-align: left;
}

.support-info-col {
  flex: 1 1 auto;
  max-width: 320px;
}

.support-info-col .support-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.45rem;
}

.support-info-col .support-title {
  font-size: 1.18rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
  color: var(--text-main);
  line-height: 1.3;
}

.support-info-col .support-text {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 0;
}

.support-qr-col {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

.support-qr-box {
  background: #FFFFFF;
  padding: 0.55rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  display: inline-block;
}

/* Scannable Responsive QR Dimensions */
.support-qr-image {
  width: 115px;
  height: 115px;
  display: block;
  object-fit: contain;
  margin: 0 auto;
}

.support-actions-col {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-width: 200px;
}

.support-upi-id-box {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  background: var(--bg-surface-alt);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px dashed var(--border-strong);
}

.support-upi-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.support-copy-btn {
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 700;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.support-copy-btn:hover {
  text-decoration: underline;
}

.support-pay-btn,
.support-contribute-btn {
  padding: 0.55rem 1rem !important;
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  border-radius: var(--radius-full) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-decoration: none !important;
}

/* Bilingual Note below row */
.support-bilingual-under-btn {
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--text-muted);
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border-subtle);
  text-align: center;
}

.support-bilingual-under-btn .hindi-text {
  display: block;
  font-size: 0.75rem;
  color: var(--text-subtle);
  margin-top: 0.25rem;
  line-height: 1.35;
}

/* Normal Section Desktop Size Variants */
.support-smartdocify-widget.support-size-compact {
  max-width: 780px;
  padding: 1.25rem 1.5rem;
}
.support-smartdocify-widget.support-size-compact .support-qr-image {
  width: 115px;
  height: 115px;
}

.support-smartdocify-widget.support-size-small {
  max-width: 840px;
  padding: 1.35rem 1.6rem;
}
.support-smartdocify-widget.support-size-small .support-qr-image {
  width: 125px;
  height: 125px;
}

.support-smartdocify-widget.support-size-medium {
  max-width: 900px;
  padding: 1.5rem 1.75rem;
}
.support-smartdocify-widget.support-size-medium .support-qr-image {
  width: 140px;
  height: 140px;
}

/* Tablet & Mobile Responsive */
@media (max-width: 820px) {
  .support-smartdocify-widget {
    max-width: 92%;
    padding: 1.25rem 1rem;
  }
  .support-card-main-row {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
  }
  .support-info-col {
    max-width: 100%;
    text-align: center;
  }
  .support-actions-col {
    width: 100%;
    max-width: 280px;
  }
}

@media (max-width: 480px) {
  .support-smartdocify-widget {
    max-width: 360px !important;
    width: 100% !important;
    margin: 1.5rem auto !important;
    padding: 1.15rem 0.85rem !important;
  }
  .support-smartdocify-widget.support-size-compact .support-qr-image {
    width: 100px;
    height: 100px;
  }
  .support-smartdocify-widget.support-size-small .support-qr-image {
    width: 110px;
    height: 110px;
  }
  .support-smartdocify-widget.support-size-medium .support-qr-image {
    width: 120px;
    height: 120px;
  }
}

/* --------------------------------------------------------------------------
   STICKY FLOATING SUPPORT SMARTDOCIFY (Desktop & Mobile)
   -------------------------------------------------------------------------- */
.sticky-support-dock {
  position: fixed;
  z-index: 9900;
  transition: transform 0.2s ease, opacity 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.sticky-support-pill-row {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* Small QR Card sitting directly above pill */
.sticky-support-qr-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
}

.sticky-support-qr-card {
  background: #FFFFFF;
  padding: 5px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease;
}

.sticky-support-qr-card:hover {
  transform: scale(1.03);
}

.sticky-support-qr-card img,
.sticky-support-qr-card svg,
.sticky-support-qr-img {
  display: block;
  object-fit: contain;
  margin: 0 auto;
  border-radius: 4px;
}

/* Desktop QR Sizing: Compact (72-82px), Small (82-90px), Medium (90-100px) */
.sticky-size-compact .sticky-support-qr-card img,
.sticky-size-compact .sticky-support-qr-card svg,
.sticky-size-compact .sticky-support-qr-img {
  width: 78px;
  height: 78px;
}

.sticky-size-small .sticky-support-qr-card img,
.sticky-size-small .sticky-support-qr-card svg,
.sticky-size-small .sticky-support-qr-img {
  width: 86px;
  height: 86px;
}

.sticky-size-medium .sticky-support-qr-card img,
.sticky-size-medium .sticky-support-qr-card svg,
.sticky-size-medium .sticky-support-qr-img {
  width: 96px;
  height: 96px;
}

/* Desktop Dock Positions */
@media (min-width: 769px) {
  .sticky-support-dock.dock-bottom-right,
  .sticky-support-dock.dock-right,
  .sticky-support-dock:not(.dock-bottom-left):not(.dock-top-right):not(.dock-top-left):not(.dock-left) {
    right: 24px;
    bottom: 28px;
    left: auto;
    top: auto;
  }
  .sticky-support-dock.dock-bottom-left,
  .sticky-support-dock.dock-left {
    left: 24px;
    bottom: 28px;
    right: auto;
    top: auto;
  }
  .sticky-support-dock.dock-top-right {
    right: 24px;
    top: 80px;
    left: auto;
    bottom: auto;
  }
  .sticky-support-dock.dock-top-left {
    left: 24px;
    top: 80px;
    right: auto;
    bottom: auto;
  }
  .sticky-support-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.15rem;
    background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
    color: #FFFFFF !important;
    border-radius: var(--radius-full);
    font-size: 0.88rem;
    font-weight: 700;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
  }
  .sticky-support-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
    background: linear-gradient(135deg, #1D4ED8 0%, #1E40AF 100%);
    color: #FFFFFF !important;
  }
}

/* Mobile Dock (ALWAYS pinned to bottom right) */
@media (max-width: 768px) {
  .sticky-support-dock,
  .sticky-support-dock.dock-bottom-right,
  .sticky-support-dock.dock-bottom-left,
  .sticky-support-dock.dock-top-right,
  .sticky-support-dock.dock-top-left {
    right: 16px !important;
    bottom: 20px !important;
    left: auto !important;
    top: auto !important;
  }
  body.has-cookie-banner .sticky-support-dock {
    bottom: 78px !important;
  }

  /* Mobile QR Sizing */
  .sticky-size-compact .sticky-support-qr-card img,
  .sticky-size-compact .sticky-support-qr-card svg,
  .sticky-size-compact .sticky-support-qr-img {
    width: 68px;
    height: 68px;
  }
  .sticky-size-small .sticky-support-qr-card img,
  .sticky-size-small .sticky-support-qr-card svg,
  .sticky-size-small .sticky-support-qr-img {
    width: 76px;
    height: 76px;
  }
  .sticky-size-medium .sticky-support-qr-card img,
  .sticky-size-medium .sticky-support-qr-card svg,
  .sticky-size-medium .sticky-support-qr-img {
    width: 84px;
    height: 84px;
  }

  .sticky-support-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 0.95rem;
    background: #2563EB;
    color: #FFFFFF !important;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    border: none;
    text-decoration: none;
    cursor: pointer;
  }
}

.sticky-support-dismiss {
  background: rgba(15, 23, 42, 0.65);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.25);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  transition: all 0.15s ease;
}
.sticky-support-dismiss:hover {
  background: rgba(239, 68, 68, 0.9);
  transform: scale(1.1);
}

.support-bilingual-under-btn {
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text-muted);
  margin-top: 0.75rem;
  text-align: center;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}
.support-bilingual-under-btn .hindi-text {
  display: block;
  font-size: 0.8rem;
  color: var(--text-subtle);
  margin-top: 0.35rem;
  line-height: 1.4;
}

/* Sticky Donation Popup Modal */
.sticky-support-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.sticky-support-backdrop.open {
  display: flex;
}

.sticky-support-modal {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 1.75rem 1.5rem;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  position: relative;
  animation: modalFadeIn 0.25s ease;
  max-height: 92vh;
  overflow-y: auto;
}

.sticky-support-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--bg-surface-alt);
  border: 1px solid var(--border-subtle);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1.1rem;
  transition: all 0.15s;
}

.sticky-support-close:hover {
  background: var(--border-subtle);
  color: var(--text-main);
}

/* --------------------------------------------------------------------------
   CHARITY CAMPAIGNS PUBLIC CARD & SIZING STYLES
   -------------------------------------------------------------------------- */
.charity-campaign-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin: 1.75rem auto;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.charity-campaign-card:hover {
  box-shadow: var(--shadow-md);
}

.charity-card-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(4px);
  color: #FFFFFF;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  z-index: 2;
}

.charity-size-compact {
  max-width: 360px;
  padding: 1rem;
}

.charity-size-small {
  max-width: 420px;
  padding: 1.25rem;
}

.charity-size-medium {
  max-width: 600px;
  padding: 1.5rem;
}

.charity-size-large {
  max-width: 740px;
  padding: 1.85rem;
}

.charity-size-hero,
.charity-size-full {
  max-width: 1140px;
  padding: 2.25rem;
}

.charity-size-sidebar {
  max-width: 300px;
  padding: 1.25rem;
}

.charity-size-sticky {
  max-width: 280px;
  padding: 1rem;
}

.charity-card-hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
  align-items: center;
}

@media (max-width: 768px) {
  .charity-card-hero-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

.charity-card-img {
  width: 100%;
  border-radius: var(--radius-lg);
  object-fit: cover;
  display: block;
}

.charity-card-headline {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.3;
  margin: 0.5rem 0;
}

.charity-card-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 1.25rem;
}

.charity-transparency-box {
  background: var(--bg-surface-alt);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 1rem;
}

.charity-transparency-box .organizer-name {
  font-weight: 700;
  color: var(--text-main);
}

.charity-transparency-box .bilingual-notice {
  margin-top: 0.4rem;
  font-size: 0.75rem;
  color: #B45309;
  border-top: 1px dashed var(--border-subtle);
  padding-top: 0.4rem;
}

/* Verification Pills */
.charity-ver-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
}
.charity-ver-pill.ver-verified {
  background: #ECFDF5;
  color: #047857;
  border: 1px solid #6EE7B7;
}
.charity-ver-pill.ver-provided {
  background: #EFF6FF;
  color: #1D4ED8;
  border: 1px solid #93C5FD;
}
.charity-ver-pill.ver-unverified {
  background: #F8FAFC;
  color: #64748B;
  border: 1px solid #E2E8F0;
}

/* Sticky Charity Campaign Dock */
.sticky-charity-dock {
  position: fixed;
  z-index: 9890;
  transition: transform 0.2s ease, opacity 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
@media (min-width: 769px) {
  .sticky-charity-dock.dock-left {
    left: 24px;
    right: auto;
    bottom: 84px;
  }
  .sticky-charity-dock.dock-right,
  .sticky-charity-dock:not(.dock-left) {
    right: 24px;
    left: auto;
    bottom: 84px;
  }
  .sticky-charity-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.15rem;
    background: linear-gradient(135deg, #16A34A 0%, #15803D 100%);
    color: #FFFFFF !important;
    border-radius: var(--radius-full);
    font-size: 0.88rem;
    font-weight: 700;
    box-shadow: 0 4px 16px rgba(22, 163, 74, 0.35);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
  }
  .sticky-charity-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(22, 163, 74, 0.45);
  }
}
@media (max-width: 768px) {
  .sticky-charity-dock {
    left: 16px;
    bottom: 74px;
    right: auto;
  }
  .sticky-charity-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 0.95rem;
    background: #16A34A;
    color: #FFFFFF !important;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    border: none;
    cursor: pointer;
  }
}

/* Charity Details Modal */
.charity-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.charity-modal-backdrop.open {
  display: flex;
}
.charity-modal-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 2rem;
  max-width: 680px;
  width: 100%;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  position: relative;
  animation: modalFadeIn 0.25s ease;
  max-height: 90vh;
  overflow-y: auto;
}
.charity-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--bg-surface-alt);
  border: 1px solid var(--border-subtle);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1.1rem;
  transition: all 0.15s;
}
.charity-modal-close:hover {
  background: var(--border-subtle);
  color: var(--text-main);
}


/* ==========================================================================
   5.3 STICKY ROTATING OUR SUPPORTERS CARD (TASK 2)
   ========================================================================== */
.sticky-supporters-dock {
  position: fixed;
  z-index: 9800;
  pointer-events: none;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* Dock Positions (Top-Left by default) */
.sticky-supporters-dock.supporters-dock-top-left {
  top: 84px;
  left: 24px;
  right: auto;
  bottom: auto;
}

.sticky-supporters-dock.supporters-dock-top-right {
  top: 84px;
  right: 24px;
  left: auto;
  bottom: auto;
}

.sticky-supporters-dock.supporters-dock-bottom-left {
  bottom: 28px;
  left: 24px;
  right: auto;
  top: auto;
}

.sticky-supporters-dock.supporters-dock-bottom-right {
  bottom: 28px;
  right: 24px;
  left: auto;
  top: auto;
}

/* Mobile responsive dock positioning */
@media (max-width: 768px) {
  .sticky-supporters-dock.supporters-dock-top-left,
  .sticky-supporters-dock.supporters-dock-top-right {
    top: 72px;
  }
  .sticky-supporters-dock.supporters-dock-top-left {
    left: 12px;
  }
  .sticky-supporters-dock.supporters-dock-top-right {
    right: 12px;
  }
  .sticky-supporters-dock.supporters-dock-bottom-left {
    bottom: 20px;
    left: 12px;
  }
  .sticky-supporters-dock.supporters-dock-bottom-right {
    bottom: 20px;
    right: 12px;
  }
}

.sticky-supporter-card {
  width: 275px;
  max-width: calc(100vw - 32px);
  background: var(--bg-surface, #ffffff);
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-radius: 16px;
  padding: 14px 16px 12px 16px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  pointer-events: auto;
  transition: opacity 0.3s ease, transform 0.3s ease;
  position: relative;
  text-align: center;
}

.sticky-supporter-card.fade-out {
  opacity: 0;
  transform: translateY(-4px);
}

.sticky-supporter-card.fade-in {
  opacity: 1;
  transform: translateY(0);
}

/* Header: "❤️ Our Supporters" on left, "×" on right */
.sticky-supporter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.sticky-supporter-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-main, #0f172a);
}

.sticky-supporter-heart {
  font-size: 0.95rem;
  line-height: 1;
}

.sticky-supporter-dismiss {
  background: transparent;
  border: none;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--text-subtle, #94a3b8);
  cursor: pointer;
  padding: 2px 5px;
  border-radius: 4px;
  transition: color 0.15s, background-color 0.15s;
}

.sticky-supporter-dismiss:hover {
  color: var(--text-main, #0f172a);
  background-color: var(--bg-surface-alt, #f1f5f9);
}

/* Verified Supporter Badge */
.sticky-supporter-badge-wrap {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 12px;
}

.sticky-supporter-verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #047857;
  background: #ECFDF5;
  padding: 2px 8px;
  border-radius: 9999px;
  border: 1px solid #A7F3D0;
}

.sticky-supporter-star {
  font-size: 0.75rem;
  line-height: 1;
}

/* Centered Circular Profile Image (84px) */
.sticky-supporter-avatar-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 10px auto;
}

.sticky-supporter-avatar-img {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 3px solid #FFFFFF;
  box-shadow: 0 0 0 2px #3B82F6, 0 4px 14px rgba(59, 130, 246, 0.25);
  background-color: #F1F5F9;
}

.sticky-supporter-avatar-fallback {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
  color: #FFFFFF;
  font-weight: 800;
  font-size: 1.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid #FFFFFF;
  box-shadow: 0 0 0 2px #3B82F6, 0 4px 14px rgba(59, 130, 246, 0.25);
  text-transform: uppercase;
  user-select: none;
}

/* Supporter Details (Centered) */
.sticky-supporter-details {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2px;
}

.sticky-supporter-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main, #0f172a);
  margin: 0;
  line-height: 1.3;
  text-transform: capitalize;
  word-break: break-word;
}

.sticky-supporter-business {
  font-size: 0.86rem;
  font-weight: 600;
  color: #2563EB;
  margin: 0;
  line-height: 1.3;
  word-break: break-word;
}

.sticky-supporter-location {
  font-size: 0.78rem;
  color: var(--text-muted, #64748b);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 2px 0 0 0;
  line-height: 1.3;
}

.sticky-supporter-loc-pin {
  font-size: 0.8rem;
  line-height: 1;
}

.sticky-supporter-msg {
  font-size: 0.82rem;
  font-style: italic;
  color: var(--text-muted, #475569);
  line-height: 1.4;
  margin: 6px 0 0 0;
  word-break: break-word;
  max-width: 100%;
}

.sticky-supporter-link-wrap {
  margin-top: 4px;
}

.sticky-supporter-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.74rem;
  font-weight: 600;
  color: #2563EB;
  text-decoration: none;
}

.sticky-supporter-link:hover {
  text-decoration: underline;
}

/* Divider & Thank You Message */
.sticky-supporter-divider {
  height: 1px;
  background: var(--border-subtle, #e2e8f0);
  margin: 10px auto 8px auto;
  width: 100%;
}

.sticky-supporter-thankyou {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted, #64748b);
  line-height: 1.35;
  text-align: center;
}

/* Mobile responsive adjustments */
@media (max-width: 480px) {
  .sticky-supporter-card {
    width: 250px;
    padding: 12px 14px 10px 14px;
  }
  .sticky-supporter-avatar-img,
  .sticky-supporter-avatar-fallback {
    width: 74px;
    height: 74px;
    font-size: 1.6rem;
  }
  .sticky-supporter-name {
    font-size: 0.98rem;
  }
  .sticky-supporter-business {
    font-size: 0.82rem;
  }
  .sticky-supporter-msg {
    font-size: 0.78rem;
  }
  .sticky-supporter-thankyou {
    font-size: 0.78rem;
  }
}

/* ==========================================================================
   6. WINDOWS APP SECTION (COMING SOON)
   ========================================================================== */
.windows-app-card {
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
  color: #FFFFFF;
  border-radius: var(--radius-xl);
  padding: 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2.5rem;
  box-shadow: var(--shadow-xl);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.windows-app-info {
  max-width: 580px;
}

.windows-app-title {
  font-size: 2.2rem;
  color: #FFFFFF;
  margin-bottom: 0.75rem;
  font-weight: 800;
}

.windows-app-desc {
  font-size: 1.05rem;
  color: #94A3B8;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.windows-app-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

.windows-feature-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: #CBD5E1;
}

.windows-feature-icon {
  color: #38BDF8;
}

.windows-app-visual {
  flex-shrink: 0;
  text-align: center;
}

.windows-icon-graphic {
  width: 140px;
  height: 140px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #38BDF8;
  margin: 0 auto;
}

/* ==========================================================================
   7. SIMPLE NON-BLOCKING COOKIE BANNER
   ========================================================================== */
.cookie-consent-banner {
  position: fixed;
  bottom: 1.25rem;
  left: 1.25rem;
  right: 1.25rem;
  max-width: 560px;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: 1.25rem 1.5rem;
  z-index: 1020;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  animation: slide-up 300ms ease-out;
}

.cookie-consent-banner[hidden] {
  display: none !important;
}

@keyframes slide-up {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.cookie-text {
  font-size: 0.9rem;
  color: var(--text-main);
  line-height: 1.4;
}

.cookie-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* ==========================================================================
   8. FOOTER
   ========================================================================== */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 4rem 0 2rem 0;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(4, 1fr);
  gap: 2.5rem;
  margin-bottom: 3.5rem;
}

.footer-col-brand {
  max-width: 320px;
}

.footer-logo {
  margin-bottom: 1rem;
}

.footer-description {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.footer-heading {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-main);
  margin-bottom: 1.25rem;
}

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

.footer-links a {
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

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

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.88rem;
  color: var(--text-subtle);
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.footer-bottom-links a:hover {
  color: var(--primary);
}

/* Social media link icons */
.footer-social-mount {
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
  width: 100%;
}

.footer-social-mount:not(.has-social-links) {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.footer-social-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-social-heading {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-subtle, #64748B);
}

.footer-social-list,
.footer-social-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.footer-social-btn,
.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md, 8px);
  background: var(--bg-surface-alt, #F8FAFC);
  color: var(--text-muted, #475569);
  border: 1px solid var(--border-subtle, #E2E8F0);
  transition: all var(--transition-fast, 0.2s ease);
  text-decoration: none;
  cursor: pointer;
  flex-shrink: 0;
}

.footer-social-btn:hover,
.social-btn:hover {
  color: #FFFFFF;
  background: var(--primary, #2563EB);
  border-color: var(--primary, #2563EB);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.footer-social-btn:focus-visible,
.social-btn:focus-visible {
  outline: 2px solid var(--primary, #2563EB);
  outline-offset: 2px;
}

.footer-social-btn svg,
.social-btn svg {
  width: 18px;
  height: 18px;
  display: block;
}

/* Individual Platform Hover Accents */
.footer-social-btn.footer-social-facebook:hover { background: #1877F2; border-color: #1877F2; }
.footer-social-btn.footer-social-instagram:hover { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%); border-color: #d6249f; }
.footer-social-btn.footer-social-youtube:hover { background: #FF0000; border-color: #FF0000; }
.footer-social-btn.footer-social-linkedin:hover { background: #0A66C2; border-color: #0A66C2; }
.footer-social-btn.footer-social-x_twitter:hover { background: #000000; border-color: #000000; }
.footer-social-btn.footer-social-whatsapp:hover { background: #25D366; border-color: #25D366; }
.footer-social-btn.footer-social-telegram:hover { background: #24A1DE; border-color: #24A1DE; }
.footer-social-btn.footer-social-pinterest:hover { background: #E60023; border-color: #E60023; }
.footer-social-btn.footer-social-reddit:hover { background: #FF4500; border-color: #FF4500; }
.footer-social-btn.footer-social-threads:hover { background: #000000; border-color: #000000; }
.footer-social-btn.footer-social-tiktok:hover { background: #000000; border-color: #000000; }
.footer-social-btn.footer-social-snapchat:hover { background: #FFFC00; border-color: #FFFC00; color: #000000 !important; }
.footer-social-btn.footer-social-discord:hover { background: #5865F2; border-color: #5865F2; }
.footer-social-btn.footer-social-github:hover { background: #24292F; border-color: #24292F; }
.footer-social-btn.footer-social-medium:hover { background: #000000; border-color: #000000; }

[data-theme="dark"] .footer-social-btn,
[data-theme="dark"] .social-btn {
  background: var(--bg-surface-alt, #1E293B);
  color: var(--text-muted, #94A3B8);
  border-color: var(--border-subtle, #334155);
}

[data-theme="dark"] .footer-social-btn:hover,
[data-theme="dark"] .social-btn:hover {
  color: #FFFFFF;
}

/* Back to Top */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: #FFFFFF;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 990;
  transition: all var(--transition-normal);
}

.back-to-top:hover {
  background: var(--primary-hover);
  transform: translateY(-3px);
}

.back-to-top[hidden] {
  display: none !important;
}

/* Modal Framework */
.smart-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.smart-modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.smart-modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  max-width: 500px;
  width: 100%;
  padding: 2rem;
  box-shadow: var(--shadow-xl);
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  color: var(--text-subtle);
}

.modal-close-btn:hover {
  color: var(--text-main);
}

/* Responsive Component Adjustments */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .footer-col-brand {
    grid-column: span 3;
    max-width: 100%;
  }
  .popular-cats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .desktop-nav {
    display: none;
  }
  .menu-toggle {
    display: inline-flex;
  }
  .hero-title {
    font-size: 2.25rem;
  }
  .hero-subtitle {
    font-size: 1.05rem;
  }
  .tools-grid,
  #category-tools-grid,
  .tools-grid-popular {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }
  .popular-cats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  .popular-cat-card {
    padding: 0.85rem 1rem;
  }
  .pop-cat-icon {
    width: 36px;
    height: 36px;
  }
  .pop-cat-icon svg {
    width: 18px;
    height: 18px;
  }
  .btn-more-tools,
  .btn-more-cats {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }
  .smart-print-banner {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem;
  }
  .smart-print-content {
    flex-direction: column;
  }
  .smart-print-btn {
    width: 100%;
    justify-content: center;
  }
  .windows-app-card {
    flex-direction: column;
    padding: 2rem;
    text-align: center;
  }
  .windows-app-features {
    grid-template-columns: 1fr;
    text-align: left;
  }
  .cookie-consent-banner {
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
    flex-direction: column;
    text-align: center;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .footer-col-brand {
    grid-column: span 1;
  }
}

@media (max-width: 540px) {
  .popular-cats-grid {
    grid-template-columns: 1fr;
  }
  .tools-grid-popular,
  .tools-grid,
  #category-tools-grid {
    grid-template-columns: 1fr;
  }
  .brand-logo .logo-text {
    font-size: 1.1rem;
  }
  .header-actions {
    gap: 0.35rem;
  }
  .action-btn {
    width: 34px;
    height: 34px;
  }
  .action-btn .ui-icon {
    width: 16px;
    height: 16px;
  }
}

/* ==========================================================================
   HOMEPAGE SECTION MANAGER: ZERO FOOTPRINT FOR HIDDEN SECTIONS
   Guarantees zero layout height, no margins, no padding, and complete invisibility
   ========================================================================== */
[data-section-hidden="true"] {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  line-height: 0 !important;
  overflow: hidden !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
