/********** Template CSS **********/

/*** Spinner ***/
#spinner {
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease-out, visibility 0s linear .5s;
    z-index: 99999;
}

#spinner.show {
    transition: opacity .5s ease-out, visibility 0s linear 0s;
    visibility: visible;
    opacity: 1;
}

.back-to-top {
    position: fixed;
    display: none;
    right: 45px;
    bottom: 45px;
    z-index: 99;
}

/*** Button ***/
.btn {
    transition: .5s;
}

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

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

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

.btn-square,
.btn-sm-square,
.btn-lg-square {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: normal;
}





/*** Hero Header ***/
.hero-header {
    margin-top: -100px;
    padding-top: 150px;
    background: linear-gradient(to right, #b9111f 50%, #b9111f 50%);
    background-size: cover;
}


.hero-header .breadcrumb-item+.breadcrumb-item::before {
    color: var(--light);
}

.header-carousel {
    position: relative;
    padding: 45px 90px 45px 0;
}

.header-carousel::before {
    position: absolute;
    content: "";
    top: 0;
    right: 0;
    width: calc(50% + 45px);
    height: 100%;
    background: var(--bs-primary);
    z-index: -1;
}

.header-carousel .owl-dots {
    position: absolute;
    top: 50%;
    right: 38px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.header-carousel .owl-dot {
    position: relative;
    display: inline-block;
    margin: 5px 0;
    width: 15px;
    height: 15px;
    border: 2px solid var(--bs-white);
    transition: .5s;
}

.header-carousel .owl-dot.active {
    height: 30px;
    background: var(--bs-white);
}


/*** About ***/
.about-img {
    position: relative;
    overflow: hidden;
}

.about-img::after {
    position: absolute;
    content: "";
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: url(../img/bg-about-img.png) top left no-repeat;
    background-size: contain;
}


/*** Project ***/
.project-item img {
    transition: .5s;
}
  
.project-item:hover img {
    transform: scale(1.2);
}
  
.project-overlay {
    position: absolute;
    padding: 25px;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    background: linear-gradient(rgba(255, 255, 255, .1) 50%, var(--bs-dark));
    z-index: 1;
}


/*** Service ***/
.service-item {
    position: relative;
    padding: 30px 25px;
    transition: .5s;
}

.service-item.bg-primary:hover {
    background: var(--bs-light) !important;
}

.service-item.bg-primary p {
    color: var(--bs-light);
    transition: .5s;
}

.service-item.bg-primary:hover p {
    color: var(--bs-secondary);
}

.service-item.bg-light:hover {
    background: var(--bs-primary) !important;
}

.service-item.bg-light p {
    color: var(--bs-secondary);
    transition: .5s;
}

.service-item.bg-light:hover p {
    color: var(--bs-light);
}


.service-item .service-img h3 {
    position: absolute;
    top: 0;
    left: 0;
    padding: 0 12px 7px 0;
}

.service-item.bg-primary .service-img h3 {
    background: var(--bs-primary);
    color: var(--bs-white);
    transition: .5s;
}

.service-item.bg-primary:hover .service-img h3 {
    background: var(--bs-light);
    color: var(--bs-dark);
}

.service-item.bg-light .service-img h3 {
    background: var(--bs-light);
    color: var(--bs-dark);
    transition: .5s;
}

.service-item.bg-light:hover .service-img h3 {
    background: var(--bs-primary);
    color: var(--bs-white);
}


/*** Our Team ***/
.team-item img {
    transition: .5s;
}
  
.team-item:hover img {
    transform: scale(1.2);
}
  
.team-overlay {
    position: absolute;
    padding: 30px;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    background: linear-gradient(rgba(255, 255, 255, .1) 50%, var(--bs-dark));
    z-index: 1;
}

.team-overlay small {
    display: inline-block;
    padding: 3px 15px;
    color: var(--bs-white);
    background: var(--bs-primary);
}


/*** Newsletter ***/
.newsletter {
    background: url(../img/hero-bg.jpg) bottom right no-repeat;
    background-size: cover;
}

@media (min-width: 992px) {
    .newsletter .container {
        max-width: 100% !important;
    }

    .newsletter .newsletter-text  {
        padding-right: calc(((100% - 960px) / 2) + .75rem);
    }
}

@media (min-width: 1200px) {
    .newsletter .newsletter-text  {
        padding-right: calc(((100% - 1140px) / 2) + .75rem);
    }
}

@media (min-width: 1400px) {
    .newsletter .newsletter-text  {
        padding-right: calc(((100% - 1320px) / 2) + .75rem);
    }
}


/*** Footer ***/
.footer .btn.btn-link {
    display: block;
    margin-bottom: 10px;
    padding: 0;
    text-align: left;
    color: rgba(255,255,255,.5);
    font-weight: normal;
    transition: .3s;
}

.footer .btn.btn-link:hover {
    color: var(--bs-white);
    letter-spacing: 1px;
    box-shadow: none;
}

.footer .btn.btn-link::before {
    position: relative;
    content: "\f105";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 10px;
}

.footer .copyright {
    padding: 25px 0;
    font-size: 14px;
    border-top: 1px solid rgba(256, 256, 256, .1);
}

.footer .copyright a {
    color: rgba(255,255,255,.5);
}

.footer .copyright a:hover {
    color: var(--bs-white);
}

.footer .footer-menu a {
    margin-right: 15px;
    padding-right: 15px;
    border-right: 1px solid rgba(255, 255, 255, .1);
}

.footer .footer-menu a:last-child {
    margin-right: 0;
    padding-right: 0;
    border-right: none;
}

/* index */
@media (max-width: 768px) {
  .hero-header img {
    height: auto; /* ให้ขนาดยืดตามหน้าจอ */
    object-fit: contain; /* ให้เห็นรูปเต็ม */
  }
}
.hero-header {
  margin: 0;
  padding: 0;
  overflow: hidden;
  line-height: 0; /* ตัดช่องว่างระหว่างบรรทัดที่บาง browser แทรก */
}
.hover-zoom {
  transition: transform 0.5s ease, box-shadow 0.4s ease;
  border-radius: 8px;
}

.hover-zoom:hover {
  transform: scale(1.05); /* ขยายขึ้นเล็กน้อย */
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3); /* เพิ่มเงา */
  cursor: pointer;
}
.feature-box {
  transition: all 0.4s ease;
  background: #fff;
  padding: 30px 20px;
  border-radius: 16px;
  border: 1px solid #eee;

  /* ทำการ์ดให้เท่ากัน */
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  text-align: center;
}

.feature-box p {
  flex-grow: 1; /* ดันให้สูงเท่ากัน */
}

.feature-box:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  border-color: transparent;
}

