@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wght@100..900&display=swap');

/* =================== GLOBAL =================== */
:root {
    --full-size: 1920px;
    --full-minisize: 1200px;
    --fit-height: 1080px;
    --bg_santa_main: #C00000;
    --santa_main: #4D3809;
    --santa_2main: #b20000;
}

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 auto;
    max-width: var(--full-size);
    font-family: "Noto Sans Thai", serif;
    background-color: #fff;
    overflow-x: hidden;
}

/* =================== BANNER =================== */
#banner {
    position: relative;
    width: var(--full-size);
    height: 400px;
    overflow: hidden;
}

#banner_moblie {
    display: none;
}

.banner-background video {
    width: 100%;
    height: 400px;
    object-fit: cover;
    filter: brightness(0.7);
}

.context_banner {
    width: 90%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    text-align: center;
}

#banner h1 {
    font-size: 48px;
    font-weight: bold;
    margin: 0;
}

#banner p {
    font-size: 22px;
    margin-top: 10px;
}

.container {
    width: var(--full-minisize);
}

/* =================== BLOG LIST =================== */
.blog-list {
    width: 100%;
    padding: 40px 20px;
    background-color: #f8f8f8;
}

.blog-list .container {
    max-width: 1000px;
    margin: 0 auto;
}

.blog-list h2 {
    font-size: 36px;
    margin-bottom: 30px;
    color: var(--santa_main);
    text-align: center;
}

.blog-list ul {
    list-style: none;
    padding: 0;
}

.blog-list li {
    background: #fff;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 10px;
    transition: 0.3s ease;
}

.blog-list li:hover {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
}

.blog-list a {
    display: block;
    text-decoration: none;
    padding: 20px;
    color: var(--santa_main);
}

.blog-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #333;
}

/* =================== BLOG DETAIL =================== */
.blog-container {
    width: var(--full-minisize);
    margin: 20px auto;
    padding: 0 20px;
}

.breadcrumb {
    font-size: 14px;
    padding: 15px 20px;
    background: #f5f5f5;
    color: #999;

}
.breadcrumb a {
    text-decoration: none;
    color: #b20000;
}

.blog-main-content {
    display: flex;
    gap: 30px;
}

.blog-left {
    flex: 3;
}

.blog-meta {
    font-size: 14px;
    color: #888;
    margin-bottom: 10px;
    line-height: 2;
}

.blog-meta .category_1 {
    background-color: var(--santa_2main);
    border-radius: 20px;
    padding: 5px 10px;
    color: #fff;
}

.main-image {
    width: 100%;
    height: 500px;
    border-radius: 8px;
    margin: 20px 0;
}

.blog-sub-box {
    background: #fff;
    padding: 20px;
    margin-bottom: 30px;
    border-left: 4px solid #00b894;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    border-radius: 6px;
}

.blog-sub-box h2 {
    font-size: 20px;
    color: #333;
    margin-bottom: 10px;
}

.sub-image {
    width: 100%;
    height: 500px;
    margin: 10px 0;
    border-radius: 6px;
}

.sub-content {
    font-size: 16px;
    line-height: 1.6;
}

/* =================== SIDEBAR =================== */
.blog-sidebar {
    flex: 1;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    height: fit-content;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

.sidebar-section h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #2d3436;
}

.sidebar-section ul {
    list-style: none;
    padding-left: 0;
}

.sidebar-section ul li {
    margin-bottom: 10px;
}

.sidebar-section ul li a {
    color: #00b894;
    text-decoration: none;
    font-size: 15px;
}

/* =================== FEATURED GRID =================== */
.featured-blogs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: 280px 280px;
    gap: 16px;
    margin-bottom: 20px;
}

.blog-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.blog-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.blog-item .info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 10px;
    box-sizing: border-box;
}

.blog-item.large {
    grid-column: 1 / 2;
    grid-row: 1 / span 2;
    width: 500px;
}

.blog-item.medium {
    grid-column: 2 / 4;
    grid-row: 1 / 2;
}

.blog-item.small {
    grid-row: 2 / 3;
    height: 100%;
}

.blog-item.small:nth-child(3) {
    grid-column: 2 / 3;
}

.blog-item.small:nth-child(4) {
    grid-column: 3 / 4;
}

/* =================== CATEGORY GRID =================== */
.category-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 16px;
    width: 100%;
    margin: auto;
    justify-items: start;
}

.blog-card img {
    width: 400px;
    height: 260px;
    object-fit: cover;
    border-radius: 6px;
}

.blog-card h4 {
    margin-top: 10px;
    font-size: 16px;
}

.more-link {
    text-align: right;
    margin-top: 8px;
}

.more-link a {
    color: var(--santa_2main);
    text-decoration: none;
}

