/**
 * MahaGovAI — Swarajya Light Theme & Sunset Heritage Design
 * Premium, spacious, modern AI ecosystem website inspired by Swarajya heritage
 */

:root {
  /* Typography System — Sora (Headings) & Manrope (Body/UI) */
  --mg-font-heading: 'Sora', sans-serif;
  --mg-font-body: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-main: var(--mg-font-body);
  --font-display: var(--mg-font-heading);

  /* Exact Approved Hero Color Palette */
  --mg-warm-ivory: #FFF7E6;       /* Primary text */
  --mg-champagne-gold: #FFC247;   /* Highlight text / Icons */
  --mg-soft-ivory: #F5EAD4;       /* Secondary text / Descriptions */
  --mg-saffron-orange: #FF9D24;   /* Accent */
  --mg-deep-forest-green: #0C251D;/* Deep green solid cards */
  --mg-card-border-gold: #B98B2E; /* Feature card gold border */
  --mg-card-hover-green: #133328; /* Subtle card hover background */

  /* Global Hero Color Palette (backwards compatibility) */
  --mg-warm-white: #FFF7E6;
  --mg-gold-accent: #FFC247;
  --mg-desc-text: #F5EAD4;
  --mg-emerald-green: #173B30;

  /* Swarajya Light Theme Palette */
  --mg-ivory: #F8F5EC;
  --mg-cream: #F2EBDD;
  --mg-parchment: #EDE3CE;
  --mg-parchment-light: #FAF7F0;
  --mg-white: #FFFFFF;

  --mg-heritage-green: #234B38;
  --mg-forest-green: #123526;
  --mg-forest-deep: #0D271C;
  --mg-forest-muted: #3D5A47;
  --mg-forest-sub: #5C7866;

  --mg-saffron: #E65100;
  --mg-saffron-muted: #C89532;
  --mg-gold: #B58A38;
  --mg-gold-light: #F6C453;
  --mg-charcoal: #292D29;

  /* Theme Variable Mappings — Golden Sunset Over Misty Mountain Valley */
  --mg-hero-bottom: #0b2618;
  --mg-bg: #0b2618;
  --mg-bg-surface: #0e3321;
  --mg-bg-card: #FFFFFF;
  --mg-bg-card-inner: #FAF7F0;
  --mg-bg-hover: #FFFFFF;

  --mg-text: #123526;
  --mg-text-muted: #3D5A47;
  --mg-text-sub: #5C7866;

  --mg-gold-border: rgba(246, 196, 83, 0.35);
  --mg-gold-border-bright: rgba(246, 196, 83, 0.7);
  --mg-gold-glow: 0 0 20px rgba(246, 196, 83, 0.22);

  --mg-gradient-saffron: linear-gradient(135deg, #FFB000 0%, #F07800 100%);
  --mg-gradient-heritage: linear-gradient(135deg, #234B38 0%, #123526 100%);
  --mg-gradient-gold: linear-gradient(135deg, #FFE082 0%, #F6C453 50%, #B58A38 100%);

  --mg-radius-lg: 20px;
  --mg-radius-md: 14px;
  --mg-radius-pill: 50px;

  --mg-shadow-sm: 0 2px 8px rgba(35, 75, 56, 0.04);
  --mg-shadow-card: 0 14px 38px rgba(35, 75, 56, 0.06), 0 2px 8px rgba(0, 0, 0, 0.03);
  --mg-shadow-hover: 0 16px 40px rgba(200, 149, 50, 0.16), 0 4px 12px rgba(35, 75, 56, 0.06);
}

/* Global Reset & Body override — Maharashtra Fort Canvas */
html {
  min-height: 100%;
  background-color: transparent !important;
  background-image: url('../images/maharashtra_fort.png') !important;
  background-repeat: no-repeat !important;
  background-position: center center !important;
  background-size: cover !important;
  background-attachment: fixed !important;
}

body {
  min-height: 100vh;
  background-color: transparent !important;
  background-image: none !important;
  color: var(--mg-text) !important;
  font-family: var(--mg-font-body);
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  line-height: 1.6;
}

/* Global Typography Foundations */
h1, h2, h3, h4, h5, h6,
.mg-section-title,
.mg-hero-heading,
.mg-hero-subheading {
  font-family: var(--mg-font-heading);
}

.mg-section-title {
  font-family: var(--mg-font-heading);
  font-weight: 700;
}

p,
.mg-section-desc,
.mg-hero-description {
  font-family: var(--mg-font-body);
}

button,
.mg-btn-amber,
.mg-btn-outline-gold,
.mg-btn-primary,
.mg-login-btn {
  font-family: var(--mg-font-body);
  font-weight: 700;
}

/* Eliminate any ambient overlay grids or background-image layers from all sections below hero */
body::before,
[data-theme="dark"] body::before,
.hero-cyber-grid,
.founder-ambient-grid,
.footer-ambient-glow {
  display: none !important;
  background-image: none !important;
}

/* Base Container */
.mg-container {
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}

/* =========================================================================
   1. STICKY HEADER — GLASSMORPHISM EFFECT
   ========================================================================= */
.mg-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 72px;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 1px solid transparent;
  z-index: 1000;
  display: flex;
  align-items: center;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Glassmorphic floating/sticky header when scrolled:
   Translucent subtle dark green / deep charcoal tint with backdrop blur,
   thin elegant border, subtle shadow, and high contrast visibility */
.mg-navbar.scrolled {
  height: 66px;
  background: rgba(14, 42, 28, 0.82) !important;
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid rgba(200, 149, 50, 0.32);
  box-shadow: 0 10px 30px rgba(10, 30, 20, 0.22), 0 1px 3px rgba(0, 0, 0, 0.08);
}

.mg-navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.mg-brand-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.mg-brand-logo img {
  height: 38px;
  max-height: 38px;
  width: auto;
  min-width: 120px;
  max-width: 200px;
  object-fit: contain;
  display: block;
}

.mg-nav-menu {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.2vw, 32px);
  list-style: none;
  margin: 0;
  padding: 0;
}

.mg-nav-link {
  font-family: var(--mg-font-body);
  color: var(--mg-warm-white);
  text-decoration: none;
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: color 0.25s ease;
  position: relative;
  padding: 6px 0;
}

.mg-nav-link:hover,
.mg-nav-link.active {
  color: var(--mg-champagne-gold);
}

.mg-nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--mg-champagne-gold);
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(246, 196, 83, 0.6);
}

/* Mobile Drawer & Links Styling — Swarajya Palette */
.mobile-drawer {
  background: rgba(12, 37, 29, 0.96) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  border-bottom: 1px solid rgba(185, 139, 46, 0.35) !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5) !important;
}

.mobile-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
  padding: 0;
}

.mobile-nav-link {
  font-family: var(--mg-font-body) !important;
  font-size: 1.05rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.02em !important;
  color: var(--mg-warm-white) !important;
  display: flex !important;
  align-items: center !important;
  padding: 10px 14px !important;
  border-radius: 10px !important;
  text-decoration: none !important;
  position: relative !important;
  transition: all 0.25s ease !important;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: var(--mg-champagne-gold) !important;
  background: rgba(255, 194, 71, 0.1) !important;
}

.mobile-nav-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 15%;
  bottom: 15%;
  width: 3px;
  background: var(--mg-champagne-gold);
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(246, 196, 83, 0.5);
}

