/* ImageFormatChanger Tools - Global SaaS Design System */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  /* Light Theme Variables */
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.7);
  --bg-glass: rgba(255, 255, 255, 0.6);
  --border-glass: rgba(226, 232, 240, 0.8);
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  
  --primary-glow: rgba(99, 102, 241, 0.15);
  --secondary-glow: rgba(168, 85, 247, 0.15);
  --accent-glow: rgba(236, 72, 153, 0.15);
  
  --accent-color: #6366f1;
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  --accent-gradient-hover: linear-gradient(135deg, #4f46e5 0%, #9333ea 100%);
  
  --shadow-sm: 0 2px 8px -1px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 12px 24px -4px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 40px -8px rgba(15, 23, 42, 0.12);
  --card-border-radius: 16px;
  --transition-speed: 0.3s;
}

body.dark-theme {
  /* Dark Theme Variables */
  --bg-primary: #09090b;
  --bg-secondary: #0f0f16;
  --bg-card: rgba(15, 15, 22, 0.7);
  --bg-glass: rgba(15, 15, 22, 0.6);
  --border-glass: rgba(255, 255, 255, 0.05);
  
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
  
  --primary-glow: rgba(99, 102, 241, 0.3);
  --secondary-glow: rgba(168, 85, 247, 0.3);
  --accent-glow: rgba(236, 72, 153, 0.2);
  
  --accent-color: #a855f7;
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  --accent-gradient-hover: linear-gradient(135deg, #7c3aed 0%, #c084fc 100%);
  
  --shadow-sm: 0 2px 8px -1px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 12px 24px -4px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 20px 40px -8px rgba(0, 0, 0, 0.6);
}

/* Global Elements */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  color: var(--text-primary);
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

/* Premium Scrollbars */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--border-glass);
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Dynamic Ambient Glow Blobs */
.glow-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.glow-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.35;
  mix-blend-mode: screen;
  animation: float-blobs 25s infinite alternate ease-in-out;
}

body.dark-theme .glow-blob {
  opacity: 0.25;
}

.blob1 {
  background: var(--primary-glow);
  width: 500px;
  height: 500px;
  top: -150px;
  left: -150px;
}

.blob2 {
  background: var(--secondary-glow);
  width: 600px;
  height: 600px;
  bottom: -200px;
  right: -100px;
  animation-delay: -5s;
}

.blob3 {
  background: var(--accent-glow);
  width: 400px;
  height: 400px;
  top: 40%;
  left: 60%;
  animation-delay: -10s;
}

@keyframes float-blobs {
  0% {
    transform: translate(0, 0) scale(1) rotate(0deg);
  }
  50% {
    transform: translate(80px, 50px) scale(1.1) rotate(180deg);
  }
  100% {
    transform: translate(-50px, -80px) scale(0.9) rotate(360deg);
  }
}

/* Particles Canvas */
#particles-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* Header & Sticky Navigation */
.navbar-custom {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-glass);
  padding: 1rem 0;
  z-index: 2000; /* Elevated z-index to overlay all content */
  transition: all 0.3s ease;
}

