/* ============================================================
   GLÄNNE & SÖNER — bloggsektionen
   Laddas av blogg.html och blogg-*.html (efter site.css).

   Artikelsektionen (artiklar.html, artikel-*.html) delar den här
   filens läslayout — .article, .blog-layout, .side-card, .share,
   .tag-list — och lägger sina egna komponenter i css/artiklar.css.
   Bloggen och artiklarna är två skilda saker för läsaren; att de
   delar stilmall är en teknisk detalj, inte ett innehållsbeslut.
   ============================================================ */

/* --- Bloggens sidhuvud med bannerbild --- */
.blog-hero { position: relative; background: var(--beige); overflow: hidden; }
.blog-hero-media { position: absolute; inset: 0; background-image: url('../images/blog/blogg-banner-2000.webp'); background-size: cover; background-position: 78% center; }
/* Krämtoning från vänster så rubriken alltid har kontrast mot bilden */
.blog-hero-media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, var(--beige) 0%, var(--beige) 26%, rgba(247,244,238,0.92) 40%, rgba(247,244,238,0.55) 52%, rgba(247,244,238,0) 66%); }
.blog-hero-inner { position: relative; z-index: 1; padding-top: 150px; padding-bottom: 70px; min-height: 430px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; text-align: left; }
.blog-hero-inner .page-title, .blog-hero-inner .page-subtitle { max-width: 15ch; }
.blog-hero-inner .page-subtitle { max-width: 34ch; }
@media (max-width: 900px) {
    .blog-hero-media { background-position: 72% center; }
    .blog-hero-media::after { background: linear-gradient(100deg, var(--beige) 0%, rgba(247,244,238,0.94) 42%, rgba(247,244,238,0.6) 62%, rgba(247,244,238,0.15) 80%); }
    .blog-hero-inner { min-height: 380px; padding-top: 130px; }
}
/* På smal skärm får bilden en egen rad ovanför texten i stället för att bli en
   hårt beskuren bakgrund där familjen hamnar utanför bild. */
@media (max-width: 620px) {
    .blog-hero { display: flex; flex-direction: column; padding-top: 72px; }
    .blog-hero-media { position: relative; inset: auto; width: 100%; aspect-ratio: 16 / 7; background-position: 76% center; order: -1; }
    .blog-hero-media::after { background: linear-gradient(to bottom, rgba(247,244,238,0) 55%, var(--beige) 100%); }
    .blog-hero-inner { min-height: 0; padding-top: 22px; padding-bottom: 34px; text-align: center; align-items: center; }
    .blog-hero-inner .page-title, .blog-hero-inner .page-subtitle { max-width: none; }
}

/* --- Layout: 3/4 innehåll + 1/4 sidomeny --- */
.blog-layout { display: grid; grid-template-columns: minmax(0, 3fr) minmax(250px, 1fr); gap: 48px; align-items: start; }

/* --- Verktygsrad ovanför listan --- */
.blog-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; padding-bottom: 18px; border-bottom: 1px solid rgba(0,0,0,0.08); }
.blog-count { font-size: 0.88rem; color: var(--muted); }
.active-filter { display: none; align-items: center; gap: 10px; background: var(--gold-light); color: var(--gold-dark); border-radius: 30px; padding: 5px 6px 5px 16px; font-size: 0.84rem; font-weight: 600; }
.active-filter.is-on { display: inline-flex; }
.active-filter button { border: none; background: rgba(0,0,0,0.09); color: var(--gold-dark); width: 24px; height: 24px; border-radius: 50%; cursor: pointer; font-size: 0.85rem; line-height: 1; font-family: inherit; }
.active-filter button:hover { background: var(--gold); color: var(--white); }

/* --- Inläggskort --- */
.post-list { display: flex; flex-direction: column; gap: 28px; }
.post-card { position: relative; background: var(--white); border: 1px solid rgba(0,0,0,0.06); border-radius: 16px; overflow: hidden; display: grid; grid-template-columns: 210px 1fr; transition: box-shadow 0.25s ease, transform 0.25s ease; }
.post-card:hover { box-shadow: 0 18px 40px rgba(0,0,0,0.09); transform: translateY(-3px); }
/* Hela kortet klickbart — rubriklänken sträcks över ytan, så hover-lyftet motsvarar
   något man faktiskt kan klicka på. Taggar och kategori ligger kvar ovanpå. */
