/* ============================================
   AI - Download Page Styles
   ============================================ */

/* --- Layout --- */
.download-article {
  margin-bottom: 40px !important;
  padding: 0;
  width: 100%;
}

.download-article > .head {
  margin-bottom: 24px;
}
.but-download a {
    margin: 0;
}
.download-article > .head h2 {
  background: var(--ailhj-blue-grad) !important;
  color: #fff;
  padding: 16px 24px;
  border-radius: 12px;
  font-size: 20px;
  font-weight: 600;
  text-align: center;
  margin: 0;
}

.download-xiyang {
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: stretch;
}

.download-sty {
  text-align: center;
  height: 320px;
  width: 280px;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--main-bg-color);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.download-sty img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.download-sty .img-badge {
  position: absolute;
  top: 12px;
  left: 0;
  z-index: 2;
  font-size: 12px;
  padding: 6px 14px;
  line-height: 1.4;
  background: var(--ailhj-green);
  color: #fff;
  border-radius: 0 20px 20px 0;
  font-weight: normal;
}

.download-right {
  margin-left: 20px;
  border: 1px solid var(--main-border-color);
  padding: 28px;
  border-radius: 12px;
  position: relative;
  flex: 1;
  max-width: 600px;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

/* Mobile badge (hidden on desktop) */
.display {
  display: none;
}

.display .img-badge {
  display: inline-block;
  font-size: 12px;
  padding: 4px 12px;
  line-height: 1.4;
  background: var(--ailhj-green);
  color: #fff;
  border-radius: 20px;
  font-weight: normal;
  margin-bottom: 12px;
}

.download-theme-box {
  margin: 0 0 20px;
}

.download-theme-box .article-title {
  margin: 0;
}

.download-theme-box .article-title a {
  font-size: 20px;
  font-weight: 600;
  color: var(--main-color);
  text-decoration: none;
  line-height: 1.5;
}

.download-theme-box .article-title a:hover {
  color: var(--ailhj-blue);
}

.download-right > div:not(.download-theme-box):not(.but-download) {
  color: var(--muted-color);
  font-size: 14px;
  line-height: 1.8;
  margin-bottom: 16px;
}

/* --- Misc --- */
.pay-extra-hide {
  background: var(--main-bg-color);
  display: block;
  margin: 16px 0 0;
  padding: 20px;
  color: var(--muted-color);
  border-radius: 8px;
  border: 1px dashed var(--main-border-color);
}

.article-header.theme-box .article-title a {
  font-size: 22px;
  font-weight: 600;
  color: var(--main-color);
}

.alert.jb-red {
  background: rgba(240, 62, 62, 0.08);
  color: var(--ailhj-red);
  border: 1px solid rgba(240, 62, 62, 0.15);
  border-radius: 8px;
  padding: 16px 20px;
}

.alert.jb-yellow {
  background: rgba(245, 159, 0, 0.08);
  color: var(--ailhj-orange);
  border: 1px solid rgba(245, 159, 0, 0.15);
  border-radius: 8px;
  padding: 16px 20px;
}

/* jb-yellow return button: override gradient with flat orange */
.but.jb-yellow {
  --this-bg: var(--ailhj-orange);
  --this-color: #fff;
}

.but-download .badg.c-red.btn-block {
  background: rgba(240, 62, 62, 0.1);
  color: var(--ailhj-red);
  border: 1px solid rgba(240, 62, 62, 0.2);
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 12px;
  width: 100%;
}

.mb10 {
  display: none;
}

body.nav-fixed {
  padding-top: 74px;
}

/* --- Download Buttons ---
   .but color is controlled via --this-bg / --this-color only.
   No need to rewrite display/padding/hover — .but handles all that. */

.but-download {
  display: flex !important; /* Override old table-cell */
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

/* Set brand color on all download buttons - support both direct and wrapped buttons */
.but-download > a.but,
.but-download > .but,
.but-download .ailhj-btn-code-wrap > a.but,
.but-download .ailhj-btn-code-wrap > .but {
  --this-bg: var(--ailhj-blue);
  --this-color: #fff;
  --this-border: transparent;
  margin: 0;
  min-width: auto; /* Override old min-width: 200px */
}

/* Button + extract-code wrapper */
.ailhj-btn-code-wrap {
  position: relative;
  display: inline-block; /* inline-block to match button natural width */
}

/* Ensure button in wrapper matches standalone button width */
.ailhj-btn-code-wrap > .but {
  display: block; /* Block to fill wrapper width */
}

/* Extract code: absolutely positioned below button, doesn't affect layout */
.ailhj-extract-code {
  position: absolute;
  bottom: -28px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #666;
  background: #fff;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1.4;
  z-index: 100;
}

.ailhj-extract-code i {
  color: var(--ailhj-blue);
  font-size: 10px;
}

.ailhj-extract-code:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}

.ailhj-extract-code.copied {
  background: #dcfce7;
  border-color: #86efac;
  color: #16a34a;
}

.ailhj-extract-code.copied i {
  color: #16a34a;
}

/* --- Download Card (mobile section) --- */
.ailhj-download-card-box {
  background: transparent; /* PC: no background */
  border-radius: 0;
  box-shadow: none;
  border: none;
  overflow: visible;
  margin-top: 24px;
  width: 100%;
  max-width: 600px;
}

.ailhj-download-card-header {
  display: none; /* Hidden on PC/tablet */
}

.ailhj-download-card-body {
  padding: 0; /* PC: no padding */
}

.ailhj-download-card-title {
  display: none; /* Hidden on PC/tablet */
}

.ailhj-download-card-desc {
  display: none; /* Hidden on PC/tablet */
}

.ailhj-download-card-badge {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  color: #ea580c;
  background: #fff7ed;
  padding: 6px 14px;
  border-radius: 20px;
  font-weight: 500;
  border: 1px solid #fed7aa;
  margin-bottom: 16px;
}

.ailhj-download-card-badge i {
  color: #f97316;
}

/* card buts: reuse .but-download, just reset margin-top */
.ailhj-download-card-buts .but-download {
  margin-top: 0;
}

/* --- Hero Area --- */
.ailhj-download-hero {
  overflow: hidden;
  position: relative;
  --theme-background-color: #f3f3f3;
  --offset-left: 5vw;
  --media-height: 500px;
  --media-width: auto;
  --media-max-height: 500px;
  --media-position-left: auto;
  --media-position-right: calc(-1 * var(--offset-left) + 50px);
  --gradual-blur-wrap-height: 650px;
  --gradual-blur-wrap-before-background: rgba(255, 255, 255, 0.7);
  --gradual-blur-wrap-before-mix-blend-mode: multiply;
  --gradual-blur-wrap-after-background: linear-gradient(to top, var(--theme-background-color) 15%, transparent 55%);
  --gradual-blur-background-blend-mode: luminosity, overlay, normal;
  --gradual-blur-background-size: 40px 40px;
  --gradual-blur-filter-params: blur(160px) saturate(4);
  --media-mask-image: none;
  min-height: 480px;
  padding: 40px 0;
  background: var(--theme-background-color);
  margin-bottom: 30px;
}

.ailhj-download-hero[data-bg-type="image"] {
  --gradual-blur-wrap-after-background: linear-gradient(to top, var(--theme-background-color) 8%, transparent 50%);
  --media-mask-image: linear-gradient(to right, transparent, black 60%), linear-gradient(to left, transparent, black 60%), radial-gradient(circle at 50% 0%, rgba(0,0,0,1) 30%, rgba(0,0,0,0) 90%);
  --gradual-blur-background-size: auto 40px;
}

.ailhj-download-bg-container {
  position: absolute;
  left: 0; right: 0; top: 0;
  height: var(--gradual-blur-wrap-height);
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.ailhj-download-bg-wrap {
  position: absolute;
  left: 0; right: 0;
  top: -70px;
  height: var(--gradual-blur-wrap-height);
  z-index: -1;
  overflow: hidden;
}

.ailhj-download-bg-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  mix-blend-mode: var(--gradual-blur-wrap-before-mix-blend-mode);
  background: var(--gradual-blur-wrap-before-background);
  z-index: 1;
}

.ailhj-download-bg-blur {
  position: absolute;
  inset: -200px;
  background-size: var(--gradual-blur-background-size);
  background-position: center center;
  background-repeat: repeat;
  background-blend-mode: var(--gradual-blur-background-blend-mode);
  filter: var(--gradual-blur-filter-params);
  transform: translate3d(0, 0, 0);
  opacity: .1;
}

.ailhj-download-bg-img {
  position: absolute;
  left: var(--media-position-left);
  right: var(--media-position-right);
  height: var(--media-height);
  width: var(--media-width);
  max-height: var(--media-max-height);
  top: 72px;
  object-fit: cover;
  mask-image: var(--media-mask-image);
  mask-composite: intersect;
  -webkit-mask-image: var(--media-mask-image);
  -webkit-mask-composite: source-in;
  z-index: 1;
}

.ailhj-download-bg-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: var(--gradual-blur-wrap-after-background);
  pointer-events: none;
}

