/**
* Template Name: BestAIApps
* Updated: Jan 2025 for AI Tools Directory
* Author: Custom Design
*/

/*--------------------------------------------------------------
# Font & Color Variables
--------------------------------------------------------------*/
/* Fonts */
:root {
  --default-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --heading-font: "Space Grotesk", sans-serif;
  --nav-font: "Inter", sans-serif;
}

/* Global Colors */
:root { 
  --background-color: #ffffff;
  --default-color: #2c3e50;
  --heading-color: #1a252f;
  --accent-color: #3b82f6;
  --accent-hover-color: #2563eb;
  --surface-color: #ffffff;
  --contrast-color: #ffffff;
  --light-gray: #f8fafc;
  --border-color: #e2e8f0;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
}

/* Gradient Colors */
:root {
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --gradient-accent: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --gradient-success: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
  --gradient-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Nav Menu Colors - Updated for better contrast */
:root {
  --nav-color: #1a252f;
  --nav-hover-color: #3b82f6;
  --nav-mobile-background-color: #ffffff;
  --nav-dropdown-background-color: #ffffff;
  --nav-dropdown-color: #1a252f;
  --nav-dropdown-hover-color: #3b82f6;
}

/* Color Presets */
.light-background {
  --background-color: #f8fafc;
  --surface-color: #ffffff;
  --default-color: #2c3e50;
  --heading-color: #1a252f;
}

.dark-background {
  --background-color: #1e293b;
  --default-color: #ffffff;
  --heading-color: #ffffff;
  --surface-color: #334155;
  --contrast-color: #ffffff;
}

.accent-background {
  --background-color: #3b82f6;
  --default-color: #ffffff;
  --heading-color: #ffffff;
  --accent-color: #ffffff;
  --surface-color: #60a5fa;
  --contrast-color: #ffffff;
}

.gradient-bg {
  background: var(--gradient-bg);
  --default-color: #ffffff;
  --heading-color: #ffffff;
  --contrast-color: #ffffff;
}

/* Smooth scroll */
:root {
  scroll-behavior: smooth;
}

/*--------------------------------------------------------------
# General Styling & Shared Classes
--------------------------------------------------------------*/
body {
  color: var(--default-color);
  background-color: var(--background-color);
  font-family: var(--default-font);
  line-height: 1.6;
  padding-top: 80px; /* Add padding to prevent content from hiding behind header */
}

@media (max-width: 768px) {
  body {
    padding-top: 70px; /* Smaller padding on mobile */
  }
}

a {
  color: var(--accent-color);
  text-decoration: none;
  transition: 0.3s;
}

a:hover {
  color: var(--accent-hover-color);
  text-decoration: none;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--heading-color);
  font-family: var(--heading-font);
  font-weight: 600;
  line-height: 1.2;
}

/* Modern Card Styling */
.modern-card {
  background: var(--surface-color);
  border-radius: 16px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.modern-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Fix for hero section cards - make text black */
.hero .modern-card {
  color: var(--default-color);
}

.hero .modern-card h4 {
  color: var(--heading-color);
}

.hero .modern-card p {
  color: var(--default-color);
  opacity: 0.8;
}

/* Gradient Icons */
.gradient-icon {
  background: var(--gradient-primary);
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 20px;
}

/* Button Styles */
.btn-get-started,
.btn-view-all {
  background: var(--gradient-primary);
  color: var(--contrast-color);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.5px;
  display: inline-block;
  padding: 14px 32px;
  border-radius: 50px;
  transition: all 0.3s ease;
  border: none;
  text-transform: uppercase;
  font-size: 14px;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-get-started:hover,
.btn-view-all:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
  color: var(--contrast-color);
}

/*--------------------------------------------------------------
# Global Header
--------------------------------------------------------------*/
.header {
  color: var(--nav-color);
  background-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: 15px 0;
  transition: all 0.5s;
  z-index: 1000; /* Increased z-index to ensure header stays on top */
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
}

.header .logo {
  line-height: 1;
}

.header .logo h1 {
  font-size: 28px;
  margin: 0;
  font-weight: 700;
  color: var(--contrast-color);
}

.header .logo .accent {
  color: #60a5fa;
}

.header .btn-getstarted {
  color: var(--contrast-color);
  background: var(--gradient-primary);
  font-size: 14px;
  padding: 10px 24px;
  margin: 0 0 0 30px;
  border-radius: 50px;
  transition: 0.3s;
  font-weight: 600;
  border: none;
}

.header .btn-getstarted:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
  color: var(--contrast-color);
}

