/**
 * Styles for the redesigned magazine page (magasinet)
 *
 * Article grid, category filters, podcast section, and overrides
 * for existing single-article.php and genre.php templates.
 * Dark teal/navy premium athletic theme using np- design system.
 *
 * @author    Jimmy Lindmark
 * @copyright MJ STRATEGI TECH SOLUTIONS SL
 * @license   All Rights Reserved
 */

/* ============================================================
   HERO
   Magazine-specific hero with gradient overlay
============================================================ */
.magasinet-hero {
    padding: 120px 0 80px;
    background:
        radial-gradient(ellipse at 30% 60%, rgba(67, 141, 154, 0.3) 0%, transparent 70%),
        linear-gradient(170deg, var(--rf-dark-teal) 0%, var(--rf-navy) 100%);
}

/* Compact hero for article/genre sub-pages */
.magasinet-hero--compact {
    padding: 90px 0 30px;
}

.magasinet-hero--compact .np-hero-sm__content {
    text-align: left;
}

/* Back navigation link in compact hero */
.magasinet-back-link {
    display: inline-block;
    font-family: var(--rf-body-font);
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.magasinet-back-link:hover {
    color: #fff;
    text-decoration: none;
}

.magasinet-back-link i {
    margin-right: 6px;
}

/* ============================================================
   CATEGORY NAVIGATION / FILTER BAR
   Horizontal pill buttons for subject filtering
============================================================ */
.magasinet-categories {
    padding-top: 48px;
}

.magasinet-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 48px;
}

.magasinet-filter-btn {
    display: inline-block;
    font-family: var(--rf-body-font);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    padding: 10px 24px;
    border-radius: 100px;
    border: 2px solid #e0e0e0;
    color: #666;
    background: #fff;
    transition: all 0.3s ease;
}

.magasinet-filter-btn:hover {
    border-color: var(--rf-teal);
    color: var(--rf-dark-teal);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(67, 141, 154, 0.15);
}

.magasinet-filter-btn--active {
    background: var(--rf-teal);
    border-color: var(--rf-teal);
    color: #fff;
}

.magasinet-filter-btn--active:hover {
    background: var(--rf-dark-teal);
    border-color: var(--rf-dark-teal);
    color: #fff;
}

/* ============================================================
   PODCAST SECTION
   Featured podcast block with image and player
============================================================ */
.magasinet-podcast {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    margin-bottom: 60px;
}

.magasinet-podcast__image {
    position: relative;
    height: 100%;
    min-height: 280px;
    overflow: hidden;
}

.magasinet-podcast__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.magasinet-podcast__content {
    padding: 36px 32px;
}

.magasinet-podcast__content .np-heading {
    font-size: 24px;
    margin-bottom: 12px;
}

.magasinet-podcast__content .np-text {
    margin-bottom: 16px;
}

/* ============================================================
   CATEGORY HEADERS
   Section dividers between article groups
============================================================ */
.magasinet-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
}

.magasinet-category-header .np-heading {
    margin-bottom: 0;
    font-size: 24px;
}

.magasinet-see-all {
    font-family: var(--rf-body-font);
    font-size: 14px;
    font-weight: 700;
    color: var(--rf-teal);
    text-decoration: none;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.magasinet-see-all:hover {
    color: var(--rf-dark-teal);
    text-decoration: none;
}

.magasinet-see-all i {
    margin-left: 4px;
    font-size: 12px;
    transition: transform 0.3s ease;
}

.magasinet-see-all:hover i {
    transform: translateX(4px);
}

/* ============================================================
   ARTICLE CARDS
   Card component for article grid display
============================================================ */
.magasinet-article-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    height: 100%;
}

.magasinet-article-card:hover {
    text-decoration: none;
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
}

/* Card image section */
.magasinet-article-card__image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.magasinet-article-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.magasinet-article-card:hover .magasinet-article-card__image img {
    transform: scale(1.05);
}

/* Category label badge on the image */
.magasinet-article-card__category {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--rf-teal);
    color: #fff;
    font-family: var(--rf-body-font);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 4px 12px;
    border-radius: 100px;
}