.ailhj-download-hero-content {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: var(--mian-max-width);
  margin: 0 auto;
  color: var(--main-color);
  padding: 0 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 400px;
}

.ailhj-download-hero-content .img-badge {
  position: static;
  display: inline-flex;
  margin-bottom: 16px;
  background: rgba(22, 163, 74, 0.1) !important;
  color: #16a34a !important;
  width: fit-content;
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: normal;
  box-shadow: none;
}

.ailhj-download-hero-title {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 16px;
  color: var(--main-color);
  max-width: 50%;
}

.ailhj-download-hero-desc {
  font-size: 16px;
  line-height: 1.7;
  color: var(--muted-color);
  margin: 0 0 12px;
  max-width: 65%;
}

.ailhj-download-hero-details {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted-2-color);
  margin: 0 0 24px;
  max-width: 65%;
}

/* --- Info Cards --- */
.ailhj-download-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 24px 0;
}

.ailhj-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--theme-border-color, #e5e7eb);
  overflow: hidden;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.ailhj-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.ailhj-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  font-size: 15px;
  font-weight: 600;
  border-bottom: 1px solid var(--theme-border-color, #e5e7eb);
}

.ailhj-card-header i {
  font-size: 18px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}

.ailhj-card-body {
  padding: 16px 20px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted-color, #6b7280);
}

