/**
 * Shared styles for global layout, header and footer.
 *
 * @package Navcraft
 */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', sans-serif;
    background: #f7fdfb;
    color: #0f1a16;
    overflow-x: hidden;
}

.dot-grid {
    background-image: radial-gradient(circle, rgba(0, 200, 150, 0.12) 1px, transparent 1px);
    background-size: 32px 32px;
}

.nav-glass {
    background: rgba(247, 253, 251, 0.95);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(0, 200, 150, 0.1);
}

body.admin-bar #header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar #header {
        top: 46px;
    }
}

.footer-bg {
    background: linear-gradient(160deg, #f5fdf9 0%, #f9fffe 45%, #f0f6ff 100%);
}

.footer-menu {
    list-style: none;
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
}

.footer-menu > .menu-item {
    display: flex;
    align-items: center;
}

.footer-menu > .menu-item + .menu-item::before {
    content: "";
    width: 1px;
    height: 12px;
    background: #e5e7eb;
    margin: 0 14px;
}

::-webkit-scrollbar {
    display: none;
}

@keyframes navcraft-single-fade-slide-in {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.btn-primary {
    background: linear-gradient(135deg, #00c896 0%, #059669 100%);
    transition: all 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 28px -6px rgba(0, 200, 150, 0.38);
}

.btn-primary:disabled {
    background: linear-gradient(135deg, #00c896 0%, #059669 100%);
    box-shadow: none;
}

.g-text {
    background: linear-gradient(135deg, #00c896 0%, #059669 60%, #0d9488 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.s-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 5px 13px;
    border-radius: 999px;
}

.art-card {
    transition: all 0.25s ease;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.art-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 36px -10px rgba(0, 200, 150, 0.1);
    border-color: rgba(0, 200, 150, 0.16);
}

.art-card .art-cover {
    transition: transform 0.4s ease;
}

.art-card:hover .art-cover {
    transform: scale(1.04);
}

.tag-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid rgba(0, 0, 0, 0.07);
    background: #fff;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.18s ease;
}

.tag-pill:hover,
.tag-pill.active {
    background: rgba(0, 200, 150, 0.1);
    border-color: #00c896;
    color: #00c896;
}

.search-box {
    background: #fff;
    border: 1.5px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    transition: border-color 0.2s ease;
}

.search-box:focus-within {
    border-color: #00c896;
    box-shadow: 0 0 0 3px rgba(0, 200, 150, 0.1);
}

.navcraft-main-menu-item > .sub-menu {
    display: none;
}

.navcraft-main-menu-item {
    padding-bottom: 6px;
    margin-bottom: -6px;
}

.navcraft-main-menu-item:hover > .sub-menu,
.navcraft-main-menu-item:focus-within > .sub-menu {
    display: block;
    animation: navcraft-single-fade-slide-in 0.16s ease-out;
}

.navcraft-main-submenu > .menu-item > a {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.5rem 0.625rem;
    border-radius: 0.625rem;
    font-size: 12px;
    font-weight: 600;
    color: #4b5563;
    transition: all 0.16s ease;
}

.navcraft-main-submenu > .menu-item > a:hover,
.navcraft-main-submenu > .menu-item > a:focus-visible {
    color: #0f1a16;
    background: rgba(0, 200, 150, 0.1);
    outline: none;
}

#mobile-nav .navcraft-mobile-submenu-item > a {
    padding-left: 0.5rem;
}

.sidebar-card {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 18px;
}

.hot-art {
    transition: all 0.2s ease;
    border-radius: 12px;
    padding: 10px;
}

.hot-art:hover {
    background: rgba(0, 200, 150, 0.05);
}

.cloud-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 13px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid rgba(0, 0, 0, 0.07);
    background: #f9fafb;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.18s ease;
}

.cloud-tag:hover,
.cloud-tag.active {
    background: rgba(0, 200, 150, 0.08);
    border-color: #00c896;
    color: #00c896;
}

.sort-btn {
    padding: 6px 14px;
    border-radius: 10px;
    font-size: 11.5px;
    font-weight: 600;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #fff;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.18s;
}

.sort-btn.active,
.sort-btn:hover {
    background: rgba(0, 200, 150, 0.1);
    border-color: #00c896;
    color: #00c896;
}

.page-btn {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #fff;
    color: #6b7280;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s;
}

.page-btn.active,
.page-btn:hover {
    background: #00c896;
    border-color: #00c896;
    color: #fff;
}

#article-grid.list-mode {
    grid-template-columns: 1fr;
}

#article-grid .art-card.is-list-card {
    display: flex;
    flex-direction: row;
    align-items: stretch;
}

#article-grid .art-card.is-list-card .art-img-wrap {
    flex: 0 0 220px;
    width: 220px;
    min-height: 160px;
    height: auto;
}

#article-grid .art-card.is-list-card .art-img-wrap .art-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 640px) {
    #article-grid .art-card.is-list-card .art-img-wrap {
        flex-basis: 136px;
        width: 136px;
        min-height: 136px;
    }
}