.post-card h2 a::after, .post-card h3 a::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.post-card .post-meta, .post-card .tag-list, .post-card .post-link { position: relative; z-index: 2; }
.post-card:hover h2 a, .post-card:hover h3 a { color: var(--gold-dark); }
.post-card:hover .post-link { gap: 12px; }
.post-card[hidden] { display: none; }
.post-card-featured { grid-template-columns: 1fr; box-shadow: 0 14px 38px rgba(0,0,0,0.06); }
.section-white .post-card { background: var(--beige); }
.post-card-visual { background: linear-gradient(135deg, #F5EDD3 0%, #E8D9A0 55%, #D9C489 100%); display: flex; align-items: center; justify-content: center; font-size: 2.6rem; min-height: 175px; }
.post-card-featured .post-card-visual { min-height: 0; padding: 20px 34px; justify-content: space-between; align-items: center; font-size: 1.7rem; }
.post-flag { font-size: 0.72rem; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--gold-dark); }
/* Inlägg med egen bild: bilden ersätter guldpanelen, flaggan läggs ovanpå */
.post-card-visual.has-image { padding: 0; min-height: 0; display: block; position: relative; }
.post-card-visual.has-image img { width: 100%; height: 100%; object-fit: cover; }
.post-card-featured .post-card-visual.has-image { aspect-ratio: 21 / 9; padding: 0; }
.post-card-visual.has-image .post-flag { position: absolute; top: 16px; left: 20px; z-index: 1; background: rgba(255,255,255,0.93); padding: 5px 13px; border-radius: 20px; backdrop-filter: blur(4px); }
.post-card-body { padding: 30px 32px 32px; }
.post-card-featured .post-card-body { padding: 36px 40px 38px; }

/* --- Metarad (datum, kategori, lästid) --- */
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 0.82rem; color: var(--muted); margin-bottom: 14px; }
.post-meta .sep { opacity: 0.5; }
.post-cat { background: var(--gold-light); color: var(--gold-dark); border-radius: 20px; padding: 4px 13px; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; text-decoration: none; }
a.post-cat:hover { background: var(--gold); color: var(--white); }

.post-card h2, .post-card h3 { font-family: 'Playfair Display', serif; font-weight: 500; color: var(--dark); line-height: 1.3; margin-bottom: 12px; }
.post-card-featured h2 { font-size: 2rem; }
.post-card h3 { font-size: 1.3rem; }
.post-card-featured h3 { font-size: 1.75rem; }
.blog-teaser { max-width: 860px; margin: 0 auto; }
.post-card h2 a, .post-card h3 a { color: inherit; text-decoration: none; }
.post-card h2 a:hover, .post-card h3 a:hover { color: var(--gold-dark); }
.post-excerpt { color: var(--text); margin-bottom: 18px; max-width: 58ch; }
.post-card-featured .post-excerpt { font-size: 1.02rem; }
.post-link { color: var(--gold-text, var(--gold-dark)); font-weight: 600; font-size: 0.9rem; text-decoration: none; display: inline-flex; align-items: center; gap: 7px; transition: gap 0.2s ease; }
.post-link:hover { gap: 12px; }

/* --- Trailer: klicka-för-att-ladda, inget hämtas från YouTube innan dess --- */
.trailer { margin: 34px 0; }
.trailer-frame { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: var(--dark); box-shadow: 0 18px 45px rgba(0,0,0,0.18); }
.trailer-poster { display: block; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; background: none; cursor: pointer; }
.trailer-poster img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.45s ease, filter 0.3s ease; }
.trailer-poster:hover img, .trailer-poster:focus-visible img { transform: scale(1.03); filter: brightness(0.82); }
.trailer-play { position: absolute; inset: 0; margin: auto; width: 74px; height: 74px; border-radius: 50%; background: rgba(201,162,39,0.95); color: var(--white); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; padding-left: 5px; box-shadow: 0 10px 30px rgba(0,0,0,0.35); transition: transform 0.25s ease; }
.trailer-poster:hover .trailer-play, .trailer-poster:focus-visible .trailer-play { transform: scale(1.09); }
.trailer-hint { position: absolute; left: 0; right: 0; bottom: 16px; text-align: center; color: var(--white); font-size: 0.78rem; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; text-shadow: 0 2px 8px rgba(0,0,0,0.7); }
.trailer-frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.trailer figcaption { font-size: 0.8rem; color: var(--muted); margin-top: 12px; line-height: 1.55; }
@media (max-width: 560px) { .trailer-play { width: 58px; height: 58px; font-size: 1.2rem; } }

/* --- Dela: vanliga länkar, inga tredjepartsskript och inga spårpixlar --- */
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.share-label { font-size: 0.74rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); margin-right: 4px; }
.share a, .share button { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 8px 15px; border-radius: 30px; border: 1px solid rgba(0,0,0,0.1); background: var(--white); color: var(--text); font-family: inherit; font-size: 0.84rem; font-weight: 500; text-decoration: none; cursor: pointer; transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease; }
.share a:hover, .share button:hover { background: var(--gold-light); border-color: var(--gold-light); color: var(--gold-dark); }
.share svg { width: 15px; height: 15px; flex-shrink: 0; fill: currentColor; }
.share .is-copied { background: var(--gold); border-color: var(--gold); color: var(--white); }
.article-footer .share { margin-top: 4px; }
.side-card .share { gap: 8px; }
.side-card .share a, .side-card .share button { background: var(--beige); font-size: 0.8rem; padding: 7px 13px; }
.share-native { display: none; }
.share-native.is-on { display: inline-flex; }

