/*****
Addtional CSS: For Global
*****/
@import url('../../assets/fonts/noto-sans-thai-v25-latin_latin-ext_thai/noto-sans-thai-stylesheet.css');
@import url('../../assets/fonts/kanit-v15-latin_latin-ext_thai_vietnamese/kanit-stylesheet.css');

body {
    font-family: 'Noto Sans Thai', "Helvetica Neue", "san-serif";
    font-size: 1rem;
    font-weight: normal;
    letter-spacing: normal;
    line-height: normal;
}
.font-noto-sans-thai {
    font-family: 'Noto Sans Thai';
}
.font-kanit {
    font-family: 'Kanit';
}
.font-weight-medium {
    font-weight: 500 !important;
}
.btn-ci-1 {
  color: #3C4A51;
  background-color: transparent;
  border-color: #3C4A51;
}
.btn-ci-1:hover {
  color: #fff;
  background-color: #D71219;
  border-color: #D71219;
}
.btn-ci-1:focus, .btn-ci-1.focus {
  box-shadow: none;
  outline: none;
}
.btn-ci-2 {
  color: #3C4A51;
  background-color: transparent;
  border-color: #3C4A51;
}
.btn-ci-2:hover {
  color: #fff;
  background-color: #0069d9;
  border-color: #0062cc;
}
.btn-ci-2:focus, .btn-ci-2.focus {
  box-shadow: none;
  outline: none;
}
.btn-link-ci-1 {
  font-weight: 400;
  color: #3C4A51;
  text-decoration: none;
}
.btn-link-ci-1:hover {
  text-decoration: underline;
}
.btn-link-ci-1:focus, .btn-link-ci-1.focus {
  text-decoration: none;
  box-shadow: none;
}
.i-contact .i-phone a {
  color: #3C4A51;
  text-decoration: none;
  background-color: transparent;
}
.i-contact .i-phone a:hover {
  color: #3C4A51;
  text-decoration: underline;
  background-color: transparent;
}
.i-contact .i-map a {
  color: #3C4A51;
  text-decoration: none;
  background-color: transparent;
}
.i-contact .i-map a:hover {
  color: #3C4A51;
  text-decoration: underline;
  background-color: transparent;
}
.text-7 {
  font-size: 0.8rem;
}

/*****
Addtional CSS: For Theme changed and replaced
*****/
@media (min-width: 768px) {
  .navbar-theme .navbar-nav .nav-link {
    min-height: auto;
    display: flex;
    align-items: center;
  }
}
.arrow-down::after {
  margin: 0 0.35rem;
}
.bg__contact {
  background-position: left;
}
.global-open {
  background-color: #fff;
}

/*****
Addtional CSS: Owl Carousel 2 rows and 8 items per page
*****/
.item__group {
  display: grid;
  gap: 10px;
}
/* Desktop: 4x2 (8 items) */
@media (min-width: 1200px) {
  .item__group {
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, auto);
  }
}
/* Tablet: 2x2 (4 items) */
@media (min-width: 768px) and (max-width: 1199px) {
  .item__group {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, auto);
  }
}
/* Mobile: 1x1 (1 item) */
@media (max-width: 767px) {
  .item__group {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
  }
}
.item__group {
  .item {
    .tcap-portrait {
      width: 100%;
      height: auto;
      min-height: 220px;
      object-fit: cover;
      display: block;
      background-color: #fff;
    }
    .tcap-quote {
      position: absolute;
      background-color: rgba(0, 0, 0, 0.75);
      width: 100%;
      height: auto;
      bottom: 0;
      color: #fff;
      padding: 0.5rem;
      opacity: 0;
      visibility: hidden;
      transition: all 0.3s ease;
    }
    &:hover {
      .tcap-quote {
        opacity: 1;
        visibility: visible;
      }
    }
  }
}

/*****
Addtional CSS: New Class
*****/

/* Add New Class  */
.top-0 {
  top: 0;
}
.bottom-0 {
  bottom: 0;
}
.mt-n20 {
  margin-top: -20rem !important;
}
.bg__about {
  background-image: url(../../assets/img/background/bg-company.jpg);
}
.bg__about {
  background-image: url(../../assets/img/background/bg-company.jpg);
}
.bg__services-2 {
  background-image: url(../../assets/img/background/bg-services.jpg);
  min-height: 300px;
}

