/* ==========================================================================
   SEOLinkScan — Modern SaaS Design System (v2.0)
   Electric Indigo (#4F46E5) & Energetic Coral/Amber Theme
   ========================================================================== */

:root {
  /* Brand Accents */
  --primary: #4F46E5;
  --primary-hover: #4338CA;
  --primary-light: #EEF2FF;
  --primary-gradient: linear-gradient(135deg, #4F46E5 0%, #3B82F6 100%);
  --secondary: #F97316;
  --secondary-hover: #EA580C;
  --cyan: #06B6D4;
  --cyan-light: #ECFEFF;

  /* Surfaces & Backgrounds */
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --dark: #0F172A;
  --dark-hero: #0B0F19;
  --dark-border: #1E293B;
  --border: #E2E8F0;
  --border-light: #F1F5F9;

  /* Typography Colors */
  --text: #0F172A;
  --text-muted: #64748B;
  --text-light: #94A3B8;

  /* Status Colors */
  --success: #10B981;
  --success-bg: rgba(16, 185, 129, 0.1);
  --success-border: rgba(16, 185, 129, 0.25);
  
  --warning: #F59E0B;
  --warning-bg: rgba(245, 158, 11, 0.1);
  --warning-border: rgba(245, 158, 11, 0.25);

  --danger: #EF4444;
  --danger-bg: rgba(239, 68, 68, 0.1);
  --danger-border: rgba(239, 68, 68, 0.25);

  /* Layout Standards */
  --container-max: 1200px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Modern Shadows */
  --shadow-card: 0 10px 30px -10px rgba(79, 70, 229, 0.08);
  --shadow-hover: 0 20px 40px -12px rgba(79, 70, 229, 0.16);
  --shadow-glow: 0 0 25px rgba(79, 70, 229, 0.25);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography Defaults */
h1, h2, h3, h4, h5, h6 {
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

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

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

/* ==========================================================================
   Strict Uniform Containers & Spacing
   ========================================================================== */
.site-container,
.container {
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
  width: 100%;
}

@media (max-width: 768px) {
  .site-container,
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }
}

.site-section {
  padding: 48px 0;
}

@media (max-width: 768px) {
  .site-section {
    padding: 32px 0;
  }
}

/* Modern Card */
.site-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 32px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.site-card:hover {
  border-color: #CBD5E1;
}

@media (max-width: 768px) {
  .site-card {
    padding: 20px 16px;
    border-radius: 14px;
  }
}

/* High Conversion Buttons */
.btn-primary,
.btn-gradient {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--primary-gradient);
  color: #FFFFFF !important;
  font-weight: 600;
  font-size: 15px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.25);
  min-height: 44px;
}

.btn-primary:hover,
.btn-gradient:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -4px rgba(79, 70, 229, 0.45);
  color: #FFFFFF !important;
}

.btn-primary:active,
.btn-gradient:active {
  transform: translateY(0);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #FFFFFF;
  color: var(--text) !important;
  font-weight: 600;
  font-size: 15px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  min-height: 44px;
}

.btn-secondary:hover {
  background: var(--bg);
  border-color: #CBD5E1;
  transform: translateY(-1px);
}

.btn-coral {
  background: var(--secondary) !important;
  color: #FFFFFF !important;
}

.btn-coral:hover {
  background: var(--secondary-hover) !important;
}

/* Full Width Form Controls on Mobile */
@media (max-width: 768px) {
  .btn-primary,
  .btn-gradient,
  .btn-secondary,
  .btn-coral,
  .tool-btn {
    width: 100%;
    min-height: 48px;
    font-size: 16px;
  }
}

/* Status Pill Badges */
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.badge-200,
.badge-success {
  color: #059669;
  background: var(--success-bg);
  border: 1px solid var(--success-border);
}

.badge-301,
.badge-warning {
  color: #D97706;
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
}

.badge-404,
.badge-danger {
  color: #DC2626;
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
}

