@import url('https://fonts.googleapis.com/css2?family=Sarabun:wght@200&display=swap');

:root {}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    font-family: 'Sarabun', sans-serif;
}

body {
filter: grayscale(1);
}

/* ------------------------------------ navbar -------------------------------------------- */
.navbar {
    position: sticky;
    top: 0;
    z-index: 9999;
    display: flex;
    justify-content: space-around;
    align-items: center;
    background-color: #00102e;
    width: 100%;
}

.navbar-logo {
    color: #FFF;
    padding: 1em;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1em;
}


.navbar-logo h2 {
    width: fit-content;
}

.navbar-button {
    display: none;
    position: relative;
    width: 23px;
    height: 20px;
    border-top: 3px #FFF solid;
}

.navbar-button::before {
    position: absolute;
    content: '';
    top: 5px;
    left: 0px;
    width: 100%;
    border-top: 3px #FFF solid;
}

.navbar-button::after {
    position: absolute;
    content: '';
    top: 13px;
    left: 0px;
    width: 100%;
    border-top: 3px #FFF solid;
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 40px;
}

.navbar-menu li {
    list-style: none;
}

.navbar-menu li a {
    color: #FFF;
    text-decoration: none;
    font-size: 20px;
    letter-spacing: 2px;
    border-bottom: none;
}

.navbar-menu li a:hover {
    color: yellow;
    border-bottom: yellow solid 2px;
    transition: border 0.1s linear, color 0.5s linear;
}

.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    display: block;
    left: -20px;
    background-color: #0c2d6b;
    width: max-content;
    transform: translateY(-10px);
    transition: 0.1s linear;
    opacity: 0;
    visibility: hidden;
}

.dropdown-menu a {
    text-decoration: none;
    display: block;
    width: fit-content;
    margin: 0.5em;
    line-height: 1.5em;
}

.dropdown:hover .dropdown-menu {
    transform: translateY(0px);
    opacity: 1;
    visibility: visible;
}

@media screen and (max-width:990px) {
    .navbar {
        display: block;
    }

    .navbar-logo {
        justify-content: space-around;
        gap: 5px;
    }

    .navbar-button {
        display: block;
        cursor: pointer;
    }

    .navbar-menu {
        position: absolute;
        width: 100%;
        display: block;
        background-color: #0c2d6b;
        line-height: 2.5em;
        gap: 0;
        transform: translateY(-10px);
        opacity: 0;
        transition: all 0.2s ease-in;
        visibility: collapse;
    }

    .navbar-menu.active {
        transform: translateY(0px);
        opacity: 1;
        visibility: visible;
    }

    .navbar-menu li {
        padding: 0.5em 3em;
        margin-right: 0px;
    }

    .dropdown {
        position: static;
    }

    .dropdown-menu {
        padding: 0.5em 2em;
        visibility: visible;
        display: none;
        transform: none;
        opacity: 1;
    }

    .dropdown:hover .dropdown-menu {
        transform: none;
    }

    .dropdown-menu.active {
        left: 0;
        position: static;
        display: block;
        background-color: #00102e;
        line-height: 2.5em;
        width: 100%;
    }

}


/* ------------------------------------ about SBS -------------------------------------------- */
.bgimg {
    background-image: url('../image/SBS.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    width: 100%;
}

.about {
    padding: 30px;
    background-color: #00102ec0;
    display: flex;
    justify-content: center;
    align-items: end;
    gap: 50px;
    flex-wrap: wrap;
}

.about-video {}

.about-video-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    gap: 1em;
}

.about-video-logo img {
    max-width: 180px;
}

.about-video-logo>p {
    position: relative;
    color: #FFF;
    font-size: 26px;
    font-weight: 600;
    text-transform: uppercase;
    text-align: center;
}

.about-video-logo>p::after {
    content: 'สถาบันส่งเสริมงานสอบสวน';
    position: absolute;
    bottom: -35px;
    right: 0;
    color: yellow;
    font-size: 26px;
}

.about-video video {
    max-width: 700px;
    width: 100%;
}

.about-commander {}

.about-commander img {
    max-height: 500px;
    margin-bottom: 20px;
}

.about-commander h3 {
    /*          .   */
    color: yellow;
    letter-spacing: 0.5px;
}

.about-commander h1 {
    /*       ?     .     */
    color: #FFF;
    letter-spacing: 2px;
}