.feature-box:hover i {
  color: #dc3545;
  transform: scale(1.1);
}

.topnav {
    margin: 0;
    padding: 0;
    list-style: none;
    background: #0b0708;
    height: 3em;
    display: flex;
    align-items: center;
  }

  .topnav .container {
    width: 100%;
    max-width: 1200px; /* ขอบเขตของคอนเทนเนอร์ */
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between; /* ซ้าย-ขวาแยก */
  }

  .topnav .container > div:first-child {
  padding-left: 5px;  /* ขยับซ้าย */
}

  .topnav a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
  }

  .topnav a:hover {
    color: #ff5252; /* สีแดงตอน hover */
    
  }

  .topnav ul {
    margin: 0;
    padding: 0;
    display: flex;
    gap: 25px; /* ระยะห่างระหว่างลิงก์ */
  }

  .topnav li {
    list-style: none;
  }

  /* Sidebar base */
  #sidebar {
    position: fixed;
    top: 0;
    left: -260px;
    width: 260px;
    height: 100%;
    background: #111315;
    color: #fff;
    transition: all 0.3s;
    z-index: 2000;
    overflow-y: auto;
  }

  #sidebar.active {
    left: 0;
  }

  #dismiss {
    position: absolute;
    top: 15px;
    right: 20px;
    cursor: pointer;
  }

  #sidebar .sidebar-header {
    padding: 20px;
    background: #111315;
  }

  #sidebar ul.components {
    padding: 0;
  }

  #sidebar ul li a {
    display: block;
    padding: 12px 20px;
    font-size: 15px;
    color: #fff;
    text-decoration: none;
    transition: 0.3s;
  }

  #sidebar ul li a:hover {
    background: #b70000;
    color: #fff;
  }

 @font-face {
    font-family: 'PKMaehongson';
    src: url('../assets/fonts/PK Maehongson Medium.otf') format('opentype'),
         url('../assets/fonts/PK Maehongson Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
}

body {
    font-family: 'PKMaehongson', sans-serif;
}

body, h1, h2, h3, h4, h5, h6, p, a, li, input, button {
    font-family: 'PKMaehongson', sans-serif;
}

.table {
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  color: #333;
  font-size: 15px;
}

.table thead th {
  text-transform: uppercase;
  font-weight: 600;
  border-bottom: 2px solid #b70000;
  padding: 14px;
}

.table td {
  padding: 14px 16px;
  border-bottom: 1px solid #eee;
}

.table-light {
  background: #f8f9fa;
}

.table .btn-success {
  background: #00b050;
  border: none;
  font-size: 13px;
  font-weight: 600;
}


/* ⭐ ทำให้ responsive สำหรับมือถือ */
@media (max-width: 576px) {

  .table {
    font-size: 13px;               /* ฟอนต์เล็กลง = อ่านง่ายขึ้น */
  }

  .table thead th {
    font-size: 14px;               /* หัวตารางไม่ใหญ่จนแตก */
    padding: 10px 8px;             /* เว้นขอบลง */
    white-space: nowrap;           /* กันหัวข้อหักบรรทัด */
  }

  .table td {
    padding: 10px 12px;            /* ช่วยให้ไม่แน่น */
    font-size: 13px;
  }

  .table small {
    font-size: 11px !important;    /* ข้อความเสริมไม่กินที่เยอะ */
    line-height: 1.3;
  }

  .table .btn-success {
    font-size: 11px !important;    /* ปุ่มเล็กลง ไม่ล้น */
    padding: 3px 6px;
  }

  /* กันเนื้อหาในบรรทัดเดียวล้นตาราง */
  .table td,
  .table th {
    word-break: break-word;
  }
}

.project-item img {
    height: 200px; /* ปรับตามที่อยากให้สูง */
    object-fit: cover;
}
.skill-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.tag {
    background: #f5f5f5;
    padding: 8px 18px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    color: #333;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    transition: all .25s ease-in-out;
}

.tag:hover {
    background: #dc3545;
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 6px 14px rgba(220,53,69,0.35);
}

#clients2 ul {
    list-style: disc;
    line-height: 1.6;
}