.mg-nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.mg-icon-btn {
  background: transparent;
  border: none;
  color: var(--mg-warm-white);
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.mg-icon-btn:hover {
  color: var(--mg-champagne-gold);
  background: rgba(246, 196, 83, 0.16);
}

.mg-login-btn {
  font-family: var(--mg-font-body);
  background: rgba(12, 37, 29, 0.65);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1.5px solid rgba(246, 196, 83, 0.6);
  color: var(--mg-warm-white) !important;
  padding: 8px 24px;
  border-radius: 9999px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mg-login-btn:hover {
  background: rgba(23, 59, 48, 0.85);
  border-color: var(--mg-champagne-gold);
  color: var(--mg-warm-white) !important;
  box-shadow: 0 6px 20px rgba(246, 196, 83, 0.35);
  transform: translateY(-1px);
}

.mg-navbar.scrolled .mg-login-btn {
  background: rgba(12, 37, 29, 0.8);
  border-color: rgba(246, 196, 83, 0.7);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.mg-navbar.scrolled .mg-login-btn:hover {
  background: rgba(23, 59, 48, 0.95);
  border-color: var(--mg-champagne-gold);
  box-shadow: 0 6px 22px rgba(246, 196, 83, 0.4);
}

/* =========================================================================
   2. HERO SECTION (MAHARASHTRA FORT BACKGROUND)
   ========================================================================= */
.mg-hero-section {
  position: relative;
  width: 100%;
  min-height: 640px;
  background-color: transparent !important;
  background-image: none !important;
  padding-top: 135px;
  padding-bottom: 75px;
  display: flex;
  align-items: flex-start;
  overflow: hidden;
}

/* Atmospheric darkening overlay removed */
.mg-hero-section::before {
  display: none !important;
}

.mg-hero-stage-wrapper {
  max-width: 1360px;
  width: 100%;
  margin: 0 auto;
  padding: 0 24px;
  box-sizing: border-box;
  position: relative;
  z-index: 5;
}

.mg-hero-stage {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
  box-sizing: border-box;
}

/* Center / Left Main Content: Strict Vertical Column Flow */
.mg-hero-main-content {
  position: relative;
  z-index: 10;
  max-width: 820px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.mg-hero-badge-wrap {
  display: block;
  width: 100%;
  margin-bottom: 14px;
}

/* Ecosystem Badge: Transparent background, thin gold border, champagne-gold text, no shadow/glow/blur */
.mg-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent !important;
  border: 1px solid rgba(255, 194, 71, 0.45);
  color: var(--mg-champagne-gold);
  padding: 6px 18px;
  border-radius: 9999px;
  font-family: var(--mg-font-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin: 0;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Main Heading: 76-84px desktop, Sora 800, line-height 1.05, letter-spacing -2px */
.mg-hero-heading {
  display: block;
  width: 100%;
  clear: both;
  font-family: var(--mg-font-heading);
  font-size: clamp(52px, 5.2vw, 84px);
  font-weight: 800;
  line-height: 1.05;
  margin: 0 0 16px 0;
  letter-spacing: -2px;
  position: relative;
  overflow: visible;
  z-index: 5;
  text-shadow: none !important;
}

/* MahaGov: Warm ivory (#FFF7E6) */
.mg-title-brand {
  color: var(--mg-warm-ivory);
  display: inline-block;
  overflow: visible;
  background: none;
  -webkit-background-clip: initial;
  -webkit-text-fill-color: initial;
  filter: none;
  text-shadow: none !important;
}

/* AI: Champagne gold (#FFC247) */
.mg-title-ai {
  color: var(--mg-champagne-gold);
  font-weight: 800;
  font-style: normal;
  margin-left: 8px;
  display: inline-block;
  overflow: visible;
  letter-spacing: 0.01em;
  background: none;
  -webkit-background-clip: initial;
  -webkit-text-fill-color: initial;
  filter: none;
  text-shadow: none !important;
}

/* Hero Subtitle: 34-38px desktop, Sora 700, line-height 1.2, two distinct lines */
.mg-hero-subheading {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--mg-font-heading);
  font-size: clamp(24px, 2.5vw, 36px);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 20px 0;
  letter-spacing: -0.015em;
  text-shadow: none !important;
}

.mg-subheading-line-1 {
  display: block;
  color: var(--mg-warm-ivory);
  text-shadow: none !important;
}

.mg-subheading-line-2 {
  display: block;
  color: var(--mg-champagne-gold);
  text-shadow: none !important;
}

/* Hero Description: 19-20px, Manrope 400, line-height 1.6, max-width 800px, soft ivory (#F5EAD4) */
.mg-hero-description {
  font-family: var(--mg-font-body);
  font-weight: 400;
  font-size: clamp(17px, 1.25vw, 19.5px);
  line-height: 1.6;
  color: var(--mg-soft-ivory);
  margin: 0 0 32px 0;
  max-width: 800px;
  text-shadow: none !important;
}

.mg-hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

/* Primary CTA Button: Saffron gradient, white bold text, rounded pill, no shadow/glow */
.mg-btn-amber {
  font-family: var(--mg-font-body);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #FF9D24 0%, #E65100 100%);
  color: #FFFFFF !important;
  padding: 13px 30px;
  border-radius: 9999px;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  border: none;
  box-shadow: none !important;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.25s ease;
}

.mg-btn-amber:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: none !important;
}

/* Secondary CTA Button: Transparent background, champagne-gold border, warm ivory text, no shadow/glass */
.mg-btn-outline-gold {
  font-family: var(--mg-font-body);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent !important;
  border: 1.5px solid var(--mg-champagne-gold);
  color: var(--mg-warm-ivory) !important;
  padding: 12px 28px;
  border-radius: 9999px;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              background 0.25s ease,
              border-color 0.25s ease,
              color 0.25s ease;
}

.mg-btn-outline-gold:hover {
  background: rgba(255, 194, 71, 0.12) !important;
  border-color: var(--mg-champagne-gold);
  color: var(--mg-warm-ivory) !important;
  transform: translateY(-2px);
  box-shadow: none !important;
}

/* =========================================================================
   3. SEPARATE AUDIENCE TABS — SOLID DEEP FOREST-GREEN, GOLD BORDER
   ========================================================================= */
.mg-audience-tabs-container {
  width: 100%;
  max-width: 800px;
  margin-top: 10px;
  box-sizing: border-box;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 4px 2px;
}

.mg-audience-tabs-container::-webkit-scrollbar {
  display: none;
}

.mg-audience-tabs-grid {
  display: flex;
  align-items: stretch;
  gap: 10px;
  width: 100%;
}

.mg-aud-card-tab {
  flex: 1 1 0;
  min-width: 96px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px 8px;
  background: var(--mg-deep-forest-green);
  border: 1px solid var(--mg-card-border-gold);
  border-radius: 14px;
  text-decoration: none;
  color: var(--mg-warm-ivory) !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              background 0.28s ease,
              border-color 0.28s ease;
  position: relative;
  cursor: pointer;
}

.mg-aud-tab-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--mg-champagne-gold);
  margin-bottom: 6px;
  transition: transform 0.25s ease, color 0.25s ease;
}

.mg-aud-tab-icon svg {
  width: 22px;
  height: 22px;
}

.mg-aud-tab-label {
  font-family: var(--mg-font-body);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.01em;
  color: var(--mg-warm-ivory);
  transition: color 0.25s ease;
}

/* Hover & Active States for Audience Tabs */
.mg-aud-card-tab:hover {
  transform: translateY(-2px);
  background: var(--mg-card-hover-green);
  border-color: var(--mg-champagne-gold);
  box-shadow: none !important;
}

.mg-aud-card-tab:hover .mg-aud-tab-icon {
  transform: scale(1.08);
  color: var(--mg-champagne-gold);
}

.mg-aud-card-tab:hover .mg-aud-tab-label {
  color: var(--mg-warm-ivory);
}

.mg-aud-card-tab.active {
  border-color: var(--mg-champagne-gold);
  background: var(--mg-card-hover-green);
  box-shadow: none !important;
}

.mg-aud-card-tab.active .mg-aud-tab-icon {
  color: var(--mg-champagne-gold);
}

/* Right 4 Floating Feature Cards: Solid #0C251D, Gold Border #B98B2E, Rounded 20px */
.mg-hero-cards-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 185px;
  position: relative;
  z-index: 10;
}

.mg-hero-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 14px 12px;
  min-height: 96px;
  box-sizing: border-box;
  background: var(--mg-deep-forest-green);
  border: 1px solid var(--mg-card-border-gold);
  border-radius: 20px;
  text-decoration: none;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              background 0.28s ease,
              border-color 0.28s ease;
}

.mg-hero-card:hover {
  transform: translateY(-2px);
  background: var(--mg-card-hover-green);
  border-color: var(--mg-champagne-gold);
  box-shadow: none !important;
}

.mg-card-icon {
  width: 28px;
  height: 28px;
  color: var(--mg-champagne-gold);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, color 0.2s ease;
}

.mg-hero-card:hover .mg-card-icon {
  transform: scale(1.08);
  color: var(--mg-champagne-gold);
}

.mg-card-title {
  color: var(--mg-warm-ivory);
  font-family: var(--mg-font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.25;
}

.mg-card-sub {
  color: var(--mg-soft-ivory);
  font-family: var(--mg-font-body);
  font-size: 0.74rem;
  font-weight: 400;
  margin-top: 2px;
}

/* Hero Scroll-Down Indicator */
.mg-hero-scroll-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 36px;
  position: relative;
  z-index: 10;
}

.mg-hero-scroll-indicator {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  opacity: 0.85;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.mg-hero-scroll-indicator:hover {
  opacity: 1;
  transform: translateY(2px);
}

.mg-scroll-pill {
  width: 22px;
  height: 36px;
  border-radius: 20px;
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  background: var(--mg-deep-forest-green);
  position: relative;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}

.mg-scroll-dot {
  width: 4px;
  height: 8px;
  border-radius: 4px;
  background: #fbbf24;
  animation: mgScrollBounce 1.8s infinite ease-in-out;
}

@keyframes mgScrollBounce {
  0% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(10px); opacity: 0.3; }
  100% { transform: translateY(0); opacity: 1; }
}

.mg-scroll-text {
  color: #EDE3CE;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

/* =========================================================================
   HOMEPAGE SECTIONS & GLASS CARDS
   Seamless background flows through across all homepage sections
   ========================================================================= */
.mg-section,
.section,
.section-alt,
#about,
#tools,
#solutions,
#portfolio,
#why-choose,
#blog,
#get-started,
.mg-final-cta-section,
.mg-footer-section {
  background-image: none !important;
  background-color: transparent !important;
  padding: 34px 0;
  position: relative;
  z-index: 5;
}

/* Common Swarajya Light Glass Card */
.mg-glass-card {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--mg-gold-border);
  border-radius: var(--mg-radius-lg);
  padding: 38px 42px;
  box-shadow: var(--mg-shadow-card);
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.mg-glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(200, 149, 50, 0.55), rgba(230, 81, 0, 0.4), transparent);
}

/* Common Section Header & Typography */
.mg-section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 36px auto;
}

.mg-section-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}

.mg-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mg-saffron-muted);
  background: rgba(200, 149, 50, 0.1);
  border: 1px solid rgba(200, 149, 50, 0.3);
  padding: 4px 12px;
  border-radius: var(--mg-radius-pill);
  margin-bottom: 12px;
}

.mg-eyebrow-amber {
  color: #FFB300;
  background: rgba(255, 179, 0, 0.12);
  border-color: rgba(255, 179, 0, 0.35);
}

.mg-section-title {
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--mg-forest-green);
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 0 0 10px 0;
}

.mg-section-desc {
  color: var(--mg-forest-muted);
  font-size: 0.98rem;
  line-height: 1.6;
  margin: 0;
}

.mg-text-gradient-amber {
  background: linear-gradient(135deg, #FFB300 0%, #E65100 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Global Buttons & CTA Helpers */
.mg-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--mg-gradient-saffron);
  border: none;
  color: #FFFFFF !important;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 10px 22px;
  border-radius: var(--mg-radius-pill);
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(230, 81, 0, 0.3);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.mg-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(230, 81, 0, 0.45);
}

.mg-btn-outline-forest {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(35, 75, 56, 0.05);
  border: 1.5px solid var(--mg-heritage-green);
  color: var(--mg-heritage-green) !important;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 9px 20px;
  border-radius: var(--mg-radius-pill);
  text-decoration: none;
  transition: all 0.25s ease;
  cursor: pointer;
}

.mg-btn-outline-forest:hover {
  background: var(--mg-heritage-green);
  color: #FFFFFF !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(35, 75, 56, 0.25);
}

.mg-btn-amber {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #FFB300 0%, #E65100 100%);
  border: none;
  color: #FFFFFF !important;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 10px 22px;
  border-radius: var(--mg-radius-pill);
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(230, 81, 0, 0.35);
  transition: all 0.25s ease;
  cursor: pointer;
}

.mg-btn-amber:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(230, 81, 0, 0.45);
}

.mg-btn-outline-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  color: #FFFFFF !important;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 9px 20px;
  border-radius: var(--mg-radius-pill);
  text-decoration: none;
  transition: all 0.25s ease;
  cursor: pointer;
}

.mg-btn-outline-gold:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: #FFFFFF;
  transform: translateY(-2px);
}

.mg-btn-lg {
  padding: 13px 28px;
  font-size: 0.95rem;
}

.mg-btn-full {
  width: 100%;
}

.mg-btn-sm-primary {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--mg-heritage-green);
  color: #FFFFFF !important;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--mg-radius-pill);
  text-decoration: none;
  transition: all 0.2s ease;
}

.mg-btn-sm-primary:hover {
  background: var(--mg-saffron);
  transform: translateX(2px);
}

.mg-link-gold {
  color: var(--mg-saffron-muted);
  font-weight: 700;
  font-size: 0.86rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s ease, transform 0.2s ease;
}