/* --- Betyg (recensioner) --- */
.rating { display: inline-flex; align-items: baseline; gap: 8px; background: var(--gold-light); color: var(--gold-dark); border-radius: 20px; padding: 5px 15px; font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.rating b { font-family: 'Playfair Display', serif; font-size: 1.15rem; font-weight: 600; letter-spacing: 0; text-transform: none; }
.rating-big { display: flex; align-items: center; gap: 22px; background: var(--beige); border-radius: 14px; padding: 24px 28px; margin: 32px 0; }
.rating-score { font-family: 'Playfair Display', serif; font-size: 2.6rem; line-height: 1; color: var(--gold-dark); flex-shrink: 0; }
.rating-score span { font-size: 1.2rem; color: var(--muted); }
.rating-bar { flex: 1; }
.rating-bar-track { height: 8px; background: rgba(0,0,0,0.08); border-radius: 4px; overflow: hidden; margin-bottom: 8px; }
.rating-bar-fill { height: 100%; background: var(--gold); border-radius: 4px; }
.rating-bar p { font-size: 0.85rem; color: var(--muted); margin: 0; }
@media (max-width: 560px) { .rating-big { flex-direction: column; align-items: flex-start; gap: 14px; } }

/* --- Taggar --- */
.tag-list { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; padding: 0; }
.tag { display: inline-block; background: rgba(0,0,0,0.04); color: var(--text); border-radius: 6px; padding: 5px 12px; font-size: 0.78rem; text-decoration: none; }
.tag::before { content: '#'; opacity: 0.45; margin-right: 1px; }
a.tag:hover { background: var(--gold-light); color: var(--gold-dark); }

/* --- Tomt läge --- */
.post-empty { display: none; background: var(--white); border: 1px dashed var(--gold-light); border-radius: 16px; padding: 44px 32px; text-align: center; }
.post-empty.is-on { display: block; }
.post-empty h3 { font-family: 'Playfair Display', serif; font-size: 1.25rem; color: var(--dark); margin-bottom: 8px; }
.post-empty p { color: var(--muted); font-size: 0.93rem; margin-bottom: 18px; }

/* --- Nästa inlägg-notis --- */
.next-up { margin-top: 28px; background: var(--white); border: 1px dashed var(--gold-light); border-radius: 16px; padding: 30px 34px; }
.next-up h3 { font-family: 'Playfair Display', serif; font-size: 1.15rem; color: var(--dark); margin-bottom: 8px; }
.next-up p { font-size: 0.93rem; color: var(--muted); margin: 0; }

/* --- Sidomeny --- */
.blog-sidebar { display: flex; flex-direction: column; gap: 22px; position: sticky; top: 96px; }
.side-card { background: var(--white); border: 1px solid rgba(0,0,0,0.06); border-radius: 14px; padding: 26px; }
.side-card h3 { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); font-weight: 700; margin-bottom: 16px; }
.side-about { text-align: center; }
.side-avatar { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; margin: 0 auto 14px; }
.side-about strong { display: block; color: var(--dark); font-family: 'Playfair Display', serif; font-size: 1.15rem; font-weight: 500; margin-bottom: 8px; }
.side-about p { font-size: 0.88rem; color: var(--muted); margin-bottom: 16px; }
.side-about .post-link { justify-content: center; }

.cat-list { list-style: none; display: flex; flex-direction: column; margin: 0; padding: 0; }
.cat-list li + li { border-top: 1px solid rgba(0,0,0,0.06); }
.cat-list a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 0; color: var(--text); text-decoration: none; font-size: 0.92rem; }
.cat-list a:hover { color: var(--gold-dark); }
.cat-count { background: var(--beige); color: var(--muted); border-radius: 20px; font-size: 0.73rem; padding: 2px 10px; }
.cat-list a:hover .cat-count { background: var(--gold-light); color: var(--gold-dark); }
.side-note { font-size: 0.79rem; color: var(--muted); margin-top: 14px; line-height: 1.55; }
.side-card .tag-list { margin-bottom: 0; }

