body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #cfcfcf;
    color: #333;
}

b {
    color: #0e50ca;
}

hr {
    border: none;
    height: 2px;
    background-color: #90c6ff8c;
    border-radius: 2px;
    margin: 20px 0;
}

#heading {
    background-color: #bac2d1;
    padding: 20px 50px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.intro {
    background-color: #3597ff;
    color: aliceblue;
    padding: 25px 30px;
    margin-bottom: 20px;
    margin-right: 20px;
    border-radius: 18px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.GPAX {
    background-color: #a3cfff;
    color: #fffde3;
    padding: 5px;
    margin: 20px 0;
    border-radius: 18px;
    text-align: center;
    font-weight: bold;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.my_pic {
    width: 100%;
    height: auto;
    max-height: 60rem;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.skill-icon {
    width: 25px;
    height: 25px;
    object-fit: contain;
    /* รักษาสัดส่วนเดิม */
}


/* Statement of Purpose */
.sop {
    border-radius: 30px;
    background: linear-gradient(to right, #98edf3, #d3d9ff, #98cdff, #87a3ff);
    padding: 3% 8%;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.sop_in {
    border-radius: 20px;
    background-color: aliceblue;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.card {
    border-radius: 15px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.card-title {
    font-weight: 600;
    color: #0e50ca;
}

.card-text {
    white-space: nowrap;
    font-size: 0.9rem;
}

.history_icon {
    border-radius: 30px;
}

ul {
    padding-left: 20px;
}

li {
    margin-bottom: 8px;
}

/* Game */

#con_game,
#carouselExampleCaptions,
#carddo {
    margin-top: 50px;
    margin-bottom: 50px;
}

/* video / carousel */
#con_game video {
    border-radius: 15px;
}

.carousel-inner img {
    max-height: 80vh;
    width: 100%;
    object-fit: cover;
}

.carousel-caption {
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    padding: 0.8rem;
}

/* cards */
#carddo .card {
    border-radius: 15px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

#carddo .card-title {
    font-weight: 600;
    color: #0e50ca;
}

#carddo .card-text {
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .carousel-inner img {
        max-height: 250px;
    }
}

/* work */
.modern-carousel-card {
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    background-color: #f7f9ff;
    padding: 15px;
}

.main-image img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 20px;
    transition: transform 0.3s ease;
}

.main-image img:hover {
    transform: scale(1.05);
}

.thumbnails {
    gap: 10px;
}

.thumbnails img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.thumbnails img.active,
.thumbnails img:hover {
    opacity: 1;
    border-color: #0e50ca;
}

/* VOLUNTEERR */
.volunteer-timeline {
    position: relative;
    max-width: 1100px;
    margin: 40px auto;
    padding: 40px 20px;
}

.volunteer-timeline::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    transform: translateX(-50%);
    width: 4px;
    background: linear-gradient(180deg, rgba(14, 80, 202, 0.9), rgba(142, 191, 255, 0.6));
    border-radius: 2px;
    z-index: 1;
}

.timeline-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 24px;
    margin: 50px 0;
    z-index: 2;
    padding-bottom: 50px;
    border-bottom: 2px dashed rgba(14, 80, 202, 0.2);
}