@media screen and (max-width:595px) {
    .about {
        padding: 1em 1em 1.5em 1em;
        gap: 2em;
    }

    .about-video-logo img {
        max-width: 130px;
        width: 100%;
    }

    .about-video-logo>p {
        font-size: 18px;
    }

    .about-video-logo>p::after {
        font-size: 14px;
        bottom: -25px;
        left: 0;
    }

    .about-commander h1 {
        /*          */
        font-size: 1.85em;
    }
}

/* ------------------------------------   information  -------------------------------------------- */
.information {
    padding: 2em;
    height: 100%;
    width: 100%;
    background-color: #00102e;
    /* background-color: #434750; */
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 0;
}

.information-logo {
    position: relative;
    margin: 0.5em 0 1em 0;
    font-size: 49px;
    font-weight: 900;
    color: #FFF;
    letter-spacing: 5px;
    transform: skewY(-5deg);
}

.information-logo::after {
    content: 'Information';
    position: absolute;
    right: 0;
    bottom: -26px;
    font-size: 24px;
    font-weight: bolder;
    text-transform: uppercase;
    color: #33a3ee;
}

.information-data {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 2em;
    width: 100%;
    height: 100%;
    transform: skewY(-5deg);
}

.information-data div {
    position: relative;
    padding: 0.5em 1em;
    background-color: #3e3f46;
    color: #FFF;
    font-size: 16px;
    font-weight: 500;
    text-transform: uppercase;
    max-width: 700px;
    width: 100%;
    z-index: var(--i);
    transition: 0.5s ease-in-out;
}

.information-data div a {
    color: #999;
    font-size: 24px;
    transition: 0.5s;
}

.information-data div::before {
    content: '';
    position: absolute;
    top: 0;
    left: -40px;
    width: 40px;
    height: 100%;
    background-image: url('../image/icon-infor.png');
    background-position: center;
    background-repeat: no-repeat;
    background-size: 30px;
    background-color: #2e3133;
    opacity: 0.9;
    transform: skewY(45deg);
    transform-origin: right;
    transition: 0.5s ease-in-out;
}

.information-data div::after {
    content: '';
    position: absolute;
    top: -40px;
    left: 0;
    width: 100%;
    height: 40px;
    background-color: #35383e;
    transform: skewX(45deg);
    transform-origin: bottom;
    transition: 0.5s ease-in-out;

}

.information-data div:hover {
    background-color: #33a3ee;
    color: #000;
    transform: translateX(-50px);
}

.information-data div:hover a {
    color: #FFF;
}

.information-data div:hover::before {
    background-color: #1f5378;
}

.information-data div:hover::after {
    background-color: #2982b9;
}

.btnmore {
    text-align: center;
    padding: 0.5em 1.5em;
    font-size: 18px;
    font-weight: 500;
    color: #FFF;
    background-color: #434750;
    border-radius: 10px;
}

.btnmore:hover {
    box-shadow: 0px 0px 15px #33a3ee;
}

.information-data2 {
    max-width: 1000px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 1.6em;
}

.information-data2 div {
    width: 100%;
    background-color: #fff;
    padding: 1em;
    box-shadow: 0px 0px 10px rgba(255, 255, 255, 0.755);
    border-radius: 5px;
    color: #2e3133;
    font-size: 14px;
    font-weight: 400;
}

.information-data2 div:hover {
    box-shadow: 0px 0px 20px rgba(255, 255, 255, 0.755);
}

.information-data2 div a {
    width: 100%;
    color: #000;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3em;
    border-bottom: 1px #999 solid;
}

@media screen and (max-width: 790px) {
    .information-data div {
        transform: translateX(25px);
    }
}

/* ------------------------------------   police activity -------------------------------------------- */
.activity {
    width: 100%;
    height: 100%;
    padding: 2em;
    background-color: #ffffff79;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.activity-icon {
    position: relative;
}
.activity-logo {
    width: max-content;
    margin: 1em 0px;
    font-size: 56px;
    font-weight: 900;
    letter-spacing: 7px;
    text-transform: uppercase;
}

.activity-logo1 {
    position: absolute;
    top: 35px;
    left: 50px;
    font-size: 25px;
    font-weight: 700;
    letter-spacing: 4px;
}

.activity-logo2 {
    position: absolute;
    bottom: 30px;
    right: 90px;
    font-size: 25px;
    font-weight: 700;
    letter-spacing: 4px;
}