.mg-link-gold:hover {
  color: var(--mg-saffron);
  transform: translateX(2px);
}

/* =========================================================================
   A. WHAT IS MAHAGOV AI? (4 DISTINCT PILLAR CARDS)
   ========================================================================= */
.mg-pillars-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  align-items: stretch;
}

.mg-pillar-card {
  background: var(--mg-bg-card-inner);
  border: 1px solid var(--mg-gold-border);
  border-radius: var(--mg-radius-md);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-sizing: border-box;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--mg-shadow-sm);
  position: relative;
  overflow: hidden;
}

.mg-pillar-card:hover {
  background: #FFFFFF;
  border-color: var(--mg-saffron-muted);
  transform: translateY(-4px);
  box-shadow: var(--mg-shadow-hover);
}

.mg-pillar-icon-box {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(35, 75, 56, 0.09);
  border: 1.5px solid rgba(200, 149, 50, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--mg-forest-green);
  margin-bottom: 18px;
  transition: all 0.25s ease;
  flex-shrink: 0;
}

.mg-pillar-card:hover .mg-pillar-icon-box {
  background: rgba(200, 149, 50, 0.2);
  border-color: var(--mg-saffron);
  color: var(--mg-saffron);
  transform: scale(1.08);
}

.mg-pillar-content {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.mg-pillar-badge {
  display: inline-block;
  align-self: flex-start;
  background: rgba(200, 149, 50, 0.12);
  color: #B58A38;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 9px;
  border-radius: var(--mg-radius-pill);
  margin-bottom: 10px;
}

.mg-pillar-title {
  color: var(--mg-forest-green);
  font-size: 1.22rem;
  font-weight: 800;
  margin: 0 0 10px 0;
  letter-spacing: -0.01em;
}

.mg-pillar-desc {
  color: var(--mg-forest-muted);
  font-size: 0.88rem;
  line-height: 1.6;
  margin: 0 0 20px 0;
  flex-grow: 1;
}

.mg-pillar-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--mg-heritage-green);
  font-size: 0.85rem;
  font-weight: 750;
  margin-top: auto;
  transition: gap 0.2s ease, color 0.2s ease;
}

.mg-pillar-card:hover .mg-pillar-action {
  color: var(--mg-saffron);
  gap: 10px;
}

/* =========================================================================
   B. POPULAR AI TOOLS (SEARCH BAR, CATEGORIES & FEATURED UTILITIES)
   ========================================================================= */
.mg-tools-search-bar-wrap {
  max-width: 680px;
  margin: 0 auto 34px auto;
}

.mg-tools-search-form {
  display: flex;
  align-items: center;
  background: #FFFFFF;
  border: 1.5px solid var(--mg-gold-border);
  border-radius: var(--mg-radius-pill);
  padding: 6px 8px 6px 18px;
  box-shadow: 0 4px 16px rgba(35, 75, 56, 0.05);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.mg-tools-search-form:focus-within {
  border-color: var(--mg-saffron);
  box-shadow: 0 6px 24px rgba(230, 81, 0, 0.15);
}

.mg-tools-search-icon {
  color: var(--mg-forest-sub);
  display: flex;
  align-items: center;
  margin-right: 10px;
  flex-shrink: 0;
}

.mg-tools-search-input {
  border: none;
  background: transparent;
  color: var(--mg-forest-green);
  font-size: 0.92rem;
  outline: none;
  width: 100%;
}

.mg-tools-search-input::placeholder {
  color: #8FAEA0;
}

.mg-tools-search-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--mg-heritage-green);
  border: none;
  color: #FFFFFF;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: var(--mg-radius-pill);
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.mg-tools-search-btn:hover {
  background: var(--mg-saffron);
  transform: translateY(-1px);
}

.mg-tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: stretch;
}

.mg-tool-card {
  background: var(--mg-bg-card-inner);
  border: 1px solid var(--mg-gold-border);
  border-radius: var(--mg-radius-md);
  padding: 24px 22px;
  min-height: 110px;
  height: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--mg-shadow-sm);
  position: relative;
  overflow: hidden;
}

.mg-tool-card:hover {
  background: #FFFFFF;
  border-color: var(--mg-saffron-muted);
  transform: translateY(-3px);
  box-shadow: var(--mg-shadow-hover);
}

.mg-tool-icon-box {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  border: 1px solid rgba(200, 149, 50, 0.3);
  background: rgba(35, 75, 56, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--mg-heritage-green);
  flex-shrink: 0;
  transition: transform 0.2s ease, background 0.2s ease;
}

.mg-tool-card:hover .mg-tool-icon-box {
  transform: scale(1.08);
  background: rgba(200, 149, 50, 0.16);
  color: var(--mg-forest-green);
}

.mg-tool-body {
  flex-grow: 1;
}

.mg-tool-top-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.mg-tool-name {
  color: var(--mg-forest-green);
  font-size: 1.05rem;
  font-weight: 750;
  margin: 0;
}

.mg-tool-badge {
  background: rgba(200, 149, 50, 0.12);
  border: 1px solid rgba(200, 149, 50, 0.35);
  color: var(--mg-gold);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--mg-radius-pill);
}

.mg-tool-desc {
  color: var(--mg-forest-muted);
  font-size: 0.84rem;
  line-height: 1.5;
  margin: 0;
}

.mg-tool-arrow-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--mg-heritage-green);
  color: var(--mg-heritage-green);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.mg-tool-card:hover .mg-tool-arrow-btn {
  background: var(--mg-heritage-green);
  color: #FFFFFF;
  border-color: var(--mg-heritage-green);
  transform: translateX(2px);
}

/* Featured Subgrid (6 Popular Utilities) */
.mg-featured-tools-container {
  margin-top: 42px;
  padding-top: 32px;
  border-top: 1px solid rgba(200, 149, 50, 0.2);
}

.mg-featured-tools-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 22px;
  gap: 16px;
}

.mg-subheading-sm {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--mg-forest-green);
  margin: 0 0 4px 0;
}

.mg-subheading-caption {
  font-size: 0.82rem;
  color: var(--mg-forest-sub);
}

.mg-featured-subgrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: stretch;
}

.mg-featured-tool-item {
  background: var(--mg-bg-card-inner);
  border: 1px solid var(--mg-gold-border);
  border-radius: var(--mg-radius-md);
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-sizing: border-box;
  transition: all 0.25s ease;
}

.mg-featured-tool-item:hover {
  background: #FFFFFF;
  border-color: var(--mg-saffron-muted);
  transform: translateY(-3px);
  box-shadow: var(--mg-shadow-sm);
}

.mg-featured-tool-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.mg-featured-tool-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(35, 75, 56, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mg-featured-badges {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mg-badge-pill {
  background: rgba(200, 149, 50, 0.12);
  border: 1px solid rgba(200, 149, 50, 0.35);
  color: var(--mg-gold);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--mg-radius-pill);
}

.mg-badge-free {
  background: rgba(35, 75, 56, 0.1);
  border: 1px solid rgba(35, 75, 56, 0.25);
  color: var(--mg-heritage-green);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--mg-radius-pill);
}

.mg-badge-gold {
  background: rgba(255, 179, 0, 0.15);
  border-color: rgba(255, 179, 0, 0.45);
  color: #B58A38;
}

.mg-featured-tool-cat {
  font-size: 0.72rem;
  font-weight: 700;
  color: #B58A38;
  margin-bottom: 3px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.mg-featured-tool-name {
  font-size: 1.05rem;
  font-weight: 750;
  color: var(--mg-forest-green);
  margin: 0 0 6px 0;
}

.mg-featured-tool-desc {
  font-size: 0.85rem;
  color: var(--mg-forest-muted);
  line-height: 1.55;
  margin: 0 0 16px 0;
  flex-grow: 1;
}

.mg-featured-tool-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid rgba(200, 149, 50, 0.16);
  margin-top: auto;
}

.mg-privacy-note {
  font-size: 0.72rem;
  font-weight: 650;
  color: var(--mg-forest-sub);
}

/* Section Bottom Conversion CTA Bar */
.mg-section-cta-bar {
  margin-top: 36px;
  padding: 20px 28px;
  background: rgba(200, 149, 50, 0.08);
  border: 1px solid rgba(200, 149, 50, 0.28);
  border-radius: var(--mg-radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.mg-cta-bar-text {
  display: flex;
  flex-direction: column;
}

.mg-cta-bar-text strong {
  color: var(--mg-forest-green);
  font-size: 0.95rem;
  margin-bottom: 2px;
}

.mg-cta-bar-text span {
  color: var(--mg-forest-muted);
  font-size: 0.84rem;
}

/* =========================================================================
   C. AI SOLUTIONS & CAPABILITIES (4-CARD ENTERPRISE GRID)
   ========================================================================= */
.mg-solutions-quad-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  align-items: stretch;
}

.mg-solution-card {
  background: var(--mg-bg-card-inner);
  border: 1px solid var(--mg-gold-border);
  border-radius: var(--mg-radius-md);
  padding: 26px 22px;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-sizing: border-box;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--mg-shadow-sm);
  position: relative;
}

.mg-solution-card:hover {
  background: #FFFFFF;
  border-color: var(--mg-saffron-muted);
  transform: translateY(-4px);
  box-shadow: var(--mg-shadow-hover);
}

.mg-sol-featured-card {
  border: 2px solid rgba(230, 81, 0, 0.45);
  background: linear-gradient(180deg, #FFFFFF 0%, #FFF9F0 100%);
  box-shadow: 0 12px 32px rgba(230, 81, 0, 0.12);
}

.mg-sol-visual-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  min-height: 85px;
}

.mg-sol-3d-cart {
  width: 95px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mg-sol-3d-cart img {
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 10px 20px rgba(230, 81, 0, 0.3));
  transition: transform 0.3s ease;
}

.mg-sol-featured-card:hover .mg-sol-3d-cart img {
  transform: scale(1.08) rotate(-2deg);
}

.mg-sol-icon-box {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: rgba(35, 75, 56, 0.08);
  border: 1.5px solid rgba(200, 149, 50, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--mg-heritage-green);
  transition: all 0.25s ease;
}

.mg-solution-card:hover .mg-sol-icon-box {
  background: rgba(200, 149, 50, 0.2);
  border-color: var(--mg-saffron-muted);
  color: var(--mg-forest-green);
  transform: scale(1.08);
}

.mg-sol-card-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.mg-sol-card-title {
  color: var(--mg-forest-green);
  font-size: 1.18rem;
  font-weight: 800;
  margin: 0 0 8px 0;
}

.mg-sol-card-desc {
  color: var(--mg-forest-muted);
  font-size: 0.86rem;
  line-height: 1.6;
  margin: 0 0 20px 0;
  flex-grow: 1;
}

