/********** Template CSS **********/
:root {
  --primary: #e88f2a;
  --secondary: #faf3eb;
  --light: #ffffff;
  --dark: #2b2825;
}

.btn-primary {
  color: #ffffff;
}

.border-inner {
  position: relative;
}

.border-inner * {
  position: relative;
  z-index: 1;
}

.border-inner::before {
  position: absolute;
  content: "";
  top: 5px;
  right: 5px;
  bottom: 5px;
  left: 5px;
  background: none;
  border: 1px solid var(--light);
  z-index: 0;
}

.btn-square {
  width: 40px;
  height: 40px;
}

.btn-sm-square {
  width: 30px;
  height: 30px;
}

.btn-lg-square {
  width: 50px;
  height: 50px;
}

.btn-square,
.btn-sm-square,
.btn-lg-square {
  padding-left: 0;
  padding-right: 0;
  text-align: center;
}

.back-to-top {
  position: fixed;
  display: none;
  right: 30px;
  bottom: 0;
  border-radius: 0;
  z-index: 99;
}

.navbar-dark .navbar-nav .nav-link {
  font-family: "Oswald", sans-serif;
  padding: 30px 15px;
  font-size: 18px;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--light);
  outline: none;
  transition: 0.5s;
}

.sticky-top.navbar-dark .navbar-nav .nav-link {
  padding: 20px 15px;
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link.active {
  color: var(--primary);
}

@media (max-width: 991.98px) {
  .navbar-dark .navbar-nav .nav-link {
    padding: 10px 0;
  }
}

.btn-play {
  position: relative;
  display: block;
  box-sizing: content-box;
  width: 16px;
  height: 26px;
  border-radius: 100%;
  border: none;
  outline: none !important;
  padding: 18px 20px 20px 28px;
  background: #ffffff;
}

.btn-play:before {
  content: "";
  position: absolute;
  z-index: 0;
  left: 50%;
  top: 50%;
  transform: translateX(-50%) translateY(-50%);
  display: block;
  width: 60px;
  height: 60px;
  background: #ffffff;
  border-radius: 100%;
  animation: pulse-border 1500ms ease-out infinite;
}

.btn-play:after {
  content: "";
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 50%;
  transform: translateX(-50%) translateY(-50%);
  display: block;
  width: 60px;
  height: 60px;
  background: #ffffff;
  border-radius: 100%;
  transition: all 200ms;
}

.btn-play span {
  display: block;
  position: relative;
  z-index: 3;
  width: 0;
  height: 0;
  left: -1px;
  border-left: 16px solid var(--primary);
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
}

@keyframes pulse-border {
  0% {
    transform: translateX(-50%) translateY(-50%) translateZ(0) scale(1);
    opacity: 1;
  }

  100% {
    transform: translateX(-50%) translateY(-50%) translateZ(0) scale(2);
    opacity: 0;
  }
}

#videoModal .modal-dialog {
  position: relative;
  max-width: 800px;
  margin: 60px auto 0 auto;
}

#videoModal .modal-body {
  position: relative;
  padding: 0px;
}

#videoModal .close {
  position: absolute;
  width: 30px;
  height: 30px;
  right: 0px;
  top: -30px;
  z-index: 999;
  font-size: 30px;
  font-weight: normal;
  color: #ffffff;
  background: #000000;
  opacity: 1;
}

.section-title::before {
  position: absolute;
  content: "";
  width: 60px;
  height: 10px;
  left: 50%;
  bottom: 0;
  margin-left: -30px;
  background: var(--primary);
}

.section-title::after {
  position: absolute;
  content: "";
  width: 180px;
  height: 2px;
  left: 50%;
  bottom: 4px;
  margin-left: -90px;
  background: var(--primary);
}

.service::after,
.contact::after {
  position: absolute;
  content: "";
  width: 100%;
  height: calc(100% - 45px);
  top: 135px;
  left: 0;
  background: linear-gradient(rgba(43, 40, 37, 0.9), rgba(43, 40, 37, 0.9)),
    url(../img/service.jpg) center center no-repeat;
  background-size: cover;
  z-index: -1;
}

.contact::after {
  background: linear-gradient(rgba(43, 40, 37, 0.5), rgba(43, 40, 37, 0.5)),
    url(../img/bg.jpg) center center no-repeat;
  background-size: cover;
}

