


/* infocenter split into two parts: title image and info landing */

/* 1. title image */
.field--name-field-title-broad-image{
  max-width: calc(var(--default-max-width) - var(--header-padding) * 3);
  margin: 0 auto; 
  height: 200px;
}

/* title image size control */
.field--name-field-media-image .field__item,
.field--name-field-media-image .field__item img{
    display: block;
    width: 100%;
    object-fit: cover;      /* fill + crop to 1.16:1 */
    object-position: center;/* adjust focal point if needed */
    height: 200px

}


/* 默认隐藏页面标题；仅当存在标题大图字段时显示 */
.contextual-region .page-title{
  display: none;
}

/* 存在 .field--name-field-title-broad-image 时显示标题 */
.contextual-region:has(.field--name-field-title-broad-image) .page-title{
  display: inline-block;
}

.contextual-region .page-title{
  position: relative;
  top: 12rem;
  left: 6rem;
  background-color: rgba(0, 0, 0, 0.6);
  padding: 0rem 0.5rem 0rem 0.5rem;
  border-radius:8px;
  font-size: 1.5rem;
  font-weight: 300;
  z-index: 10;
}


/* 2. info landing */
.info-landing-horizontal-nav{
  max-width: calc(var(--default-max-width) - var(--header-padding) * 3);
  margin: 0 auto; 
}

/* horizontalize the tabs */
.horizontal-tabs .horizontal-tabs-list{
    display: flex;
    border: none;
}



/* .horizontal-tab-button.selected a{
    color:orange;
} */
.horizontal-tab-button.selected a strong{
  color:orange;
  border-left: 2px solid orange;
  padding-left: 0.5rem;
}

.horizontal-tabs .horizontal-tab-button{
    background-color: var(--tab-background-color);
    border: none;
    box-shadow: none;
    border-radius: 0px;
    margin-bottom: 0px;
}