@media (max-width: 1200px) {
  .header .logo {
    order: 1;
  }
  .header .btn-getstarted {
    order: 2;
    margin: 0 15px 0 0;
    padding: 8px 20px;
  }
  .header .navmenu {
    order: 3;
  }
}

.scrolled .header {
  background-color: rgba(255, 255, 255, 0.98); /* Slightly more opaque when scrolled */
  box-shadow: 0px 0 18px rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000; /* Maintain high z-index when scrolled */
}

.scrolled .header .logo h1 {
  color: var(--heading-color);
}

.scrolled .header .logo .accent {
  color: var(--accent-color);
}

/*--------------------------------------------------------------
# Navigation Menu
--------------------------------------------------------------*/
/* Desktop Navigation */
@media (min-width: 1200px) {
  .navmenu {
    padding: 0;
  }

  .navmenu ul {
    margin: 0;
    padding: 0;
    display: flex;
    list-style: none;
    align-items: center;
  }

  .navmenu li {
    position: relative;
  }

  .navmenu a,
  .navmenu a:focus {
    color: var(--nav-color);
    padding: 18px 15px;
    font-size: 15px;
    font-family: var(--nav-font);
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    white-space: nowrap;
    transition: 0.3s;
  }

  .navmenu a i,
  .navmenu a:focus i {
    font-size: 12px;
    line-height: 0;
    margin-left: 5px;
    transition: 0.3s;
  }

  .navmenu li:last-child a {
    padding-right: 0;
  }

  .navmenu li:hover > a,
  .navmenu .active,
  .navmenu .active:focus {
    color: var(--nav-hover-color);
  }

  .navmenu .dropdown ul {
    margin: 0;
    padding: 15px 0;
    background: var(--nav-dropdown-background-color);
    display: block;
    position: absolute;
    visibility: hidden;
    left: 14px;
    top: 130%;
    opacity: 0;
    transition: 0.3s;
    border-radius: 12px;
    z-index: 1001; /* Higher than header */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
  }

  .navmenu .dropdown ul li {
    min-width: 200px;
  }

  .navmenu .dropdown ul a {
    padding: 10px 20px;
    font-size: 14px;
    text-transform: none;
    color: var(--nav-dropdown-color);
  }

  .navmenu .dropdown ul a:hover,
  .navmenu .dropdown ul .active:hover,
  .navmenu .dropdown ul li:hover > a {
    color: var(--nav-dropdown-hover-color);
  }

  .navmenu .dropdown:hover > ul {
    opacity: 1;
    top: 100%;
    visibility: visible;
  }
}

/* Mobile Navigation */
@media (max-width: 1199px) {
  .mobile-nav-toggle {
    color: var(--nav-color);
    font-size: 28px;
    line-height: 0;
    margin-right: 10px;
    cursor: pointer;
    transition: color 0.3s;
  }

  .navmenu {
    padding: 0;
    z-index: 1002; /* Higher than header */
  }

  .navmenu ul {
    display: none;
    list-style: none;
    position: fixed;
    top: 80px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    padding: 10px 0;
    margin: 0;
    border-radius: 12px;
    background-color: var(--nav-mobile-background-color);
    overflow-y: auto;
    transition: 0.3s;
    z-index: 1003; /* Higher than navmenu */
    box-shadow: 0px 0px 30px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.1);
  }

  .navmenu a,
  .navmenu a:focus {
    color: var(--nav-dropdown-color);
    padding: 15px 20px;
    font-family: var(--nav-font);
    font-size: 16px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    white-space: nowrap;
    transition: 0.3s;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  }

  .navmenu a:hover,
  .navmenu .active,
  .navmenu .active:focus {
    color: var(--accent-color);
    background-color: rgba(59, 130, 246, 0.1);
  }

  .mobile-nav-active {
    overflow: hidden;
  }

  .mobile-nav-active .mobile-nav-toggle {
    color: #ffffff;
    position: fixed;
    font-size: 32px;
    top: 15px;
    right: 15px;
    margin-right: 0;
    z-index: 1004; /* Highest z-index for mobile toggle */
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-nav-active .navmenu {
    position: fixed;
    overflow: hidden;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    transition: 0.3s;
    backdrop-filter: blur(5px);
    z-index: 1002;
  }

  .mobile-nav-active .navmenu > ul {
    display: block;
  }

  .navmenu .dropdown ul {
    position: static;
    display: none;
    z-index: 99;
    padding: 10px 0;
    margin: 10px 20px;
    background-color: rgba(59, 130, 246, 0.05);
      border: 1px solid rgba(59, 130, 246, 0.1);
    border-radius: 8px;
    box-shadow: none;
  }

  .navmenu .dropdown ul a {
    padding: 10px 15px;
    font-size: 14px;
    color: #4b5563;
    border-bottom: none;
  }

   .navmenu .dropdown ul a:hover {
    color: var(--accent-color);
    background-color: rgba(59, 130, 246, 0.1);
  }

  .navmenu .dropdown > .dropdown-active {
    display: block;
    background-color: rgba(33, 37, 41, 0.03);
  }
}