.bg-offer {
  background: linear-gradient(rgba(43, 40, 37, 0.9), rgba(43, 40, 37, 0.9)),
    url(../img/offer.jpg) center center no-repeat;
  background-size: cover;
}

.team-item img {
  transition: 0.5s;
}

.team-item:hover img {
  transform: scale(1.1);
  filter: blur(5px);
}

.team-item .team-overlay {
  transition: 0.5s;
  opacity: 0;
}

.team-item:hover .team-overlay {
  opacity: 1;
}

.testimonial-carousel .owl-dots {
  height: 45px;
  margin-top: 30px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.testimonial-carousel .owl-dot {
  position: relative;
  display: inline-block;
  margin: 0 2px;
  width: 10px;
  height: 25px;
  background: #dddddd;
  transition: 0.5s;
}

.testimonial-carousel .owl-dot.active {
  height: 45px;
  background: var(--primary);
}

.testimonial-carousel .owl-item .testimonial-item {
  opacity: 0.1;
  transition: 0.5s;
}

.testimonial-carousel .owl-item.center .testimonial-item {
  opacity: 1;
}

.bg-img {
  background: #333333;
  background-size: cover;
}

.nav-link {
  padding-left: 24px;
  padding-right: 24px;
}

.nav-pills .nav-link {
  border-radius: 0px;
}

.nav-pills .nav-link.active {
  background-color: #6f42c1;
}

.bg-purple {
  background-color: #6f42c1;
}

.bg-purple-secondary {
  background-color: #f0e6ff;
}

.item-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.project-card {
  transition: box-shadow 0.3s ease, border 0.3s ease;
  border: 1px solid transparent;
  /* initial transparent border for smooth hover */
}

.project-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  /* soft shadow */
  border: 1px solid #6f42c1;
  /* purple border */
  cursor: pointer;
}

.item-text {
  flex: 1; /* ให้ยืด–หดตามพื้นที่ */
  min-width: 0; /* 🔥 จำเป็นมากสำหรับ ellipsis */
  text-align: left;
  padding: 0 24px;
  height: 100%;
}

.item-title {
  font-size: 1.2rem;
  font-weight: bold;
  margin: 0;
  color: #222;
<<<<<<< HEAD

=======
  line-height: 1.35;
>>>>>>> fan-project
  display: -webkit-box;
  -webkit-line-clamp: 2; /* จำนวนบรรทัดที่ต้องการ */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
  max-height: calc(1.3em * 2);
}

.item-subtitle {
  font-size: 0.9rem;
  color: #555;
  margin: 2px 0;
  line-height: 1.1;
}

.item-cost {
  font-size: 0.95rem;
  font-weight: bold;
  color: #8a2be2;
  /* purple */
  margin: 0;
  padding-top: 24px;
}

.item-number {
  font-size: 4rem;
  padding-right: 14px;
  font-weight: bold;
  color: #fff;
}

.fan-project-title {
  text-align: center;
  font-family: "Arial", sans-serif;
  /* base font */
}

@font-face {
  font-family: "Rockville Solid Regular";
  font-style: normal;
  font-weight: normal;
  src: local("Rockville Solid Regular"),
    url("../fonts/Rockville\ Solid.woff") format("woff");
}

.small-handwritten {
  font-family: "Rockville Solid Regular", sans-serif;
  font-size: 5rem;
  color: #222;
  margin-bottom: -2rem;
  font-weight: 400;
}

.big-bold {
  font-size: 3.5rem;
  font-weight: 900;
  color: #7a3ff7;
  letter-spacing: 0.05em;
  padding-bottom: 2rem;
}

.dot {
  cursor: pointer;
  display: inline-block;
  width: 12px;
  height: 12px;
  margin: 0 6px;
  background-color: #bbb;
  border-radius: 50%;
  transition: background-color 0.3s;
}

.dot.active {
  background-color: #6f42c1;
}

.year_label {
  background-color: #6f42c1;
  text-decoration: none !important;
  color: #fff !important;
  border: 2px solid #fff;
  display: inline-block;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 8px;
  margin: 20px;
  min-width: 100px;
  text-align: center;
}
.item-number-mobile {
  display: block;
  margin-top: 4px;
  text-align: right;
  font-weight: bold;
  color: #fff;
  margin-top: 0;
  font-size: 1.8rem;
}
.item-cost-row {
  display: block; /* default (desktop) */
}

@media (max-width: 767px) {
  .item-cost-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
  }

  .item-cost {
    margin: 0;
    white-space: nowrap;
  }
}
