/*--------------------------------------------------------------
# Hero Section
--------------------------------------------------------------*/
#hero {
    width: 100%;
    height: 55vh;
    background: #000;
    overflow: hidden;
    position: relative;
  }
  
  @media (max-height: 500px) {
    #hero {
      height: 150vh;
    }
  }
  
  #hero .carousel, #hero .carousel-inner, #hero .carousel-item, #hero .carousel-item::before {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    bottom: 0;
  }
  
  #hero .carousel-item {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
  }
  
  #hero .carousel-item::before {
    content: '';
    background-color: rgba(0, 0, 0, 0);
  }
  
  #hero .carousel-container {
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    bottom: 0;
    top: 70px;
    left: 50px;
    right: 50px;
  }
  
  #hero .container {
    text-align: center;
  }
  
  #hero h2 {
    color: #fff;
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: 700;
  }
  
  @media (max-width: 768px) {
    #hero h2 {
      font-size: 20px;
      line-height: 1.2;
    }
  }
  
  #hero p {
    width: 80%;
    font-size: 38px;
    line-height: 1.2;
    margin: 0 auto 30px auto;
    color: #fff;
  }
  
  @media (min-width: 1024px) {
    #hero p {
      width: 60%;
    }
  }
  
  @media (max-width: 768px) {
    #hero p {
      font-size: 28px;
      line-height: 1.2;
    }
  }
  
  #hero .carousel-fade {
    overflow: hidden;
  }
  
  #hero .carousel-fade .carousel-inner .carousel-item {
    transition-property: opacity;
  }
  
  #hero .carousel-fade .carousel-inner .carousel-item,
  #hero .carousel-fade .carousel-inner .active.carousel-item-start,
  #hero .carousel-fade .carousel-inner .active.carousel-item-end {
    opacity: 0;
  }
  
  #hero .carousel-fade .carousel-inner .active,
  #hero .carousel-fade .carousel-inner .carousel-item-next.carousel-item-start,
  #hero .carousel-fade .carousel-inner .carousel-item-prev.carousel-item-end {
    opacity: 1;
    transition: 0.5s;
  }
  
  #hero .carousel-fade .carousel-inner .carousel-item-next,
  #hero .carousel-fade .carousel-inner .carousel-item-prev,
  #hero .carousel-fade .carousel-inner .active.carousel-item-start,
  #hero .carousel-fade .carousel-inner .active.carousel-item-end {
    left: 0;
    transform: translate3d(0, 0, 0);
  }
  
  #hero .carousel-control-prev, #hero .carousel-control-next {
    width: 10%;
  }
  
  @media (min-width: 1024px) {
    #hero .carousel-control-prev, #hero .carousel-control-next {
      width: 5%;
    }
  }
  
  #hero .carousel-control-next-icon, #hero .carousel-control-prev-icon {
    background: none;
    font-size: 32px;
    line-height: 1;
  }
  
  #hero .carousel-indicators li {
    cursor: pointer;
  }
  
  #hero .btn-get-started {
    font-weight: 500;
    font-size: 16px;
    letter-spacing: 1px;
    display: inline-block;
    padding: 8px 32px;
    border-radius: 50px;
    transition: 0.5s;
    margin: 10px;
    color: #fff;
    background: #0085AD;
  }
  
  #hero .btn-get-started:hover {
    background: #fff;
    color: #0085AD;
  }

  /*--------------------------------------------------------------
# Features
--------------------------------------------------------------*/

.features .nav-tabs {
  border: 0;
}

.features .nav-link {
  border: 1px solid #d4d6df;
  padding: 15px;
  transition: 0.3s;
  color: #2a2c39;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  text-align: center;
}

.features .nav-link h6 {
  padding-right: 10px;
  padding-left: 10px;
  font-size: 15px;
  margin: 0%;
}

.features .nav-link h4 {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  padding: auto;
  
}

.features .nav-link:hover {
  color: #003C71;
}

.features .nav-link.active {
  background: #003C71;
  color: #fff;
  border-color: #003C71;
}

@media (max-width: 768px) {
  .features .nav-link h5 {
    padding: 0;
    line-height: 1;
    font-size: 36px;
  }
}

