/* ==========================================================================
   DIGI BROTHERS — META ADS PORTFOLIO, 3D INTERACTIVE FUNNEL & CASE STUDIES
   Exact Brand System from digibrothers.net:
   --db-bg: #050507 | --db-surface: #101016 | --db-surface-2: #161622
   --db-gold: #ECC363 | --db-gold-bright: #F4D37C | --db-gold-deep: #C99A3B
   ========================================================================== */

:root {
  --db-bg: #050507;
  --db-surface: #101016;
  --db-surface-2: #161622;
  --db-silver-100: #ffffff;
  --db-silver-300: #e2e8f0;
  --db-silver-400: #cbd5e1;
  --db-silver-500: #94a3b8;
  --db-gold: #ECC363;
  --db-gold-bright: #F4D37C;
  --db-gold-deep: #C99A3B;
  --db-mint: #6EE7B7;
  --db-border: rgba(255, 255, 255, 0.1);
  --db-border-gold: rgba(236, 195, 99, 0.45);
}

.db-ads-section {
  position: relative;
  padding: 88px 0;
  background: radial-gradient(ellipse at 78% 12%, rgba(236, 195, 99, 0.08) 0%, transparent 55%),
              radial-gradient(ellipse at 18% 88%, rgba(110, 231, 183, 0.05) 0%, transparent 50%),
              #050507;
  border-top: 1px solid var(--db-border);
  border-bottom: 1px solid var(--db-border);
  color: var(--db-silver-100);
  font-family: "Manrope", "Plus Jakarta Sans", sans-serif;
}

.db-ads-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: 999px;
  background: rgba(236, 195, 99, 0.1);
  border: 1px solid var(--db-border-gold);
  color: var(--db-gold-bright);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.db-ads-eyebrow.mint {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(110, 231, 183, 0.4);
  color: var(--db-mint);
}

.db-ads-heading {
  font-family: "Outfit", "Clash Display", "Manrope", sans-serif;
  font-size: clamp(30px, 4vw, 52px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin-bottom: 14px;
}

.db-ads-heading span {
  color: var(--db-gold-bright);
}

.db-ads-lead {
  font-size: 17px;
  line-height: 1.65;
  color: var(--db-silver-400);
  max-width: 740px;
}

/* Aggregate KPI Strip */
.db-ads-kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin: 36px 0 44px;
}

.db-ads-kpi-box {
  background: var(--db-surface);
  border: 1px solid var(--db-border);
  border-radius: 18px;
  padding: 22px 24px;
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.db-ads-kpi-box:hover {
  border-color: var(--db-border-gold);
  transform: translateY(-3px);
}

.db-ads-kpi-num {
  font-family: "Outfit", sans-serif;
  font-size: 34px;
  font-weight: 800;
  color: var(--db-gold-bright);
  line-height: 1.1;
  margin-bottom: 6px;
}

.db-ads-kpi-num.mint {
  color: var(--db-mint);
}

.db-ads-kpi-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--db-silver-400);
  line-height: 1.4;
}

/* ==========================================================================
   INTERACTIVE 3D AD ENGINE ARCHITECTURE DIAGRAM
   ========================================================================== */
.db-3d-funnel-panel {
  margin: 44px 0 56px;
  background: linear-gradient(145deg, #0d0d13 0%, #101018 55%, #09090d 100%);
  border: 1px solid var(--db-border-gold);
  border-radius: 28px;
  padding: 40px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.65);
  position: relative;
  overflow: hidden;
}

.db-3d-funnel-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(236, 195, 99, 0.08) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

.db-3d-header-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 32px;
  position: relative;
  z-index: 2;
}

.db-3d-mode-switch {
  display: inline-flex;
  background: #050507;
  border: 1px solid var(--db-border);
  border-radius: 999px;
  padding: 5px;
  gap: 6px;
}