.horizontal-tabs-panes{
    background-color: var(--artical-background-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}


.horizontal-tabs-panes .js-form-wrapper .details-wrapper{
    margin: 0.5rem; /*override*/
}

.olivero-details__wrapper .details-wrapper{
  display: grid;
  grid-template-rows: auto auto;
  grid-template-areas:
      "item-first"
      "iten-rest";
  gap: 1rem;
  align-items: start;

}


/* ================================================ */
/* Info Landing 1st Item Card Styling */
/* ================================================ */
.field--name-field-overview-item-first .infolandind-1st-item,
.field--name-field-event-news-item-first .infolandind-1st-item,
.field--name-field-article-item-first .infolandind-1st-item,
.field--name-field-video-item-first .infolandind-1st-item,
.field--name-field-application-notes-item-fir .infolandind-1st-item,
.field--name-field-literature-item-first .infolandind-1st-item,
.field--name-field-supplier-item-first .infolandind-1st-item {

  display: grid;
  grid-template-columns:20rem auto;
  /* grid-template-rows: auto auto;  */
  grid-template-areas:
    "image title"
    "image text"
    "readmore readmore";
  gap: 2rem;
  align-items: start;
}

.field--name-field-overview-item-first .infolandind-1st-item .teaser-image,
.field--name-field-event-news-item-first .infolandind-1st-item .teaser-image,
.field--name-field-article-item-first .infolandind-1st-item .teaser-image,
.field--name-field-video-item-first .infolandind-1st-item .teaser-image,
.field--name-field-application-notes-item-fir .infolandind-1st-item .teaser-image,
.field--name-field-literature-item-first .infolandind-1st-item .teaser-image,
.field--name-field-supplier-item-first .infolandind-1st-item .teaser-image {
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 10px;
  grid-area: image;
  width: 300px;
  height: 250px;

}

.infolandind-1st-item .teaser-image .field--name-field-entry-page-thumbnail,
.infolandind-1st-item .teaser-image .field--name-field-entry-page-thumbnail img {
    display: block;
    width: 100%;
    height: 100%;          
    object-fit: cover;     
    object-position: center;
}

.infolandind-1st-item .teaser-title {
  color: #E6E6E6;
  font-size: 1.4em;
  font-weight: 500;
  margin: 0 0 15px 0;
  line-height: 1.3;

  grid-area: title;
}

.infolandind-1st-item .teaser-text {
  color: #C8C8C8;
  font-size: 0.95em;
  line-height: 1.5;
  margin-bottom: 1rem;

  grid-area: text;
}

.infolandind-1st-item .read-more-wrapper {
  margin-top: auto;
  grid-area: readmore;
}
.read-more-wrapper {
  margin-bottom: 1rem;
}


.infolandind-1st-item .read-more-link {
  color: var(--readmore-color);
  text-decoration: none;
  font-weight: bold;
  font-size: 0.9em;
}

.infolandind-1st-item .read-more-link:hover {
  text-decoration: underline;
}

.field--name-field-overview-item-others .infolandind-1st-item,
.field--name-field-event-news-item-rests .infolandind-1st-item,
.field--name-field-article-item-rests .infolandind-1st-item,
.field--name-field-video-item-rests .infolandind-1st-item,
.field--name-field-application-notes-item-res .infolandind-1st-item,
.field--name-field-literature-item-rests .infolandind-1st-item,
.field--name-field-supplier-item-rests .infolandind-1st-item {
  border-bottom: 2px solid #E6E6E6;
}

.field--name-field-application-notes-item-res > .field__item{
  margin-top: 1rem;
  padding-top: 1rem;
}


/* ====== Override the Olivero infocenter =======*/
.horizontal-tabs {
  border: none;
}
.node__title a {
  color: white;
}
.teaser-text .field--name-field-entry-page-short-text{
  color: var(--front-color);
}
.field--name-field-video-item-first .field__label{
  color: var(--front-color);
}
.field--name-field-video-item-rests .field__label{
  color: var(--front-color);
}
.field--name-field-video-caption {
  color: var(--front-color);
}
/* override the Olivero horizontal tabs */
.horizontal-tabs ul.horizontal-tabs-list li a, .horizontal-tabs ul.horizontal-tabs-list li.selected a{
  padding: 0.8rem 0.8rem;
}


/* ================================================ */
/* Mobile Responsive Styles */
/* 严重受 ./web/core/themes/olivero/css/components/details.css 影响， 需要优化*/
/* ================================================ */


@media screen and (max-width: 768px) {

  .field--name-field-title-broad-image {
    max-width: calc(var(--default-mobile-max-width) -  var(--header-padding) * 3);
    height: 100%;
  }
  .field--name-field-media-image .field__item, .field--name-field-media-image .field__item img  {
    height: 100px;
  }

  .contextual-region .page-title{
    top: 4rem;
    left: 1rem;
  }
  

  .info-landing-horizontal-nav{
    max-width: calc(var(--default-mobile-max-width) -  var(--header-padding) * 3);
    margin: 0 auto; 
  }
  .olivero-details{
    width: 100%;
  }
  /* This is thehorizontal-tabs  in mobile view*/
  .olivero-details__summary {
    
    background-color: rgba(61, 111, 158, 0.7);
    border: 1px solid #1D4268;
    border-radius: 8px;
    color: white;
    padding-inline-start: 20px;
    
    
  }

  .olivero-details {
    border: none;
    box-shadow: none;
  }



  .olivero-details__wrapper{
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 20px;
    background-color: #4476A5;


    /*override*/
    margin:0;

    
    margin-top: 25px;
  }

  .field--name-field-overview-item-first .infolandind-1st-item,
  .field--name-field-event-news-item-first .infolandind-1st-item,
  .field--name-field-article-item-first .infolandind-1st-item,
  .field--name-field-video-item-first .infolandind-1st-item,
  .field--name-field-application-notes-item-fir .infolandind-1st-item,
  .field--name-field-literature-item-first .infolandind-1st-item,
  .field--name-field-supplier-item-first .infolandind-1st-item {
    display: block;
  }
}

