/* สไตล์หลักของเว็บไซต์ */
body {
    font-family: 'Prompt', sans-serif;
    background: #eef2f9;
    padding-bottom: 0px; /* สูงเท่า footer */
}

/* สไตล์ส่วน Header และ Footer */
header, footer {
    background: #003366;
    color: white;
}

header {
    padding: 0;
}
footer {
     padding: 6px;
    width: 100%;
    text-align: center;
    line-height: 1;
    font-size: 1rem;
    background-color: #003366;
    color: white;

    /* แก้ไขตรงนี้ */
    position: relative; /* เปลี่ยนจาก fixed เป็น relative */
    bottom: auto;       /* ปิดการลอย */
    clear: both;        /* ป้องกันชนกับ element ลอยตัวอื่น */
    margin-top: 40px;   /* เพิ่มระยะห่างจากเนื้อหา */
}

/* สำหรับข้อความหรือลิงก์ภายใน footer */
footer p, footer a, footer div {
    margin: 0; /* ลบ margin */
    padding: 2px 0; /* ลดระยะห่างด้านบนและล่าง */
}

/* สไตล์ส่วนบนของ Header */
.top-header {
    padding: 5px 0;
}

.logo-section h1 {
    margin: 0;
    font-size: 1.5rem; /* ลดจาก 1.8rem */
    padding: 5px 0; /* ลดจาก 10px 0 */
}

/* สไตล์ส่วนข้อมูลติดต่อ */
.contact-info {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px; /* ลดจาก 20px */
}

.contact-item {
     display: flex;
    align-items: center;
    font-size: 0.8rem; /* ลดจาก 0.9rem */
}

.contact-item i {
    margin-right: 5px;
}

/* สไตล์ส่วน Main Menu */
.main-menu {
    background-color: #1f64ad;
}

header a {
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

header a:hover {
    color: #ffcc00;
    text-decoration: none;
}

/* สไตล์ Navbar */
.navbar-nav .nav-link {
    color: white;
    padding: 15px 20px;
    font-size: 1rem;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffcc00;
}

.navbar-toggler {
    border-color: rgba(255, 255, 255, 0.5);
    padding: 5px 10px;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 0.85)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* สไตล์ลิงก์ทั่วไป */
a {
    color: #003366;
}

/* สไตล์ Responsive */
@media (max-width: 992px) {
    .contact-info {
        justify-content: center;
        margin-top: 10px;
    }
    
    .logo-section {
        text-align: center;
    }
    
    .navbar-collapse {
        background-color: #00254d;
    }
    footer {
        margin-top: auto; /* ดัน footer ไปด้านล่าง */
    }
    .carousel-buttons {
        position: static; /* เอา absolute ออก */
        margin-top: 10px;
        justify-content: center;
        align-items: center;
        flex-direction: row;
        gap: 10px;
        padding-right: 0px;
    }

    .carousel-buttons .btn {
        font-size: 10px;
        padding: 5px 10px;
    }

    /* ปรับให้ปุ่มแสดงด้านล่าง carousel */
    .carousel-item {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 576px) {
    .contact-info {
        flex-direction: column;
        gap: 5px;
    }
    footer {
        margin-top: auto; /* ดัน footer ไปด้านล่าง */
    }
  .carousel-buttons {
        justify-content: flex-end;
        padding-right: 0px;
    }

    .carousel-buttons .btn {
        font-size: 12px;
        padding: 6px 10px;
    }
}
/* ปรับขนาดปุ่มให้เหมาะสมกับหน้าจอเล็ก */
@media (max-width: 768px) {
   .carousel-buttons {
        justify-content: flex-end;
        padding-right: 0px;
    }

    .carousel-buttons .btn {
        font-size: 12px;
        padding: 6px 10px;
    }
    footer {
        margin-top: auto; /* ดัน footer ไปด้านล่าง */
    }
}

/* ปรับขนาดปุ่มในหน้าจอมือถือ */
@media (max-width: 576px) {
   .carousel-buttons {
        justify-content: flex-end;
        padding-right: 0px;
    }

    .carousel-buttons .btn {
        font-size: 12px;
        padding: 6px 10px;
    }
    /* ปรับให้ปุ่มแสดงด้านล่าง carousel */
    .carousel-item {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    footer {
        margin-top: auto; /* ดัน footer ไปด้านล่าง */
    }
}

/* ทำให้ container ของภาพแยกออกจากปุ่ม */
.carousel-image-container {
    position: relative;
}

/* ปุ่มอยู่ใต้ภาพ ขวาสุด */
.carousel-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 10px;
    padding-right: 0px; /* ชิดขวาแบบเว้นนิดนึง */
}

/* ปุ่มดีไซน์เดิม ไม่เปลี่ยนสีคุณ */
.carousel-buttons .btn {
    padding: 8px 12px;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.carousel-buttons .btn-primary {
    background-color: #007bff;
    color: white;
}

.carousel-buttons .btn-secondary {
    background-color: #059229;
    color: white;
}

.carousel-buttons .btn:hover {
    opacity: 0.8;
}
 img.thumbnail {
            width: 200px;
            height: auto;
            border: 1px solid #ccc;
            border-radius: 5px;
            box-shadow: 2px 2px 5px rgba(0,0,0,0.1);
        }
       
       .custom-link {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid #007bff;
  color: #007bff;
  text-decoration: none;
  border-radius: 4px;
  transition: background-color 0.2s, color 0.2s;
}

.custom-link:hover,
.custom-link:focus {
  background-color: #007bff;
  color: #fff;
}

.custom-link:active {
  background-color: #0056b3;
  color: #fff;
}
/* สไตล์สำหรับ Service Images */
.service-image-wrapper {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    border-radius: 10px;
}

.service-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.caption {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 10px;
    border-radius: 5px;
    font-size: 16px;
}
.caption-overlay {
    position: absolute;
    bottom: 1px; /* ขยับตำแหน่ง caption ลงมา */
    left: 0;
    width: 100%;
    text-align: center;
    padding: 10px 0;
    background: rgba(0, 0, 0, 0.4); /* พื้นหลังโปร่ง */
}

.caption-text {
    color: #fff;
    font-size: 16px;
    margin: 0;
}