/* ==========================================================================
   PDFora - Professional Online PDF Tools
   Stylesheet inspired by modern SaaS & iLovePDF design language
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --primary: #F15B46;
  --primary-hover: #E04632;
  --primary-light: #FFF0ED;
  --primary-soft: rgba(241, 91, 70, 0.08);
  --dark: #292B35;
  --dark-heading: #1B1D25;
  --grey: #777985;
  --grey-light: #ECEEF2;
  --grey-border: #E2E4EC;
  --bg: #F6F6FA;
  --card-bg: #FFFFFF;
  --white: #FFFFFF;
  --green: #80B94E;
  --green-light: #F0FDF4;
  --blue: #4C80C4;
  --blue-light: #EFF6FF;
  --purple: #A96C9B;
  --purple-light: #FAF5FF;
  --orange: #F59E0B;
  --orange-light: #FEF3C7;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  
  --shadow-sm: 0 2px 6px rgba(41, 43, 53, 0.04);
  --shadow-md: 0 4px 20px rgba(41, 43, 53, 0.06);
  --shadow-lg: 0 12px 32px rgba(41, 43, 53, 0.09);
  --shadow-hover: 0 16px 36px rgba(241, 91, 70, 0.12);
  
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  --max-width: 1240px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg);
  color: var(--dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

img, svg {
  display: block;
  max-width: 100%;
}

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

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* ==========================================================================
   Header & Sticky Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--grey-border);
  transition: var(--transition);
}

.site-header.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-wrapper img, .logo-wrapper svg {
  height: 40px;
  width: auto;
}

.nav-menu {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 8px;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--dark);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

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

.nav-link svg.chevron {
  transition: transform 0.2s ease;
}

.nav-item:hover .nav-link svg.chevron {
  transform: rotate(180deg);
}

/* Dropdown Menu */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 260px;
  background-color: var(--white);
  border: 1px solid var(--grey-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 10px;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 100;
}

.nav-item:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--dark);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.dropdown-link:hover {
  background-color: var(--bg);
  color: var(--primary);
  padding-left: 18px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-toggle-btn {
  background: var(--bg);
  color: var(--dark);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid var(--grey-border);
}

.search-toggle-btn:hover {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: rgba(241, 91, 70, 0.3);
}

.btn-primary {
  background-color: var(--primary);
  color: var(--white);
  padding: 10px 22px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(241, 91, 70, 0.35);
  transition: var(--transition);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 6px 20px rgba(241, 91, 70, 0.45);
  transform: translateY(-2px);
  color: var(--white);
}

.btn-secondary {
  background-color: var(--white);
  color: var(--dark);
  padding: 10px 22px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  border: 1px solid var(--grey-border);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Hamburger toggle */
.hamburger-btn {
  display: none;
  background: none;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
}

.hamburger-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--dark);
  margin: 5px 0;
  transition: 0.3s;
  border-radius: 2px;
}

/* Mobile Drawer */
.mobile-nav-drawer {
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--white);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 999;
  overflow-y: auto;
  border-top: 1px solid var(--grey-border);
}

.mobile-nav-drawer.open {
  transform: translateX(0);
}

.mobile-nav-link {
  display: block;
  padding: 12px 16px;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--dark);
  border-radius: var(--radius-md);
}

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

/* Global Search Modal Overlay */
.search-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(41, 43, 53, 0.6);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 100px 20px 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}

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