/*--------------------------------------------------------------
# Global Sections
--------------------------------------------------------------*/
section,
.section {
  color: var(--default-color);
  background-color: var(--background-color);
  padding: 60px 0;
  scroll-margin-top: 100px;
  overflow: clip;
  position: relative; /* Ensure sections have positioning context */
  z-index: 1; /* Lower z-index than header */
}

@media (max-width: 1199px) {
  section,
  .section {
    scroll-margin-top: 80px;
  }
}

/*--------------------------------------------------------------
# Global Section Titles
--------------------------------------------------------------*/
.section-title {
  text-align: center;
  padding-bottom: 60px;
  position: relative;
  z-index: 1; /* Lower than header */
}

.section-title h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  position: relative;
  color: var(--heading-color);
  z-index: 1; /* Ensure title stays below header */
}

.section-title h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--gradient-primary);
  border-radius: 2px;
}

.section-title p {
  color: var(--default-color);
  margin-bottom: 0;
  font-size: 1.1rem;
  opacity: 0.8;
}

/*--------------------------------------------------------------
# Hero Section
--------------------------------------------------------------*/
.hero {
  width: 100%;
  min-height: 100vh;
  position: relative;
  padding: 140px 0 80px 0;
  display: flex;
  align-items: center;
  background: var(--gradient-bg);
  color: var(--contrast-color);
  overflow: hidden;
  margin-top: -80px;
  z-index: 0; /* Lower than header */
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
}

.hero .container {
  position: relative;
  z-index: 2;
}

.hero h1 {
  margin: 0;
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--contrast-color);
  line-height: 1.2;
  margin-bottom: 30px;
}

.hero .accent {
  background: linear-gradient(45deg, #60a5fa, #34d399);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 40px;
  font-size: 1.25rem;
  line-height: 1.6;
}

.hero .hero-subtitle {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 40px;
  font-size: 1.25rem;
  line-height: 1.6;
}

.hero .search-container {
  position: relative;
  max-width: 600px;
  margin: 40px auto;
}

.hero .search-input {
  width: 100%;
  padding: 20px 60px 20px 24px;
  font-size: 16px;
  border: none;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  color: var(--default-color);
}

.hero .search-input:focus {
  outline: none;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
  background: rgba(255, 255, 255, 1);
}

.hero .search-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--gradient-primary);
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
}

.hero .search-btn:hover {
  transform: translateY(-50%) scale(1.1);
}

.hero .stats {
  margin-top: 60px;
  display: flex;
  justify-content: center;
  gap: 60px;
  flex-wrap: wrap;
}

.hero .stat-item {
  text-align: center;
  color: rgba(255, 255, 255, 0.9);
}

.hero .stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--contrast-color);
  display: block;
}

.hero .stat-label {
  font-size: 0.9rem;
  opacity: 0.8;
}