.navbar-brand-custom {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 1.5rem;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link-custom {
  font-weight: 500;
  color: var(--text-secondary) !important;
  padding: 0.5rem 1rem !important;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.nav-link-custom:hover, .nav-link-custom.active {
  color: var(--text-primary) !important;
  background: rgba(99, 102, 241, 0.08);
}

body.dark-theme .nav-link-custom:hover, 
body.dark-theme .nav-link-custom.active {
  background: rgba(168, 85, 247, 0.15);
}

/* Theme Toggle Button */
.theme-toggle-btn {
  background: transparent;
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.theme-toggle-btn:hover {
  background: var(--border-glass);
  transform: rotate(15deg);
}

.theme-toggle-btn .fa-sun {
  display: none;
}

body.dark-theme .theme-toggle-btn .fa-moon {
  display: none;
}

body.dark-theme .theme-toggle-btn .fa-sun {
  display: block;
  color: #fbbf24;
}

/* Desktop Hover Mega Menu */
.nav-item-dropdown {
  position: relative;
}

.mega-menu {
  position: absolute;
  top: 100%;
  left: var(--mega-menu-left, 50%);
  transform: translate3d(var(--mega-menu-tx, -50%), 15px, 0);
  width: 900px;
  max-width: calc(100vw - 40px);
  background: #FFFFFF; /* Solid white background - no transparency */
  backdrop-filter: blur(4px); /* Very subtle backdrop blur */
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid var(--border-glass);
  border-radius: 24px; /* Premium rounded corners */
  padding: 2.5rem; /* Increased internal padding */
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08); /* Soft premium shadow */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.2s;
  z-index: 2100; /* Elevated z-index inside the navbar context */
  will-change: transform, opacity; /* GPU-accelerated layer promotion */
}

body.dark-theme .mega-menu {
  background: #0F172A; /* Solid dark background - no transparency */
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4); /* Deep dark premium shadow */
}

@media (min-width: 992px) and (max-width: 1199.98px) {
  .mega-menu {
    width: 800px !important;
    padding: 2rem !important;
  }
}

.nav-item-dropdown:hover .mega-menu {
  opacity: 1;
  visibility: visible;
  transform: translate3d(var(--mega-menu-tx, -50%), 0, 0);
}



.mega-menu .row {
  margin-left: -1.25rem;
  margin-right: -1.25rem;
}

.mega-menu .col-md-3 {
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.mega-menu-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
}

.mega-menu-links {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 6px; /* Equal spacing between tools */
}

.mega-menu-item {
  margin-bottom: 0; /* Reset margins */
}

.mega-menu-link {
  display: flex;
  align-items: center;
  gap: 12px; /* Better icon-text alignment and gap */
  font-size: 0.95rem;
  color: var(--text-secondary);
  padding: 10px 14px; /* Increased internal padding */
  border-radius: 12px; /* Smooth rounded corners for items */
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.mega-menu-link i {
  color: var(--text-muted);
  font-size: 1.05rem;
  width: 24px;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.mega-menu-link:hover {
  background: rgba(99, 102, 241, 0.08);
  color: var(--text-primary);
  transform: translateX(6px); /* Smooth slide hover */
}

.mega-menu-link:hover i {
  color: #6366f1;
  transform: scale(1.15); /* Micro-animation zoom */
}

body.dark-theme .mega-menu-link:hover {
  background: rgba(168, 85, 247, 0.15);
  color: var(--text-primary);
}

body.dark-theme .mega-menu-link:hover i {
  color: #a855f7;
}

/* Glassmorphism Cards */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--card-border-radius);
  box-shadow: var(--shadow-md);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease, border-color 0.3s ease;
}

.glass-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(99, 102, 241, 0.3);
}

body.dark-theme .glass-card:hover {
  border-color: rgba(168, 85, 247, 0.4);
}

/* Hero Section Styles */
.hero-section {
  position: relative;
  padding: 140px 0 100px;
  text-align: center;
  overflow: hidden;
}

.hero-heading {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 3.5rem;
  line-height: 1.15;
  letter-spacing: -0.05rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
  .hero-heading {
    font-size: 2.25rem;
  }
}

.text-gradient {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-supporting {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 650px;
  margin: 0 auto 2.5rem;
  line-height: 1.6;
}

/* Premium Buttons */
.btn-premium-primary {
  background: var(--accent-gradient);
  color: #ffffff !important;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: 50px;
  border: none;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
  transition: all 0.3s ease;
}

.btn-premium-primary:hover {
  background: var(--accent-gradient-hover);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
  transform: translateY(-2px);
}

.btn-premium-secondary {
  background: var(--bg-card);
  color: var(--text-primary) !important;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: 50px;
  border: 1px solid var(--border-glass);
  backdrop-filter: blur(8px);
  transition: all 0.3s ease;
}

.btn-premium-secondary:hover {
  background: var(--border-glass);
  transform: translateY(-2px);
}

/* Homepage Category Tab Filters */
.category-tabs-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 3rem;
}

.category-tab-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 50px;
  color: var(--text-secondary);
  padding: 10px 24px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.category-tab-btn:hover, .category-tab-btn.active {
  background: var(--accent-gradient);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 8px 16px rgba(168, 85, 247, 0.2);
}

/* Tool Cards Grid Layout */
.tool-card-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  background: rgba(99, 102, 241, 0.08);
  color: #6366f1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
}

body.dark-theme .tool-card-icon {
  background: rgba(168, 85, 247, 0.12);
  color: #a855f7;
}

.glass-card:hover .tool-card-icon {
  background: var(--accent-gradient);
  color: #ffffff;
  transform: scale(1.1) rotate(5deg);
}