.activity-data {
    margin: 0 1em 2em 1em;
    display: flex;
    justify-content: center;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 2em;
}

.activity-data-items {
    max-width: 400px;
    width: 100%;
    height: auto;
    background-color: #fff;
    overflow: hidden;
    /* box-shadow: 0 3rem 6rem rgba(0, 0, 0, .1); */
    transition: 0.2s;
}

.activity-data-items:hover {
    transform: translateY(-0.5%);
}

.activity-data-items img {
    width: 100%;
    background-color: #000;
    object-fit: cover;
    object-position: top center;
    margin-bottom: 0.8em;
    transition: 0.2s;
    aspect-ratio: 16 / 9;
}

.activity-data-items-topic {
    font-size: 16px;
    font-weight: 900;
    line-height: 1.5em;
    color: #000;
    margin-bottom: 0.8em;
}

.activity-data-items-date {
    font-size: 14px;
    font-weight: bold;
    color: #818181;
}

.activity-form {
    margin: 2em auto;
    padding: 0 2em;
    max-width: 1300px;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.activity-topic {
    color: #000;
    font-size: 26px;
    font-weight: 600;
    line-height: 1.5em;
    margin-bottom: 10px;
}

.activity-date {
    color: #999;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.2em;
    margin-bottom: 20px;
}

.activity-detail {
    color: #000000;
    font-size: 20px;
    font-weight: 500;
    line-height: 1.4em;
    margin-bottom: 20px;
}

.activity-img {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5em;
}

.activity-img img {
    background-color: #000;
    max-width: 400px;
    width: 100%;
    object-fit: cover;
    aspect-ratio: 16 / 9;
}

@media screen and (max-width:468px) {
    .activity-logo {
        font-size: 38px;
        letter-spacing: 2px;
    }

    .activity-logo1 {
        top: 15px;
        left: 0px;
        font-size: 20px;
        letter-spacing: 1px;
    }

    .activity-logo2 {
        bottom: 12px;
        right: 0px;
        font-size: 20px;
        letter-spacing: 1px;
    }
}

/* ------------------------------------  Pagination -------------------------------------------- */
.pagination {
    margin: 1em auto;
    display: flex;
}

.pagination a,
.pagination div {
    color: black;
    font-size: 18px;
    font-weight: 500;
    padding: 8px 16px;
    text-decoration: none;
    border: 1px solid #ddd;
    background-color: #fff;
}

.pagination a.active {
    background-color: #0c2d6b;
    color: white;
    pointer-events: none;
}

.pagination a:hover:not(.active) {
    background-color: #ddd;
}

.pagination a:first-child {
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
}

.pagination a:last-child {
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
}

/* ------------------------------------  E-learning -------------------------------------------- */
.elearning {
    width: 100%;
    height: 100%;
    padding: 2em;
    background-color: #00102e;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.elearning-icon {
    position: relative;
}

.elearning-logo {
    width: max-content;
    margin: 0.5em 0px 0.2em 0px;
    font-size: 60px;
    font-weight: 900;
    color: #FFF;
    letter-spacing: 7px;
    text-transform: uppercase;
}

.elearning-logo1 {
    position: absolute;
    width: max-content;
    top: 5px;
    left: 50%;
    transform: translate(-50%);
    font-size: 25px;
    font-weight: 700;
    color: #ff0000;
    letter-spacing: 4px;
}

.elearning-data {
    margin: 0 1em 2em 1em;
    display: flex;
    justify-content: center;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 2em;
}

.elearning-data-boxs {
    position: relative;
    width: 100%;
    max-width: 450px;
    background-color: #fff;
    border-radius: 20px;
    overflow: hidden;
    transition: 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.elearning-data-boxs::before {
   position: absolute;
   content: '';
   width: 650px;
   height: 650px;
   background-image: conic-gradient(transparent,#ff9939,transparent,#ff0000);
   animation: spinner 10s linear infinite;
 }

 @keyframes spinner
 {
    0%
    {
        transform: rotate(0deg);
    }
    100%
    {
        transform: rotate(360deg);
    }
 }

 .elearning-data-boxs-items {
    height: calc(100% - 10px);
    margin: 5px;
    background-color: #dfe2f9;
    border: #000000 2px solid;
    border-radius: 15px;
    z-index: 1;
    overflow: hidden;
    color: #000000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
 }

 .elearning-data-boxs-items img {
    width: 100%;
    background-color: #000000;
    object-fit: fill;
    object-position: top center;
    aspect-ratio: 16 / 9;
    margin-bottom: 0.8em;
    z-index: 2;
 }

.elearning-data-boxs-items-subject, .elearning-data-boxs-items-view,
.elearning-data-boxs-items-teacher {
    display: flex;
    justify-content: center;
    align-items: baseline;
    flex-wrap: wrap;
    width: 100%;
    padding: 0.5em;
    font-size: 18px;
    font-weight: 400;
    gap: 10px;
    text-align: center;
    line-height: 30px;
}

.elearning-data-boxs-items-view {
    font-size: 16px;
    font-weight: normal;
    margin-bottom: 0.5rem;
}

.elearning-data-boxs-items-teacher {
    font-size: 22px;
    border-top: #000000 2px solid;
}

.container-video {
    position: relative;
    width: 60vw;
    aspect-ratio: 16 / 9;
}

.container-video-start {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-size: cover;
    font-size: 7em;
    cursor: pointer;
    z-index: 10;
}

.container-video-start:hover {
    color: #fff;
}

.video-study {
    position: absolute;
    top: 0;
    left: 0; 
    width: 100%;
    z-index: 1;
}

@media screen and (max-width:580px) {
    .elearning-logo {
        font-size: 10vw;
        letter-spacing: 2px;
    }

    .elearning-logo1 {
        font-size: 4vw;
        letter-spacing: 1px;
    }

    .elearning-data-boxs-items-subject, .elearning-data-boxs-items-view,
    .elearning-data-boxs-items-teacher {
        font-size: 1.2em;
        padding: 5px;
    }
}

.btnmore , .btnstart {
    text-align: center;
    padding: 0.5em 1.5em;
    font-size: 18px;
    font-weight: 500;
    color: #FFF;
    background-color: #434750;
    border-radius: 10px;
}

.btnmore:hover , .btnstart:hover {
    box-shadow: 0px 0px 15px #33a3ee;
}

/* ------------------------------------ footer -------------------------------------------- */
footer {
    background-color: #003c70 !important;
    color: rgb(241, 241, 241);
    padding: 1em;
    margin-bottom: 0;
    font-size: 1em;
}

footer h2 {
    margin: 0.8em;
}

footer a,
footer p {
    font-size: 1em !important;
}

.grid-container {
    width: 100%;
    margin: 0px;
    display: grid;
    grid-template-columns: 1fr 1fr 1.5fr;
}

.grid-item1 {
    text-align: center;
    grid-column: 1;
}

.grid-item1-link {
    text-align: left;
    margin-left: 20%;
}

.grid-item1 a {
    padding: 3px 10px;
    text-decoration: none;
    color: #fff;
    letter-spacing: 1px;
    height: 2rem;
    width: max-content;
    display: flex;
    align-items: center;
}

.grid-item1 a:hover {
    background-color: #e6ecff;
    color: #000;
    font-weight: bold;
}

.grid-item2 {
    grid-column: 2;
    display: flex;
    flex-direction: column;
    justify-content: start;
    align-items: center;
}

.grid-item3 {
    grid-column: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.copyright {
    background-color: #333333;
    color: #fff;
    margin: 0;
    padding: 0 100px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.copyright h3 {
    margin: 0;
    padding: 10px 0;
    letter-spacing: 0.5px;
}

@media screen and (max-width: 1040px) {
    .grid-container {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .grid-item1-link {
        margin-left: 5%;
    }
}

@media screen and (max-width: 767px) {
    .grid-container {
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
    }

    .grid-item1 {
        width: 100%;
    }

    .grid-item1-link {
        display: flex;
        align-items: center;
        flex-direction: column;
        margin-left: 0;
        margin-bottom: 20px;
    }

    .grid-item2 {
        padding-bottom: 1.5em;
        width: 100%;
        background-color: #005fb3;
    }

    .grid-item3 {
        width: 100%;
    }

    .copyright {
        padding: 0 0.4em;
    }
}

.image-responsive {
    width: 100%;
    height: auto;
}

.container-content {
    margin: 0 auto;
    padding: 1em 0.5em;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.title {
    font-size: 26px;
    color: #fff;
    margin: 15px 20px;
    border-left: 10px solid #f3d303;
    padding: 10px 20px;
    background: #8b0000;
}

.tab {
    display: inline-block;
    margin-left: 40px;
}