@import url('https://fonts.googleapis.com/css2?family=Google+Sans:ital,opsz,wght@0,17..18,400..700;1,17..18,400..700&display=swap');

/* 🛠️ เพิ่ม html ไว้ที่บนสุด เพื่อให้ระบบเลื่อนหน้าจอมีความสมูทนุ่มนวล */
/* test update git */
html {
    scroll-behavior: smooth;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Google Sans', Arial, sans-serif;
    color: #222;
    background-color: #ffffff;
}

/* ==========================================================================
   2. Navbar (ส่วนบน)
   ========================================================================== */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 5%;
    background-color: #fff;
}
.logo {
    display: flex;
    align-items: center;
}
.logo img {
    height: 30px;
    width: auto;
    object-fit: contain;
}
.logo a {
    display: flex;
    align-items: center;
    transition: opacity 0.3s ease;
}
.logo a:hover {
    opacity: 0.7;
}
nav ul {
    display: flex;
    list-style: none;
    gap: 32px;
}
nav a {
    text-decoration: none;
    color: #333;
    font-size: 1rem;
    transition: color 0.3s;
}
nav a:hover {
    color: #888;
}

/* ==========================================================================
   3. Hero Section (รูปใหญ่หน้าแรก main.html)
   ========================================================================== */
.hero {
    position: relative;
    width: 100%;
    height: 80vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.hero-image.active {
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: #fff;
    padding: 0 20px;
}
.hero-content h2 {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 8px;
}
.hero-content h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 16px;
}
.hero-content p {
    font-size: 1rem;
    margin-bottom: 32px;
}

.btn-outline {
    display: inline-block;
    padding: 12px 32px;
    border: 2px solid #fff;
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}
.btn-outline:hover {
    background-color: #fff;
    color: #000;
}

/* ==========================================================================
   4. Content Section (ส่วนล่างหน้าแรก)
   ========================================================================== */
.intro-section {
    display: flex;
    justify-content: center;
    text-align: center;
    padding: 100px 5% 60px 5%;
}

.intro-section h2 {
    font-size: 3.0rem;
    line-height: 1.2;
    font-weight: 800;
    color: #1a1a1a;
}

.intro-link {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

.intro-link:hover {
    color: #a0a0a0;
}

.sub-head-intro {
    color: #a0a0a0;
    font-weight: 500;
    margin-top: 16px;
}

/* ==========================================================================
   5. Projects Grid & Cards (หน้าปกงานหน้าแรก)
   ========================================================================== */
.projects-section {
    padding: 40px 5% 80px 5%;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 32px;
}

.project-card {
    background-color: #ffffff;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.project-img-wrapper {
    width: 100%;
    height: 450px;
    overflow: hidden;
    position: relative;
    background-color: #f5f5f5;
}

.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.project-card:hover img {
    transform: scale(1.04);
}

.project-info {
    padding: 20px 0;
}

.project-link {
    display: block; 
    text-decoration: none; 
    color: inherit; 
}

.project-link:hover h3 {
    color: #666; 
    transition: color 0.3s ease;
}

.project-link h3 {
    font-size: 1.4rem;
    font-weight: 400;
    font-size: medium;
    color: #535353;
    margin-bottom: 4px;
}

.project-link p {
    font-size: 0.95rem;
    color: #a0a0a0;
    letter-spacing: 1px;
}

/* ==========================================================================
   6. Project Info Page (สไตล์นิตยสารมินิมอลหน้า project.html)
   ========================================================================== */
.project-header {
    text-align: center;
    padding: 80px 5% 40px 5%;
}

.category-label {
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.85rem;
    color: #a0a0a0;
    margin-bottom: 12px;
}

.main-title {
    font-size: 3.2rem;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -1px;
    color: #111;
}

.sub-title {
    font-size: 1.25rem;
    color: #555;
    font-weight: 400;
}

.project-hero-container {
    padding: 0 5% 60px 5%;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
}

.full-hero-image {
    width: 45%;
    max-width: 900px;
    height: auto;
    object-fit: contain;
    display: block;
    background-color: #f9f9f9;
}

.project-description-area {
    max-width: 800px;
    margin: 0 auto 80px auto;
    padding: 0 5%;
    text-align: center;
    line-height: 1.8;
    color: #666;
    font-size: 1.05rem;
}

.project-gallery-section {
    padding: 0 5% 100px 5%;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); 
    gap: 24px;
    max-width: 1400px;
    margin: 0 auto;
}

.gallery-item {
    width: 100%;
    aspect-ratio: 4 / 5; 
    object-fit: cover;   
    display: block;
    background-color: #f5f5f5;
}

