* {
    box-sizing: border-box;
}

body {
    overflow-x: hidden;
}

img {
  display: block; 
}

.logo {
    display: flex;
    align-items: center;
    
}

.logo-icon {
  width: 24px;   /* กะขนาดตามสัดส่วนโลโก้ในสเปค */
  height: 32px;
  background-color: transparent; /* ใส่สีเทาไว้มองเห็นตำแหน่ง */
}


.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background-color:#cac3c3;

}


.nav-link {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 20px;


}

.nav-link a {

    text-decoration: none;

}

.logo-text {
    font-weight: 500;
    font-size: 20px;

}

.nav-icons {
    display: none;
    gap: 20px;
    align-items: center;
}

.nav-icons img {
    width: 24px;
    height: 24px;
}


/* MAIN  */


/* HERO   */
.container {
    max-width: auto;
    margin: 0;  
    padding: 0; 
}

.hero {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 32px 24px;
    background-color: #a09d9d;
}


.hero-image {
    flex: 0 0 60%;
}

.hero-image img {
    width: 100%;
    display: block;
}

/* กล่องข้อความข้างรูปhero  */
.hero-text {
    flex: 0 0 40%;
}


.hero-text h1 {
    font-size: 45px;
    font-weight: 600;
    margin-bottom: 24px;
}

.hero-text h3 {
    font-size: 25px;
    font-weight: 600;
    margin-bottom: 24px;
}

.hero-btn {
    background-color: #2f2626;
    color: white;
    padding: 8px 150px;
    font-size: 20px;
    text-align: center;
    cursor: pointer;
    
    
   
}

/* INFORMATION  */




.information {
    display: flex;
    align-items: flex-start;   /* เปลี่ยนจาก center เพราะฝั่งขวามีการ์ด 3 อัน สูงไม่เท่ารูปฝั่งซ้าย */
    gap: 24px;
    padding: 32px 24px;
    background-color: white;
}

.info-left {
    flex: 0 0 60%;
}

.info-left img {
    display: block;
    width: 100%;
}

.info-left h2 {
    font-size: 40px;
    font-weight: 600;
    margin-top: 32px;
}

.info-left p {
    font-size: 25px;
    color: #363232;
}

.info-right {
    flex: 0 0 40%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.info-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    background-color: #d0d8df;
}

.info-item img {
    flex: 0 0 35%;
    display: block;
    aspect-ratio: 1/1;
    object-fit: cover;
    padding: 16px;
    
}

.info-item-text {
    flex: 1 1 65%;
    min-width: 0;
    overflow-wrap: break-word;
    margin-bottom: 8px;
}

.info-item--highlight {
    background-color: #cac3c3;
    
}


/* Course   */

.course {
    display: grid;
    padding: 32px 72px;
    grid-template-columns: repeat(3,1fr);
    gap: 32px;
    background-color:#a09d9d;
    


}

.course h1 {
    text-align: center;
    margin-bottom: 32px;
    grid-column: 1 / -1; 
    font-size: 50px;
}


.course-card {
    background-color: white;


}


.course-card img {
    width: 100%;
    display: block;
}

.course-card h3 {
    padding: 16px 16px 8px;
}

.course-card p {
    padding: 0 16px;
    margin-bottom: 16px;
}

.course-card-text {
    display: flex;
    flex-direction: column;

}

/*  Thesis */

.thesis {
    display: flex;
    padding: 32px 24px;
    background-color: white;
    flex-direction: column;
}

.thesis h1 {
    text-align: center;
    margin-bottom: 32px;
    font-size: 50px;
    
}

.thesis-content {
    display: flex;
    flex-direction: row;  
    gap: 24px;
}


.thesis-left {
    flex: 0 0 60%;
}

.thesis-left video {
    display: block;
    width: 100%;
}

.thesis-left-text {
    display: flex;
    flex-direction: column;
}


.thesis-left h2 {
    font-size: 40px;
    font-weight: 600;
    padding-top: 24px;
    padding-bottom: 8px;
}

.thesis-left p {
    font-size: 25px;
    color: #363232;
    padding-bottom: 32px;
}

.thesis-right {
    flex: 0 0 40%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.thesis-item {
    padding: 16px;
    background-color: white;
    display: flex;
    align-items: flex-start;
}

.thesis-item img {
    flex: 0 0 35%;
    aspect-ratio: 1/1;
    object-fit: cover;
    
    
}

.thesis-item-text {
    flex: 1 1 65%;
    min-width: 0;
    overflow-wrap: break-word;
    margin-bottom: 8px;
    padding-left: 16px;
}

.thesis-item--highlight {
    background-color: #cac3c3;
    padding: 16px;
    
}


/* Footer  */

.contactus {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-left: 24px;
    padding-top: 16px;
    padding-right: 24px;
    

}

.contactus a {
    text-decoration: none;
}


/* media query */

@media (max-width: 768px) {
    .hero,
    .information,
    .thesis-content {          
        flex-direction: column;
    }

    .hero-image,
    .info-left,
    .info-right,
    .thesis-left,               
    .thesis-right {             
        flex: 1 1 100%;
    }

    .course {
        grid-template-columns: 1fr;   /* เหลือ 1 คอลัมน์ */
        padding: 32px 24px;             /* ลด padding ซ้าย-ขวาจาก 72px */
    }
/* nav bar มือถือ */
    .navbar {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 24px;
        padding: 16px;
    }

    .nav-link { 
        display: none;  /* ถ้าจอน้อยกว่า768จะไม่โชว์ลิ้งก์ desktop */
    }

    .nav-icons {

        display: flex;   /* ถ้าจอน้อยกว่า768จะโชวไอคอนมือถือ */
        gap: 16px;
        align-items: center;
    }

    /* ปุ่มหน้้า hero ข้อความhero */
     .hero-btn {
        padding: 8px 24px;
        width: 100%;
    }

    .hero-text h1 {
        font-size: 32px;   /* ลดจาก 45px */
        
    }

    .hero-text h3 {
        font-size: 18px;   /* ลดจาก 25px */
    }

    .info-left h2,
    .thesis-left h2 {
        font-size: 28px;   /* ลดจาก 40px */
    }

    .info-left p,
    .thesis-left p {
        font-size: 16px;   /* ลดจาก 25px */
    }

    .course h1,
    .thesis h1 {
        font-size: 32px;   /* ลดจาก 50px */
    }


        .info-item,  /* infomation item กับ thesis เรียงลงมาอันเดียว*/
    .thesis-item {
        flex-direction: column;
    }

    .info-item img,
    .thesis-item img {
        flex: 1 1 100%; 
        aspect-ratio: 16/9;
    }

    .info-item-text,
    .thesis-item-text {
        flex: 1 1 100%;
        padding-left: 0;
    }
/* logo navbar mobile  ซ่อนข้อความเดสท้อป กับโลโก้*/
    .logo-text {
        display: none;
    }

    .logo-icon {
        display: none;
    }

    /* Course Mobile */
    .course-card img {
        display: none;


    }

    .course-card p {
        display: none;
    }


    /* Thesis เอาแค่วิดิโอ */
    .thesis-right {
        display: none;
    }

    .thesis-left h2,
    .thesis-left p {
        display: none;
    }

/* Footer mobile*/

    .contactus {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .contactus a {
        display: none;
    }



/* hide information page for mobile*/

    .info-left {
        display: none;
    }

}