.sub-featured a {
    width: 100%;
}

.section-title {
    color: var(--bg_santa_main);
}

/* =================== CUSTOM GRID =================== */
.custom-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: repeat(2, auto);
    gap: 15px;
}

.blog-card {
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease;
}

.blog-card:hover {
    transform: translateY(-4px);
}

.image-wrapper {
    width: 100%;
    height: 0;
    padding-top: 56.25%;
    position: relative;
    background-color: #ccc;
}

.image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 8px;
}

/* .info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 12px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0) 60%);
    color: #fff;
    box-sizing: border-box;
    border-radius: 0 0 8px 8px;
} */

.info .category {
    font-size: 0.8rem;
    margin: 0;
    opacity: 0.85;
    border-radius: 20px;
    background-color: var(--santa_2main);
    padding: 5px 10px;
    width: 80px;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
}

.info .title {
    font-size: 1rem;
    font-weight: bold;
    margin: 4px 0 0 0;
}


/* Custom positioning */
.blog-1 {
    grid-column: 1;
    grid-row: 1 / span 2;
}

.blog-2 {
    grid-column: 2;
    grid-row: 1;
}

.blog-3 {
    grid-column: 3;
    grid-row: 1;
}

.blog-4 {
    grid-column: 2;
    grid-row: 2;
}

.blog-5 {
    grid-column: 3;
    grid-row: 2;
}

.blog-card blog-1 a {
    height: 475px;
}

.more-link {
    margin-top: 16px;
    text-align: right;
}

.more-link a {
    color: #009688;
    text-decoration: none;
    font-weight: 500;
}

hr {
    background-color: var(--bg_santa_main);
    height: 1px;
    border: none;
}

/*---------*/
#choice {
    background-color: #eee;
    padding: 30px 20px;
    display: flex;
    justify-content: center;
    border-radius: 10px;
    flex-direction: column;
    width: var(--full-size);
    align-items: center;
}

.row_choice {
    width: var(--full-minisize);
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 1rem;
}

.con_row_choice {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
}

.con_row_choice a {
    text-decoration: none;
    font-weight: 600;
}

.header_choice {
    font-size: 24px;
    font-weight: 600;
}

.category-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    width: 120px;
    transition: transform 0.2s ease;
}

.category-box:hover {
    transform: scale(1.05);
}

.category-box img {
    width: 120px;
    height: 120px;
    border-radius: 16px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 8px;
    object-fit: cover;
}

.category-box p {
    font-size: 14px;
    color: #333;
    text-align: center;
    margin: 0;
}

.con_link {
    display: flex;
    justify-content: flex-start;
    width: var(--full-minisize);
}

.text_con_link {
    color: #BABABA;
    font-weight: 600;
}

.text_con_link_active {
    color: var(--bg_santa_main);
    font-weight: 600;
}
.con_link a {
    text-decoration: none;
}
/*-----------*/
.sidebar-section {
    padding: 1rem;
    background-color: #fff;
    border-radius: 10px;
}

.sidebar-section h3 {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

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

.latest-post-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.latest-post-item img {
    width: 100px;
    height: 60px;
    object-fit: cover;
    border-radius: 10px;
    margin-right: 10px;
    background-color: #ddd;
}

.latest-post-item p {
    font-size: 0.95rem;
    color: #333;
    margin: 0;
    line-height: 1.3;
}

.latest-post-item a {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-evenly;
}

.desktop-only {
    display: block;
}

.mobile-only {
    display: none;
}

.share_button {
    padding: 5px 10px;
    background: #3b5998;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
    border: none;
    cursor: pointer;
    border-radius: 5px;
}

.share_button img {
    width: 20px;
    height: 20px;
}

@media (min-width:1101px) and (max-width: 1919px) {
    #banner {
        width: 100%;
    }

    .container {
        width: 90%;
    }

    .blog-container {
        width: 90%;
    }
}

