.second-bar {
    position: relative; 
    padding: 60px;
    text-align: left;
    background-image: url('../photo/22.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.second-bar h2{
    color: white;
    z-index: 1;
    text-align: center;

}

.second-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(41, 25, 45, 0.3);
    z-index: 0; 
}

.button-container {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    margin-left: 250px;
    justify-content: left;
    gap: 20px;
}

.button-container .button {
    display: flex;
    align-items: left;
    justify-content: center;
    width: calc(27.27% - 40px);
    height: 100px;
    max-width: 50;
    background-color: #f9efff;
    color: rgb(45, 37, 37);
    border-radius: 10px;
    font-size: 18px;
    text-align: left;
    margin-top: 40px;
    padding: 10px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s, transform 0.3s;
    z-index: 0; 
}

.button-container .button:hover {
    background-color: #2e2136;
    transform: scale(1.05);
    color: #f4f4f4;
}

.button-container .button i {
    margin: 10px;
    margin-left: 0px;
    left: 0px;
    
}


.five-bar {
    padding: 60px;
    background-color: rgba(26, 45, 26, 0.3);
    text-align: center;
    background-image: url('../photo/22.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    background-attachment: fixed; /* กำหนดให้คงที่เมื่อมีการเลื่อน */
    position: relative; 
}

.five-bar h2 {
    color: white;
}

.five-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(41, 25, 45, 0.3);
    z-index: 0;
}

.button-first {
    display: flex;
    flex-wrap: wrap; 
    justify-content: center; 
    gap: 20px;
    position: relative;
    z-index: 1;
}

.button-first .button-second {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: calc(27.27% - 40px); 
    height: 100px; 
    background-color: #f4f4f4;
    color: rgb(85, 72, 101);
    border-radius: 10px;
    font-size: 18px;
    text-align: center;
    margin-top: 40px;
    padding: 10px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s, transform 0.3s;
    overflow: hidden; 
    word-wrap: break-word;
}

.button-first .button-second:hover {
    background-color: #565167;
    transform: scale(1.05);
    color: white;
}

.button-first .button-second i {
    font-size: 1.8em; 
    margin-bottom: 10px; 
}

.button-first .button-second span {
    font-size: 16px; 
    word-wrap: break-word; 
    text-overflow: ellipsis; 
    overflow: hidden; /* ซ่อนข้อความที่ล้นออกจากกรอบ */
}

.container-background {
    padding: 60px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 40vh;
    background: linear-gradient(to top, #fefbff, #fefbff, #fefbff); /* ไล่สีจากเขียวเข้มไปเขียวอ่อน */
}

.container-background h2 {
    font-size: 1.8em;
    color: black;
    margin-bottom: 30px;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
}

.circle-button-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    color: white;
    max-width: 1200px;
}

.circle-button {
    width: calc(25% - 20px);
    height: 100px;
    background-color: #7e7489;
    color: #080808;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 4px 5px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s, transform 0.3s;
}


.circle-button:hover {
    background-color: #d4c8e1;
    transform: scale(1.05);
    color: black;
}
.button-container a,
.button-first a,
.circle-button-container a {
    text-decoration: none;
    color: inherit; 
}

.button-container a:hover,
.button-first a:hover,
.circle-button-container a:hover {
    text-decoration: none; 
}

.smart-office-button {
    display: flex;
    flex-direction: row; 
    align-items: center;
    text-align: left;
    padding: 10px;
    text-decoration: none;
    max-width: 330px; 
    background-color: #f9efff;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s, transform 0.3s;
    overflow: hidden; /* ป้องกันข้อความที่ยาวเกินออกนอกกรอบ */
}

.smart-office-button:hover {
    background-color: #e1d8f4;
    transform: scale(1.05);
}

.smart-office-button .icon-large {
    font-size: 2em;
    width: 40px;
    height: 40px;
    margin-right: 10px; 
    align-self: flex-start; /* จัดไอคอนชิดด้านซ้าย */
}

.text-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex-shrink: 1; /* ปล่อยให้ข้อความยืดได้เมื่อพื้นที่ไม่พอ */
    word-wrap: break-word; /* ให้ข้อความตัดลงบรรทัดถัดไปเมื่อยาวเกิน */
    overflow-wrap: break-word; /* เพิ่มการตัดข้อความในกรณีที่ยาวเกิน */
}

.smart-office-button .large-text {
    font-size: 1.5em;
    font-weight: bold;
    color: #444;
    white-space: normal; /* ทำให้ข้อความยืดหยุ่นได้ */
    overflow: hidden; /* ซ่อนข้อความที่ล้นออกจากกรอบ */
    text-overflow: ellipsis; /* ใช้ ellipsis สำหรับข้อความที่ยาวเกิน */
}

.smart-office-button span {
    font-size: 1em;
    color: #444;
    white-space: normal; /* ให้ข้อความตัดลงบรรทัดถัดไป */
    overflow: hidden;
    text-overflow: ellipsis;
}
.smart-office-button:hover {
    color:#f6f6f6
}