.mg-sol-card-footer {
  margin-top: auto;
}

/* =========================================================================
   D. CUSTOM SOFTWARE & PORTFOLIO (SHOWCASE GRID & TECH STACKS)
   ========================================================================= */
.mg-portfolio-showcase-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  align-items: stretch;
}

.mg-project-card {
  background: var(--mg-bg-card-inner);
  border: 1px solid var(--mg-gold-border);
  border-radius: var(--mg-radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-sizing: border-box;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--mg-shadow-sm);
}

.mg-project-card:hover {
  background: #FFFFFF;
  border-color: var(--mg-saffron-muted);
  transform: translateY(-4px);
  box-shadow: var(--mg-shadow-hover);
}

.mg-project-media-wrap {
  position: relative;
  width: 100%;
  height: 215px;
  overflow: hidden;
  background: #FFFFFF;
  border-bottom: 1px solid var(--mg-gold-border);
}

.mg-project-media-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.4s ease;
}

.mg-project-card:hover .mg-project-media-wrap img {
  transform: scale(1.05);
}

.mg-project-badge-pill {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(14, 42, 28, 0.88);
  backdrop-filter: blur(8px);
  color: #EDE3CE;
  border: 1px solid rgba(200, 149, 50, 0.45);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--mg-radius-pill);
}

.mg-project-body {
  padding: 22px;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.mg-project-meta {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--mg-saffron-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.mg-project-title {
  color: var(--mg-forest-green);
  font-size: 1.15rem;
  font-weight: 750;
  margin: 0 0 8px 0;
  line-height: 1.35;
  min-height: 54px;
}

.mg-project-desc {
  color: var(--mg-forest-muted);
  font-size: 0.85rem;
  line-height: 1.55;
  margin: 0 0 16px 0;
  flex-grow: 1;
}

.mg-project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  margin-bottom: 18px;
}

.mg-project-stack span {
  background: rgba(35, 75, 56, 0.08);
  border: 1px solid rgba(35, 75, 56, 0.2);
  color: var(--mg-forest-green);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 6px;
}

.mg-project-footer {
  padding: 0 22px 22px 22px;
  margin-top: auto;
}

/* =========================================================================
   E. WHY CHOOSE MAHAGOV AI (6 PLATFORM ADVANTAGES)
   ========================================================================= */
.mg-advantages-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  align-items: stretch;
}

.mg-advantage-card {
  background: var(--mg-bg-card-inner);
  border: 1px solid var(--mg-gold-border);
  border-radius: var(--mg-radius-md);
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-sizing: border-box;
  transition: all 0.3s ease;
  box-shadow: var(--mg-shadow-sm);
}

.mg-advantage-card:hover {
  background: #FFFFFF;
  border-color: var(--mg-saffron-muted);
  transform: translateY(-3px);
  box-shadow: var(--mg-shadow-hover);
}

.mg-advantage-icon-wrap {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: rgba(35, 75, 56, 0.09);
  border: 1.5px solid rgba(200, 149, 50, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--mg-heritage-green);
  margin-bottom: 16px;
  transition: all 0.25s ease;
  flex-shrink: 0;
}

.mg-advantage-card:hover .mg-advantage-icon-wrap {
  background: rgba(200, 149, 50, 0.2);
  border-color: var(--mg-saffron);
  color: var(--mg-forest-green);
  transform: scale(1.08);
}

.mg-advantage-title {
  color: var(--mg-forest-green);
  font-size: 1.12rem;
  font-weight: 750;
  margin: 0 0 8px 0;
}

.mg-advantage-desc {
  color: var(--mg-forest-muted);
  font-size: 0.88rem;
  line-height: 1.6;
  margin: 0;
}

/* =========================================================================
   F. LATEST FROM OUR BLOG (EDITORIAL MAGAZINE GRID)
   ========================================================================= */
.mg-blog-editorial-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 24px;
  align-items: stretch;
}

.mg-blog-featured-card {
  background: var(--mg-bg-card-inner);
  border: 1px solid var(--mg-gold-border);
  border-radius: var(--mg-radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-sizing: border-box;
  transition: all 0.3s ease;
  box-shadow: var(--mg-shadow-sm);
}

.mg-blog-featured-card:hover {
  background: #FFFFFF;
  border-color: var(--mg-saffron-muted);
  transform: translateY(-3px);
  box-shadow: var(--mg-shadow-hover);
}

.mg-blog-featured-thumb-wrap {
  position: relative;
  width: 100%;
  height: 260px;
  overflow: hidden;
  background: #000;
}

.mg-blog-featured-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.mg-blog-featured-card:hover .mg-blog-featured-thumb-wrap img {
  transform: scale(1.05);
}

.mg-blog-featured-thumb-wrap .mg-badge-pill {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(14, 42, 28, 0.92);
  backdrop-filter: blur(8px);
}

.mg-blog-featured-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}

.mg-blog-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.74rem;
  color: var(--mg-forest-sub);
  margin-bottom: 8px;
}

.mg-blog-cat-pill {
  color: var(--mg-saffron-muted);
  font-weight: 700;
}

.mg-meta-dot {
  color: rgba(200, 149, 50, 0.5);
}

.mg-blog-featured-title {
  font-size: 1.28rem;
  font-weight: 800;
  line-height: 1.35;
  margin: 0 0 10px 0;
}

.mg-blog-featured-title a {
  color: var(--mg-forest-green);
  text-decoration: none;
  transition: color 0.2s ease;
}

.mg-blog-featured-title a:hover {
  color: var(--mg-saffron);
}

.mg-blog-featured-excerpt {
  color: var(--mg-forest-muted);
  font-size: 0.88rem;
  line-height: 1.6;
  margin: 0 0 18px 0;
  flex-grow: 1;
}

.mg-blog-card-link {
  color: var(--mg-heritage-green);
  font-weight: 750;
  font-size: 0.86rem;
  margin-top: auto;
}

.mg-blog-secondary-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
  height: 100%;
  justify-content: space-between;
}

.mg-blog-secondary-card {
  background: var(--mg-bg-card-inner);
  border: 1px solid var(--mg-gold-border);
  border-radius: var(--mg-radius-md);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 18px;
  height: calc(50% - 9px);
  box-sizing: border-box;
  transition: all 0.3s ease;
  box-shadow: var(--mg-shadow-sm);
}

.mg-blog-secondary-card:hover {
  background: #FFFFFF;
  border-color: var(--mg-saffron-muted);
  transform: translateY(-2px);
  box-shadow: var(--mg-shadow-hover);
}

.mg-blog-sec-thumb {
  width: 120px;
  height: 95px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid var(--mg-gold-border);
}

.mg-blog-sec-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mg-blog-sec-body {
  flex: 1 1 auto;
}

.mg-blog-sec-title {
  font-size: 0.98rem;
  font-weight: 750;
  line-height: 1.4;
  margin: 0 0 6px 0;
}

.mg-blog-sec-title a {
  color: var(--mg-forest-green);
  text-decoration: none;
  transition: color 0.2s ease;
}

.mg-blog-sec-title a:hover {
  color: var(--mg-saffron);
}

.mg-blog-sec-excerpt {
  color: var(--mg-forest-muted);
  font-size: 0.82rem;
  line-height: 1.5;
  margin: 0;
}

/* =========================================================================
   G. FINAL CALL TO ACTION (SUNSET GLASSMORPHIC CTA)
   ========================================================================= */
.mg-final-cta-section {
  padding-bottom: 24px;
}

.mg-cta-banner-card {
  background: linear-gradient(135deg, rgba(14, 42, 28, 0.94) 0%, rgba(18, 53, 38, 0.92) 100%) !important;
  border: 1.5px solid rgba(200, 149, 50, 0.45) !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35) !important;
  text-align: center;
  padding: 52px 36px !important;
  color: #FFFFFF !important;
  position: relative;
  overflow: hidden;
}

.mg-cta-atmospheric-glow {
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 650px;
  height: 320px;
  background: radial-gradient(ellipse, rgba(255, 179, 0, 0.22) 0%, transparent 70%);
  pointer-events: none;
}

.mg-cta-content-inner {
  position: relative;
  z-index: 2;
  max-width: 680px;
  margin: 0 auto;
}

.mg-cta-headline {
  color: #FFFFFF;
  font-size: clamp(2rem, 3.4vw, 2.6rem);
  font-weight: 800;
  line-height: 1.25;
  margin: 0 0 14px 0;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.6);
}

.mg-cta-subtext {
  color: #EDE3CE;
  font-size: 1rem;
  line-height: 1.65;
  margin: 0 auto 30px auto;
  max-width: 620px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}

.mg-cta-button-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.mg-cta-trust-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #A3C2B1;
  font-size: 0.8rem;
  font-weight: 600;
  flex-wrap: wrap;
}

.mg-cta-trust-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.mg-cta-trust-dot {
  color: rgba(200, 149, 50, 0.6);
}

/* =========================================================================
   F. FOOTER — SEAMLESS SWARAJYA CONTINUOUS BACKGROUND
   ========================================================================= */
.mg-footer-section {
  position: relative;
  padding-top: 50px;
  padding-bottom: 28px;
  background-color: transparent !important;
  background-image: none !important;
  margin-top: 30px;
}

.mg-footer-section::before {
  display: none !important;
  background: none !important;
  background-image: none !important;
}

.mg-footer-card {
  background: rgba(14, 42, 28, 0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(200, 149, 50, 0.3);
  border-radius: var(--mg-radius-lg);
  padding: 48px 48px 36px 48px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  margin-bottom: 24px;
  position: relative;
  z-index: 2;
}

.mg-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1.6fr;
  gap: 36px;
}

.mg-footer-brand p {
  color: #D8EDE1;
  font-size: 0.88rem;
  line-height: 1.65;
  margin: 14px 0 20px 0;
  max-width: 290px;
}

