/* Modern Tool Page Styles - Cohesive with Homepage */

:root {
  /* Color palette - matches homepage */
  --color-bg: #F3F5F7;
  --color-surface: #FFFFFF;
  --color-text: #1F2937;
  --color-text-secondary: #6B7280;
  --color-accent: #3B82F6;
  --color-accent-hover: #2563EB;
  --color-accent-light: #DBEAFE;
  --accent-pink: #EC4899;
  --accent-cyan: #06B6D4;
  --accent-purple: #8B5CF6;
  --border: #E5E7EB;
  --card-bg: #FFFFFF;
  --card-border: #E5E7EB;
  --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  --card-text: #1F2937;
  --card-text-secondary: #6B7280;
  --card-accent: #3B82F6;
  --card-accent-light: #DBEAFE;
  --card-accent-hover: #2563EB;
  --footer-bg: #E5E7EB;
  --footer-text: #1F2937;
  --footer-text-secondary: #9CA3AF;
  --footer-link: #3B82F6;
  --footer-link-hover: #2563EB;
  --footer-border: #D1D5DB;
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 8px 16px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 16px 32px rgba(0, 0, 0, 0.15);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #1E293B;
    --color-surface: #334155;
    --color-text: #F1F5F9;
    --color-text-secondary: #CBD5E1;
    --color-accent: #60A5FA;
    --color-accent-hover: #93C5FD;
    --color-accent-light: #1E3A5F;
    --border: #475569;
    --footer-bg: #1E293B;
    --footer-text: #F1F5F9;
    --footer-text-secondary: #94A3B8;
    --footer-link: #60A5FA;
    --footer-link-hover: #93C5FD;
    --footer-border: #475569;
  }
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Poppins, Inter, sans-serif;
  background: linear-gradient(180deg, var(--color-surface) 0%, var(--color-bg) 100%);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