/* Card body / text section */
.magasinet-article-card__body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.magasinet-article-card__date {
    font-family: var(--rf-body-font);
    font-size: 12px;
    color: var(--rf-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.magasinet-article-card__title {
    font-family: var(--rf-heading-font);
    font-size: 18px;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.3;
    margin-bottom: 8px;
}

.magasinet-article-card:hover .magasinet-article-card__title {
    color: var(--rf-dark-teal);
}

.magasinet-article-card__excerpt {
    font-family: var(--rf-body-font);
    font-size: 14px;
    line-height: 1.5;
    color: #666;
    flex-grow: 1;
    margin-bottom: 12px;
}

.magasinet-article-card__author {
    font-family: var(--rf-body-font);
    font-size: 12px;
    font-weight: 600;
    color: var(--rf-teal);
    margin-top: auto;
}

/* ============================================================
   ARTICLE WRAPPER — style overrides for single-article.php
   The existing template is included inside .magasinet-article-wrap
============================================================ */
.magasinet-article-wrap {
    padding-top: 0;
}

.magasinet-article-wrap .single-post .post-img {
    border-radius: 0 0 20px 20px;
    overflow: hidden;
    margin-bottom: 32px;
}

.magasinet-article-wrap .single-post .post-img .img-holder {
    min-height: 350px;
    background-size: cover;
    background-position: center;
}

.magasinet-article-wrap .single-post h1 {
    font-family: var(--rf-heading-font);
    font-size: 36px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 24px;
}

.magasinet-article-wrap .single-post .box {
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.magasinet-article-wrap .single-post .holder {
    font-family: var(--rf-body-font);
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

.magasinet-article-wrap .single-post .holder h2,
.magasinet-article-wrap .single-post .holder h3 {
    font-family: var(--rf-heading-font);
    color: #1a1a2e;
    margin-top: 32px;
    margin-bottom: 16px;
}

.magasinet-article-wrap .single-post .holder img {
    border-radius: 12px;
    max-width: 100%;
    height: auto;
}

/* Similar articles section override */
.magasinet-article-wrap .similar-articles {
    padding: 40px 0;
}

.magasinet-article-wrap .similar-articles h1 {
    font-family: var(--rf-heading-font);
    font-size: 28px;
}

/* ============================================================
   GENRE WRAPPER — style overrides for genre.php
   The existing template is included inside .magasinet-genre-wrap
============================================================ */
.magasinet-genre-wrap {
    padding-top: 0;
}

.magasinet-genre-wrap .products .header {
    margin-bottom: 32px;
}

.magasinet-genre-wrap .products .heading-bar {
    border-radius: 16px;
    overflow: hidden;
    padding: 48px 32px;
    background-size: cover;
    background-position: center;
    margin-bottom: 24px;
}

.magasinet-genre-wrap .products .heading-bar h1 {
    font-family: var(--rf-heading-font);
    font-size: 36px;
}

.magasinet-genre-wrap .article {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.magasinet-genre-wrap .article:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

.magasinet-genre-wrap .article .img-holder {
    border-radius: 12px;
    overflow: hidden;
}

.magasinet-genre-wrap .article .img-holder img {
    width: 100%;
    height: auto;
    display: block;
}

.magasinet-genre-wrap .article h2 a {
    font-family: var(--rf-heading-font);
    color: #1a1a2e;
    text-decoration: none;
}

.magasinet-genre-wrap .article h2 a:hover {
    color: var(--rf-dark-teal);
}

.magasinet-genre-wrap .article .date {
    font-size: 12px;
    color: var(--rf-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.magasinet-genre-wrap .article .btn-success {
    background: var(--rf-teal);
    border-color: var(--rf-teal);
    border-radius: 100px;
    padding: 8px 24px;
    font-weight: 700;
}

.magasinet-genre-wrap .article .btn-success:hover {
    background: var(--rf-dark-teal);
    border-color: var(--rf-dark-teal);
}

/* Back button override in genre */
.magasinet-genre-wrap .btn-back {
    border-radius: 100px;
    font-weight: 700;
}

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 991px) {
    .magasinet-hero {
        padding: 100px 0 60px;
    }

    .magasinet-podcast__image {
        min-height: 220px;
    }

    .magasinet-podcast__content {
        padding: 28px 24px;
    }

    .magasinet-article-card__image {
        height: 170px;
    }

    .magasinet-article-wrap .single-post h1 {
        font-size: 28px;
    }
}

@media (max-width: 575px) {
    .magasinet-hero {
        padding: 80px 0 50px;
    }

    .magasinet-hero--compact {
        padding: 80px 0 20px;
    }

    .magasinet-filter-bar {
        gap: 6px;
        margin-bottom: 32px;
    }

    .magasinet-filter-btn {
        padding: 8px 16px;
        font-size: 12px;
    }

    .magasinet-podcast {
        margin-bottom: 40px;
    }

    .magasinet-podcast__image {
        min-height: 180px;
    }

    .magasinet-podcast__content {
        padding: 24px 20px;
    }

    .magasinet-podcast__content .np-heading {
        font-size: 20px;
    }

    .magasinet-article-card__image {
        height: 160px;
    }

    .magasinet-article-card__body {
        padding: 16px;
    }

    .magasinet-article-card__title {
        font-size: 16px;
    }

    .magasinet-category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .magasinet-article-wrap .single-post h1 {
        font-size: 24px;
    }

    .magasinet-article-wrap .single-post .post-img .img-holder {
        min-height: 200px;
    }

    .magasinet-genre-wrap .products .heading-bar {
        padding: 32px 20px;
    }

    .magasinet-genre-wrap .products .heading-bar h1 {
        font-size: 28px;
    }
}

/* ============================================================
   SINGLE ARTICLE — clean editorial/paper design
============================================================ */
.single-post {
    background: #fff;
}

.single-post .post-img {
    position: relative;
    max-height: 420px;
    overflow: hidden;
}

.single-post .post-img .img-holder {
    height: 420px;
    background-size: cover;
    background-position: center;
}

.single-post .container {
    max-width: 1260px;
    margin: 0 auto;
    padding: 40px 24px 60px;
}

.single-post h1 {
    font-family: var(--rf-heading-font);
    font-size: 36px;
    font-weight: 700;
    line-height: 1.25;
    color: #1a1a1a;
    margin-bottom: 24px;
}

.single-post .box {
    background: linear-gradient(135deg, var(--rf-dark-teal), var(--rf-teal)) !important;
    border-radius: 12px;
    padding: 24px 28px;
    margin-bottom: 32px;
}

.single-post .box h2 {
    font-family: var(--rf-heading-font);
    font-size: 20px;
    color: #fff !important;
    margin-bottom: 8px;
}

.single-post .box p {
    color: rgba(255,255,255,0.9);
    font-size: 15px;
    line-height: 1.65;
    margin: 0;
}

.single-post .holder {
    font-family: var(--rf-body-font);
    font-size: 18px;
    line-height: 1.85;
    color: #2a2a2a;
}

.single-post .holder p {
    margin-bottom: 20px;
}

.single-post .holder h2,
.single-post .holder h3 {
    font-family: var(--rf-heading-font);
    color: #1a1a1a;
    margin: 32px 0 12px;
}

.single-post .holder img {
    max-width: 100%;
    border-radius: 8px;
    margin: 16px 0;
}

.single-post .holder a {
    color: var(--rf-teal);
    text-decoration: underline;
}

/* Author section */
.single-post .footer {
    border-top: 1px solid #e8e8e8;
    padding-top: 24px;
    margin-top: 40px;
}

.single-post .author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.single-post .author .img-holder {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.single-post .author .title a {
    color: #1a1a1a;
    font-weight: 700;
    text-decoration: none;
    font-size: 15px;
}

.single-post .author .designation {
    display: block;
    color: #888;
    font-size: 13px;
    font-weight: 400;
}

/* Rating section */
.single-post .confetti-holder {
    text-align: center;
}

.single-post .confetti-holder .heading {
    display: block;
    font-family: var(--rf-heading-font);
    font-size: 16px;
    color: #555;
    margin-bottom: 10px;
}

.single-post .confetti-holder .confetti {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 16px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--rf-teal), var(--rf-dark-teal));
    border: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 6px rgba(67,141,154,0.25);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--rf-body-font);
}

.single-post .confetti-holder .confetti:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(67,141,154,0.4);
}

.single-post .confetti-holder .confetti.liked {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

/* Footer layout — omdöme + author side by side */
.single-post .footer .row {
    align-items: center;
}

/* ============================================================
   SIMILAR ARTICLES — clean card grid (replaces dark bg-image)
============================================================ */
.similar-articles {
    padding: 48px 0 60px;
    background: #f6f7f9;
}

.similar-articles .header {
    margin-bottom: 24px;
}

.similar-articles .header h1 {
    font-family: var(--rf-heading-font);
    font-size: 26px;
    font-weight: 700;
    color: #1a1a1a;
}

.similar-articles .tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 12px 0 0;
}

.similar-articles .tags li a {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    background: #e8eaee;
    text-decoration: none;
    transition: all 0.15s;
}

.similar-articles .tags li.active a,
.similar-articles .tags li a:hover {
    background: var(--rf-teal);
    color: #fff;
}

/* Article cards in similar section */
.similar-articles .article {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    margin-bottom: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
    min-height: 280px;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background-size: cover;
    background-position: center;
    position: relative;
}

.similar-articles .article::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.1) 60%, transparent 100%);
    border-radius: 12px;
}

.similar-articles .article:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.similar-articles .article h2 {
    font-family: var(--rf-heading-font);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    color: #fff;
    margin: 0;
    padding: 14px 16px 8px;
    position: relative;
    z-index: 1;
}

.similar-articles .article .btn {
    display: inline-block;
    padding: 6px 16px;
    margin: 0 16px 14px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    background: var(--rf-teal);
    border-radius: 999px;
    text-decoration: none;
    transition: all 0.15s;
    align-self: flex-start;
    position: relative;
    z-index: 1;
}

.similar-articles .article .btn:hover {
    background: #fff;
    color: var(--rf-teal);
}

@media (max-width: 768px) {
    .single-post h1 { font-size: 26px; }
    .single-post .container { padding: 24px 16px 40px; }
    .single-post .holder { font-size: 16px; }
    .single-post .post-img .img-holder { height: 260px; }
    .similar-articles .article::before { height: 100px; }
}