/* Index Banner  */
.index-banner-custom {
  width: 100vw;
  height: calc(100vh - 87px);
  overflow: hidden;
  position: relative;

  video {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  img {
    &.animate-rtl {
      width: 130% !important;
      height: 100%;
      object-fit: cover;
      position: absolute;
      left: 0;
      animation: slideRightToLeft 5s ease-out infinite;
    }
  }
  .index-banner-content {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: auto;

    .title {
      font-family: 'Kanit';
      font-size: 2.5rem;
      font-weight: 500;
      text-transform: uppercase;
      color: #fff;
      text-align: center;
      text-shadow: 3px 3px 5px rgba(0, 0, 0, 0.5);

      @media (max-width: 768px) {
        font-size: 2rem;
      }
    }
  }
}
@keyframes slideRightToLeft {
  0% {
    transform: translateX(-5%);
  }
  100% {
    transform: translateX(-20%);
  }
}
.slide-index-banner {
  .owl-dots {
    position: absolute;
    right: 10px;
    bottom: 0;

    button:focus {
      outline: none;
    }
  }
}
.slide-tcap-leadership {
  .owl-dots {
    button:focus {
      outline: none;
    }
  }
}

/* Service  */
.card-service {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 500px;

    .card-service-content {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        position: absolute;
        top: 0;
        left: 0;
        z-index: 1;

        &::before {
            content: '';
            position: absolute;
            top: 0;
            right: 0;
            width: 150px;
            height: 200px;
            background-image: url("../img/graphic/graphic-service.png");
            background-repeat: no-repeat;
            background-position: center;
            z-index: 2;
        }
        .card-service-topic {
            font-family: 'Kanit';
            font-size: 2rem;
            font-weight: 500;
            text-transform: uppercase;
            line-height: 1.1;
            height: auto;
            overflow: hidden;
            display: -webkit-box;
            -webkit-line-clamp: 3;
            -webkit-box-orient: vertical;

            &.th {
                font-size: 1.5rem;
            }
        }
        .card-service-detail {
            opacity: 0;
            height: 0;
            max-height: 0;
            overflow: hidden;
            transition: all 0.75s ease-in-out;
            display: -webkit-box;
            -webkit-line-clamp: 11;
            -webkit-box-orient: vertical;
        }
    }
    &:hover {
        .card-service-content {
            background-color: rgba(0, 0, 0, 0.8);
            transition: 0.5s;
        }
        .card-service-detail {
            opacity: 1;
            height: auto;
            max-height: 260px;
        }
        .fa-arrow-right {
            color: #D71219;
        }
    }
    .img-service {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }
    .icn-service {
        width: 50px;
        height: 50px;
        object-fit: cover;
        display: block;
    }
    .btn-link {
        &:hover {
            color: #fff;

            .fa-arrow-right {
                color: #D71219;
            }
        }
    }
}
.service-details-list {
    img {
        width: 100%;
    }
    .title {
        font-family: 'Kanit';
        font-size: 2.5rem;
        font-weight: 500;
        text-transform: uppercase;
        line-height: 1.1;
        margin-bottom: 1rem;

        @media (max-width: 768px) {
            font-size: 2rem;
        }
    }
}
div.service-details-list:nth-child(even) {
    background-color: #f8f8f8;

    @media (min-width: 991.98px) {
        .service-details-content {
            background-color: #fff;
            height: 100%;
            box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175);
            padding: 2rem;
            margin: 3rem 0 0 -5rem;
        }
    }
}
.service-details-content {
    padding: 1rem;
}
@media (min-width: 991.98px) {
    div.service-details-list:nth-child(odd) .order1 {
        order: 2;
    }
    div.service-details-list:nth-child(even) .order2 {
        order: 1;
    }
}

/* About  */
.bg-about {
  background: linear-gradient(0deg, rgba(169, 0, 13, 1) 0%, rgba(121, 28, 31, 1) 100%);
  width: 50vw;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;

  &::before {
    content: '';
    position: absolute;
    top: 0;
    right: 25%;
    width: 300px;
    height: 300px;
    background-image: url('../../assets/img/graphic/graphic-about.png');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    opacity: 1;
  }

  @media (max-width: 991px) {
    width: 100vw;
    &::before {
      right: 0;
    }
  }
}
.bg-about-services {
  background-color: #A7010E;
}
.about-services-container {
  display: flex;
  gap: 1rem;
  columns: 4;
}
.card-about-services {
  background-color: #fff;
  border-radius: 0.25rem;
  padding: 1rem;
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;

  p {
    margin: 0;
  }

  &:hover {
    background-color: #D71219;
    color: #fff;

    img {
      background-color: #fff;
      border-radius: 0.25rem;
    }

    a {
      color: #fff;
    }
  }
}
.card-core-values {
  height: 100%;
  border-radius: 0.25rem;
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.1);
  text-align: center;
  padding: 1rem;
  word-break: break-word;
  background-color: #fff;
}
.bg-vision-mission {
  background-image: url('../../assets/img/company/bg-vision-mission.png');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: right;
}
.bg-core-values {
  background-image: url('../../assets/img/company/bg-core-values.png');
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;

  @media (max-width: 991px) {
    background-size: cover;
    background-position: left;
  }
}

