/* ===== DK CORE PALETTE ===== */
:root {
  --dk-bg: #0b0d0f;
  --dk-card: #121417;
  --dk-ink: #e7ecef;
  --dk-ink-muted: #b4bdc3;
  --dk-accent: #c72a2a; /* DK red */
  --dk-green: #2bb673;
  --dk-yellow: #f5b301;
  --dk-border: #2a3138;
}

/* ===== BASE ===== */
body {
  background: var(--dk-bg) !important;
  color: var(--dk-ink) !important;
  font-feature-settings: "ss01" on, "ss02" on;
}

/* Emergency top banner */
.dk-emergency {
  position: sticky; top: 0; z-index: 999;
  background: linear-gradient(90deg, var(--dk-accent), #f86262);
  color: #fff; padding: 10px 16px; text-align: center;
  font-weight: 700; letter-spacing: 0.02em;
}
.dk-emergency a { color: #fff; text-decoration: underline; }

.theme-dark {
  --background-primary: #000000 !important;
  --background-secondary: #000000 !important;
  --nav-item-color: #bbbbbb !important;
  --nav-item-color-active: #ffffff !important;
  --nav-item-background-active: #101010 !important;
  --nav-item-background-hover: #030303 !important;
}

/* Optional: remove right border on Publish sidebar */
.published-container .published-sidebar {
  border-right: none !important;
}

/* ===== Obsidian Publish sidebar — force AMOLED + kill purple ===== */

/* Base panel */
.published-container .published-sidebar{
  background:#000 !important;
  color:#e7ecef !important;
  border-right:none !important;
}

/* Default row colors */
.published-container .published-sidebar .nav-file-title,
.published-container .published-sidebar .nav-folder-title,
.published-container .published-sidebar .tree-item-self{
  background:transparent !important;
  color:#cfd6db !important;
}

/* Hover rows */
.published-container .published-sidebar .nav-file-title:hover,
.published-container .published-sidebar .nav-folder-title:hover,
.published-container .published-sidebar .tree-item-self:hover{
  background:#0a0a0a !important;
  color:#ffffff !important;
}

/* ACTIVE row container */
.published-container .published-sidebar .nav-file-title.is-active,
.published-container .published-sidebar .nav-folder-title.is-active,
.published-container .published-sidebar .tree-item-self.is-active{
  background:#0a0a0a !important;
  color:#ffffff !important;
  border-color:transparent !important;
  box-shadow:none !important;
}

/* ACTIVE row inner text (this is the missing piece) */
.published-container .published-sidebar .nav-file-title.is-active .nav-file-title-content,
.published-container .published-sidebar .nav-folder-title.is-active .nav-folder-title-content,
.published-container .published-sidebar .tree-item-self.is-active .tree-item-inner{
  color:#ffffff !important;
}

/* Kill purple indicators/pseudo accents from themes */
.published-container .published-sidebar .tree-item-self.is-active::before,
.published-container .published-sidebar .tree-item-self.is-active::after,
.published-container .published-sidebar .nav-file-title.is-active::before,
.published-container .published-sidebar .nav-file-title.is-active::after,
.published-container .published-sidebar .nav-folder-title.is-active::before,
.published-container .published-sidebar .nav-folder-title.is-active::after{
  content:none !important; display:none !important; background:none !important; border:0 !important; box-shadow:none !important;
}

/* Ensure links don't reintroduce accent color */
.published-container .published-sidebar a{
  color:inherit !important;
  text-decoration:none !important;
}

/* Optional: set Publish accent vars to DK or neutral so nothing purple leaks */
.published-container{
  --color-accent: var(--dk-accent) !important;       /* or #e7ecef if you want neutral */
  --interactive-accent: var(--dk-accent) !important;
  --text-accent: var(--dk-accent) !important;
}

/* ===== BUTTONS (square w/ rounded corners, white-outline default) ===== */
.btn-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 10px auto;
  width: 100%;
  text-align: center;
}

/* Ghost button: white outline, white text → red fill on hover */
.ghost-btn {
  display: inline-block;
  padding: 12px 18px;
  border-radius: 12px;                     /* rounded-square corners */
  border: 1px solid #fff;                  /* white outline */
  background: #000;                        /* default black */
  color: #fff;                             /* white text */
  text-decoration: none !important;
  font-weight: 600;
  line-height: 1;
  transition: all 0.25s ease;
}
.ghost-btn:hover {
  background: var(--dk-accent);            /* red fill */
  border-color: var(--dk-accent);          /* red border */
  color: #fff;                             /* keep white text */
}

/* Primary button: solid red by default */
.primary-btn {
  display: inline-block;
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid var(--dk-accent);
  background: var(--dk-accent);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  line-height: 1;
  transition: all 0.25s ease;
}
.primary-btn:hover {
  background: #ff5050;
  border-color: #ff5050;
}

/* Ensure hero buttons stay perfectly centered */
.markdown-preview-sizer,
.published-container {
  margin-left: auto;
  margin-right: auto;
}

/* ===== GRID + CARDS ===== */
.grid { display:grid; gap:16px; grid-template-columns:repeat(auto-fit, minmax(260px, 1fr)); width:100%; }
.card {
  background: var(--dk-card);
  border: 1px solid var(--dk-border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 0 0 1px var(--dk-border) inset, 0 1px 0 rgba(255,255,255,.03) inset;
}
.card h3 { margin: 0 0 8px; font-size: 1.1rem; }
.card p { margin: 0; color: var(--dk-ink-muted); }
.card .meta { font-size: .85rem; color: var(--dk-ink-muted); margin-top: 6px; }

/* Image cards (gallery) */
.card.img { padding: 0; overflow: hidden; }
.card.img .thumb { width:100%; aspect-ratio:16/10; object-fit:cover; display:block; }
.card.img .body { padding:12px 14px; }

/* ===== SERVICE CARDS (anchor-as-card only) ===== */
.grid > a.card { display:block; text-decoration:none !important; color:inherit; }
.grid > a.card h3 { color:var(--dk-accent); margin:0 0 6px; }
.grid > a.card p { color:var(--dk-ink); }
.grid > a.card .meta { color:var(--dk-ink-muted); }
.grid > a.card:hover h3 { color:#ff5050; }

/* ===== WHY DK CARD — FULL REPLACEMENT ===== */
.card.side {
  position: relative;
  overflow: hidden;

  /* base card container */
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;

  background: var(--dk-card);
  border: 1px solid var(--dk-border);
  border-radius: 16px;
  padding: 0; /* override global .card padding */
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  transition: box-shadow .3s ease, transform .3s ease;
}

.card.side:hover {
  box-shadow: 0 6px 28px rgba(0,0,0,0.45);
  transform: translateY(-2px);
}

/* precision red divider between halves */
.card.side::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 50%;
  width: 2px;
  background: linear-gradient(
    to bottom,
    rgba(222,59,59,0.3) 0%,
    rgba(222,59,59,0.5) 50%,
    rgba(222,59,59,0.3) 100%
  );
  transform: translateX(-50%);
  z-index: 2;
  pointer-events: none;
}

/* left photo */
.card.side img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* right content column */
.card.side .body {
  position: relative;
  padding: 32px;
  z-index: 1;
}

/* FULL-HEIGHT TINT that reaches the edge (under the border/radius) */
.card.side .body::before {
  content: "";
  position: absolute;
  /* tiny bleed so it sits perfectly flush */
  inset: -1px -1px -1px 0;      /* top right bottom left */
  background: linear-gradient(90deg, rgba(222,59,59,0.15) 0%, rgba(222,59,59,0.20) 100%);
  border-left: 1px solid rgba(222,59,59,0.25);
  border-top-right-radius: 16px;
  border-bottom-right-radius: 16px;
  z-index: -1;
}

/* inner text styles */
.card.side .body h2 {
  margin: 0 0 .75rem;
  font-size: 1.75rem;
}
.why-dk-list { list-style: none; padding: 0; margin: 1rem 0 1.5rem; }
.why-dk-list li { margin-bottom: .5rem; color: var(--dk-ink-muted); }
.why-dk-list strong { color: var(--dk-ink); }

/* keep the "Meet Team DK" button white by default */
.card.side .ghost-btn {
  border-color: #fff;
  color: #fff;
  text-decoration: none !important;
}
.card.side .ghost-btn:hover {
  background: var(--dk-accent);
  border-color: var(--dk-accent);
  color: #fff;
  text-decoration: none !important;
}

/* mobile */
@media (max-width: 768px){
  .card.side { grid-template-columns: 1fr; }
  .card.side::before { display: none; }
  .card.side img { height: 260px; }
  .card.side .body::before {
    inset: 0; /* cover entire text panel on mobile */
    border-left: none;
    border-top: 1px solid rgba(222,59,59,0.25);
    background: rgba(222,59,59,0.10);
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
  }
}

/* Meet Team DK button override */
.card.side .ghost-btn {
  border-color: #fff;
  color: #fff;
  text-decoration: none !important;
}
.card.side .ghost-btn:hover {
  background: var(--dk-accent);
  border-color: var(--dk-accent);
  color: #fff;
  text-decoration: none !important;
}

/* ===== FOOTER (3 rows; top row bullets) ===== */
.dk-footer { color:var(--dk-ink-muted); font-size:.9rem; text-align:center; margin-top:3rem; line-height:1.6; }
.dk-footer .footer-row { margin:4px 0; }
.dk-footer .footer-row.top .sep { opacity:.5; padding:0 8px; }
.dk-footer a { color:var(--dk-ink); text-decoration:none; }
.dk-footer a:hover { color:var(--dk-accent); }

/* Force hero section to stay centered */
.dk-hero {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  width: 100%;
  max-width: 1100px;
  margin-top: 0.1rm;
  padding: .1rem .1rem;
}

.dk-hero h1,
.dk-hero p,
.dk-hero .btn-row {
  text-align: center !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.card.side .body {
  background: linear-gradient(90deg, rgba(222,59,59,0.18) 0%, rgba(222,59,59,0.18) 100%);
}

.primary-btn,
.ghost-btn {
  background: #000;
  border: 1px solid #fff;
  color: #fff;
}
.primary-btn:hover,
.ghost-btn:hover {
  background: var(--dk-accent);
  border-color: var(--dk-accent);
  color: #fff;
}

.markdown-preview-sizer { margin: 0 auto !important; }

.ghost-btn,
.primary-btn {
  text-decoration: none !important;
}
.ghost-btn:hover,
.primary-btn:hover {
  text-decoration: none !important;
}

/* ===== Unified sticky header (constrained to content width) ===== */
.dk-header{
  position: sticky; top: 0; z-index: 9999;
  background: rgba(0,0,0,.98);
  border-bottom: 1px solid var(--dk-border);
  backdrop-filter: blur(6px);
}

/* Header shell: transparent so the bar isn't boxed */
.dk-header{
  position: sticky; top: 0; z-index: 9999;
  background: transparent;
  border-bottom: none;
}

/* Full-bleed emergency strip */
.dk-header__emergency{
  background: linear-gradient(90deg, var(--dk-accent), #f86262);
  color:#fff; text-align:center; font-weight:700; letter-spacing:.02em;
  padding:.55rem 1rem;

  /* make it span the whole viewport width */
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}
.dk-header__emergency a{ color:#fff; text-decoration: underline; }

/* Logo-only centered row under the emergency bar */
.dk-header__wrap.logo-only{
  max-width:1100px;  /* small gap under the red bar, 2nd number is space below */
  margin-bottom: 2.0rem;
  margin-top: 2rem;
  padding: .1rem .1rem;
  display:flex; justify-content:center; align-items:center;
}

/* Size the logo */
.dk-header__wrap.logo-only img{
  height: 165px;          /* try 56–64 on desktop */
  width: auto; display:block;
  filter: drop-shadow(0 0 4px rgba(0,0,0,.25));
}

@media (max-width: 768px){
  .dk-header__wrap.logo-only img{ height: 85px; }
}

