/* =========================================================
   DIAGONAL SECTION DEMO
   ========================================================= */

.dm-dg-wrap {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #1b1530;
  background: #f7f4ff;
  line-height: 1.55;
  overflow: hidden;
}

.dm-dg-wrap h2,
.dm-dg-wrap h3,
.dm-dg-wrap h4 {
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
  line-height: 1.1;
}

.dm-dg-wrap h2 { font-size: clamp(32px, 5vw, 56px); }
.dm-dg-wrap h3 { font-size: clamp(26px, 3.6vw, 40px); }
.dm-dg-wrap h4 { font-size: 20px; margin-bottom: 8px; }
.dm-dg-wrap p  { font-size: 16px; margin: 0 0 18px; opacity: 0.92; }

.dm-dg-wrap code {
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  background: rgba(27, 21, 48, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
}

.dm-dg-meta {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #7a3cff;
  margin-bottom: 14px;
}

.dm-dg-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  margin-bottom: 18px;
  backdrop-filter: blur(4px);
}

.dm-dg-tag-dark {
  background: rgba(27, 21, 48, 0.08);
  color: #1b1530;
}

.dm-dg-tag-light {
  background: rgba(255, 255, 255, 0.85);
  color: #1b1530;
}

/* ---------- INTRO ---------- */
.dm-dg-intro {
  padding: 80px 24px 56px;
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
}

.dm-dg-intro p {
  font-size: 18px;
  opacity: 0.78;
}

/* ---------- SHARED SECTION ---------- */
.dm-dg-sec {
  position: relative;
  padding: 128px 24px;
  color: #fff;
}

.dm-dg-sec-inner {
  max-width: 880px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.dm-dg-cta {
  display: inline-block;
  background: #fff;
  color: #1b1530;
  font: 600 15px/1 inherit;
  border: 0;
  border-radius: 999px;
  padding: 14px 26px;
  cursor: pointer;
  margin-top: 12px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.dm-dg-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(27, 21, 48, 0.25);
}

.dm-dg-cta-light {
  background: rgba(255, 255, 255, 0.95);
  color: #1b1530;
}

.dm-dg-cta-glass {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(6px);
}
.dm-dg-cta-glass:hover { background: rgba(255, 255, 255, 0.24); }

/* ---------- 1. SINGLE DIAGONAL ---------- */
.dm-dg-sec-1 {
  background: linear-gradient(135deg, #4f2bff 0%, #c531ff 100%);
  clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
  padding-bottom: 168px;
}

.dm-dg-sec-1b {
  background: #f7f4ff;
  color: #1b1530;
  margin-top: -40px;
  padding-top: 152px;
  clip-path: polygon(0 12%, 100% 0, 100% 100%, 0 100%);
}

/* ---------- 2. BOTH DIAGONAL ---------- */
.dm-dg-sec-2 {
  background: linear-gradient(135deg, #06b6a4 0%, #b6f33a 100%);
  color: #0c1f1c;
  clip-path: polygon(0 8%, 100% 0, 100% 92%, 0 100%);
  margin-top: -40px;
  padding: 168px 24px;
}

.dm-dg-sec-2 .dm-dg-tag {
  background: rgba(12, 31, 28, 0.12);
  color: #0c1f1c;
}

/* ---------- 3. STEEPER CUT (image bg) ---------- */
.dm-dg-sec-3 {
  background-size: cover;
  background-position: center;
  clip-path: polygon(0 0, 100% 0, 100% 60%, 0 100%);
  padding-bottom: 220px;
  margin-top: -40px;
}

.dm-dg-sec-3-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(20, 8, 60, 0.78) 0%, rgba(120, 20, 110, 0.55) 100%);
  z-index: 1;
}

.dm-dg-sec-3b {
  background-size: cover;
  background-position: center;
  clip-path: polygon(0 40%, 100% 0, 100% 100%, 0 100%);
  margin-top: -120px;
  padding-top: 220px;
}

.dm-dg-sec-3b-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(8, 20, 60, 0.7) 0%, rgba(20, 90, 130, 0.55) 100%);
  z-index: 1;
}

/* ---------- 4. CURVED / WAVE VARIANT ---------- */
.dm-dg-sec-4 {
  background: linear-gradient(135deg, #ff6a3d 0%, #ffd166 100%);
  color: #2a1500;
  padding: 128px 24px 180px;
  margin-top: -40px;
}

.dm-dg-sec-4 .dm-dg-tag {
  background: rgba(42, 21, 0, 0.14);
  color: #2a1500;
}

.dm-dg-wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 120px;
  display: block;
  z-index: 1;
}