@media (max-width: 768px) {
  .hero {
    padding: 120px 0 60px 0;
    margin-top: -70px;
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .hero .stats {
    gap: 30px;
  }
  
  .hero .stat-number {
    font-size: 2rem;
  }
}

/*--------------------------------------------------------------
# Categories Section
--------------------------------------------------------------*/
.categories {
  padding: 80px 0;
  position: relative;
  z-index: 1; /* Ensure categories section stays below header */
}

.categories .section-title {
  position: relative;
  z-index: 1; /* Lower than header */
}

.categories .section-title h2 {
  position: relative;
  z-index: 1; /* Lower than header */
}

/* Update the existing .category-item styles with these changes: */
.category-item {
  background: var(--surface-color);
  border-radius: 16px;
  padding: 40px 30px;
  text-align: center;
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
  height: 100%;
  position: relative;
  overflow: hidden;
  margin-bottom: 30px; /* Add spacing between items */
  display: block;
  text-decoration: none;
  color: inherit;
}

.category-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.category-item:hover::before {
  transform: scaleX(1);
}

.category-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  text-decoration: none;
  color: inherit;
}

.category-item .icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  background: var(--gradient-primary);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: white;
  transition: all 0.3s ease;
}

.category-item:hover .icon {
  transform: scale(1.1);
}

.category-item h3 {
  font-size: 1.5rem;
  margin-bottom: 16px;
  color: var(--heading-color);
  font-weight: 600;
}

.category-item p {
  color: var(--default-color);
  opacity: 0.8;
  margin-bottom: 24px;
  line-height: 1.6;
  font-size: 0.95rem;
}

.category-item .tool-count {
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent-color);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  display: inline-block;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

/* Add spacing to the categories section */
.categories .row {
  margin-bottom: 40px;
}

/* Ensure proper spacing on mobile */
@media (max-width: 768px) {
  .category-item {
    margin-bottom: 20px;
    padding: 30px 20px;
  }
  
  .categories .row {
    margin-bottom: 20px;
  }
}


/*--------------------------------------------------------------
# Stats Section
--------------------------------------------------------------*/
.stats {
  padding: 80px 0;
}

.stats-item {
  text-align: center;
  padding: 40px 20px;
  background: var(--surface-color);
  border-radius: 16px;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.stats-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.stats-item .icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 20px;
  background: var(--gradient-primary);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: white;
}

.stats-item .purecounter {
  font-size: 3rem;
  font-weight: 700;
  color: var(--accent-color);
  display: block;
  margin-bottom: 10px;
}

.stats-item p {
  color: var(--default-color);
  margin: 0;
  font-weight: 500;
  opacity: 0.8;
}

/*--------------------------------------------------------------
# Featured Tools Section
--------------------------------------------------------------*/
.featured-tools {
  padding: 80px 0;
}

.tool-card {
  background: var(--surface-color);
  border-radius: 16px;
  padding: 30px;
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.tool-header {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.tool-logo {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  margin-right: 16px;
  object-fit: cover;
  border: 1px solid var(--border-color);
}

.tool-info h3 {
  font-size: 1.25rem;
  margin: 0 0 4px 0;
  color: var(--heading-color);
}

.tool-category {
  font-size: 0.875rem;
  color: var(--accent-color);
  font-weight: 500;
}

.tool-description {
  color: var(--default-color);
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1;
}

.tool-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.tool-rating {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tool-rating .stars {
  color: #fbbf24;
  font-size: 1rem;
}

.tool-rating span:last-child {
  font-size: 0.875rem;
  color: var(--default-color);
  opacity: 0.7;
}

.tool-pricing {
  background: var(--light-gray);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--default-color);
}

.tool-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.tool-tag {
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent-color);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
}

.tool-actions {
  display: flex;
  gap: 12px;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.875rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
  color: white;
}

.btn-secondary {
  background: transparent;
  color: var(--accent-color);
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.875rem;
  border: 2px solid var(--accent-color);
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
   justify-content: center;
  flex: 1;
}

.btn-secondary:hover {
  background: var(--accent-color);
  color: white;
  transform: translateY(-2px);
}

/*--------------------------------------------------------------
# Blog Section
--------------------------------------------------------------*/
.blog {
  padding: 80px 0;
}

.blog-item {
  background: var(--surface-color);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.blog-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.blog-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-bottom: 1px solid var(--border-color);
}

.blog-content {
  padding: 24px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.blog-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  font-size: 0.875rem;
  color: var(--default-color);
  opacity: 0.7;
}

.blog-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.blog-category {
  background: var(--gradient-primary);
  color: white;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
}

.blog-item h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
  color: var(--heading-color);
  line-height: 1.4;
  flex-grow: 1;
}

