.jdwb-site {
  font-family: var(--jdwb-font, Montserrat, system-ui, -apple-system, Segoe UI, sans-serif);
  color: #071836;
}

.jdwb-site h1,
.jdwb-site h2 {
  font-weight: 800;
  letter-spacing: 0;
}

.jdwb-site h1 { font-size: 2.25rem; }
.jdwb-site h2 { font-size: 2rem; }
.jdwb-site h3 { font-size: 1.35rem; font-weight: 700; }

@media (min-width: 768px) {
  .jdwb-site h1 { font-size: 3.25rem; }
  .jdwb-site h2 { font-size: 2.5rem; }
}

.jdwb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.2;
  padding: 0.55rem 1.15rem;
  text-decoration: none;
}

.jdwb-btn:hover {
  color: #fff;
  filter: brightness(0.92);
}

.jdwb-navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
}

.jdwb-navbar .navbar-brand img,
.jdwb-footer img {
  height: 64px;
  max-width: 220px;
  object-fit: contain;
}

.jdwb-navbar .nav-link {
  color: #fff;
  font-weight: 600;
}

.jdwb-hero {
  align-items: center;
  display: flex;
  min-height: 82vh;
}

.jdwb-hero-centered {
  justify-content: center;
  text-align: center;
}

.jdwb-hero-bottom {
  align-items: flex-end;
  min-height: 70vh;
  padding-bottom: 4rem;
}

.jdwb-hero-subtitle,
.jdwb-text-block p,
.jdwb-image-text p {
  font-size: 1.1rem;
}

.jdwb-rounded-img {
  border-radius: 8px;
  display: block;
  height: auto;
  width: 100%;
}

.jdwb-card {
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 1.25rem;
}

.jdwb-image-card {
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}

.jdwb-image-card img {
  aspect-ratio: 16 / 9;
  display: block;
  object-fit: cover;
  width: 100%;
}

.jdwb-image-card h3 {
  background: rgba(7, 24, 54, 0.86);
  bottom: 0;
  color: #fff;
  margin: 0;
  padding: 0.85rem 1rem;
  position: absolute;
  width: 100%;
}

.jdwb-gallery-marquee {
  display: flex;
  overflow: hidden;
  position: relative;
  white-space: nowrap;
}

.jdwb-gallery-track {
  animation: jdwb-scroll-horizontal 18s linear infinite;
  display: flex;
  flex: none;
  flex-wrap: nowrap;
  width: max-content;
  will-change: transform;
}

.jdwb-gallery-set {
  display: flex;
  flex: none;
  flex-wrap: nowrap;
  gap: 1.5rem;
  padding-right: 1.5rem;
}

.jdwb-gallery-set img {
  flex-shrink: 0;
  height: 250px;
  object-fit: cover;
  width: clamp(260px, 28vw, 420px);
}

.jdwb-gallery-marquee:hover .jdwb-gallery-track {
  animation-play-state: paused;
}

@keyframes jdwb-scroll-horizontal {
  0% { transform: translateX(0); }
  100% { transform: translateX(-12.5%); }
}

@media (prefers-reduced-motion: reduce) {
  .jdwb-gallery-track { animation-duration: 60s; }
}

.jdwb-lead-form-frame {
  background: #fff;
  border: 0;
  border-radius: 8px;
  display: block;
  margin: 0 auto;
  height: 760px;
  min-height: 420px;
  transition: height 160ms ease-out;
  width: min(100%, 860px);
}

.jdwb-theme-preview-thumb {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  height: 180px;
  overflow: hidden;
  position: relative;
}

.jdwb-theme-card {
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 1rem;
}

.jdwb-theme-card:has(.form-check-input:checked) {
  border-color: #0d6efd;
  box-shadow: 0 0 0 0.15rem rgba(13, 110, 253, 0.14);
}

.jdwb-theme-preview-canvas {
  background: #fff;
  left: 0;
  position: absolute;
  top: 0;
  transform: scale(0.25);
  transform-origin: top left;
  width: 400%;
}

.jdwb-theme-preview-viewport {
  background: #fff;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.jdwb-theme-preview-page {
  background: #fff;
  left: 0;
  position: absolute;
  top: 0;
  transform-origin: top left;
  width: 1440px;
}

.jdwb-theme-preview-page .jdwb-navbar {
  position: static;
}

.jdwb-theme-preview-thumb .jdwb-navbar {
  position: static;
}

.jdwb-theme-preview-thumb .jdwb-hero,
.jdwb-theme-preview-thumb .jdwb-hero-bottom {
  min-height: 520px;
}

.jdwb-theme-preview-thumb .jdwb-lead-form-frame {
  height: 420px;
  min-height: 420px;
}

.jdwb-editor-shell {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
  isolation: isolate;
}

.jdwb-editor-panel {
  max-height: calc(100vh - 160px);
  overflow: auto;
  position: sticky;
  top: 1rem;
}

.jdwb-preview-item {
  border: 2px solid transparent;
  position: relative;
}

.jdwb-preview-item.is-selected {
  border-color: #0d6efd;
}

.jdwb-preview-actions {
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.35rem;
  position: absolute;
  right: 0.75rem;
  top: 0.75rem;
  z-index: 1100;
}

.jdwb-section-picker-toolbar {
  border-bottom: 1px solid #dee2e6;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
}

