/* ในไฟล์ style-project.css */
@keyframes slideGrid {
    from {
        background-position: 0 0;
    }
    to {
        background-position: -100px -100px; 
    }
}

body, html {
    height: 100%;
    font-family: sans-serif;
    background-color: #FAF5EF;
    color: #736055;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    background-image: 
        linear-gradient(to right, rgb(185, 122, 122) 1px, transparent 1px),
        linear-gradient(to bottom, rgb(185, 122, 122) 1px, transparent 1px);
    
    background-size: 100px 100px;
    background-position: -1px -1px;
    animation: slideGrid 15s linear infinite; 
}

.project-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 1000px; /* จำกัดความกว้างรวมของหน้า */
    margin: 0 auto;
    padding: 20px;
}

/* --- Header & Title --- */
.project-header {
    width: 100%;
    text-align: center;
    margin-bottom: 10px;
    padding: 10px;
    /* กำหนดความหนาและสีของ Stroke */
    -webkit-text-stroke-width: 1px;
    -webkit-text-stroke-color: #736055;
    

}

.project-title {
    font-size: clamp(1rem, 5vw, 5rem); /* ปรับขนาดตัวอักษรตามหน้าจอ */
    color: #F4E2DE;
    margin: 0px;
}

/* --- Image Slider (Carousel) --- */

.image-slider-section {
    width: 100%;
    padding: 20px 0;
}

.slider-wrapper {
    position: relative;
    max-width: 800px; /* **จำกัดขนาดรูปภาพไม่ให้ใหญ่เกินไป** */
    margin: 0 auto;
    overflow: hidden; /* **สำคัญมาก: ซ่อนรูปภาพที่ไม่ได้แสดง** */
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.slider-track {
    display: flex;
    transition: transform 0.4s ease-in-out;
}

.slider-image {
    width: 100%; /* ให้รูปภาพเต็มความกว้างของ Wrapper */
    height: auto;
    flex-shrink: 0; /* ป้องกันไม่ให้รูปภาพย่อ */
    object-fit: contain; /* ปรับให้รูปภาพทั้งหมดอยู่ในกรอบโดยไม่ถูกครอป */
    max-height: 450px; /* จำกัดความสูงสูงสุดของรูปภาพ */
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    z-index: 10;
    font-size: 1.5rem;
    border-radius: 50%;
    opacity: 0.7;
    transition: opacity 0.2s;
}


.slider-btn:hover {
    opacity: 1;
}

.prev-btn { left: 10px; }
.next-btn { right: 10px; }

/* --- Info & Navigation --- */

.info-and-nav-section {
    width: 100%;
    display: flex;
    flex-direction: column; /* เรียงเป็นคอลัมน์บนมือถือ */
    align-items: center;
    gap: 20px;
    margin-top: 0px;
}

.project-info {
    max-width: 800px;
    padding: 20px;
    background-color: #F4E2DE;
    border-radius: 8px;
    line-height: 1.6;
}

.info-header {
    font-weight: bold;
    color: #736055;
    margin-bottom: -10px;
    margin-top: -15px;
    
}
.info-lilheader {
    font-weight: bold;
    color: #736055;
    margin-bottom: -10px;
    margin-top: -15px;
    
}

.navigation-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap; /* ให้ปุ่มลงบรรทัดใหม่ได้บนมือถือ */
}

.nav-button {
    text-decoration: none;
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 1rem;
    transition: background-color 0.3s, transform 0.1s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.home-button {
    background-color: #4E7DA6;
    border-radius: 50px;
    border: 3px solid #F4E2DE;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    
    transition: background-color 0.3s, transform 0.1s, font-size 0.5s;
    animation: pulse 2s ease-in-out infinite; 
}
.home-button:hover {
    background-color: #6a95b3;
    transform: translateY(-4px);
    font-size: 1.5rem;
    animation: none;
}

.tree-button {
    background-color: #736055;
    border-radius: 50px;
    border: 3px solid #F4E2DE;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    
    transition: background-color 0.3s, transform 0.1s, font-size 0.5s;
    animation: pulse 2s ease-in-out infinite; 
}
.tree-button:hover {
    background-color: #917e73;
    transform: translateY(-4px);
    font-size: 1.5rem;
    animation: none;
}
.info-header{
    font-size: 2rem;
}
.info {
    text-align: justify; 
    font-size: 1.2rem;
    margin-bottom: -5px;
}
.info-link {
    font-size: 1.2rem;
    color: #ff7b00;
}