/**
 * Custom Stylesheet for Unicode ⇄ InPage Urdu Converter
 * Domain: unicodetoinpage.pk
 * Built on top of Materialize CSS 1.0.0
 */

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

:root {
  --primary: #1e3a8a;          /* Deep Royal Blue */
  --primary-light: #3b82f6;    /* Bright Blue */
  --primary-dark: #0f172a;     /* Dark Slate */
  --accent: #0d9488;           /* Teal Accent */
  --accent-light: #14b8a6;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --bg-page: #f8fafc;          /* Light Slate background */
  --bg-card: #ffffff;
  --border-color: #e2e8f0;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --font-ui: 'Plus Jakarta Sans', 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-urdu: 'Noto Nastaliq Urdu', 'Jameel Noori Nastaleeq', 'Urdu Typesetting', Tahoma, sans-serif;
  --font-inpage: 'Courier New', 'Consolas', monospace;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
}

/* Global Reset & Base Typography */
body {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  background-color: var(--bg-page);
  color: var(--text-main);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1 0 auto;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', var(--font-ui);
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
}

h1 { font-size: 2.35rem; line-height: 1.25; }
h2 { font-size: 1.85rem; line-height: 1.3; margin-top: 2rem; margin-bottom: 1rem; }
h3 { font-size: 1.45rem; line-height: 1.35; margin-top: 1.5rem; margin-bottom: 0.75rem; }
h4 { font-size: 1.25rem; font-weight: 600; }

a {
  color: var(--primary-light);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

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

/* Sticky Modern Header / Navbar */
.site-header {
  position: sticky;
  top: 0;
  z-index: 999;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.site-navbar {
  background: transparent;
  box-shadow: none;
  height: 64px;
  line-height: 64px;
}

.site-navbar .nav-wrapper {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  height: 100% !important;
  position: relative !important;
}

.brand-logo-wrap {
  position: static !important;
  transform: none !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px;
  font-weight: 800;
  font-size: 1.15rem !important;
  color: var(--primary-dark) !important;
  font-family: 'Outfit', sans-serif;
  letter-spacing: -0.02em;
  white-space: nowrap;
  flex-shrink: 0;
  padding: 0 !important;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1e40af, #0d9488);
  color: #ffffff;
  font-family: var(--font-urdu);
  font-size: 0.85rem;
  padding: 2px 7px;
  border-radius: 6px;
  line-height: 1;
  font-weight: 700;
}

.brand-highlight {
  color: var(--accent);
}

.site-navbar ul.nav-menu {
  display: flex !important;
  align-items: center !important;
  gap: 4px;
  margin: 0 !important;
}

.site-navbar ul.nav-menu li a {
  color: #334155;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0 14px;
  transition: all 0.2s ease;
  border-radius: var(--radius-sm);
  height: 38px;
  line-height: 38px;
  margin-top: 0;
  display: flex;
  align-items: center;
}

.site-navbar ul.nav-menu li a:hover,
.site-navbar ul.nav-menu li.active a {
  background-color: #f1f5f9;
  color: var(--primary);
}

.site-navbar ul.nav-menu li.cta-nav a {
  background: linear-gradient(135deg, #1e40af, #0d9488);
  color: #ffffff !important;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(30, 64, 175, 0.2);
}

.site-navbar ul.nav-menu li.cta-nav a:hover {
  opacity: 0.95;
  box-shadow: 0 6px 16px rgba(30, 64, 175, 0.3);
}

.nav-toggle {
  color: var(--primary-dark) !important;
  font-size: 2rem;
  height: 70px;
  line-height: 70px;
}

/* Dropdown Menu */
.dropdown-content {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  min-width: 180px;
}

.dropdown-content li > a, .dropdown-content li > span {
  color: var(--text-main);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 12px 18px;
}

.dropdown-content li > a:hover {
  background-color: #f8fafc;
  color: var(--primary);
}

/* Mobile Sidenav */
.sidenav {
  width: 280px;
  background-color: #ffffff;
}

.sidenav-header {
  padding: 24px 20px;
  background: linear-gradient(135deg, #0f172a, #1e3a8a);
  color: #ffffff;
}

.sidenav-header h5 {
  color: #ffffff;
  margin: 0;
  font-size: 1.25rem;
}

.sidenav-header p {
  color: #94a3b8;
  margin: 4px 0 0;
  font-size: 0.85rem;
}

.sidenav li > a {
  color: #334155;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0 24px;
}

.sidenav li > a > i {
  color: #64748b;
  margin-right: 18px;
}

.sidenav li.active > a {
  color: var(--primary);
  background-color: #eff6ff;
}

/* Hero Section */
.hero-section {
  padding: 40px 0 25px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-bottom: 1px solid var(--border-color);
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: #eff6ff;
  color: var(--primary);
  border: 1px solid #bfdbfe;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.hero-pill i {
  font-size: 1.1rem;
  color: var(--primary-light);
}

.hero-title {
  color: #0f172a;
  font-weight: 800;
  margin-bottom: 14px;
}

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

/* Converter Main Card Box */
.converter-container {
  margin-top: 15px;
  margin-bottom: 40px;
}

.converter-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  padding: 24px;
  transition: all 0.3s ease;
}

.converter-top-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  gap: 12px;
}

.direction-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--primary-dark);
}