@media (max-width: 575px) {
  .features .nav-link {
    padding: 15px;
  }
  .features .nav-link h5 {
    font-size: 24px;
  }
}

.features .tab-content {
  margin-top: 30px;
}

.features .tab-pane h3 a {
  font-weight: 600;
  font-size: 20px;
}

.features .tab-pane ul {
  list-style: none;
  padding: 0;
}

.features .tab-pane ul li {
  padding-bottom: 10px;
}

.features .tab-pane ul i {
  font-size: 20px;
  padding-right: 4px;
  color: #ef6603;
}

.features .tab-pane p:last-child {
  margin-bottom: 0;
}



.btn {
  padding: 0;
  cursor: pointer;
  border-width: 1px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  -webkit-box-shadow: 0px 7px 15px -13px rgba(0, 0, 0, 0.17);
  -moz-box-shadow: 0px 7px 15px -13px rgba(0, 0, 0, 0.17);
  box-shadow: 0px 7px 15px -13px rgba(0, 0, 0, 0.17);
  border: none;
  overflow: hidden;
  position: relative;
  -moz-transition: all 0.3s ease;
  -o-transition: all 0.3s ease;
  -webkit-transition: all 0.3s ease;
  -ms-transition: all 0.3s ease;
  transition: all 0.3s ease; }
  .btn:hover, .btn:active, .btn:focus {
    outline: none !important; }
  .btn small {
    background: #e6e6e6;
    padding: 2px 8px;
    color: rgba(0, 0, 0, 0.3); }
  .btn .icon {
    width: 60px;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1); }
    .btn .icon i {
      font-size: 30px; }
    .btn .icon.icon-left {
      left: 0; }
    .btn .icon.icon-right {
      right: 0; }
    .btn .icon.icon-primary {
      background: #FB743E; }
      .btn .icon.icon-primary i {
        color: #fff; }
    .btn .icon.icon-secondary {
      background: #3EE0FB; }
      .btn .icon.icon-secondary i {
        color: #fff; }
    .btn .icon.icon-tertiary {
      background: #61f17c; }
      .btn .icon.icon-tertiary i {
        color: #fff; }
    .btn .icon.icon-quarternary {
      background: #315DAE; }
      .btn .icon.icon-quarternary i {
        color: #fff; }
  .btn .text {
    width: calc(100% - 50px); }
    .btn .text h4 {
      font-size: 22px;
      margin-bottom: 22px; }
  .btn.btn-primary {
    background: #6c5ce7;
    border-color: #6c5ce7;
    color: #fff; }
    .btn.btn-primary .text span {
      color: rgba(255, 255, 255, 0.8); }
    .btn.btn-primary:hover, .btn.btn-primary:focus {
      border-color: #4430e0 !important;
      background: #4430e0 !important; }
    .btn.btn-primary.btn-link {
      background: transparent;
      color: #fff;
      border: none;
      -webkit-box-shadow: none;
      box-shadow: none; }
  .btn.btn-outline-primary {
    color: #6c5ce7;
    border-color: #6c5ce7; }
    .btn.btn-outline-primary:hover, .btn.btn-outline-primary:focus {
      color: #fff;
      background: #6c5ce7; }
  .btn.btn-secondary {
    color: #fff;
    border-color: #1ee3cf;
    background: #1ee3cf; }
    .btn.btn-secondary .text span {
      color: rgba(255, 255, 255, 0.8); }
    .btn.btn-secondary:hover, .btn.btn-secondary:focus {
      border-color: #17b7a7 !important;
      background: #17b7a7 !important; }
    .btn.btn-secondary.btn-link {
      color: #1ee3cf;
      background: transparent; }
  .btn.btn-outline-secondary {
    color: #1ee3cf;
    border-color: #1ee3cf; }
    .btn.btn-outline-secondary:hover, .btn.btn-outline-secondary:focus {
      color: #fff;
      background: #1ee3cf; }
  .btn.btn-tertiary {
    color: #fff;
    background: #ff00c8;
    border-color: #ff00c8; }
    .btn.btn-tertiary .text span {
      color: rgba(255, 255, 255, 0.8); }
    .btn.btn-tertiary:hover, .btn.btn-tertiary:focus {
      border-color: #cc00a0 !important;
      background: #cc00a0 !important; }
    .btn.btn-tertiary.btn-link {
      color: #ff00c8;
      background: transparent; }
  .btn.btn-outline-tertiary {
    color: #ff00c8;
    border-color: #ff00c8; }
    .btn.btn-outline-tertiary:hover, .btn.btn-outline-tertiary:focus {
      color: #fff;
      background: #ff00c8; }
  .btn.btn-quarternary {
    color: #fff;
    border-color: #a1dd70;
    background: #a1dd70; }
    .btn.btn-quarternary .text span {
      color: rgba(255, 255, 255, 0.8); }
    .btn.btn-quarternary:hover, .btn.btn-quarternary:focus {
      border-color: #86d347 !important;
      background: #86d347 !important; }
    .btn.btn-quarternary.btn-link {
      color: #a1dd70;
      background: transparent; }
  .btn.btn-outline-quarternary {
    color: #a1dd70;
    border-color: #a1dd70; }
    .btn.btn-outline-quarternary:hover, .btn.btn-outline-quarternary:focus {
      color: #fff;
      background: #a1dd70; }
  .btn.btn-white {
    background: #fff;
    border-color: #fff;
    color: #000; }
    .btn.btn-white .text span {
      color: rgba(0, 0, 0, 0.3); }
  .btn.btn-round {
    border-radius: 40px; }
  .btn.btn-link {
    border: none;
    -webkit-box-shadow: none;
    box-shadow: none;
    color: #000; }
  .btn.btn-sm, .btn-group-sm > .btn {
    padding: 5px 20px;
    font-size: 12px; }
  .btn.btn-lg, .btn-group-lg > .btn {
    padding: 17px 24px;
    font-size: 16px; }
  .btn.btn-fb {
    background: #4f69a2;
    border-color: #4f69a2;
    color: #fff; }
  .btn.btn-twitter {
    background: #69b6f0;
    border-color: #69b6f0;
    color: #fff; }
  .btn.btn-googleplus {
    background: #de5e50;
    border-color: #de5e50;
    color: #fff; }
  .btn.btn-linkedin {
    background: #2884ba;
    border-color: #2884ba;
    color: #fff; }
  .btn.btn-pinterest {
    background: #d03940;
    border-color: #d03940;
    color: #fff; }
  .btn.btn-dribbble {
    background: #ea6294;
    border-color: #ea6294;
    color: #fff; }
  .btn.btn-outline {
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #000;
    background: transparent; }
    .btn.btn-outline:hover {
      color: rgba(0, 0, 0, 0.5);
      border-color: rgba(0, 0, 0, 0.05); }


/*--------------------------------------------------------------
# Service card
--------------------------------------------------------------*/


/* Category Ads */

#ads {
    margin: 30px 0 30px 0;
   
}

#ads .card-notify-badge {
        position: absolute;
        left: -10px;
        top: -20px;
        background: #f2d900;
        text-align: center;
        border-radius: 30px 30px 30px 30px; 
        color: #000;
        padding: 5px 10px;
        font-size: 14px;

    }

#ads .card-notify-year {
        position: absolute;
        right: -10px;
        top: -20px;
        background: #ff4444;
        border-radius: 50%;
        text-align: center;
        color: #fff;      
        font-size: 14px;      
        width: 50px;
        height: 50px;    
        padding: 15px 0 0 0;
}


#ads .card-detail-badge {      
        background: #f2d900;
        text-align: center;
        border-radius: 30px 30px 30px 30px;
        color: #000;
        padding: 5px 10px;
        font-size: 14px;        
    }

   

#ads .card:hover {
            background: #fff;
            box-shadow: 12px 15px 20px 0px rgba(46,61,73,0.15);
            border-radius: 4px;
            transition: all 0.3s ease;
        }

#ads .card-image-overlay {
        font-size: 20px;
        
    }


#ads .card-image-overlay span {
            display: inline-block;              
        }


#ads .ad-btn {
        text-transform: uppercase;
        width: 150px;
        height: 40px;
        border-radius: 80px;
        font-size: 16px;
        line-height: 35px;
        text-align: center;
        border: 3px solid #B6B8DC;
        display: block;
        text-decoration: none;
        margin: 20px auto 1px auto;
        color: #fff;
        overflow: hidden;        
        position: relative;
        background-color: #B6B8DC;
    }

#ads .ad-btn:hover {
            background-color: #B6B8DC;
            color: #1e1717;
            border: 2px solid #B6B8DC;
            background: transparent;
            transition: all 0.3s ease;
            box-shadow: 12px 15px 20px 0px rgba(46,61,73,0.15);
        }

#ads .ad-title h5 {
        text-transform: uppercase;
        font-size: 18px;
    }
#features .card {
      border: 0;
      padding: 20px 30px 20px 20px; 
      position: relative;
      width: 100%;
      background-size: cover;
      background-repeat: no-repeat;
      background-position: center center;
  }

  .card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    word-wrap: break-word;
    background-color: rgb(236, 235, 235);
    background-clip: border-box;
    border: 1px solid rgba(0,0,0,.125);
    border-radius: .25rem;
}

/*
.carousel-inner{
    height: 300px;
}


.item, img{
    height: 100% !important;
    width:  100% !important;
    border: 1px solid red;
}
*/

.carousel .item{
    height: 300px;
}

.item img {
    position: absolute;
    top: 0;
    left: 0;
    min-height: 300px;
}
.fade:not(.show) {
  display: none;
 
}
.element.style {
  position: absolute ;
  height: 100% !important;
  box-shadow: rgba(0, 0, 0, 0.1) 1px 1px 2px 2px;
  z-index: 1000;
  pointer-events: none;
  display: none;
  border-radius: 0px;
  left: 377px;
  bottom: -209px;
  transition: left 0.1s ease-out, bottom 0.1s ease-out;
}

/* ปรับปรุง layout หน้า home */
.container-fluid.p-0.pb-5 {
    margin-bottom: 3rem !important;
}

.container-xxl {
    padding-top: 4rem !important;
    padding-bottom: 4rem !important;
}

.container-xxl + .container-xxl {
    margin-top: 2rem;
}

.service-item {
    height: 100%;
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
}

.service-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.service-item img, .portfolio-img {
    height: 250px;
    object-fit: cover;
    width: 100%;
}

.portfolio-item {
    margin-bottom: 30px;
}

.portfolio-img {
    position: relative;
    overflow: hidden;
}

#nav-tab {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
}

div[id^="chartContainer"] {
    margin-top: 20px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
}

.row.g-4 {
    row-gap: 2rem !important;
}

.d-flex.justify-content-end {
    margin-top: 30px;
    padding-right: 15px;
}

iframe {
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .container-xxl {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
    
    .service-item img, .portfolio-img {
        height: 200px;
    }
}
/* แก้ไขปัญหาพื้นที่สีขาวหลัง footer */

/* Reset และกำหนด layout หลัก */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    background-color: #f8f9fa; /* หรือสีที่ต้องการ */
}

/* Main content wrapper */
main, 
.main-content,
body > div:not(.container-fluid.bg-dark):not(.spinner-border):not(.back-to-top) {
    flex: 1 0 auto;
}

/* Footer styles */
.container-fluid.bg-dark.footer {
    flex-shrink: 0;
    margin-top: auto !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* ลบ padding/margin ที่ไม่จำเป็น */
body > :last-child {
    margin-bottom: 0 !important;
}

/* ป้องกัน gap จาก pseudo elements */
body::before,
body::after {
    display: none;
}

/* JavaScript libraries container */
body > script {
    display: none;
}

/* Spinner adjustment */
#spinner {
    position: fixed !important;
}

/* Back to top button */
.back-to-top {
    position: fixed !important;
    bottom: 40px;
    right: 40px;
    z-index: 9999;
}

/* ปรับ container สุดท้ายก่อน footer */
.container-xxl:last-of-type {
    padding-bottom: 5rem !important;
}

/* Media queries */
@media (max-width: 768px) {
    .container-xxl:last-of-type {
        padding-bottom: 3rem !important;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
    }
}