/*
 * PUŠKOPEDIJA: mobile / small-screen stylesheet
 *
 * Loads after style.css. Contains every max-width rule, grouped by breakpoint from
 * the widest (1200px) down to the narrowest (430px), then by page area.
 * Rules marked "cascade restore" repeat a base rule from style.css on purpose: in the
 * original single file that base rule sat below a mobile override and won over it, and
 * the repeat keeps that exact behaviour now that the mobile rules live in this file.
 */

/* ================================================================== */
/* MAX-WIDTH 1200px                                                   */
/* ================================================================== */

@media (max-width: 1200px) {

    /* Cards, lists, pagination and sidebar widgets */

    .cards-grid,
    .encyclopedia-grid,
    .cat-grid,
    .stats-grid {
        grid-template-columns: repeat(2,1fr);
    }


    /* Weapon / ammo archives and filters */

    .guns-grid {
        grid-template-columns: repeat(3, 1fr);
    }

}

/* ================================================================== */
/* MAX-WIDTH 1100px                                                   */
/* ================================================================== */

@media (max-width: 1100px) {

    /* Single article and test pages */

    .compact-single-hero .search-form {
        position: static;
        width: 100%;
        max-width: 650px;
        margin-top: 24px;
        transform: none;
    }

    .single-category-grid {
        gap: 22px;
    }


    /* Article archive (category-first layout) */

    .articles-archive-layout {
        grid-template-columns:minmax(0,1fr) 280px;
        gap:20px;
    }

    .articles-category-nav {
        grid-template-columns:repeat(4,minmax(0,1fr));
    }

    .articles-category-tab:nth-child(4) {
        border-right:0;
    }

    .articles-archive-grid {
        grid-template-columns:repeat(3,minmax(0,1fr));
    }

}

/* ================================================================== */
/* MAX-WIDTH 900px                                                    */
/* ================================================================== */

/*
 * Mobile header: one slim bar (logo, login, search and hamburger buttons). The
 * navigation opens as a full-width accordion panel under it. Markup and toggle script
 * are in header.php. The selectors start with .site-header on purpose: header.php has
 * an inline <style> that loads after this file, so plain single-class selectors lose.
 */