@media (max-width:1100px) {

    #section1 {
        width: 100%;
    }

    #section1 {
        height: auto;
    }

    #banner {
        width: 100%;

        display: none;
    }

    #banner_moblie {
        width: 100%;
        height: auto;
        display: block;
        position: relative;
        overflow: hidden;
    }

    .context_banner h1 {
        font-size: 20px;
    }

    .context_banner p {
        font-size: 14px;
    }

    .context_banner {
        top: 65%;
    }

    .banner-background img {
        width: 100%;
        height: 220px;
        object-fit: cover;
    }

    .con_link {
        width: 95%;
    }

    .con_link p {
        font-size: 14px;
        text-align: start;
    }

    .blog-list h2 {
        font-size: 28px;
    }


    .desktop-only {
        display: none;
    }

    .mobile-only {
        display: block;
    }

    .share_button {
        padding: 5px 10px;
    }

    .share_button img {
        width: 10px;
        height: 10px;
    }

    .container {
        width: 90%;
        height: auto;
        margin-bottom: 20px;
    }

    .blog-slider {
        position: relative;
        overflow: hidden;
        max-width: 100%;
    }

    .slider-track {
        display: flex;
        transition: transform 0.3s ease;
    }

    .slide {
        flex: 0 0 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 0 10px;
    }

    .blog-card {
        background: #fff;
        border-radius: 10px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        overflow: hidden;
    }

    .image-container {
        position: relative;
        width: 100%;
        height: auto;
    }

    .image-container img {
        width: 100%;
        height: auto;
        display: block;
        border-radius: 10px;
    }

    .info {
        padding: 1rem;
    }

    .nav {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        background: var(--bg_santa_main);
        color: #fff;
        border: none;
        font-size: 16px;
        padding: 10px 10px;
        cursor: pointer;
        z-index: 10;
        border-radius: 20%;
    }

    .prev {
        left: 0;
    }

    .next {
        right: 0;
    }

    .con_text {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        padding: 12px;
        background: linear-gradient(to top, rgba(0, 0, 0, 1), transparent 100%);
        color: #fff;
        box-sizing: border-box;
        border-radius: 0 0 10px 10px;
    }

    .con_text .category {
        font-size: 0.8rem;
        margin: 0;
        /* opacity: 0.85; */
        border-radius: 20px;
        background-color: var(--santa_2main);
        color: #fff;
        padding: 5px 10px;
        width: 80px;
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
    }

    .con_text .title {
        font-size: 1.1rem;
        margin: 5px 0px;
        color: #fff;
        text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
    }

    .blog-card a {
        text-decoration: none;
    }

    #choice {
        width: 90%;
    }

    .row_choice {
        width: 100%;
        display: flex;
        flex-direction: row;
        justify-content: space-evenly;
    }

    .con_row_choice {
        width: 50%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .category-box img {
        width: 100%;
    }

    .category-box {
        width: 160px;
    }

    .custom-grid {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        /* ระยะห่างระหว่างแต่ละ blog card */
        width: 100%;
    }

    .blog-card {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
    }

    .blog-card:hover {
        transform: scale(1.03);
    }

    .image-wrapper {
        width: 100%;
        position: relative;
    }

    .image-wrapper img {
        width: 100%;
        border-radius: 6px;
        height: auto;
    }

    .info {
        padding: 12px;
        text-align: center;
        display: none;
    }

    .category {
        font-size: 0.9rem;
        color: #888;
    }

    .title {
        font-size: 1.2rem;
        font-weight: 600;
        color: #333;
        margin-top: 10px;
    }

    .more-link a {
        color: var(--santa_2main);
        font-weight: 600;
        text-decoration: none;
    }

    .more-link a:hover {
        text-decoration: underline;
    }

    /*--------------------*/
    .blog-container {
        width: 90%;
        margin: 20px 0px;
        padding: 0px;
    }

    .breadcrumb {
        font-size: 12px;
        padding: 10px 10px;
        background: #f5f5f5;
        color: #999;
    }

    .blog-main-content {
        display: flex;
        gap: 10px;
        flex-direction: column;
    }

    .latest-post-item {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .latest-post-item a {
        display: flex;
        flex-direction: column;
        justify-content: space-evenly;
        gap: 1rem;
        align-items: flex-start;
    }

    .latest-post-item img {
        width: 100%;
        height: 150px;
    }

    .category-grid {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, 3fr);
        gap: 5px;
        list-style: none;
        padding-left: 0;
        justify-items: start;
    }

    .category-grid li {
        text-align: center;
        padding: 8px;
        border-radius: 5px;
    }

    .category-grid li a {
        text-decoration: none;
        color: #333;
        font-weight: 500;
        display: block;
    }

    .blog-intro p {
        font-size: 16px;
    }

    .blog-sub-box h2 {
        font-size: 18px;
    }

    .sub-image {
        width: 100%;
        height: auto;
        object-fit: scale-down;
    }

    .sidebar-section h3 {
        font-size: 18px;
    }

    .blog-sub-box {
        padding: 10px;
        margin-bottom: 10px;
    }

    .sub-content {
        display: flex;
        justify-content: center;
        margin-top: 1rem;
        flex-direction: column;
    }

    .sub-content p {
        width: 90%;
        margin: 0 auto;
        text-align: start;
        font-size: 0.9rem;
        line-height: 1.5;
    }

    .sub-content a {
        word-break: break-all;
        /* ทำให้ URL แบ่งบรรทัดได้ */
        color: #007bff;
        text-decoration: none;
    }

    .sub-content a:hover {
        text-decoration: underline;
    }

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

}