/* ======================
   BASE STYLES
   ====================== */

/* Reset & base */
body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #fff;
  transition: background-color 0.3s, color 0.3s;
}

/* Dark Mode Base */
body.dark-mode {
  background-color: #121212;
  color: #fff;
}
body.dark-mode a {
  color: #bb86fc;
}

/* Container */
.container {
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
  padding: 0 1rem;
}
/* Dark mode styles */
body.dark-mode {
    background-color: #121212;
    color: #eee;
}

.dark-mode .tool-card {
    background-color: #1e1e1e;
    border-color: #333;
}

.dark-toggle {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 9999;
    background: none;
    border: 2px solid #ccc;
    border-radius: 50%;
    padding: 0.5rem 0.7rem;
    font-size: 1.2rem;
    cursor: pointer;
    background-color: var(--color-bg, #fff);
    transition: all 0.3s ease;
}


/* ======================
   TYPOGRAPHY
   ====================== */

h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-weight: 700;
  line-height: 1.2;
  color: inherit;
}

/* ======================
   LAYOUT COMPONENTS
   ====================== */

/* Hero Section */
.hero-section {
  text-align: center;
  padding: 100px 20px;
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #fff;
  border-radius: 12px;
  margin-bottom: 40px;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero-title {
  font-size: 2.8rem;
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  font-size: 1.3rem;
  margin-bottom: 2.5rem;
  opacity: 0.9;
}

/* Search Container */
.search-container {
  margin-bottom: 20px;
}

.search-input-wrapper {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

.search-input {
  width: 100%;
  padding: 16px 20px 16px 50px;
  font-size: 1.1rem;
  border: none;
  border-radius: 50px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: box-shadow 0.3s ease;
}

.search-input:focus {
  outline: none;
  box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

.search-button {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  width: 24px;
  height: 24px;
}

/* Filter Container */
.filter-dropdown {
  max-width: 320px;
  margin: 0 auto 2rem;
  text-align: left;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Label Styling */
.filter-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  font-size: 1rem;
  color: #333;
  user-select: none;
}

/* Select Wrapper for custom arrow */
.select-wrapper {
  position: relative;
  display: inline-block;
  width: 100%;
}

/* The Select Box */
.select-wrapper select {
  width: 100%;
  appearance: none; /* Remove default arrow */
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: #f5f7fa;
  border: 2px solid #ddd;
  border-radius: 8px;
  padding: 12px 40px 12px 16px;
  font-size: 1rem;
  color: #333;
  cursor: pointer;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.05);
}

/* Focus & Hover States */
.select-wrapper select:hover,
.select-wrapper select:focus {
  border-color: #6366f1;
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.5);
  outline: none;
  background-color: #fff;
  color: #111;
}

/* Custom arrow using SVG inline as background */
.select-wrapper::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 14px;
  width: 20px;
  height: 20px;
  pointer-events: none;
  transform: translateY(-50%);
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg fill='none' stroke='%236366f1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-size: 20px 20px;
}

/* Disabled State */
.select-wrapper select:disabled {
  background-color: #e9ecef;
  border-color: #ccc;
  color: #888;
  cursor: not-allowed;
  box-shadow: none;
}

/* Responsive tweak */
@media (max-width: 480px) {
  .filter-dropdown {
    max-width: 100%;
  }
  .select-wrapper select {
    font-size: 0.9rem;
    padding: 10px 36px 10px 14px;
  }
}


/* ======================
   TOOLS GRID & CARDS
   ====================== */

.tools-grid-section {
  margin-bottom: 60px;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 2.5rem;
  color: #1f2937;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, #6366f1 0%, #4f46e5 100%);
  margin: 12px auto 0;
  border-radius: 2px;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.tool-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.tool-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.tool-icon {
  font-size: 2.5rem;
  margin-bottom: 10px;
  color: #0073aa;
}

.tool-card h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
  color: #222;
}

.tool-card p {
  font-size: 0.9rem;
  color: #666;
}

/* ======================
   PAGINATION & LOAD MORE
   ====================== */

.pagination-container {
  margin-top: 40px;
  text-align: center;
}

.pagination-container .page-numbers {
  display: inline-block;
  padding: 8px 16px;
  margin: 0 0.25rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  color: #0073aa;
  text-decoration: none;
  transition: background-color 0.3s, color 0.3s;
}

.pagination-container .page-numbers.current,
.pagination-container .page-numbers:hover {
  background-color: #0073aa;
  color: #fff;
  border-color: #0073aa;
}

.load-more-container {
  margin-top: 30px;
  text-align: center;
}