@media (max-width: 900px) {

    /* Header, main navigation and account box */

    .site-header {
        position: sticky;
        top: 0;
        z-index: 1000;
        padding-top: 8px;
        padding-bottom: 8px;
    }

    .site-header .header-inner {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-start;
        align-items: center;
        gap: 0 8px;
    }

    .site-header .logo {
        flex: 1 1 0;
        min-width: 0;
    }

    .site-header .logo a {
        display: block;
        line-height: 0;
    }

    .site-header .logo img {
        display: block;
        width: auto;
        max-width: 100%;
        height: auto;
        max-height: 30px;
    }

    .site-header .header-inner .puskopedija-header-login {
        height: 40px;
        padding: 0 14px;
        font-size: 13px;
    }

    .site-header .puskopedija-account {
        height: 42px;
    }

    .site-header .puskopedija-account-dropdown {
        left: auto;
        right: 0;
    }

    .site-header .header-inner .pk-mobile-actions {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .site-header .pk-icon-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        padding: 0;
        border: 1px solid rgba(255, 255, 255, .10);
        border-radius: 5px;
        background: rgba(15, 21, 28, .92);
        color: #c8b56b;
        font-size: 18px;
        line-height: 1;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    .site-header .pk-icon-btn:focus-visible {
        outline: 2px solid #c8b56b;
        outline-offset: 2px;
    }

    .site-header .pk-icon-btn .icon {
        color: inherit;
        font-size: 18px;
    }

    .site-header.pk-menu-open .pk-burger,
    .site-header.pk-search-open .pk-search-toggle {
        background: rgba(200, 181, 107, .16);
        border-color: rgba(200, 181, 107, .55);
    }

    /* The homepage hero already has its own search box */
    body.home .site-header .pk-search-toggle {
        display: none;
    }

    /* Search: hidden until the magnifier is tapped, then a full-width row */
    .site-header .pk-search {
        display: none;
        flex: 0 0 100%;
        order: 10;
        max-width: none;
        height: 44px;
        margin: 10px 0 2px;
    }

    .site-header.pk-search-open .pk-search {
        display: flex;
    }

    .site-header .pk-search input[type=search] {
        font-size: 17px;
    }

    /* Navigation: closed by default, opens as an accordion panel */
    .site-header .pk-bar {
        display: none;
        margin-top: 8px;
        max-height: calc(100vh - 64px);
        max-height: calc(100dvh - 64px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .site-header.pk-menu-open .pk-bar {
        display: block;
    }

    .site-header .pk-bar-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        width: 100%;
        max-width: none;
    }

    .site-header .pk-nav-item {
        border-bottom: 1px solid rgba(255, 255, 255, .06);
    }

    .site-header .pk-nav-item:last-child {
        border-bottom: 0;
    }

    .site-header .pk-nav-right {
        margin-left: 0;
    }

    .site-header .pk-nav-link {
        width: 100%;
        height: 52px;
        padding: 0 18px;
        font-size: 19px;
        text-align: left;
    }

    .site-header .pk-nav-link .pk-chev {
        margin-left: auto;
        font-size: 13px;
    }

    .site-header .pk-nav-item.is-open > .pk-nav-link {
        color: #c8b56b;
    }

    /* Submenus open on tap only (hover would stick on touch screens) */
    .site-header .pk-nav-item:hover > .pk-drop {
        display: none;
    }

    .site-header .pk-nav-item.is-open > .pk-drop {
        display: block;
    }

    .site-header .pk-drop {
        position: static;
        min-width: 0;
        padding: 0 0 8px;
        border: 0;
        border-radius: 0;
        background: rgba(255, 255, 255, .025);
        box-shadow: none;
    }

    .site-header .pk-drop a {
        min-height: 46px;
        padding: 10px 18px 10px 30px;
        font-size: 18px;
        white-space: normal;
    }

    .site-header .pk-note {
        padding: 12px 18px 12px 30px;
        white-space: normal;
    }

}

/* ================================================================== */
/* MAX-WIDTH 820px                                                    */
/* ================================================================== */

@media (max-width: 820px) {

    /* Article archive (category-first layout) */

    .articles-archive-layout {
        display:block;
        margin-top:16px;
    }

    .articles-archive-sidebar {
        margin-top:20px;
    }

    .articles-category-sections {
        grid-template-columns:1fr;
    }

    .articles-category-row--primary {
        grid-template-columns:1fr;
    }

    .articles-category-row--triple {
        grid-template-columns:repeat(2,minmax(0,1fr));
    }

    .articles-news-grid {
        grid-template-columns:repeat(2,minmax(0,1fr));
    }

    .articles-archive-grid {
        grid-template-columns:repeat(2,minmax(0,1fr));
    }

}

/* ================================================================== */
/* MAX-WIDTH 768px                                                    */
/* ================================================================== */

@media (max-width: 768px) {

    /* Base: variables, reset and layout container */

    /* ==========================================
      MOBILE
      ========================================== */
    .container {
        width: 100%;
        padding-left: 15px;
        padding-right: 15px;
    }


    /* Header, main navigation and account box */

    .header-inner {
        flex-direction: column;
        gap: 20px;
    }

    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }

    /* Header */
    .header-inner {
        flex-direction: column;
        gap: 15px;
    }

    .logo img {
        max-width: 220px;
        height: auto;
    }


    /* Hero, search form and category strip */

    .hero h1 {
        font-size: 52px;
    }

    /* Category strip */
    .cat-grid {
        display: flex;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 0;
        flex-wrap: nowrap;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding-bottom: 10px;
    }

    .cat-grid::-webkit-scrollbar {
        display: none;
    }

    .cat-item {
        flex: 0 0 110px;
        min-height: 90px;
    }

    .category-strip {
        position: relative;
    }

    .category-strip::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        width: 40px;
        height: 100%;
        pointer-events: none;
        background: linear-gradient( to left, rgba(6,9,13,1) 0%, rgba(6,9,13,0) 100% );
    }

    /* Arrow bubbles: a hint that the strip scrolls sideways. main.js adds
       .can-prev / .can-next to .category-strip while there is more to see. */
    .cat-arrow {
        position: absolute;
        top: 50%;
        z-index: 6;
        display: none;
        align-items: center;
        justify-content: center;
        width: 30px;
        height: 30px;
        margin-top: -20px;
        padding: 0;
        border: 1px solid rgba(255, 255, 255, .28);
        border-radius: 50%;
        background: rgba(179, 155, 82, .9);
        color: #0a1017;
        font-size: 14px;
        line-height: 1;
        box-shadow: 0 3px 10px rgba(0, 0, 0, .55);
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    .cat-arrow .icon {
        color: inherit;
        font-size: 14px;
    }

    .cat-arrow-prev {
        left: 6px;
    }

    .cat-arrow-next {
        right: 6px;
        animation: cat-arrow-nudge 1.6s ease-in-out 3;
    }

    .category-strip.can-prev .cat-arrow-prev,
    .category-strip.can-next .cat-arrow-next {
        display: flex;
    }

    @keyframes cat-arrow-nudge {
        0%, 100% { transform: translateX(0); }
        50% { transform: translateX(4px); }
    }

    @media (prefers-reduced-motion: reduce) {
        .cat-arrow-next {
            animation: none;
        }
    }

    /* Hero */
    .hero {
        height: auto;
        padding: 40px 0;
    }

    .hero-logo {
        font-size: 52px;
    }

    .hero p {
        font-size: 18px;
    }

    /* Search */
    .search-form {
        max-width: 100%;
    }

    /* =========================================
      TARGETED MOBILE CLEANUP
      Front page, ballistic calculator, streljane page only.
      ========================================= */
    body.home .hero {
        min-height: 430px;
        padding: 44px 0 82px;
        align-items: flex-start;
    }

    body.home .hero-logo {
        font-size: 54px;
        line-height: .92;
        margin-top: 18px;
        margin-bottom: 12px;
    }

    body.home .hero p {
        max-width: 20rem;
        margin-bottom: 0;
        font-size: 18px;
        line-height: 1.35;
    }

    body.home .search-form {
        margin-top: 26px;
        margin-bottom: 20px;
    }

    body.home .search-field {
        min-width: 0;
        padding: 14px;
        font-size: 16px;
    }

    body.home .search-form button {
        flex: 0 0 56px;
        width: 56px;
    }

    body.home .hero-stats {
        display: flex;
        flex-wrap: nowrap;
        justify-content: space-between;
        gap: 12px;
        margin-top: 18px;
    }

    body.home .hero-stat {
        flex: 1 1 0;
        min-width: 0;
        padding: 9px 6px;
        border: 1px solid rgba(255,255,255,.07);
        border-radius: 10px;
        background: rgba(0,0,0,.22);
        justify-content: center;
        gap: 7px;
    }

    body.home .hero-stat img {
        width: 24px;
        height: 24px;
    }

    body.home .hero-stat-number {
        font-size: 16px;
    }

    body.home .hero-stat-label {
        font-size: 10px;
        letter-spacing: .2px;
    }


    /* Homepage sections */

    /* Homepage top section */
    .homepage-grid,
    .home-layout,
    .top-row-layout,
    .single-layout,
    .archive-layout {
        display: block;
    }

    /* Main content */
    .homepage-main,
    .home-main,
    .main-content,
    .single-content,
    .encyclopedia-content {
        width: 100%;
    }

    /* Sidebars */
    .homepage-sidebar,
    .top-row-sidebar,
    .site-sidebar,
    .sidebar,
    .encyclopedia-sidebar,
    .infobox {
        width: 100%;
        margin-top: 20px;
    }

    body.home .homepage-grid {
        margin-top: -54px;
        padding-bottom: 20px;
    }

    body.home .homepage-main {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    body.home .posts-panel {
        padding: 14px;
        border-radius: 12px;
    }

    body.home .ency-home-row,
    body.home .content-dual-row,
    body.home .updated-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 16px;
        margin-bottom: 0;
    }

    body.home .ency-latest-grid,
    body.home .article-mini-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
    }

    body.home .did-you-know-panel {
        min-height: 250px;
        padding: 16px;
        border-radius: 12px;
    }

    body.home .did-you-know-content {
        max-width: 100%;
        padding-right: 96px;
    }

    body.home .did-you-know-content h3 {
        font-size: 21px;
    }

    body.home .did-you-know-content p {
        font-size: 15px;
        line-height: 1.55;
    }

    body.home .did-you-know-image {
        width: 125px;
        height: auto;
        opacity: .62;
    }

    body.home .test-list-item a {
        display: grid;
        grid-template-columns: 96px minmax(0, 1fr);
        gap: 12px;
        align-items: stretch;
    }

    body.home .test-content h3 {
        font-size: 18px;
        line-height: 1.2;
    }

    body.home .test-content p {
        font-size: 14px;
        line-height: 1.35;
    }

    body.home .explore-encyclopedia {
        margin-top: 0;
    }

    body.home .explore-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }


    /* Cards, lists, pagination and sidebar widgets */

    .cards-grid,
    .encyclopedia-grid,
    .cat-grid,
    .stats-grid {
        grid-template-columns: 1fr;
    }

    /* cascade restore: .cards-grid (see style.css) */
    .cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    body.home .section-header {
        align-items: flex-start;
        gap: 10px;
    }

    body.home .section-header h2 {
        font-size: 16px;
        line-height: 1.2;
    }

    body.home .ency-card,
    body.home .article-mini-card,
    body.home .updated-card {
        height: 210px;
        border-radius: 12px;
    }

    body.home .ency-card img,
    body.home .article-mini-card img,
    body.home .updated-card img {
        height: 100%;
    }

}

