/* Non-critical CSS - Loaded after page render */

/* ====== Base Styles ====== */
:root {
  /* Tool Colors */
  --tool-compress: #4338ca;
  --tool-merge: #7c3aed;
  --tool-split: #db2777;
  --tool-convert: #0d9488;
  
  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  
  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 1rem;
  
  /* Transitions */
  --transition: all 0.2s ease-in-out;
}

/* ====== Components ====== */
/* Header & Navigation */
.main-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #4338ca;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 0;
  color: white;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.main-header a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  transition: color 0.2s ease;
}

.main-header a:hover {
  color: white;
  text-decoration: none;
}

.footer-bottom a {
  color: #93c5fd;
  text-decoration: none;
  transition: all 0.2s ease;
}

.footer-bottom a:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* Footer Links */
.footer-section a {
  color: #e5e7eb;
  text-decoration: none;
  transition: all 0.2s ease;
  display: inline-block;
  padding: 0.25rem 0;
  font-size: 0.95rem;
}

.footer-section a:hover {
  color: #60a5fa;
  text-decoration: none;
  transform: translateX(3px);
}

.changelog-link {
  color: #93c5fd;
  text-decoration: none;
  transition: all 0.2s ease;
}

.changelog-link:hover {
  color: #ffffff;
  text-decoration: underline;
}

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

.header-content {
  display: flex;
  align-items: center;
  height: 70px;
  position: relative;
}

/* Logo */
.logo img {
  height: 60px;
  width: auto;
  display: block;
  transition: transform 0.2s ease;
}

.logo img:hover {
  transform: scale(1.03);
}

/* Main Navigation */
.main-nav {
  display: flex;
  align-items: center;
  margin-left: auto;
}

.main-nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}

.main-nav li {
  margin: 0;
  position: relative;
}

.main-nav > ul > li > a {
  display: block;
  padding: 1.5rem 1.2rem;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.9);
  transition: all 0.2s ease;
  position: relative;
  text-transform: uppercase;
  height: 100%;
  display: flex;
  align-items: center;
}

.main-nav > ul > li > a:hover,
.main-nav > ul > li > a.active {
  color: white;
  background-color: rgba(0, 0, 0, 0.1);
}

/* Active indicator - Removed yellow line */

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 4px;
  padding: 0.75rem;
  cursor: pointer;
  z-index: 1001;
  color: white;
  font-size: 1.5rem;
  line-height: 1;
  transition: background-color 0.2s ease;
  margin-left: 1rem;
}

.mobile-menu-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
}

.menu-icon {
  display: block;
  width: 24px;
  height: 2px;
  background-color: white;
  position: relative;
  transition: all 0.3s ease;
}

.menu-icon::before,
.menu-icon::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  background-color: white;
  left: 0;
  transition: all 0.3s ease;
  transform-origin: center;
}

.menu-icon::before {
  top: -8px;
  width: 20px;
  right: 0;
  left: auto;
}

.menu-icon::after {
  bottom: -8px;
  width: 16px;
  right: 0;
  left: auto;
}

.mobile-menu-toggle[aria-expanded="true"] .menu-icon {
  background-color: transparent;
}

.mobile-menu-toggle[aria-expanded="true"] .menu-icon::before {
  width: 24px;
  transform: translateY(8px) rotate(45deg);
}

.mobile-menu-toggle[aria-expanded="true"] .menu-icon::after {
  width: 24px;
  transform: translateY(-8px) rotate(-45deg);
}

/* Language Switcher */
.lang-switch {
  display: flex;
  margin-left: 1.5rem;
  margin-right: 0.5rem;
  height: 100%;
  align-items: center;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  padding-left: 1rem;
}

.lang-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.8rem;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
  font-size: 0.85rem;
  transition: all 0.2s ease;
  position: relative;
  height: 100%;
  border-radius: 4px;
}

.lang-pill:first-child {
  margin-right: 0.25rem;
}

.lang-pill:hover,
.lang-pill.active {
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

.lang-pill.active {
  font-weight: 600;
}

.lang-pill .flag {
  margin-right: 0.4rem;
  font-size: 1.1em;
  opacity: 0.9;
}

.lang-pill.active .flag {
  opacity: 1;
}

/* Hero Section */
.hero-section {
  text-align: center;
  padding: 4rem 0;
}

.hero-section h1 {
  font-size: 3rem;
  font-weight: 800;
  color: #111827;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero-section p {
  font-size: 1.5rem;
  color: #4b5563;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Dark mode adjustments for key benefits */
@media (prefers-color-scheme: dark) {
  .key-benefits-row span {
    background: linear-gradient(135deg, rgba(30, 42, 90, 0.9) 0%, rgba(23, 37, 84, 0.95) 100%);
    color: #e0f2fe;
    border: 1px solid rgba(59, 130, 246, 0.2);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.1);
  }
  
  .key-benefits-row span:hover {
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.9) 0%, rgba(23, 52, 133, 0.95) 100%);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 8px 15px -3px rgba(0, 0, 0, 0.25), 0 4px 6px -2px rgba(0, 0, 0, 0.1);
  }
}

/* Key benefits row */
.key-benefits-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: center;
  margin: 0.5rem 0 2.5rem;
  padding: 0 1.5rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* Key Benefits Pills */