.timeline-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.timeline-item .timeline-content {
    width: 48%;
    background: #f0f4ff;
    padding: 18px 20px;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.timeline-item .timeline-img {
    width: 48%;
    display: flex;
    justify-content: center;
}

.timeline-item .timeline-img img {
    width: 100%;
    max-width: 320px;
    height: auto;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    transition: transform .25s ease;
}

.timeline-item .timeline-img img:hover {
    transform: scale(1.03);
}

.timeline-item::after {
    content: "\f111";
    font-family: FontAwesome;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 24px;
    color: #0e50ca;
    z-index: 3;
    background: #fff;
}

.volunteer-timeline .timeline-item:nth-child(even) {
    flex-direction: row-reverse;
}

.volunteer-timeline .timeline-item:nth-child(even) .timeline-content {
    text-align: left;
}

.volunteer-timeline .timeline-item:nth-child(odd) .timeline-content {
    text-align: left;
}

.timeline-content h5 {
    color: #0e50ca;
    margin: 0 0 4px 0;
}

.timeline-date {
    display: block;
    color: #666;
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.timeline-content p {
    margin: 0;
    color: #333;
    line-height: 1.5;
    font-size: 0.95rem;
}

/* certificate */

.certificate-section {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    background-color: #ffffff;
    padding: 2rem;
    border-radius: 10px;
    /* มนๆ ขอบ */
}


.certificate-section h2 {
    text-align: left;
    color: #0e50ca;
    margin-bottom: 30px;
    font-size: 2rem;
}

.certificate-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.certificate-card {
    flex: 1 1 calc(33.333% - 20px);
    background: #f0f4ff;
    border-radius: 15px;
    padding: 15px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: transform 0.25s ease;
}

.certificate-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 12px;
}

.certificate-card:hover {
    transform: translateY(-5px);
}

.certificate-desc {
    font-size: 0.95rem;
    color: #333;
    line-height: 1.4;
}

@media (max-width: 992px) {
    .certificate-card {
        flex: 1 1 calc(50% - 20px);
    }
}

@media (max-width: 600px) {
    .certificate-card {
        flex: 1 1 100%;
    }
}

/* ========== Responsive for index.html ========== */

/* ✅ ขนาดจอใหญ่ (Desktop ปกติ) */

/* ✅ แท็บเล็ตแนวนอน / Desktop ขนาดกลาง */
@media (max-width: 992px) {

    /* header */
    #heading {
        text-align: center;
        padding: 20px 30px;
    }

    .hero-img {
        max-width: 500px;
    }

    /* profile */
    .my_pic {
        max-height: 50rem;
    }

    /* SOP */
    .sop {
        padding: 5%;
    }

    .sop_in {
        padding: 20px;
    }

    /* cards */
    .cards {
        flex-wrap: wrap;
    }

    .card {
        flex: 1 1 calc(50% - 20px);
    }


    .col-md-4 {
        margin-bottom: 2rem;
    }

    /* timeline */
    .timeline-item {
        flex-direction: column !important;
    }

    .timeline-item .timeline-content,
    .timeline-item .timeline-img {
        width: 100%;
        text-align: center;
    }

    /* certificate */
    .certificate-card {
        flex: 1 1 calc(50% - 20px);
    }

    /* carousel */
    .carousel-img {
        width: 90%;
    }
}

/* ✅ แท็บเล็ตแนวตั้ง / มือถือจอใหญ่ */
@media (max-width: 768px) {

    /* intro */
    .intro {
        padding: 20px;
        font-size: 1rem;
    }

    /* GPAX */
    .GPAX {
        font-size: 1rem;
    }

    .hero {
        flex-direction: column;
    }

    .hero-img {
        max-width: 90%;
    }

    /* profile */
    .my_pic {
        max-height: 30rem;
    }

    /* SOP */
    .sop {
        padding: 6%;
    }

    .sop_in {
        padding: 18px;
        font-size: 0.95rem;
    }

    /* cards */
    .card {
        flex: 1 1 100%;
    }

    /* timeline */
    .timeline-item {
        margin: 30px 0;
        padding-bottom: 30px;
    }

    /* carousel caption */
    .carousel-caption {
        font-size: 0.85rem;
    }

    /* certificates */
    .certificate-card {
        flex: 1 1 100%;
    }
}

/* ✅ มือถือขนาดเล็ก */
@media (max-width: 576px) {

    /* header */
    #heading {
        font-size: 1.3rem;
        padding: 15px;
    }

    /* intro */
    .intro {
        padding: 15px;
        font-size: 0.9rem;
    }

    /* GPAX */
    .GPAX {
        font-size: 0.85rem;
        padding: 6px;
    }

    .hero-img {
        max-width: 100%;
    }

    /* profile */
    .my_pic {
        max-height: 20rem;
    }

    /* SOP */
    .sop {
        padding: 8%;
    }

    .sop_in {
        padding: 15px;
        font-size: 0.9rem;
    }

    /* cards */
    .card {
        margin: 10px 0;
    }

    /* timeline */
    .timeline-content {
        font-size: 0.9rem;
    }

    .timeline-item {
        padding-bottom: 20px;
    }

    /* carousel caption */
    .carousel-caption {
        font-size: 0.75rem;
        padding: 5px 10px;
    }

    /* certificates */
    .certificate-card {
        flex: 1 1 100%;
    }

    /* reduce gaps */
    section {
        margin-bottom: 15px;
    }
}