.mg-footer-socials {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mg-social-link {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(200, 149, 50, 0.35);
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #F8F5EC;
  text-decoration: none;
  font-size: 0.88rem;
  transition: all 0.2s ease;
}

.mg-social-link:hover {
  background: var(--mg-gold-light);
  color: #123526;
  border-color: var(--mg-gold-light);
  transform: translateY(-2px);
}

.mg-footer-col h3 {
  color: #FFFFFF;
  font-size: 0.95rem;
  font-weight: 750;
  margin: 0 0 16px 0;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mg-footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.mg-footer-link {
  color: #C5DDD0;
  text-decoration: none;
  font-size: 0.86rem;
  transition: all 0.2s ease;
  display: inline-block;
}

.mg-footer-link:hover {
  color: #FFC107;
  transform: translateX(3px);
}

.mg-newsletter-box h3 {
  color: #FFFFFF;
  font-size: 0.95rem;
  font-weight: 750;
  margin: 0 0 8px 0;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mg-newsletter-box p {
  color: #D1E3D8;
  font-size: 0.84rem;
  line-height: 1.55;
  margin: 0 0 16px 0;
}

.mg-newsletter-form {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(200, 149, 50, 0.35);
  border-radius: var(--mg-radius-pill);
  padding: 4px 6px 4px 16px;
}

.mg-newsletter-input {
  background: transparent;
  border: none;
  color: #FFFFFF;
  font-size: 0.86rem;
  outline: none;
  width: 100%;
}

.mg-newsletter-input::placeholder {
  color: #8FAEA0;
}

.mg-newsletter-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--mg-gradient-saffron);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.mg-newsletter-btn:hover {
  transform: scale(1.08);
}

.mg-footer-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #A3C2B1;
  font-size: 0.84rem;
  padding-top: 18px;
  border-top: 1px solid rgba(200, 149, 50, 0.2);
  position: relative;
  z-index: 2;
}

/* =========================================================================
   5. RESPONSIVE DESIGN (Desktop, Laptop, Tablet & Mobile)
   ========================================================================= */
@media (max-width: 1024px) {
  .mg-hero-section {
    padding-top: 105px;
  }

  .mg-hero-stage {
    flex-direction: column;
    align-items: flex-start;
    gap: 32px;
  }

  .mg-hero-main-content {
    margin-left: 0;
    max-width: 100%;
  }

  .mg-hero-heading {
    font-size: clamp(42px, 5.5vw, 64px);
  }

  .mg-hero-subheading {
    font-size: clamp(20px, 2.5vw, 26px);
  }

  .mg-hero-description {
    font-size: 17.5px;
    max-width: 100%;
  }

  .mg-hero-cards-stack {
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
    gap: 12px;
  }

  .mg-hero-card {
    flex: 1 1 calc(50% - 8px);
  }

  .mg-audience-tabs-container {
    max-width: 100%;
  }

  .mg-glass-card {
    padding: 32px 28px;
  }

  .mg-pillars-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .mg-tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .mg-featured-subgrid {
    grid-template-columns: repeat(2, 1fr);
  }

  .mg-solutions-quad-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .mg-portfolio-showcase-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .mg-advantages-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .mg-blog-editorial-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .mg-footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 860px) {
  .mg-hero-section {
    padding-top: 108px;
    padding-bottom: 45px;
    min-height: auto;
  }

  .mg-hero-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    gap: 0;
  }

  /* Display contents allows re-ordering children of main content with feature cards stack */
  .mg-hero-main-content {
    display: contents;
  }

  .mg-hero-badge-wrap {
    order: 1;
    display: flex;
    justify-content: center;
    width: 100%;
    margin-bottom: 14px;
  }

  .mg-hero-heading {
    order: 2;
    text-align: center;
    width: 100%;
    margin: 0 0 14px 0;
    font-size: clamp(38px, 6.2vw, 54px);
    line-height: 1.1;
    letter-spacing: -1.5px;
  }

  .mg-hero-subheading {
    order: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    margin: 0 0 16px 0;
    font-size: clamp(20px, 3.2vw, 26px);
    line-height: 1.25;
  }

  .mg-hero-description {
    order: 4;
    text-align: center;
    margin: 0 auto 24px auto;
    max-width: 680px;
    font-size: 17px;
    line-height: 1.6;
  }

  .mg-hero-actions {
    order: 5;
    justify-content: center;
    width: 100%;
    margin-bottom: 24px;
  }

  /* Feature cards placed directly below CTA buttons on mobile/tablet */
  .mg-hero-cards-stack {
    order: 6;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    width: 100%;
    max-width: 560px;
    margin: 0 auto 24px auto;
    gap: 12px;
  }

  .mg-hero-card {
    min-height: 90px;
    padding: 14px 10px;
  }

  /* Audience cards placed at bottom in a responsive grid */
  .mg-audience-tabs-container {
    order: 7;
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
    overflow: visible;
  }

  .mg-audience-tabs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    width: 100%;
  }

  .mg-aud-card-tab {
    min-width: 0;
    padding: 12px 6px;
  }
}

@media (max-width: 768px) {
  .mg-nav-menu {
    display: none;
  }

  .mg-hero-heading {
    font-size: clamp(32px, 7.5vw, 44px);
    line-height: 1.12;
    letter-spacing: -1px;
  }

  .mg-hero-subheading {
    font-size: clamp(18px, 4.2vw, 22px);
    line-height: 1.28;
  }

  .mg-hero-description {
    font-size: 16px;
    line-height: 1.58;
    margin-bottom: 22px;
  }

  .mg-hero-actions {
    flex-direction: column;
    width: 100%;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
    gap: 12px;
  }

  .mg-btn-amber,
  .mg-btn-outline-gold {
    width: 100%;
    justify-content: center;
    padding: 13px 20px;
  }

  .mg-hero-cards-stack {
    max-width: 100%;
    gap: 10px;
    margin-bottom: 20px;
  }

  .mg-hero-card {
    min-height: 86px;
    padding: 12px 8px;
    border-radius: 18px;
  }

  .mg-card-title {
    font-size: 0.86rem;
  }

  .mg-card-sub {
    font-size: 0.72rem;
  }

  .mg-audience-tabs-container {
    max-width: 100%;
  }

  .mg-audience-tabs-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .mg-aud-card-tab {
    min-width: 0;
    padding: 10px 4px;
    border-radius: 12px;
  }

  .mg-aud-tab-icon {
    width: 22px;
    height: 22px;
  }

  .mg-aud-tab-label {
    font-size: 0.74rem;
  }

  .mg-glass-card {
    padding: 26px 18px;
  }

  .mg-section-title {
    font-size: 1.65rem;
  }

  .mg-section-header {
    margin-bottom: 24px;
  }

  .mg-section-header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 24px;
  }

  .mg-pillars-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .mg-tools-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .mg-featured-subgrid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .mg-solutions-quad-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .mg-portfolio-showcase-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .mg-advantages-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .mg-section-cta-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
  }

  .mg-blog-secondary-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .mg-blog-sec-thumb {
    width: 100%;
    height: 140px;
  }

  .mg-cta-headline {
    font-size: 1.7rem;
  }

  .mg-cta-banner-card {
    padding: 36px 18px !important;
  }

  .mg-footer-card {
    padding: 30px 20px;
  }

  .mg-footer-grid {
    grid-template-columns: 1fr;
  }

  .mg-footer-bottom-bar {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .mg-hero-section {
    padding-top: 96px;
    padding-bottom: 36px;
  }

  .mg-hero-badge {
    font-size: 0.75rem;
    padding: 5px 14px;
  }

  .mg-hero-heading {
    font-size: clamp(28px, 8vw, 36px);
    letter-spacing: -0.5px;
    line-height: 1.15;
    margin-bottom: 12px;
  }

  .mg-hero-subheading {
    font-size: clamp(16px, 4.5vw, 19px);
    line-height: 1.25;
    margin-bottom: 14px;
  }

  .mg-hero-description {
    font-size: 14.5px;
    line-height: 1.55;
    margin-bottom: 20px;
  }

  .mg-hero-actions {
    max-width: 100%;
    margin-bottom: 20px;
  }

  .mg-hero-cards-stack {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .mg-hero-card {
    min-height: 80px;
    padding: 10px 6px;
  }

  .mg-card-icon {
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
  }

  .mg-card-icon svg {
    width: 18px;
    height: 18px;
  }

  .mg-card-title {
    font-size: 0.8rem;
  }

  .mg-card-sub {
    font-size: 0.68rem;
  }

  .mg-audience-tabs-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }

  .mg-aud-card-tab {
    padding: 8px 3px;
    border-radius: 10px;
  }

  .mg-aud-tab-icon {
    width: 18px;
    height: 18px;
    margin-bottom: 4px;
  }

  .mg-aud-tab-icon svg {
    width: 18px;
    height: 18px;
  }

  .mg-aud-tab-label {
    font-size: 0.68rem;
  }
}

/* =========================================================================
   6. GLOBAL SUB-PAGE COMPATIBILITY & SUNSET BACKGROUND INTEGRATION
   Applies the Golden Sunset Over Misty Mountain Valley theme seamlessly
   to all project pages (/ai-tools.php, tool details, legal pages, 404)
   ========================================================================= */
.section,
.section-alt,
.tools-hero-section,
.tools-directory-section,
.tool-page-hero,
.tool-workspace-section,
.tool-breadcrumb-bar,
.legal-hero,
.legal-body-section,
.legal-section,
.cta-section,
.cta-ecosystem-section {
  background-color: transparent !important;
}

/* Page Hero Headings readability over misty mountain backdrop */
.tools-hero-section .hero-title,
.tool-page-hero .tool-page-title,
.legal-hero .legal-title {
  color: #FFFFFF !important;
  text-shadow: 0 2px 14px rgba(11, 38, 24, 0.7);
}

.tools-hero-section .hero-desc,
.legal-hero .legal-subtitle {
  color: #F8F5EC !important;
  text-shadow: 0 1px 8px rgba(11, 38, 24, 0.6);
}

.tool-breadcrumb-bar {
  background: rgba(14, 42, 28, 0.45) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(200, 149, 50, 0.2);
}

.tool-breadcrumbs a {
  color: #EDE3CE !important;
}

.tool-breadcrumbs .bc-sep {
  color: #C89532 !important;
}

.tool-breadcrumbs .bc-current {
  color: #FFB300 !important;
}

/* Glassmorphic Cards on Sub-pages matching Swarajya aesthetic */
.legal-article,
.legal-toc-card,
.legal-quick-links,
.legal-meta-bar,
.intro-card,
.step-card,
.feature-card,
.privacy-banner-card,
.faq-item {
  background: rgba(12, 37, 29, 0.92) !important;
  backdrop-filter: blur(20px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(160%) !important;
  border: 1px solid rgba(185, 139, 46, 0.38) !important;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.35) !important;
  color: var(--mg-warm-ivory) !important;
}

.step-card .step-title,
.feature-card .feature-title,
.faq-question,
.privacy-banner-title {
  color: var(--mg-warm-ivory) !important;
}

.step-card .step-desc,
.feature-card .feature-desc,
.faq-answer,
.privacy-banner-desc,
.privacy-bullets li {
  color: var(--mg-soft-ivory) !important;
}

.legal-section h2,
.legal-section h3 {
  color: var(--mg-warm-ivory) !important;
}