.key-benefits-row span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.5rem;
  background: linear-gradient(135deg, #f0f4ff 0%, #e6f0ff 100%);
  color: #1d4ed8;
  border-radius: 2.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(29, 78, 216, 0.1);
  box-shadow: 0 2px 8px -1px rgba(0, 0, 0, 0.08);
  line-height: 1.3;
  letter-spacing: 0.01em;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.key-benefits-row span:hover {
  background: linear-gradient(135deg, #e0e9ff 0%, #d6e4ff 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px -2px rgba(29, 78, 216, 0.15);
  border-color: rgba(29, 78, 216, 0.15);
}

/* Footer */
.main-footer {
  background: linear-gradient(135deg, #1e1b4b 0%, #1e1e40 100%);
  color: white;
  padding: 4rem 0 2rem;
  margin-top: 4rem;
  position: relative;
  overflow: hidden;
}

.main-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #4f46e5, #7c3aed, #db2777, #0d9488);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  padding: 0 1rem;
}

.footer-section h3 {
  color: white;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

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

.footer-links a {
  color: var(--gray-300);
  text-decoration: none;
  transition: var(--transition);
}

.footer-links a:hover {
  color: white;
  text-decoration: underline;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  margin-top: 2rem;
  border-top: 1px solid var(--gray-800);
  color: var(--gray-400);
  font-size: 0.9rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Tool Cards */
.tool-card {
  background: white;
  border-radius: var(--radius-md);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Tool card gradients using ::before for better compatibility */
.tool-card {
  position: relative;
  overflow: hidden;
  color: #fff;
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  transition: all 0.3s ease;
}

.tool-card--compress::before { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.tool-card--merge::before { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.tool-card--split::before { background: linear-gradient(135deg, #10b981, #059669); }
.tool-card--outline::before { background: linear-gradient(135deg, #f87171, #ef4444); }
.tool-card--pdftojpg::before { background: linear-gradient(135deg, #f97316, #ea580c); }
.tool-card--jpgtopdf::before,
.tool-card--imagetopdf::before { background: linear-gradient(135deg, #a855f7, #9333ea); }
.tool-card--pdftoword::before { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.tool-card--unlock::before { background: linear-gradient(135deg, #0ea5e9, #0284c7); }
.tool-card--ocr::before { background: linear-gradient(135deg, #06b6d4, #0891b2); }

/* Ensure inner content sits above gradient and remains legible */
.tool-card .tool-card__inner {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.tool-card .tool-card__content h3,
.tool-card .tool-card__content p {
  color: #fff;
  position: relative;
  z-index: 1;
}

.tool-card .tool-card__icon {
  position: relative;
  z-index: 1;
  color: #fff;
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 64px;
  width: 64px;
  margin: 0 auto 1rem;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transition: all 0.3s ease;
}

.tool-card:hover .tool-card__icon {
  transform: scale(1.1) translateY(-3px);
  background: rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Hover effects */
.tool-card:hover::before {
  transform: scale(1.05);
  opacity: 0.9;
}

/* Header Styles */
.header-inner {
  display: flex;
  align-items: center;
  padding: 1rem 0;
}

.site-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  margin-right: 2rem;
}

.site-logo img {
  height: 50px;
  width: auto;
  transition: transform 0.3s ease;
}

.site-logo:hover img {
  transform: scale(1.05);
}

.main-nav {
  flex-grow: 1;
}

.main-nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 1.5rem;
}

.main-nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
  transition: color 0.2s ease;
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: #fff;
  transition: width 0.3s ease;
}

.main-nav a:hover {
  color: rgba(255, 255, 255, 0.9);
}

.main-nav a:hover::after {
  width: 100%;
}

/* Mobile Navigation */
@media (max-width: 1024px) {
  .mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .main-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 380px;
    height: 100vh;
    background: #4338ca;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 5.5rem 1.5rem 2rem;
    z-index: 1000;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .main-nav.active {
    right: 0;
  }
  
  .main-nav ul {
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.5rem 0;
  }
  
  .main-nav li {
    margin: 0;
  }
  
  .main-nav > ul > li > a {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin: 0.25rem 0;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    transition: all 0.2s ease;
    text-transform: none;
    height: auto;
  }
  
  .main-nav a::after {
    display: none;
  }
  
  .main-nav a:hover,
  .main-nav a.active {
    background: rgba(255, 255, 255, 0.12);
    color: white;
    transform: translateX(4px);
  }
  
  .main-nav a.active {
    font-weight: 600;
    background: rgba(255, 255, 255, 0.08);
  }

  .main-nav ul {
    flex-direction: column;
  }

  .main-nav li {
    margin: 0.5rem 0;
  }

  .main-nav a {
    display: block;
    padding: 0.75rem 1rem;
  }

  /* Overlay when mobile menu is open */
  .nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
  }

  .nav-overlay.active {
    opacity: 1;
    visibility: visible;
  }
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fade-in {
  animation: fadeIn 0.3s ease-out;
}

/* Responsive styles */
@media (max-width: 1024px) {
  .tool-card {
    margin-bottom: 1.5rem;
  }
  
  .main-footer {
    padding: 2rem 0;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .lang-switch {
    position: static;
    margin: 1rem 0 0;
    justify-content: flex-start;
  }
}

/* Print styles */
@media print {
  .no-print {
    display: none !important;
  }
  
  .main-header,
  .main-footer {
    display: none;
  }
  
  body {
    padding: 0;
    background: white;
    color: black;
  }
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Focus styles for better keyboard navigation */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Skip to main content link */
.skip-to-content {
  position: absolute;
  left: -9999px;
  z-index: 999;
  padding: 1em;
  background-color: var(--primary);
  color: white;
  opacity: 0;
}

.skip-to-content:focus {
  left: 50%;
  transform: translateX(-50%);
  opacity: 1;
}
