/* ==========================================
   home.css — Homepage Specific Styles
   FormFixer — Responsive Redesign
   ========================================== */

/* ---- MAIN SECTION WRAPPER ---- */
.tools-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

/* ---- FEATURED EDITOR CARD ---- */
.featured-editor-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #0a2463 0%, #1e4fc2 100%);
  border-radius: 20px;
  padding: 2rem 2.5rem;
  margin-bottom: 2rem;
  text-decoration: none;
  transition: all 0.25s ease;
  box-shadow: 0 8px 32px rgba(30,79,194,0.3);
  border: 1px solid rgba(255,255,255,0.1);
  position: relative;
  overflow: hidden;
}
.featured-editor-card::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 200px; height: 200px;
  background: rgba(255,255,255,0.04);
  border-radius: 50%;
}
.featured-editor-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(30,79,194,0.45);
}
.fe-badge {
  display: inline-block;
  background: #60a5fa;
  color: #0a2463;
  font-family: 'Syne', sans-serif;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 0.6rem;
}
.fe-left h2 {
  font-family: 'Syne', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  color: white;
  margin-bottom: 0.5rem;
}
.fe-left p {
  font-size: 0.82rem;
  color: #bfdbfe;
  max-width: 520px;
  line-height: 1.6;
  margin-bottom: 1rem;
}
.fe-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}
.fe-tags span {
  background: rgba(255,255,255,0.12);
  color: #e0f2fe;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 50px;
  border: 1px solid rgba(255,255,255,0.15);
}
.fe-btn {
  display: inline-flex;
  align-items: center;
  background: white;
  color: #0a2463;
  font-family: 'Syne', sans-serif;
  font-size: 0.85rem;
  font-weight: 800;
  padding: 0.6rem 1.5rem;
  border-radius: 10px;
  transition: all 0.2s;
}
.featured-editor-card:hover .fe-btn {
  background: #60a5fa;
  color: white;
}
.fe-right {
  font-size: 5rem;
  opacity: 0.3;
  flex-shrink: 0;
  margin-left: 1rem;
}

/* ---- CATEGORY TABS ---- */
.cat-tabs-wrap {
  position: sticky;
  top: 64px;
  z-index: 90;
  background: var(--white);
  border-bottom: 1px solid var(--blue-pale);
  box-shadow: 0 2px 12px rgba(10,36,99,0.07);
}

.cat-tabs {
  display: flex;
  overflow-x: auto;
  gap: 0;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
  scrollbar-width: none;
}
.cat-tabs::-webkit-scrollbar { display: none; }

.cat-tab {
  padding: 0.9rem 1.25rem;
  border: none;
  background: none;
  font-family: 'Syne', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gray);
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
}
.cat-tab:hover { color: var(--blue-mid); }
.cat-tab.active {
  color: var(--blue-mid);
  border-bottom-color: var(--blue-mid);
}

/* ---- CATEGORY BLOCK ---- */
.category-block {
  margin-bottom: 3rem;
  scroll-margin-top: 128px;
}

.category-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--white);
  border-radius: 16px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--blue-mid);
}

.category-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
}

.category-header h2 {
  font-family: 'Syne', sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--blue-dark);
}
.category-header p {
  font-size: 0.78rem;
  color: var(--gray);
  margin-top: 0.15rem;
}

/* ---- TOOLS GRID ---- */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}

/* ---- TOOL CARD ---- */
.tool-card {
  background: var(--white);
  border-radius: 16px;
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  text-decoration: none;
  box-shadow: var(--shadow);
  border: 2px solid transparent;
  transition: all 0.22s ease;
}
.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--blue-light);
}
.tool-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}
.tool-card h3 {
  font-family: 'Syne', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--blue-dark);
  line-height: 1.2;
}
.tool-card p {
  font-size: 0.75rem;
  color: var(--gray);
  line-height: 1.4;
}

/* ---- RESUME TEMPLATES GRID ---- */
.resume-templates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 1.25rem;
}

/* ---- RESUME CARD ---- */
.resume-card {
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 2px solid transparent;
  text-decoration: none;
  display: block;
  transition: all 0.25s ease;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  animation: cardIn 0.4s ease forwards;
}
.resume-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--blue-mid);
}

.resume-preview {
  height: 160px;
  background: #f8fafc;
  overflow: hidden;
  position: relative;
}

.rp-bar { width: 100%; }

.rp-body {
  display: flex;
  gap: 8px;
  padding: 8px 10px;
}

.rp-photo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #cbd5e1;
  border: 2px solid var(--blue-mid);
  flex-shrink: 0;
}

.rp-sidebar { height: 100%; }

.rp-lines {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
  padding: 6px 0;
}

.rp-line {
  height: 6px;
  background: #e2e8f0;
  border-radius: 4px;
}