/* Header */
header.header {
  background: var(--header-bg, #FFFFFF);
  border-bottom: 1px solid var(--header-border, #E5E7EB);
  padding: 14px 0;
  sticky: top;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-logo {
  font-size: 18px;
  font-weight: 600;
  color: var(--header-text, #1F2937);
  text-decoration: none;
  transition: all 0.3s ease;
  letter-spacing: -0.5px;
}

.header-logo:hover {
  color: var(--header-accent, #3B82F6);
}

.header-nav {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: nowrap;
}

.nav-link {
  color: var(--header-text, #1F2937);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
  border-radius: 4px;
  padding: 6px 0;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--header-link-hover, #2563EB);
}

.nav-link:focus {
  outline: 2px solid var(--header-accent, #3B82F6);
  outline-offset: 2px;
}

.lang-switch {
  background: var(--header-accent, #3B82F6);
  color: #FFFFFF;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s ease;
  align-self: center;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lang-switch:hover {
  background: var(--header-link-hover, #2563EB);
  transform: translateY(-1px);
}

.lang-switch:active {
  transform: translateY(0);
}

.lang-switch:focus {
  outline: 2px solid var(--header-accent, #3B82F6);
  outline-offset: 2px;
}

/* Responsive Header */
@media (max-width: 768px) {
  .header-nav {
    gap: 24px;
  }

  .nav-link {
    font-size: 0.85rem;
  }

  .lang-switch {
    padding: 6px 10px;
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .header-container {
    padding: 0 16px;
  }

  .header-logo {
    font-size: 14px;
  }

  .header-nav {
    gap: 24px;
  }

  .nav-link {
    font-size: 0.75rem;
  }

  .nav-link:not(.nav-home) {
    display: inline-block;
  }

  .lang-switch {
    padding: 5px 8px;
    font-size: 0.7rem;
  }
}


.lang button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  background: linear-gradient(135deg, var(--color-accent-hover), var(--accent-cyan));
}

.lang button:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.lang button:active {
  transform: translateY(0);
}

/* Main Content */
main {
  padding: 40px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.container {
  max-width: 800px;
  margin: 0 auto 40px;
}

.container > h1 {
  font-size: 2.5rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 30px;
  color: var(--color-text);
  background: linear-gradient(135deg, var(--color-accent), var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

/* Tool Box */
.box {
  background: var(--color-surface);
  padding: 40px;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  transition: var(--transition);
}

#desc {
  margin: 0 0 18px 0;
}

.box:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-2px);
}

/* Form Elements */
input[type="number"],
input[type="text"],
input[type="file"],
textarea,
select {
  width: 100%;
  padding: 14px 16px;
  margin: 12px 0;
  font-size: 1rem;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: var(--color-bg);
  color: var(--color-text);
  transition: var(--transition);
  font-family: inherit;
}

input[type="file"] {
  padding: 12px;
  cursor: pointer;
}

input[type="file"]::file-selector-button {
  padding: 10px 20px;
  background: var(--color-accent);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  margin-right: 12px;
  transition: var(--transition);
}

input[type="file"]::file-selector-button:hover {
  background: var(--color-accent-hover);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-light);
}

/* Buttons */
button {
  width: 100%;
  padding: 16px 24px;
  background: linear-gradient(135deg, var(--color-accent), var(--accent-cyan));
  color: white;
  border: none;
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  margin-top: 10px;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

button:active {
  transform: translateY(0);
}

button:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Results */
#status {
  margin-top: 20px;
  padding: 14px;
  background: var(--color-accent-light);
  border-radius: 10px;
  color: var(--color-text);
  font-weight: 600;
  text-align: center;
  display: none;
}

#status:not(:empty) {
  display: block;
}

#results,
.results {
  margin-top: 20px;
}

#results a,
.results a {
  display: inline-block;
  margin: 10px 0;
  padding: 14px 20px;
  background: var(--color-surface);
  color: var(--color-accent);
  text-decoration: none;
  border-radius: 10px;
  border: 2px solid var(--color-accent);
  font-weight: 600;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

#results a:hover,
.results a:hover {
  background: var(--color-accent);
  color: white;
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

.result {
  margin-top: 20px;
  padding: 20px;
  background: var(--color-accent-light);
  border-radius: 12px;
  border-left: 4px solid var(--color-accent);
  color: var(--color-text);
}

/* Editorial Content */
.editorial-content {
  max-width: 900px;
  margin: 60px auto 40px;
  padding: 40px;
  background: var(--color-surface);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  line-height: 1.8;
}

.editorial-content h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-top: 40px;
  margin-bottom: 16px;
  color: var(--color-accent);
  padding-bottom: 12px;
  border-bottom: 3px solid var(--color-accent-light);
}

.editorial-content h2:first-child {
  margin-top: 0;
}

.editorial-content h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-top: 24px;
  margin-bottom: 12px;
  color: var(--color-text);
}

.editorial-content p {
  margin-bottom: 16px;
  color: var(--color-text-secondary);
  font-size: 1.05rem;
}

.editorial-content ul {
  margin: 20px 0;
  padding-left: 20px;
}

.editorial-content li {
  margin: 12px 0;
  padding-left: 8px;
  color: var(--color-text-secondary);
  font-size: 1.05rem;
  position: relative;
}

.editorial-content li::marker {
  color: var(--color-accent);
  font-weight: bold;
}

.editorial-content > div {
  margin: 24px 0;
  padding: 20px;
  background: var(--color-bg);
  border-radius: 12px;
  border-left: 4px solid var(--color-accent);
  transition: var(--transition);
}

.editorial-content > div:hover {
  border-left-color: var(--accent-cyan);
  box-shadow: var(--shadow-sm);
}

.editorial-content > div h3 {
  margin-top: 0;
  color: var(--color-accent);
}

.editorial-content > div p {
  margin-bottom: 0;
  margin-left: 0;
}

/* Footer */
footer {
  margin-top: 80px;
  background: var(--footer-bg);
  border-top: 1px solid var(--footer-border);
  padding: 40px 20px;
  text-align: center;
}

footer > div {
  color: var(--footer-text-secondary);
  font-size: 0.95rem;
  max-width: 800px;
  margin: 0 auto;
}

footer a {
  color: var(--footer-link);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  padding: 8px 16px;
  border-radius: 6px;
  display: inline-block;
  margin: 4px 8px;
}

footer a:hover {
  color: var(--footer-link-hover);
  background: var(--color-accent-light);
}

footer a:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  main {
    padding: 20px 15px;
  }

  .container > h1 {
    font-size: 2rem;
  }

  .box {
    padding: 24px;
    border-radius: 12px;
  }

  .editorial-content {
    padding: 24px;
    margin: 40px auto 20px;
  }

  .editorial-content h2 {
    font-size: 1.5rem;
  }

  header {
    flex-wrap: wrap;
  }

  .header-nav {
    padding: 12px 15px;
    gap: 12px;
  }

  header h1 {
    font-size: 1.05rem;
  }

  .home-btn {
    width: 44px;
    height: 44px;
    font-size: 1.3em;
  }

  .lang {
    padding: 12px 15px;
  }

  .lang button {
    padding: 8px 0;
    font-size: 0.85rem;
    min-width: 56px;
    width: 56px;
  }
}

@media (max-width: 480px) {
  .container > h1 {
    font-size: 1.6rem;
  }

  .editorial-content {
    padding: 20px;
  }

  button {
    font-size: 1rem;
    padding: 14px 20px;
  }

  header h1 {
    font-size: 1rem;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --color-accent: #0056D6;
    --border: #000000;
  }
  
  button,
  input,
  select,
  textarea {
    border: 2px solid currentColor;
  }
}

/* Code and Content Styling */
code {
  background: var(--color-accent-light);
  color: #0369A1;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.9em;
  font-weight: 500;
}

@media (prefers-color-scheme: dark) {
  code {
    background: #1E40AF;
    color: #93C5FD;
  }
}

pre {
  background: #F8F9FA;
  border-left: 4px solid var(--color-accent);
  padding: 16px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 16px 0;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.9em;
  line-height: 1.5;
}

@media (prefers-color-scheme: dark) {
  pre {
    background: #1E293B;
    border-left-color: #60A5FA;
  }
}

pre code {
  background: transparent;
  color: inherit;
  padding: 0;
  border-radius: 0;
}

blockquote {
  border-left: 4px solid var(--accent-cyan);
  padding-left: 16px;
  margin: 16px 0;
  color: var(--color-text-secondary);
  font-style: italic;
  font-size: 0.95em;
}

ul, ol {
  margin: 16px 0;
  padding-left: 24px;
}

li {
  margin: 8px 0;
  line-height: 1.8;
}

strong {
  font-weight: 700;
  color: var(--color-text);
}

em {
  font-style: italic;
  color: var(--color-text-secondary);
}

a {
  color: var(--color-accent);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
  font-weight: 500;
}

a:hover {
  border-bottom-color: var(--color-accent);
}

a:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  background: var(--color-surface);
}

th {
  background: var(--color-accent-light);
  color: var(--color-text);
  padding: 12px;
  text-align: left;
  font-weight: 700;
}

td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
}

tr:hover {
  background: var(--color-bg);
}

/* Horizontal Rule */
hr {
  border: none;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
  margin: 32px 0;
}

/* Homepage Hero Section */
.hero {
  text-align: center;
  padding: 60px 20px 40px;
  background: linear-gradient(135deg, var(--color-accent-light) 0%, var(--color-bg) 100%);
  margin-bottom: 40px;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--color-text);
  letter-spacing: -0.03em;
}

.hero p {
  font-size: 1.2rem;
  color: var(--color-text-secondary);
  margin-bottom: 32px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.search-box {
  display: flex;
  gap: 8px;
  max-width: 500px;
  margin: 0 auto;
}

.search-box input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  color: var(--color-text);
  background: var(--color-surface);
  transition: var(--transition);
}

.search-box input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-box button {
  padding: 12px 20px;
  background: var(--color-accent);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.2rem;
  transition: var(--transition);
  flex-shrink: 0;
}

.search-box button:hover {
  background: var(--color-accent-hover);
  transform: translateY(-2px);
}

/* Categories Filter Section */
.categories {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 40px 20px;
  padding: 20px;
  background: var(--color-surface);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.category-btn {
  padding: 10px 18px;
  background: var(--color-surface);
  color: var(--color-text);
  border: 2px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  transition: var(--transition);
}

.category-btn:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: var(--color-accent-light);
}

.category-btn.active {
  background: var(--color-accent);
  color: white;
  border-color: var(--color-accent);
  box-shadow: var(--shadow-md);
}

/* Tools Container and Grid */
.tools-container {
  max-width: 1200px;
  margin: 40px auto;
  padding: 20px;
}

.tools-container h2 {
  color: var(--color-text);
  margin-bottom: 30px;
  text-align: center;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
  align-items: stretch;
}

/* Tool Card Styles */
.tool-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  background: var(--color-surface);
  border: 2px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.tool-card:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.tool-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  display: block;
}

.tool-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 8px;
}

.tool-desc {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  margin: 0;
  line-height: 1.4;
}

/* No Results Message */
.no-results {
  text-align: center;
  padding: 40px 20px;
  color: var(--color-text-secondary);
}

.no-results h2 {
  color: var(--color-text);
  margin-bottom: 10px;
}

/* Footer Styles */
footer.footer {
  margin-top: 40px;
  padding: 25px 0;
  text-align: center;
  font-size: 0.95rem;
  background: #E5E7EB;
  color: #1F2937;
  border-top: 1px solid #D1D5DB;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer-copyright {
  margin: 0 0 16px 0;
}

.footer-copyright p {
  margin: 0;
  color: #1F2937;
  font-weight: 500;
}

.footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-link {
  color: #3B82F6;
  text-decoration: none;
  transition: all 0.3s ease;
  font-weight: 500;
}

.footer-link:hover {
  color: #2563EB;
  text-decoration: underline;
}

.footer-link:focus {
  outline: 2px solid #3B82F6;
  outline-offset: 2px;
  border-radius: 4px;
}

.footer-separator {
  color: #9CA3AF;
  margin: 0 4px;
}

/* Responsive Footer */
@media (max-width: 768px) {
  footer.footer {
    padding: 20px 0;
    font-size: 0.9rem;
  }

  .footer-copyright p {
    font-size: 0.85rem;
  }

  .footer-links {
    gap: 8px;
  }

  .footer-separator {
    margin: 0 2px;
  }
}

@media (max-width: 480px) {
  footer.footer {
    padding: 16px 0;
  }

  .footer-copyright p {
    font-size: 0.8rem;
  }

  .footer-links {
    flex-direction: column;
    gap: 6px;
  }

  .footer-separator {
    display: none;
  }

  .footer-links a {
    display: block;
  }
}

/* Print styles */
@media print {
  header,
  footer,
  .lang,
  button {
    display: none;
  }

  body {
    background: white;
    color: black;
  }

  .box,
  .editorial-content {
    box-shadow: none;
    border: 1px solid #ccc;
  }
}

/* Responsive Design for Homepage and Tools */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .tools-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }

  .tool-card {
    padding: 16px;
  }

  .tool-icon {
    font-size: 2rem;
  }

  .tool-title {
    font-size: 0.95rem;
  }

  .search-box {
    flex-direction: column;
  }

  .search-box input {
    width: 100%;
  }

  .search-box button {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.5rem;
  }

  .hero p {
    font-size: 0.9rem;
  }

  .tools-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
  }

  .tool-card {
    padding: 12px;
  }

  .tool-icon {
    font-size: 1.8rem;
  }

  .tool-title {
    font-size: 0.85rem;
    margin-bottom: 6px;
  }

  .tool-desc {
    font-size: 0.75rem;
  }

  .hero-container {
    padding: 30px 16px;
  }

  .search-container {
    padding: 16px;
  }

  .editorial-container {
    padding: 20px 16px;
  }
}

