/* ==========================================================================
   AnushaRavi.com - Free Digital Marketing & Writing Tools Stylesheet
   Integrates 100% with live AnushaRavi.com style.css header & footer.
   ========================================================================== */

:root {
  --primary: #6c63ff;
  --primary-dark: #4f46e5;
  --primary-light: #eeedff;
  --secondary: #f5a623;
  --secondary-hover: #d98e14;
  --accent: #00d4ff;
  --dark: #1a1a2e;
  --darker: #0f0f23;
  --text-main: #2d3748;
  --text-light: #718096;
  --bg-light: #f8f9ff;
  --bg-white: #ffffff;
  --success: #10b981;
  --success-bg: #ecfdf5;
  --warning: #f59e0b;
  --warning-bg: #fffbebf;
  --error: #ef4444;
  --error-bg: #fef2f2;
  --border: #e2e8f0;
  --border-focus: #6c63ff;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(108, 99, 255, 0.08);
  --shadow-lg: 0 10px 25px rgba(26, 26, 46, 0.12);
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --transition: all 0.2s ease-in-out;
}

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

html {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-main);
  background-color: var(--bg-light);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body.tools-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Accessibility Focus States */
:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

/* Accessibility Skip Link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--dark);
  color: var(--bg-white);
  padding: 0.75rem 1.25rem;
  z-index: 9999;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 1rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--dark);
  line-height: 1.25;
  font-weight: 700;
}

h1 { font-size: 2rem; margin-bottom: 0.5rem; }
h2 { font-size: 1.5rem; margin-bottom: 0.5rem; }
h3 { font-size: 1.2rem; margin-bottom: 0.4rem; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

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

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

/* Live Site Header Styling Overrides & Alignment */
.site-header, header.header {
  background: var(--darker);
  color: var(--bg-white);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-container, .nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo, a.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--bg-white) !important;
  letter-spacing: -0.5px;
  display: inline-flex;
  align-items: center;
}

.logo-accent {
  color: var(--secondary);
}

.primary-navigation .nav-list, ul.nav-links {
  display: flex;
  list-style: none;
  align-items: center;
  gap: 1.25rem;
}

.nav-link, ul.nav-links a {
  color: #cbd5e1;
  font-weight: 500;
  font-size: 0.925rem;
  padding: 0.4rem 0.2rem;
  position: relative;
}

.nav-link:hover, ul.nav-links a:hover,
.nav-link.active, ul.nav-links a[aria-current="page"] {
  color: var(--bg-white) !important;
}

.nav-link.active::after, ul.nav-links a[aria-current="page"]::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  min-width: 44px;
  min-height: 44px;
}

.hamburger-box {
  width: 24px;
  height: 18px;
  display: inline-block;
  position: relative;
}

.hamburger-inner,
.hamburger-inner::before,
.hamburger-inner::after {
  width: 24px;
  height: 2.5px;
  background-color: var(--bg-white);
  border-radius: 4px;
  position: absolute;
  transition: transform 0.15s ease;
}

.hamburger-inner { top: 50%; transform: translateY(-50%); }
.hamburger-inner::before { content: ''; top: -7px; }
.hamburger-inner::after { content: ''; bottom: -7px; }

/* Compact Hub Header (No Dark Block) */
.hub-header-compact {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}

.hub-filter-pills {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.hub-pill {
  background: var(--bg-light);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition);
}

.hub-pill:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.hub-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--bg-white) !important;
  box-shadow: 0 2px 8px rgba(108, 99, 255, 0.25);
}

.pill-count {
  background: rgba(255, 255, 255, 0.25);
  font-size: 0.75rem;
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-full);
}

.hub-pill:not(.active) .pill-count {
  background: var(--border);
  color: var(--text-main);
}

/* Compact Tools Grid & Cards */
.hub-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.hub-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  text-decoration: none !important;
  color: inherit;
}

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

.hub-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.hub-card-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hub-card-badge {
  font-size: 0.725rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  background: rgba(245, 166, 35, 0.15);
  color: #d97706;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hub-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.35rem;
}

.hub-card-desc {
  font-size: 0.875rem;
  color: var(--text-light);
  line-height: 1.45;
  flex: 1;
  margin-bottom: 1rem;
}

.hub-card-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.hub-card:hover .hub-card-link {
  color: var(--primary-dark);
}

/* Page Header (Hero Banner for Tool Sub-pages) */
.page-hero {
  background: linear-gradient(135deg, var(--darker) 0%, var(--dark) 100%);
  color: var(--bg-white);
  padding: 2.25rem 1.25rem 2.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-container {
  max-width: 850px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-title {
  color: var(--bg-white);
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: #94a3b8;
  max-width: 680px;
  margin: 0 auto 1rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(108, 99, 255, 0.15);
  border: 1px solid rgba(108, 99, 255, 0.3);
  color: #a5b4fc;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.85rem;
}

/* Main Container Layout */
.tools-main {
  flex: 1;
}

.content-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 2rem 1.25rem;
}

/* Breadcrumbs */
.breadcrumbs {
  margin-bottom: 1.25rem;
}

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  font-size: 0.875rem;
  color: var(--text-light);
}