.load-more-button {
  padding: 12px 24px;
  background: linear-gradient(90deg, #6366f1 0%, #4f46e5 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.load-more-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* ======================
   CTA SECTION
   ====================== */

.cta-section {
  text-align: center;
  padding: 80px 20px;
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  color: #fff;
  border-radius: 12px;
  margin-top: 60px;
}

.cta-content {
  max-width: 700px;
  margin: 0 auto;
}

.cta-title {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

.cta-description {
  font-size: 1.2rem;
  margin-bottom: 2.5rem;
  opacity: 0.9;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.cta-button {
  padding: 14px 32px;
  background-color: #fff;
  color: #4f46e5;
  text-decoration: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

.button-arrow {
  font-size: 1.2rem;
}

/* ======================
   NO TOOLS FOUND
   ====================== */

.no-tools-found-container {
  text-align: center;
  padding: 40px;
  background-color: #f8fafc;
  border-radius: 12px;
  margin-top: 40px;
}

.no-tools-found {
  font-size: 1.2rem;
  color: #6b7280;
  font-style: italic;
}

/* ======================
   HEADER & NAVIGATION
   ====================== */

.site-header {
  background: #fff;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: background 0.3s ease;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.site-branding .logo-link {
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: 700;
  color: #333;
  border-bottom: 2px solid #1e90ff;
}

.main-navigation .menu {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-navigation .menu li a {
  color: #333;
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem;
  transition: color 0.3s ease;
}

.main-navigation .menu li a:hover {
  color: #1e90ff;
}

.header-actions {
  display: flex;
  gap: 1rem;
}

.icon-button {
  background: none;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  color: #333;
  transition: color 0.3s;
}

.icon-button:hover {
  color: #1e90ff;
}

.search-form-container {
  background: #f9f9f9;
  padding: 1rem;
  border-top: 1px solid #ddd;
}

.search-form {
  display: flex;
  justify-content: center;
  align-items: center;
}

.search-input {
  width: 100%;
  max-width: 300px;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 1rem;
}

.search-button {
  background: #1e90ff;
  color: #fff;
  border: none;
  margin-left: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
}

.search-button:hover {
  background: #187bcd;
}

/* ======================
   FOOTER
   ====================== */

.footer-top {
  margin-bottom: 2rem;
}

.footer-widgets-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.footer-widgets-primary,
.footer-widgets-secondary,
.footer-widgets-tertiary,
.footer-widgets-quaternary {
  margin-bottom: 1.5rem;
  color: var(--color-text, #333);
}

.footer-widgets-placeholder {
  font-size: 0.9rem;
  color: var(--color-text-light, #999);
  padding: 1rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

.footer-widgets-wrapper a {
  color: var(--color-text, #333);
  transition: color 0.3s ease;
}

.footer-widgets-wrapper a:hover {
  color: var(--primary-color, #6366f1);
}

.footer-bottom-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 0;
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.footer-navigation-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-top: 1rem;
}

.footer-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-menu a {
  color: #ccc;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.footer-menu a:hover {
  color: #fff;
}

/* Dark Mode Footer */
body.dark-mode .footer-widgets-wrapper,
body.dark-mode .footer-bottom-content,
body.dark-mode .footer-navigation-wrapper {
  background-color: #1e1e1e;
  color: #fff;
}

body.dark-mode .footer-widgets-wrapper a,
body.dark-mode .footer-menu a,
body.dark-mode .footer-meta a {
  color: #adb5bd;
}

body.dark-mode .footer-widgets-wrapper a:hover,
body.dark-mode .footer-menu a:hover,
body.dark-mode .footer-meta a:hover {
  color: #4dabf7;
}

body.dark-mode .footer-meta {
  color: #ced4da;
}

/* ======================
   RESPONSIVE ADJUSTMENTS
   ====================== */

@media (max-width: 992px) {
  .footer-widgets-wrapper {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.2rem;
  }
  .hero-subtitle {
    font-size: 1.1rem;
  }
  .section-title {
    font-size: 1.8rem;
  }
  .cta-title {
    font-size: 2rem;
  }
  .cta-description {
    font-size: 1rem;
  }
  .main-navigation {
    display: none;
  }
  .mobile-menu-toggle {
    display: block;
  }
  .main-navigation.active {
    display: flex;
    flex-direction: column;
  }
}

@media (max-width: 576px) {
  .footer-widgets-wrapper {
    grid-template-columns: 1fr;
  }
  .footer-navigation-wrapper {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
  }
  .footer-menu {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.8rem;
  }
  .hero-subtitle {
    font-size: 1rem;
  }
  .search-input {
    padding: 14px 20px 14px 45px;
  }
  .pagination-container .page-numbers {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
  }
}

/* ======================
   TOOL SINGLE PAGE
   ====================== */

.tool-single {
  padding: 0;
  color: inherit;
  font-family: inherit;
}

.entry-header {
  margin-bottom: 2.5rem;
  padding: 2.5rem 0;
  border-bottom: 1px solid #ddd;
}

.entry-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.entry-title {
  margin: 0;
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--primary-color, #222);
}

.tool-wrapper {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  width: 100%;
  max-width: 100%;
}

.tool-form-section,
.tool-seo-section,
.related-tools-section {
  width: 100%;
}

.tool-form-container {
  background: #fff;
  padding: 2.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  transition: box-shadow 0.3s ease;
  width: 100%;
}

.tool-form-container:hover {
  box-shadow: 0 6px 30px rgba(0,0,0,0.12);
}

.tool-seo-text {
  line-height: 1.75;
  color: #555;
  padding: 0 1.25rem;
  font-size: 1rem;
  background: #fafafa;
  border-radius: 8px;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.02);
  margin: 0;
}

/* Responsive Tool Wrapper */
@media (min-width: 800px) {
  .tool-wrapper {
    flex-direction: row;
    gap: 2rem;
  }
  .tool-form-section {
    flex: 2;
  }
  .tool-seo-section,
  .related-tools-section {
    flex: 1;
  }
  .entry-header .container {
    flex-wrap: nowrap;
  }
  .tool-seo-text {
    padding: 0;
  }
}

/* Dark mode for tool form */
body.dark-mode .tool-form-container {
  background: #1e1e1e;
  color: #f0f0f0;
}
body.dark-mode .tool-seo-text {
  background: #121212;
  color: #ccc;
}

/* ======================
   SOCIAL ICONS
   ====================== */

.social-icons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  padding: 1rem 0;
}

.social-icons a {
  color: #ccc;
  font-size: 1.2rem;
  transition: color 0.3s;
}

.social-icons a:hover {
  color: var(--color-accent, #6366f1);
}

/* ======================
   MOBILE MENU TOGGLE
   ====================== */

.mobile-menu-toggle {
  display: none;
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: block;
  }
}

