/* ========================================
   Watchsite Theme - Main Styles
   Based on blog_watch_site_html design
   ======================================== */

@import 'variables.css';

/* ==================== Reset =====.l-container=============== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 14px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--ws-font);
    color: var(--ws-text);
    background-color: var(--ws-bg);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a {
    color: #000;
    text-decoration: none;
    transition: color var(--ws-transition);
}

a:hover {
    color: var(--ws-accent);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
}

/* ==================== Layout ==================== */
.l-container {
    max-width: var(--ws-container-max);
    margin: 0 auto;
    /*padding: 0 16px;*/
}

.l-main {
    min-height: 60vh;
    padding-top: var(--ws-header-height);
}

/* ==================== Header ==================== */
.l-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--ws-header-bg);
    height: var(--ws-header-height);
    box-shadow: 0 2px 4px #102a4363;
}

.l-header__inner {
    display: flex;
    align-items: center;
    height: 100%;
    max-width: var(--ws-container-max);
    margin: 0 auto;
    /*padding: 0 16px;*/
    gap: 16px;
}

.l-header__logo {
    flex-shrink: 0;
}

.l-header__logoImg {
    height: 36px;
    width: auto;
}

.l-header__right {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

/* ==================== Global Navigation ==================== */
.c-gnav {
    flex: 1;
}

.c-gnav__list {
    display: flex;
    align-items: center;
    gap: 4px;
}

.c-gnav__link {
    display: block;
    padding: 8px 12px;
    color: #333;
    font-size: 15px;
    font-weight: 500;
    border-radius: var(--ws-radius);
    transition: background var(--ws-transition);
    white-space: nowrap;
}

.c-gnav__link:hover,
.c-gnav__link.-active {
    background: rgb(163 163 163 / 20%);
    color: #102A43;
}

/* ==================== Language Selector ==================== */
.c-langSelector {
    position: relative;
}

.c-langSelector__btn {
    background: rgb(163 163 163 / 20%);
    border: 1px solid rgba(255,255,255,0.3);
    color: #333;
    padding: 6px 10px;
    border-radius: var(--ws-radius);
    cursor: pointer;
    font-size: 12px;
    transition: background var(--ws-transition);
}

.c-langSelector__btn:hover {
    background: rgb(175 172 172 / 50%);
}

.c-langSelector__dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: var(--ws-bg-white);
    border: 1px solid var(--ws-border);
    border-radius: var(--ws-radius);
    box-shadow: var(--ws-shadow);
    min-width: 120px;
    z-index: 100;
}

.c-langSelector.is-open .c-langSelector__dropdown {
    display: block;
}

.c-langSelector__link {
    display: block;
    padding: 8px 12px;
    color: var(--ws-text);
    font-size: 14px;
    transition: background var(--ws-transition);
}

.c-langSelector__link:hover {
    background: var(--ws-bg);
}

/* ==================== Mobile Menu Button ==================== */
.l-header__spMenuBtn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}

.l-header__spMenuBtn span {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: var(--ws-transition);
}

/* ==================== Mobile Menu ==================== */
.p-spMenu {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100vh;
    background: var(--ws-bg-white);
    z-index: 1100;
    transition: right 0.3s ease;
    overflow-y: auto;
    box-shadow: -4px 0 16px rgba(0,0,0,0.2);
}

.p-spMenu.is-open {
    right: 0;
}

.p-spMenu__inner {
    padding: 16px;
}

.p-spMenu__close {
    display: block;
    margin-left: auto;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    color: var(--ws-text);
}

.p-spMenu__list {
    margin-top: 16px;
}

.p-spMenu__item {
    border-bottom: 1px solid var(--ws-border);
}

.p-spMenu__link {
    display: block;
    padding: 14px 8px;
    color: var(--ws-text);
    font-size: 14px;
}

.p-spMenu__link:hover {
    color: var(--ws-accent);
}

.p-spMenu__overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1050;
}

.p-spMenu__overlay.is-open {
    display: block;
}