.breadcrumb-item + .breadcrumb-item::before {
  content: '/';
  padding: 0 0.5rem;
  color: #cbd5e1;
}

.breadcrumb-item a {
  color: var(--text-light);
}

.breadcrumb-item.active {
  color: var(--dark);
  font-weight: 600;
}

/* Card Component */
.card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 2rem;
}

/* Icon Pill Tab Buttons */
.tab-btn {
  background: var(--bg-white);
  border: 1.5px solid var(--border);
  color: var(--text-main);
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition);
  min-height: 38px;
}

.tab-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.tab-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--bg-white) !important;
  box-shadow: 0 4px 12px rgba(108, 99, 255, 0.25);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: fadeIn 0.2s ease-in-out;
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  min-height: 42px;
  min-width: 42px;
  transition: var(--transition);
  text-align: center;
}

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

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

.btn-secondary {
  background: var(--secondary);
  color: var(--darker);
}

.btn-secondary:hover {
  background: var(--secondary-hover);
  color: var(--darker);
}

.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text-main);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  min-height: 36px;
}

.btn-block {
  width: 100%;
}

/* Form Controls */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group:last-child {
  margin-bottom: 0;
}

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

.form-label .required {
  color: var(--error);
  margin-left: 2px;
}

.form-hint {
  font-size: 0.825rem;
  color: var(--text-light);
  margin-top: 0.3rem;
}

.form-control {
  width: 100%;
  padding: 0.65rem 0.85rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-main);
  background-color: var(--bg-white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  min-height: 42px;
  transition: var(--transition);
}

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

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%20718096' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 16px;
  padding-right: 2.25rem;
}

/* Tool Layout Dual Panel */
.tool-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.75rem;
  align-items: start;
}

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

/* Result Box / Panel */
.result-panel {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-md);
  text-align: center;
  position: sticky;
  top: 80px;
}

.result-preview-box {
  background: var(--bg-light);
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  position: relative;
}

.result-value-box {
  background: var(--bg-light);
  border: 1px solid var(--border);
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-md);
  font-family: monospace;
  font-size: 0.875rem;
  word-break: break-all;
  margin-bottom: 1rem;
  color: var(--dark);
  text-align: left;
}

/* Privacy Callout Note */
.privacy-notice {
  background: var(--primary-light);
  border-left: 4px solid var(--primary);
  padding: 0.75rem 1rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: 0.825rem;
  color: var(--dark);
  margin-top: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

/* Content & Educational Section */
.info-section {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-top: 2.5rem;
}

.info-section h2 {
  font-size: 1.35rem;
  margin-top: 1.25rem;
  margin-bottom: 0.75rem;
}

.info-section h2:first-child {
  margin-top: 0;
}

.info-section ol, .info-section ul {
  margin-left: 1.25rem;
  margin-bottom: 1rem;
}

.info-section li {
  margin-bottom: 0.4rem;
}

/* FAQ Section (Always Open & Fully Visible) */
.faq-accordion {
  margin-top: 1.25rem;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  background: var(--bg-white);
  padding: 1.25rem;
}

.faq-question {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  padding: 0 0 0.5rem 0;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--dark);
  cursor: default;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.faq-icon {
  display: none; /* Icon hidden since FAQs are permanently open */
}

.faq-answer {
  padding: 0;
  color: var(--text-main);
  display: block !important; /* Always open permanently everywhere */
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Live Site Footer Styling Overrides & Alignment */
.site-footer, footer.footer {
  background: var(--darker);
  color: #94a3b8;
  padding: 3.5rem 1.25rem 2rem;
  margin-top: auto;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.footer-container {
  max-width: 1140px;
  margin: 0 auto;
}

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

@media (max-width: 900px) {
  .footer-grid, .footer-content {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .footer-grid, .footer-content {
    grid-template-columns: 1fr;
  }
}

.footer-logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--bg-white);
  display: inline-block;
  margin-bottom: 0.85rem;
}

.footer-tagline {
  font-size: 0.875rem;
  line-height: 1.55;
  margin-bottom: 1rem;
}

.privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(16, 185, 129, 0.12);
  color: var(--success);
  font-size: 0.775rem;
  font-weight: 600;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-full);
}

.footer-heading, .footer-col h3 {
  color: var(--bg-white);
  font-size: 1.05rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

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

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

.footer-links a {
  color: #cbd5e1;
  font-size: 0.875rem;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1.75rem;
  text-align: center;
  font-size: 0.825rem;
}

.footer-disclaimer {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 0.65rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  background: var(--dark);
  color: var(--bg-white);
  padding: 0.8rem 1.2rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.875rem;
  font-weight: 500;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast-success { border-left: 4px solid var(--success); }
.toast-error { border-left: 4px solid var(--error); }

/* Mobile Responsive Navigation Overlay */
@media (max-width: 850px) {
  .mobile-menu-toggle {
    display: flex;
  }

  .primary-navigation {
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    background: var(--darker);
    padding: 1.25rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: none;
  }

  .primary-navigation.is-open {
    display: block;
  }

  .primary-navigation .nav-list, ul.nav-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
  }

  .nav-item { width: 100%; }

  .btn-nav-cta {
    width: 100%;
    text-align: center;
  }
}

/* Reduced Motion */
@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;
  }
}