.side-latest { list-style: none; margin: 0; padding: 0; }
.side-latest li + li { border-top: 1px solid rgba(0,0,0,0.06); margin-top: 12px; padding-top: 12px; }
.side-latest a { color: var(--dark); text-decoration: none; font-size: 0.92rem; font-weight: 500; line-height: 1.45; display: block; }
.side-latest a:hover { color: var(--gold-dark); }
.side-latest span { display: block; font-size: 0.78rem; color: var(--muted); margin-top: 4px; }
.side-latest .is-current { display: block; font-size: 0.92rem; font-weight: 500; line-height: 1.45; color: var(--dark); }
.side-latest .is-current em { font-style: normal; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--gold-dark); background: var(--gold-light); border-radius: 20px; padding: 2px 9px; margin-left: 7px; vertical-align: 2px; }

.side-cta { background: var(--dark); color: var(--white); text-align: center; }
.side-cta h3 { color: rgba(255,255,255,0.5); }
.side-cta p { font-size: 0.88rem; opacity: 0.75; margin-bottom: 18px; }
.side-cta .btn { display: block; }

/* --- Artikelsida --- */
.article { background: var(--white); border: 1px solid rgba(0,0,0,0.06); border-radius: 16px; padding: 46px 56px 42px; }
.article-header { padding-bottom: 26px; margin-bottom: 30px; border-bottom: 1px solid rgba(0,0,0,0.07); }
.article-header h1 { font-family: 'Playfair Display', serif; font-size: 2.5rem; font-weight: 500; color: var(--dark); line-height: 1.22; margin: 6px 0 16px; }
.article-lead { font-size: 1.15rem; line-height: 1.62; color: var(--dark); max-width: 52ch; }
/* Radlängd: obegränsad bredd gav 81 tecken per rad, en bra bit över de 45–75
   som är bekvämt att läsa. Obs: 1ch ≈ 0,6em i Inter, så 68ch hade varit BREDARE
   än spalten och inte bitit alls — 58ch landar runt 70 tecken. */
.article-body p { font-size: 1.03rem; margin-bottom: 22px; max-width: 58ch; }
.article-body p:last-child { margin-bottom: 0; }
.article-body h2 { font-family: 'Playfair Display', serif; font-size: 1.5rem; font-weight: 500; color: var(--dark); margin: 36px 0 14px; }
.article-body h3 { font-family: 'Playfair Display', serif; font-size: 1.18rem; font-weight: 500; color: var(--dark); margin: 28px 0 10px; }
/* Sajten saknar global a-regel, så en länk i brödtexten hade annars blivit
   blå och understruken. --gold-text är den mörkare guldtonen som klarar AA. */
.article-body a { color: var(--gold-text); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.article-body a:hover { color: var(--gold-dark); }
.article-body ul { margin: 0 0 22px; padding-left: 22px; max-width: 58ch; }
.article-body li { margin-bottom: 8px; }
.pull-quote { border-left: 3px solid var(--gold); padding-left: 24px; margin: 34px 0; font-family: 'Playfair Display', serif; font-size: 1.35rem; line-height: 1.45; font-style: italic; color: var(--dark); }
.article-sign { font-family: 'Playfair Display', serif; font-size: 1.15rem; color: var(--dark); margin-top: 30px; }
.article-sign span { display: block; font-family: 'Inter', sans-serif; font-size: 0.85rem; color: var(--muted); font-style: normal; margin-top: 4px; }
.article-footer { margin-top: 36px; padding-top: 26px; border-top: 1px solid rgba(0,0,0,0.07); }
.article-footer h4 { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); margin-bottom: 14px; }
.author-box { display: flex; align-items: center; gap: 22px; background: var(--beige); border-radius: 14px; padding: 26px 28px; margin-top: 28px; }
.author-box img { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.author-box h4 { font-family: 'Playfair Display', serif; font-size: 1.15rem; font-weight: 500; color: var(--dark); text-transform: none; letter-spacing: 0; margin-bottom: 6px; }
.author-box p { font-size: 0.9rem; color: var(--muted); margin-bottom: 10px; }
.post-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 26px; flex-wrap: wrap; }
.post-nav span { color: var(--muted); font-size: 0.9rem; }

/* --- Responsivt --- */
@media (max-width: 980px) {
    .blog-layout { grid-template-columns: 1fr; gap: 40px; }
    .blog-sidebar { position: static; display: grid; grid-template-columns: repeat(2, 1fr); align-items: start; gap: 20px; }
}
@media (max-width: 700px) {
    .post-card, .post-card-featured { grid-template-columns: 1fr; }
    .post-card-visual { min-height: 120px; }
    .post-card-body, .post-card-featured .post-card-body { padding: 26px 24px 28px; }
    .post-card-featured h2 { font-size: 1.6rem; }
    .blog-sidebar { grid-template-columns: 1fr; }
    .article { padding: 32px 24px 30px; border-radius: 14px; }
    .article-header h1 { font-size: 1.9rem; }
    .article-lead { font-size: 1.05rem; }
    .author-box { flex-direction: column; text-align: center; }
}
