/********** Template CSS **********/
:root {
    --primary: #4CAF50; /* ใช้สีเขียวที่ดูสดชื่นและสบายตา */
    --secondary: #FFEB3B; /* สีเหลืองนวล */
    --light: #FAFAFA; /* สีพื้นหลังอ่อน */
    --dark: #263238; /* สีเทาที่เข้มขึ้นเล็กน้อย เพื่อไม่ให้ดูเข้มเกินไป */
    --accent: #00B8D4; /* สีฟ้าที่สดใส แต่ไม่จัดจ้าน */
}

@import url('https://fonts.googleapis.com/css2?family=Prompt&display=swap');

body {
    font-family: 'Prompt', sans-serif;
	font-size: 16px; /* เพิ่มขนาดฟอนต์ที่ต้องการ */
    line-height: 1.6;
    background-color: var(--bg-color);
    color: var(--accent-color);
}

/* Back-to-top Button */
.back-to-top {
    position: fixed;
    display: none;
    right: 30px;
    bottom: 30px;
    z-index: 99;
    background-color: var(--primary);
    border-radius: 50%;
    padding: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.back-to-top:hover {
    transform: scale(1.1);
}

/* Font Weight */
.fw-bold {
    font-weight: 700;
}

.fw-medium {
    font-weight: 600;
}

.fw-semi-bold {
    font-weight: 500;
}

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

#spinner.show {
    visibility: visible;
    opacity: 1;
}

/*** Button ***/
.btn {
    transition: .3s ease;
    font-weight: 500;
    border-radius: 8px; /* ปรับขอบให้มน */
    padding: 10px 20px; /* ให้ปุ่มดูสบายๆ */
    text-transform: uppercase;
}

.btn-primary,
.btn-outline-primary:hover {
    background-color: var(--primary);
    color: var(--light);
    border-color: var(--primary);
}

.btn-secondary,
.btn-outline-secondary:hover {
    background-color: var(--secondary);
    color: var(--dark);
    border-color: var(--secondary);
}

.btn-square {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: normal;
    background-color: var(--primary);
    border-radius: 8px;
    transition: transform 0.2s ease;
}

.btn-square:hover {
    transform: scale(1.1);
}

.btn-sm-square,
.btn-lg-square {
    width: 35px;
    height: 35px;
}

/*** Navbar ***/
.navbar.sticky-top {
    top: -100px;
    transition: .5s ease-in-out;
}

.navbar .navbar-nav .nav-link {
    margin-right: 30px;
    padding: 20px 0;
    color: var(--dark);
    font-size: 18px;
    font-weight: 500;
    outline: none;
    text-transform: capitalize;
    transition: color 0.3s ease;
}

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

.navbar .dropdown-toggle::after {
    content: "\f107";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    vertical-align: middle;
    margin-left: 8px;
}

/* Hover effects on dropdown menus */
@media (min-width: 992px) {
    .navbar .nav-item:hover .dropdown-menu {
        top: 100%;
        visibility: visible;
        transition: opacity 0.5s ease;
        opacity: 1;
    }

    .navbar .nav-item .dropdown-menu {
        display: block;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.5s ease;
    }
}

/*** Header ***/
header.masthead {
    padding-top: 8rem;
    padding-bottom: calc(8rem - 4.5rem);
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.7) 100%), url("../img/ROX-Banner.jpg");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    transition: background 0.5s ease-out;
}

header.masthead h1 {
    font-size: 2.5rem;
    color: var(--light);
}

@media (min-width: 992px) {
    header.masthead {
        height: 100vh;
        min-height: 40rem;
        padding-top: 4.5rem;
        padding-bottom: 0;
    }
    header.masthead h1 {
        font-size: 3.5rem;
    }
}

.carousel-caption {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.carousel-control-prev,
.carousel-control-next {
    width: 15%;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background-color: var(--primary);
    border: none;
}

/* Add responsive image fitting */
@media (max-width: 768px) {
    #header-carousel .carousel-item img {
        object-fit: cover;
        height: 100%;
    }
}

/*** Footer ***/
.footer {

    background-color: #FFF;
    padding: 30px 0;
}

.footer .btn.btn-link {
    display: block;
    margin-bottom: 10px;
    padding: 0;
    text-align: left;
    color: #B0B9AE;
    font-weight: normal;
    text-transform: capitalize;
    transition: color 0.3s ease;
}

.footer .btn.btn-link:hover {
    color: var(--primary);
}

/* Section Title */
.section-title {
    position: relative;
    display: inline-block;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 30px;
}

.section-title::before,
.section-title::after {
    position: absolute;
    content: "";
    width: calc(100% + 60px);
    height: 2px;
    background: var(--primary);
    z-index: -1;
}

.section-title::before {
    top: 5px;
    left: -30px;
}

.section-title::after {
    bottom: 5px;
    left: -30px;
}

.section-title.text-start::before,
.section-title.text-start::after {
    width: calc(100% + 30px);
    left: 0;
}

/*** Card Styles (Service, Product, etc.) ***/
.card {
    border-radius: 15px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.15);
}

/* Service Item */
.service-item {
    position: relative;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.service-item:hover {
    transform: translateY(-5px);
}

.service-item .service-img img {
    object-fit: cover;
    border-radius: 10px;
}

.service-item .service-text {
    padding: 20px;
    text-align: center;
    background-color: var(--light);
    border-radius: 0 0 10px 10px;
    transition: color 0.3s ease;
}

.service-item:hover .service-text {
    background-color: var(--primary);
    color: var(--light);
}