/* ==================== Widget Title ==================== */
.c-widget__title {
    font-size: 16px;
    font-weight: 700;
    padding: 10px 14px;
    margin-bottom: 16px;
    border-radius: var(--ws-radius);
}

.c-widget__title.-home {
    background: var(--ws-primary);
    color: #fff;
    font-size: 18px;
}

.c-widget__title.-main {
    background: var(--ws-primary);
    color: #fff;
    font-size: 18px;
}

.c-widget__title.-side {
    background: var(--ws-primary);
    color: #fff;
    font-size: 16px;
}

/* ==================== Button Green ==================== */
.button-green {
    display: inline-block;
    background: var(--ws-green);
    color: #fff;
    font-size: 14px;
    padding: 2px 8px;
    border-radius: var(--ws-radius);
    font-weight: 600;
    line-height: 1.6;
}

/* ==================== Post Times ==================== */
.c-postTimes {
    color: var(--ws-text-light);
    font-size: 14px;
}

/* ==================== Post List ==================== */
.p-postList {
    list-style: none;
}

/* Card type - 3 columns */
.p-postList.-type-card.p-postList.-pc-col3,
.p-postList.-type-card.-pc-col3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.p-postList.-type-card .p-postList__article {
    background: var(--ws-bg-white);
    border-radius: var(--ws-radius-md);
    overflow: hidden;
    box-shadow: var(--ws-shadow);
    transition: box-shadow var(--ws-transition), transform var(--ws-transition);
    height: 100%;
}

.p-postList.-type-card .p-postList__article:hover {
    box-shadow: var(--ws-shadow-hover);
    transform: translateY(-2px);
}

.p-postList.-type-card .p-postList__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    /*color: var(--ws-text);*/
}

.p-postList.-type-card .p-postList__thumb {
    overflow: hidden;
    aspect-ratio: 16/9;
}

.p-postList.-type-card .p-postList__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.p-postList.-type-card .p-postList__article:hover .p-postList__thumb img {
    transform: scale(1.05);
}

.p-postList.-type-card .p-postList__body {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.p-postList.-type-card .p-postList__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
a:hover .p-postList.-type-card .p-postList__title {
    color: var(--ws-accent) !important;
}

.p-postList.-type-card .p-postList__link:hover .p-postList.-type-card .p-postList__title{
    color: var(--ws-accent) !important;
}

.p-postList.-type-card .p-postList__summary {
    color: var(--ws-text-light);
}

.p-postList.-type-card .p-postList__title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
    /*color: var(--ws-text);*/
    flex: 1;
}

/* List type - horizontal */
.p-postList.-type-list .p-postList__item {
    border-bottom: 1px solid var(--ws-border);
    padding: 10px 0;
}

.p-postList.-type-list .p-postList__item:last-child {
    border-bottom: none;
}

.p-postList.-type-list .p-postList__link {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    /*color: var(--ws-text);*/
}

.p-postList.-type-list .p-postList__thumb.-small {
    flex-shrink: 0;
    width: 70px;
    height: 70px;
    overflow: hidden;
    border-radius: var(--ws-radius);
}

.p-postList.-type-list .p-postList__thumb.-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
a:hover .p-postList.-type-list .p-postList__title.-small{
    color: var(--ws-accent);
}

.p-postList.-type-list .p-postList__title.-small {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 4px;
    /*color: var(--ws-text);*/
}

/* Simple type */
.p-postList.-type-simple .p-postList__item {
    border-bottom: 1px solid var(--ws-border);
    padding: 10px 0;
}

.p-postList.-type-simple .p-postList__item:last-child {
    border-bottom: none;
}

.p-postList.-type-simple .p-postList__link.-simple {
    display: flex;
    flex-direction: column;
    gap: 4px;
    /*color: var(--ws-text);*/
}

.p-postList.-type-simple .p-postList__title.-simple {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
    /*color: var(--ws-text);*/
}

/* ==================== Breadcrumb ==================== */
.c-breadcrumb {
    padding: 10px 0;
}

.c-breadcrumb__list {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    font-size: 14px;
    color: var(--ws-text-light);
}

.c-breadcrumb__item a {
    color: var(--ws-accent);
}
.c-breadcrumb__item a:hover {
    text-decoration: underline;
}