/* Optimized Hero Container */
.hero-container {
  text-align: center;
  padding: 80px 20px 60px;
}

/* Search Section */
.search-section {
  background: var(--color-surface);
  padding: 40px 20px;
  border-bottom: 1px solid var(--border);
}

.search-container {
  max-width: 600px;
  margin: 0 auto;
}

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

.search-box input {
  flex: 1;
  padding: 14px 16px;
  padding-left: 44px;
  border: 2px solid var(--border);
  border-radius: 9999px;
  font-size: 1rem;
  color: var(--color-text);
  background: var(--color-surface);
  transition: var(--transition);
}

.search-box input::placeholder {
  color: var(--color-text-secondary);
}

.search-box input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-box .search-icon {
  position: absolute;
  left: 14px;
  color: var(--color-text-secondary);
  font-size: 1.2rem;
  pointer-events: none;
}

/* Tools Container Section */
.tools-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

/* Tool Card Styling */
.tool-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  box-shadow: var(--card-shadow);
  cursor: pointer;
  min-height: 140px;
  height: 100%;
}

.tool-card:hover {
  border-color: var(--card-accent);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.tool-icon {
  flex-shrink: 0;
  font-size: 24px;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--card-accent-light);
  color: var(--card-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

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

.tool-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--card-text);
  margin: 0 0 6px 0;
  line-height: 1.25;
}