.search-modal {
  background: var(--white);
  width: 100%;
  max-width: 620px;
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  animation: modalSlide 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlide {
  from { transform: translateY(-30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.search-modal-header {
  display: flex;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid var(--grey-border);
  gap: 14px;
}

.search-modal-input {
  flex: 1;
  font-size: 1.15rem;
  color: var(--dark);
}

.search-close-btn {
  background: none;
  cursor: pointer;
  color: var(--grey);
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-modal-results {
  max-height: 400px;
  overflow-y: auto;
  padding: 12px;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.search-result-item:hover {
  background: var(--bg);
}

.search-result-item .item-title {
  font-weight: 600;
  color: var(--dark);
}

.search-result-item .item-desc {
  font-size: 0.85rem;
  color: var(--grey);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  padding: 60px 0 40px;
  background: linear-gradient(180deg, #FFFFFF 0%, var(--bg) 100%);
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 48px;
}

.hero-content {
  max-width: 620px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 20px;
}

.hero-title {
  font-size: 3.25rem;
  font-weight: 900;
  color: var(--dark-heading);
  line-height: 1.15;
  margin-bottom: 20px;
  letter-spacing: -1px;
}

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

.hero-desc {
  font-size: 1.2rem;
  color: var(--grey);
  margin-bottom: 32px;
  line-height: 1.6;
}

.hero-search-box {
  display: flex;
  align-items: center;
  background: var(--white);
  border: 2px solid var(--grey-border);
  border-radius: 40px;
  padding: 6px 8px 6px 20px;
  box-shadow: var(--shadow-md);
  margin-bottom: 28px;
  transition: var(--transition);
}

.hero-search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 8px 28px rgba(241, 91, 70, 0.18);
}

.hero-search-input {
  flex: 1;
  padding: 10px 8px;
  font-size: 1.05rem;
  color: var(--dark);
}

.hero-search-btn {
  background: var(--primary);
  color: var(--white);
  padding: 12px 26px;
  border-radius: 30px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.hero-search-btn:hover {
  background: var(--primary-hover);
}

.hero-popular-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.chip-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--grey);
}

.tool-chip {
  background: var(--white);
  border: 1px solid var(--grey-border);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--dark);
  transition: var(--transition);
}

.tool-chip:hover {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
  transform: translateY(-2px);
}

.hero-illustration-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.hero-illustration-wrapper img {
  width: 100%;
  max-width: 520px;
  height: auto;
  filter: drop-shadow(0 15px 35px rgba(0, 0, 0, 0.08));
  animation: floatIllustration 6s ease-in-out infinite;
}

@keyframes floatIllustration {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ==========================================================================
   Tool Cards Grid (Responsive 5 Desktop / 3 Tablet / 2 Mobile)
   ========================================================================== */
.section {
  padding: 64px 0;
}

.section-bg-white {
  background-color: var(--white);
}

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

.section-tag {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.section-title {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--dark-heading);
  letter-spacing: -0.5px;
  margin-bottom: 14px;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--grey);
}

/* The strict responsive grid: 5 on desktop, 3 on tablet, 2 on mobile */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}

.tool-card {
  background: var(--card-bg);
  border: 1px solid var(--grey-border);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  position: relative;
  text-decoration: none;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  height: 100%;
}

.tool-card:hover {
  transform: translateY(-6px);
  border-color: rgba(241, 91, 70, 0.4);
  box-shadow: var(--shadow-hover);
}

.tool-icon-wrapper {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  transition: transform 0.3s ease;
}

.tool-card:hover .tool-icon-wrapper {
  transform: scale(1.08) rotate(2deg);
}

/* Specific icon background colors based on category */
.icon-red { background: #FFE8E5; color: #F15B46; }
.icon-green { background: #EDF7E6; color: #80B94E; }
.icon-blue { background: #E8F0FA; color: #4C80C4; }
.icon-purple { background: #F6EDF5; color: #A96C9B; }
.icon-orange { background: #FEF3C7; color: #D97706; }
.icon-cyan { background: #E0F2FE; color: #0284C7; }

.tool-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 8px;
  line-height: 1.3;
}

.tool-desc {
  font-size: 0.88rem;
  color: var(--grey);
  line-height: 1.5;
  margin-bottom: 16px;
  flex-grow: 1;
}

.tool-badge-pill {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--bg);
  color: var(--grey);
}

/* ==========================================================================
   Category Filter Tabs (Tools Page & Index)
   ========================================================================== */
.filter-tabs-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 36px;
}

.filter-tab-btn {
  padding: 10px 20px;
  border-radius: 30px;
  background: var(--white);
  border: 1px solid var(--grey-border);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--dark);
  cursor: pointer;
  transition: var(--transition);
}

.filter-tab-btn:hover, .filter-tab-btn.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(241, 91, 70, 0.28);
}

/* ==========================================================================
   How It Works (3 Steps)
   ========================================================================== */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  position: relative;
}

.step-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--grey-border);
  padding: 36px 28px;
  text-align: center;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

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

.step-number-badge {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  font-size: 1.4rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 6px 16px rgba(241, 91, 70, 0.3);
}

.step-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 12px;
}

.step-desc {
  font-size: 0.95rem;
  color: var(--grey);
}

/* ==========================================================================
   Why Choose PDFora (6 Features)
   ========================================================================== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--white);
  border: 1px solid var(--grey-border);
  border-radius: var(--radius-lg);
  padding: 30px 26px;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

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

.feature-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.feature-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 10px;
}

.feature-desc {
  font-size: 0.92rem;
  color: var(--grey);
  line-height: 1.6;
}

/* ==========================================================================
   SEO Content Section
   ========================================================================== */
.seo-content-box {
  background: var(--white);
  border-radius: var(--radius-xl);
  border: 1px solid var(--grey-border);
  padding: 48px;
  box-shadow: var(--shadow-sm);
}

.seo-content-box h2 {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--dark-heading);
  margin-bottom: 18px;
}