@media (max-width: 1200px) {

    /* Cards, lists, pagination and sidebar widgets */

    /* cascade restore: .cards-grid (see style.css) */
    .cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }

}

@media (max-width: 768px) {

    /* Hero, search form and category strip */

    /* Stats */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }


    /* Homepage sections */

    body.home .test-thumb img {
        width: 96px;
        height: 88px;
        object-fit: cover;
        border-radius: 8px;
    }


    /* Cards, lists, pagination and sidebar widgets */

    /* Cards */
    .cards-grid,
    .encyclopedia-grid {
        grid-template-columns: 1fr;
    }


    /* Encyclopedia entry pages (infobox, ammo, disassembly, gallery) */

    .disassembly-grid {
        grid-template-columns: 1fr;
    }

    /* Encyclopedia menu strip */
    .ency-header-cats {
        overflow-x: auto;
        white-space: nowrap;
        justify-content: flex-start;
        gap: 20px;
        padding-bottom: 10px;
    }

    /* Encyclopedia title */
    .ency-title {
        font-size: 48px;
        line-height: 0.95;
    }

    /* Infobox */
    .infobox-title {
        font-size: 24px;
    }

    .infobox-image {
        padding-left: 25px;
        padding-right: 25px;
    }

    /* Images */
    .encyclopedia-image img {
        height: auto;
    }

    .encyclopedia-layout {
        display: flex;
        flex-direction: column;
    }

    .infobox {
        order: 1;
        margin-bottom: 20px;
    }

    .encyclopedia-content {
        order: 2;
    }

    .infobox {
        position: static;
    }

    .ammo-bullet-type {
        flex-direction: column;
    }

    .ammo-bullet-image {
        width: 100%;
    }

    .ammo-dimensions {
        grid-template-columns: 1fr;
    }

    .disassembly-gallery {
        padding: 12px;
    }

    .dg-viewer {
        gap: 8px;
    }

    .dg-stage {
        aspect-ratio: 4 / 3;
    }

    .dg-title {
        font-size: 19px;
    }


    /* Weapon / ammo archives and filters */

    .gun-gallery {
        grid-template-columns: repeat(3, 1fr);
    }

    .guns-grid {
        grid-template-columns: 1fr;
    }

    .archive-layout {
        display: flex;
        flex-direction: column;
    }

    .archive-filters {
        order: 1;
        position: static;
        width: 100%;
    }

    .archive-main {
        order: 2;
        width: 100%;
    }

    .filter-box {
        width: 100%;
    }


    /* Ballistic calculator */

    body.page-template-page-ballisticki-kalkulator .hero {
        height: auto;
        min-height: 300px;
        padding: 44px 0 72px;
    }

    body.page-template-page-ballisticki-kalkulator .hero-logo {
        font-size: 46px;
        line-height: .95;
        margin-top: 18px;
    }

    body.page-template-page-ballisticki-kalkulator .hero p {
        max-width: 22rem;
        font-size: 17px;
        line-height: 1.4;
    }

    body.page-template-page-ballisticki-kalkulator .homepage-grid {
        margin-top: -42px;
    }

    body.page-template-page-ballisticki-kalkulator .ballistics-wrapper {
        display: grid;
        grid-template-columns: 1fr;
        gap: 16px;
    }

    body.page-template-page-ballisticki-kalkulator .ballistics-input-panel,
    body.page-template-page-ballisticki-kalkulator .ballistics-results-panel {
        padding: 16px;
        border-radius: 12px;
    }

    body.page-template-page-ballisticki-kalkulator .panel-title {
        margin-bottom: 16px;
    }

    body.page-template-page-ballisticki-kalkulator .panel-title h2 {
        font-size: 25px;
        line-height: 1;
    }

    body.page-template-page-ballisticki-kalkulator .ballistics-layout-table,
    body.page-template-page-ballisticki-kalkulator .ballistics-layout-table tbody,
    body.page-template-page-ballisticki-kalkulator .ballistics-layout-table tr,
    body.page-template-page-ballisticki-kalkulator .ballistics-layout-table td {
        display: block;
        width: 100%;
    }

    body.page-template-page-ballisticki-kalkulator .ballistics-layout-table {
        border-spacing: 0;
    }

    body.page-template-page-ballisticki-kalkulator .ballistics-layout-table td {
        margin-bottom: 14px;
        padding: 14px;
        border: 1px solid rgba(255,255,255,.06);
        border-radius: 10px;
        background: rgba(255,255,255,.025);
    }

    body.page-template-page-ballisticki-kalkulator .ballistics-field {
        margin-bottom: 12px;
    }

    body.page-template-page-ballisticki-kalkulator .ballistics-field input {
        height: 46px;
        font-size: 16px;
    }

    body.page-template-page-ballisticki-kalkulator .spacer-field {
        display: none;
    }

    body.page-template-page-ballisticki-kalkulator .results-tabs {
        gap: 8px;
    }

    body.page-template-page-ballisticki-kalkulator .results-tabs button {
        min-width: 0;
        height: auto;
        padding: 9px 6px;
        font-size: 12px;
        line-height: 1.15;
    }

    body.page-template-page-ballisticki-kalkulator .ballistics-table {
        font-size: 15px;
    }

    body.page-template-page-ballisticki-kalkulator .ballistics-table th,
    body.page-template-page-ballisticki-kalkulator .ballistics-table td {
        padding: 9px 6px;
        white-space: normal;
    }


    /* Single article and test pages */

    .single-layout {
        flex-direction: column;
    }

    .entry-content img,
    .wp-post-image {
        max-width: 100%;
        height: auto;
    }

    body.puskopedija-streljane-page .single-layout {
        display: block;
        padding: 32px 0 44px;
    }

    body.puskopedija-streljane-page .single-content article {
        padding: 16px;
        border: 1px solid rgba(255,255,255,.06);
        border-radius: 12px;
        background: rgba(16,22,29,.92);
    }

    body.puskopedija-streljane-page .single-content h1 {
        font-size: 34px;
        line-height: 1;
        margin-bottom: 16px;
    }

    body.puskopedija-streljane-page .entry-content {
        margin-top: 0;
        font-size: 17px;
        line-height: 1.65;
    }

    body.puskopedija-streljane-page .entry-content table {
        display: block;
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        border-collapse: collapse;
        scrollbar-width: thin;
    }

    body.puskopedija-streljane-page .entry-content th,
    body.puskopedija-streljane-page .entry-content td {
        min-width: 150px;
        padding: 10px 12px;
        border: 1px solid rgba(255,255,255,.08);
        font-size: 16px;
        line-height: 1.45;
        vertical-align: top;
    }

    body.puskopedija-streljane-page .entry-content th {
        position: sticky;
        top: 0;
        background: #9C8A4D;
        color: #fff;
        font-weight: 500;
        text-align: left;
    }

    body.puskopedija-streljane-page .entry-content tr:nth-child(odd) {
        background: rgba(255,255,255,.025);
    }

    body.puskopedija-streljane-page .entry-content tr:nth-child(even) {
        background: rgba(0,0,0,.14);
    }

    body.puskopedija-streljane-page .entry-content a {
        overflow-wrap: anywhere;
    }

    /* cascade restore: .compact-single-hero (see style.css) */
    .compact-single-hero {
        height: 145px;
    }

    /* cascade restore: .compact-single-hero p (see style.css) */
    .compact-single-hero p {
        font-size: 16px;
    }

    /* cascade restore: .article-test-layout (see style.css) */
    .article-test-layout {
        padding: 20px 0 60px;
    }

    /* cascade restore: .article-test-panel h1 (see style.css) */
    .article-test-panel h1 {
        font-size: 34px;
    }

    .compact-single-hero .hero-logo {
        font-size: 48px;
    }

    .compact-single-hero p {
        font-size: 17px;
    }

    .single-category-nav .container {
        padding-left: 15px;
        padding-right: 0;
    }

    .single-category-grid {
        min-height: 58px;
        gap: 18px;
        padding-right: 15px;
    }

    .single-category-item {
        font-size: 13px;
    }

    .article-test-layout {
        padding: 18px 15px 44px;
    }

    .article-test-panel {
        padding: 0 16px 28px;
        border-radius: 12px;
    }

    .article-test-panel h1 {
        font-size: 32px;
        padding-top: 10px;
    }

    .article-test-featured-image {
        margin-bottom: 24px;
    }

}

