/* ==========================================================================
   Home Page Specific Styles (Refactored)
   ========================================================================== */

/* Common Index Layouts & Backgrounds */
.elem__paragraph-center-large {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 15px), calc(50% + 20px) calc(100% - 15px), 50% 100%, calc(50% - 20px) calc(100% - 15px), 0 calc(100% - 15px));
  background: var(--color-bg-white);
  color: var(--color-bg-offwhite);
  -webkit-clip-path: polygon(0 0, 100% 0, 100% calc(100% - 15px), calc(50% + 20px) calc(100% - 15px), 50% 100%, calc(50% - 20px) calc(100% - 15px), 0 calc(100% - 15px));
  padding: 35px 0;
}

.a_inner {
  max-width: 90%;
  margin: 0 auto;
  position: relative;
}

.a_inn_div {
  width: 100%;
  padding: 20px 0;
  text-align: center;
  font-weight: 500;
  border-radius: 10px;
}

.a_tit, .a_tit_1 {
  background: var(--color-primary);
  color: var(--color-bg-white);
  padding: 15px;
  width: 100%;
  max-width: 500px;
  margin: 10px auto 20px;
  font-size: 20px;
  font-weight: bold;
  letter-spacing: 3px;
  position: relative;
}

.a_tit h2, .a_tit_1 h2 {
  font-size: 2.5rem;
  margin-bottom: 0;
  font-weight: bold;
}

.a_tit h2 span, .a_tit_1 h2 span {
  font-size: 22px;
}

.a_tit::before {
  content: '';
  background: var(--color-primary);
  width: 1px;
  height: 50px;
  position: absolute;
  left: 0;
  right: 0;
  bottom: -38px;
  margin: 0 auto;                    
}

.a_tit::after {
  content: '';
  background: var(--color-primary);
  width: 10px;
  height: 10px;
  position: absolute;
  left: 0;
  right: 0;
  bottom: -38px;
  margin: 0 auto;
  border-radius: 99em;
}

.a_content_div {
  text-align: center;
  margin-top: 60px;
}

.a_bg {
  width: 100%;
  background-color: var(--color-bg-light);
  background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAADCAYAAABWKLW/AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAB9JREFUeNpiYGBgEPr//z8DCIMBkAEWYIRywIIAAQYAPcIPFz/ScLMAAAAASUVORK5CYII=);
  margin-top: -15px;
  padding: 20px 0;
  position: relative;
}

.a_bg_img {
  background: url("/Public/common/img/report_bg.e8bf1c5c3506.jpg") no-repeat fixed center center;
  background-size: cover;
  position: relative;
  z-index: 0;
  padding: 20px 0;
}

.a_bg_img::before {
  content: "";
  background: rgba(248, 249, 250, 0.7);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.a_bg_grid {
  position: relative;
}

.a_bg_grid::before {
  content: '';
  background: url("/Public/common/img/title-bg6.a87162cb9b05.webp") no-repeat;
  width: 100%;
  height: 400px;
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  background-size: cover;
  z-index: -1;
}


/* Cards & Spacing */
.spacing_mp {
  margin: 0.25rem 0.5rem 1rem 0.5rem;
}



/* Speed Tool (#speed_tool) / BEM Mapping Available */
.p-home-services {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  padding: var(--spacing-lg) 0;
}

.p-home-services__item {
  width: 50%;
  order: 0;
  text-align: center;
  padding: 30px 10px 5px 10px;
  cursor: pointer;
  transition: transform 0.3s, background 0.5s;
}

.p-home-services__item--top {
  order: -1;
  width: 100%;
}

.p-home-services__item:hover {
  transform: scale(1.05);
}

.p-home-services__icon {
  font-size: 55px;
  margin-bottom: 10px;
  color: var(--color-secondary);
}

.p-home-services__item:hover .p-home-services__icon {
  color: var(--color-primary);
}


/* Latest News (#News) */
.p-home-news {
  border: 2px solid var(--color-primary);
  margin-top: -55px;
}

.p-home-news__table {
  margin-top: 35px;
  width: 100%;
}

.p-home-news__title {
  font-weight: bold;
  line-height: 30px;
  color: var(--color-primary);
}

/* Special Medical (#special_in) */
.p-home-special {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.p-home-special__img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 1s ease-out;
}

.p-home-special:hover .p-home-special__img {
  transform: scale(1.1);
}

.p-home-special__caption {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  background-color: rgba(0, 0, 0, 0.7);
  transition: opacity 0.5s;
  padding: 0 .5rem;
}
.p-home-special__caption h2{
  font-size: 2.3rem;
  margin-top: .5rem;
}.p-home-special__caption p{
  margin-bottom: 0;
}
.p-home-special:hover .p-home-special__caption {
  opacity: 0;
}

/* Buttons & Slider Overrides */
.slick-arrow-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  background-color: var(--color-bg-white);
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  transition: all .3s ease-in-out;
  top: 35%;
  position: absolute;
  z-index: 1;
}

.arrow_btright { right: -15px; }
.arrow_btleft { left: -15px; }

.banner_arrow_right, .banner_arrow_left {
  background-color: transparent;
  color: var(--color-bg-white);
  opacity: 0.5;
  top: 45%;
  font-size: 4rem;
  border: 0px;
  box-shadow: none;
}

.banner_arrow_right { right: 30px; }
.banner_arrow_left { left: 30px; }


.banner_arrow_right:hover, .banner_arrow_left:hover { opacity: 1; }