.seo-content-box h3 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--dark);
  margin-top: 28px;
  margin-bottom: 12px;
}

.seo-content-box p {
  font-size: 1rem;
  color: #555765;
  line-height: 1.75;
  margin-bottom: 16px;
}

.seo-content-box ul {
  padding-left: 24px;
  margin-bottom: 20px;
  color: #555765;
}

.seo-content-box li {
  margin-bottom: 8px;
  line-height: 1.6;
}

/* ==========================================================================
   FAQ Accordion
   ========================================================================== */
.faq-container {
  max-width: 840px;
  margin: 0 auto;
}

.faq-item {
  background: var(--white);
  border: 1px solid var(--grey-border);
  border-radius: var(--radius-md);
  margin-bottom: 14px;
  overflow: hidden;
  transition: var(--transition);
}

.faq-item:hover {
  border-color: rgba(241, 91, 70, 0.4);
}

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

.faq-question {
  width: 100%;
  padding: 20px 24px;
  text-align: left;
  background: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--dark);
  transition: var(--transition);
}

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

.faq-chevron {
  width: 22px;
  height: 22px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--grey);
  flex-shrink: 0;
}

.faq-item.active .faq-chevron {
  transform: rotate(180deg);
  color: var(--primary);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0 24px;
  color: var(--grey);
  line-height: 1.7;
}

.faq-item.active .faq-answer {
  padding-bottom: 22px;
}

/* ==========================================================================
   Advertisement Slots (Reserved AdSense Spaces)
   ========================================================================== */
.ad-slot-container {
  margin: 40px auto;
  text-align: center;
}

.ad-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #FAFAFD;
  border: 1px dashed #CBD5E1;
  border-radius: var(--radius-md);
  margin: 0 auto;
  padding: 16px;
  position: relative;
  overflow: hidden;
}

.ad-slot::before {
  content: "ADVERTISEMENT";
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: #94A3B8;
  margin-bottom: 8px;
}

.ad-slot-leaderboard {
  width: 100%;
  max-width: 970px;
  min-height: 90px;
}

.ad-slot-rectangle {
  width: 100%;
  max-width: 336px;
  min-height: 280px;
}

.ad-placeholder-text {
  font-size: 0.85rem;
  color: #94A3B8;
  font-weight: 500;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background-color: var(--white);
  border-top: 1px solid var(--grey-border);
  padding-top: 64px;
  padding-bottom: 32px;
  margin-top: auto;
}

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

.footer-col-brand .footer-desc {
  font-size: 0.92rem;
  color: var(--grey);
  margin-top: 16px;
  margin-bottom: 20px;
  line-height: 1.6;
}

.footer-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark-heading);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 20px;
}

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

.footer-links a {
  font-size: 0.92rem;
  color: var(--grey);
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--primary);
  padding-left: 4px;
}

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

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

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

/* ==========================================================================
   Tool Workspace Interface (For all individual tool pages)
   ========================================================================== */
.tool-workspace-header {
  text-align: center;
  padding: 40px 0 24px;
}

.tool-workspace-header .tool-header-icon {
  width: 68px;
  height: 68px;
  border-radius: 18px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.tool-workspace-header h1 {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--dark-heading);
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.tool-workspace-header p {
  font-size: 1.15rem;
  color: var(--grey);
  max-width: 640px;
  margin: 0 auto;
}

.tool-workspace-card {
  background: var(--white);
  border: 1px solid var(--grey-border);
  border-radius: var(--radius-xl);
  padding: 36px;
  box-shadow: var(--shadow-md);
  margin-bottom: 48px;
}

/* Upload Dropzone */
.dropzone {
  border: 2px dashed #CBD5E1;
  border-radius: var(--radius-lg);
  padding: 50px 24px;
  text-align: center;
  background: #FCFCFE;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--primary);
  background: var(--primary-soft);
  transform: scale(1.005);
}

.dropzone-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  transition: transform 0.25s ease;
}