.legal-section p,
.legal-section li {
  color: var(--mg-soft-ivory) !important;
}

.legal-meta-item .meta-label {
  color: var(--mg-champagne-gold) !important;
}

.legal-meta-item .meta-value {
  color: var(--mg-warm-ivory) !important;
  font-weight: 600;
}

/* =========================================================================
   7. AI TOOLS MARKETPLACE — PREMIUM COMPONENT STYLES
   Designed with Apple-level typography, modern SaaS discovery, and Maharashtra Swarajya identity.
   Palette: Warm Ivory (#FFF7E6), Champagne Gold (#FFC247), Soft Ivory (#F5EAD4),
            Deep Forest Green (#0C251D), Thin Gold Border (#B98B2E), Saffron Gradient.
   ========================================================================= */

/* --- 7.1 Hero Section --- */
.tools-hero-section {
  padding: 130px 0 65px 0;
  position: relative;
  z-index: 2;
  background-color: transparent !important;
  background-image: none !important;
}

.tools-hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.tools-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 194, 71, 0.08);
  border: 1px solid rgba(185, 139, 46, 0.45);
  padding: 6px 18px;
  border-radius: var(--mg-radius-pill);
  font-family: var(--mg-font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #FFC247;
  text-transform: uppercase;
  margin-bottom: 20px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.tools-eyebrow-icon {
  font-size: 0.95rem;
}

.tools-hero-title {
  font-family: var(--mg-font-display);
  font-size: clamp(2.6rem, 4.4vw, 4rem);
  font-weight: 800;
  line-height: 1.12;
  color: #FFF7E6 !important;
  margin: 0 0 18px 0;
  letter-spacing: -0.02em;
  text-shadow: none !important;
}

.tools-hero-highlight {
  color: #FFC247 !important;
  background: none !important;
  -webkit-text-fill-color: initial !important;
  text-shadow: none !important;
}

.tools-hero-desc {
  font-family: var(--mg-font-body);
  font-size: 1.1rem;
  line-height: 1.68;
  color: #F5EAD4 !important;
  max-width: 620px;
  margin: 0 0 28px 0;
  text-shadow: none !important;
}

.tools-trust-indicators {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.trust-indicator-item {
  background: rgba(12, 37, 29, 0.88);
  border: 1px solid rgba(185, 139, 46, 0.35);
  border-radius: 14px;
  padding: 10px 16px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  gap: 11px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.trust-indicator-item:hover {
  transform: translateY(-2px);
  border-color: #FFC247;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35), 0 0 16px rgba(255, 194, 71, 0.15);
}

.trust-indicator-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}

.trust-indicator-text strong {
  display: block;
  font-family: var(--mg-font-display);
  font-size: 0.86rem;
  color: #FFF7E6;
  font-weight: 700;
  line-height: 1.25;
}

.trust-indicator-text span {
  display: block;
  font-family: var(--mg-font-body);
  font-size: 0.74rem;
  color: #E8E4D8;
  line-height: 1.2;
}

.tools-hero-actions {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.tools-hero-actions .mg-btn-amber,
.tools-hero-actions .mg-btn-sunset-primary,
.tools-hero-actions .mg-btn-lg.mg-btn-sunset-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #FF9D24 0%, #E65100 100%) !important;
  color: #FFFFFF !important;
  padding: 13px 28px;
  border-radius: 9999px;
  font-family: var(--mg-font-body);
  font-size: 0.98rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), filter 0.25s ease;
  box-shadow: 0 4px 18px rgba(230, 81, 0, 0.35);
  border: none !important;
}

.tools-hero-actions .mg-btn-amber:hover,
.tools-hero-actions .mg-btn-sunset-primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 8px 26px rgba(230, 81, 0, 0.45);
}

.tools-hero-actions .mg-btn-outline-gold,
.tools-hero-actions .mg-btn-secondary-glass,
.tools-hero-actions .mg-btn-lg.mg-btn-secondary-glass {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(12, 37, 29, 0.6) !important;
  border: 1.5px solid var(--mg-champagne-gold) !important;
  color: #FFF7E6 !important;
  padding: 12px 26px;
  border-radius: 9999px;
  font-family: var(--mg-font-body);
  font-size: 0.98rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.tools-hero-actions .mg-btn-outline-gold:hover,
.tools-hero-actions .mg-btn-secondary-glass:hover {
  background: rgba(255, 194, 71, 0.15) !important;
  border-color: #FFC247 !important;
  transform: translateY(-2px);
  box-shadow: 0 0 18px rgba(255, 194, 71, 0.25);
}

/* --- Ecosystem Visualizer (Modern AI Neural Cybernetic Stage) --- */
.tools-ecosystem-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  perspective: 1200px;
}

.ecosystem-stage {
  position: relative;
  width: 460px;
  height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1000px;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

/* Ambient Volumetric Lighting Aura */
.eco-ambient-aura {
  position: absolute;
  width: 330px;
  height: 330px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 194, 71, 0.16) 0%, rgba(23, 59, 48, 0.28) 45%, transparent 70%);
  filter: blur(44px);
  pointer-events: none;
  z-index: 1;
  animation: aura-breathe 6s ease-in-out infinite alternate;
}

@keyframes aura-breathe {
  0% { transform: scale(0.9) translate(0, 0); opacity: 0.6; }
  50% { transform: scale(1.18) translate(10px, -8px); opacity: 0.95; }
  100% { transform: scale(0.95) translate(-8px, 10px); opacity: 0.7; }
}

/* Multi-Tier Orbital Gyro Rings */
.eco-orbit-ring {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 2;
  transition: all 0.3s ease;
}

.ring-outer {
  width: 400px;
  height: 400px;
  border: 1px dashed rgba(255, 194, 71, 0.22);
  animation: orbit-spin-slow 48s linear infinite;
}

.ring-mid {
  width: 285px;
  height: 285px;
  border: 1px solid rgba(185, 139, 46, 0.18);
  animation: orbit-spin-rev 32s linear infinite;
}

.ring-inner {
  width: 175px;
  height: 175px;
  border: 1px dashed rgba(255, 194, 71, 0.35);
  animation: orbit-spin-slow 20s linear infinite;
}

@keyframes orbit-spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes orbit-spin-rev {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}

/* Orbiting Luminescent Nano Beacons */
.eco-orbit-particle-track {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 3;
}

.track-1 {
  width: 285px;
  height: 285px;
  animation: orbit-spin-slow 13s linear infinite;
}

.track-2 {
  width: 400px;
  height: 400px;
  animation: orbit-spin-rev 20s linear infinite;
}

.eco-particle {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #FFC247;
  box-shadow: 0 0 10px #FFC247, 0 0 20px #FF9D24;
}

.track-2 .eco-particle {
  background: #67E8F9;
  box-shadow: 0 0 10px #67E8F9, 0 0 18px #0891B2;
  width: 6px;
  height: 6px;
}

/* Sonar Wavefronts from Core */
.eco-sonar-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 194, 71, 0.55);
  pointer-events: none;
  z-index: 2;
  transform: translate(-50%, -50%) scale(1);
  opacity: 0;
}

.sonar-1 {
  animation: sonar-pulse 4s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

.sonar-2 {
  animation: sonar-pulse 4s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
  animation-delay: 2s;
}

@keyframes sonar-pulse {
  0% {
    transform: translate(-50%, -50%) scale(0.9);
    opacity: 0.85;
    border-color: rgba(255, 194, 71, 0.85);
  }
  60% {
    opacity: 0.35;
  }
  100% {
    transform: translate(-50%, -50%) scale(3.2);
    opacity: 0;
    border-color: rgba(255, 157, 36, 0);
  }
}

/* Central Quantum Core */
.ecosystem-center-core {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 104px;
  height: 104px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 6;
}

.center-core-glow {
  position: absolute;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 194, 71, 0.3) 0%, rgba(255, 157, 36, 0.1) 60%, transparent 80%);
  animation: core-glow-breathe 3.5s ease-in-out infinite alternate;
}

@keyframes core-glow-breathe {
  0% { transform: scale(0.95); opacity: 0.7; }
  100% { transform: scale(1.15); opacity: 1; }
}

.center-core-badge {
  position: relative;
  width: 98px;
  height: 98px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #173B30 0%, #0C251D 80%);
  border: 2px solid #FFC247;
  box-shadow: 0 0 30px rgba(255, 194, 71, 0.45), inset 0 0 16px rgba(255, 194, 71, 0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.center-core-badge:hover {
  transform: scale(1.08);
  box-shadow: 0 0 45px rgba(255, 194, 71, 0.7), inset 0 0 22px rgba(255, 194, 71, 0.45);
}

.core-icon-wrap {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: core-rotate-pulse 9s ease-in-out infinite;
}

@keyframes core-rotate-pulse {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.12); }
  100% { transform: rotate(360deg) scale(1); }
}

.core-label {
  font-family: var(--mg-font-display);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #FFF7E6;
  margin-top: 2px;
}

.core-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 3px;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.45);
}

.core-status-pill span:last-child {
  font-family: var(--mg-font-body);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #6EE7B7;
}

.pulse-dot-green {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 6px #10B981;
  animation: pulse-dot-glow 1.8s ease-in-out infinite alternate;
}

@keyframes pulse-dot-glow {
  0% { opacity: 0.5; transform: scale(0.9); }
  100% { opacity: 1; transform: scale(1.3); }
}

/* Connecting Laser Conduits & Streams */
.eco-connector-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.stream-line {
  stroke-dasharray: 20 110;
  stroke-dashoffset: 0;
  animation: laserStreamFlow 2.4s linear infinite;
  filter: drop-shadow(0 0 6px rgba(255, 194, 71, 0.8));
}

.stream-top { animation-delay: 0s; }
.stream-right { animation-delay: 0.6s; }
.stream-bottom { animation-delay: 1.2s; }
.stream-left { animation-delay: 1.8s; }

@keyframes laserStreamFlow {
  0% { stroke-dashoffset: 130; opacity: 0.2; }
  40% { opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 0.2; }
}

/* Modern Satellite Pods */
.eco-satellite-node {
  position: absolute;
  background: rgba(12, 37, 29, 0.92);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid rgba(185, 139, 46, 0.45);
  border-radius: 14px;
  padding: 9px 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  z-index: 5;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.28s ease,
              box-shadow 0.28s ease;
  cursor: default;
}

.eco-satellite-node:hover {
  border-color: #FFC247;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5), 0 0 22px rgba(255, 194, 71, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform: scale(1.06) translateY(-4px) !important;
}

