/* Custom CSS for CoreDNS-GSLB docs */
:root {
  --md-primary-fg-color: #0f172a !important;
  /* Sleek Slate 900 */
  --md-primary-fg-color--dark: #020617 !important;
  --md-accent-fg-color: #06b6d4 !important;
  /* Vibrant Cyan 500 */
}

/* Show and size the header logo */
.md-header .md-logo {
  display: block !important;
}

.md-header .md-logo img {
  height: 1.8rem !important;
  width: auto !important;
}

/* Hide site title text in the header since the logo already contains the text */
.md-header__topic:first-child {
  display: none !important;
}

[data-md-color-scheme="slate"] {
  --md-primary-fg-color: #0b0f19 !important;
  --md-primary-fg-color--dark: #030712 !important;
  --md-accent-fg-color: #22d3ee !important;
}

/* Glassmorphism for Header */
.md-header {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background-color: rgba(15, 23, 42, 0.8) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

[data-md-color-scheme="default"] .md-header {
  background-color: rgba(255, 255, 255, 0.8) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
  color: #0f172a !important;
}

[data-md-color-scheme="default"] .md-header a,
[data-md-color-scheme="default"] .md-header label {
  color: #0f172a !important;
}

/* Smooth transitions for hoverable elements */
.feature-box,
.btn-primary,
.btn-secondary,
.md-nav__link,
.md-header,
.md-header a,
.md-header label {
  transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.2s ease, box-shadow 0.2s ease, color 0.25s ease;
}

/* Stunning Hero Section card */
.hero-card {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.06) 0%, rgba(99, 102, 241, 0.06) 100%);
  border: 1px solid rgba(6, 182, 212, 0.15);
  border-radius: 16px;
  padding: 1.75rem 2rem;
  margin-top: -1.5rem;
  margin-bottom: 2.5rem;
  text-align: center;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
}

[data-md-color-scheme="slate"] .hero-card {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.04) 0%, rgba(99, 102, 241, 0.04) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-title {
  font-size: 2.8rem;
  font-weight: 800;
  background: linear-gradient(90deg, #06b6d4, #6366f1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-top: 0.5rem;
  letter-spacing: -0.025em;
}

/* Custom cards for features grid */
.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.feature-box {
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  padding: 1.75rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

[data-md-color-scheme="slate"] .feature-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.feature-box:hover {
  transform: translateY(-5px);
  border-color: rgba(6, 182, 212, 0.5) !important;
  box-shadow: 0 12px 30px rgba(6, 182, 212, 0.15) !important;
}

.feature-box h3 {
  margin-top: 0 !important;
  margin-bottom: 0.75rem !important;
  color: var(--md-accent-fg-color) !important;
  font-size: 1.25rem !important;
  font-weight: 700 !important;
}

.feature-box p {
  font-size: 0.925rem;
  line-height: 1.6;
  margin: 0;
  color: var(--md-typeset-color);
}

/* Custom step-box styling for Where to Start? section */
.step-box h3 {
  color: var(--md-typeset-color) !important;
  transition: color 0.25s ease;
}

.step-box:hover h3 {
  color: var(--md-accent-fg-color) !important;
}

.step-box:hover {
  border-color: rgba(6, 182, 212, 0.5) !important;
  box-shadow: 0 12px 30px rgba(6, 182, 212, 0.15) !important;
}

/* Beautiful buttons */
.btn-primary {
  display: inline-block;
  background: linear-gradient(90deg, #06b6d4, #4f46e5);
  color: white !important;
  padding: 0.8rem 2rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none !important;
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.45);
}

.btn-secondary {
  display: inline-block;
  padding: 0.8rem 2rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none !important;
}

[data-md-color-scheme="slate"] .btn-secondary {
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #e2e8f0 !important;
}

[data-md-color-scheme="default"] .btn-secondary {
  background: rgba(0, 0, 0, 0.05) !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  color: #1e293b !important;
}

.btn-secondary:hover {
  background: rgba(6, 182, 212, 0.1) !important;
  border-color: rgba(6, 182, 212, 0.3) !important;
  transform: translateY(-2px);
}

/* 2-column grid layout */
.grid-2-cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

@media screen and (min-width: 768px) {
  .grid-2-cols {
    grid-template-columns: 1fr 1fr;
  }
}

/* Fix active and hovered navigation / TOC links visibility (especially in dark mode) */
.md-nav__link:hover,
.md-nav__link--active {
  color: var(--md-accent-fg-color) !important;
}

/* Center Mermaid diagrams */
.mermaid {
  display: flex;
  justify-content: center;
  margin: 1.5rem auto !important;
}

/* Style body links to be clearly visible and distinct from bold text */
.md-typeset a:not(.btn-primary):not(.btn-secondary):not(.feature-box) {
  color: var(--md-accent-fg-color) !important;
  border-bottom: 1px dashed rgba(6, 182, 212, 0.4);
  transition: border-bottom-color 0.2s ease, opacity 0.2s ease;
}

.md-typeset a:not(.btn-primary):not(.btn-secondary):not(.feature-box):hover {
  border-bottom: 1px solid var(--md-accent-fg-color);
  opacity: 0.85;
}

/* Custom styling for DNS sister tools (Yellow/Amber) */
.dns-collector-box h3,
.dns-tester-box h3 {
  color: #f59e0b !important;
}

[data-md-color-scheme="slate"] .dns-collector-box h3,
[data-md-color-scheme="slate"] .dns-tester-box h3 {
  color: #fbbf24 !important;
}

.dns-collector-box:hover,
.dns-tester-box:hover {
  border-color: rgba(245, 158, 11, 0.5) !important;
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.15) !important;
}