/* Toolswa - Multi-Tools Website - Global Stylesheet
   Theme: Purple (#6C3CE9) inspired by modern high-productivity SaaS (iLovePDF)
*/

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --primary: #6C3CE9;
  --primary-hover: #5628D8;
  --primary-light: #F3EEFF;
  --primary-light-hover: #E9DEFF;
  --text-main: #24292F;
  --text-muted: #656D76;
  --text-light: #8C959F;
  --bg-main: #FFFFFF;
  --bg-subtle: #F8F9FA;
  --bg-card: #FFFFFF;
  --border-color: #E1E4E8;
  --border-hover: #D0D7DE;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(108, 60, 233, 0.08);
  --shadow-lg: 0 12px 30px rgba(108, 60, 233, 0.12);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --container-max: 1240px;
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark Mode Variables */
html.dark {
  --text-main: #F0F6FC;
  --text-muted: #9BA3AF;
  --text-light: #6E7681;
  --bg-main: #0D1117;
  --bg-subtle: #161B22;
  --bg-card: #161B22;
  --border-color: #30363D;
  --border-hover: #484F58;
  --primary-light: #281D45;
  --primary-light-hover: #372763;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.6);
}

/* Base Reset & Typography */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.2s ease, color 0.2s ease;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  outline: none;
  transition: var(--transition);
}

input, textarea, select {
  font-family: inherit;
  outline: none;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

/* ------------------- HEADER ------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--bg-main);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 32px;
}

/* Brand Zone */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 22px;
  color: var(--primary);
  white-space: nowrap;
  flex-shrink: 0;
}

.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 2px 8px rgba(108, 60, 233, 0.35);
}

.brand-name {
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.brand-name span {
  color: var(--primary);
}

/* Nav Zone */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-link {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  padding: 8px 0;
  position: relative;
}

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

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--primary);
  border-radius: 2px;
}

/* Action Zone */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.btn-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.btn-icon:hover {
  color: var(--primary);
  background: var(--primary-light);
  border-color: var(--primary-light);
}

.lang-switch {
  font-size: 13px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.lang-switch:hover {
  color: var(--primary);
  background: var(--primary-light);
}

.btn-zip-download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background-color: var(--primary);
  color: white;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(108, 60, 233, 0.25);
}

.btn-zip-download:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(108, 60, 233, 0.35);
}

.mobile-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
}

/* ------------------- HERO SECTION ------------------- */
.hero-section {
  padding: 64px 0 40px;
  text-align: center;
  background: radial-gradient(circle at 50% 0%, var(--primary-light) 0%, transparent 70%);
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 20px;
}

.hero-pill-badge {
  background: var(--primary-light);
  border: 1px solid rgba(108, 60, 233, 0.2);
  padding: 4px 12px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hero-title {
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.03em;
  color: var(--text-main);
  max-width: 820px;
  margin: 0 auto 18px;
  text-wrap: balance;
}

.hero-title span {
  color: var(--primary);
}

.hero-subtitle {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 36px;
  text-wrap: balance;
}

/* Search Bar */
.search-wrapper {
  max-width: 620px;
  margin: 0 auto 32px;
  position: relative;
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 8px 16px;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(108, 60, 233, 0.15);
}

.search-icon {
  color: var(--text-light);
  margin-right: 12px;
  flex-shrink: 0;
}

.search-input {
  width: 100%;
  border: none;
  background: transparent;
  font-size: 16px;
  color: var(--text-main);
  padding: 8px 0;
}

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

.search-clear {
  color: var(--text-light);
  padding: 4px;
  display: none;
}

.search-clear:hover {
  color: var(--text-main);
}

/* Category Filter Tabs */
.category-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.category-tab {
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.category-tab:hover {
  color: var(--primary);
  border-color: var(--primary);
}

.category-tab.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(108, 60, 233, 0.3);
}

/* ------------------- TOOLS GRID ------------------- */
.tools-section {
  padding: 24px 0 64px;
}

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

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}

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

.tool-card-icon {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 26px;
  flex-shrink: 0;
  transition: var(--transition);
}

.tool-card:hover .tool-card-icon {
  transform: scale(1.08);
}