.eco-node-icon-box {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(185, 139, 46, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.eco-satellite-node:hover .eco-node-icon-box {
  transform: scale(1.1) rotate(4deg);
  border-color: #FFC247;
}

.eco-node-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.pod-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

.pod-header strong {
  font-family: var(--mg-font-display);
  font-size: 0.82rem;
  font-weight: 700;
  color: #FFF7E6;
  line-height: 1.2;
}

.pod-pill {
  font-family: var(--mg-font-body);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(255, 194, 71, 0.12);
  border: 1px solid rgba(255, 194, 71, 0.35);
  color: #FFC247;
}

.pod-desc {
  display: block;
  font-family: var(--mg-font-body);
  font-size: 0.72rem;
  color: #E8E4D8;
  line-height: 1.2;
  white-space: nowrap;
}

/* Unique Organic Hover Harmonics */
.pod-float-1 {
  animation: podHover1 6s ease-in-out infinite;
}

.pod-float-2 {
  animation: podHover2 6.8s ease-in-out infinite;
  animation-delay: -1.7s;
}

.pod-float-3 {
  animation: podHover3 6.2s ease-in-out infinite;
  animation-delay: -3.4s;
}

.pod-float-4 {
  animation: podHover4 6.5s ease-in-out infinite;
  animation-delay: -4.8s;
}

@keyframes podHover1 {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-10px); }
}

@keyframes podHover2 {
  0%, 100% { transform: translateY(-50%) translateX(0); }
  50% { transform: translateY(-50%) translateX(8px); }
}

@keyframes podHover3 {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(10px); }
}

@keyframes podHover4 {
  0%, 100% { transform: translateY(-50%) translateX(0); }
  50% { transform: translateY(-50%) translateX(-8px); }
}

.node-top {
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
}

.node-right {
  right: 0px;
  top: 50%;
  transform: translateY(-50%);
}

.node-bottom {
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
}

.node-left {
  left: 0px;
  top: 50%;
  transform: translateY(-50%);
}

/* Ambient Floating Cyber Capability Tags */
.eco-float-tag {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--mg-radius-pill);
  background: rgba(12, 37, 29, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(185, 139, 46, 0.38);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  font-family: var(--mg-font-body);
  font-size: 0.72rem;
  font-weight: 700;
  color: #FFC247;
  z-index: 4;
  pointer-events: none;
}

.tag-pos-top-left {
  top: 48px;
  left: 18px;
}

.tag-pos-bottom-right {
  bottom: 48px;
  right: 18px;
}

.tag-icon {
  font-size: 0.85rem;
}

/* --- 7.2 Directory Discovery Toolbar --- */
.tools-directory-section {
  padding: 30px 0 80px 0;
  position: relative;
  z-index: 3;
  background-color: transparent !important;
}

.tools-toolbar-wrapper {
  background: rgba(12, 37, 29, 0.92) !important;
  backdrop-filter: blur(24px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(160%) !important;
  border: 1px solid rgba(185, 139, 46, 0.45) !important;
  border-radius: 22px !important;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.35) !important;
  padding: 24px 26px !important;
  margin-bottom: 44px;
}

.tools-search-row {
  margin-bottom: 18px;
}

.tools-search-box {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.tools-search-box input {
  width: 100%;
  height: 52px;
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1.5px solid rgba(185, 139, 46, 0.4) !important;
  border-radius: var(--mg-radius-pill) !important;
  padding: 0 54px 0 50px !important;
  font-family: var(--mg-font-body) !important;
  font-size: 0.98rem !important;
  font-weight: 500 !important;
  color: #FFF7E6 !important;
  outline: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.tools-search-box input::placeholder {
  color: rgba(245, 234, 212, 0.5) !important;
}

.tools-search-box input:focus {
  border-color: #FFC247 !important;
  background: rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 0 0 4px rgba(255, 194, 71, 0.2) !important;
}

.search-box-icon {
  position: absolute;
  left: 18px;
  color: #FFC247 !important;
  pointer-events: none;
}

.btn-clear-search {
  position: absolute;
  right: 48px;
  background: none;
  border: none;
  font-size: 1.4rem;
  color: #E8E4D8;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  transition: color 0.2s ease;
}

.btn-clear-search:hover {
  color: #FFC247;
}

.search-shortcut-hint {
  position: absolute;
  right: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(185, 139, 46, 0.4);
  border-radius: 6px;
  padding: 2px 7px;
  font-family: var(--mg-font-body);
  font-size: 0.76rem;
  font-weight: 700;
  color: #FFC247;
  user-select: none;
  pointer-events: none;
}

/* Category Filter Tabs */
.tools-category-pills {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 16px;
}

.tools-category-pills::-webkit-scrollbar {
  display: none;
}

.category-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  padding: 9px 18px !important;
  border-radius: var(--mg-radius-pill) !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(185, 139, 46, 0.35) !important;
  color: #F5EAD4 !important;
  font-family: var(--mg-font-body) !important;
  font-size: 0.88rem !important;
  font-weight: 600 !important;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.category-pill .pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #FFC247;
  display: inline-block;
  transition: background 0.2s ease;
}

.category-pill:hover {
  transform: translateY(-2px);
  border-color: #FFC247 !important;
  background: rgba(255, 194, 71, 0.14) !important;
  color: #FFF7E6 !important;
  box-shadow: 0 4px 14px rgba(255, 194, 71, 0.16) !important;
}

.category-pill.active {
  background: linear-gradient(135deg, #FF9D24 0%, #E65100 100%) !important;
  color: #FFFFFF !important;
  border-color: #FF9D24 !important;
  box-shadow: 0 6px 18px rgba(230, 81, 0, 0.4) !important;
}

.category-pill.active .pill-dot {
  background: #FFFFFF;
}

/* Attribute Chips & Sorting Row */
.tools-controls-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  padding-top: 16px;
  border-top: 1px solid rgba(185, 139, 46, 0.25);
}

.tools-attribute-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.attr-chip {
  padding: 6px 14px;
  border-radius: var(--mg-radius-pill);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(185, 139, 46, 0.3);
  color: #E8E4D8;
  font-family: var(--mg-font-body);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.attr-chip:hover {
  border-color: #FFC247;
  background: rgba(255, 194, 71, 0.12);
  color: #FFF7E6;
}

.attr-chip.active {
  background: rgba(255, 194, 71, 0.22);
  border-color: #FFC247;
  color: #FFC247;
  font-weight: 700;
  box-shadow: 0 0 12px rgba(255, 194, 71, 0.25);
}

.attr-chip.chip-favorites.active {
  background: rgba(239, 68, 68, 0.25);
  border-color: #EF4444;
  color: #FCA5A5;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.3);
}

.tools-sort-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sort-label {
  font-family: var(--mg-font-body);
  font-size: 0.84rem;
  font-weight: 700;
  color: #FFC247;
}

.sort-select-box {
  position: relative;
  display: flex;
  align-items: center;
}

.sort-select-box select {
  appearance: none;
  -webkit-appearance: none;
  background: rgba(12, 37, 29, 0.95);
  border: 1px solid rgba(185, 139, 46, 0.4);
  border-radius: var(--mg-radius-pill);
  padding: 7px 32px 7px 14px;
  font-family: var(--mg-font-body);
  font-size: 0.84rem;
  font-weight: 600;
  color: #FFF7E6;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s ease;
}

.sort-select-box select:focus {
  border-color: #FFC247;
}

.sort-caret-icon {
  position: absolute;
  right: 11px;
  color: #FFC247;
  pointer-events: none;
}

/* Meta Bar */
.tools-meta-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed rgba(185, 139, 46, 0.25);
  font-size: 0.84rem;
}

.tools-meta-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.tools-count-badge {
  background: rgba(255, 194, 71, 0.12);
  border: 1px solid rgba(185, 139, 46, 0.4);
  color: #FFC247;
  font-family: var(--mg-font-body);
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--mg-radius-pill);
  display: inline-block;
}

.active-filters-summary {
  color: #F5EAD4;
  font-family: var(--mg-font-body);
  font-size: 0.82rem;
  font-weight: 500;
}

.btn-clear-all-filters {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #FCA5A5;
  font-family: var(--mg-font-body);
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: var(--mg-radius-pill);
  padding: 4px 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-clear-all-filters:hover {
  background: #EF4444;
  color: #FFFFFF;
}

/* --- 7.3 Dedicated Popular Tools Section --- */
.popular-tools-wrapper {
  margin-bottom: 54px;
}

.popular-tools-header {
  margin-bottom: 24px;
}

.popular-heading {
  font-family: var(--mg-font-display);
  font-size: 1.85rem;
  font-weight: 800;
  color: #FFF7E6 !important;
  margin: 8px 0 6px 0;
  letter-spacing: -0.02em;
  text-shadow: none !important;
}

.popular-subheading {
  font-family: var(--mg-font-body);
  color: #F5EAD4 !important;
  font-size: 0.95rem;
  margin: 0;
  text-shadow: none !important;
}

.popular-tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  align-items: stretch;
}

