* { 
    font-family: "Noto Sans Lao", sans-serif;
    font-optical-sizing: auto;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html{
    font-style: normal;
    margin: auto;
    width: 100%;
}
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
/* contract school */
.contract{
    display: flex;
    justify-content: start;
    position: relative;
    z-index: 10;
    background: rgb(5, 188, 188);
}
.contract img{
    padding-top: 0.1rem;
    border-radius: 100%;
    width: 2rem;
    margin: 0.5rem;
}

/* logo and menu */
/* logo */
nav{
    background: white;
    top: 0;
    left: 0;
    position: sticky;

    z-index: 1000;

    display: flex;
    padding: 0.5rem;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px -5px black ;
    z-index: 1000;
}
.logo{
    display:flex;
    align-items: center;
    padding-left: 0.5rem;
}
.logo h2{
    display: flex;
    justify-content: center;
    text-align: center;
    font-size: clamp(0.5rem,calc(5vh+1rem),1.2rem);
    padding: min(0.5em);
    margin: 0;
    line-height: 1.2;
}
.logo a img{
    display: block;
    border-radius: 100%;
    width: 100px;
}
/* menu */
.allmenu{
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 2rem;
    position: relative;
}
.menu{
    position: relative;
    margin-right: 2rem;
}
.menu-btn{
    font-size: 1.2rem;
    text-decoration: none;
    border: none;
    background: white;
    cursor: pointer;
    position: relative;
}
ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.dropdown{
    position: absolute;
    color: black;
    left: auto;
    margin: 0;
    border-top: 2px solid blue;
    width: 10rem;
    
    overflow-wrap: break-word;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.5s ease ;
    background:white;
}
.dropdown li{
    padding-top: 5px;
}
a{
    font-size: 1.2rem;
    color: black;
    text-decoration: none;
}
.menu:hover .dropdown{
    opacity: 1;
    transform: translateY(0);
}
.hamburger{
    display: none;
    font-size: 28px;
    cursor: pointer;
    padding: 10px;
    align-items: center;
}
.overlay{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: black;
    opacity: 0;
    pointer-events: none;
    transition:  0.3s;
}
.overlay.show{
    opacity: 0.3;
    pointer-events: auto;
}
@media(max-width:768px){
    .hamburger{
        display: block;
        padding: 1rem;
    }
    .allmenu{
        position: fixed;
        top: 0;
        right: -260px;
        width: 260px;
        height:100%;
        background: white;
        flex-direction: column;
        padding: 20px;
        transition: 0.3s;
        z-index: 10000;
        overflow-y:auto ;
    }

    /* open menu */
    .allmenu.show{
        right: 0;
    }
    
    .dropdown{
    position: relative;
    list-style: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3 ease;
    background: white;
    }

    
    #btn-active{
    color: black;
    padding-bottom: 0.1rem;
    border-bottom: none;
    }
    .dropdown.show{
        max-height: 300px;
        opacity: 1;
        transform: translateY(0);
    }
}
/* main */
/* detailnews */
main{
    display: flex;
    flex-direction: column;
    width: 100%;
    flex: 1;
}
.main-context{
    display: flex;
    justify-content: center;
    padding: 4rem ;
}
.main-context h1{
    border-bottom: 2px solid pink ;
}
/* ===== DETAIL CONTAINER (เหมือน event) ===== */
.detail-container {
    width: 90%;
    max-width: 960px;
    margin: 0 auto 3rem;
}

/* TITLE */
.title {
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
}

/* DATE */
.date {
    color: gray;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

/* IMAGE CARD */
.media-card {
    background: white;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    margin-bottom: 1.5rem;
}

.media-card img {
    width: 100%;
    display: block;
    object-fit: cover;
}

/* DESCRIPTION CARD (เหมือน event-desc) */
.desc-card {
    background: white;
    padding: 1.5rem;
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

/* FILE SECTION */
.file-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* FILE CARD */
.file-card {
    background: white;
    padding: 1rem;
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

/* DOWNLOAD BUTTON (เหมือน event button) */
.download-btn {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.45rem 1rem;
    background: rgb(5,188,188);
    color: white;
    border-radius: 999px;
    text-decoration: none;
}

.download-btn:hover {
    background: rgb(3,150,150);
}

/* FACEBOOK BUTTON */
.fb-btn {
    display: inline-block;
    padding: 0.45rem 1rem;
    background: #1877f2;
    color: white;
    border-radius: 999px;
    text-decoration: none;
}

.fb-btn:hover {
    background: #0d65d9;
}

/* BACK BUTTON */
.back-btn {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 0.5rem 1.2rem;
    background: #eee;
    border-radius: 999px;
    text-decoration: none;
}

.back-btn:hover {
    background: #ddd;
}
.news-files {
    margin-top: 1.5rem;
}

/* หัวข้อ */
.file-title {
    font-size: 1.1rem;
    font-weight: bold;
    border-left: 4px solid rgb(5,188,188);
    padding-left: 8px;
    margin-bottom: 1rem;
}

/* กล่องไฟล์ */
.file-item {
    background: white;
    padding: 1rem;
    border-radius: 12px;

    box-shadow: 0 3px 12px rgba(0,0,0,0.08);
    border: 1px solid #eee;
}

/* label */
.file-label {
    font-size: 0.85rem;
    color: gray;
    margin-bottom: 0.5rem;
}

/* PDF */
.file-viewer {
    border: 1px solid #eee;
    border-radius: 10px;
    margin-bottom: 0.8rem;
}

/* download */
.download-btn {
    display: inline-block;
    padding: 0.45rem 1rem;
    background: rgb(5,188,188);
    color: white;
    border-radius: 8px;
    text-decoration: none;
}

.download-btn:hover {
    background: rgb(3,150,150);
}
/* ===== FOOTER ===== */
.footer {
    background: #0a1628;
    color: #ccc;
    border-top: 4px solid rgb(5,188,188);
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 3rem 2rem;
    display: flex;
    gap: 3rem;
    flex-wrap: wrap;
    justify-content: space-between;
}

.footer-col {
    flex: 1;
    min-width: 200px;
}

.footer-logo-img {
    border-radius: 50%;
    width: 80px;
    display: block;
    margin-bottom: 0.8rem;
}

.footer-school-name {
    font-size: 1rem;
    font-weight: 700;
    color: white;
    line-height: 1.5;
    margin-bottom: 0.4rem;
}

.footer-slogan {
    font-size: 0.85rem;
    color: rgb(5,188,188);
    font-style: italic;
}

.footer-heading {
    font-size: 1rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid rgb(5,188,188);
    display: inline-block;
}

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

.footer-links li {
    padding: 0.3rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.footer-links a {
    color: #aaa;
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: rgb(5,188,188);
}

.footer-col p {
    font-size: 0.88rem;
    line-height: 1.8;
    color: #aaa;
}

.footer-social {
    display: flex;
    gap: 0.8rem;
    margin-top: 1rem;
}

.footer-social img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    transition: transform 0.2s;
}

.footer-social img:hover {
    transform: scale(1.15);
}

.footer-bottom {
    text-align: center;
    padding: 1rem 2rem;
    font-size: 0.78rem;
    color: #666;
    border-top: 1px solid rgba(255,255,255,0.08);
}

@media (max-width: 768px) {
    .footer-inner {
        flex-direction: column;
        gap: 2rem;
        padding: 2rem 1.5rem;
    }
    .footer-col { min-width: unset; }
}