/*!
 * Theme Name: Default
 * Package : DashLite
 * Author: Softnio
 * Author URI: http://themeforest.net/user/softnio
 * Version	 :	1.0.0
 * Updated	 :	07.23.2020
 *
 * Frontend overrides: header, content, footer, photo/category cards, responsive.
**/

/* Prevent layout shift when hamburger opens (body.nav-shown gets overflow: hidden) */
html {
    scrollbar-gutter: stable;
}

/* ===== Photo cards ===== */
.photo-card {
    position: relative;
    border-radius: 0.5rem;
    overflow: hidden;
}

.photo-card .photo-card-thumb {
    position: relative;
    width: 100%;
    display: block;
    overflow: hidden;
}

.photo-card .photo-card-img {
    width: 100%;
    height: auto;
    display: block;
}

.photo-card .photo-card-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.35;
    margin: 0 0 0.15rem 0;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.photo-card .photo-card-by {
    margin: 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
}

.photo-card .photo-card-username {
    color: inherit;
    text-decoration: none;
}

.photo-card .photo-card-username:hover {
    text-decoration: underline;
}

.photo-card .photo-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    min-height: 3.2rem;
    background: rgba(15, 23, 42, 0.88);
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 0.75rem;
}

.photo-card:hover .photo-card-overlay {
    opacity: 1;
}

.photo-card .photo-card-overlay-inner {
    width: 100%;
}

/* ===== Category cards ===== */
.category-card {
    position: relative;
    border-radius: 0.5rem;
    overflow: hidden;
    display: block;
    text-decoration: none;
    color: inherit;
}

.category-card-thumb {
    position: relative;
    width: 100%;
    height: 280px;
    background-color: var(--base-light, #8094ae);
    display: flex !important;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

@media (min-width: 576px) {
    .category-card-thumb {
        height: 320px;
    }
}

@media (min-width: 768px) {
    .category-card-thumb {
        height: 360px;
    }
}

@media (min-width: 992px) {
    .category-card-thumb {
        height: 400px;
    }
}

.category-card-thumb img {
    width: 100%;
    height: 100%;
    /* Category covers are often logo-like images; avoid cropping on wide screens. */
    object-fit: contain;
    object-position: center;
    display: block;
    background-color: #ffffff;
}

.category-card-thumb .category-card-placeholder {
    color: var(--base, #364a63);
    opacity: 0.6;
}

.category-card-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    min-height: 3.2rem;
    background: rgba(15, 23, 42, 0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 0.75rem;
}

.category-card-bar .category-card-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
}

/* ===== Header (template structure: trigger, brand, menu, tools) ===== */
.frontend-nav-trigger {
    display: inline-flex;
}

@media (min-width: 1280px) {
    .frontend-nav-trigger {
        display: none !important;
    }
}

/* Hamburger slide-out: same structure as template (_blank.html) – trigger, menu with nk-header-mobile (logo + back), then ul.nk-menu. Padding so list sits below mobile header. */
@media (min-width: 992px) and (max-width: 1279px) {
    .nk-header-menu {
        position: fixed !important;
        transform: translateX(-100%) !important;
        width: 280px;
        height: 100vh;
        max-height: 100vh;
        z-index: 999;
        background: #fff;
        border-right: 1px solid #e5e9f2;
        padding-top: 65px;
        padding-bottom: 2.5rem;
        transition: transform 0.4s ease;
    }
    .nk-header-menu.nk-header-active {
        transform: translateX(0) !important;
    }
    body.nav-shown .nk-header-overlay {
        display: block !important;
    }
}

@media (min-width: 1280px) and (max-width: 1440px) {
    .nk-header-wrap {
        flex-wrap: nowrap;
    }
    .nk-header-tools .btn {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
        font-size: 0.875rem;
    }
}

.nk-header-wrap {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.25rem;
}

.nk-header-tools {
    flex-shrink: 0;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

@media (max-width: 1279px) {
    .nk-header-tools .btn,
    .nk-header-tools .nk-quick-nav-icon {
        padding-left: 0.4rem;
        padding-right: 0.4rem;
        font-size: 0.8125rem;
    }
    .nk-header-tools .nk-quick-nav > li {
        padding: 0 4px;
    }
    .nk-header-tools .frontend-username {
        display: none !important;
    }
}

@media (min-width: 1280px) {
    .nk-header-tools .frontend-username {
        display: inline-block;
    }
}

/* ===== Content ===== */
.nk-content-body {
    padding-top: 0.25rem;
}

@media (min-width: 768px) {
    .nk-content-body {
        padding-top: 0.5rem;
    }
}

/* ===== Footer (template: bg-white, nav-sm) ===== */
.nk-footer.bg-white .nk-footer-links .nav.nav-sm {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* ===== Mobile ===== */
@media (max-width: 575px) {
    .photo-card .photo-card-overlay,
    .category-card-bar {
        min-height: 2.75rem;
    }
}