.blog-item h3 a {
  color: var(--heading-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.blog-item h3 a:hover {
  color: var(--accent-color);
}

.blog-excerpt {
  color: var(--default-color);
  line-height: 1.6;
  margin-bottom: 20px;
  opacity: 0.8;
  flex-grow: 1;
}

.read-more {
  color: var(--accent-color);
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  margin-top: auto;
}

.read-more:hover {
  color: var(--accent-hover-color);
  transform: translateX(4px);
}

/*--------------------------------------------------------------
# Newsletter Section
--------------------------------------------------------------*/
.newsletter {
  padding: 80px 0;
  background: var(--gradient-bg);
  color: var(--contrast-color);
  text-align: center;
}

.newsletter h2 {
  color: var(--contrast-color);
  margin-bottom: 16px;
}

.newsletter p {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 40px;
  font-size: 1.1rem;
}

.newsletter-form {
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  gap: 12px;
  background: rgba(255, 255, 255, 0.1);
  padding: 8px;
  border-radius: 50px;
  backdrop-filter: blur(10px);
}

.newsletter-form input {
  flex: 1;
  padding: 16px 24px;
  border: none;
  border-radius: 50px;
  background: transparent;
  color: var(--contrast-color);
  font-size: 16px;
}

.newsletter-form input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.newsletter-form input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.1);
}

.newsletter-form button {
  background: rgba(255, 255, 255, 0.2);
  color: var(--contrast-color);
  border: none;
  padding: 16px 32px;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.newsletter-form button:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .newsletter-form {
    flex-direction: column;
    border-radius: 16px;
    padding: 16px;
  }
  
  .newsletter-form input,
  .newsletter-form button {
    border-radius: 12px;
  }
}

/*--------------------------------------------------------------
# Contact Section
--------------------------------------------------------------*/
.contact {
  padding: 80px 0;
}

.contact-info {
  background: var(--surface-color);
  border-radius: 16px;
  padding: 40px 30px;
  border: 1px solid var(--border-color);
  height: 100%;
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 30px;
}

.contact-info-item:last-child {
  margin-bottom: 0;
}

.contact-info-item .icon {
  width: 50px;
  height: 50px;
  background: var(--gradient-primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  margin-right: 20px;
  flex-shrink: 0;
}

.contact-info-item h4 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: var(--heading-color);
}

.contact-info-item p {
  color: var(--default-color);
  margin: 0;
  opacity: 0.8;
  line-height: 1.6;
}

.contact-form {
  background: var(--surface-color);
  border-radius: 16px;
  padding: 40px;
  border: 1px solid var(--border-color);
}

.contact-form .form-group {
  margin-bottom: 24px;
}

.contact-form label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--heading-color);
}

.contact-form .form-control {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  background: var(--surface-color);
  color: var(--default-color);
  font-size: 16px;
  transition: border-color 0.3s ease;
  font-family: var(--default-font);
}

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

.contact-form textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

.contact-form .loading,
.contact-form .error-message,
.contact-form .sent-message {
  display: none;
  padding: 12px;
  margin-bottom: 20px;
  border-radius: 8px;
  font-weight: 500;
}

.contact-form .loading {
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent-color);
}

.contact-form .error-message {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger-color);
}

.contact-form .sent-message {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success-color);
}

/*--------------------------------------------------------------
# Footer
--------------------------------------------------------------*/
.footer {
  color: var(--default-color);
  background-color: var(--background-color);
  font-size: 14px;
  border-top: 1px solid var(--border-color);
  position: relative;
}

.footer .footer-top {
  padding-top: 50px;
}

.footer .footer-about .logo {
  line-height: 1;
  margin-bottom: 25px;
}

.footer .footer-about .logo h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--heading-color);
}

.footer .footer-about .logo .accent {
  color: var(--accent-color);
}