.gallery-grid .landscape-item {
    grid-column: span 2 !important;  
    aspect-ratio: 16 / 9 !important;  
    height: 100% !important; 
    object-fit: cover !important;     
    display: block !important;       
}

.gallery-grid .landscape-arch {
    grid-column: span 2 !important;  
    aspect-ratio: 5 / 4 !important;  
    height: 100% !important;         
    object-fit: cover !important;     
    display: block !important;       
}

.gallery-grid .portrait-32-item {
    width: 100% !important;
    aspect-ratio: 2 / 3 !important; 
    object-fit: cover !important;   
    display: block !important;
}

/* ==========================================================================
   7. Project Meta Section (ข้อมูลกล้อง สถานที่ และเครดิต)
   ========================================================================== */
.project-meta-section {
    padding: 60px 5% 20px 5%;
    max-width: 1400px;
    margin: 0 auto;
    border-top: 1px solid #f5f5f5; 
}

.meta-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); 
    gap: 20px;
    text-align: center;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.meta-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #a0a0a0; 
    font-weight: 500;
}

.meta-value {
    font-size: 0.95rem;
    color: #333;
    font-weight: 400;
}

/* ==========================================================================
   8. Footer (ส่วนแสดงลิขสิทธิ์ท้ายหน้าเว็บ)
   ========================================================================== */
footer {
    text-align: center;
    padding: 60px 5% 40px 5%; 
    border-top: 1px solid #f0f0f0; 
    max-width: 1400px;
    margin: 0 auto;
}

footer p {
    font-size: 0.8rem; 
    color: #a0a0a0;    
    letter-spacing: 1px; 
    text-transform: uppercase; 
}

/* ==========================================================================
   9. Inline Grid Slider (สไลด์โชว์ภายในช่อง Grid 4 คอลัมน์ สำหรับ Look Book)
   ========================================================================== */
.gallery-slider {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 5; 
}

.inline-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0; 
    transition: opacity 1.2s ease-in-out;
}

.inline-slide.active {
    opacity: 1;
    position: absolute; 
}

h4 {
    color: #a0a0a0;
}

/* ==========================================================================
   10. About Page (หน้า contact.html) - ต้องอยู่ก่อน Responsive
   ========================================================================== */
.about-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 5% 100px 5%;
}

.page-title {
    font-size: 3.5rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 80px;
    letter-spacing: -1px;
}

.about-top {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 120px;
}

.about-info h2 {
    font-size: 2rem;
    line-height: 1.3;
    margin-bottom: 40px;
    font-weight: 700;
}

.about-desc p {
    font-size: 1.05rem;
    line-height: 1.6;
    color: #222;
    margin-bottom: 40px;
}

.about-contact-info p {
    font-size: 1.05rem;
    line-height: 1.6;
    color: #222;
    margin-bottom: 24px;
    text-decoration: none;
}

.email-link{
    text-decoration: none;
    color: #222;
}

.email-link:hover{
    opacity: 0.6;
}

.ig-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #111;
    font-weight: 500;
    transition: opacity 0.3s;
}

.ig-link:hover {
    opacity: 0.6;
}

.about-image {
    display: flex;
    justify-content: flex-end;
}

.about-image img {
    width: 100%;  /* 🛠️ เปลี่ยนจาก 50% เป็น 100% เพื่อไม่ให้รูปโดนบีบเล็กเกินไป */
    max-width: 420px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    background-color: #f5f5f5;
}

.about-row {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.row-label {
    font-size: 1.8rem;
    font-weight: 700;
}

.row-content p {
    font-size: 1.05rem;
    line-height: 1.6;
    color: #222;
}

.exp-grid {
    display: grid;
    grid-template-columns: 60px 1.5fr 1fr;
    gap: 20px;
    row-gap: 50px;
}

.exp-num {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.2;
}

.exp-role, .exp-date {
    font-size: 1.05rem;
    line-height: 1.6;
    color: #222;
}

/* ==========================================================================
   12. Thesis Page (หน้า thesis.html)
   ========================================================================== */
.thesis-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 5% 100px 5%;
}

.thesis-hero {
    width: 100%;
    aspect-ratio: 16 / 7;
    object-fit: cover;
    background-color: #f5f5f5;
    margin-bottom: 80px;
}

.thesis-intro {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
    margin-bottom: 100px;
    border-bottom: 1px solid #eee;
    padding-bottom: 60px;
}

.thesis-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 24px;
    line-height: 1.2;
    letter-spacing: -0.5px;
    color: #111;
}

.thesis-desc {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #444;
}

.thesis-meta {
    margin-bottom: 24px;
}

.thesis-meta h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #a0a0a0;
    margin-bottom: 8px;
}

