/**
 * PDFHub - Main Stylesheet
 * Mobile-first design for all internal pages and components.
 */

/* Navigation Components */
.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  text-decoration: none;
  color: var(--color-text);
  font-weight: 600;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--color-primary);
}

.theme-toggle {
  background: none;
  border: none;
  color: var(--color-text);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.theme-toggle:hover {
  background: var(--color-surface);
}

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--color-text);
}

/* Tool Categories Tabs */
.tool-tabs {
  display: flex;
  gap: 2rem;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 2rem;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}

.tool-tab {
  padding: 1rem 0;
  font-weight: 700;
  color: var(--color-text-muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
}

.tool-tab.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

/* Live Search Bar */
.search-box {
  position: relative;
  margin-bottom: 3rem;
}

.search-input {
  width: 100%;
  padding: 1rem 1.5rem 1rem 3.5rem;
  font-size: var(--font-lg);
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
  color: var(--color-text);
  transition: border-color 0.2s;
}

.search-input:focus {
  outline: none;
  border-color: var(--color-primary);
}

.search-icon {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
}

/* Tool Grid & Cards */
.tool-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(1, 1fr);
}

@media (min-width: 480px) { .tool-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px) { .tool-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1280px) { .tool-grid { grid-template-columns: repeat(4, 1fr); } }

.tool-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

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

.tool-card__icon {
  font-size: 2.5rem;
  display: flex;
}

.tool-card__title {
  font-weight: 800;
  font-size: var(--font-lg);
  color: var(--color-text);
}

.tool-card__desc {
  color: var(--color-text-muted);
  font-size: var(--font-sm);
  line-height: 1.4;
}

.tool-card__stats {
  margin-top: auto;
  font-size: var(--font-xs);
  color: var(--color-text-muted);
  font-weight: 600;
}

/* How It Works Section */
.how-it-works {
  padding: 5rem 0;
}

.steps-grid {
  display: grid;
  gap: 3rem;
  margin-top: 3rem;
}

@media (min-width: 768px) { .steps-grid { grid-template-columns: repeat(3, 1fr); } }

.step {
  text-align: center;
}

.step__icon {
  width: 80px;
  height: 80px;
  background: var(--color-primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 2rem;
  font-weight: 800;
}

/* Features Grid */
.features-section {
  padding: 5rem 0;
  background: var(--color-surface);
}

.features-grid {
  display: grid;
  gap: 2rem;
  margin-top: 3rem;
}

@media (min-width: 480px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px) { .features-grid { grid-template-columns: repeat(3, 1fr); } }

.feature {
  padding: 2rem;
  background: var(--color-bg);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}

/* FAQ Accordion (CSS Only) */
.faq-section {
  padding: 5rem 0;
}

.faq-item {
  border-bottom: 1px solid var(--color-border);
}

.faq-trigger {
  display: none;
}

.faq-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 0;
  cursor: pointer;
  font-weight: 700;
  font-size: var(--font-lg);
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
  color: var(--color-text-muted);
}

.faq-trigger:checked ~ .faq-content {
  max-height: 500px;
  padding-bottom: 1.5rem;
}

/* Footer */
.footer {
  padding: 5rem 0 2rem;
  border-top: 1px solid var(--color-border);
  background: var(--color-bg);
}

.footer-grid {
  display: grid;
  gap: 3rem;
  margin-bottom: 4rem;
}

@media (min-width: 480px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(4, 1fr); } }

.footer-col h4 {
  margin-bottom: 1.5rem;
  font-weight: 800;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  text-decoration: none;
  color: var(--color-text-muted);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--color-primary);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
  font-size: var(--font-sm);
  color: var(--color-text-muted);
}

/* Mobile Nav Overlay */
@media (max-width: 767px) {
  .nav-links {
    display: none;
  }
  
  .hamburger {
    display: block;
  }
  
  .mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-bg);
    z-index: 2000;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
  }
  
  .mobile-menu.active {
    transform: translateX(0);
  }
  
  .mobile-menu .close-menu {
    align-self: flex-end;
    font-size: 2rem;
    cursor: pointer;
  }
}

/* Utility Classes */
.text-center { text-align: center; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-4 { margin-top: 2rem; }