.dropzone:hover .dropzone-icon {
  transform: translateY(-4px);
}

.dropzone-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 8px;
}

.dropzone-subtitle {
  font-size: 0.95rem;
  color: var(--grey);
  margin-bottom: 20px;
}

.dropzone input[type="file"] {
  display: none;
}

/* Selected Files / Page Previews Grid */
.files-preview-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.file-preview-card {
  background: var(--white);
  border: 1px solid var(--grey-border);
  border-radius: var(--radius-md);
  padding: 12px;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.file-preview-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.file-thumbnail {
  width: 100%;
  height: 140px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 10px;
  position: relative;
}

.file-thumbnail canvas, .file-thumbnail img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.file-meta {
  font-size: 0.82rem;
  color: var(--grey);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-name {
  font-weight: 600;
  color: var(--dark);
  font-size: 0.88rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--grey-border);
}

.icon-action-btn {
  background: none;
  border: none;
  color: var(--grey);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: var(--transition);
}

.icon-action-btn:hover {
  color: var(--primary);
  background: var(--primary-soft);
}

.icon-action-btn.delete:hover {
  color: #EF4444;
  background: #FEE2E2;
}

/* Tool Settings / Options Area */
.tool-options-panel {
  background: var(--bg);
  border: 1px solid var(--grey-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-top: 24px;
}

.tool-options-panel h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 16px;
}

.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  background: var(--white);
  border: 1px solid var(--grey-border);
  border-radius: var(--radius-md);
  color: var(--dark);
  font-size: 0.95rem;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(241, 91, 70, 0.15);
}

/* Action Controls & Progress Feedback */
.workspace-action-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 32px;
}

.progress-wrapper {
  margin-top: 24px;
  display: none;
}

.progress-wrapper.active {
  display: block;
}

.progress-bar-container {
  width: 100%;
  height: 10px;
  background: var(--grey-light);
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #FF6B57 0%, var(--primary) 100%);
  border-radius: 5px;
  transition: width 0.3s ease;
}

.progress-status-text {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--dark);
  text-align: center;
}

/* Download / Success State Box */
.download-result-box {
  display: none;
  text-align: center;
  padding: 36px 20px;
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  border-radius: var(--radius-lg);
  margin-top: 24px;
  animation: fadeIn 0.4s ease;
}

.download-result-box.active {
  display: block;
}

.download-result-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #DCFCE7;
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.download-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #166534;
  margin-bottom: 8px;
}

.download-subtitle {
  font-size: 0.95rem;
  color: #15803D;
  margin-bottom: 24px;
}

.download-action-btns {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
}

/* Notice & Status Alerts */
.info-callout {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 20px;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: var(--radius-md);
  margin-top: 20px;
  color: #1E40AF;
  font-size: 0.92rem;
  line-height: 1.5;
}

.warning-callout {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 20px;
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: var(--radius-md);
  margin-top: 20px;
  color: #92400E;
  font-size: 0.92rem;
  line-height: 1.5;
}

/* Signature Pad Canvas */
.signature-canvas-container {
  border: 2px dashed #CBD5E1;
  border-radius: var(--radius-md);
  background: var(--white);
  touch-action: none;
  width: 100%;
  max-width: 500px;
  height: 200px;
  margin: 0 auto 16px;
}

.signature-canvas-container canvas {
  width: 100%;
  height: 100%;
}

/* ==========================================================================
   Blog & Article Pages
   ========================================================================== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.article-card {
  background: var(--white);
  border: 1px solid var(--grey-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

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

.article-card-thumb {
  height: 180px;
  background: linear-gradient(135deg, #FFEFEA 0%, #EEF4FF 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.article-card-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.article-meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--grey);
  margin-bottom: 12px;
}

.article-tag {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

.article-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--dark-heading);
  line-height: 1.4;
  margin-bottom: 10px;
}

.article-excerpt {
  font-size: 0.92rem;
  color: var(--grey);
  line-height: 1.6;
  margin-bottom: 20px;
  flex: 1;
}

.article-read-link {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Single Article Layout */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--grey);
  margin-bottom: 24px;
}

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

.article-post-header {
  max-width: 800px;
  margin: 0 auto 36px;
  text-align: center;
}

.article-post-header h1 {
  font-size: 2.75rem;
  font-weight: 900;
  color: var(--dark-heading);
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.article-author-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-size: 0.9rem;
  color: var(--grey);
}

