/* Domain Tools - Professional Design
   Colors: Primary #ee7d36 (Orange) | Dark #1a1a2e (Blue)
*/

/* ============================================
   CSS VARIABLES
============================================ */
:root {
  --primary: #ee7d36;
  --primary-hover: #d96a25;
  --primary-light: rgba(238, 125, 54, 0.1);
  --primary-rgb: 238, 125, 54;

  --dark: #1a1a2e;
  --dark-hover: #252542;
  --dark-light: #2d2d4a;
  --dark-rgb: 26, 26, 46;

  /* Blue-toned grays */
  --gray-50: #f8f8fa;
  --gray-100: #f0f0f4;
  --gray-200: #e2e2e8;
  --gray-300: #c8c8d4;
  --gray-400: #8585a0;
  --gray-500: #5a5a72;
  --gray-600: #4a4a5c;
  --gray-700: #3d3d52;
  --gray-800: #2d2d42;
  --gray-900: #1a1a2e;

  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;

  --border-radius: 12px;
  --border-radius-sm: 8px;
  --border-radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

  --transition: all 0.2s ease;
  --transition-slow: all 0.3s ease;
}

/* ============================================
   BASE STYLES
============================================ */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--dark);
  background-color: var(--gray-50);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.font-mono, pre, code, .result-box {
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
}

/* ============================================
   BOOTSTRAP OVERRIDES
============================================ */
/* Force dark blue color on all text */
body,
p,
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
label,
span,
div,
li,
a:not(.btn):not(.text-primary):not(.nav-link),
.card-title,
.card-text,
.form-label,
.fw-bold,
.fw-semibold,
.fw-medium,
.lead,
.text-dark,
.text-body {
  color: var(--dark);
}

/* Primary color override */
.bg-primary {
  background-color: var(--primary) !important;
}

.text-primary {
  color: var(--primary) !important;
}

.text-dark {
  color: var(--dark) !important;
}

.text-body {
  color: var(--dark) !important;
}

/* Secondary/muted text - lighter blue tones */
.text-muted,
.text-secondary {
  color: #3d3d52 !important;
}

.opacity-75,
.opacity-50 {
  color: #3d3d52 !important;
  opacity: 1 !important;
}

/* Override Bootstrap's gray utilities with blue tones */
.text-body-secondary {
  color: #3d3d52 !important;
}

/* Small text inherits blue-toned color */
small,
.small {
  color: inherit;
}

.small.text-muted,
small.text-muted {
  color: #3d3d52 !important;
}

/* Description lists */
dt {
  color: var(--dark);
}

dt.text-muted {
  color: #3d3d52 !important;
}

.btn-primary {
  background-color: var(--primary);
  border-color: var(--primary);
  color: white;
  font-weight: 500;
  padding: 0.625rem 1.5rem;
  border-radius: var(--border-radius-sm);
  transition: var(--transition);
}