.thesis-meta p {
    font-size: 1rem;
    color: #222;
    font-weight: 500;
}

.thesis-section {
    margin-bottom: 120px;
}

.thesis-section-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 40px;
    color: #111;
    border-left: 4px solid #333;
    padding-left: 16px;
}

.thesis-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.thesis-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.thesis-text h3 {
    font-size: 1.5rem;
    margin-bottom: 16px;
    color: #222;
}

.thesis-text p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #555;
}

.thesis-img-wrapper img, .thesis-img-fill {
    width: 100%;
    height: auto;
    object-fit: cover;
    background-color: #f5f5f5;
}

/* ==========================================================================
   12. Thesis Board Page (ดีไซน์แบบ Infographic หน้า thesis.html)
   ========================================================================== */
.thesis-board {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 5% 100px 5%;
    color: #111;
}

.thesis-hero-img {
    width: 100%;
    margin-bottom: 60px;
}

.thesis-hero-img img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    background-color: #f5f5f5;
}

.board-intro {
    margin-bottom: 80px;
}

.board-title {
    font-size: 2.8rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 40px;
    color: #2c4a22; /* สีเขียวอิงจากดีไซน์ */
}

.board-intro-texts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.board-intro-texts p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #444;
}

.board-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    text-align: center;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    padding: 30px 0;
}

.board-links a {
    text-decoration: none;
    color: #111;
    font-weight: 600;
    font-size: 1.1rem;
    line-height: 1.5;
    position: relative;
    transition: color 0.3s;
}

.board-links a:hover {
    color: #2c4a22;
}

/* เส้นกั้นระหว่าง Link */
.board-links a:not(:last-child)::after {
    content: "";
    position: absolute;
    right: -10px;
    top: 10%;
    height: 80%;
    width: 1px;
    background-color: #ccc;
}

.board-section {
    margin-bottom: 80px;
}

.section-heading {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.section-sub {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 40px;
}

/* Grid แบบ 1:2 (ซ้าย Text ขวา Image) */
.board-row {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    margin-bottom: 60px;
    align-items: start;
}

.col-text h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2c4a22; /* สีเขียว */
    margin-bottom: 16px;
}

.col-text p {
    font-size: 1rem;
    line-height: 1.7;
    color: #444;
}

.col-img img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    background-color: #f5f5f5;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
/* 🛠️ คลาสพิเศษสำหรับย่อขนาดรูปภาพไม่ให้เต็มกรอบ */
.col-img .shrink-img {
    width: 70%;         /* ปรับเปอร์เซ็นต์ความเล็ก-ใหญ่ตรงนี้ได้เลย เช่น 60%, 80% */
    margin: 0 auto;     /* สั่งให้รูปจัดอยู่กึ่งกลาง */
    display: block;
}
.thesis-hero-img {
    width: 100vw;           /* สั่งให้กว้าง 100% ของหน้าจอ */
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;     /* ดึงรูปไปทางซ้ายให้สุดขอบ */
    margin-right: -50vw;    /* ดึงรูปไปทางขวาให้สุดขอบ */
    margin-bottom: 60px;
}

.thesis-hero-img img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    background-color: #f5f5f5;
}
/* เลย์เอาต์ส่วน Product Photography (หน้า Thesis) */
.production-intro {
    margin-bottom: 40px;
}

.production-intro h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2c4a22; /* สีเขียวอิงจากดีไซน์ */
    margin-bottom: 16px;
}

.production-intro p {
    font-size: 1rem;
    line-height: 1.7;
    color: #444;
    max-width: 800px; /* จำกัดความกว้างไม่ให้ข้อความยาวทะลุจอเกินไป */
}

.lighting-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px 40px; /* ระยะห่าง บน-ล่าง 60px, ซ้าย-ขวา 40px */
}

.lighting-item img {
    width: 100%;
    height: auto;
    display: block;
    background-color: #f5f5f5;
    margin-bottom: 24px;
}

.lighting-item h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #111;
    margin-bottom: 12px;
}

.lighting-item p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #444;
}

.lighting-note {
    display: flex;
    align-items: flex-end; /* ดันข้อความให้อยู่ด้านล่างสุดของกริดให้ขนานกับข้างๆ */
    padding-bottom: 8px;
}

.lighting-note p {
    color: #666;
    font-style: italic;
}

.end-page{
    text-align: center;
}

.end-page a{
    text-decoration: none;
    color: #444;
}

.end-page a:hover{
    opacity: 0.4;
}

/* ==========================================================================
   13. Thesis Gallery Page (หน้าโชว์รูปทั้งหมด thesis-gallery.html)
   ========================================================================== */
