﻿/* CSS ไฟลสำหรบ index.php - ภาควชาคณตศาสตร มหาวทยาลยเชยงใหม */

/* Base styles - สไตลพนฐาน */
.style1 {
    color: #0080C0;
    font-weight: bold;
}

.style2 {
    color: #663399;
    font-weight: bold;
}

.style3 {
    font-size: 12px
}

.style4 {
    color: #FFCC00
}

/* News box styles - สไตลกลองขาว */
.box-height {
    min-height: 260px; /* เพมความสง */
    margin-bottom: 20px;
    overflow: hidden;
    word-break: break-word;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    padding: 10px 5px;
    display: flex;
    flex-direction: row;
}

.font-news {
    font-size: 16px;
}

.news-title {
    display: -webkit-box;
    -webkit-line-clamp: 3; /* จำกด 3 บรรทด */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 72px; /* ปรบตามขนาดฟอนต */
    max-height: 72px;
    line-height: 1.2em;
}

/* Mobile responsive theme - ธมสำหรบมอถอ */
@media (max-width: 767px) {
    .box-height {
        flex-direction: column;
        min-height: unset;
        padding: 15px 10px;
        margin-bottom: 16px;
        border-radius: 15px;
        box-shadow: 0 3px 12px rgba(0,0,0,0.1);
        background: #fff;
        width: 100% !important;
    }
    
    /* ปรบ columns ใหเตมจอ */
    .col-md-4, .col-md-5, .col-md-7, .col-md-6, .col-md-3, .col-md-12 {
        width: 100% !important;
        float: none !important;
        display: block !important;
        padding-left: 8px !important;
        padding-right: 8px !important;
        margin-bottom: 15px;
    }
    
    /* ปรบสวนขาวใหเตมจอ */
    .tab-content {
        margin: 0 -15px !important;
        padding: 0 5px !important;
    }
    
    .row {
        margin-left: -5px !important;
        margin-right: -5px !important;
        width: 100vw !important;
        margin-left: calc(50% - 50vw) !important;
        margin-right: calc(50% - 50vw) !important;
        padding: 0 10px !important;
    }
    
    .font-news {
        font-size: 15px;
    }
    .news-title {
        min-height: unset;
        max-height: unset;
        -webkit-line-clamp: 2;
        font-size: 16px;
        font-weight: 500;
        color: #2c3e50;
        line-height: 1.4;
    }
    
    /* ปรบเมน Tabs ให responsive ดขน */
    .nav-tabs {
        display: flex;
        flex-direction: column;
        border: none;
        gap: 8px;
        margin: 0 -10px 20px -10px;
        padding: 0 5px;
    }
    .nav-tabs>li {
        width: 100% !important;
        margin-bottom: 5px;
        border: none !important;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
    .nav-tabs>li>a {
        font-size: 14px !important;
        padding: 12px 8px !important;
        text-align: center;
        border: none !important;
        border-radius: 12px;
        background: #f8f9fa;
        color: #333;
        display: flex;
        flex-direction: column;
        align-items: center;
        min-height: 80px;
        justify-content: center;
    }
    .nav-tabs>li.active>a {
        background: linear-gradient(135deg, #375d96, #B335B2);
        color: white !important;
    }
    .nav-tabs>li>a i {
        font-size: 24px !important;
        margin-bottom: 5px;
    }
    .nav-tabs>li>a span {
        font-size: 12px !important;
        line-height: 1.2;
    }
    
    .img-responsive, img {
        max-width: 100%;
        height: auto;
    }
    .container, .container-fluid {
        padding-left: 5px !important;
        padding-right: 5px !important;
        max-width: 100vw !important;
    }
    table.table {
        font-size: 13px;
    }
    table.table td {
        padding: 8px 5px;
    }
    iframe {
        width: 100% !important;
        height: auto !important;
        min-height: 200px;
        aspect-ratio: 16/9;
    }
    h3, h4 {
        font-size: 18px !important;
        margin-bottom: 15px;
    }
    /* ปรบสวนปมดรายการทงหมด */
    .alert {
        font-size: 14px !important;
        padding: 10px !important;
        margin: 10px 0 !important;
        border-radius: 12px !important;
    }
}

/* Tablet responsive - ธมสำหรบแทบเลต */
@media (min-width: 768px) and (max-width: 991px) {
    .nav-tabs>li {
        width: 16.66% !important;
        font-size: 14px;
    }
    .nav-tabs>li>a {
        font-size: 14px !important;
        padding: 8px 4px !important;
    }
    .nav-tabs>li>a i {
        font-size: 28px !important;
    }
    .nav-tabs>li>a span {
        font-size: 13px !important;
    }
    .container {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
}

/* Image styles - ปรบขนาดและจดตำแหนงรปในกลองขาว */
.col-md-5 img, .box-height .col-md-5 img {
    width: 100%;
    max-width: 160px;
    height: 180px;
    object-fit: contain;
    object-position: center;
    border-radius: 18px !important;
    box-shadow: 0 4px 18px rgba(80,80,120,0.12);
    background: #f8f9fa;
    padding: 6px;
    margin-bottom: 12px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 991px) {
    .col-md-5 img, .box-height .col-md-5 img {
        max-width: 100%;
        height: 140px;
        object-fit: contain;
    }
}

@media (max-width: 767px) {
    .col-md-5 img, .box-height .col-md-5 img {
        max-width: 100% !important;
        width: 100% !important;
        height: 200px !important;
        margin: 15px auto !important;
        object-fit: cover !important;
        object-position: center !important;
        padding: 0 !important;
        border-radius: 12px !important;
        box-shadow: 0 4px 15px rgba(0,0,0,0.15) !important;
    }
}

/* News box layout - ปรบขนาดกลองรปภาพในขาวใหไมลน */
.box-height {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 15px;
    min-height: 180px;
    max-width: 100%;
    box-sizing: border-box;
}

.box-height .col-md-5 {
    flex: 0 0 220px;
    max-width: 220px;
    padding: 0 !important;
    margin: 0 !important;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow: hidden;
}

.box-height .col-md-5 img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    object-position: center;
    border-radius: 12px !important;
    box-shadow: 0 3px 12px rgba(80,80,120,0.10);
    background: #f8f9fa;
    padding: 4px;
    margin-bottom: 0;
    display: block;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.box-height .col-md-5 img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(80,80,120,0.20);
}

.box-height .col-md-7 {
    flex: 1 1 0;
    max-width: calc(100% - 240px);
    padding-left: 0 !important;
    padding-right: 0 !important;
    min-width: 0;
    box-sizing: border-box;
    max-width: 100%;
}

@media (max-width: 991px) {
    .box-height .col-md-5 {
        flex: 0 0 120px;
        max-width: 120px;
    }
    .box-height .col-md-5 img {
        height: 120px;
        object-fit: contain;
    }
    .box-height .col-md-7 {
        max-width: calc(100% - 120px);
    }
}

@media (max-width: 767px) {
    .box-height {
        flex-direction: column;
        gap: 0;
        min-height: unset;
        padding: 0;
        text-align: center;
        border: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    .box-height .col-md-5,
    .box-height .col-md-7 {
        max-width: 100%;
        width: 100% !important;
        flex: unset;
        padding: 0 !important;
        border: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
    }
    .box-height .col-md-5 {
        width: 100% !important;
        max-width: 100% !important;
    }
    .box-height .col-md-5 img {
        width: 100% !important;
        height: 250px !important;
        min-height: 250px !important;
        margin: 0 auto 15px auto !important;
        max-width: 100% !important;
        object-fit: cover !important;
        object-position: center !important;
        padding: 0 !important;
        display: block;
        border-radius: 12px !important;
        box-shadow: 0 4px 15px rgba(0,0,0,0.15) !important;
        border: none !important;
        transition: transform 0.3s ease;
        cursor: pointer;
    }
    
    .box-height .col-md-5 img:hover,
    .box-height .col-md-5 img:active,
    .box-height .col-md-5 img:focus {
        transform: scale(1.03);
    }
    .box-height .col-md-7 {
        text-align: center;
        padding: 0 5px !important;
        border: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
    }
}

/* Vision section styles - สไตลสวน Vision */
.vision-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    padding: 40px 24px 32px 24px;
    background: radial-gradient(ellipse at 60% 80%, #f0f4ff 60%, #f8f1e5 100%);
    border-radius: 32px;
    box-shadow: 0 8px 32px rgba(80,80,120,0.10);
    margin-bottom: 24px;
    min-height: 480px;
}

.vision-title {
    color: #375d96;
    font-size: 2.2em;
    font-weight: bold;
    margin-bottom: 18px;
    letter-spacing: 1px;
    text-shadow: 0 2px 8px #eaf6ff;
}

.vision-desc {
    font-size: 1.15em;
    color: #222;
    margin-bottom: 22px;
    line-height: 1.7;
    font-family: 'Kanit', 'Itim', sans-serif;
}

.vision-leader {
    font-size: 1em;
    color: #555;
    margin-top: 12px;
    line-height: 1.6;
    font-style: italic;
}

@media (max-width: 991px) {
    .vision-block, .col-md-3.vision-img-block {
        min-height: 320px;
        padding: 18px 4px 14px 4px;
    }
    .col-md-3.vision-img-block img {
        max-height: 260px;
        padding: 4px;
    }
}

/* Vision row layout - ปรบ 3 สวนใหพอดและสวยงาม */
.vision-row {
    display: flex;
    gap: 32px;
    justify-content: space-between;
    align-items: stretch;
    margin-bottom: 36px;
    margin-top: 18px;
}

.vision-block {
    flex: 1.1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 44px 28px 36px 28px;
    background: linear-gradient(135deg, #eaf6ff 60%, #f8f1e5 100%);
    border-radius: 32px;
    box-shadow: 0 8px 32px rgba(80,80,120,0.10);
    min-width: 0;
    min-height: 480px;
    margin-right: 0;
}

.vision-img-block {
    flex: 0.9;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 32px;
    box-shadow: 0 4px 24px rgba(80,80,120,0.10);
    min-height: 480px;
    padding: 0;
    margin: 0;
}

.vision-img-block img {
    display: block;
    margin: 0 auto;
    max-width: 90%;
    max-height: 420px;
    border-radius: 32px;
    background: #fff;
    padding: 8px;
    box-shadow: 0 4px 24px rgba(80,80,120,0.10);
    object-fit: contain;
}

.vision-video-block {
    flex: 1.5;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(120deg, #f8f1e5 60%, #eaf6ff 100%);
    border-radius: 32px;
    box-shadow: 0 8px 32px rgba(80,80,120,0.10);
    min-height: 480px;
    padding: 32px 18px;
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.vision-video-block::before {
    content: "";
    position: absolute;
    top: -60px; left: -60px; width: 180px; height: 180px;
    background: radial-gradient(circle, #B335B2 0%, transparent 80%);
    opacity: 0.08;
    z-index: 1;
}

.vision-video-block::after {
    content: "";
    position: absolute;
    bottom: -60px; right: -60px; width: 180px; height: 180px;
    background: radial-gradient(circle, #375d96 0%, transparent 80%);
    opacity: 0.08;
    z-index: 1;
}

.vision-video-inner {
    position: relative;
    z-index: 2;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.vision-video-frame {
    border-radius: 18px;
    box-shadow: 0 4px 24px rgba(80,80,120,0.13);
    border: 4px solid #fff;
    width: 100%;
    max-width: 520px;
    aspect-ratio: 16/9;
    background: #000;
    transition: box-shadow 0.2s;
}

.vision-video-block:hover .vision-video-frame {
    box-shadow: 0 8px 32px rgba(80,80,120,0.18);
    border-color: #eaf6ff;
}

.vision-video-caption {
    margin-top: 18px;
    font-size: 1.1em;
    color: #375d96;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 8px #fff;
    background: rgba(255,255,255,0.7);
    border-radius: 12px;
    padding: 6px 18px;
    display: inline-block;
}

/* Vision responsive */
@media (max-width: 1200px) {
    .vision-row { 
        flex-direction: column; 
        gap: 20px; 
    }
    .vision-block, .vision-img-block, .vision-video-block { 
        min-height: 280px; 
    }
    .vision-video-block { 
        padding: 20px 15px; 
    }
    .vision-title {
        font-size: 1.8em;
    }
    .vision-desc {
        font-size: 1.05em;
    }
}

@media (max-width: 991px) {
    .vision-row { 
        flex-direction: column; 
        gap: 15px; 
    }
    .vision-block, .vision-img-block, .vision-video-block { 
        min-height: 250px;
        padding: 18px 15px;
    }
    .vision-title {
        font-size: 1.6em;
    }
    .vision-desc {
        font-size: 1em;
    }
    .vision-img-block img {
        max-height: 200px;
    }
    .vision-video-frame {
        max-width: 100%;
    }
}

@media (max-width: 767px) {
    .vision-row { 
        flex-direction: column; 
        gap: 15px; 
        margin: 20px 5px;
    }
    .vision-block, .vision-img-block, .vision-video-block { 
        min-height: unset;
        padding: 20px 15px;
        border-radius: 20px;
    }
    .vision-title {
        font-size: 1.4em;
        margin-bottom: 15px;
    }
    .vision-desc {
        font-size: 0.95em;
        line-height: 1.5;
    }
    .vision-leader {
        font-size: 0.9em;
    }
    .vision-img-block img {
        max-height: 180px;
        max-width: 85%;
    }
    .vision-video-frame {
        max-width: 100%;
        height: 180px;
    }
    .vision-video-caption {
        font-size: 0.95em;
        margin-top: 12px;
        padding: 8px 12px;
    }
}

/* Font Awesome icons */
i[class^="fa-"], i[class*=" fa-"] {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    font-style: normal;
}

/* Navbar responsive styles - ปรบเมนนำทางสำหรบมอถอ */
@media (max-width: 767px) {
    .navbar-header img {
        width: 280px !important;
        height: auto !important;
        padding: 5px !important;
    }
    
    .navbar-brand {
        padding: 8px 15px;
    }
    
    .navbar-toggle {
        margin-top: 12px;
        margin-bottom: 12px;
    }
    
    .navbar-collapse {
        border: none;
        box-shadow: none;
    }
    
    .navbar-disable div {
        font-size: 16px !important;
        padding: 10px 15px;
        background: #f8f9fa;
        margin: 5px 0;
        border-radius: 8px;
    }
    
    .navbar-disable ul li a {
        font-size: 15px !important;
        padding: 8px 15px !important;
        border-bottom: 1px solid #eee;
    }
}

/* Footer responsive styles - ปรบสวนทายเวบ */
.cmu-footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: #ecf0f1;
    padding: 40px 0 20px 0;
    margin-top: 50px;
}

.footer-title {
    color: #3498db;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 8px;
}

.footer-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-list li {
    margin-bottom: 10px;
}

.footer-list li a {
    color: #bdc3c7;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-list li a:hover {
    color: #3498db;
    text-decoration: none;
}

.footer-list li a i {
    margin-right: 8px;
    width: 16px;
    color: #95a5a6;
}

.footer-contact {
    color: #bdc3c7;
    font-size: 14px;
    line-height: 1.6;
}

.footer-contact i {
    color: #FFBE00;
    margin-right: 8px;
    width: 16px;
}

.footer-social {
    margin-top: 15px;
}

.social-icon {
    display: inline-block;
    width: 35px;
    height: 35px;
    background: #3498db;
    color: white;
    text-align: center;
    line-height: 35px;
    border-radius: 50%;
    margin-right: 10px;
    transition: background 0.3s ease;
}

.social-icon:hover {
    background: #2980b9;
    color: white;
    text-decoration: none;
}

.foots {
    margin-bottom: 30px;
}

@media (max-width: 991px) {
    .cmu-footer {
        padding: 30px 0 15px 0;
    }
    
    .foots {
        margin-bottom: 25px;
    }
    
    .footer-title {
        font-size: 16px;
        margin-bottom: 15px;
    }
    
    .footer-list li a {
        font-size: 13px;
    }
    
    .footer-contact {
        font-size: 13px;
    }
}

@media (max-width: 767px) {
    .cmu-footer {
        padding: 25px 0 15px 0;
        text-align: center;
    }
    
    .footer-title {
        font-size: 16px;
        text-align: center;
        margin-bottom: 15px;
    }
    
    .footer-list {
        text-align: center;
        margin-bottom: 20px;
    }
    
    .footer-list li {
        margin-bottom: 8px;
    }
    
    .footer-contact {
        text-align: center;
        font-size: 13px;
    }
    
    .footer-social {
        text-align: center;
        margin-top: 15px;
    }
    
    .social-icon {
        width: 40px;
        height: 40px;
        line-height: 40px;
        font-size: 16px;
    }
    
    .foots {
        margin-bottom: 30px;
    }
}

/* Banner/Slider responsive styles - ปรบแคจำเปน */
@media (max-width: 767px) {
    /* ซอนแบนเนอรทงหมดในมอถอ */
    .body-light,
    .bannercontainer,
    .bannershadow {
        display: none !important;
    }
    
    /* ซอน thumbs navigation ในมอถอเทานน */
    .kb-bullet-holder,
    .kb-thumb-holder {
        display: none !important;
    }
    
    /* ปรบขอความบนแบนเนอรใหอานงาย */
    .creative_layer {
        font-size: 12px !important;
    }
    
    .cp-right p {
        font-size: 11px !important;
        padding: 4px 8px !important;
        background: rgba(255,255,255,0.9) !important;
        border-radius: 6px !important;
        color: #333 !important;
    }
    
    .cp-right p a {
        color: #333 !important;
        text-decoration: none !important;
    }
}

/* Global responsive styles - เพม responsive styles ทวไป */
* {
    box-sizing: border-box;
}

body {
    overflow-x: hidden;
}

/* ปรบ container width ใหเหมาะสม */
@media (max-width: 1400px) {
    .container {
        max-width: 95vw !important;
    }
}

@media (max-width: 767px) {
    /* ปรบ typography สำหรบมอถอ */
    body {
        font-size: 14px;
        line-height: 1.6;
    }
    
    h1 { font-size: 24px !important; }
    h2 { font-size: 22px !important; }
    h3 { font-size: 20px !important; }
    h4 { font-size: 18px !important; }
    h5 { font-size: 16px !important; }
    
    /* ปรบ spacing */
    .row {
        margin-left: -5px !important;
        margin-right: -5px !important;
    }
    
    [class*="col-"] {
        padding-left: 5px !important;
        padding-right: 5px !important;
    }
    
    /* ปรบ table responsive */
    .table-responsive {
        border: none;
        margin-bottom: 0;
    }
    
    .table {
        margin-bottom: 0;
        font-size: 13px;
    }
    
    .table td {
        padding: 6px 4px;
        border-color: #ddd;
        word-wrap: break-word;
        max-width: 200px;
    }
    
    /* ปรบ alert boxes */
    .alert {
        margin: 10px 5px;
        padding: 8px 12px;
        font-size: 14px;
        border-radius: 12px;
    }
    
    /* ปรบ tab content spacing */
    .tab-content {
        padding: 15px 5px;
    }
    
    /* ปรบ buttons */
    .btn {
        font-size: 14px;
        padding: 8px 16px;
    }
}

/* Loading animation สำหรบ images */
img {
    transition: opacity 0.3s ease;
}

img:not([src]) {
    opacity: 0;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Modern button styles - ปมโมเดรน */
.btn-modern {
    background: linear-gradient(90deg, #375d96 0%, #B335B2 100%);
    color: #fff !important;
    border: none;
    border-radius: 24px;
    padding: 10px 28px;
    font-weight: 500;
    font-size: 16px;
    box-shadow: 0 2px 8px rgba(80,80,120,0.10);
    transition: background 0.2s, box-shadow 0.2s;
}

.btn-modern:hover {
    background: linear-gradient(90deg, #B335B2 0%, #375d96 100%);
    box-shadow: 0 4px 16px rgba(80,80,120,0.18);
    color: #fff !important;
}

/* Modern image frames - กรอบรปโคงมนและเงาสวยงาม */
.event-img, .banner-img, .related-img, .col-md-4 img, .col-md-3 img, .col-md-6 img, .col-md-12 img {
    border-radius: 18px !important;
    box-shadow: 0 4px 18px rgba(80,80,120,0.12);
    transition: box-shadow 0.2s, transform 0.2s;
    background: #fff;
    padding: 6px;
    margin-bottom: 12px;
}

.event-img:hover, .banner-img:hover, .related-img:hover, .col-md-4 img:hover, .col-md-3 img:hover, .col-md-6 img:hover, .col-md-12 img:hover {
    box-shadow: 0 8px 32px rgba(80,80,120,0.18);
    transform: scale(1.04);
    background: #f8f8ff;
}

/* Section backgrounds - ปรบพนหลง section ใหดนมนวล */
.row[style*="background: #f8f1e5;"], .row[style*="background-color:#EEEEEE"] {
    background: linear-gradient(135deg, #f8f1e5 60%, #f0f4ff 100%) !important;
    border-radius: 24px;
    padding-top: 24px;
    padding-bottom: 24px;
    margin-bottom: 24px;
}

/* Alert styles - ปรบปมดรายการทงหมดใหโคงมน */
.alert-info, .alert-warning {
    border-radius: 18px !important;
    box-shadow: 0 2px 8px rgba(80,80,120,0.08);
    font-size: 17px;
    background: #eaf6ff !important;
    color: #375d96 !important;
    border: none !important;
    transition: background 0.2s, color 0.2s;
}

.alert-info:hover, .alert-warning:hover {
    background: #d6eaff !important;
    color: #B335B2 !important;
}

/* Container width - ขยายความกวาง container หลก */
.container {
    max-width: 1400px !important;
    width: 95% !important;
}

@media (max-width: 1500px) {
    .container {
        max-width: 98vw !important;
    }
}

/* Mobile specific image handling - รปภาพขนาดเลกลงในจอมอถอ */
@media (max-width: 767px) {
    .event-img, .banner-img, .related-img, .col-md-4 img, .col-md-3 img, .col-md-6 img, .col-md-12 img {
        width: 98% !important;
        padding: 6px;
        margin-bottom: 10px;
        height: auto;
        min-height: 180px;
        max-height: 250px;
        object-fit: contain;
        object-position: center;
        background: #f8f9fa;
    }
    
    /* ปรบ layout สวน footer/bottom section ใหไมตกขอบ */
    .row .col-md-4 {
        margin-bottom: 25px;
        padding-left: 10px !important;
        padding-right: 10px !important;
        width: 100% !important;
        overflow: hidden;
    }
    
    /* ปรบ curriculum images */
    .col-md-6[align="center"] img {
        width: 100% !important;
        max-width: 350px;
        height: auto;
        margin-bottom: 20px;
        object-fit: contain;
    }
    
    /* ปรบ research section */
    .col-md-6[align="left"] h3 {
        font-size: 20px !important;
        margin-bottom: 15px;
    }
    
    .col-md-6[align="left"] p,
    .col-md-6[align="left"] ul {
        font-size: 14px;
        line-height: 1.6;
        padding: 0 10px;
    }
    
    /* ปรบ bottom section events/calendar/banner */
    .col-md-4 h4 {
        font-size: 16px !important;
        margin-bottom: 15px;
        text-align: center;
        padding: 0 10px;
    }
    
    /* ปรบ banner/event images ในสวนทาย ใหแสดง 2 รปตอคอลมน */
    .col-md-4 a {
        display: inline-block;
        width: 48% !important;
        margin: 1% !important;
        text-align: center;
        vertical-align: top;
    }
    
    .col-md-4 a img {
        width: 100% !important;
        margin: 0 !important;
        padding: 3px !important;
        min-height: 80px !important;
        max-height: 120px !important;
        object-fit: contain;
        object-position: center;
        background: #f8f9fa;
        border-radius: 6px !important;
        box-shadow: 0 1px 4px rgba(0,0,0,0.1) !important;
    }
    
    /* ปรบ container bottom section ใหไมลน */
    .row[style*="background: #f8f1e5"] .container,
    .row[style*="background-color:#EEEEEE"] .container {
        padding-left: 5px !important;
        padding-right: 5px !important;
        max-width: 100% !important;
        overflow: hidden;
    }
    
    /* ปรบปมดรายการทงหมด */
    .col-md-4 .alert {
        margin: 10px 5px !important;
        font-size: 14px !important;
        padding: 8px 12px !important;
        text-align: center;
        border-radius: 12px !important;
        width: calc(100% - 10px) !important;
    }
}

/* Tablet specific styles - ปรบ curriculum และ research สำหรบแทบเลต */
@media (min-width: 768px) and (max-width: 991px) {
    .col-md-6[align="center"] img {
        width: 90% !important;
        max-width: 400px;
    }
    
    .col-md-6[align="left"] h3 {
        font-size: 22px !important;
    }
    
    .col-md-6[align="left"] p,
    .col-md-6[align="left"] ul {
        font-size: 15px;
    }
    
    /* ปรบ bottom section ใน tablet */
    .col-md-4 h4 {
        font-size: 18px !important;
    }
}

/* Quick menu styles - เมนหวเวบใหมใช Font Awesome */
.row[style*="margin: 32px 0 24px 0; text-align: center;"] {
    margin: 32px 0 24px 0;
    text-align: center;
}

.row[style*="margin: 32px 0 24px 0; text-align: center;"] .col-md-2,
.row[style*="margin: 32px 0 24px 0; text-align: center;"] .col-xs-6 {
    width: 100% !important;
    float: none !important;
    display: block !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-bottom: 16px;
}

.row[style*="margin: 32px 0 24px 0; text-align: center;"] i {
    font-size: 64px;
    margin-bottom: 10px;
}

.row[style*="margin: 32px 0 24px 0; text-align: center;"] .col-md-2 div,
.row[style*="margin: 32px 0 24px 0; text-align: center;"] .col-xs-6 div {
    font-size: 22px;
    color: #555;
    margin-top: 10px;
}

.row[style*="margin: 32px 0 24px 0; text-align: center;"] .col-md-1,
.row[style*="margin: 32px 0 24px 0; text-align: center;"] .col-xs-3 {
    width: 50% !important;
    float: none !important;
    display: block !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-bottom: 16px;
}

/* Additional CSS styles from index.php */

		
		.style1 {
			color: #0080C0;
			font-weight: bold;
		}

		.style2 {
			color: #663399;
			font-weight: bold;
		}

		.style3 {
			font-size: 12px
		}

		.style4 {
			color: #FFCC00
		}
		.box-height {
    min-height: 260px; /* เน€เธเธดเนเธกเธเธงเธฒเธกเธชเธนเธ */
    margin-bottom: 20px;
    overflow: hidden;
    word-break: break-word;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    padding: 10px 5px;
    display: flex;
    flex-direction: row;
}
.font-news {
    font-size: 16px;
}
.news-title {
    display: -webkit-box;
    -webkit-line-clamp: 3; /* เธเธณเธเธฑเธ” 3 เธเธฃเธฃเธ—เธฑเธ” */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 72px; /* เธเธฃเธฑเธเธ•เธฒเธกเธเธเธฒเธ”เธเธญเธเธ•เน */
    max-height: 72px;
    line-height: 1.2em;
}
		
	

/* Mobile responsive theme */
@media (max-width: 767px) {
    .box-height {
        flex-direction: column;
        min-height: unset;
        padding: 15px 10px;
        margin-bottom: 16px;
        border-radius: 15px;
        box-shadow: 0 3px 12px rgba(0,0,0,0.1);
        background: #fff;
        width: 100% !important;
    }
    
    /* เธเธฃเธฑเธ columns เนเธซเนเน€เธ•เนเธกเธเธญ */
    .col-md-4, .col-md-5, .col-md-7, .col-md-6, .col-md-3, .col-md-12 {
        width: 100% !important;
        float: none !important;
        display: block !important;
        padding-left: 8px !important;
        padding-right: 8px !important;
        margin-bottom: 15px;
    }
    
    /* เธเธฃเธฑเธเธชเนเธงเธเธเนเธฒเธงเนเธซเนเน€เธ•เนเธกเธเธญ */
    .tab-content {
        margin: 0 -15px !important;
        padding: 0 5px !important;
    }
    
    .row {
        margin-left: -5px !important;
        margin-right: -5px !important;
        width: 100vw !important;
        margin-left: calc(50% - 50vw) !important;
        margin-right: calc(50% - 50vw) !important;
        padding: 0 10px !important;
    }
    
    .font-news {
        font-size: 15px;
    }
    .news-title {
        min-height: unset;
        max-height: unset;
        -webkit-line-clamp: 2;
        font-size: 16px;
        font-weight: 500;
        color: #2c3e50;
        line-height: 1.4;
    }
    
    /* เธเธฃเธฑเธเน€เธกเธเธน Tabs เนเธซเน responsive เธ”เธตเธเธถเนเธ */
    .nav-tabs {
        display: flex;
        flex-direction: column;
        border: none;
        gap: 8px;
        margin: 0 -10px 20px -10px;
        padding: 0 5px;
    }
    .nav-tabs>li {
        width: 100% !important;
        margin-bottom: 5px;
        border: none !important;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
    .nav-tabs>li>a {
        font-size: 14px !important;
        padding: 12px 8px !important;
        text-align: center;
        border: none !important;
        border-radius: 12px;
        background: #f8f9fa;
        color: #333;
        display: flex;
        flex-direction: column;
        align-items: center;
        min-height: 80px;
        justify-content: center;
    }
    .nav-tabs>li.active>a {
        background: linear-gradient(135deg, #375d96, #B335B2);
        color: white !important;
    }
    .nav-tabs>li>a i {
        font-size: 24px !important;
        margin-bottom: 5px;
    }
    .nav-tabs>li>a span {
        font-size: 12px !important;
        line-height: 1.2;
    }
    
    .img-responsive, img {
        max-width: 100%;
        height: auto;
    }
    .container, .container-fluid {
        padding-left: 5px !important;
        padding-right: 5px !important;
        max-width: 100vw !important;
    }
    table.table {
        font-size: 13px;
    }
    table.table td {
        padding: 8px 5px;
    }
    iframe {
        width: 100% !important;
        height: auto !important;
        min-height: 200px;
        aspect-ratio: 16/9;
    }
    h3, h4 {
        font-size: 18px !important;
        margin-bottom: 15px;
    }
    /* เธเธฃเธฑเธเธชเนเธงเธเธเธธเนเธกเธ”เธนเธฃเธฒเธขเธเธฒเธฃเธ—เธฑเนเธเธซเธกเธ” */
    .alert {
        font-size: 14px !important;
        padding: 10px !important;
        margin: 10px 0 !important;
        border-radius: 12px !important;
    }
}

/* Tablet responsive */
@media (min-width: 768px) and (max-width: 991px) {
    .nav-tabs>li {
        width: 16.66% !important;
        font-size: 14px;
    }
    .nav-tabs>li>a {
        font-size: 14px !important;
        padding: 8px 4px !important;
    }
    .nav-tabs>li>a i {
        font-size: 28px !important;
    }
    .nav-tabs>li>a span {
        font-size: 13px !important;
    }
    .container {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
}
/* เธเธฃเธฑเธเธเธเธฒเธ”เนเธฅเธฐเธเธฑเธ”เธ•เธณเนเธซเธเนเธเธฃเธนเธเนเธเธเธฅเนเธญเธเธเนเธฒเธง */
.col-md-5 img, .box-height .col-md-5 img {
    width: 100%;
    max-width: 160px;
    height: 180px;
    object-fit: contain;
    object-position: center;
    border-radius: 18px !important;
    box-shadow: 0 4px 18px rgba(80,80,120,0.12);
    background: #f8f9fa;
    padding: 6px;
    margin-bottom: 12px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}
@media (max-width: 991px) {
    .col-md-5 img, .box-height .col-md-5 img {
        max-width: 100%;
        height: 140px;
        object-fit: contain;
    }
}
@media (max-width: 767px) {
    .col-md-5 img, .box-height .col-md-5 img {
        max-width: 100% !important;
        width: 100% !important;
        height: 200px !important;
        margin: 15px auto !important;
        object-fit: cover !important;
        object-position: center !important;
        padding: 0 !important;
        border-radius: 12px !important;
        box-shadow: 0 4px 15px rgba(0,0,0,0.15) !important;
    }
}

/* เธเธฃเธฑเธเธเธเธฒเธ”เธเธฅเนเธญเธเธฃเธนเธเธ เธฒเธเนเธเธเนเธฒเธงเนเธซเนเนเธกเนเธฅเนเธ */
.box-height {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 15px;
    min-height: 180px;
    max-width: 100%;
    box-sizing: border-box;
}

.box-height .col-md-5 {
    flex: 0 0 220px;
    max-width: 220px;
    padding: 0 !important;
    margin: 0 !important;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow: hidden;
}

.box-height .col-md-5 img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    object-position: center;
    border-radius: 12px !important;
    box-shadow: 0 3px 12px rgba(80,80,120,0.10);
    background: #f8f9fa;
    padding: 4px;
    margin-bottom: 0;
    display: block;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.box-height .col-md-5 img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(80,80,120,0.20);
}
    box-sizing: border-box;
    max-width: 100%;
}

.box-height .col-md-7 {
    flex: 1 1 0;
    max-width: calc(100% - 240px);
    padding-left: 0 !important;
    padding-right: 0 !important;
    min-width: 0;
}

@media (max-width: 991px) {
    .box-height .col-md-5 {
        flex: 0 0 120px;
        max-width: 120px;
    }
    .box-height .col-md-5 img {
        height: 120px;
        object-fit: contain;
    }
    .box-height .col-md-7 {
        max-width: calc(100% - 120px);
    }
}
@media (max-width: 767px) {
    .box-height {
        flex-direction: column;
        gap: 0;
        min-height: unset;
        padding: 0;
        text-align: center;
        border: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    .box-height .col-md-5,
    .box-height .col-md-7 {
        max-width: 100%;
        width: 100% !important;
        flex: unset;
        padding: 0 !important;
        border: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
    }
    .box-height .col-md-5 {
        width: 100% !important;
        max-width: 100% !important;
    }
    .box-height .col-md-5 img {
        width: 100% !important;
        height: 250px !important;
        min-height: 250px !important;
        margin: 0 auto 15px auto !important;
        max-width: 100% !important;
        object-fit: cover !important;
        object-position: center !important;
        padding: 0 !important;
        display: block;
        border-radius: 12px !important;
        box-shadow: 0 4px 15px rgba(0,0,0,0.15) !important;
        border: none !important;
        transition: transform 0.3s ease;
        cursor: pointer;
    }
    
    .box-height .col-md-5 img:hover,
    .box-height .col-md-5 img:active,
    .box-height .col-md-5 img:focus {
        transform: scale(1.03);
    }
    .box-height .col-md-7 {
        text-align: center;
        padding: 0 5px !important;
        border: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
    }
}
.vision-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    padding: 40px 24px 32px 24px;
    background: radial-gradient(ellipse at 60% 80%, #f0f4ff 60%, #f8f1e5 100%);
    border-radius: 32px;
    box-shadow: 0 8px 32px rgba(80,80,120,0.10);
    margin-bottom: 24px;
    min-height: 480px;
}

.vision-title {
    color: #375d96;
    font-size: 2.2em;
    font-weight: bold;
    margin-bottom: 18px;
    letter-spacing: 1px;
    text-shadow: 0 2px 8px #eaf6ff;
}

.vision-desc {
    font-size: 1.15em;
    color: #222;
    margin-bottom: 22px;
    line-height: 1.7;
    font-family: 'Kanit', 'Itim', sans-serif;
}

.vision-leader {
    font-size: 1em;
    color: #555;
    margin-top: 12px;
    line-height: 1.6;
    font-style: italic;
}

@media (max-width: 991px) {
    .vision-block, .col-md-3.vision-img-block {
        min-height: 320px;
        padding: 18px 4px 14px 4px;
    }
    .col-md-3.vision-img-block img {
        max-height: 260px;
        padding: 4px;
    }
}
/* เธเธฃเธฑเธ 3 เธชเนเธงเธเนเธซเนเธเธญเธ”เธตเนเธฅเธฐเธชเธงเธขเธเธฒเธก */
.vision-row {
    display: flex;
    gap: 32px;
    justify-content: space-between;
    align-items: stretch;
    margin-bottom: 36px;
    margin-top: 18px;
}
.vision-block {
    flex: 1.1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 44px 28px 36px 28px;
    background: linear-gradient(135deg, #eaf6ff 60%, #f8f1e5 100%);
    border-radius: 32px;
    box-shadow: 0 8px 32px rgba(80,80,120,0.10);
    min-width: 0;
    min-height: 480px;
    margin-right: 0;
}
.vision-img-block {
    flex: 0.9;
    display: flex;
    align-items: center;      /* เน€เธ”เธดเธก align-items: flex-end; */
    justify-content: center;
    background: #fff;
    border-radius: 32px;
    box-shadow: 0 4px 24px rgba(80,80,120,0.10);
    min-height: 480px;
    padding: 0;
    margin: 0;
}
.vision-img-block img {
    display: block;
    margin: 0 auto;
    max-width: 90%;
    max-height: 420px;
    border-radius: 32px;
    background: #fff;
    padding: 8px;
    box-shadow: 0 4px 24px rgba(80,80,120,0.10);
    object-fit: contain;
}
.vision-video-block {
    flex: 1.5;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(120deg, #f8f1e5 60%, #eaf6ff 100%);
    border-radius: 32px;
    box-shadow: 0 8px 32px rgba(80,80,120,0.10);
    min-height: 480px;
    padding: 32px 18px;
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.2s;
}
.vision-video-block::before {
    content: "";
    position: absolute;
    top: -60px; left: -60px; width: 180px; height: 180px;
    background: radial-gradient(circle, #B335B2 0%, transparent 80%);
    opacity: 0.08;
    z-index: 1;
}
.vision-video-block::after {
    content: "";
    position: absolute;
    bottom: -60px; right: -60px; width: 180px; height: 180px;
    background: radial-gradient(circle, #375d96 0%, transparent 80%);
    opacity: 0.08;
    z-index: 1;
}
.vision-video-inner {
    position: relative;
    z-index: 2;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.vision-video-frame {
    border-radius: 18px;
    box-shadow: 0 4px 24px rgba(80,80,120,0.13);
    border: 4px solid #fff;
    width: 100%;
    max-width: 520px;
    aspect-ratio: 16/9;
    background: #000;
    transition: box-shadow 0.2s;
}
.vision-video-block:hover .vision-video-frame {
    box-shadow: 0 8px 32px rgba(80,80,120,0.18);
    border-color: #eaf6ff;
}
.vision-video-caption {
    margin-top: 18px;
    font-size: 1.1em;
    color: #375d96;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 8px #fff;
    background: rgba(255,255,255,0.7);
    border-radius: 12px;
    padding: 6px 18px;
    display: inline-block;
}

/* Responsive */
@media (max-width: 1200px) {
    .vision-row { 
        flex-direction: column; 
        gap: 20px; 
    }
    .vision-block, .vision-img-block, .vision-video-block { 
        min-height: 280px; 
    }
    .vision-video-block { 
        padding: 20px 15px; 
    }
    .vision-title {
        font-size: 1.8em;
    }
    .vision-desc {
        font-size: 1.05em;
    }
}
@media (max-width: 991px) {
    .vision-row { 
        flex-direction: column; 
        gap: 15px; 
    }
    .vision-block, .vision-img-block, .vision-video-block { 
        min-height: 250px;
        padding: 18px 15px;
    }
    .vision-title {
        font-size: 1.6em;
    }
    .vision-desc {
        font-size: 1em;
    }
    .vision-img-block img {
        max-height: 200px;
    }
    .vision-video-frame {
        max-width: 100%;
    }
}
@media (max-width: 767px) {
    .vision-row { 
        flex-direction: column; 
        gap: 15px; 
        margin: 20px 5px;
    }
    .vision-block, .vision-img-block, .vision-video-block { 
        min-height: unset;
        padding: 20px 15px;
        border-radius: 20px;
    }
    .vision-title {
        font-size: 1.4em;
        margin-bottom: 15px;
    }
    .vision-desc {
        font-size: 0.95em;
        line-height: 1.5;
    }
    .vision-leader {
        font-size: 0.9em;
    }
    .vision-img-block img {
        max-height: 180px;
        max-width: 85%;
    }
    .vision-video-frame {
        max-width: 100%;
        height: 180px;
    }
    .vision-video-caption {
        font-size: 0.95em;
        margin-top: 12px;
        padding: 8px 12px;
    }
}
i[class^="fa-"], i[class*=" fa-"] {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    font-style: normal;
}

/* Navbar responsive styles */
@media (max-width: 767px) {
    .navbar-header img {
        width: 280px !important;
        height: auto !important;
        padding: 5px !important;
    }
    
    .navbar-brand {
        padding: 8px 15px;
    }
    
    .navbar-toggle {
        margin-top: 12px;
        margin-bottom: 12px;
    }
    
    .navbar-collapse {
        border: none;
        box-shadow: none;
    }
    
    .navbar-disable div {
        font-size: 16px !important;
        padding: 10px 15px;
        background: #f8f9fa;
        margin: 5px 0;
        border-radius: 8px;
    }
    
    .navbar-disable ul li a {
        font-size: 15px !important;
        padding: 8px 15px !important;
        border-bottom: 1px solid #eee;
    }
}

/* Footer responsive styles */
.cmu-footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: #ecf0f1;
    padding: 40px 0 20px 0;
    margin-top: 50px;
}

.footer-title {
    color: #3498db;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 8px;
}

.footer-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-list li {
    margin-bottom: 10px;
}

.footer-list li a {
    color: #bdc3c7;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-list li a:hover {
    color: #3498db;
    text-decoration: none;
}

.footer-list li a i {
    margin-right: 8px;
    width: 16px;
    color: #95a5a6;
}

.footer-contact {
    color: #bdc3c7;
    font-size: 14px;
    line-height: 1.6;
}

.footer-contact i {
    color: #FFBE00;
    margin-right: 8px;
    width: 16px;
}

.footer-social {
    margin-top: 15px;
}

.social-icon {
    display: inline-block;
    width: 35px;
    height: 35px;
    background: #3498db;
    color: white;
    text-align: center;
    line-height: 35px;
    border-radius: 50%;
    margin-right: 10px;
    transition: background 0.3s ease;
}

.social-icon:hover {
    background: #2980b9;
    color: white;
    text-decoration: none;
}

.foots {
    margin-bottom: 30px;
}

@media (max-width: 991px) {
    .cmu-footer {
        padding: 30px 0 15px 0;
    }
    
    .foots {
        margin-bottom: 25px;
    }
    
    .footer-title {
        font-size: 16px;
        margin-bottom: 15px;
    }
    
    .footer-list li a {
        font-size: 13px;
    }
    
    .footer-contact {
        font-size: 13px;
    }
}

@media (max-width: 767px) {
    .cmu-footer {
        padding: 25px 0 15px 0;
        text-align: center;
    }
    
    .footer-title {
        font-size: 16px;
        text-align: center;
        margin-bottom: 15px;
    }
    
    .footer-list {
        text-align: center;
        margin-bottom: 20px;
    }
    
    .footer-list li {
        margin-bottom: 8px;
    }
    
    .footer-contact {
        text-align: center;
        font-size: 13px;
    }
    
    .footer-social {
        text-align: center;
        margin-top: 15px;
    }
    
    .social-icon {
        width: 40px;
        height: 40px;
        line-height: 40px;
        font-size: 16px;
    }
    
    .foots {
        margin-bottom: 30px;
    }
}

/* Banner/Slider responsive styles - เธเธฃเธฑเธเนเธเนเธเธณเน€เธเนเธ */
@media (max-width: 767px) {
    /* เธเนเธญเธเนเธเธเน€เธเธญเธฃเนเธ—เธฑเนเธเธซเธกเธ”เนเธเธกเธทเธญเธ–เธทเธญ */
    .body-light,
    .bannercontainer,
    .bannershadow {
        display: none !important;
    }
    
    /* เธเนเธญเธ thumbs navigation เนเธเธกเธทเธญเธ–เธทเธญเน€เธ—เนเธฒเธเธฑเนเธ */
    .kb-bullet-holder,
    .kb-thumb-holder {
        display: none !important;
    }
    
    /* เธเธฃเธฑเธเธเนเธญเธเธงเธฒเธกเธเธเนเธเธเน€เธเธญเธฃเนเนเธซเนเธญเนเธฒเธเธเนเธฒเธข */
    .creative_layer {
        font-size: 12px !important;
    }
    
    .cp-right p {
        font-size: 11px !important;
        padding: 4px 8px !important;
        background: rgba(255,255,255,0.9) !important;
        border-radius: 6px !important;
        color: #333 !important;
    }
    
    .cp-right p a {
        color: #333 !important;
        text-decoration: none !important;
    }
}

/* เน€เธเธดเนเธก responsive styles เธ—เธฑเนเธงเนเธ */
* {
    box-sizing: border-box;
}

body {
    overflow-x: hidden;
}

/* เธเธฃเธฑเธ container width เนเธซเนเน€เธซเธกเธฒเธฐเธชเธก */
@media (max-width: 1400px) {
    .container {
        max-width: 95vw !important;
    }
}

@media (max-width: 767px) {
    /* เธเธฃเธฑเธ typography เธชเธณเธซเธฃเธฑเธเธกเธทเธญเธ–เธทเธญ */
    body {
        font-size: 14px;
        line-height: 1.6;
    }
    
    h1 { font-size: 24px !important; }
    h2 { font-size: 22px !important; }
    h3 { font-size: 20px !important; }
    h4 { font-size: 18px !important; }
    h5 { font-size: 16px !important; }
    
    /* เธเธฃเธฑเธ spacing */
    .row {
        margin-left: -5px !important;
        margin-right: -5px !important;
    }
    
    [class*="col-"] {
        padding-left: 5px !important;
        padding-right: 5px !important;
    }
    
    /* เธเธฃเธฑเธ table responsive */
    .table-responsive {
        border: none;
        margin-bottom: 0;
    }
    
    .table {
        margin-bottom: 0;
        font-size: 13px;
    }
    
    .table td {
        padding: 6px 4px;
        border-color: #ddd;
        word-wrap: break-word;
        max-width: 200px;
    }
    
    /* เธเธฃเธฑเธ alert boxes */
    .alert {
        margin: 10px 5px;
        padding: 8px 12px;
        font-size: 14px;
        border-radius: 12px;
    }
    
    /* เธเธฃเธฑเธ tab content spacing */
    .tab-content {
        padding: 15px 5px;
    }
    
    /* เธเธฃเธฑเธ buttons */
    .btn {
        font-size: 14px;
        padding: 8px 16px;
    }
}

/* Loading animation เธชเธณเธซเธฃเธฑเธ images */
img {
    transition: opacity 0.3s ease;
}

img:not([src]) {
    opacity: 0;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}


/* Modern button and image styles */
.btn-modern {
    background: linear-gradient(90deg, #375d96 0%, #B335B2 100%);
    color: #fff !important;
    border: none;
    border-radius: 24px;
    padding: 10px 28px;
    font-weight: 500;
    font-size: 16px;
    box-shadow: 0 2px 8px rgba(80,80,120,0.10);
    transition: background 0.2s, box-shadow 0.2s;
}
.btn-modern:hover {
    background: linear-gradient(90deg, #B335B2 0%, #375d96 100%);
    box-shadow: 0 4px 16px rgba(80,80,120,0.18);
    color: #fff !important;
}

/* เธเธฃเธญเธเธฃเธนเธเนเธเนเธเธกเธเนเธฅเธฐเน€เธเธฒเธชเธงเธขเธเธฒเธก */
.event-img, .banner-img, .related-img, .col-md-4 img, .col-md-3 img, .col-md-6 img, .col-md-12 img {
    border-radius: 18px !important;
    box-shadow: 0 4px 18px rgba(80,80,120,0.12);
    transition: box-shadow 0.2s, transform 0.2s;
    background: #fff;
    padding: 6px;
    margin-bottom: 12px;
}

.event-img:hover, .banner-img:hover, .related-img:hover, .col-md-4 img:hover, .col-md-3 img:hover, .col-md-6 img:hover, .col-md-12 img:hover {
    box-shadow: 0 8px 32px rgba(80,80,120,0.18);
    transform: scale(1.04);
    background: #f8f8ff;
}

/* เธเธฃเธฑเธเธเธทเนเธเธซเธฅเธฑเธ section เนเธซเนเธ”เธนเธเธธเนเธกเธเธงเธฅ */
.row[style*="background: #f8f1e5;"], .row[style*="background-color:#EEEEEE"] {
    background: linear-gradient(135deg, #f8f1e5 60%, #f0f4ff 100%);
    border-radius: 24px;
    padding-top: 24px;
    padding-bottom: 24px;
    margin-bottom: 24px;
}

/* เธเธฃเธฑเธเธเธธเนเธกเธ”เธนเธฃเธฒเธขเธเธฒเธฃเธ—เธฑเนเธเธซเธกเธ”เนเธซเนเนเธเนเธเธกเธ */
.alert-info, .alert-warning {
    border-radius: 18px !important;
    box-shadow: 0 2px 8px rgba(80,80,120,0.08);
    font-size: 17px;
    background: #eaf6ff !important;
    color: #375d96 !important;
    border: none !important;
    transition: background 0.2s, color 0.2s;
}
.alert-info:hover, .alert-warning:hover {
    background: #d6eaff !important;
    color: #B335B2 !important;
}

/* Responsive: เธฃเธนเธเธ เธฒเธเธเธเธฒเธ”เน€เธฅเนเธเธฅเธเนเธเธเธญเธกเธทเธญเธ–เธทเธญ */
@media (max-width: 767px) {
    .event-img, .banner-img, .related-img, .col-md-4 img, .col-md-3 img, .col-md-6 img, .col-md-12 img {
        width: 98% !important;
        padding: 6px;
        margin-bottom: 10px;
        height: auto;
        min-height: 180px;
        max-height: 250px;
        object-fit: contain;
        object-position: center;
        background: #f8f9fa;
    }
    
    /* เธเธฃเธฑเธ layout เธชเนเธงเธ footer/bottom section เนเธซเนเนเธกเนเธ•เธเธเธญเธ */
    .row .col-md-4 {
        margin-bottom: 25px;
        padding-left: 10px !important;
        padding-right: 10px !important;
        width: 100% !important;
        overflow: hidden;
    }
    
    /* เธเธฃเธฑเธ curriculum images */
    .col-md-6[align="center"] img {
        width: 100% !important;
        max-width: 350px;
        height: auto;
        margin-bottom: 20px;
        object-fit: contain;
    }
    
    /* เธเธฃเธฑเธ research section */
    .col-md-6[align="left"] h3 {
        font-size: 20px !important;
        margin-bottom: 15px;
    }
    
    .col-md-6[align="left"] p,
    .col-md-6[align="left"] ul {
        font-size: 14px;
        line-height: 1.6;
        padding: 0 10px;
    }
    
    /* เธเธฃเธฑเธ bottom section events/calendar/banner */
    .col-md-4 h4 {
        font-size: 16px !important;
        margin-bottom: 15px;
        text-align: center;
        padding: 0 10px;
    }
    
    /* เธเธฃเธฑเธ banner/event images เนเธเธชเนเธงเธเธ—เนเธฒเธข เนเธซเนเนเธชเธ”เธ 2 เธฃเธนเธเธ•เนเธญเธเธญเธฅเธฑเธกเธเน */
    .col-md-4 a {
        display: inline-block;
        width: 48% !important;
        margin: 1% !important;
        text-align: center;
        vertical-align: top;
    }
    
    .col-md-4 a img {
        width: 100% !important;
        margin: 0 !important;
        padding: 3px !important;
        min-height: 80px !important;
        max-height: 120px !important;
        object-fit: contain;
        object-position: center;
        background: #f8f9fa;
        border-radius: 6px !important;
        box-shadow: 0 1px 4px rgba(0,0,0,0.1) !important;
    }
    
    /* เธเธฃเธฑเธ container bottom section เนเธซเนเนเธกเนเธฅเนเธ */
    .row[style*="background: #f8f1e5"] .container,
    .row[style*="background-color:#EEEEEE"] .container {
        padding-left: 5px !important;
        padding-right: 5px !important;
        max-width: 100% !important;
        overflow: hidden;
    }
    
    /* เธเธฃเธฑเธเธเธธเนเธกเธ”เธนเธฃเธฒเธขเธเธฒเธฃเธ—เธฑเนเธเธซเธกเธ” */
    .col-md-4 .alert {
        margin: 10px 5px !important;
        font-size: 14px !important;
        padding: 8px 12px !important;
        text-align: center;
        border-radius: 12px !important;
        width: calc(100% - 10px) !important;
    }
}

/* Tablet responsive เธชเธณเธซเธฃเธฑเธ curriculum เนเธฅเธฐ research */
@media (min-width: 768px) and (max-width: 991px) {
    .col-md-6[align="center"] img {
        width: 90% !important;
        max-width: 400px;
    }
    
    .col-md-6[align="left"] h3 {
        font-size: 22px !important;
    }
    
    .col-md-6[align="left"] p,
    .col-md-6[align="left"] ul {
        font-size: 15px;
    }
    
    /* เธเธฃเธฑเธ bottom section เนเธ tablet */
    .col-md-4 h4 {
        font-size: 18px !important;
    }
}

/* เธเธขเธฒเธขเธเธงเธฒเธกเธเธงเนเธฒเธ container เธซเธฅเธฑเธ */
.container {
    max-width: 1400px !important; /* เธซเธฃเธทเธญ 1500px เธ•เธฒเธกเธ•เนเธญเธเธเธฒเธฃ */
    width: 95% !important;
}
@media (max-width: 1500px) {
    .container {
        max-width: 98vw !important;
    }
}

/* เธ•เธฑเธงเธญเธขเนเธฒเธเนเธเนเธ”เน€เธกเธเธนเธซเธฑเธงเน€เธงเนเธเนเธซเธกเน เนเธเน Font Awesome */
.row[style*="margin: 32px 0 24px 0; text-align: center;"] {
    margin: 32px 0 24px 0;
    text-align: center;
}
.row[style*="margin: 32px 0 24px 0; text-align: center;"] .col-md-2,
.row[style*="margin: 32px 0 24px 0; text-align: center;"] .col-xs-6 {
    width: 100% !important;
    float: none !important;
    display: block !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-bottom: 16px;
}
.row[style*="margin: 32px 0 24px 0; text-align: center;"] i {
    font-size: 64px;
    margin-bottom: 10px;
}
.row[style*="margin: 32px 0 24px 0; text-align: center;"] .col-md-2 div,
.row[style*="margin: 32px 0 24px 0; text-align: center;"] .col-xs-6 div {
    font-size: 22px;
    color: #555;
    margin-top: 10px;
}
.row[style*="margin: 32px 0 24px 0; text-align: center;"] .col-md-1,
.row[style*="margin: 32px 0 24px 0; text-align: center;"] .col-xs-3 {
    width: 50% !important;
    float: none !important;
    display: block !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-bottom: 16px;
}