.tool-card-title {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.tool-card-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.tool-card-btn {
  font-weight: 600;
  font-size: 0.9rem;
  color: #6366f1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

body.dark-theme .tool-card-btn {
  color: #a855f7;
}

.tool-card-btn i {
  transition: transform 0.2s ease;
}

.glass-card:hover .tool-card-btn i {
  transform: translateX(4px);
}

/* Footer Section */
.footer-premium {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-glass);
  padding: 5rem 0 2rem;
  margin-top: auto;
  position: relative;
  overflow: hidden;
}

.footer-logo {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 1.4rem;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1.25rem;
  display: inline-block;
}

.footer-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.footer-social-icons {
  display: flex;
  gap: 12px;
}

.social-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.social-icon-btn:hover {
  background: var(--accent-gradient);
  color: #ffffff;
  transform: translateY(-3px);
  border-color: transparent;
}

.footer-column-heading {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 8px;
}

.footer-column-heading::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 30px;
  height: 2px;
  background: var(--accent-gradient);
}

.footer-links-list {
  list-style: none;
  padding-left: 0;
}

.footer-link-item {
  margin-bottom: 0.75rem;
}

.footer-link-item a {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.footer-link-item a:hover {
  color: var(--accent-color);
  padding-left: 4px;
}

/* Newsletter Input Form */
.newsletter-form {
  position: relative;
  margin-top: 1rem;
}

.newsletter-input {
  background: var(--bg-primary);
  border: 1px solid var(--border-glass);
  border-radius: 50px;
  padding: 12px 24px;
  color: var(--text-primary);
  width: 100%;
  font-size: 0.9rem;
  outline: none;
  padding-right: 50px;
  transition: all 0.3s ease;
}

.newsletter-input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.newsletter-btn {
  position: absolute;
  right: 4px;
  top: 4px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-gradient);
  color: #ffffff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

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

.footer-divider {
  border-top: 1px solid var(--border-glass);
  margin: 3rem 0 1.5rem;
}

.copyright-text {
  color: var(--text-muted);
  font-size: 0.88rem;
  text-align: center;
}

/* Breadcrumbs Custom styling */
.breadcrumb-custom {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin-bottom: 2rem;
  font-size: 0.9rem;
  gap: 8px;
  align-items: center;
}

.breadcrumb-item-custom {
  color: var(--text-secondary);
}

.breadcrumb-item-custom a:hover {
  color: var(--accent-color);
}

.breadcrumb-separator-custom {
  color: var(--text-muted);
}

/* Responsive Styles for Mobile Navbar */
@media (max-width: 991.98px) {
  .mega-menu {
    position: static;
    transform: none !important;
    width: 100% !important;
    max-width: 100% !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: none;
    box-shadow: none !important;
    border: none !important;
    background: transparent !important;
    padding: 0.5rem 0 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  
  .nav-item-dropdown.active-mobile .mega-menu {
    display: block;
  }
  
  .navbar-collapse {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 1rem;
    margin-top: 0.5rem;
    border: 1px solid var(--border-glass);
    box-shadow: var(--shadow-md);
  }
  
  .nav-item-dropdown:hover .mega-menu {
    transform: none !important;
  }
  
  /* Mobile Accordion Styles */
  .mega-menu-title {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 0.5rem;
    margin-bottom: 0;
    border-bottom: 1px solid var(--border-glass);
    user-select: none;
    font-size: 0.95rem;
    letter-spacing: 0.05rem;
  }
  
  .mega-menu-title i.text-primary {
    font-size: 1.1rem;
  }
  
  .mega-menu-links {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), padding 0.35s ease;
    padding: 0 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  
  .mega-menu-links.show-mobile {
    max-height: 500px;
    padding: 0.75rem 0.5rem;
  }
  
  .mega-menu-link {
    padding: 8px 12px;
    border-radius: 8px;
  }
  
  .mega-menu-link:hover {
    transform: translateX(4px);
  }
  
  .mobile-accordion-arrow {
    transition: transform 0.3s ease;
    font-size: 0.8rem;
    color: var(--text-muted);
  }
  
  .mobile-accordion-arrow.rotate-arrow {
    transform: rotate(180deg);
    color: var(--accent-color);
  }
  
  .mega-menu .col-md-3 {
    padding: 0;
  }
  
  .mega-menu .row {
    margin: 0;
    display: flex;
    flex-direction: column;
  }
}