.btn-primary:hover, .btn-primary:focus {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
  color: white;
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn-primary:focus {
  box-shadow: 0 0 0 3px rgba(26, 26, 46, 0.25) !important;
}

.btn-primary:active {
  transform: translateY(0);
  background-color: var(--dark) !important;
  border-color: var(--dark) !important;
}

.btn-outline-primary {
  color: var(--primary);
  border-color: var(--primary);
  border-width: 2px;
  font-weight: 500;
  padding: 0.5625rem 1.5rem;
  border-radius: var(--border-radius-sm);
  transition: var(--transition);
}

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

.btn-outline-primary:focus {
  box-shadow: 0 0 0 3px rgba(26, 26, 46, 0.25) !important;
}

.btn-outline-primary:active {
  background-color: var(--dark) !important;
  border-color: var(--dark) !important;
}

/* Dark button */
.btn-dark {
  background-color: var(--dark);
  border-color: var(--dark);
  color: white;
  font-weight: 500;
  padding: 0.625rem 1.5rem;
  border-radius: var(--border-radius-sm);
  transition: var(--transition);
}

.btn-dark:hover, .btn-dark:focus {
  background-color: var(--dark-hover);
  border-color: var(--dark-hover);
  color: white;
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn-dark:focus {
  box-shadow: 0 0 0 3px rgba(26, 26, 46, 0.25) !important;
}

.btn-outline-dark {
  color: var(--dark);
  border-color: var(--dark);
  border-width: 2px;
  font-weight: 500;
  border-radius: var(--border-radius-sm);
}

.btn-outline-dark:hover {
  background-color: var(--dark);
  border-color: var(--dark);
  color: white;
}

.btn-outline-dark:focus {
  box-shadow: 0 0 0 3px rgba(26, 26, 46, 0.25) !important;
}

/* Global button focus override - remove Bootstrap blue */
.btn:focus,
.btn:active:focus,
.btn.active:focus,
.btn.show:focus {
  box-shadow: 0 0 0 3px rgba(26, 26, 46, 0.25) !important;
}

.btn-check:focus + .btn,
.btn-check:checked + .btn {
  box-shadow: 0 0 0 3px rgba(26, 26, 46, 0.25) !important;
}

/* Light button for dark backgrounds */
.btn-light {
  background-color: white;
  border-color: white;
  color: var(--dark);
  font-weight: 600;
  padding: 0.625rem 1.5rem;
  border-radius: var(--border-radius-sm);
  transition: var(--transition);
}

.btn-light:hover {
  background-color: var(--gray-100);
  border-color: var(--gray-100);
  color: var(--dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

/* Large buttons */
.btn-lg {
  padding: 0.875rem 2rem;
  font-size: 1rem;
  border-radius: var(--border-radius);
}

/* ============================================
   HEADER / NAVBAR
============================================ */
.navbar {
  padding: 1rem 0;
  background-color: white !important;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar-brand img {
  height: 56px;
  width: auto;
}

.navbar-nav .nav-link {
  color: var(--dark);
  font-weight: 500;
  font-size: 0.9375rem;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius-sm);
  transition: var(--transition);
}

.navbar-nav .nav-link:hover {
  color: var(--primary);
  background-color: var(--primary-light);
}

.navbar-nav .nav-link.active {
  color: var(--primary);
  font-weight: 600;
}

/* ============================================
   HERO SECTION
============================================ */
.hero-section {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-light) 100%);
  color: white !important;
  padding: 5rem 0;
  position: relative;
  overflow: hidden;
}

.hero-section h1,
.hero-section h2,
.hero-section p,
.hero-section .lead {
  color: white !important;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.hero-section h1 {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.hero-section .text-accent {
  color: var(--primary);
}

.hero-section .lead {
  font-size: 1.25rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto 2.5rem;
}

/* Hero search box */
.hero-search {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: var(--border-radius-lg);
  padding: 1.5rem;
  max-width: 700px;
  margin: 0 auto;
}

.hero-search .form-control {
  background-color: white;
  border: none;
  border-radius: var(--border-radius-sm);
  padding: 1rem 1.25rem;
  font-size: 1rem;
  box-shadow: var(--shadow);
}

.hero-search .form-control:focus {
  box-shadow: 0 0 0 3px rgba(26, 26, 46, 0.25);
}

.hero-search .btn {
  padding: 1rem 2rem;
  border-radius: var(--border-radius-sm);
}

/* ============================================
   TOOL CARDS
============================================ */
.tool-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--border-radius);
  transition: var(--transition-slow);
  overflow: hidden;
}

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

.tool-card .card-body {
  padding: 1.5rem;
}

.tool-card .tool-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  border-radius: var(--border-radius-sm);
  color: white;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.tool-card .card-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 0;
}

.tool-card .card-text {
  color: var(--gray-700);
  font-size: 0.9375rem;
  line-height: 1.5;
}

/* ============================================
   FEATURE BOXES
============================================ */
.feature-box {
  text-align: center;
  padding: 2rem 1.5rem;
}

.feature-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 1.75rem;
}

.feature-icon.primary {
  background-color: var(--primary-light);
  color: var(--primary);
}

.feature-icon.success {
  background-color: rgba(34, 197, 94, 0.1);
  color: var(--success);
}

.feature-icon.warning {
  background-color: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

.feature-box h5 {
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 0.75rem;
}

.feature-box p {
  color: var(--gray-700);
  font-size: 0.9375rem;
  margin-bottom: 0;
}

/* ============================================
   SECTIONS
============================================ */
.section {
  padding: 5rem 0;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 1rem;
  text-align: center;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--gray-700);
  text-align: center;
  max-width: 600px;
  margin: 0 auto 3rem;
}

/* ============================================
   FOOTER
============================================ */
.site-footer {
  background-color: var(--dark);
  color: white !important;
  padding: 4rem 0 2rem;
}