.direction-tag {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
}

.direction-tag.active {
  background: #eff6ff;
  border-color: #93c5fd;
  color: var(--primary);
}

/* Dual Column Editor Grid */
.converter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 850px) {
  .converter-grid {
    grid-template-columns: 1fr;
  }
}

.editor-box {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.editor-box:focus-within {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border-color);
}

.editor-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 6px;
}

.editor-header-actions {
  display: flex;
  gap: 6px;
}

.btn-editor-action {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #475569;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.btn-editor-action:hover {
  background: #f1f5f9;
  color: var(--primary);
  border-color: #94a3b8;
}

.btn-editor-action i {
  font-size: 0.9rem;
}

/* Custom Textareas */
.editor-textarea {
  width: 100% !important;
  min-height: 250px !important;
  height: 250px !important;
  padding: 16px !important;
  border: none !important;
  outline: none !important;
  resize: vertical !important;
  box-sizing: border-box !important;
  font-size: 1.15rem !important;
  line-height: 2 !important;
  color: #0f172a !important;
  background: #ffffff !important;
  margin: 0 !important;
  box-shadow: none !important;
}

.editor-textarea.urdu-mode {
  font-family: var(--font-urdu) !important;
  direction: rtl !important;
  text-align: right !important;
  font-size: 1.25rem !important;
}

.editor-textarea.inpage-mode {
  font-family: var(--font-inpage) !important;
  direction: ltr !important;
  text-align: left !important;
  font-size: 1rem !important;
  background: #fcfcfd !important;
}

.editor-textarea::placeholder {
  color: #94a3b8;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  direction: ltr;
  text-align: left;
}

.editor-textarea.urdu-mode::placeholder {
  font-family: var(--font-urdu);
  direction: rtl;
  text-align: right;
  font-size: 1.05rem;
}

/* Editor Footer Status Bar */
.editor-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: #f8fafc;
  border-top: 1px solid var(--border-color);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.stats-badge {
  font-weight: 600;
}

/* Converter Central Action Controls */
.converter-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

.btn-convert {
  background: linear-gradient(135deg, #1e40af, #0d9488);
  color: #ffffff !important;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 0 32px;
  height: 48px;
  line-height: 48px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(30, 64, 175, 0.25);
  transition: all 0.25s ease;
  border: none;
  cursor: pointer;
}

.btn-convert:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(30, 64, 175, 0.35);
}

.btn-convert i {
  font-size: 1.25rem;
}

.btn-secondary-custom {
  background: #ffffff;
  color: #334155 !important;
  border: 1.5px solid #cbd5e1;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0 20px;
  height: 48px;
  line-height: 46px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-secondary-custom:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: var(--primary) !important;
}

.btn-secondary-custom i {
  font-size: 1.1rem;
}

/* Quick Feature Highlights */
.feature-badge-wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px dashed var(--border-color);
}

.feature-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #475569;
}

.feature-badge i {
  color: var(--success);
  font-size: 1.1rem;
}

/* Step-by-Step "How It Works" Section */
.section-steps {
  padding: 60px 0;
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
}

.step-card {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 28px 20px;
  text-align: center;
  height: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.step-number {
  width: 50px;
  height: 50px;
  line-height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e40af, #0d9488);
  color: #ffffff;
  font-weight: 800;
  font-size: 1.25rem;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-card h4 {
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.step-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin: 0;
}

/* Tool Navigation Grid Cards */
.section-tools {
  padding: 60px 0;
  background: var(--bg-page);
  border-bottom: 1px solid var(--border-color);
}

.tool-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

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

.tool-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: #eff6ff;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: 20px;
}

.tool-card h3 {
  font-size: 1.35rem;
  margin-top: 0;
  margin-bottom: 12px;
}

.tool-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  flex-grow: 1;
  margin-bottom: 20px;
}

.tool-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--primary);
}

.tool-link-btn i {
  transition: transform 0.2s ease;
}

.tool-card:hover .tool-link-btn i {
  transform: translateX(4px);
}

/* SEO Content Block Styling */
.section-seo-content {
  padding: 60px 0;
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
}