/* จัดระยะสวยขึ้นในจอมือถือ */
@media (max-width: 576px) {
    #clients2 h5 {
        margin-top: 25px;
    }
    #clients2 p {
        font-size: 16px !important;
    }
}
.text-custom {
    color: #2727ba !important; /* ใส่สีที่เจ้านายต้องการที่นี่ */
}

/* ทำให้ภาพ Responsive สวย */
.resp-img {
    width: 100%;
    height: 450px;
    object-fit: contain;
    border-radius: 20px;
    
}




/* ปรับสำหรับแท็บเล็ต */
@media (max-width: 992px) {
    .resp-img {
        height: 350px;
    }
}

/* ปรับสำหรับมือถือ */
@media (max-width: 768px) {
    .resp-img {
        height: 250px;
        border-radius: 15px;
    }

    /* ขยับความห่าง */
    section .col-lg-6 {
        text-align: center;
    }

    /* ขยายตัวหนังสือให้สวยกำลังดี */
    section h2 {
        font-size: 24px !important;
    }

    section p {
        font-size: 16px !important;
        line-height: 1.8 !important;
    }

    section h4 {
        font-size: 20px !important;
    }
}

.milestone-card {
    position: relative;
    padding-top: 20px;
}

.milestone-card img {
    position: relative;
    z-index: 2;
}

/* เส้นเชื่อมด้านหลัง */
.milestone-card::after {
    content: "";
    position: absolute;
    top: 110px; /* กึ่งกลางรูป */
    left: 50%;
    width: 100%;
    height: 4px;
    background: #C72427;
    z-index: 1;
}

/* ซ่อนเส้นของใบสุดท้าย */
.col-lg-3:last-child .milestone-card::after {
    display: none;
}

/* ปรับให้เส้นไม่เกิน card */
.milestone-card {
    overflow: visible;
}

/* สำหรับมือถือ ให้ซ่อนเส้นเพื่อไม่ให้เกะกะ */
@media (max-width: 768px) {
    .milestone-card::after {
        display: none;
    }
}

@media (max-width: 767px) {
    .qr-box {
        display: none !important;
    }
}

/* Desktop: ซ่อนไว้ แต่ยังคงที่ layout */
@media (min-width: 769px) {
    .mobile-toggle {
        visibility: hidden;
    }
}

/* Mobile: แสดงปกติ */
@media (max-width: 768px) {
    .mobile-toggle {
        visibility: visible;
    }
}

/* มือถือ: ซ่อน */
@media (max-width: 768px) {
    .topnav ul {
        display: none;
    }
}

/* คอม: แสดงปกติ */
@media (min-width: 769px) {
    .topnav ul {
        display: flex; 
    }
}
.category-list a {
    color: #635858 !important;
    text-decoration: none;
}

.category-list a:hover {
    color: #fabe4f; 
}
.category-list p {
    margin: 3px 0; 
}
.footer-social p {
        margin-bottom: 6px; 
}
.footer-links p {
    margin-bottom: 6px; 
}
/* Tablet */
@media (max-width: 991px) {
    .brand-logo {
        height: 30px;
    }
    .brand-title {
        font-size: 22px;
    }
    .brand-slogan {
        font-size: 15px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .brand-logo {
        height: 26px;
    }
    .brand-title {
        font-size: 18px;
    }
    .brand-slogan {
        font-size: 13px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .brand-logo {
        height: 22px;
    }
    .brand-title {
        font-size: 16px;
    }
    .brand-slogan {
        font-size: 13px;
    }
}