.article-content-wrapper {
  max-width: 820px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--grey-border);
  border-radius: var(--radius-xl);
  padding: 48px;
  box-shadow: var(--shadow-sm);
}

.article-content-wrapper h2 {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--dark-heading);
  margin-top: 36px;
  margin-bottom: 16px;
}

.article-content-wrapper h3 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--dark);
  margin-top: 24px;
  margin-bottom: 12px;
}

.article-content-wrapper p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #3F414D;
  margin-bottom: 20px;
}

.article-content-wrapper ul, .article-content-wrapper ol {
  padding-left: 28px;
  margin-bottom: 24px;
  color: #3F414D;
  font-size: 1.05rem;
  line-height: 1.7;
}

.article-content-wrapper li {
  margin-bottom: 10px;
}

.article-callout-box {
  background: var(--bg);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 20px 24px;
  margin: 28px 0;
}

.article-callout-box h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--dark-heading);
  margin-bottom: 8px;
}

/* ==========================================================================
   Static Legal & About Pages
   ========================================================================== */
.static-page-card {
  background: var(--white);
  border: 1px solid var(--grey-border);
  border-radius: var(--radius-xl);
  padding: 48px;
  box-shadow: var(--shadow-sm);
  max-width: 900px;
  margin: 0 auto;
}

.static-page-card h1 {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--dark-heading);
  margin-bottom: 14px;
}

.static-page-card .last-updated {
  font-size: 0.9rem;
  color: var(--grey);
  margin-bottom: 32px;
  border-bottom: 1px solid var(--grey-border);
  padding-bottom: 16px;
}

.static-page-card h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--dark-heading);
  margin-top: 32px;
  margin-bottom: 14px;
}

.static-page-card p {
  font-size: 1rem;
  line-height: 1.75;
  color: #4A4D59;
  margin-bottom: 18px;
}

.static-page-card ul {
  padding-left: 24px;
  margin-bottom: 20px;
  color: #4A4D59;
  line-height: 1.7;
}

/* Contact Form */
.contact-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.contact-form-grid .full-width {
  grid-column: span 2;
}

.form-feedback-message {
  margin-top: 16px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  display: none;
}

.form-feedback-message.error {
  display: block;
  background: #FEF2F2;
  border: 1px solid #F87171;
  color: #991B1B;
}

.form-feedback-message.info {
  display: block;
  background: #EFF6FF;
  border: 1px solid #60A5FA;
  color: #1E40AF;
}

/* ==========================================================================
   Animations & Keyframes
   ========================================================================== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn 0.5s ease forwards;
}

/* Scroll reveal helper */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-on-scroll.revealed {
  opacity: 1;
  transform: translateY(0);
}

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

/* ==========================================================================
   Responsive Media Queries
   Requirement: Desktop 5 cards, Tablet 3 cards, Mobile 2 cards
   ========================================================================== */

/* Tablet (max-width: 1024px) */
@media (max-width: 1024px) {
  .tools-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
  
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 36px;
  }
  
  .hero-content {
    max-width: 100%;
  }

  .hero-popular-chips {
    justify-content: center;
  }
  
  .hero-illustration-wrapper {
    order: -1;
  }
  
  .hero-illustration-wrapper img {
    max-width: 400px;
  }

  .steps-grid, .features-grid, .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile (max-width: 768px) */
@media (max-width: 768px) {
  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  
  .tool-card {
    padding: 16px 14px;
  }
  
  .tool-icon-wrapper {
    width: 46px;
    height: 46px;
    margin-bottom: 12px;
  }
  
  .tool-title {
    font-size: 1rem;
  }

  .tool-desc {
    font-size: 0.8rem;
    margin-bottom: 10px;
  }
  
  .nav-menu {
    display: none;
  }

  .hamburger-btn {
    display: block;
  }

  .header-actions .btn-primary {
    display: none;
  }

  .hero-title {
    font-size: 2.25rem;
  }

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

  .steps-grid, .features-grid, .blog-grid {
    grid-template-columns: 1fr;
  }

  .contact-form-grid {
    grid-template-columns: 1fr;
  }
  
  .contact-form-grid .full-width {
    grid-column: span 1;
  }

  .seo-content-box, .tool-workspace-card, .static-page-card, .article-content-wrapper {
    padding: 24px 18px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* Extra small mobile (below 400px) */
@media (max-width: 380px) {
  .tools-grid {
    grid-template-columns: 1fr;
  }
}