.badge-metric {
  color: #0284C7;
  background: var(--cyan-light);
  border: 1px solid rgba(6, 182, 212, 0.25);
}

.badge-coral {
  color: #EA580C;
  background: #FFF7ED;
  border: 1px solid rgba(249, 115, 22, 0.25);
}

.badge-brand {
  color: var(--primary);
  background: var(--primary-light);
  border: 1px solid rgba(79, 70, 229, 0.25);
}

/* ==========================================================================
   Header & Glassmorphism Navigation Bar
   ========================================================================== */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: 64px;
}

.site-nav-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

@media (max-width: 768px) {
  .site-nav-inner {
    padding: 0 16px;
  }
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Syne', 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 20px;
  color: var(--dark) !important;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-brand-dot {
  width: 9px;
  height: 9px;
  background: var(--primary);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 10px rgba(79, 70, 229, 0.6);
  animation: pulseBrand 2.5s infinite;
}

@keyframes pulseBrand {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.8; }
}

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

.nav-desktop-menu > li > a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 500;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
  white-space: nowrap;
}

.nav-desktop-menu > li > a:hover {
  color: var(--primary);
  background: var(--primary-light);
}

.nav-desktop-menu > li.active > a {
  color: var(--primary);
  font-weight: 600;
}

/* Nav Dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown > a::after {
  content: '';
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 4px;
  vertical-align: middle;
  border-left: 3.5px solid transparent;
  border-right: 3.5px solid transparent;
  border-top: 4px solid var(--text-muted);
  transition: transform 0.2s ease;
}

.nav-dropdown:hover > a::after {
  transform: rotate(180deg);
  border-top-color: var(--primary);
}

.dropdown-panel {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 36px -8px rgba(15, 23, 42, 0.12);
  min-width: 220px;
  padding: 6px;
  z-index: 1010;
}

.nav-dropdown::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  right: 0;
  height: 10px;
}

.nav-dropdown:hover .dropdown-panel {
  display: block;
  animation: fadeInDown 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translate(-50%, -6px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.dropdown-panel a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text) !important;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s ease;
  text-decoration: none;
}

.dropdown-panel a:hover {
  background: var(--bg);
  color: var(--primary) !important;
  transform: translateX(2px);
}

.dropdown-panel a .d-icon {
  font-size: 15px;
  width: 20px;
  text-align: center;
}

/* Nav CTA */
.nav-cta {
  background: var(--primary-gradient);
  color: #FFFFFF !important;
  padding: 8px 16px !important;
  border-radius: var(--radius-sm) !important;
  font-weight: 600 !important;
  font-size: 13.5px !important;
  box-shadow: 0 3px 10px rgba(79, 70, 229, 0.25);
  transition: transform 0.18s ease, box-shadow 0.18s ease !important;
}

.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.4) !important;
}

/* Mobile Hamburger Toggle */
.nav-mobile-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px;
  cursor: pointer;
  width: 40px;
  height: 40px;
  position: relative;
  align-items: center;
  justify-content: center;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.nav-mobile-toggle:hover {
  background: var(--bg);
  border-color: #CBD5E1;
}

.nav-mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.22s ease, opacity 0.22s ease;
  position: relative;
}

.nav-mobile-toggle span:nth-child(1) { transform: translateY(-5px); }
.nav-mobile-toggle span:nth-child(2) { }
.nav-mobile-toggle span:nth-child(3) { transform: translateY(5px); }

.nav-mobile-toggle.active span:nth-child(1) {
  transform: translateY(2px) rotate(45deg);
}
.nav-mobile-toggle.active span:nth-child(2) {
  opacity: 0;
}
.nav-mobile-toggle.active span:nth-child(3) {
  transform: translateY(-2px) rotate(-45deg);
}

/* Mobile Navigation Drawer */
.mobile-nav-drawer {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 999;
}

