/* ล้างค่าเริ่มต้นและตั้งค่าฟอนต์ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Prompt', sans-serif;
}

body {
    background-color: #f8fafc; /* พื้นหลังสีสว่างโทนสะอาดตา */
    color: #334155;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 50px 20px;
}

/* ปุ่มย้อนกลับ (Back Button) */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #0066ff;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    margin-bottom: 35px;
    transition: all 0.2s ease;
}

.back-btn .arrow {
    transition: transform 0.2s ease;
}

.back-btn:hover {
    color: #002060;
}

.back-btn:hover .arrow {
    transform: translateX(-4px);
}

/* ส่วนหัวโปรเจกต์หลัก (Main Project Hero) */
.project-header {
    background: #ffffff;
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 32, 96, 0.03);
    border: 1px solid #f1f5f9;
    margin-bottom: 50px;
}

.project-badge {
    display: inline-block;
    padding: 6px 16px;
    background: #002060;
    color: #ffffff;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
}

.project-title {
    font-size: 2.2rem;
    color: #002060;
    font-weight: 600;
    margin-bottom: 15px;
    line-height: 1.3;
}


.section-divider {
    margin: 40px 0 30px;
    position: relative;
}

.section-divider h2 {
    font-size: 1.5rem;
    color: #002060;
    font-weight: 600;
    display: inline-block;
    background: #f8fafc;
    padding-right: 20px;
    position: relative;
    z-index: 2;
}

.section-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: #e2e8f0;
    z-index: 1;
}

.sub-project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, 340px);
    justify-content: start;
    gap: 65px;
}


.sub-project-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.015);
    border: 1px solid #f1f5f9;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.sub-project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0, 32, 96, 0.08);
    border-color: #cbd5e1;
}

.sub-card-top {
    margin-bottom: 25px;
}


.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 18px;
    
}

.status-completed {
    background: #f0fdf4;
    color: #16a34a;
}

.status-ongoing {
    background: #fff7ed;
    color: #ea580c;
}

.sub-card-title {
    font-size: 1.2rem;
    color: #0f172a;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.4;
}


.sub-card-footer {
    padding-top: 15px;
    border-top: 1px dashed #e2e8f0;
    font-size: 0.85rem;
    color: #94a3b8;
    display: flex;
    justify-content: space-between;
}

.imgProject {
    width: 100%;
    height:500px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 20px;
    display: block;
}

.imgProject1 {
    width: 100%;
    height: 250px;
    object-fit: cover;
    object-position: center;
    background-color: #f1f5f9;
    border-radius: 12px;
    margin-bottom: 20px;
    display: block;
}


.Reference-box1 {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-align: left;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  cursor: pointer;
}

/* Overlay สำหรับรูปที่กดได้ */
.Reference-box1 {
    position: relative;
    overflow: hidden;
}

.Reference-box1 img {
    transition: transform 0.3s ease;
}

.Reference-box1:hover img {
    transform: scale(1.04);
}

.img-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 20, 60, 0.50);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.Reference-box1:hover .img-overlay {
    opacity: 1;
}

.overlay-label {
    font-size: 13px;
    font-weight: 500;
    color: #ffffff;
    letter-spacing: 0.3px;
}

@media (max-width: 768px) {
    .container {
        padding: 30px 15px;
    }
    .project-title {
        font-size: 1.75rem;
    }
    .project-header {
        padding: 25px;
        margin-bottom: 35px;
    }
    .sub-project-grid {
        grid-template-columns: 1fr;
    }
}