.footer .footer-about p {
  font-size: 14px;
  font-family: var(--default-font);
  margin-bottom: 30px;
  color: var(--default-color);
  opacity: 0.8;
}

.footer .social-links {
  display: flex;
  gap: 10px;
}

.footer .social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(44, 62, 80, 0.3);
  font-size: 16px;
  color: rgba(44, 62, 80, 0.7);
  transition: 0.3s;
}

.footer .social-links a:hover {
  color: var(--accent-color);
  border-color: var(--accent-color);
  transform: translateY(-2px);
}

.footer h4 {
  font-size: 16px;
  font-weight: 600;
  position: relative;
  padding-bottom: 12px;
  margin-bottom: 20px;
  color: var(--heading-color);
}

.footer .footer-links {
  margin-bottom: 30px;
}

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

.footer .footer-links ul li {
  padding: 8px 0;
}

.footer .footer-links ul li:first-child {
  padding-top: 0;
}

.footer .footer-links ul a {
  color: rgba(44, 62, 80, 0.8);
  display: block;
  line-height: 1.5;
  transition: 0.3s;
  text-decoration: none;
}

.footer .footer-links ul a:hover {
  color: var(--accent-color);
  padding-left: 5px;
}

.footer .copyright {
  padding: 25px 0;
  border-top: 1px solid rgba(44, 62, 80, 0.1);
}

.footer .copyright p {
  margin-bottom: 0;
  color: rgba(44, 62, 80, 0.8);
}

.footer .credits {
  margin-top: 6px;
  font-size: 13px;
  color: rgba(44, 62, 80, 0.8);
}

.footer .credits a {
  color: var(--accent-color);
}

/*--------------------------------------------------------------
# Search Page Styles
--------------------------------------------------------------*/
.search-hero {
  padding: 120px 0 60px 0;
  background: var(--gradient-bg);
  color: var(--contrast-color);
}

.search-hero h1 {
  color: var(--contrast-color);
  margin-bottom: 20px;
}

.search-hero p {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 40px;
}

.search-filters {
  background: var(--surface-color);
  border-radius: 16px;
  padding: 30px;
  margin-bottom: 40px;
  border: 1px solid var(--border-color);
}

.filters-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.filters-toggle {
  background: none;
  border: none;
  color: var(--accent-color);
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.filters-content {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: end;
}

.filter-group {
  flex: 1;
  min-width: 200px;
}

.filter-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--heading-color);
}

.filter-group select,
.filter-group input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  background: var(--surface-color);
  color: var(--default-color);
  font-size: 14px;
  transition: border-color 0.3s ease;
}

.filter-group select:focus,
.filter-group input:focus {
  outline: none;
  border-color: var(--accent-color);
}

.sort-options {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sort-options select {
  padding: 8px 16px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  background: var(--surface-color);
  color: var(--default-color);
}

.no-results {
  text-align: center;
  padding: 80px 20px;
}

.no-results-content h3 {
  color: var(--heading-color);
  margin-bottom: 16px;
}

.popular-searches {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.popular-searches .badge {
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 8px 16px;
  border-radius: 20px;
}

.popular-searches .badge:hover {
  background: var(--accent-color) !important;
  color: white !important;
  transform: translateY(-2px);
}

.search-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  max-height: 200px;
  overflow-y: auto;
}

.suggestion-item {
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.3s ease;
}

.suggestion-item:hover {
  background-color: var(--light-gray);
}

.suggestion-item:last-child {
  border-bottom: none;
}

/*--------------------------------------------------------------
# Preloader
--------------------------------------------------------------*/
#preloader {
  position: fixed;
  inset: 0;
  z-index: 9999; /* Highest z-index for preloader */
  overflow: hidden;
  background: var(--background-color);
  transition: all 0.6s ease-out;
}

#preloader:before {
  content: "";
  position: fixed;
  top: calc(50% - 30px);
  left: calc(50% - 30px);
  border: 6px solid #ffffff;
  border-color: var(--accent-color) transparent var(--accent-color) transparent;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: animate-preloader 1.5s linear infinite;
}