.site-footer .footer-logo {
  height: 56px;
  width: auto;
  margin-bottom: 1rem;
}

.site-footer .footer-description {
  color: var(--gray-400) !important;
  font-size: 0.9375rem;
  line-height: 1.6;
  max-width: 280px;
}

.site-footer h6 {
  color: white !important;
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.25rem;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer ul li {
  margin-bottom: 0.75rem;
  color: var(--gray-400) !important;
}

.site-footer ul a {
  color: var(--gray-400) !important;
  text-decoration: none;
  font-size: 0.9375rem;
  transition: var(--transition);
}

.site-footer ul a:hover {
  color: var(--primary) !important;
}

.site-footer hr {
  border-color: var(--dark-light);
  opacity: 1;
  margin: 2rem 0;
}

.site-footer .footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.site-footer .footer-bottom p {
  color: var(--gray-500);
  font-size: 0.75rem;
  margin: 0;
}

.site-footer .footer-bottom a {
  color: var(--primary) !important;
  text-decoration: none;
}

.site-footer .footer-bottom a:hover {
  color: var(--primary-hover) !important;
  text-decoration: underline;
}

.site-footer .footer-agency-logo {
  height: 16px;
  width: auto;
  vertical-align: middle;
  margin-left: 4px;
  opacity: 0.9;
  transition: var(--transition);
}

.site-footer .footer-agency-logo:hover {
  opacity: 1;
}

/* ============================================
   FORMS
============================================ */
.form-control, .form-select {
  border: 2px solid var(--gray-200);
  border-radius: var(--border-radius-sm);
  padding: 0.75rem 1rem;
  font-size: 1rem;
  transition: var(--transition);
  color: var(--dark);
}

.form-control::placeholder {
  color: #6b6b7a;
}

.form-control:focus, .form-select:focus {
  border-color: var(--dark);
  box-shadow: 0 0 0 3px rgba(26, 26, 46, 0.15);
}

.form-control-lg {
  padding: 1rem 1.25rem;
  font-size: 1rem;
}

.form-label {
  font-weight: 500;
  color: var(--dark);
  margin-bottom: 0.5rem;
}

/* ============================================
   RESULT BOX
============================================ */
.result-box {
  background-color: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: var(--border-radius);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  overflow-x: auto;
  white-space: normal;
  word-break: break-word;
  line-height: 1.5;
}

.result-box div {
  padding: 0.125rem 0;
}

/* Hide empty divs */
.result-box div:empty {
  display: none;
}

/* For pre-formatted text that needs whitespace preserved */
.result-box.preserve-whitespace {
  white-space: pre-wrap;
}

/* ============================================
   CARDS
============================================ */
.card {
  border: 1px solid var(--gray-200);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.card-header {
  background-color: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  padding: 1rem 1.5rem;
  font-weight: 600;
  color: var(--dark);
}

.card-header h1,
.card-header h2,
.card-header h3,
.card-header h4,
.card-header h5,
.card-header h6 {
  color: var(--dark);
}

.card-body {
  padding: 1.5rem;
}

.card.clickable:hover {
  border-color: var(--primary);
  cursor: pointer;
}

/* ============================================
   TABLES
============================================ */
.table {
  border-radius: var(--border-radius);
  overflow: hidden;
}

.table th {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--gray-700);
  background-color: var(--gray-50);
  border-bottom: 2px solid var(--gray-200);
  padding: 1rem;
}

.table td {
  padding: 1rem;
  vertical-align: middle;
  border-color: var(--gray-100);
}

/* ============================================
   BADGES
============================================ */
.badge {
  font-weight: 500;
  padding: 0.5em 0.85em;
  border-radius: var(--border-radius-sm);
}

.badge.bg-success-subtle {
  background-color: rgba(34, 197, 94, 0.1);
  color: #16a34a;
}

.badge.bg-danger-subtle {
  background-color: rgba(239, 68, 68, 0.1);
  color: #dc2626;
}

.badge.bg-warning-subtle {
  background-color: rgba(245, 158, 11, 0.1);
  color: #d97706;
}

.badge.bg-info-subtle {
  background-color: rgba(59, 130, 246, 0.1);
  color: #2563eb;
}

.badge.bg-primary-subtle {
  background-color: var(--primary-light);
  color: var(--primary);
}

/* ============================================
   ALERTS
============================================ */
.alert {
  border: none;
  border-radius: var(--border-radius);
  padding: 1rem 1.25rem;
}

.alert-success {
  background-color: rgba(34, 197, 94, 0.1);
  color: #16a34a;
}

.alert-danger {
  background-color: rgba(239, 68, 68, 0.1);
  color: #dc2626;
}

.alert-warning {
  background-color: rgba(245, 158, 11, 0.1);
  color: #d97706;
}

.alert-info {
  background-color: rgba(59, 130, 246, 0.1);
  color: #2563eb;
}

/* ============================================
   LOADING STATES
============================================ */
.spinner-border {
  color: var(--primary);
}

.spinner-border-sm {
  width: 1rem;
  height: 1rem;
}

/* ============================================
   ADMIN SIDEBAR
============================================ */
.admin-sidebar .nav-link {
  color: var(--gray-700);
  padding: 0.75rem 1rem;
  border-radius: var(--border-radius-sm);
  margin-bottom: 0.25rem;
  transition: var(--transition);
}

.admin-sidebar .nav-link:hover {
  background-color: var(--primary-light);
  color: var(--primary);
}

.admin-sidebar .nav-link.active {
  background-color: var(--primary);
  color: white;
  font-weight: 500;
}

.admin-sidebar .nav-link i {
  width: 20px;
  text-align: center;
  margin-right: 0.75rem;
}

/* ============================================
   UTILITIES
============================================ */
.text-accent {
  color: var(--primary) !important;
}

.bg-dark-custom {
  background-color: var(--dark) !important;
}

.border-primary {
  border-color: var(--primary) !important;
}

.shadow-primary {
  box-shadow: 0 4px 14px 0 rgba(238, 125, 54, 0.3);
}

/* Link hover effects */
a.text-muted:hover {
  color: var(--primary) !important;
}

/* Smooth transitions for all interactive elements */
.nav-link, .btn, .card, a {
  transition: var(--transition);
}

/* ============================================
   PAGE SPECIFIC - TOOL PAGES
============================================ */
.tool-page-header {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-light) 100%);
  color: white !important;
  padding: 3rem 0;
  margin-bottom: 2rem;
}