/* Timeline  */
.timeline {
  /* display: flex;
  max-width: 1200px;
  padding: 60px 20px;
  gap: 40px; */
  margin: 0 auto;
}
/* .timeline-left {
  flex: 0 0 150px;
  padding-top: 20px;
} */
.year-display {
  font-family: 'Kanit';
  font-size: 10rem;
  font-weight: 500;
  transition: all 0.3s ease;

  @media (max-width: 991px) {
    font-size: 6rem;
  }
}
.timeline-right {
  flex: 1;
  height: 500px;
  overflow-y: auto;
  padding-right: 10px;
  scroll-behavior: smooth;
  position: relative;

  &::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }

  &::before {
    content: '';
    display: block;
    height: 5.5rem;

    @media (max-width: 1200px) {
      height: 3rem;
    }
    @media (max-width: 991px) {
      height: 3rem;
    }
    @media (max-width: 768px) {
      height: 2rem;
    }
  }

  &::after {
    content: '';
    display: block;
    height: 5rem;
  }
}
.year-section {
  /* min-height: 30vh;
  background: #f9f9f9;
  border-left: 4px solid #007bff;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05); */
  padding: 1rem 0 5rem 0;
  margin-bottom: 18%;
  min-height: 150px;

  &:last-child {
    margin-bottom: 27%;
  }

  @media (max-width: 1200px) {
    padding: 2rem 0 5rem 0;

    &:last-child {
      margin-bottom: 40%;
    }
  }

  @media (max-width: 991px) {
    padding: 2rem 0 5rem 0;

    &:last-child {
      margin-bottom: 40%;
    }
  }
  @media (max-width: 768px) {
    padding: 3rem 0 6rem 0;

    &:last-child {
      margin-bottom: 40%;
    }

    .year-border {
      height: 10px;
    }
  }
}
/*.year-section h2 {
  margin-top: 0;
  color: #007bff;
}*/
.more-content {
  max-width: 800px;
  margin: 100px auto;
  padding: 40px;
  background: #eee;
  border-radius: 8px;
}

/* Global Network  */
.bg-global-network {
  background: #f2f2f2;
  position: relative;

  .global-map {
    position: absolute;
    left: 0;
    right: 0;
    margin: auto;

    img {
      width: 100%;
      max-width: 1004px;
      height: auto;
      margin: auto;
      display: block;

      @media (max-width: 1200px) {
        width: 70%;
      }
       @media (max-width: 991px) {
        width: 85%;
      }
      @media (max-width: 768px) {
        width: 95%;
      }
    }
  }
}
.global-mark {
  display: none;
}
@media (min-width: 1200px) {
  .bg-global-network {
    min-height: 730px;

    .global-map {
      position: relative;

      img {
        width: 100%;
        max-width: 1004px;
        height: auto;
        margin: auto;
        display: block;
      }
    }
  }
  .global-mark {
    position: absolute;
    display: block;

    .pin-map {
      color: #3C4A51;
      text-align: center;

      i {
        font-size: 1.5rem;
      }

      .initials {
        font-weight: bold;
      }
    }

    .pin-content {
      width: 300px;
      opacity: 0;
      visibility: hidden;
      transition: all 0.3s ease;
      position: absolute;
      z-index: 1;
      bottom: 100%;
      left: 50%;
      transform: translateX(-50%);
      margin-bottom: 8px;

      img {
        width: 100%;
        height: 130px;
        object-fit: cover;
      }

      .pin-content-box {
        background: #fff;
        padding: 0.5rem;
        border-radius: 1rem;
        box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175);
      }
    }

    &:hover,
    &.active {
      .pin-map {
        color: #D71219;

        /* .initials {
          display: none;
        } */
      }

      .pin-content {
        opacity: 1;
        visibility: visible;
      }
    }
  }
}
/* เริ่มต้นให้ขึ้นด้านบน */
.global-mark .pin-content.top {
    bottom: 100%;
}
/* ถ้าต้องการให้ลงด้านล่าง */
.global-mark .pin-content.bottom {
    top: 100%;
    margin-top: 8px;
}
.clear-margin {
  p {
    margin: 0;
  }
}