.resume-info {
  padding: 0.9rem 1rem;
  border-top: 1px solid var(--blue-pale);
}
.resume-info h3 {
  font-family: 'Syne', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--blue-dark);
  margin-bottom: 0.2rem;
}
.resume-info p {
  font-size: 0.72rem;
  color: var(--gray);
  margin-bottom: 0.5rem;
}

.rbadge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 50px;
  font-family: 'Syne', sans-serif;
}
.rbadge.pop { background: #fef9c3; color: #92400e; }
.rbadge.new { background: #dcfce7; color: #065f46; }

/* Animation delays */
.resume-templates-grid .resume-card:nth-child(1)  { animation-delay: 0.05s; }
.resume-templates-grid .resume-card:nth-child(2)  { animation-delay: 0.12s; }
.resume-templates-grid .resume-card:nth-child(3)  { animation-delay: 0.19s; }
.resume-templates-grid .resume-card:nth-child(4)  { animation-delay: 0.26s; }
.resume-templates-grid .resume-card:nth-child(5)  { animation-delay: 0.33s; }
.resume-templates-grid .resume-card:nth-child(6)  { animation-delay: 0.40s; }
.resume-templates-grid .resume-card:nth-child(7)  { animation-delay: 0.47s; }
.resume-templates-grid .resume-card:nth-child(8)  { animation-delay: 0.54s; }
.resume-templates-grid .resume-card:nth-child(9)  { animation-delay: 0.61s; }
.resume-templates-grid .resume-card:nth-child(10) { animation-delay: 0.68s; }

@keyframes cardIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ====================================
   RESPONSIVE
   ==================================== */

/* Tablet */
@media (max-width: 860px) {
  .tools-section { padding: 1.5rem 1.25rem 2.5rem; }
  .resume-templates-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .tools-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .fe-left h2 { font-size: 1.2rem; }
}

/* Mobile */
@media (max-width: 640px) {
  .tools-section { padding: 1.25rem 0.85rem 2rem; }

  .featured-editor-card { padding: 1.25rem; flex-direction: column; align-items: flex-start; gap: 0.75rem; }
  .fe-right { display: none; }
  .fe-left h2 { font-size: 1.05rem; }
  .fe-left p { font-size: 0.78rem; }

  .tools-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
  .tool-card { padding: 1rem 0.85rem; }
  .tool-card h3 { font-size: 0.82rem; }

  .resume-templates-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
  .resume-preview { height: 130px; }
  .resume-info { padding: 0.65rem 0.75rem; }
  .resume-info h3 { font-size: 0.78rem; }

  .category-header { padding: 0.9rem 1rem; gap: 0.75rem; }
  .category-header h2 { font-size: 0.95rem; }
  .category-icon { width: 42px; height: 42px; font-size: 1.3rem; }

  .cat-tab { padding: 0.7rem 0.85rem; font-size: 0.72rem; }

  .fe-tags span { font-size: 0.68rem; padding: 0.2rem 0.5rem; }
}

/* Very small phones */
@media (max-width: 360px) {
  .tools-grid { grid-template-columns: repeat(2, 1fr); }
  .resume-templates-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ================================================
   DARK MODE — HOME PAGE
   ================================================ */

[data-theme="dark"] body {
  background: var(--bg-page);
  color: var(--text-primary);
}

[data-theme="dark"] .cat-tabs-wrap {
  background: #1e293b;
  border-bottom-color: #334155;
}

[data-theme="dark"] .cat-tab { color: #64748b; }
[data-theme="dark"] .cat-tab:hover { color: #e2e8f0; }
[data-theme="dark"] .cat-tab.active { color: #60a5fa; border-bottom-color: #60a5fa; }

[data-theme="dark"] .category-header {
  background: #1e293b;
  border-left-color: #60a5fa;
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}
[data-theme="dark"] .category-header h2 { color: #e2e8f0; }
[data-theme="dark"] .category-header p  { color: #94a3b8; }

[data-theme="dark"] .tool-card {
  background: #1e293b;
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}
[data-theme="dark"] .tool-card:hover { border-color: #60a5fa; box-shadow: 0 8px 40px rgba(0,0,0,0.5); }
[data-theme="dark"] .tool-card h3 { color: #e2e8f0; }
[data-theme="dark"] .tool-card p  { color: #94a3b8; }

[data-theme="dark"] .resume-card {
  background: #1e293b;
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}
[data-theme="dark"] .resume-card:hover { border-color: #60a5fa; }
[data-theme="dark"] .resume-info { border-top-color: #334155; }
[data-theme="dark"] .resume-info h3 { color: #e2e8f0; }
[data-theme="dark"] .resume-info p  { color: #94a3b8; }

[data-theme="dark"] .rbadge.pop { background: #451a03; color: #fcd34d; }
[data-theme="dark"] .rbadge.new { background: #064e3b; color: #34d399; }

[data-theme="dark"] .featured-editor-card {
  background: linear-gradient(135deg, #0a1628 0%, #1e3a5f 100%);
}
