/* GLOBAL STYLES
-------------------------------------------------- */
/* Padding below the footer and lighter body text */

body {
  padding-top: 3rem;
  padding-bottom: 3rem;
  color: #5a5a5a;
}


/* CUSTOMIZE THE CAROUSEL
-------------------------------------------------- */

/* Carousel base class */
.carousel {
  margin-bottom: 4rem;
}
/* Since positioning the image, we need to help out the caption */
.carousel-caption {
  bottom: 3rem;
  z-index: 10;
}

/* Declare heights because of positioning of img element */
.carousel-item {
  height: 32rem;
}
.carousel-item > img {
  position: absolute;
  top: 0;
  left: 0;
  min-width: 100%;
  height: 32rem;
}

#carouselExampleCaptions { 
  aspect-ratio: 16 / 9;       /* 固定比例：16:9，可改 4/3、1/1 等 */
  max-width: 1000px;          /* 响应式最大宽度，按需调整或去掉 */
  margin: 0 auto;             /* 可选：居中 */
}

/* 让内部高度跟随外层比例盒 */
#carouselExampleCaptions .carousel-inner,
#carouselExampleCaptions .carousel-item {
  height: 100%;
}

#carouselExampleCaptions .carousel-item { position: relative; }
#carouselExampleCaptions .carousel-item::before{
  content:"";
  position:absolute; inset:0;
  /* 底部更暗、向上渐隐；可把 0.55/0.25 调暗/调亮 */
  background: linear-gradient(to top,
              rgba(0,0,0,.55) 0%,
              rgba(0,0,0,.25) 35%,
              rgba(0,0,0,0) 60%);
  pointer-events:none;
  z-index:1;
}
#carouselExampleCaptions .carousel-caption{
  z-index:2;                 /* 盖在遮罩之上 */
  text-shadow: 0 2px 8px rgba(0,0,0,.9);
}

/* 图片占满容器且不变形（留边/不裁剪：contain；想铺满可改 cover） */
#carouselExampleCaptions .carousel-item > img {
  position: absolute;         /* 你原来就有的定位方式 */
  inset: 0;                   /* 等价 top/left=0 + 右下0 */
  width: 100%;
  height: 100%;
  object-fit: contain;        /* 不变形：留边；想铺满改 cover */
  object-position: center;
}


/* MARKETING CONTENT
-------------------------------------------------- */

/* Center align the text within the three columns below the carousel */
.marketing .col-lg-4 {
  margin-bottom: 1.5rem;
  text-align: center;
}
.marketing h2 {
  font-weight: 400;
}
/* rtl:begin:ignore */
.marketing .col-lg-4 p {
  margin-right: .75rem;
  margin-left: .75rem;
}
/* rtl:end:ignore */


/* Featurettes
------------------------- */

.featurette-divider {
  margin: 5rem 0; /* Space out the Bootstrap <hr> more */
}

/* Thin out the marketing headings */
.featurette-heading {
  font-weight: 300;
  line-height: 1;
  /* rtl:remove */
  letter-spacing: -.05rem;
}


/* RESPONSIVE CSS
-------------------------------------------------- */

@media (min-width: 40em) {
  /* Bump up size of carousel content */
  .carousel-caption p {
    margin-bottom: 1.25rem;
    font-size: 1.25rem;
    line-height: 1.4;
  }

  .featurette-heading {
    font-size: 50px;
  }
}

@media (min-width: 62em) {
  .featurette-heading {
    margin-top: 7rem;
  }
}