/* Distinct Tool Icon Colors */
.icon-pdf-merge { background: #FEECEB; color: #E53935; }
.icon-pdf-compress { background: #EDF7ED; color: #2E7D32; }
.icon-pdf-split { background: #FFF4E5; color: #ED6C02; }
.icon-img-compress { background: #E8F4FD; color: #0288D1; }
.icon-img-resize { background: #F3E5F5; color: #7B1FA2; }
.icon-qr { background: #F3EEFF; color: #6C3CE9; }
.icon-word { background: #E0F2F1; color: #00897B; }
.icon-gst { background: #FFF8E1; color: #F57F17; }

.tool-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--bg-subtle);
  color: var(--text-light);
  border: 1px solid var(--border-color);
}

.tool-card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tool-card-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 20px;
  flex-grow: 1;
}

.tool-card-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--primary);
  border-top: 1px solid var(--border-color);
  padding-top: 14px;
}

.tool-card-cta svg {
  transition: transform 0.2s ease;
}

.tool-card:hover .tool-card-cta svg {
  transform: translateX(4px);
}

/* Empty Search Results */
.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  display: none;
}

.no-results svg {
  color: var(--text-light);
  margin-bottom: 16px;
}

.no-results h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 6px;
}

.no-results p {
  color: var(--text-muted);
  font-size: 15px;
}

/* ------------------- DEPLOYMENT BANNER ------------------- */
.hosting-banner {
  background: linear-gradient(135deg, #6C3CE9 0%, #481DB5 100%);
  border-radius: var(--radius-xl);
  padding: 40px 48px;
  margin: 20px 0 60px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  box-shadow: 0 16px 36px rgba(108, 60, 233, 0.25);
  position: relative;
  overflow: hidden;
}

.hosting-banner::after {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.hosting-content {
  max-width: 650px;
  position: relative;
  z-index: 1;
}

.hosting-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.2);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}

.hosting-title {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 10px;
}

.hosting-desc {
  font-size: 15px;
  opacity: 0.9;
  line-height: 1.6;
}

.hosting-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.btn-white {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: white;
  color: var(--primary);
  font-weight: 700;
  font-size: 15px;
  padding: 14px 24px;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  white-space: nowrap;
}

.btn-white:hover {
  background: #F3EEFF;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.btn-outline-white {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.5);
  font-weight: 600;
  font-size: 14px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
}

.btn-outline-white:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: white;
}

/* ------------------- WHY CHOOSE US ------------------- */
.why-section {
  padding: 64px 0;
  background-color: var(--bg-subtle);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 48px;
}

.section-kicker {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin-bottom: 8px;
}

.section-title {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
  margin-bottom: 12px;
}

.section-subtitle {
  font-size: 16px;
  color: var(--text-muted);
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 28px;
}

.why-card {
  background: var(--bg-card);
  padding: 32px 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  text-align: left;
}

.why-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.why-card h4 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-main);
}

.why-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ------------------- HOW IT WORKS ------------------- */
.steps-section {
  padding: 72px 0;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  position: relative;
}

.step-card {
  text-align: center;
  padding: 24px;
  position: relative;
}

.step-number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-weight: 800;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 4px 12px rgba(108, 60, 233, 0.3);
}

.step-card h4 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-main);
}

.step-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ------------------- FAQ SECTION ------------------- */
.faq-section {
  padding: 64px 0 80px;
  background-color: var(--bg-subtle);
  border-top: 1px solid var(--border-color);
}

.faq-accordion {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
}

.faq-item.active {
  border-color: var(--primary);
}

.faq-question {
  width: 100%;
  padding: 20px 24px;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  background: transparent;
}

.faq-question:hover {
  color: var(--primary);
}

.faq-icon {
  color: var(--primary);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0, 1, 0, 1);
  padding: 0 24px;
  color: var(--text-muted);
  font-size: 14.5px;
  line-height: 1.6;
}

.faq-item.active .faq-answer {
  max-height: 500px;
  padding-bottom: 20px;
}

/* ------------------- FOOTER ------------------- */
.site-footer {
  background-color: var(--bg-main);
  border-top: 1px solid var(--border-color);
  padding: 60px 0 30px;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 14px;
  margin: 16px 0 20px;
  max-width: 340px;
  line-height: 1.6;
}

.footer-security-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.footer-security-pill svg {
  color: #2E7D32;
}

.footer-col h5 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 18px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  font-size: 14px;
  color: var(--text-muted);
}

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

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13.5px;
  color: var(--text-light);
}

.footer-bottom-links {
  display: flex;
  gap: 20px;
}

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

/* ------------------- MODAL (INSTALLATION GUIDE) ------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.open {
  display: flex;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  padding: 32px;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  color: var(--text-light);
  padding: 4px;
}

.modal-close:hover {
  color: var(--text-main);
}

.modal-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 10px;
}

.modal-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.guide-step {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}

.guide-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 800;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.guide-step-body h5 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.guide-step-body p {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.5;
}

.guide-step-body code {
  font-family: var(--font-mono);
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12.5px;
}

/* ------------------- RESPONSIVE BREAKPOINTS ------------------- */
@media (max-width: 992px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }
  .hosting-banner {
    flex-direction: column;
    text-align: center;
    padding: 32px 24px;
  }
  .hosting-actions {
    width: 100%;
  }
  .steps-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    flex-direction: column;
    padding: 24px;
    gap: 16px;
    align-items: flex-start;
    display: none;
    box-shadow: var(--shadow-lg);
  }
  .nav-menu.open {
    display: flex;
  }
  .mobile-toggle {
    display: flex;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .tools-grid {
    grid-template-columns: 1fr;
  }
  .btn-zip-download span {
    display: none;
  }
}
