/*
Theme Name: Newspaper Child theme
Theme URI: http://themeforest.net/user/tagDiv/portfolio
Description: Child theme made by tagDiv
Author: tagDiv
Template: Newspaper
Version: 9.0c
*/


/* =====================================================
   DEBUG (ONLY WHEN TESTING)
===================================================== */

/*
body {
    background: red !important;
}
*/


/* =====================================================
   IMAGE BANK LAYOUT
===================================================== */

.main-categories-grid,
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-top: 30px;
}


/* =====================================================
   CATEGORY + GALLERY CARDS
===================================================== */

.main-category-item,
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    background: #111;
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.main-category-item:hover,
.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(0,0,0,0.20);
}


/* =====================================================
   IMAGES
===================================================== */

.main-category-item img,
.gallery-item img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
    transition: transform 0.45s ease;
}

.main-category-item:hover img,
.gallery-item:hover img {
    transform: scale(1.06);
}


/* =====================================================
   CATEGORY TITLE OVERLAY
===================================================== */

.cat-title {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;

    padding: 18px;

    color: #fff;
    font-size: 20px;
    font-weight: 600;

    z-index: 2;

    background: linear-gradient(
        to top,
        rgba(0,0,0,0.85),
        rgba(0,0,0,0)
    );
}


/* =====================================================
   GALLERY TITLE
===================================================== */

.gallery-item .title {
    background: #fff;
    color: #333;

    padding: 12px;

    font-size: 14px;
    text-align: center;
}


/* =====================================================
   NO IMAGE
===================================================== */

.no-image {
    aspect-ratio: 4 / 3;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #222;
    color: #888;

    font-size: 14px;
}


/* =====================================================
   LINKS
===================================================== */

.main-category-item a,
.gallery-item a,
.sub-item a {
    display: block;
    color: inherit;
    text-decoration: none;
}


/* =====================================================
   SUBCATEGORY GRID
===================================================== */

.sub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.sub-item {
    background: #f5f5f5;

    padding: 14px;

    border-radius: 10px;

    text-align: center;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.sub-item:hover {
    background: #ececec;
    transform: translateY(-2px);
}


/* =====================================================
   TAXONOMY PAGE
===================================================== */

.download-taxonomy-header {
    margin-bottom: 20px;
}

.download-taxonomy-header h1 {
    margin-bottom: 8px;
    font-size: 34px;
}

.taxonomy-description {
    color: #666;
    line-height: 1.7;
    max-width: 800px;
}


/* =====================================================
   🟢 BREADCRUMBS (NYTT)
===================================================== */

.breadcrumbs {
    font-size: 13px;
    margin: 10px 0 18px 0;
    color: #777;
}

.breadcrumbs a {
    color: #555;
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs span {
    color: #000;
    font-weight: 500;
}


/* =====================================================
   SELECT DROPDOWN
===================================================== */

.download-category-select {
    width: 320px;
    max-width: 100%;

    padding: 12px;

    border: 1px solid #ddd;
    border-radius: 8px;

    background: #fff;
}


/* =====================================================
   AJAX GALLERY
===================================================== */

.ajax-download-gallery {
    margin-top: 30px;
}


/* =====================================================
   TYPOGRAPHY
===================================================== */

h1,
h2,
h3 {
    font-weight: 600;
    letter-spacing: -0.2px;
}

p {
    line-height: 1.6;
}


/* =====================================================
   NEWSPAPER SAFE CONTAINER
===================================================== */

.td-container {
    max-width: 1240px;
}

.td-pb-span12 {
    padding-top: 20px;
    padding-bottom: 20px;
}


/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 1024px) {

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

@media (max-width: 768px) {

    .main-categories-grid,
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .download-taxonomy-header h1 {
        font-size: 28px;
    }
}

@media (max-width: 480px) {

    .main-categories-grid,
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .cat-title {
        font-size: 18px;
    }
}