.seo-prose {
  max-width: 860px;
  margin: 0 auto;
  font-size: 1.05rem;
  line-height: 1.8;
  color: #334155;
}

.seo-prose h2 {
  color: #0f172a;
  border-bottom: 2px solid #f1f5f9;
  padding-bottom: 8px;
}

.seo-prose ul, .seo-prose ol {
  padding-left: 24px;
  margin: 16px 0;
}

.seo-prose li {
  margin-bottom: 10px;
  list-style-type: disc;
}

.seo-prose ol li {
  list-style-type: decimal;
}

.seo-prose code {
  background: #f1f5f9;
  color: #0f172a;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-inpage);
  font-size: 0.9em;
}

/* FAQ Collapsible Accordion */
.section-faq {
  padding: 60px 0;
  background: var(--bg-page);
}

.collapsible.faq-accordion {
  border: none;
  box-shadow: none;
  max-width: 860px;
  margin: 0 auto;
}

.collapsible.faq-accordion li {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md) !important;
  margin-bottom: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.collapsible.faq-accordion .collapsible-header {
  font-weight: 700;
  font-size: 1.05rem;
  color: #0f172a;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border-bottom: 1px solid transparent;
}

.collapsible.faq-accordion li.active .collapsible-header {
  border-bottom-color: var(--border-color);
  background: #f8fafc;
  color: var(--primary);
}

.collapsible.faq-accordion .collapsible-header i {
  color: var(--text-muted);
  font-size: 1.25rem;
  transition: transform 0.25s ease;
  margin-right: 0;
}

.collapsible.faq-accordion li.active .collapsible-header i {
  transform: rotate(180deg);
  color: var(--primary);
}

.collapsible.faq-accordion .collapsible-body {
  padding: 20px;
  background: #ffffff;
  color: var(--text-muted);
  line-height: 1.7;
}

/* Modern Footer */
.page-footer.custom-footer {
  background: #0f172a;
  color: #94a3b8;
  padding-top: 60px;
  margin-top: 0;
}

.custom-footer h5 {
  color: #ffffff;
  font-size: 1.15rem;
  margin-bottom: 20px;
}

.custom-footer p {
  font-size: 0.92rem;
  line-height: 1.7;
}

.custom-footer ul li {
  margin-bottom: 10px;
}

.custom-footer ul li a {
  color: #94a3b8;
  font-size: 0.92rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s ease, transform 0.2s ease;
}

.custom-footer ul li a:hover {
  color: #38bdf8;
  transform: translateX(3px);
}

.footer-social-links {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.social-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #1e293b;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.social-btn:hover {
  background: var(--primary-light);
  color: #ffffff;
  transform: translateY(-2px);
}

.footer-copyright {
  background-color: #0b1120 !important;
  color: #64748b;
  padding: 20px 0;
  border-top: 1px solid #1e293b;
  font-size: 0.88rem;
}

/* Contact Form & Input Elements */
.contact-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  padding: 32px;
}

.input-field input[type=text]:focus,
.input-field input[type=email]:focus,
.input-field input[type=password]:focus,
.input-field textarea:focus {
  border-bottom: 2px solid var(--primary-light) !important;
  box-shadow: none !important;
}

.input-field input[type=text]:focus + label,
.input-field input[type=email]:focus + label,
.input-field input[type=password]:focus + label,
.input-field textarea:focus + label {
  color: var(--primary-light) !important;
}

/* Admin Panel Custom Styles */
.admin-body {
  background-color: #f1f5f9;
}

.admin-header {
  background: #0f172a;
  border-bottom: 1px solid #1e293b;
}

.admin-navbar {
  background: #0f172a;
}

.admin-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  margin-bottom: 24px;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px;
  border-radius: var(--radius-md);
  background: #ffffff;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.stat-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.75rem;
}

.stat-icon.blue { background: linear-gradient(135deg, #1e40af, #3b82f6); }
.stat-icon.teal { background: linear-gradient(135deg, #0d9488, #14b8a6); }
.stat-icon.amber { background: linear-gradient(135deg, #d97706, #f59e0b); }
.stat-icon.purple { background: linear-gradient(135deg, #6d28d9, #8b5cf6); }

.stat-number {
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.1;
  color: #0f172a;
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
}

.admin-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.92rem;
}

.admin-table tr:hover td {
  background-color: #f8fafc;
}

/* Toast Customization */
.toast {
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
}

/* Responsive tweaks */
@media (max-width: 600px) {
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.45rem; }
  .converter-card { padding: 16px; }
  .btn-convert { width: 100%; justify-content: center; }
  .btn-secondary-custom { width: 100%; justify-content: center; }
  .editor-textarea { min-height: 200px !important; height: 200px !important; }
}