.dm-dg-sec-4b {
  background: #f7f4ff;
  color: #1b1530;
  padding: 96px 24px 128px;
}

/* ---------- 5. MULTI-COLOR DIAGONAL ---------- */
.dm-dg-sec-5 {
  background: #11061f;
  color: #fff;
  padding: 160px 24px 180px;
  overflow: hidden;
}

.dm-dg-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.92;
}

.dm-dg-layer-a {
  background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
  clip-path: polygon(0 0, 100% 0, 100% 60%, 0 100%);
}

.dm-dg-layer-b {
  background: linear-gradient(135deg, #ff2a87 0%, #ff7d3b 100%);
  clip-path: polygon(0 30%, 100% 10%, 100% 80%, 0 100%);
  mix-blend-mode: screen;
}

.dm-dg-layer-c {
  background: linear-gradient(135deg, #00e5ff 0%, #6effa1 100%);
  clip-path: polygon(0 60%, 100% 40%, 100% 100%, 0 100%);
  mix-blend-mode: screen;
  opacity: 0.85;
}

.dm-dg-sec-5-inner {
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.4);
}

/* ---------- EXPLAIN BLOCK ---------- */
.dm-dg-explain {
  background: #fff;
  padding: 96px 24px;
}

.dm-dg-explain-inner {
  max-width: 880px;
  margin: 0 auto;
}

.dm-dg-code {
  background: #11061f;
  border-radius: 14px;
  padding: 20px 24px 24px;
  margin: 24px 0 32px;
  position: relative;
  overflow: hidden;
}

.dm-dg-code-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: #b89bff;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.dm-dg-code pre {
  margin: 0;
  font: 13px/1.65 "SF Mono", Menlo, Consolas, monospace;
  color: #f0e7ff;
  white-space: pre;
  overflow-x: auto;
}

.dm-dg-code pre code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

.dm-dg-tips {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
}

.dm-dg-tips li {
  background: #f7f4ff;
  border-left: 3px solid #7a3cff;
  padding: 14px 18px;
  border-radius: 0 10px 10px 0;
  font-size: 15px;
}

.dm-dg-tips strong {
  color: #4f2bff;
}

/* ---------- RECIPE CARDS ---------- */
.dm-dg-recipes {
  background: linear-gradient(180deg, #f7f4ff 0%, #ece4ff 100%);
  padding: 96px 24px 120px;
}

.dm-dg-recipes-inner {
  max-width: 1080px;
  margin: 0 auto;
}

.dm-dg-recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
  margin-top: 28px;
}

.dm-dg-recipe {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(27, 21, 48, 0.08);
  display: flex;
  flex-direction: column;
}

.dm-dg-recipe-vis {
  height: 140px;
  position: relative;
}

.dm-dg-recipe-vis-1 {
  background: linear-gradient(135deg, #4f2bff 0%, #c531ff 100%);
  clip-path: polygon(0 0, 100% 0, 100% 95%, 0 100%);
}

.dm-dg-recipe-vis-2 {
  background: linear-gradient(135deg, #06b6a4 0%, #b6f33a 100%);
  clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
}

.dm-dg-recipe-vis-3 {
  background: linear-gradient(135deg, #ff6a3d 0%, #ffd166 100%);
  color: #fff;
  display: flex;
  align-items: flex-end;
}

.dm-dg-recipe-vis-3 svg {
  width: 100%;
  height: 60px;
  display: block;
}

.dm-dg-recipe-body {
  padding: 20px 22px 24px;
}

.dm-dg-recipe-body p {
  font-size: 14px;
  margin-bottom: 12px;
  opacity: 0.78;
}

.dm-dg-recipe-body code {
  display: inline-block;
  font-size: 12px;
  word-break: break-word;
}

/* ---------- OUTRO ---------- */
.dm-dg-outro {
  text-align: center;
  padding: 40px 24px 56px;
  background: #ece4ff;
  color: #4f2bff;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.04em;
}

.dm-dg-outro p { margin: 0; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 640px) {
  .dm-dg-sec { padding: 96px 20px; }
  .dm-dg-sec-1 { padding-bottom: 132px; }
  .dm-dg-sec-1b { padding-top: 116px; }
  .dm-dg-sec-2 { padding: 132px 20px; }
  .dm-dg-sec-3 { padding-bottom: 168px; }
  .dm-dg-sec-3b { padding-top: 168px; margin-top: -90px; }
  .dm-dg-sec-4 { padding-bottom: 140px; }
  .dm-dg-wave { height: 80px; }
  .dm-dg-intro { padding: 56px 20px 40px; }
  .dm-dg-explain,
  .dm-dg-recipes { padding: 72px 20px; }
  .dm-dg-code pre { font-size: 12px; }
}