.c-breadcrumb__item + .c-breadcrumb__item::before {
    content: '›';
    color: var(--ws-text-light);
}

/* ==================== Sidebar ==================== */
.l-sidebar {
    width: var(--ws-sidebar-width);
    flex-shrink: 0;
}

.c-widget {
    background: var(--ws-bg-white);
    border-radius: var(--ws-radius-md);
    padding: 16px;
    margin-bottom: 24px;
    box-shadow: var(--ws-shadow);
}

/* ==================== Pagination ==================== */
.pagination-wrapper {
    margin-top: 32px;
    padding: 16px 0;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--ws-radius);
    font-size: 14px;
    border: 1px solid var(--ws-border);
    background: var(--ws-bg-white);
    color: var(--ws-text);
    transition: background var(--ws-transition), color var(--ws-transition);
    cursor: pointer;
}

.pagination a:hover {
    background: var(--ws-accent);
    color: #fff;
    border-color: var(--ws-accent);
}

.pagination .active {
    background: var(--ws-accent);
    color: #fff;
    border-color: var(--ws-accent);
    cursor: default;
}

.pagination .disabled {
    color: var(--ws-text-light);
    cursor: not-allowed;
    background: var(--ws-bg);
}

.pagination .page-nav {
    font-size: 18px;
}

.pagination .ellipsis {
    border: none;
    background: none;
    cursor: default;
    width: auto;
}

/* ==================== Page Top Button ==================== */
.c-pageTop {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: #203244;
    color: #fff;
    border: none;
    border-radius: var(--ws-radius);
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--ws-transition), visibility var(--ws-transition);
    z-index: 900;
}

.c-pageTop.is-show {
    opacity: 1;
    visibility: visible;
}

.c-pageTop:hover {
    background: #07284c;
}

/* ==================== Footer ==================== */
.l-footer {
    background: var(--ws-primary);
    color: #ccc;
    /*margin-top: 48px;*/
    padding: 32px 0 16px;
}

.l-footer__inner {
    max-width: var(--ws-container-max);
    margin: 0 auto;
    /*padding: 0 16px;*/
}

.l-footer__logo {
    margin-bottom: 20px;
}

.l-footer__logo a {
    color: #fff;
    font-size: 18px;
    font-weight: 700;
}

.l-footer__navList {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin-bottom: 24px;
}

.l-footer__navList a {
    color: #aaa;
    font-size: 14px;
    transition: color var(--ws-transition);
}

.l-footer__navList a:hover {
    color: #fff;
}

.l-footer__copy {
    border-top: 1px solid #444;
    padding-top: 16px;
    font-size: 12px;
    color: #888;
}

/* ==================== Responsive ==================== */
@media (max-width: 1024px) {
    .l-header, .l-container, .l-container, .l-footer {
        padding-left: 15px;
        padding-right: 15px;
    }
}
@media (min-width: 960px) {
    /*.l-header, .l-main, .l-footer {*/
    /*    padding: 0 20px;*/
    /*}*/
    .p-categoryHero{
        padding-left: 20px;
        padding-right: 20px;
    }
    .l-header__spMenuBtn {
        display: none;
    }
}

@media (max-width: 959px) {
    /*.l-header,.l-main, .l-footer {*/
    /*    padding: 0 20px;*/
    /*}*/
    .p-categoryHero{
        padding-left: 20px;
        padding-right: 20px;
    }
    .c-gnav {
        display: none;
    }

    .l-header__spMenuBtn {
        display: flex;
    }
}

@media (max-width: 599px) {
    /*.l-header, .l-main, .l-footer {*/
    /*    padding: 0 15px;*/
    /*}*/
    .p-categoryHero{
        padding-left: 20px;
        padding-right: 20px;
    }
    :root {
        --ws-sidebar-width: 100%;
    }

    .l-content-sidebar {
        flex-direction: column;
    }

    .l-sidebar {
        width: 100%;
    }

    .p-postList.-type-card.-pc-col3 {
        grid-template-columns: 1fr;
    }
}