.jdwb-section-picker-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.jdwb-section-picker-card {
  margin: 0;
}

.jdwb-section-picker-card:focus {
  outline: 0;
}

.jdwb-section-picker-button {
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  color: #071836;
  cursor: pointer;
  display: grid;
  overflow: hidden;
  padding: 0;
  text-align: left;
  width: 100%;
}

.jdwb-section-picker-button:hover,
.jdwb-section-picker-card:focus .jdwb-section-picker-button {
  border-color: #0d6efd;
  box-shadow: 0 0 0 0.15rem rgba(13, 110, 253, 0.14);
}

.jdwb-section-picker-preview {
  background: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
  display: block;
  height: 190px;
  overflow: hidden;
  position: relative;
}

.jdwb-section-picker-canvas {
  background: #fff;
  display: block;
  left: 0;
  pointer-events: none;
  position: absolute;
  top: 0;
  transform: scale(0.25);
  transform-origin: top left;
  width: 400%;
}

.jdwb-section-picker-canvas .jdwb-navbar {
  position: static;
}

.jdwb-section-picker-canvas .jdwb-hero,
.jdwb-section-picker-canvas .jdwb-hero-bottom {
  min-height: 560px;
}

.jdwb-section-picker-canvas .jdwb-lead-form-frame {
  height: 420px;
  min-height: 420px;
}

.jdwb-section-anchor {
  scroll-margin-top: 5rem;
}

.jdwb-section-anchor--navigation {
  position: sticky;
  top: 0;
  z-index: 1000;
}

.jdwb-section-anchor--navigation > .jdwb-navbar {
  position: static;
}

.jdwb-section-picker-title,
.jdwb-section-picker-meta,
.jdwb-section-picker-placement {
  min-width: 0;
  overflow: hidden;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.jdwb-section-picker-title {
  font-weight: 700;
  line-height: 1.2;
  padding-top: 0.7rem;
}

.jdwb-section-picker-meta,
.jdwb-section-picker-placement {
  color: #6c757d;
  font-size: 0.78rem;
  line-height: 1.25;
}

.jdwb-section-picker-placement {
  padding-bottom: 0.7rem;
}

.jdwb-section-picker-action {
  padding: 0 0.75rem 0.75rem;
}

.jdwb-image-picker-field {
  display: grid;
  gap: 0.5rem;
}

.jdwb-image-picker-preview {
  align-items: center;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  display: flex;
  justify-content: center;
  min-height: 128px;
  overflow: hidden;
}

.jdwb-image-picker-preview img {
  aspect-ratio: 16 / 9;
  display: block;
  object-fit: cover;
  width: 100%;
}

.jdwb-image-picker-url {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.jdwb-image-list-editor,
.jdwb-image-list-rows {
  display: grid;
  gap: 0.75rem;
}

.jdwb-image-list-row {
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 104px minmax(0, 1fr);
  padding: 0.75rem;
}

.jdwb-image-list-preview {
  align-items: center;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  display: flex;
  justify-content: center;
  min-height: 86px;
  overflow: hidden;
}

.jdwb-image-list-preview img {
  aspect-ratio: 4 / 3;
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.jdwb-image-list-fields {
  display: grid;
  gap: 0.5rem;
  min-width: 0;
}

.jdwb-image-list-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.jdwb-image-picker-toolbar {
  border-bottom: 1px solid #dee2e6;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
}

.jdwb-image-picker-breadcrumbs {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  min-height: 32px;
}

.jdwb-image-picker-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

.jdwb-image-picker-folder,
.jdwb-image-picker-tile {
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  color: #071836;
  display: grid;
  min-height: 150px;
  overflow: hidden;
  padding: 0;
  text-align: left;
  width: 100%;
}

.jdwb-image-picker-folder:hover,
.jdwb-image-picker-folder:focus,
.jdwb-image-picker-tile:hover,
.jdwb-image-picker-tile:focus {
  border-color: #0d6efd;
  box-shadow: 0 0 0 0.15rem rgba(13, 110, 253, 0.14);
  outline: 0;
}

.jdwb-image-picker-folder {
  align-content: center;
  gap: 0.35rem;
  justify-items: center;
  padding: 1rem;
  text-align: center;
}

.jdwb-image-picker-folder i {
  color: #495057;
  font-size: 2rem;
}

.jdwb-image-picker-folder-name,
.jdwb-image-picker-title {
  font-weight: 700;
  line-height: 1.2;
}

.jdwb-image-picker-folder-count,
.jdwb-image-picker-url-text {
  color: #6c757d;
  font-size: 0.78rem;
  line-height: 1.25;
}

.jdwb-image-picker-tile img {
  aspect-ratio: 4 / 3;
  background: #f8f9fa;
  display: block;
  object-fit: cover;
  width: 100%;
}

.jdwb-image-picker-title,
.jdwb-image-picker-url-text {
  min-width: 0;
  overflow: hidden;
  padding: 0 0.6rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.jdwb-image-picker-title {
  padding-top: 0.55rem;
}

.jdwb-image-picker-url-text {
  padding-bottom: 0.6rem;
}

@media (max-width: 991.98px) {
  .jdwb-editor-shell {
    grid-template-columns: 1fr;
  }

  .jdwb-editor-panel {
    max-height: none;
    position: static;
  }

  .jdwb-image-list-row {
    grid-template-columns: 1fr;
  }
}