.tool-page-header h1,
.tool-page-header h2,
.tool-page-header p {
  color: white !important;
}

.tool-page-header h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.tool-page-header p {
  opacity: 0.8;
  margin-bottom: 0;
}

.tool-page-header .tool-icon-large {
  width: 64px;
  height: 64px;
  background: var(--primary);
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: white;
}

/* ============================================
   OFFCANVAS MENU
============================================ */
.offcanvas {
  background-color: var(--dark);
}

.offcanvas-header {
  border-bottom: 1px solid var(--dark-light);
  padding: 1.5rem;
}

.offcanvas-header .btn-close {
  filter: invert(1);
  opacity: 0.8;
}

.offcanvas-header .btn-close:hover {
  opacity: 1;
}

.offcanvas-body {
  padding: 1.5rem;
}

.offcanvas .navbar-nav .nav-link {
  color: rgba(255, 255, 255, 0.85) !important;
  padding: 0.875rem 1rem;
  border-radius: var(--border-radius-sm);
  margin-bottom: 0.25rem;
  font-size: 1rem;
}

.offcanvas .navbar-nav .nav-link:hover {
  color: white !important;
  background-color: var(--dark-light);
}

.offcanvas .navbar-nav .nav-link.active {
  color: var(--primary) !important;
  background-color: var(--dark-light);
}

.offcanvas .navbar-nav .nav-link i {
  width: 24px;
  display: inline-block;
  color: inherit !important;
}

/* ============================================
   RESPONSIVE
============================================ */
@media (max-width: 991.98px) {
  .hero-section {
    padding: 3rem 0;
  }

  .hero-section h1 {
    font-size: 2.25rem;
  }

  .section {
    padding: 3rem 0;
  }

  .navbar-nav {
    padding-top: 1rem;
  }

  .navbar-nav .nav-link {
    padding: 0.75rem 0;
  }
}

@media (max-width: 575.98px) {
  .hero-section h1 {
    font-size: 1.875rem;
  }

  .hero-section .lead {
    font-size: 1rem;
  }

  .hero-search {
    padding: 1rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .tool-card .card-body {
    padding: 1.25rem;
  }

  .site-footer {
    text-align: center;
  }

  .site-footer .footer-description {
    max-width: 100%;
  }

  .site-footer .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .site-footer .footer-bottom p {
    text-align: center;
  }
}