@media (max-width: 1100px) {

    /* Single article and test pages */

    .compact-single-hero {
        height: auto;
        min-height: 235px;
        padding: 28px 0 34px;
        align-items: flex-start;
    }

}

@media (max-width: 768px) {

    /* Encyclopedia entry pages (infobox, ammo, disassembly, gallery) */

    .ammo-bullet-image img {
        width: 100%;
        max-width: 300px;
        height: auto;
    }

    .dg-arrow {
        width: 38px;
        height: 38px;
        font-size: 28px;
    }


    /* Ballistic calculator */

    /* cascade restore: .panel-title img (see style.css) */
    .panel-title img {
        width: 40px;
        height: 40px;
    }


    /* Single article and test pages */

    /* cascade restore: .single-category-item img (see style.css) */
    .single-category-item img,
    .single-category-item > i {
        width: 20px;
        height: 22px;
    }

    .compact-single-hero {
        min-height: 250px;
        padding: 34px 0 42px;
    }


    /* Encyclopedia entry pages (infobox, ammo, disassembly, gallery) */

    /* cascade restore: .dg-thumb img (see style.css) */
    .dg-thumb img {
        width: 100%;
        height: 100%;
    }


    /* Article archive (category-first layout) */

    /* cascade restore: .articles-archive-layout (see style.css) */
    .articles-archive-layout {
        width: 95%;
    }

    /* cascade restore: .articles-section-heading h1 (see style.css) */
    .articles-section-heading h1,
    .articles-section-heading h2 {
        font-size: 24px;
    }

    /* cascade restore: .articles-feature-copy p (see style.css) */
    .articles-feature-copy p {
        font-size: 13px;
    }

}

