/* ==========================================================================
   Tool Page Specific Styles
   ========================================================================== */
.tool-page {
  padding-bottom: 4rem;
}

/* Tool Hero */
.tool-hero {
  background-color: var(--bg-secondary);
  padding: 3rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}

.tool-hero .breadcrumb {
  margin-bottom: 1.5rem;
}

.tool-hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--text);
}

.tool-hero-desc {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 800px;
}

/* Tool Layout */
.tool-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
}

@media (max-width: 992px) {
  .tool-layout {
    grid-template-columns: 1fr;
  }
}

/* Tool Interface Main Area */
.tool-interface {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  margin-bottom: 3rem;
  overflow: hidden;
}

.tool-input-section {
  padding: 2rem;
  border-bottom: 1px solid var(--border);
}

.tool-output-section {
  padding: 2rem;
  background-color: var(--surface-alt);
  min-height: 200px;
}

.tool-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  align-items: center;
}

/* Tool Sidebar */
.tool-sidebar {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.sidebar-widget {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.sidebar-widget-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.tool-meta {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.875rem;
}

.tool-meta-item {
  display: flex;
  justify-content: space-between;
  color: var(--text-secondary);
}

.tool-meta-value {
  font-weight: 600;
  color: var(--text);
}

/* Tool Content Below */
.tool-content {
  margin-top: 4rem;
}

.tool-content-section {
  margin-bottom: 3rem;
}

.tool-content-section h2 {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
}

.tool-content-section h3 {
  font-size: 1.25rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.tool-content-section ul, .tool-content-section ol {
  margin-bottom: 1.5rem;
}

.tool-content-section li {
  margin-bottom: 0.5rem;
}

/* Related Tools */
.related-tools-section {
  margin-top: 5rem;
  padding-top: 4rem;
  border-top: 1px solid var(--border);
}

.related-tools-header {
  text-align: center;
  margin-bottom: 3rem;
}

/* Input specific styling */
.url-input-group {
  display: flex;
  position: relative;
}

.url-input-group .form-control {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.url-input-group .btn {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

/* ==========================================================================
   Comprehensive Mobile Responsiveness Overrides
   ========================================================================== */
@media (max-width: 768px) {
  .tool-hero {
    padding: 2rem 1rem !important;
  }

  .tool-hero-title {
    font-size: 1.65rem !important;
    line-height: 1.25 !important;
  }

  .tool-hero-desc {
    font-size: 1rem !important;
  }

  .tool-input-section, 
  .tool-output-section {
    padding: 1.25rem 1rem !important;
  }

  .url-input-group {
    flex-direction: column !important;
    gap: 0.75rem !important;
  }

  .url-input-group .form-control,
  .url-input-group .btn {
    border-radius: var(--radius) !important;
    width: 100% !important;
  }

  .tool-actions {
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
  }

  .tool-actions .btn {
    flex: 1 1 calc(50% - 0.5rem) !important;
    font-size: 0.875rem !important;
    padding: 0.6rem 0.75rem !important;
    text-align: center !important;
    justify-content: center !important;
  }

  .tool-interface {
    border-radius: var(--radius) !important;
    margin-bottom: 1.5rem !important;
  }

  .grid-cols-4, 
  .grid-cols-3, 
  .grid-cols-2,
  .md\:grid-cols-4,
  .md\:grid-cols-3,
  .md\:grid-cols-2 {
    grid-template-columns: 1fr !important;
  }

  table {
    display: block !important;
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  pre, code {
    white-space: pre-wrap !important;
    word-break: break-word !important;
    overflow-x: auto !important;
    max-width: 100% !important;
  }

  .card, .sidebar-widget {
    padding: 1rem !important;
  }

  /* Prevent horizontal page sway on mobile */
  body, html, main, .tool-page, .container, .hero, .section, .footer, .site-header {
    overflow-x: hidden !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
}