/* Restoring Original Services Block Layouts */
.hos-services {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.hos-services-item {
  width: 50%;
  order: 0;
}

.top-item {
  order: -1;
  width: 100%;
}

.service {
  text-align: center;
  padding: 30px 10px 5px 10px;
  border-radius: 5px;
  font-size: 14px;
  cursor: pointer;
  background: transparent;
  transition: transform 0.3s, background 0.5s;
}

.service i {
  font-size: 55px;
  margin-bottom: 10px;
  color: var(--color-secondary);
}

.service h4 {
  font-weight: 600;
  margin-bottom: 8px;
}

.service:hover {
  transform: scale(1.05);
}

.service:hover i {
  color: var(--color-primary);
}


/* ==========================================================================
   Original Slide Card Configurations (媒體報導 & 醫療資訊)
   ========================================================================== */
.slide_card {
  background-color: var(--color-bg-white);
  border: 1px solid var(--color-border-light);
  padding: 1rem;
  position: relative;
  transition: all 0.3s ease-in-out;
}

.slide_card:hover .c-card__title {
  color: var(--color-secondary) !important;
}





/* ==========================================================================
   Legacy Sections Layout Support (News, Media, Medical, Motion)
   ========================================================================== */

/* 最新消息 #News */
#News td h5 {
  font-weight: bold;
  line-height: 30px;
}

#News .table td, #News .table th {
  border: 1px solid rgba(121, 85, 72, 0.32);
}

#News .a_content_div {
  border: 2px solid var(--color-primary);
  margin-top: -55px;
}

#News .a_content_div table {
  margin-top: 35px;
}


/* 醫療資訊 #medical_info */
#medical_info .a_inner {
  padding: 50px 0;
}

#medical_info .a_tit {
  background: var(--color-bg-white);
  color: var(--color-primary);
  text-align: center;
  margin-bottom: 60px;
}

#medical_info .a_tit::before,
#medical_info .a_tit::after {
  background: var(--color-bg-white);
}

#report_mov .tab_list {
  position: relative;
  color: var(--color-bg-white);
  font-size: 1.8rem;
  font-weight: bold;
}




/* Tab buttons ported from style.css */
#tab-button_a {
  display: table;
  table-layout: fixed;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

#tab-button_a li {
  display: table-cell;
  width: 25%;
}

#tab-button_a li a {
  display: block;
  padding: .5em;
  background: var(--color-neutral-brown);

  border: 1px solid var(--color-border-light);
  border-left: 1px solid var(--color-border-light);
  text-align: center;
  color: var(--color-bg-offwhite);
  text-decoration: none;
  font-size: 1rem; /* Mobile Default */
  font-weight: 700;
  transition: background-color 0.3s;
}

#tab-button_a li:not(:first-child) a {
  border-left: none;
}

#tab-button_a li a:hover,
#tab-button_a .is-active a {                            
  background: var(--color-primary);
  color: var(--color-bg-white);
}

.tabs_pages {
  padding: 2em 1em;
  border: 2px solid var(--color-primary);
}


/* 影音消息 Tab切換行為控制 */
.tab-button-outer {
  display: none; /* Mobile Default */
}

.tab-button-outer {
  position: relative;
  z-index: 2;
  display: block;
}

.tab-select-outer {
  display: none;
}

/* Video Items Grid (.Div_out, .Div_box, .Div_body) */
.Div_out {
  display: flex;
  flex-wrap: wrap;
}

.Div_box {
  width: calc(100% - 1%);
  margin: .5% .5%;
  background-color: var(--color-bg-white);
  box-shadow: 0 0 2rem 0 rgba(136, 152, 170, 0.15);
  border: 1px solid var(--color-border-dark);
  overflow: hidden;
}

.Div_body {
  box-sizing: border-box;
  padding: 0 1.5rem;
  margin: 0 auto;
  position: relative;
  width: 100%;
}


/* ==========================================================================
   Supplementary Styling Adjustments
   ========================================================================== */

/* 1. 常用服務: 淡橘色背景圓圈 */
.icon-bg-circle {
  position: relative;
}
.icon-lg {
  font-size: 50px;
}
.icon-bg-circle::after {
  content: '';
  position: absolute;
  width: 68px;
  height: 68px;
  top: -15px;
  left: 0px;
  border-radius: 50%;
  background: inherit;
  opacity: .1;
}
.icon-bg-yellow::after {
  background: var(--color-secondary) !important; 
}                        
.icon-yellow {
  color: var(--color-primary-light);
}


/* 3. 影音消息 Tabs_a & 縮放效果 & 對應科別醫師 */
.tabs_a {
  margin: 0 auto;
  padding: 0 20px;
}

.transform_result {
  transform: translateY(10px);
  transition: transform 0.3s ease;
}

.transform_result:hover {
  transform: translateY(-1px);
  transition: transform 0.3s ease;
}


/* 最新消息連結 Hover 顏色 */
#News a {
  color: var(--color-text-dark);
  transition: color 0.3s;
  cursor: pointer;
}

#News a:hover {
  color: var(--color-secondary);
  text-decoration: none;
}


/* ==========================================================================
   RWD
   ========================================================================== */
@media (min-width: 576px) {
  .Div_box {
    width: calc(50% - 1%);
  }
}

@media (min-width: 768px) {
  .hos-services-item {
    width: 14.2%;
    order: 0;
  }
  .top-item {
    order: 0 !important;
  }
  #News .table td, #News .table th {
    border: 0px solid rgba(121, 85, 72, 0.32);
    border-bottom: 1px solid rgba(121, 85, 72, 0.32);
  }
  #News td h5 {
    line-height: 40px;
  }
  #News .a_content_div table {
    margin-top: 90px;
  }
  #tab-button_a li a {
    font-size: 1.2rem;
  }
}

@media (min-width: 992px) {
  .Div_box {
    width: calc(25% - 1%);
  }
}