@keyframes animate-preloader {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/*--------------------------------------------------------------
# Scroll Top Button
--------------------------------------------------------------*/
.scroll-top {
  position: fixed;
  visibility: hidden;
  opacity: 0;
  right: 15px;
  bottom: 15px;
  z-index: 999; /* Lower than header but higher than content */
  background-color: var(--accent-color);
  width: 44px;
  height: 44px;
  border-radius: 50px;
  transition: all 0.4s;
}

.scroll-top i {
  font-size: 24px;
  color: var(--contrast-color);
  line-height: 0;
}

.scroll-top:hover {
  background-color: var(--accent-hover-color);
  color: var(--contrast-color);
  transform: translateY(-2px);
}

.scroll-top.active {
  visibility: visible;
  opacity: 1;
}

/*--------------------------------------------------------------
# Utility Classes
--------------------------------------------------------------*/
.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bg-gradient {
  background: var(--gradient-bg);
}

.shadow-soft {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.shadow-medium {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.shadow-large {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.border-radius-lg {
  border-radius: 16px;
}

.border-radius-xl {
  border-radius: 24px;
}

/*--------------------------------------------------------------
# Loading Spinner
--------------------------------------------------------------*/
.spinner-border {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  vertical-align: -0.125em;
  border: 0.25em solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spinner-border 0.75s linear infinite;
}

@keyframes spinner-border {
  to {
    transform: rotate(360deg);
  }
}

/*--------------------------------------------------------------
# Responsive Design
--------------------------------------------------------------*/
@media (max-width: 1199px) {
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .section-title h2 {
    font-size: 2rem;
  }
  
  .category-item,
  .tool-card,
  .blog-item {
    margin-bottom: 30px;
  }
}

@media (max-width: 768px) {
  .hero {
    padding: 100px 0 60px 0;
    text-align: center;
  }
  
  .hero h1 {
    font-size: 2rem;
    margin-bottom: 20px;
  }
  
  .hero p,
  .hero .hero-subtitle {
    font-size: 1.1rem;
    margin-bottom: 30px;
  }
  
  .hero .search-container {
    margin: 30px auto;
  }
  
  .hero .search-input {
    padding: 16px 50px 16px 20px;
    font-size: 14px;
  }
  
  .hero .search-btn {
    width: 40px;
    height: 40px;
    right: 6px;
  }
  
  .hero .stats {
    gap: 20px;
    margin-top: 40px;
  }
  
  .hero .stat-number {
    font-size: 1.8rem;
  }
  
  .hero .stat-label {
    font-size: 0.8rem;
  }
  
  .section-title h2 {
    font-size: 1.8rem;
  }
  
  .section-title p {
    font-size: 1rem;
  }
  
  .category-item {
    padding: 30px 20px;
    margin-bottom: 20px;
  }
  
  .category-item .icon {
    width: 60px;
    height: 60px;
    font-size: 24px;
    margin-bottom: 20px;
  }
  
  .category-item h3 {
    font-size: 1.25rem;
  }
  
  .tool-card {
    padding: 20px;
    margin-bottom: 20px;
  }
  
  .tool-header {
    flex-direction: column;
    text-align: center;
    margin-bottom: 16px;
  }
  
  .tool-logo {
    margin-right: 0;
    margin-bottom: 12px;
  }
  
  .tool-meta {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }
  
  .tool-actions {
    flex-direction: column;
  }
  
  .stats-item {
    padding: 30px 15px;
    margin-bottom: 20px;
  }
  
  .stats-item .purecounter {
    font-size: 2.5rem;
  }
  
  .blog-item {
    margin-bottom: 20px;
  }
  
  .blog-content {
    padding: 20px;
  }
  
  .search-filters {
    padding: 20px;
  }
  
  .filters-content {
    flex-direction: column;
    gap: 16px;
  }
  
  .filter-group {
    min-width: auto;
  }
  
  .sort-options {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .contact-form {
    padding: 30px 20px;
  }
  
  .contact-info {
    padding: 30px 20px;
    margin-bottom: 30px;
  }
  
  .footer .footer-about,
  .footer .footer-links {
    margin-bottom: 30px;
  }
}

@media (max-width: 576px) {
  .hero h1 {
    font-size: 1.75rem;
  }
  
  .hero .search-input {
    padding: 14px 45px 14px 16px;
  }
  
  .hero .search-btn {
    width: 36px;
    height: 36px;
  }
  
  .section-title {
    padding-bottom: 40px;
  }
  
  .section-title h2 {
    font-size: 1.5rem;
  }
  
  .category-item,
  .tool-card,
  .stats-item,
  .blog-item {
    margin-bottom: 16px;
  }
  
  .tool-tags {
    justify-content: center;
  }
  
  .newsletter-form {
    padding: 12px;
  }
  
  .newsletter-form input,
  .newsletter-form button {
    padding: 12px 20px;
  }
  
  .contact-info-item {
    flex-direction: column;
    text-align: center;
  }
  
  .contact-info-item .icon {
    margin-right: 0;
    margin-bottom: 12px;
  }
}

/*--------------------------------------------------------------
# Print Styles
--------------------------------------------------------------*/
@media print {
  .header,
  .footer,
  .scroll-top,
  .mobile-nav-toggle,
  .search-filters,
  .newsletter {
    display: none !important;
  }
  
  body {
    background: white !important;
    color: black !important;
    padding-top: 0 !important;
  }
  
  .hero {
    background: white !important;
    color: black !important;
    padding: 20px 0 !important;
    margin-top: 0 !important;
  }
  
  .section {
    padding: 20px 0 !important;
  }
  
  .tool-card,
  .category-item,
  .blog-item {
    border: 1px solid #ddd !important;
    box-shadow: none !important;
    break-inside: avoid;
  }
}

/*--------------------------------------------------------------
# Dark Mode Support (Optional)
--------------------------------------------------------------*/
@media (prefers-color-scheme: dark) {
  :root {
    --background-color: #0f172a;
    --surface-color: #1e293b;
    --default-color: #e2e8f0;
    --heading-color: #f1f5f9;
    --border-color: #334155;
    --light-gray: #1e293b;
  }
  
  .hero .search-input {
    background: rgba(30, 41, 59, 0.95);
    color: var(--default-color);
  }
  
  .hero .search-input::placeholder {
    color: rgba(226, 232, 240, 0.7);
  }
  
  .search-suggestions {
    background: var(--surface-color);
    border-color: var(--border-color);
  }
  
  .suggestion-item:hover {
    background-color: var(--border-color);
  }
}

/*--------------------------------------------------------------
# High Contrast Mode Support
--------------------------------------------------------------*/
@media (prefers-contrast: high) {
  :root {
    --accent-color: #0066cc;
    --accent-hover-color: #0052a3;
    --border-color: #333333;
  }
  
  .tool-card,
  .category-item,
  .blog-item {
    border: 2px solid var(--border-color);
  }
  
  .btn-primary,
  .btn-secondary {
    border: 2px solid currentColor;
  }
}

/*--------------------------------------------------------------
# Reduced Motion Support
--------------------------------------------------------------*/
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .hero::before {
    animation: none;
  }
  
  #preloader:before {
    animation: none;
  }
}

/*--------------------------------------------------------------
# Focus Styles for Accessibility
--------------------------------------------------------------*/
*:focus {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

.btn-primary:focus,
.btn-secondary:focus,
.btn-get-started:focus {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 2px;
}

.hero .search-input:focus {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

/*--------------------------------------------------------------
# Skip Link for Screen Readers
--------------------------------------------------------------*/
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--accent-color);
  color: white;
  padding: 8px;
  text-decoration: none;
  border-radius: 4px;
  z-index: 100000;
}

.skip-link:focus {
  top: 6px;
}

/*--------------------------------------------------------------
# Custom Scrollbar
--------------------------------------------------------------*/
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--light-gray);
}

::-webkit-scrollbar-thumb {
  background: var(--accent-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-hover-color);
}

/*--------------------------------------------------------------
# Animation Classes
--------------------------------------------------------------*/
.fade-in {
  animation: fadeIn 0.6s ease-in-out;
}

.slide-up {
  animation: slideUp 0.6s ease-out;
}

.scale-in {
  animation: scaleIn 0.4s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes scaleIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/*--------------------------------------------------------------
# Disable aos animation delay on mobile devices
--------------------------------------------------------------*/
@media screen and (max-width: 768px) {
  [data-aos-delay] {
    transition-delay: 0 !important;
  }
}

/*--------------------------------------------------------------
# End of File
--------------------------------------------------------------*/