.ailhj-card-body p { margin: 0 0 12px; }
.ailhj-card-body p:last-child { margin-bottom: 0; }

.ailhj-card-highlight {
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 8px;
  margin-top: 12px;
}

.ailhj-card-quote {
  font-style: italic;
  padding-left: 12px;
  border-left: 3px solid;
  margin-bottom: 12px;
}

.ailhj-card-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ailhj-card-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--theme-border-color, #e5e7eb);
}

.ailhj-card-list li:last-child { border-bottom: none; }

.ailhj-card-num {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 50%;
  flex-shrink: 0;
}

.ailhj-card-warning .ailhj-card-header { background: linear-gradient(135deg, #fff7ed, #ffedd5); color: #ea580c; }
.ailhj-card-warning .ailhj-card-header i { background: #fed7aa; color: #ea580c; }
.ailhj-card-warning .ailhj-card-highlight { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }

.ailhj-card-danger .ailhj-card-header { background: linear-gradient(135deg, #fef2f2, #fee2e2); color: #dc2626; }
.ailhj-card-danger .ailhj-card-header i { background: #fecaca; color: #dc2626; }
.ailhj-card-danger .ailhj-card-highlight { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.ailhj-card-danger .ailhj-card-quote { border-left-color: #dc2626; }

.ailhj-card-info .ailhj-card-header { background: linear-gradient(135deg, #eff6ff, #dbeafe); color: #2563eb; }
.ailhj-card-info .ailhj-card-header i { background: #bfdbfe; color: #2563eb; }
.ailhj-card-info .ailhj-card-highlight { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.ailhj-card-info .ailhj-card-quote { border-left-color: #2563eb; }

.ailhj-card-primary .ailhj-card-header { background: linear-gradient(135deg, #f0f9ff, #e0f2fe); color: #0284c7; }
.ailhj-card-primary .ailhj-card-header i { background: #bae6fd; color: #0284c7; }
.ailhj-card-primary .ailhj-card-num { background: #e0f2fe; color: #0284c7; }

.ailhj-card-success .ailhj-card-header { background: linear-gradient(135deg, #f0fdf4, #dcfce7); color: #16a34a; }
.ailhj-card-success .ailhj-card-header i { background: #bbf7d0; color: #16a34a; }

/* --- PC / Mobile visibility --- */
.ailhj-download-hero-pc { display: block; }
.ailhj-download-mobile-section { display: none; margin-bottom: 20px; }

/* Mobile custom nav (hidden on desktop) */
.ailhj-download-mobile-nav { display: none; }

/* --- Responsive --- */
@media (max-width: 1200px) {
  .ailhj-download-hero {
    --media-height: 360px;
    --media-width: 640px;
    --gradual-blur-wrap-height: 500px;
    min-height: 420px;
  }
  .ailhj-download-hero-content { padding: 0 40px; }
  .ailhj-download-hero-title { font-size: 32px; max-width: 55%; }
  .ailhj-download-hero-desc,
  .ailhj-download-hero-details { max-width: 50%; }
}

@media (max-width: 992px) {
  .download-article > .head h2 { font-size: 18px; padding: 14px 20px; }
  .ailhj-download-hero {
    --media-height: 280px;
    --media-width: 500px;
    --gradual-blur-wrap-height: 400px;
    padding: 30px 0;
    min-height: auto;
  }
  .ailhj-download-bg-wrap { top: -100px; }
  .ailhj-download-bg-img {
    right: 50%;
    transform: translateX(50%);
    top: 40px;
    mask-image: none;
    -webkit-mask-image: none;
  }
  .ailhj-download-hero-content {
    padding: 0 24px;
    text-align: center;
    padding-top: 320px;
  }
  .ailhj-download-hero-title { font-size: 26px; max-width: 100%; }
  .ailhj-download-hero-desc,
  .ailhj-download-hero-details { max-width: 100%; }
  .download-sty { height: 280px; width: 240px; }
  .download-right { padding: 24px; }
  .download-theme-box .article-title a { font-size: 18px; }
}

@media (max-width: 768px) {
  /* Hide zibll native header/footer on download page */
  body.page-template-download .header.header-layout-2,
  body.page-template-download .footer-tabbar { display: none !important; }
  
  body.page-template-download { padding-top: 0 !important; }
  body.page-template-download .ailhj-download-main { padding-top: 56px; }

  /* Show mobile custom nav */
  .ailhj-download-mobile-nav {
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: #fff;
    border-bottom: 1px solid var(--main-border-color);
    z-index: 999;
    padding: 0 16px;
  }

  .ailhj-mobile-nav-back {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--main-color);
    font-size: 14px;
    text-decoration: none;
  }

  .ailhj-mobile-nav-back i {
    font-size: 19px;
  }

  .ailhj-mobile-nav-back span {
    font-weight: 500;
  }

  /* Add top spacing to mobile card */
  .ailhj-download-mobile-section {
    padding-top: 16px;
  }

  .ailhj-download-hero-pc { display: none; }
  .ailhj-download-mobile-section { display: block; }

  .download-xiyang { flex-direction: column; }
  .download-sty { display: none; }
  .display { display: block; }
  .download-right { margin-left: 0; width: 100%; max-width: none; padding: 20px; }

  /* Mobile download card - show full card style */
  .ailhj-download-card-box { 
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    margin-top: 0; 
    max-width: 100%; 
  }
  
  .ailhj-download-card-header { 
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px; 
    font-size: 14px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #e2e8f0;
    color: var(--main-color);
  }
  
  .ailhj-download-card-header i {
    font-size: 18px;
    color: var(--ailhj-blue);
  }
  
  .ailhj-download-card-body { padding: 16px; }
  
  .ailhj-download-card-title { 
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: var(--main-color);
    margin: 0 0 12px;
    line-height: 1.4;
  }
  
  .ailhj-download-card-desc {
    display: block;
    font-size: 14px;
    color: var(--muted-color);
    margin: 0 0 16px;
    line-height: 1.6;
  }

  /* Buttons: stack full-width */
  .ailhj-download-card-buts .but-download { flex-direction: column; }
  .ailhj-download-card-buts .but-download > a.but,
  .ailhj-download-card-buts .but-download > .but { width: 100%; }

  /* Wrap: column, extract-code flows below button */
  .ailhj-download-card-buts .ailhj-btn-code-wrap {
    width: 100%;
    align-items: stretch;
    gap: 6px;
  }
  .ailhj-download-card-buts .ailhj-btn-code-wrap .but { width: 100%; }
  .ailhj-download-card-buts .ailhj-extract-code {
    position: static;
    transform: none;
    display: flex;
    justify-content: center;
    font-size: 12px;
    background: #f1f5f9;
    padding: 5px 10px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    box-shadow: none;
    margin-top: 5px;
  }

  .ailhj-download-cards { gap: 12px; margin: 16px 0; }
  .ailhj-card-header { padding: 14px 16px; font-size: 14px; }
  .ailhj-download-main .ailhj-card-body { padding: 14px 16px !important;}
}

@media (max-width: 576px) {
  .download-article > .head h2 { font-size: 16px; padding: 12px 16px; border-radius: 8px; }
  .download-right { padding: 16px; border-radius: 8px; }
  .download-theme-box .article-title a { font-size: 16px; }
  .ailhj-download-card-header { padding: 12px 14px; font-size: 13px; }
  .ailhj-download-card-body { padding: 14px; }
  .ailhj-download-card-title { font-size: 15px; }
  .ailhj-card-header { padding: 12px 14px; font-size: 13px; }
  .ailhj-card-body { padding: 12px 14px; font-size: 13px; }
  .content-wrap .article { padding: 0; }
}