/* ================================================================== */
/* MAX-WIDTH 700px                                                    */
/* ================================================================== */

@media (max-width: 700px) {

    /* Header, main navigation and account box */

    .puskopedija-header-nav {
        width: 100%;
        justify-content: center;
        margin: 0;
        gap: 18px;
    }

    .puskopedija-header-nav-link {
        font-size: 12px;
    }

    .puskopedija-account {
        align-self: center;
    }

    .puskopedija-account-login {
        align-self: center;
    }

    .puskopedija-account-trigger {
        padding-right: 10px;
    }

    .puskopedija-account-username {
        display: none;
    }

    .puskopedija-account-chevron {
        margin-left: 5px;
    }

}

/* ================================================================== */
/* MAX-WIDTH 560px                                                    */
/* ================================================================== */

@media (max-width: 560px) {

    /* Article archive (category-first layout) */

    .articles-archive-layout {
        width:100%;
        padding:0 12px;
    }

    .articles-category-nav {
        grid-template-columns:repeat(2,minmax(0,1fr));
    }

    .articles-category-tab:nth-child(odd) {
        border-right:1px solid rgba(255,255,255,.06);
    }

    .articles-category-tab:nth-child(even) {
        border-right:0;
    }

    .articles-section-heading h1,
    .articles-section-heading h2 {
        font-size:20px;
    }

    .articles-latest-grid {
        grid-template-columns:1fr 1fr;
        grid-template-rows:220px 160px;
    }

    .articles-feature-card--lead {
        grid-column:1/-1;
        grid-row:auto;
    }

    .articles-feature-card--side {
        min-height:150px;
    }

    .articles-category-grid {
        grid-template-columns:1fr;
    }

    .articles-feature-card--category-lead {
        height:190px;
    }

    .articles-category-mini-list {
        gap:10px;
    }

    .articles-category-row--triple,
    .articles-news-grid,
    .articles-archive-grid {
        grid-template-columns:1fr;
    }

    .articles-category-row--primary {
        gap:14px;
    }

}

@media (max-width: 768px) {

    /* Encyclopedia entry pages (infobox, ammo, disassembly, gallery) */

    .dg-thumb {
        flex-basis: 84px;
        height: 56px;
    }

}

/* ================================================================== */
/* MAX-WIDTH 430px                                                    */
/* ================================================================== */

@media (max-width: 430px) {

    /* Hero, search form and category strip */

    body.home .hero-stats {
        gap: 6px;
    }

    body.home .hero-stat {
        flex-direction: column;
        padding: 8px 4px;
        text-align: center;
    }


    /* Homepage sections */

    body.home .explore-grid {
        grid-template-columns: 1fr;
    }

    body.home .did-you-know-content {
        padding-right: 0;
    }

    body.home .did-you-know-image {
        opacity: .18;
    }

    body.home .test-list-item a {
        grid-template-columns: 82px minmax(0, 1fr);
    }

    body.home .test-thumb img {
        width: 82px;
    }

}