.mobile-nav-panel {
  background: #FFFFFF;
  border-bottom: 1px solid var(--border);
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  padding: 20px 16px 32px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  transform: translateY(-10px);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.mobile-nav-drawer.open {
  display: block;
}

.mobile-nav-drawer.open .mobile-nav-panel {
  transform: translateY(0);
  opacity: 1;
}

.mobile-nav-category {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light);
  margin: 16px 0 8px 8px;
}

.mobile-nav-category:first-child {
  margin-top: 0;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  color: var(--text) !important;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  min-height: 48px;
  transition: background 0.15s ease;
}

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

.mobile-nav-link .m-icon {
  font-size: 18px;
  width: 24px;
  text-align: center;
}

@media (max-width: 992px) {
  .nav-desktop-menu {
    display: none;
  }
  .nav-mobile-toggle {
    display: flex;
  }
}

/* ==========================================================================
   Hero Section Standard (Dark Slate with Subtle Ambient Glow)
   ========================================================================== */
.hero-standard {
  background-color: var(--dark-hero);
  background-image: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(79, 70, 229, 0.28), transparent 70%);
  border-bottom: 1px solid var(--dark-border);
  padding: 56px 0 48px;
  color: #FFFFFF;
}

@media (max-width: 768px) {
  .hero-standard {
    padding: 40px 0 32px;
  }
}

.hero-standard-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
  text-align: center;
}

@media (max-width: 768px) {
  .hero-standard-inner {
    padding: 0 16px;
  }
}

.hero-badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(79, 70, 229, 0.15);
  border: 1px solid rgba(79, 70, 229, 0.35);
  color: #A5B4FC;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.hero-title {
  font-family: 'Syne', 'Plus Jakarta Sans', sans-serif;
  font-size: 42px;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.03em;
  line-height: 1.18;
  margin-bottom: 14px;
}

.hero-title span {
  background: linear-gradient(135deg, #A5B4FC 0%, #38BDF8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 28px;
  }
}

.hero-subtitle {
  font-size: 17px;
  color: #94A3B8;
  max-width: 680px;
  margin: 0 auto 28px;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .hero-subtitle {
    font-size: 15px;
    margin-bottom: 20px;
  }
}

/* ==========================================================================
   Responsive Tables & Audit Grids (No Overflow / Horizontal Clipping)
   ========================================================================== */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.table-responsive table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

.table-responsive th {
  background: #F8FAFC;
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.table-responsive td {
  padding: 12px 16px;
  font-size: 13.5px;
  border-bottom: 1px solid #F1F5F9;
  vertical-align: middle;
}

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

/* Custom Styled Scrollbars */
.table-responsive::-webkit-scrollbar,
.log-box::-webkit-scrollbar {
  height: 6px;
  width: 6px;
}

.table-responsive::-webkit-scrollbar-track,
.log-box::-webkit-scrollbar-track {
  background: #F1F5F9;
  border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb,
.log-box::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover,
.log-box::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

/* ==========================================================================
   Global Footer
   ========================================================================== */
.site-footer {
  background: var(--dark-hero);
  border-top: 1px solid var(--dark-border);
  padding: 56px 0 32px;
  color: #94A3B8;
  margin-top: auto;
}

.site-footer-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
}

@media (max-width: 768px) {
  .site-footer-inner {
    padding: 0 16px;
  }
}

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

@media (max-width: 992px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 576px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

.footer-brand .f-logo {
  font-family: 'Syne', 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 20px;
  color: #FFFFFF;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.footer-brand p {
  font-size: 14px;
  line-height: 1.7;
  color: #64748B;
  max-width: 320px;
}

.footer-col h4 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #F8FAFC;
  margin-bottom: 16px;
}

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

.footer-col ul a {
  color: #94A3B8;
  font-size: 14px;
  transition: color 0.15s ease, transform 0.15s ease;
  display: inline-block;
}

.footer-col ul a:hover {
  color: #FFFFFF;
  transform: translateX(2px);
}

.footer-bottom {
  border-top: 1px solid var(--dark-border);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: #64748B;
}

.footer-bottom a {
  color: #94A3B8;
}

.footer-bottom a:hover {
  color: #FFFFFF;
}