.tool-desc {
  font-size: 14px;
  color: var(--card-text-secondary);
  margin: 0;
  line-height: 1.45;
}

@media (max-width: 900px) {
  .tools-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }
}

@media (max-width: 640px) {
  .tools-grid {
    grid-template-columns: 1fr;
  }

  .tool-card {
    padding: 18px;
  }

  .tool-icon {
    width: 48px;
    height: 48px;
    font-size: 22px;
  }

  .tool-title {
    font-size: 16px;
  }

  .tool-desc {
    font-size: 13px;
  }
}

/* No Results Message */
.no-results {
  text-align: center;
  padding: 60px 20px;
  background: var(--color-surface);
  border-radius: 12px;
  border: 2px dashed var(--border);
}

.no-results h2 {
  font-size: 1.5rem;
  color: var(--color-text);
  margin: 0 0 12px 0;
}

.no-results p {
  color: var(--color-text-secondary);
  margin: 0;
  font-size: 1rem;
}

/* Editorial Section */
.editorial-section {
  background: var(--color-surface);
  margin-top: 60px;
  padding: 60px 20px;
  border-top: 1px solid var(--border);
}

.editorial-container {
  max-width: 900px;
  margin: 0 auto;
  color: var(--color-text);
  line-height: 1.8;
}

.editorial-container h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--color-accent);
  letter-spacing: -0.02em;
}

.editorial-container h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-top: 30px;
  margin-bottom: 16px;
  color: var(--color-accent);
}

.editorial-container p {
  font-size: 1rem;
  margin-bottom: 20px;
  color: var(--color-text-secondary);
}

.editorial-container ul {
  margin: 20px 0;
  padding-left: 24px;
}

.editorial-container ul li {
  margin-bottom: 12px;
  color: var(--color-text);
  font-size: 1rem;
}

.seo-para {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 2px solid var(--border);
  color: var(--color-text-secondary);
  font-style: italic;
  font-size: 0.95rem;
  line-height: 1.8;
}

/* Search Results Info */
.search-results-info {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  margin-bottom: 24px;
}

#tool-count {
  font-weight: 700;
  color: var(--color-accent);
}

/* Print styles */
@media print {
  header,
  footer,
  .lang,
  button {
    display: none;
  }

  body {
    background: white;
    color: black;
  }

  .box,
  .editorial-content {
    box-shadow: none;
    border: 1px solid #ccc;
  }
}