.thesis-gallery-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 5% 100px 5%;
}

.gallery-page-title {
    font-size: 3rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 100px;
    line-height: 1.3;
    color: #111;
}

.product-group {
    margin-bottom: 100px;
    border-top: 2px solid #f0f0f0;
    padding-top: 60px;
}

.group-title {
    font-size: 2rem;
    color: #2c4a22; /* สีเขียวของโปรเจกต์ */
    margin-bottom: 16px;
}

.group-desc {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 40px;
}

.e-catalog-link{
    text-align: center;
    margin-bottom: 1.5rem;
}

.e-catalog-link h2{
    font-size: medium;
}

.e-catalog-link a{
    text-decoration: none;
    color: darkolivegreen;
    font-size: larger;
}

.e-catalog-link a:hover{
    opacity: 0.6;
}


/* ==========================================================================
   11. Responsive Design (ควบคุมหน้าจอมือถือและแท็บเล็ต) - ต้องอยู่ล่างสุดเสมอ!
   ========================================================================== */
@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr); 
    }
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 16px;
        padding: 20px 5%;
    }
    
    .intro-section {
        padding: 60px 5% 40px 5%;
        text-align: center; 
    }
    .intro-section h2 {
        font-size: 2.2rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .project-img-wrapper {
        height: 350px;
    }

    .main-title {
        font-size: 2.2rem;
    }
    .project-header {
        padding: 40px 5% 24px 5%;
    }
    .full-hero-image {
        width: 85%; 
    }
    .project-description-area {
        margin-bottom: 40px;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr; 
        gap: 16px;
    }

    .gallery-grid .landscape-item {
        grid-column: span 1 !important;  
        aspect-ratio: auto !important;  
        object-fit: contain !important;     
        height: auto !important;
    }

    .gallery-grid .landscape-arch {
        grid-column: span 1 !important;  
        aspect-ratio: 5 / 4 !important;  
        object-fit: contain !important;     
        height: auto !important;
    }

    .meta-grid {
        grid-template-columns: repeat(2, 1fr); 
        gap: 24px 16px;
    }
    .project-meta-section {
        padding-top: 40px;
    }
    
    /* 🛠️ สไตล์สำหรับหน้า About บนมือถือ */
    .page-title {
        font-size: 2.5rem;
        margin-bottom: 40px;
        text-align: center; /* จัด Title ให้อยู่กึ่งกลาง */
    }
    .about-top {
        grid-template-columns: 1fr;
        gap: 32px;
        margin-bottom: 60px;
    }
    .about-image {
        justify-content: center; /* 🛠️ ดันรูปภาพให้อยู่กึ่งกลางจอ */
        order: -1; 
    }
    .about-image img {
        max-width: 100%;
    }
    .about-row {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-bottom: 40px;
    }
    .exp-grid {
        grid-template-columns: 50px 1fr;
        row-gap: 30px;
    }
    .exp-date {
        grid-column: 2 / 3;
        margin-top: -20px; 
        color: #666;
    }

    .hero {
        height: 70vh; 
    }
    .hero-content h1 {
        font-size: 2.5rem; 
        line-height: 1.2;
    }
    .hero-content h2 {
        font-size: 1.1rem; 
        margin-bottom: 12px;
    }

    /* 🛠️ สไตล์สำหรับหน้า Thesis บนมือถือ */
    .thesis-hero {
        aspect-ratio: 4 / 3;
        margin-bottom: 40px;
    }
    .thesis-intro {
        grid-template-columns: 1fr;
        gap: 40px;
        margin-bottom: 60px;
        padding-bottom: 40px;
    }
    .thesis-title {
        font-size: 2.2rem;
    }
    .thesis-section {
        margin-bottom: 80px;
    }
    .thesis-grid-2, .thesis-grid-3 {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .thesis-section-title {
        font-size: 1.8rem;
        margin-bottom: 24px;
    }

    /* 🛠️ สไตล์สำหรับหน้า Thesis Board บนมือถือ */
    .board-title {
        font-size: 2.2rem;
    }
    .board-intro-texts {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .board-links {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .board-links a:not(:last-child)::after {
        display: none; /* ซ่อนเส้นกั้นบนมือถือ */
    }
    .board-row {
        grid-template-columns: 1fr;
        gap: 24px;
        margin-bottom: 50px;
    }
    /* จัดการ Lighting Grid บนมือถือ */
    .lighting-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    /* 🛠️ สไตล์สำหรับหน้า Thesis Gallery บนมือถือ */
    .gallery-page-title {
        font-size: 2.2rem;
        margin-bottom: 60px;
    }
    .group-title {
        font-size: 1.6rem;
    }
}