.popular-tool-card {
  background: rgba(12, 37, 29, 0.9) !important;
  backdrop-filter: blur(20px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(160%) !important;
  border: 1px solid rgba(185, 139, 46, 0.4) !important;
  border-radius: 20px !important;
  padding: 24px 22px !important;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
  position: relative;
}

.popular-tool-card:hover {
  transform: translateY(-4px);
  border-color: #FFC247 !important;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4), 0 0 20px rgba(255, 194, 71, 0.2) !important;
}

.popular-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.popular-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(185, 139, 46, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.popular-badges-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.badge-orange {
  background: rgba(255, 157, 36, 0.18) !important;
  border: 1px solid rgba(255, 157, 36, 0.45) !important;
  color: #FFC247 !important;
  font-family: var(--mg-font-body) !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  padding: 2px 8px !important;
  border-radius: 999px !important;
}

.badge-new {
  background: rgba(16, 185, 129, 0.18) !important;
  border: 1px solid rgba(16, 185, 129, 0.45) !important;
  color: #6EE7B7 !important;
  font-family: var(--mg-font-body) !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  padding: 2px 8px !important;
  border-radius: 999px !important;
}

.popular-card-category {
  font-family: var(--mg-font-body);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #FFC247;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.popular-card-title {
  font-family: var(--mg-font-display);
  font-size: 1.18rem;
  font-weight: 700;
  line-height: 1.35;
  color: #FFF7E6;
  margin: 0 0 8px 0;
}

.popular-card-title a {
  color: #FFF7E6;
  text-decoration: none;
  transition: color 0.2s ease;
}

.popular-card-title a:hover {
  color: #FFC247;
}

.popular-card-desc {
  font-family: var(--mg-font-body);
  font-size: 0.88rem;
  line-height: 1.6;
  color: #F5EAD4;
  flex-grow: 1;
  margin: 0 0 16px 0;
}

.popular-card-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(185, 139, 46, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.tool-engine-tag {
  font-family: var(--mg-font-body);
  font-size: 0.75rem;
  font-weight: 600;
  color: #FFC247;
}

.mg-btn-sm-primary {
  padding: 8px 20px !important;
  border-radius: var(--mg-radius-pill) !important;
  background: linear-gradient(135deg, #FF9D24 0%, #E65100 100%) !important;
  color: #FFFFFF !important;
  font-family: var(--mg-font-body) !important;
  font-size: 0.82rem !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  transition: all 0.22s ease !important;
  box-shadow: 0 3px 12px rgba(230, 81, 0, 0.35) !important;
}

.mg-btn-sm-primary:hover {
  filter: brightness(1.1);
  transform: translateX(2px);
  box-shadow: 0 6px 18px rgba(230, 81, 0, 0.45) !important;
}

/* --- 7.4 Complete Tools Catalogue Grid --- */
.all-tools-section {
  margin-bottom: 60px;
}

.all-tools-header {
  margin-bottom: 24px;
}

.all-tools-title {
  font-family: var(--mg-font-display);
  font-size: 1.85rem;
  font-weight: 800;
  color: #FFF7E6 !important;
  margin: 8px 0 6px 0;
  letter-spacing: -0.02em;
  text-shadow: none !important;
}

.all-tools-subtitle {
  font-family: var(--mg-font-body);
  color: #F5EAD4 !important;
  font-size: 0.95rem;
  margin: 0;
  text-shadow: none !important;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  align-items: stretch;
}

.tool-card {
  background: rgba(12, 37, 29, 0.9) !important;
  backdrop-filter: blur(20px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(160%) !important;
  border: 1px solid rgba(185, 139, 46, 0.35) !important;
  border-radius: 18px !important;
  padding: 22px 20px !important;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3) !important;
  position: relative;
}

.tool-card:hover {
  transform: translateY(-4px);
  border-color: #FFC247 !important;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4), 0 0 18px rgba(255, 194, 71, 0.18) !important;
}

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

.tool-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(185, 139, 46, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tool-card-badges {
  display: flex;
  align-items: center;
  gap: 6px;
}

.badge-browser {
  background: rgba(6, 182, 212, 0.18) !important;
  color: #67E8F9 !important;
  border: 1px solid rgba(6, 182, 212, 0.45) !important;
  font-family: var(--mg-font-body) !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  padding: 2px 8px !important;
  border-radius: 999px !important;
}

.btn-fav-toggle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(185, 139, 46, 0.3);
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #E8E4D8;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-fav-toggle:hover {
  transform: scale(1.12);
  color: #EF4444;
  border-color: #EF4444;
  background: rgba(239, 68, 68, 0.15);
}

.btn-fav-toggle.is-favorited {
  color: #EF4444;
  background: rgba(239, 68, 68, 0.2);
  border-color: #EF4444;
}

.btn-fav-toggle.is-favorited svg {
  fill: #EF4444;
}

.tool-category {
  font-family: var(--mg-font-body);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #FFC247;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.tool-name {
  font-family: var(--mg-font-display);
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.35;
  color: #FFF7E6;
  margin: 0 0 8px 0;
}

.tool-name a {
  color: #FFF7E6;
  text-decoration: none;
  transition: color 0.2s ease;
}

.tool-name a:hover {
  color: #FFC247;
}

.tool-desc {
  font-family: var(--mg-font-body);
  font-size: 0.88rem;
  line-height: 1.58;
  color: #F5EAD4;
  flex-grow: 1;
  margin: 0 0 16px 0;
}

.tool-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(185, 139, 46, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.tool-privacy-tag {
  font-family: var(--mg-font-body);
  font-size: 0.76rem;
  font-weight: 600;
  color: #FFC247;
}

.btn-tool-action {
  padding: 8px 18px !important;
  border-radius: var(--mg-radius-pill) !important;
  background: linear-gradient(135deg, #FF9D24 0%, #E65100 100%) !important;
  color: #FFFFFF !important;
  font-family: var(--mg-font-body) !important;
  font-size: 0.82rem !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  transition: all 0.22s ease !important;
  box-shadow: 0 3px 12px rgba(230, 81, 0, 0.35) !important;
}

.btn-tool-action:hover {
  filter: brightness(1.1);
  transform: translateX(2px);
  box-shadow: 0 6px 18px rgba(230, 81, 0, 0.45) !important;
}

/* --- 7.5 Pagination Controls --- */
.tools-pagination-wrapper {
  margin-top: 40px;
  padding: 16px 26px;
  background: rgba(12, 37, 29, 0.92) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(185, 139, 46, 0.4) !important;
  border-radius: var(--mg-radius-pill) !important;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35) !important;
}

.tools-pagination-info {
  font-family: var(--mg-font-body);
  font-size: 0.86rem;
  font-weight: 600;
  color: #F5EAD4;
}

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

.page-num-btn,
.page-nav-btn {
  padding: 6px 14px;
  border-radius: var(--mg-radius-pill);
  border: 1px solid rgba(185, 139, 46, 0.35);
  background: rgba(255, 255, 255, 0.06);
  color: #FFF7E6;
  font-family: var(--mg-font-body);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.page-num-btn:hover:not(.active),
.page-nav-btn:hover:not(.disabled) {
  border-color: #FFC247;
  color: #FFC247;
  background: rgba(255, 194, 71, 0.12);
  transform: translateY(-1px);
}

.page-num-btn.active {
  background: linear-gradient(135deg, #FF9D24 0%, #E65100 100%) !important;
  color: #FFFFFF !important;
  border-color: #FF9D24 !important;
  box-shadow: 0 3px 12px rgba(230, 81, 0, 0.4);
}

.page-nav-btn.disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

.page-nav-ellipsis {
  padding: 0 6px;
  color: #FFC247;
  font-weight: 700;
}

/* Empty State Card */
.no-tools-card {
  padding: 60px 24px;
  text-align: center;
  background: rgba(12, 37, 29, 0.9) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1.5px dashed rgba(185, 139, 46, 0.45) !important;
  border-radius: 20px !important;
  margin-top: 20px;
}

.no-tools-icon {
  font-size: 2.8rem;
  margin-bottom: 12px;
}

.no-tools-title {
  font-family: var(--mg-font-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: #FFF7E6;
  margin-bottom: 8px;
}

.no-tools-desc {
  font-family: var(--mg-font-body);
  font-size: 0.95rem;
  color: #F5EAD4;
  margin: 0 auto 20px auto;
  max-width: 480px;
  line-height: 1.6;
}

/* --- 7.6 Benefits Section --- */
.tools-benefits-section {
  padding: 70px 0 90px 0;
  position: relative;
  z-index: 2;
  background-color: transparent !important;
}

.tools-benefits-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 44px;
}

.benefit-glass-card {
  background: rgba(12, 37, 29, 0.9) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(185, 139, 46, 0.38) !important;
  border-radius: 20px !important;
  padding: 28px 22px !important;
  display: flex;
  flex-direction: column;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
}

.benefit-glass-card:hover {
  transform: translateY(-4px);
  border-color: #FFC247 !important;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4), 0 0 20px rgba(255, 194, 71, 0.2) !important;
}

.benefit-icon-box {
  font-size: 2.2rem;
  margin-bottom: 14px;
}

.benefit-card-title {
  font-family: var(--mg-font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: #FFF7E6 !important;
  margin: 0 0 10px 0;
  text-shadow: none !important;
}

.benefit-card-desc {
  font-family: var(--mg-font-body);
  font-size: 0.9rem;
  color: #F5EAD4 !important;
  line-height: 1.62;
  margin: 0;
  text-shadow: none !important;
}

/* --- 7.7 Tool Detail Workspace Card (for /ai-tools/:slug) --- */
.tool-workspace-card {
  background: rgba(12, 37, 29, 0.92) !important;
  backdrop-filter: blur(24px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(160%) !important;
  border: 1px solid rgba(185, 139, 46, 0.4) !important;
  border-radius: 22px !important;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.4) !important;
  color: #FFF7E6 !important;
}

.workspace-title {
  color: #FFF7E6 !important;
  font-family: var(--mg-font-display) !important;
  font-weight: 700 !important;
}

.workspace-hint {
  color: #F5EAD4 !important;
  font-family: var(--mg-font-body) !important;
}

.tool-dropzone {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 2px dashed rgba(185, 139, 46, 0.45) !important;
  border-radius: 18px !important;
}

.tool-dropzone:hover,
.tool-dropzone.dragover {
  border-color: #FFC247 !important;
  background: rgba(255, 194, 71, 0.08) !important;
}

.dropzone-title {
  color: #FFF7E6 !important;
}

.dropzone-sub {
  color: #F5EAD4 !important;
}

/* --- 7.8 Responsive Breakpoints for AI Tools Marketplace --- */
@media (max-width: 1024px) {
  .tools-hero-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .tools-ecosystem-visual {
    margin-top: 10px;
  }

  .ecosystem-stage {
    transform: scale(0.92);
    transform-origin: center center;
    margin: 0 auto;
  }

  .popular-tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tools-benefits-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .tools-hero-section {
    padding-top: 105px;
  }

  .tools-hero-title {
    font-size: 2.2rem;
  }

  .tools-trust-indicators {
    flex-direction: column;
    align-items: flex-start;
  }

  .trust-indicator-item {
    width: 100%;
  }

  .tools-controls-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .tools-sort-wrap {
    width: 100%;
    justify-content: space-between;
  }

  .popular-tools-grid {
    grid-template-columns: 1fr;
  }

  .tools-grid {
    grid-template-columns: 1fr;
  }

  .tools-benefits-grid {
    grid-template-columns: 1fr;
  }

  .tools-pagination-wrapper {
    flex-direction: column;
    text-align: center;
    border-radius: var(--mg-radius-lg);
  }
}

@media (max-width: 480px) {
  .ecosystem-stage {
    transform: scale(0.72);
    transform-origin: center center;
    margin: -35px auto;
  }

  .tools-hero-title {
    font-size: 1.85rem;
  }

  .tools-hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .tools-hero-actions .mg-btn-amber,
  .tools-hero-actions .mg-btn-outline-gold,
  .tools-hero-actions .mg-btn-sunset-primary,
  .tools-hero-actions .mg-btn-secondary-glass {
    width: 100%;
    justify-content: center;
  }

  .tools-toolbar-wrapper {
    padding: 18px 14px !important;
  }

  .tools-search-box input {
    height: 46px;
    font-size: 0.9rem !important;
  }

  .popular-tool-card,
  .tool-card {
    padding: 20px 16px !important;
  }
}
