/* ===================================================================
   SarkariTools - Main Stylesheet
   Modern, Fast, Accessible & Mobile-First
   =================================================================== */

:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --primary-dark: #1e40af;
  --secondary: #0f172a;
  --accent: #f59e0b;
  --accent-light: #fef3c7;
  --success: #10b981;
  --success-light: #ecfdf5;
  --danger: #ef4444;
  --danger-light: #fef2f2;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --bg-body: #f8fafc;
  --bg-card: #ffffff;
  --border-color: #e2e8f0;
  --border-focus: #3b82f6;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.15s ease;
}

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.container-narrow {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header & Navigation */
.site-header {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--secondary);
  letter-spacing: -0.5px;
}

.logo-badge {
  background: linear-gradient(135deg, var(--primary), #3b82f6);
  color: white;
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.logo-text span {
  color: var(--primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-main);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 0.2rem;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--secondary);
}

/* Notice Banner */
.top-notice {
  background: #f0fdf4;
  border-bottom: 1px solid #bbf7d0;
  color: #166534;
  padding: 0.5rem 0;
  font-size: 0.85rem;
  text-align: center;
  font-weight: 500;
}

.top-notice span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* Hero Section */
.hero {
  padding: 3rem 0 2rem;
  text-align: center;
  background: radial-gradient(circle at 50% 20%, #eff6ff 0%, #f8fafc 100%);
  border-bottom: 1px solid var(--border-color);
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--primary-light);
  color: var(--primary-dark);
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1rem;
  border: 1px solid #bfdbfe;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--secondary);
  line-height: 1.2;
  margin-bottom: 1rem;
  letter-spacing: -0.8px;
}

.hero-title span {
  background: linear-gradient(135deg, var(--primary), #4f46e5);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 1.5rem;
}

/* AdSense Slot Styles */
.ad-container {
  margin: 1.5rem auto;
  text-align: center;
  max-width: 100%;
  overflow: hidden;
}

.ad-slot {
  display: inline-block;
  min-height: 90px;
  width: 100%;
  max-width: 728px;
  background: #f1f5f9;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius-sm);
  position: relative;
  box-sizing: border-box;
}

.ad-label {
  display: block;
  font-size: 0.65rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 0.25rem;
}

.ad-slot.ad-rectangle {
  max-width: 300px;
  min-height: 250px;
}

/* Tool Cards Grid */
.tools-section {
  padding: 3rem 0;
}

.section-header {
  margin-bottom: 2rem;
  text-align: center;
}

.section-title {
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 0.5rem;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1rem;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

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

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

.tool-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 1.25rem;
}

.icon-blue { background: #eff6ff; color: #2563eb; }
.icon-emerald { background: #ecfdf5; color: #059669; }
.icon-amber { background: #fffbeb; color: #d97706; }
.icon-purple { background: #faf5ff; color: #9333ea; }
.icon-rose { background: #fff1f2; color: #e11d48; }
.icon-cyan { background: #ecfeff; color: #0891b2; }

.tool-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tool-badge {
  font-size: 0.7rem;
  background: #f1f5f9;
  color: #475569;
  padding: 0.2rem 0.5rem;
  border-radius: 9999px;
  font-weight: 600;
  text-transform: uppercase;
}

.tool-badge.hot {
  background: #fee2e2;
  color: #dc2626;
}

.tool-badge.new {
  background: #dbeafe;
  color: #1d4ed8;
}

.tool-desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.tool-features {
  list-style: none;
  font-size: 0.82rem;
  color: #475569;
  margin-bottom: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tool-features li {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
}

.tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--primary);
  margin-top: auto;
}

.tool-card:hover .tool-btn {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* Feature/Why Us Section */
.features-section {
  background: white;
  padding: 3rem 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
}

.feature-box {
  text-align: center;
}

.feature-box-icon {
  width: 48px;
  height: 48px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
}

.feature-box h4 {
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
  color: var(--secondary);
}

.feature-box p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Exam Guide / Info Table */
.guide-section {
  padding: 3rem 0;
}

.exam-table-card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.table-responsive {
  overflow-x: auto;
}

table.exam-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

table.exam-table th {
  background: #f8fafc;
  color: var(--secondary);
  font-weight: 600;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border-color);
}

table.exam-table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
}

table.exam-table tr:last-child td {
  border-bottom: none;
}

table.exam-table tr:hover {
  background: #fbfdff;
}

/* General Tool Workspace Layout (For Subpages) */
.tool-page-header {
  padding: 2rem 0 1.5rem;
  background: white;
  border-bottom: 1px solid var(--border-color);
}

.breadcrumbs {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.breadcrumbs a {
  color: var(--text-muted);
}

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

.tool-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
  padding: 2rem 0;
}

@media (max-width: 991px) {
  .tool-layout {
    grid-template-columns: 1fr;
  }
}

.tool-workspace {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}

.tool-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sidebar-box {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.sidebar-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

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

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

.sidebar-links a {
  color: var(--text-main);
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

/* Forms & Inputs */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--secondary);
  margin-bottom: 0.4rem;
}

.form-label .required {
  color: var(--danger);
}

.form-help {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.form-control {
  width: 100%;
  padding: 0.65rem 0.9rem;
  font-size: 0.95rem;
  font-family: inherit;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: white;
  color: var(--text-main);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-control:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

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

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

.btn-secondary {
  background: #f1f5f9;
  color: var(--secondary);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background: #e2e8f0;
}

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

.btn-success:hover {
  background: #059669;
}

.btn-block {
  width: 100%;
}

.btn-lg {
  padding: 0.85rem 1.6rem;
  font-size: 1rem;
  border-radius: var(--radius-md);
}

/* Upload Dropzone */
.dropzone {
  border: 2px dashed #93c5fd;
  background: #f8fafc;
  border-radius: var(--radius-md);
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--primary);
  background: #eff6ff;
}

.dropzone-icon {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.dropzone-text {
  font-size: 1rem;
  font-weight: 600;
  color: var(--secondary);
  margin-bottom: 0.25rem;
}

.dropzone-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Content & Article Blocks (AdSense SEO Content) */
.seo-content-block {
  margin-top: 3rem;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
}

.seo-content-block h2 {
  font-size: 1.5rem;
  color: var(--secondary);
  margin-bottom: 1rem;
}

.seo-content-block h3 {
  font-size: 1.2rem;
  color: var(--secondary);
  margin: 1.5rem 0 0.75rem;
}

.seo-content-block p {
  color: var(--text-main);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.seo-content-block ul,
.seo-content-block ol {
  margin: 0 0 1.25rem 1.5rem;
  font-size: 0.95rem;
}

.seo-content-block li {
  margin-bottom: 0.4rem;
}

/* FAQ Accordion */
.faq-list {
  margin-top: 1.5rem;
}

.faq-item {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  text-align: left;
  padding: 1rem 1.25rem;
  background: white;
  border: none;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--secondary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-question:hover {
  background: #f8fafc;
}

.faq-answer {
  padding: 0 1.25rem 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  display: none;
}

.faq-item.active .faq-answer {
  display: block;
}

/* Results & Stat Badges */
.result-card {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-top: 1.5rem;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.stat-pill {
  background: white;
  border: 1px solid var(--border-color);
  padding: 0.85rem;
  border-radius: var(--radius-sm);
  text-align: center;
}

.stat-val {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.2;
}

.stat-lbl {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* Footer */
.site-footer {
  margin-top: auto;
  background: #0f172a;
  color: #94a3b8;
  padding: 3rem 0 1.5rem;
  border-top: 1px solid #1e293b;
}

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

.footer-col h4 {
  color: white;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.footer-col ul {
  list-style: none;
}

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

.footer-col a {
  color: #94a3b8;
  font-size: 0.88rem;
  transition: color 0.15s;
}

.footer-col a:hover {
  color: white;
}

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid #1e293b;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.disclaimer-banner {
  background: #1e293b;
  color: #cbd5e1;
  font-size: 0.78rem;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
  line-height: 1.4;
}

/* Toast notification */
.toast-msg {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #0f172a;
  color: white;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  box-shadow: var(--shadow-lg);
  display: none;
  z-index: 9999;
  animation: fadeIn 0.2s ease;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero-title {
    font-size: 1.85rem;
  }
  
  .nav-links {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background: white;
    flex-direction: column;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
  }

  .nav-links.active {
    display: flex;
  }

  .mobile-menu-btn {
    display: block;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .tool-workspace {
    padding: 1.25rem;
  }
}

/* Typing Speed Test Styles */
.typing-box {
  background: #ffffff;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  user-select: none;
  font-family: 'Courier New', Courier, monospace;
  font-size: 1.15rem;
  line-height: 1.8;
  height: 160px;
  overflow-y: auto;
}

.char-correct {
  color: #16a34a;
  background-color: #dcfce7;
  border-radius: 2px;
}

.char-incorrect {
  color: #dc2626;
  background-color: #fee2e2;
  text-decoration: underline;
  border-radius: 2px;
}

.char-current {
  background-color: #3b82f6;
  color: white;
  border-radius: 2px;
}

.typing-input {
  font-size: 1.15rem;
  font-family: inherit;
  padding: 1rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  width: 100%;
  box-sizing: border-box;
  resize: none;
  margin-bottom: 1.25rem;
}

.typing-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Resume Builder & Bio-Data Layout */
.resume-preview-sheet {
  background: white;
  border: 1px solid #cbd5e1;
  box-shadow: var(--shadow-md);
  padding: 2.5rem;
  font-family: 'Times New Roman', Times, serif;
  color: #000;
  max-width: 800px;
  margin: 0 auto;
}

.resume-header {
  text-align: center;
  border-bottom: 2px solid #000;
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}

.resume-title {
  font-size: 1.6rem;
  font-weight: bold;
  letter-spacing: 1px;
}

.resume-section-title {
  font-size: 1.1rem;
  font-weight: bold;
  border-bottom: 1px solid #666;
  padding-bottom: 0.2rem;
  margin: 1.2rem 0 0.6rem;
  text-transform: uppercase;
}

.resume-info-grid {
  display: grid;
  grid-template-columns: 180px 1fr;
  row-gap: 0.4rem;
  font-size: 0.95rem;
}

.resume-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.5rem 0;
  font-size: 0.95rem;
}

.resume-table th, .resume-table td {
  border: 1px solid #000;
  padding: 0.4rem 0.6rem;
  text-align: left;
}

.resume-declaration {
  margin-top: 1.5rem;
  font-size: 0.9rem;
  line-height: 1.5;
}

.resume-signature-area {
  display: flex;
  justify-content: space-between;
  margin-top: 3rem;
  font-size: 0.95rem;
}

/* Print Specific Rules */
@media print {
  body * {
    visibility: hidden;
  }
  .site-header, .site-footer, .ad-container, .breadcrumbs, .btn, .top-notice, .tool-page-header, .form-side {
    display: none !important;
  }
  .resume-preview-sheet, .resume-preview-sheet * {
    visibility: visible;
  }
  .resume-preview-sheet {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 1.5cm;
    border: none;
    box-shadow: none;
  }
}


/* Hide Netlify Injected Drawer & Badge */
netlify-drawer,
#netlify-drawer,
div[data-netlify-drawer],
.netlify-drawer,
iframe[data-netlify-drawer],
iframe[src*="netlify-drawer"] {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
