.index-slider{
    position:relative;
    width:100%;
    height:520px;
    overflow:hidden;
    border-radius:16px;
    margin-bottom:50px;
}

.index-slides{
    position:relative;
    width:100%;
    height:100%;
}

.index-slide{
    position:absolute;
    width:100%;
    height:100%;
    opacity:0;
    transition:opacity 0.6s ease;
    background-size:cover;
    background-position:center;
}

.index-slide.active{
    opacity:1;
}

.index-overlay{
    position:absolute;
    bottom:60px;
    left:60px;
    transform:none;
    max-width:550px;
    color:white;
}

.index-overlay h1{
    text-shadow:0 4px 10px rgba(0,0,0,0.5);
}

.index-overlay p{
    text-shadow:0 3px 8px rgba(0,0,0,0.5);
}

.index-buttons{
    margin-top:20px;
    display:flex;
    gap:15px;
    position:relative;
    z-index:11;
}

.secondary-btn{
    background:#95A5A6 !important;
}

.index-prev,
.index-next{
    position:absolute;
    top:50%;
    transform:translateY(-50%);
    border:none;
    background:transparent;
    font-size:48px;
    font-weight:bold;
    color:#000;
    cursor:pointer;
    z-index:5;
    transition:color 0.3s ease, transform 0.3s ease;
    padding:0;
    line-height:1;
    text-shadow:0 2px 6px rgba(255,255,255,0.35);
}

.index-prev:hover{
    color:#fff;
    transform:translateY(-50%) scale(1.08);
}

.index-next:hover{
    color:#fff;
    transform:translateY(-50%) scale(1.08);
}

.index-prev{
    left:20px;
}

.index-next{
    right:20px;
}

.index-dots{
    position:absolute;
    bottom:20px;
    width:100%;
    text-align:center;
}

.index-dot{
    height:12px;
    width:12px;
    margin:0 5px;
    background:white;
    border-radius:50%;
    display:inline-block;
    opacity:0.5;
    cursor:pointer;
}

.index-dot.active{
    opacity:1;
}

/* ปุ่ม Apply */
.apply-btn{
    background:#f36f21;
    color:white;
    padding:12px 28px;
    border-radius:40px;
    text-decoration:none;
    font-weight:600;
    transition:0.3s;
}

.apply-btn:hover{
    background:#d95f18;
    transform:translateY(-2px);
}

/* ปุ่ม Learn */
.learn-btn{
    background:white;
    color:#333;
    padding:12px 28px;
    border-radius:40px;
    text-decoration:none;
    font-weight:600;
    transition:0.3s;
}

.learn-btn:hover{
    background:#f0f0f0;
}

/* ปุ่ม Explore Program (สีส้ม) */
.explore-btn{
    background:#f36f21;
    color:white;
    padding:12px 28px;
    border-radius:40px;
    text-decoration:none;
    font-weight:600;
    transition:0.3s;
}

.explore-btn:hover{
    background:#d95f18;
    transform:translateY(-2px);
}

/* ปุ่ม View Lab */
.lab-btn{
    background:#f36f21;
    color:white;
    padding:12px 28px;
    border-radius:40px;
    text-decoration:none;
    font-weight:600;
    transition:0.3s;
}

.lab-btn:hover{
    background:#d95f18;
    transform:translateY(-2px);
}

.about-iote-section{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:40px;
    margin:60px 0;
    padding:50px;
    background:#ffffff;
    border-radius:20px;
    box-shadow:0 8px 24px rgba(0,0,0,0.06);
}

.about-iote-text{
    flex:1;
}

.about-iote-label{
    display:inline-block;
    font-size:0.95rem;
    font-weight:700;
    color:var(--primary-color);
    text-transform:uppercase;
    letter-spacing:1px;
    margin-bottom:12px;
}

.about-iote-text h2{
    font-size:2.2rem;
    color:var(--secondary-color);
    margin-bottom:18px;
    line-height:1.3;
}

.about-iote-text p{
    font-size:1.05rem;
    color:#555;
    line-height:1.8;
    margin-bottom:28px;
}

.about-iote-highlights{
    display:grid;
    grid-template-columns:repeat(2, minmax(180px, 1fr));
    gap:15px;
    margin-bottom:28px;
}

.about-highlight-box{
    display:flex;
    align-items:center;
    gap:12px;
    background:#f8f9fb;
    padding:14px 16px;
    border-radius:12px;
    font-weight:600;
    color:#2c3e50;
}

.about-highlight-box i{
    color:var(--primary-color);
    font-size:1.1rem;
}

.about-iote-image{
    flex:1;
    display:flex;
    justify-content:center;
}

.about-iote-image img{
    width:100%;
    max-width:480px;
    border-radius:18px;
    object-fit:cover;
    box-shadow:0 8px 20px rgba(0,0,0,0.08);
}

@media (max-width: 768px){
    .about-iote-section{
        flex-direction:column;
        padding:30px 20px;
    }

    .about-iote-text h2{
        font-size:1.8rem;
    }

    .about-iote-highlights{
        grid-template-columns:1fr;
    }

    .about-iote-image img{
        max-width:100%;
    }
}