.db-3d-mode-btn {
  border: none;
  background: transparent;
  color: var(--db-silver-400);
  font-size: 13px;
  font-weight: 700;
  padding: 9px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.db-3d-mode-btn.active {
  background: linear-gradient(135deg, #ECC363 0%, #C99A3B 100%);
  color: #0A0B0E;
}

.db-3d-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.95fr;
  gap: 40px;
  align-items: center;
  position: relative;
  z-index: 2;
}

/* 3D Perspective Stage */
.db-3d-stage-wrap {
  perspective: 1400px;
  padding: 20px 10px;
  min-height: 460px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.db-3d-stack {
  width: 100%;
  max-width: 520px;
  transform-style: preserve-3d;
  transform: rotateX(12deg) rotateY(-14deg);
  transition: transform 0.25s ease-out;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
}

/* Flowing vertical data beam behind layers */
.db-3d-beam {
  position: absolute;
  left: 38px;
  top: 26px;
  bottom: 26px;
  width: 3px;
  background: linear-gradient(180deg, rgba(236, 195, 99, 0.2), rgba(110, 231, 183, 0.8), rgba(236, 195, 99, 0.2));
  border-radius: 999px;
  transform: translateZ(-12px);
  overflow: hidden;
}

.db-3d-beam::after {
  content: "";
  position: absolute;
  top: -40%;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(180deg, transparent, #F4D37C, #6EE7B7, transparent);
  animation: dbBeamPulse 2.4s linear infinite;
}

@keyframes dbBeamPulse {
  0% { top: -40%; }
  100% { top: 110%; }
}

.db-3d-layer {
  position: relative;
  background: linear-gradient(135deg, rgba(22, 22, 34, 0.95) 0%, rgba(16, 16, 22, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  transform-style: preserve-3d;
  box-shadow: -12px 18px 34px rgba(0, 0, 0, 0.55);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.25s ease, box-shadow 0.35s ease;
}

.db-3d-layer[data-depth="4"] { transform: translateZ(20px); }
.db-3d-layer[data-depth="3"] { transform: translateZ(14px); }
.db-3d-layer[data-depth="2"] { transform: translateZ(8px); }
.db-3d-layer[data-depth="1"] { transform: translateZ(2px); }

.db-3d-layer:hover {
  border-color: rgba(236, 195, 99, 0.55);
  transform: translateZ(36px) translateX(8px);
}

.db-3d-layer.active {
  border: 1.5px solid #ECC363;
  background: linear-gradient(135deg, rgba(32, 28, 18, 0.98) 0%, rgba(22, 22, 34, 0.98) 100%);
  transform: translateZ(54px) translateX(14px) scale(1.03);
  box-shadow: -18px 26px 50px rgba(0, 0, 0, 0.75), 0 0 28px rgba(236, 195, 99, 0.22);
}

.db-3d-layer-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.db-3d-node-num {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #050507;
  border: 1px solid var(--db-border-gold);
  color: var(--db-gold-bright);
  font-family: "Outfit", sans-serif;
  font-size: 15px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.db-3d-layer.active .db-3d-node-num {
  background: linear-gradient(135deg, #ECC363 0%, #C99A3B 100%);
  color: #0A0B0E;
}

.db-3d-layer-title {
  font-family: "Outfit", sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
}

.db-3d-layer-sub {
  font-size: 13px;
  color: var(--db-silver-400);
  margin-top: 2px;
}

.db-3d-layer-pill {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(110, 231, 183, 0.12);
  color: var(--db-mint);
  border: 1px solid rgba(110, 231, 183, 0.3);
  white-space: nowrap;
}

/* Right Inspector Box */
.db-3d-inspector {
  background: #09090d;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.db-insp-step-badge {
  font-size: 12px;
  font-weight: 800;
  color: var(--db-gold-bright);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.db-insp-title {
  font-family: "Outfit", sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
}

.db-insp-desc {
  font-size: 15px;
  line-height: 1.65;
  color: var(--db-silver-300);
}

.db-insp-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.db-insp-metric-card {
  background: var(--db-surface-2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 14px 16px;
}

.db-insp-metric-val {
  font-family: "Outfit", sans-serif;
  font-size: 24px;
  font-weight: 800;
  color: var(--db-gold-bright);
}

.db-insp-metric-val.mint {
  color: var(--db-mint);
}

.db-insp-metric-lbl {
  font-size: 12px;
  color: var(--db-silver-400);
  margin-top: 3px;
}

.db-insp-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   HOMEPAGE 3-CARD SUMMARY GRID + 4 PILLARS CONTENT
   ========================================================================== */
.db-ads-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 36px;
}

.db-ads-card {
  background: var(--db-surface);
  border: 1px solid var(--db-border);
  border-radius: 22px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.db-ads-card:hover {
  border-color: var(--db-border-gold);
  transform: translateY(-4px);
  box-shadow: 0 24px 55px rgba(0, 0, 0, 0.55);
}

.db-ads-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  min-height: 60px;
}

.db-ads-clinic {
  font-family: "Outfit", sans-serif;
  font-size: 21px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.25;
  margin-bottom: 4px;
}

.db-ads-doctor {
  font-size: 13px;
  font-weight: 600;
  color: var(--db-gold);
}

.db-ads-tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(110, 231, 183, 0.12);
  border: 1px solid rgba(110, 231, 183, 0.35);
  color: var(--db-mint);
  white-space: nowrap;
}

/* Proof Screenshot Bezel */
.db-proof-frame {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #ffffff;
  cursor: pointer;
}

.db-ads-cards-grid .db-proof-frame {
  height: 148px;
  display: flex;
  flex-direction: column;
  background: #ffffff;
}

.db-ads-cards-grid .db-proof-img {
  flex: 1;
  min-height: 0;
  width: 100%;
  object-fit: contain;
  object-position: center;
  background: #ffffff;
}

.db-proof-topbar {
  background: #161622;
  color: var(--db-silver-300);
  padding: 8px 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.db-proof-topbar .verified-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--db-mint);
}

.db-proof-topbar .verified-dot::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--db-mint);
}

.db-proof-img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.35s ease;
}

.db-proof-frame:hover .db-proof-img {
  transform: scale(1.02);
}

.db-proof-zoom-pill {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(5, 5, 7, 0.9);
  color: var(--db-gold-bright);
  border: 1px solid var(--db-border-gold);
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  pointer-events: none;
}

.db-card-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.db-stat-cell {
  background: var(--db-surface-2);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 12px 14px;
}

.db-stat-val {
  font-family: "Outfit", sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.1;
}

.db-stat-val.gold {
  color: var(--db-gold-bright);
}

.db-stat-lbl {
  font-size: 12px;
  color: var(--db-silver-500);
  margin-top: 3px;
}

.db-ads-card-summary {
  font-size: 14px;
  line-height: 1.55;
  color: var(--db-silver-400);
  margin: 0;
}

/* Homepage 4-Pillar Content Block */
.db-pillars-4-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-top: 44px;
}

.db-pillar-item {
  background: var(--db-surface);
  border: 1px solid var(--db-border);
  border-radius: 18px;
  padding: 22px;
}

.db-pillar-icon {
  font-size: 24px;
  margin-bottom: 12px;
}

.db-pillar-title {
  font-family: "Outfit", sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 6px;
}

.db-pillar-desc {
  font-size: 14px;
  line-height: 1.55;
  color: var(--db-silver-400);
  margin: 0;
}

/* Primary & Ghost Gold Buttons */
.db-gold-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, #ECC363 0%, #C99A3B 100%);
  color: #0A0B0E !important;
  font-family: "Outfit", sans-serif;
  font-size: 15px;
  font-weight: 800;
  padding: 14px 28px;
  border-radius: 999px;
  text-decoration: none !important;
  white-space: nowrap;
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(236, 195, 99, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.db-gold-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(236, 195, 99, 0.4);
  color: #050507 !important;
}

.db-outline-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: #ffffff !important;
  font-family: "Outfit", sans-serif;
  font-size: 14px;
  font-weight: 700;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid var(--db-border-gold);
  text-decoration: none !important;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.db-outline-btn:hover {
  background: rgba(236, 195, 99, 0.14);
  color: var(--db-gold-bright) !important;
}

/* Filter Tabs */
.db-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 36px;
}

.db-filter-btn {
  background: var(--db-surface);
  color: var(--db-silver-300);
  border: 1px solid var(--db-border);
  border-radius: 999px;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.db-filter-btn.active,
.db-filter-btn:hover {
  background: linear-gradient(135deg, #ECC363 0%, #C99A3B 100%);
  color: #0A0B0E;
  border-color: var(--db-gold);
}

/* Deep-Dive Case Study Block */
.db-case-study-block {
  background: var(--db-surface);
  border: 1px solid var(--db-border);
  border-radius: 26px;
  padding: 36px;
  margin-bottom: 32px;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 36px;
  align-items: start;
}

.db-case-study-block.featured {
  border-color: var(--db-border-gold);
  background: linear-gradient(180deg, #12121a 0%, #0d0d13 100%);
}

.db-case-title {
  font-family: "Outfit", sans-serif;
  font-size: 30px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
  margin: 12px 0 8px;
}

.db-case-sub {
  font-size: 15px;
  font-weight: 600;
  color: var(--db-gold);
  margin-bottom: 20px;
}

.db-case-copy-group {
  margin-bottom: 18px;
}

.db-case-copy-label {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--db-gold-bright);
  margin-bottom: 6px;
}

.db-case-copy-text {
  font-size: 15px;
  line-height: 1.65;
  color: var(--db-silver-300);
}

.db-case-metrics-4 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.db-case-proof-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Benchmark Data Table */
.db-bench-table-wrap {
  background: var(--db-surface);
  border: 1px solid var(--db-border);
  border-radius: 22px;
  overflow-x: auto;
  margin-top: 24px;
}

.db-bench-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  min-width: 720px;
}

.db-bench-table th {
  background: var(--db-surface-2);
  color: var(--db-gold-bright);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 16px 20px;
  border-bottom: 1px solid var(--db-border);
}

.db-bench-table td {
  padding: 16px 20px;
  font-size: 14px;
  color: var(--db-silver-300);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

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

.db-bench-table td strong {
  color: #ffffff;
}

.db-bench-table td.highlight {
  color: var(--db-mint);
  font-weight: 700;
}

/* Lightbox Modal */
.db-lightbox-modal {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 7, 0.92);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  backdrop-filter: blur(8px);
}

.db-lightbox-modal.open {
  display: flex;
}

.db-lightbox-inner {
  max-width: 820px;
  width: 100%;
  background: var(--db-surface);
  border: 1px solid var(--db-border-gold);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.85);
}

.db-lightbox-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: var(--db-surface-2);
  border-bottom: 1px solid var(--db-border);
}

.db-lightbox-title {
  font-family: "Outfit", sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
}

.db-lightbox-close {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border: none;
  border-radius: 999px;
  width: 34px;
  height: 34px;
  font-size: 18px;
  cursor: pointer;
}

.db-lightbox-body {
  padding: 16px;
  background: #0a0b0e;
  text-align: center;
  max-height: 82vh;
  overflow: auto;
}

.db-lightbox-body img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}

@media (max-width: 1024px) {
  .db-ads-kpi-strip,
  .db-pillars-4-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .db-ads-cards-grid,
  .db-3d-grid,
  .db-case-study-block {
    grid-template-columns: 1fr;
  }
  .db-3d-funnel-panel {
    padding: 24px;
  }
  .db-3d-stack {
    transform: rotateX(6deg) rotateY(-6deg);
  }
}

@media (max-width: 576px) {
  .db-ads-kpi-strip,
  .db-pillars-4-grid,
  .db-card-stats,
  .db-case-metrics-4,
  .db-insp-metrics {
    grid-template-columns: 1fr;
  }
}