.why-iote-section{
    margin:60px 0;
    padding:50px 40px;
    background:linear-gradient(135deg, #fff8f3 0%, #ffffff 100%);
    border-radius:20px;
    box-shadow:0 8px 24px rgba(0,0,0,0.05);
}

.why-iote-header{
    text-align:center;
    max-width:800px;
    margin:0 auto 40px;
}

.why-iote-label{
    display:inline-block;
    font-size:0.95rem;
    font-weight:700;
    color:var(--primary-color);
    text-transform:uppercase;
    letter-spacing:1px;
    margin-bottom:12px;
}

.why-iote-header h2{
    font-size:2.2rem;
    color:var(--secondary-color);
    margin-bottom:16px;
    line-height:1.3;
}

.why-iote-header p{
    font-size:1.05rem;
    color:#666;
    line-height:1.8;
}

.why-iote-grid{
    display:grid;
    grid-template-columns:repeat(2, 1fr);
    gap:24px;
}

.why-iote-card{
    background:#ffffff;
    border-radius:18px;
    padding:28px 24px;
    box-shadow:0 6px 18px rgba(0,0,0,0.05);
    transition:transform 0.3s ease, box-shadow 0.3s ease;
}

.why-iote-card:hover{
    transform:translateY(-6px);
    box-shadow:0 12px 24px rgba(0,0,0,0.08);
}

.why-iote-icon{
    width:58px;
    height:58px;
    border-radius:14px;
    background:rgba(243, 126, 33, 0.12);
    display:flex;
    align-items:center;
    justify-content:center;
    margin-bottom:18px;
}

.why-iote-icon i{
    font-size:1.4rem;
    color:var(--primary-color);
}

.why-iote-card h3{
    font-size:1.25rem;
    color:var(--secondary-color);
    margin-bottom:12px;
}

.why-iote-card p{
    font-size:1rem;
    color:#555;
    line-height:1.7;
}

@media (max-width: 768px){
    .why-iote-section{
        padding:35px 20px;
    }

    .why-iote-header h2{
        font-size:1.8rem;
    }

    .why-iote-grid{
        grid-template-columns:1fr;
    }
}

.program-section{
    margin:70px 0;
    padding:60px 40px;
    background:#ffffff;
    border-radius:20px;
    box-shadow:0 8px 24px rgba(0,0,0,0.05);
}

.program-header{
    text-align:center;
    max-width:800px;
    margin:0 auto 45px;
}

.program-label{
    display:inline-block;
    font-size:0.95rem;
    font-weight:700;
    color:var(--primary-color);
    text-transform:uppercase;
    letter-spacing:1px;
    margin-bottom:12px;
}

.program-header h2{
    font-size:2.2rem;
    color:var(--secondary-color);
    margin-bottom:16px;
}

.program-header p{
    font-size:1.05rem;
    color:#666;
    line-height:1.8;
}

.program-grid{
    display:grid;
    grid-template-columns:repeat(3, 1fr);
    gap:25px;
}

.program-card{
    background:#f8f9fb;
    border-radius:16px;
    padding:30px 25px;
    text-align:center;
    transition:all 0.3s ease;
}

.program-card:hover{
    transform:translateY(-6px);
    box-shadow:0 10px 20px rgba(0,0,0,0.08);
}

.program-card i{
    font-size:2rem;
    color:var(--primary-color);
    margin-bottom:15px;
}

.program-card h3{
    font-size:1.25rem;
    margin-bottom:10px;
    color:var(--secondary-color);
}

.program-card p{
    font-size:0.95rem;
    color:#555;
    line-height:1.6;
}

@media (max-width: 768px){

    .program-section{
        padding:40px 20px;
    }

    .program-grid{
        grid-template-columns:1fr;
    }

}

.projects-lab-section{
    margin:70px 0;
    padding:60px 40px;
    background:linear-gradient(135deg, #ffffff 0%, #fff8f3 100%);
    border-radius:20px;
    box-shadow:0 8px 24px rgba(0,0,0,0.05);
}

.projects-lab-header{
    text-align:center;
    max-width:800px;
    margin:0 auto 45px;
}

.projects-lab-label{
    display:inline-block;
    font-size:0.95rem;
    font-weight:700;
    color:var(--primary-color);
    text-transform:uppercase;
    letter-spacing:1px;
    margin-bottom:12px;
}

.projects-lab-header h2{
    font-size:2.2rem;
    color:var(--secondary-color);
    margin-bottom:16px;
    line-height:1.3;
}

.projects-lab-header p{
    font-size:1.05rem;
    color:#666;
    line-height:1.8;
}

.projects-lab-grid{
    display:grid;
    grid-template-columns:repeat(3, minmax(0, 1fr));
    gap:25px;
    align-items:stretch;
}

.projects-lab-card{
    display:flex;
    flex-direction:column;
    min-height:560px;
    background:#ffffff;
    border-radius:18px;
    overflow:hidden;
    box-shadow:0 6px 18px rgba(0,0,0,0.05);
    transition:transform 0.3s ease, box-shadow 0.3s ease;
}

.projects-lab-card:hover{
    transform:translateY(-6px);
    box-shadow:0 12px 24px rgba(0,0,0,0.08);
}

.projects-lab-card img{
    width:100%;
    height:220px;
    object-fit:cover;
    display:block;
    flex-shrink:0;
}

.projects-lab-content{
    display:flex;
    flex-direction:column;
    flex:1;
    padding:22px 20px 24px;
}

.projects-lab-content h3{
    font-size:1.25rem;
    color:var(--secondary-color);
    margin-bottom:10px;
    line-height:1.45;

    display:-webkit-box;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
    overflow:hidden;
}

.projects-lab-content p{
    font-size:0.98rem;
    color:#555;
    line-height:1.7;
    margin-bottom:18px;

    display:-webkit-box;
    -webkit-line-clamp:6;
    -webkit-box-orient:vertical;
    overflow:hidden;
}

.projects-lab-readmore{
    margin-top:auto;
    display:inline-block;
    color:#f36f21;
    font-weight:700;
    text-decoration:none;
    font-size:0.95rem;
}

.projects-lab-readmore:hover{
    text-decoration:underline;
    color:#d95f18;
}

.projects-lab-action{
    display:flex;
    justify-content:center;
    align-items:center;
    width:100%;
    margin-top:35px;
}

.faculty-preview-section{
    margin:70px 0;
    padding:60px 40px;
    background:#ffffff;
    border-radius:20px;
    box-shadow:0 8px 24px rgba(0,0,0,0.05);
}

.faculty-preview-header{
    text-align:center;
    max-width:800px;
    margin:0 auto 40px;
}

.faculty-preview-label{
    display:inline-block;
    font-size:0.95rem;
    font-weight:700;
    color:var(--primary-color);
    text-transform:uppercase;
    letter-spacing:1px;
    margin-bottom:12px;
}

.faculty-preview-header h2{
    font-size:2.2rem;
    color:var(--secondary-color);
    margin-bottom:16px;
    line-height:1.3;
}

.faculty-preview-header p{
    font-size:1.05rem;
    color:#666;
    line-height:1.8;
}

.faculty-preview-grid{
    display:grid;
    grid-template-columns:repeat(5, 1fr);
    gap:20px;
}

.faculty-preview-card{
    background:#f8f9fb;
    border-radius:18px;
    overflow:hidden;
    box-shadow:0 6px 18px rgba(0,0,0,0.05);
    transition:transform 0.3s ease, box-shadow 0.3s ease;
    text-align:center;
}

.faculty-preview-card:hover{
    transform:translateY(-6px);
    box-shadow:0 12px 24px rgba(0,0,0,0.08);
}

.faculty-preview-image{
    width:100%;
    height:260px;
    object-fit:cover;
    display:block;
    background:#e9ecef;
}

@media (max-width:768px){

.faculty-preview-grid{
    grid-template-columns:1fr;
    justify-items:center;   /* จัด card ให้อยู่กลาง */
}

.faculty-preview-card{
    width:220px;            /* ความกว้างเท่ารูป */
    padding:15px;
}

.faculty-preview-image{
    width:100%;
    height:auto;
}
}

.faculty-preview-content{
    padding:22px 20px 24px;
}

.faculty-preview-content h3{
    font-size:1.2rem;
    color:var(--secondary-color);
    margin-bottom:8px;
}

.faculty-preview-position{
    font-size:0.95rem;
    color:var(--primary-color);
    font-weight:700;
    margin-bottom:10px;
}

.faculty-preview-content p{
    font-size:0.96rem;
    color:#555;
    line-height:1.7;
}

.faculty-preview-loading,
.faculty-preview-empty{
    grid-column:1 / -1;
    text-align:center;
    color:#666;
    font-size:1rem;
    padding:30px 0;
}

.faculty-preview-action{
    text-align:center;
    margin-top:35px;
}

@media (max-width: 768px){
    .faculty-preview-section{
        padding:40px 20px;
    }

    .faculty-preview-header h2{
        font-size:1.8rem;
    }

    .faculty-preview-grid{
        grid-template-columns:1fr;
    }

    .faculty-preview-image{
        height:220px;
    }
}

.news-preview-section{
    margin:70px 0;
    padding:60px 40px;
    background:linear-gradient(135deg, #FFFCF9 0%, #F9F4EE 100%);
    border-radius:20px;
    box-shadow:0 8px 24px rgba(0,0,0,0.05);
}

.news-preview-header{
    text-align:center;
    max-width:800px;
    margin:0 auto 45px;
}

.news-preview-label{
    display:inline-block;
    font-size:0.95rem;
    font-weight:700;
    color:var(--primary-color);
    text-transform:uppercase;
    letter-spacing:1px;
    margin-bottom:12px;
}

.news-preview-header h2{
    font-size:2.2rem;
    color:var(--secondary-color);
    margin-bottom:16px;
    line-height:1.3;
}

.news-preview-header p{
    font-size:1.05rem;
    color:#666;
    line-height:1.8;
}

.news-preview-grid{
    display:grid;
    grid-template-columns:repeat(3, minmax(0, 1fr));
    gap:25px;
    align-items:stretch;
}

.news-preview-card{
    display:flex;
    flex-direction:column;
    min-height:560px;
    background:#ffffff;
    border-radius:18px;
    overflow:hidden;
    box-shadow:0 6px 18px rgba(0,0,0,0.05);
    transition:transform 0.3s ease, box-shadow 0.3s ease;
}

.news-preview-card:hover{
    transform:translateY(-6px);
    box-shadow:0 12px 24px rgba(0,0,0,0.08);
}

.news-preview-image{
    width:100%;
    height:220px;
    object-fit:cover;
    display:block;
    flex-shrink:0;
    background:#e9ecef;
}

.news-preview-content{
    display:flex;
    flex-direction:column;
    flex:1;
    padding:22px 20px 24px;
}

.news-preview-category{
    display:inline-block;
    align-self:flex-start;
    margin-bottom:12px;
    padding:6px 12px;
    border-radius:999px;
    background:rgba(243, 126, 33, 0.12);
    color:var(--primary-color);
    font-size:0.85rem;
    font-weight:700;
}

.news-preview-content h3{
    font-size:1.25rem;
    color:var(--secondary-color);
    margin-bottom:10px;
    line-height:1.45;

    display:-webkit-box;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
    overflow:hidden;
}

.news-preview-content p{
    font-size:0.98rem;
    color:#555;
    line-height:1.7;
    margin-bottom:18px;

    display:-webkit-box;
    -webkit-line-clamp:6;
    -webkit-box-orient:vertical;
    overflow:hidden;
}

.news-preview-link{
    margin-top:auto;
    display:inline-block;
    color:#f36f21;
    font-weight:700;
    text-decoration:none;
    font-size:0.95rem;
}

.news-preview-link:hover{
    text-decoration:underline;
    color:#d95f18;
}

.news-preview-loading,
.news-preview-empty{
    grid-column:1 / -1;
    text-align:center;
    color:#666;
    font-size:1rem;
    padding:30px 0;
}

.news-preview-action{
    display:flex;
    justify-content:center;
    align-items:center;
    width:100%;
    margin-top:35px;
}

@media (max-width: 992px){
    .news-preview-grid{
        grid-template-columns:repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px){
    .news-preview-section{
        padding:40px 20px;
    }

    .news-preview-header h2{
        font-size:1.8rem;
    }

    .news-preview-grid{
        grid-template-columns:1fr;
    }

    .news-preview-card{
        min-height:auto;
    }

    .news-preview-image{
        height:200px;
    }
}

.news-preview-card{
    min-height:560px;
}

.projects-lab-loading,
.projects-lab-empty{
    grid-column:1 / -1;
    text-align:center;
    color:#666;
    font-size:1rem;
    padding:30px 0;
}

.projects-page-section{
    margin:60px 0;
    padding:50px 30px;
    background:#ffffff;
    border-radius:20px;
    box-shadow:0 8px 24px rgba(0,0,0,0.05);
}

.projects-page-header{
    text-align:center;
    max-width:800px;
    margin:0 auto 40px;
}

.projects-page-header h1{
    font-size:2.4rem;
    color:var(--secondary-color);
    margin-bottom:15px;
}

.projects-page-header p{
    font-size:1.05rem;
    color:#666;
    line-height:1.8;
}

.news-page-section{
    margin:60px 0;
    padding:50px 30px;
    background:#ffffff;
    border-radius:20px;
    box-shadow:0 8px 24px rgba(0,0,0,0.05);
}

.news-page-header{
    text-align:center;
    max-width:800px;
    margin:0 auto 40px;
}

.news-page-header h1{
    font-size:2.4rem;
    color:var(--secondary-color);
    margin-bottom:15px;
}

.news-page-header p{
    font-size:1.05rem;
    color:#666;
    line-height:1.8;
}

.career-quiz-teaser-section{
    margin:70px 0;
    padding:60px 40px;
    background:linear-gradient(135deg, #fff8f3 0%, #ffffff 100%);
    border-radius:24px;
    box-shadow:0 8px 24px rgba(0,0,0,0.05);
}

.career-quiz-teaser-content{
    text-align:center;
    max-width:820px;
    margin:0 auto 38px;
}

.career-quiz-teaser-label{
    display:inline-block;
    font-size:0.95rem;
    font-weight:700;
    color:var(--primary-color);
    text-transform:uppercase;
    letter-spacing:1px;
    margin-bottom:12px;
}

.career-quiz-teaser-content h2{
    font-size:2.35rem;
    color:var(--secondary-color);
    margin-bottom:16px;
    line-height:1.3;
}

.career-quiz-teaser-content p{
    font-size:1.05rem;
    color:#666;
    line-height:1.8;
    margin-bottom:24px;
}

.career-quiz-start-btn{
    display:inline-block;
    background:#f36f21;
    color:#fff;
    text-decoration:none;
    padding:14px 30px;
    border-radius:999px;
    font-weight:700;
    transition:all 0.3s ease;
    box-shadow:0 8px 18px rgba(243, 111, 33, 0.25);
}

.career-quiz-start-btn:hover{
    background:#d95f18;
    transform:translateY(-2px);
    box-shadow:0 12px 22px rgba(243, 111, 33, 0.32);
}

.career-quiz-teaser-cards{
    display:grid;
    grid-template-columns:repeat(3, minmax(0, 1fr));
    gap:24px;
}

.career-teaser-card{
    background:#fff;
    border-radius:20px;
    padding:28px 24px;
    text-align:center;
    box-shadow:0 6px 18px rgba(0,0,0,0.05);
    transition:transform 0.3s ease, box-shadow 0.3s ease;
}

.career-teaser-card:hover{
    transform:translateY(-6px);
    box-shadow:0 12px 24px rgba(0,0,0,0.08);
}

.career-teaser-icon{
    width:68px;
    height:68px;
    border-radius:18px;
    margin:0 auto 16px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:rgba(243, 126, 33, 0.12);
}

.career-teaser-icon i{
    font-size:1.8rem;
    color:var(--primary-color);
}

.career-teaser-card h3{
    color:var(--secondary-color);
    margin-bottom:10px;
    font-size:1.22rem;
}

.career-teaser-card p{
    color:#555;
    line-height:1.7;
    margin:0;
}

@media (max-width: 900px){
    .career-quiz-teaser-cards{
        grid-template-columns:1fr;
    }
}

@media (max-width: 768px){
    .career-quiz-teaser-section{
        padding:40px 20px;
    }

    .career-quiz-teaser-content h2{
        font-size:1.9rem;
    }

    .career-quiz-teaser-content p{
        font-size:1rem;
    }
}

.projects-lab-grid{
    display:grid;
    grid-template-columns:repeat(3, minmax(0, 1fr));
    gap:25px;
    align-items:stretch;
}

.projects-lab-card{
    display:flex;
    flex-direction:column;
    min-height:560px;
    background:#ffffff;
    border-radius:18px;
    overflow:hidden;
    box-shadow:0 6px 18px rgba(0,0,0,0.05);
    transition:transform 0.3s ease, box-shadow 0.3s ease;
}

.projects-lab-card:hover{
    transform:translateY(-6px);
    box-shadow:0 12px 24px rgba(0,0,0,0.08);
}

.projects-lab-card img{
    width:100%;
    height:220px;
    object-fit:cover;
    display:block;
    flex-shrink:0;
}

.projects-lab-content{
    display:flex;
    flex-direction:column;
    flex:1;
    padding:22px 20px 24px;
}

.projects-lab-content h3{
    font-size:1.25rem;
    color:var(--secondary-color);
    margin-bottom:10px;
    line-height:1.45;

    display:-webkit-box;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
    overflow:hidden;
}

.projects-lab-content p{
    font-size:0.98rem;
    color:#555;
    line-height:1.7;
    margin-bottom:18px;

    display:-webkit-box;
    -webkit-line-clamp:6;
    -webkit-box-orient:vertical;
    overflow:hidden;
}

.projects-lab-readmore{
    margin-top:auto;
    display:inline-block;
    color:#f36f21;
    font-weight:700;
    text-decoration:none;
    font-size:0.95rem;
}

.projects-lab-readmore:hover{
    text-decoration:underline;
    color:#d95f18;
}

@media (max-width: 992px){
    .projects-lab-grid{
        grid-template-columns:repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px){
    .projects-lab-grid{
        grid-template-columns:1fr;
    }

    .projects-lab-card{
        min-height:auto;
    }

    .projects-lab-card img{
        height:200px;
    }
}

.about-iote-section,
.why-iote-section,
.program-section,
.projects-lab-section,
.faculty-preview-section,
.news-preview-section,
.career-quiz-teaser-section,
.projects-page-section,
.news-page-section{
    background: linear-gradient(135deg, #FFFCF9 0%, #F9F4EE 100%);
}

.why-iote-card,
.program-card,
.projects-lab-card,
.faculty-preview-card,
.news-preview-card,
.career-teaser-card,
.about-highlight-box{
    background: #ffffff;
}

/*.news-preview-grid{
    display:grid !important;
    grid-template-columns:repeat(3, minmax(0, 1fr));
    gap:25px;
    align-items:stretch;
}

.news-preview-card{
    display:flex;
    flex-direction:column;
    min-height:560px;
    background:#ffffff;
    border-radius:18px;
    overflow:hidden;
    box-shadow:0 6px 18px rgba(0,0,0,0.05);
    transition:transform 0.3s ease, box-shadow 0.3s ease;
}*/

.news-preview-card:hover{
    transform:translateY(-6px);
    box-shadow:0 12px 24px rgba(0,0,0,0.08);
}

.news-preview-image{
    width:100%;
    height:220px;
    object-fit:cover;
    display:block;
    flex-shrink:0;
    background:#e9ecef;
}

.news-preview-content{
    display:flex;
    flex-direction:column;
    flex:1;
    padding:22px 20px 24px;
}

.news-preview-content h3{
    font-size:1.25rem;
    color:var(--secondary-color);
    margin-bottom:10px;
    line-height:1.45;
    display:-webkit-box;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
    overflow:hidden;
}

.news-preview-content p{
    font-size:0.98rem;
    color:#555;
    line-height:1.7;
    margin-bottom:18px;
    display:-webkit-box;
    -webkit-line-clamp:6;
    -webkit-box-orient:vertical;
    overflow:hidden;
}

.news-preview-link{
    margin-top:auto;
    display:inline-block;
    color:#f36f21;
    font-weight:700;
    text-decoration:none;
    font-size:0.95rem;
}

.news-preview-link:hover{
    text-decoration:underline;
    color:#d95f18;
}

.main-btn{
    display:inline-block;
    background:#f36f21;
    color:white;
    padding:14px 34px;
    border-radius:40px;
    text-decoration:none;
    font-weight:700;
    font-size:0.95rem;
    transition:all 0.3s ease;
    box-shadow:0 8px 18px rgba(243,111,33,0.25);
}

.main-btn:hover{
    background:#d95f18;
    transform:translateY(-3px);
    box-shadow:0 12px 22px rgba(243,111,33,0.35);
}

.about-highlight-box{
    display:flex;
    align-items:center;
    gap:12px;
    background:#ffffff;
    padding:14px 16px;
    border-radius:12px;
    font-weight:600;
    color:#2c3e50;
    cursor:pointer;
    transition:transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    border:1px solid rgba(243, 111, 33, 0.08);
}

.about-highlight-box:hover{
    transform:translateY(-6px);
    box-shadow:0 12px 24px rgba(0,0,0,0.08);
}

.about-highlight-box.active{
    border-color:rgba(243, 111, 33, 0.28);
    box-shadow:0 10px 22px rgba(243, 111, 33, 0.12);
}

.about-learn-btn{
    display:inline-block;
    background:#ffffff;
    color:#2c3e50;
    padding:12px 28px;
    border-radius:40px;
    text-decoration:none;
    font-weight:700;
    transition:all 0.3s ease;
    border:1px solid rgba(0,0,0,0.06);
    box-shadow:0 8px 18px rgba(0,0,0,0.05);
}

.about-learn-btn:hover{
    transform:translateY(-2px);
    box-shadow:0 12px 22px rgba(0,0,0,0.08);
    background:#fafafa;
}

.about-iote-image img{
    width:100%;
    max-width:480px;
    height:320px;
    border-radius:18px;
    object-fit:cover;
    box-shadow:0 8px 20px rgba(0,0,0,0.08);
    transition:opacity 0.25s ease, transform 0.25s ease;
}

.news-preview-grid{
    display:grid !important;
    grid-template-columns:repeat(3, minmax(280px, 1fr));
    gap:25px;
    align-items:stretch;
}

.news-preview-card{
    display:flex;
    flex-direction:column;
    width:100%;
    min-width:0;
    min-height:560px;
    background:#ffffff;
    border-radius:18px;
    overflow:hidden;
    box-shadow:0 6px 18px rgba(0,0,0,0.05);
    transition:transform 0.3s ease, box-shadow 0.3s ease;
}

@media (max-width: 992px){
    .news-preview-grid{
        grid-template-columns:repeat(2, minmax(280px, 1fr));
    }
}

@media (max-width: 768px){
    .news-preview-grid{
        grid-template-columns:1fr;
    }

    .news-preview-card{
        min-height:auto;
    }

    .news-preview-image{
        height:200px;
    }
}

.career-quiz-teaser-section.pop-after-fade {
    animation: popAfterFade 0.45s ease-out;
}

@keyframes popAfterFade {
    0% {
        transform: scale(1);
    }
    45% {
        transform: scale(1.035);
    }
    100% {
        transform: scale(1);
    }
}

.recommended-section{
    position: relative;
    overflow: visible;
}

.recommended-ribbon{
    position: absolute;
    top: 20px;
    left: -12px;

    background: linear-gradient(135deg, #ff7a2f, #ff4e00);
    color: white;

    font-size: 20px;      /* เดิมประมาณ 16 */
    font-weight: 800;
    letter-spacing: 1px;

    padding: 12px 28px;   /* เพิ่ม padding ให้ใหญ่ขึ้น */

    border-radius: 0 18px 18px 0;

    box-shadow: 0 10px 24px rgba(0,0,0,0.2);
}

.recommended-ribbon::before{
    content: "";
    position: absolute;
    left: 0;
    bottom: -12px;

    border-top: 12px solid #c94a12;
    border-left: 12px solid transparent;
}

/* ===== mobile slider fix แบบแก้ชนกับข้อความในรูป ===== */
@media (max-width: 768px){
    .index-slider{
        height: 430px;
        border-radius: 16px;
    }

    .index-slide{
        background-position: center center;
    }

    .index-slide::before{
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(
            to top,
            rgba(0,0,0,0.72) 0%,
            rgba(0,0,0,0.45) 35%,
            rgba(0,0,0,0.12) 70%,
            rgba(0,0,0,0.03) 100%
        );
        z-index: 1;
    }

    .index-overlay{
        position: absolute;
        left: 16px;
        right: 16px;
        bottom: 28px;
        max-width: none;
        padding: 18px 18px 16px;
        background: rgba(0,0,0,0.58);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        border-radius: 18px;
        z-index: 2;
    }

    .index-overlay h1{
        font-size: 1.45rem;
        line-height: 1.2;
        margin: 0 0 8px;
        color: #fff;
    }

    .index-overlay p{
        font-size: 0.9rem;
        line-height: 1.45;
        margin: 0 0 14px;
        color: rgba(255,255,255,0.95);
    }

    .index-buttons{
        margin-top: 0;
        gap: 10px;
        flex-wrap: wrap;
    }

    .apply-btn,
    .learn-btn,
    .explore-btn,
    .lab-btn{
        padding: 10px 18px;
        font-size: 0.9rem;
    }

    .index-prev,
    .index-next{
        top: 50%;
        transform: translateY(-50%);
        z-index: 3;
        font-size: 28px;
        color: #fff;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: rgba(0,0,0,0.35);
        display: flex;
        align-items: center;
        justify-content: center;
        text-shadow: none;
    }

    .index-prev{ left: 8px; }
    .index-next{ right: 8px; }

    .index-dots{
        bottom: 8px;
        z-index: 3;
    }

    .index-dot{
        width: 10px;
        height: 10px;
    }
}

@media (max-width: 480px){
    .index-slider{
        height: 400px;
    }

    .index-overlay{
        left: 12px;
        right: 12px;
        bottom: 22px;
        padding: 14px 14px 14px;
    }

    .index-overlay h1{
        font-size: 1.25rem;
    }

    .index-overlay p{
        font-size: 0.82rem;
        margin-bottom: 12px;
    }

    .apply-btn,
    .learn-btn,
    .explore-btn,
    .lab-btn{
        padding: 9px 14px;
        font-size: 0.82rem;
        border-radius: 24px;
    }
}

/* Ribbon responsive */
@media (max-width: 768px){
    .recommended-ribbon{
        font-size: 14px;
        padding: 8px 18px;
        top: 14px;
        left: -8px;
    }

    .recommended-ribbon::before{
        bottom: -8px;
        border-top: 8px solid #c94a12;
        border-left: 8px solid transparent;
    }
}

@media (max-width: 480px){
    .recommended-ribbon{
        font-size: 12px;
        padding: 6px 14px;
        top: 10px;
        left: -6px;
        border-radius: 0 14px 14px 0;
    }

    .recommended-ribbon::before{
        bottom: -6px;
        border-top: 6px solid #c94a12;
        border-left: 6px solid transparent;
    }
}

.credit-checker-section{
    margin:70px 0;
    padding:60px 40px;
    background:linear-gradient(135deg, #FFFCF9 0%, #F9F4EE 100%);
    border-radius:20px;
    box-shadow:0 8px 24px rgba(0,0,0,0.05);
    overflow:hidden;
}

.credit-checker-header{
    position:relative;
    z-index:1;
    text-align:center;
    max-width:800px;
    margin:0 auto 45px;
}

.credit-checker-label{
    display:inline-block;
    font-size:0.95rem;
    font-weight:700;
    color:var(--primary-color);
    text-transform:uppercase;
    letter-spacing:1px;
    margin-bottom:12px;
}

.credit-checker-header h2{
    font-size:2.2rem;
    color:var(--secondary-color);
    margin-bottom:16px;
    line-height:1.3;
}

.credit-checker-header p{
    font-size:1.05rem;
    color:#666;
    line-height:1.8;
}

.credit-checker-card{
    position:relative;
    z-index:1;
    background:#ffffff;
    border-radius:20px;
    padding:36px;
    display:grid;
    grid-template-columns:1.05fr 1fr;
    gap:32px;
    align-items:center;
    box-shadow:0 8px 24px rgba(0,0,0,0.05);
    border:1px solid rgba(243,111,33,0.06);
}

.credit-checker-info{
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.credit-feature-card{
    display:flex;
    align-items:flex-start;
    gap:16px;
    padding:18px 18px;
    background:#ffffff;
    border:1px solid rgba(243,111,33,0.10);
    border-radius:18px;
    transition:all 0.25s ease;
}

.credit-feature-card:hover{
    transform:translateY(-4px);
    box-shadow:0 12px 24px rgba(0,0,0,0.06);
}

.credit-feature-icon{
    width:52px;
    height:52px;
    border-radius:16px;
    background:linear-gradient(135deg, #f36f21, #f5a14c);
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:1.2rem;
    flex-shrink:0;
    box-shadow:0 10px 20px rgba(243,111,33,0.18);
}

.credit-feature-card h3{
    margin: 0 0 6px;
    color: #22334d;
    font-size: 1.28rem;
}

.credit-feature-card p{
    margin: 0;
    color: #657081;
    line-height: 1.7;
}

.credit-checker-btn{
    margin-top:8px;
    width:fit-content;
    display:inline-flex;
    align-items:center;
    gap:10px;
    background:#f36f21;
    color:#fff;
    padding:14px 28px;
    border-radius:40px;
    text-decoration:none;
    font-weight:700;
    transition:all 0.3s ease;
    box-shadow:0 8px 18px rgba(243,111,33,0.25);
}

.credit-checker-btn:hover{
    background:#d95f18;
    transform:translateY(-3px);
    box-shadow:0 12px 22px rgba(243,111,33,0.35);
}

.credit-checker-visual{
    position: relative;
    min-height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.credit-visual-window{
    width:100%;
    max-width:540px;
    background:#fffaf5;
    border:1px solid rgba(243,111,33,0.10);
    border-radius:24px;
    box-shadow:0 8px 24px rgba(0,0,0,0.05);
    overflow:hidden;
    position:relative;
}

.credit-window-top{
    display:flex;
    gap:8px;
    padding:14px 18px;
    background:#f8efe6;
    border-bottom:1px solid rgba(243,111,33,0.08);
}

.credit-window-top span{
    width:11px;
    height:11px;
    border-radius:50%;
    background:#e8b07a;
}

.credit-window-body{
    display: grid;
    grid-template-columns: 145px 1fr;
    gap: 18px;
    padding: 22px;
}

.credit-window-left{
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.credit-mini-card{
    background: #fff;
    border: 1px solid #f1e5d6;
    border-radius: 18px;
    padding: 16px 14px;
    box-shadow: 0 8px 18px rgba(0,0,0,0.03);
}

.credit-mini-card small{
    display: block;
    color: #7c8696;
    margin-bottom: 8px;
}

.credit-mini-card strong{
    font-size: 1.8rem;
    color: #24364f;
}

.credit-mini-card.active{
    background: linear-gradient(135deg, #e67e22, #f3a14e);
    border-color: transparent;
}

.credit-mini-card.active small,
.credit-mini-card.active strong{
    color: #fff;
}

.credit-window-right{
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.credit-bar-group span{
    display: inline-block;
    margin-bottom: 8px;
    color: #5c6676;
    font-weight: 600;
}

.credit-bar{
    width: 100%;
    height: 14px;
    background: #f1f2f4;
    border-radius: 999px;
    overflow: hidden;
}

.credit-bar-fill{
    width: 70%;
    height: 100%;
    background: linear-gradient(90deg, #e67e22, #f6b064);
    border-radius: 999px;
}

.credit-course-list{
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.credit-course-row{
    display: grid;
    grid-template-columns: 22px 1fr 30px;
    gap: 10px;
    align-items: center;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid #f0ece6;
    border-radius: 14px;
    color: #4f5868;
    font-size: 0.96rem;
}

.credit-course-row i{
    color: #b3b8c2;
}

.credit-course-row.checked{
    background: #fff7ef;
    border-color: rgba(230,126,34,0.18);
}

.credit-course-row.checked i{
    color: #e67e22;
}

.credit-course-row b{
    color: #24364f;
    text-align: right;
}

.credit-floating-badge{
    position:absolute;
    right:20px;
    bottom:20px;
    display:flex;
    align-items:center;
    gap:10px;
    background:#fff;
    border:1px solid rgba(243,111,33,0.12);
    border-radius:999px;
    padding:12px 16px;
    box-shadow:0 14px 28px rgba(0,0,0,0.07);
    color:#22334d;
    font-weight:600;
    z-index:2;
}

.credit-floating-badge i{
    width:38px;
    height:38px;
    border-radius:50%;
    background:linear-gradient(135deg, #e67e22, #f2a456);
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
}

@media (max-width: 768px){
    .credit-floating-badge{
        position:static;
        margin:18px auto 0;
        width:fit-content;
        max-width:100%;
    }
}

@media (max-width: 1100px){
    .credit-checker-card{
        grid-template-columns: 1fr;
    }

    .credit-checker-visual{
        min-height: auto;
    }

    .credit-floating-badge{
        position: static;
        margin-top: 18px;
        width: fit-content;
    }
}

@media (max-width: 768px){
    .credit-checker-section{
        padding:40px 20px;
    }

    .credit-checker-header h2{
        font-size:1.8rem;
    }

    .credit-checker-card{
        grid-template-columns:1fr;
        padding:22px;
        border-radius:20px;
    }

    .credit-window-body{
        grid-template-columns:1fr;
    }

    .credit-window-left{
        flex-direction:row;
        flex-wrap:wrap;
    }

    .credit-mini-card{
        flex:1 1 120px;
    }

    .credit-checker-btn{
        width:100%;
        justify-content:center;
    }

    .credit-feature-card{
        padding:16px;
    }

    .credit-feature-card h3{
        font-size:1.08rem;
    }

    .credit-floating-badge{
        position:static;
        margin-top:18px;
        width:fit-content;
    }
}

@media (max-width: 520px){
    .credit-checker-header h2{
        font-size: 1.75rem;
    }

    .credit-feature-card{
        flex-direction: column;
        align-items: flex-start;
    }

    .credit-window-body{
        padding: 16px;
    }

    .credit-course-row{
        grid-template-columns: 20px 1fr 24px;
        font-size: 0.9rem;
    }
}

.credit-checker-visual{
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.credit-preview-window{
    width: 100%;
    max-width: 560px;
    background: #fff;
    border: 1px solid rgba(243,111,33,0.10);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 12px 28px rgba(0,0,0,0.06);
}

.credit-preview-topbar{
    display: flex;
    gap: 8px;
    padding: 14px 16px;
    background: #f8efe6;
    border-bottom: 1px solid rgba(243,111,33,0.08);
}

.credit-preview-topbar span{
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #e6a86f;
}

.credit-preview-body{
    padding: 18px;
    background: linear-gradient(135deg, #fffdfb 0%, #fdf7f0 100%);
}

.credit-preview-title{
    text-align: center;
    font-size: 0.98rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 14px;
}

.credit-preview-controls{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 14px;
}

.credit-preview-select,
.credit-preview-search{
    height: 36px;
    border-radius: 10px;
    border: 1px solid #e6e6e6;
    background: #fff;
    display: flex;
    align-items: center;
    padding: 0 12px;
    font-size: 0.78rem;
    color: #888;
}

.credit-preview-summary{
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 12px;
}

.preview-summary-box{
    background: #fff;
    border: 1px solid rgba(243,111,33,0.10);
    border-radius: 12px;
    padding: 10px 8px;
    text-align: center;
}

.preview-summary-box small{
    display: block;
    font-size: 0.68rem;
    color: #777;
    margin-bottom: 6px;
}

.preview-summary-box strong{
    font-size: 1rem;
    color: #2c3e50;
}

.preview-summary-box.active{
    background: linear-gradient(135deg, #f36f21, #f5a14c);
}

.preview-summary-box.active small,
.preview-summary-box.active strong{
    color: #fff;
}

.preview-summary-box.status strong{
    color: #f36f21;
    font-size: 0.9rem;
}

.credit-preview-progress{
    width: 100%;
    height: 10px;
    background: #ececec;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 16px;
}

.credit-preview-progress-fill{
    width: 12%;
    height: 100%;
    background: linear-gradient(90deg, #f36f21, #f5a14c);
    border-radius: 999px;
}

.credit-preview-lists{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.preview-list-card{
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 14px;
    padding: 12px;
    min-height: 180px;
}

.preview-list-header{
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f1f1f1;
}

.preview-list-header b{
    color: #888;
    font-size: 0.72rem;
}

.preview-course-item{
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: flex-start;
    padding: 10px;
    border: 1px solid rgba(243,111,33,0.10);
    border-radius: 12px;
    background: #fff;
    margin-bottom: 10px;
}

.preview-course-item.selected{
    background: #fff7ef;
    border-color: rgba(243,111,33,0.18);
}

.preview-course-code{
    font-size: 0.72rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 4px;
}

.preview-course-name{
    font-size: 0.78rem;
    color: #444;
    line-height: 1.4;
    margin-bottom: 3px;
}

.preview-course-meta{
    font-size: 0.68rem;
    color: #999;
}

.preview-course-credit{
    font-size: 0.72rem;
    font-weight: 700;
    color: #f36f21;
    white-space: nowrap;
    padding-top: 2px;
}

@media (max-width: 1100px){
    .credit-preview-window{
        max-width: 100%;
    }
}

@media (max-width: 768px){
    .credit-preview-controls{
        grid-template-columns: 1fr;
    }

    .credit-preview-summary{
        grid-template-columns: repeat(2, 1fr);
    }

    .credit-preview-lists{
        grid-template-columns: 1fr;
    }
}

.credit-checker-visual{
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.credit-preview-window{
    position: relative;
    width: 100%;
    max-width: 560px;
    background: #fff;
    border: 1px solid rgba(243,111,33,0.10);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 12px 28px rgba(0,0,0,0.06);
}

.credit-floating-badge{
    position: absolute;
    right: -14px;
    bottom: -16px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1px solid rgba(243,111,33,0.10);
    border-radius: 999px;
    padding: 14px 22px;
    box-shadow: 0 14px 28px rgba(0,0,0,0.08);
    color: #22334d;
    font-weight: 700;
    z-index: 5;
    white-space: nowrap;
}

.credit-floating-badge i{
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f36f21, #f5a14c);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

@media (max-width: 1100px){
    .credit-floating-badge{
        right: 12px;
        bottom: 12px;
        padding: 12px 18px;
    }
}

@media (max-width: 768px){
    .credit-floating-badge{
        right: 10px;
        bottom: 10px;
        padding: 10px 14px;
        font-size: 0.95rem;
    }

    .credit-floating-badge i{
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
}

@media (max-width: 520px){
    .credit-floating-badge{
        right: 8px;
        bottom: 8px;
        padding: 9px 12px;
        gap: 10px;
        font-size: 0.88rem;
    }

    .credit-floating-badge i{
        width: 32px;
        height: 32px;
        font-size: 0.82rem;
    }
}