/*
Theme Name: Corona
Author: Rikard Linde
Description: Ett enkelt WordPress-tema.
Version: 0.3
Text Domain: corona
*/

/* ====================================
   CSS VARIABLER (FÄRGSCHEMA)
==================================== */

:root {
    --primary-color: #d73027;
    --primary-light: #f46d43;
    --primary-pale: #fff5f5;
    --secondary-color: #f8fafc;
    --accent-blue: #2166ac;
    --accent-yellow: #fee08b;
    --accent-green: #5aae61;
    --text-primary: #334155;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --white: #ffffff;
    --light-cream: #fefefe;
    --warning-bg: #fef7e0;
    --warning-border: #d69e2e;
    --border-radius: 6px;
    --border-radius-small: 4px;
}

/* ====================================
   1. GRUNDLÄGGANDE ELEMENT
==================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    line-height: 1.7;
    color: var(--text-primary);
    background: var(--light-cream);
    font-weight: 400;
}

/* Länkstilar */
a {
    text-decoration: none;
    color: var(--accent-blue);
    font-weight: 400;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-color);
}

a:focus {
    outline: 3px solid var(--accent-yellow);
    outline-offset: 2px;
    border-radius: var(--border-radius-small);
}

img {
    width: 100%;
    height: auto;
}

/* ====================================
   2. HEADER
==================================== */

header {
    background: var(--white);
    padding: 0;
}

header > section {
    max-width: 1200px;
    margin: 0;
    padding: 1.5rem 1.5rem 1.2rem;
}

.skip {
    position: absolute;
    top: -40px;
    background: var(--primary-color);
    color: white;
    padding: 8px 0;
    text-decoration: none;
    z-index: 1000;
}

/* ====================================
   3. SIDHUVUD OCH LOGOTYP
==================================== */

header > section > h1 {
    font-size: 2.8rem;
    font-weight: 900;
    font-style: italic;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
    letter-spacing: -0.3px;
}

header > section > h1 > a {
    font-size: 2.8rem;
    font-weight: 900;
    font-style: italic;
    color: var(--text-primary);
    text-decoration: none;
}

header > section > h1 > a:hover {
    color: var(--primary-color);
}

header > section > p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-weight: 400;
    font-style: italic;
}

/* ====================================
   4. SÖKFUNKTION
==================================== */

header > section > form {
    max-width: 500px;
}

header > section > form > fieldset {
    border: none;
    padding: 0;
    margin: 0;
    display: flex;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    background: var(--white);
}

/* Dölj legend visuellt men behåll för skärmläsare */
.screen-reader-text {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

header > section > form > fieldset > input[type="search"] {
    flex: 1;
    border: none;
    padding: 1rem;
    font-size: 1rem;
    outline: none;
    background: transparent;
}

header > section > form > fieldset > input[type="search"]:focus {
    outline: 3px solid var(--accent-yellow);
    outline-offset: 0;
    border-radius: var(--border-radius-small);
}

header > section > form > fieldset > button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

header > section > form > fieldset > button:hover {
    background: var(--accent-blue);
}

header > section > form > fieldset > button:focus {
    outline: 3px solid var(--accent-yellow);
    outline-offset: 2px;
    border-radius: var(--border-radius-small);
}

/* ====================================
   5. MAIN INNEHÅLL
==================================== */

main {
    max-width: 800px;
    margin: 0;
    padding: 1.5rem 1.5rem;
}

main > section {
    margin-bottom: 2.5rem;
}

main > section > h2,
main > section > article > header > h2 {
    font-size: 2rem;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 1.2rem;
    padding-bottom: 0.4rem;
    border-bottom: 3px solid var(--accent-yellow);
    letter-spacing: -0.3px;
}

main section ul li,
main section ol li
{
    position: relative;
    left: 20px;
}

.home main section ul li,
.category main section ul li,
.tag main section ul li,
.search main section ul li
{
    position: relative;
    left: 0;
}

/* ====================================
   6. POSTLISTA
==================================== */

main > section > ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

main > section > section > ul,
main > section > section > ol {
    padding: 0;
    margin: 0 0 0 20px;
}

main > section > ul > li {
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 0;
    border-radius: var(--border-radius-small);
    transition: background-color 0.2s ease;
    margin-bottom: 0;
}

main > section > ul > li:hover {
    background-color: var(--secondary-color);
    padding: 1.5rem 1.5rem;
    margin: 0 -1.5rem;
}

main > section > ul > li:last-child {
    border-bottom: none;
}

/* Artikelrubriker */
main > section > ul > li > article > header > h3 > a {
    font-size: 1.5rem;
    font-weight: 400;
    color: #2166ac;
    text-decoration: none;
    display: block;
    margin-bottom: 0.6rem;
    line-height: 1.4;
    letter-spacing: -0.1px;
}

main > section > ul > li > article > header > h3 > a:hover {
    color: var(--primary-color);
}

main > section > ul > li > article > header > h3 > a:focus {
    outline: 3px solid var(--accent-yellow);
    outline-offset: 2px;
    border-radius: var(--border-radius-small);
}

/* Post meta information */
main > section > ul > li > article > header > p {
    color: rgb(51, 51, 51);
    font-size: 0.9rem;
    margin-bottom: 0.6rem;
    font-weight: 400;
    margin-top: 0;
}

main > section > ul > li > article > header > p a {
    color: rgb(51, 51, 51);
    text-decoration: none;
    font-size: 0.9rem;
}

main > section > ul > li > article > header > p a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Post excerpt */
main > section > ul > li > article > p {
    color: #333;
    line-height: 1.7;
    font-size: 1.1rem;
    font-weight: 400;
    letter-spacing: 0.2px;
    margin: 0;
}

/* ====================================
   7. PAGINERING
==================================== */

main > section > footer {
    margin-top: 1.5rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--border-color);
    text-align: right;
}

main > section > footer > nav > ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: space-between;
}

main > section > footer > nav > ul > li {
    margin: 0;
    padding: 0;
}

main > section > footer > nav > ul > li:first-child {
    margin-right: auto;
    margin-left: 0;
}

main > section > footer > nav > ul > li:last-child {
    margin-right: 0;
    margin-left: auto;
}

main > section > footer > nav > ul > li > a {
    display: inline-block;
    color: var(--accent-blue);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 400;
    padding: 0.8rem 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: all 0.2s ease;
    background: var(--white);
}

main > section > footer > nav > ul > li > a:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background: var(--primary-pale);
    transform: translateX(3px);
    text-decoration: none;
}

main > section > footer > nav > ul > li > a:focus {
    outline: 3px solid var(--accent-yellow);
    outline-offset: 2px;
}

/* ====================================
   8. SIDFOT
==================================== */

body > footer {
    background: var(--secondary-color);
    padding: 1.5rem 1.5rem;
    margin-top: 2.5rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.7;
}

body > footer > p {
    max-width: 800px;
    margin: 0;
}

body > footer a {
    color: var(--accent-blue);
    text-decoration: none;
    font-size: 0.9rem;
}

body > footer a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}




/* ====================================
   9. BLOCKQUOTES OCH ANDRA ELEMENT
==================================== */

blockquote {
    font-style: italic;
    margin: 1rem 0;
    padding: 1rem 1.5rem;
    background-color: var(--secondary-color);
    border-left: 4px solid var(--accent-yellow);
    border-radius: var(--border-radius-small);
}

h2, h3, h4, h5, h6 {
    font-weight: 400;
}

/* ====================================
   10. MOBILE RESPONSIVE
==================================== */

@media (max-width: 768px) {
    header > section {
        padding: 1.5rem 1rem;
    }

    header > section > h1 {
        font-size: 2.2rem;
    }

    header > section > p {
        font-size: 1rem;
    }

    main {
        padding: 1.5rem 1rem;
    }

    main > section > h2 {
        font-size: 1.7rem;
    }

    main > section > ul > li > article > header > h3 > a {
        font-size: 1.25rem;
    }

    main > section > footer {
        text-align: center;
    }

    main > section > footer > nav > ul > li > a {
        padding: 1rem 1.5rem;
        font-size: 0.95rem;
    }
}

/* ====================================
   11. TOPPNAVIGATION - FINAL VERSION
==================================== */

/* Hamburgermenyknapp - dölj på desktop */
.hamburger-menu {
    display: none;
    background: none;
    border: none;
    font-size: 1rem;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.5rem;
}

/* Huvudmeny - högerställd */

nav.main-navigation {
    position: absolute;
    top: 0;
    width: 800px;
    margin: 0;
    padding: 0 1.5rem;
}

nav.main-navigation #primary-menu {
    display: flex;
    justify-content: flex-end;
}

nav.main-navigation #primary-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

nav.main-navigation #primary-menu ul li {
    margin: 0;
}

nav.main-navigation #primary-menu ul li a {
    display: inline-block;
    padding: 0.5rem 1rem;
    color: var(--accent-blue);
    text-decoration: none;
    font-weight: 500;
    border-radius: var(--border-radius-small);
    transition: all 0.2s ease;
}

nav.main-navigation #primary-menu ul li a:hover {
    color: var(--primary-color);
    background-color: var(--primary-pale);
}

nav.main-navigation #primary-menu ul li a:focus {
    outline: 3px solid var(--accent-yellow);
    outline-offset: 2px;
}

/* Mobile responsiv design för navigation */
@media (max-width: 768px) {
    nav.main-navigation {
        justify-content: flex-end;
        margin-bottom: 1.5rem;
    }
    
    /* Visa hamburgermenyn på mobil */
    .hamburger-menu {
        display: block;
    }
    
    /* Dölj menyn som standard på mobil */
    nav.main-navigation #primary-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        border: 1px solid var(--border-color);
        border-radius: var(--border-radius);
        margin-top: 0.5rem;
        z-index: 1000;
    }
    
    /* Visa menyn när hela navigation har active-klassen */
    nav.main-navigation.active #primary-menu {
        display: block;
    }
    
    nav.main-navigation #primary-menu ul {
        flex-direction: column;
        gap: 0;
        justify-content: flex-start;
    }
    
    nav.main-navigation #primary-menu ul li a {
        display: block;
        padding: 1rem;
        border-bottom: 1px solid var(--border-color);
        text-align: left;
    }
    
    nav.main-navigation #primary-menu ul li:last-child a {
        border-bottom: none;
    }
}



/* NY STIL FÖR INLÄGG */

/* Styling för enskilt inlägg - anpassad för din HTML-struktur */

/* Artikel-container */
article {
    max-width: 800px;
    margin: 0 auto;
}

/* Artikel-header */
article header h2 {
    font-size: 2rem;
    color: #2c3e50;
    margin: 0.5rem 0 1.5rem 0;
    line-height: 1.3;
    font-weight: 600;
}

/* Post-thumbnail (huvudbild) */
.post-thumbnail {
    margin: 2rem 0;
    text-align: center;
}

.post-thumbnail img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Post-content (huvudinnehåll) */
.post-content {
    margin: 2rem 0;
    line-height: 1.7;
    color: #333;
    font-size: 1.1rem;
}

.post-content p {
    margin-bottom: 1.2rem;
}

.post-content p:last-of-type {
    margin-bottom: 0;
}

.post-content h2 {
    margin-top: 1.2rem;
}

.post-content ul {
    margin-bottom: 1.2rem;
}

/* Separator (horisontell linje) */
.post-content hr {
    margin: 2rem 0;
    border: none;
    border-top: 2px solid #e9ecef;
    opacity: 0.6;
}

/* Källänk-styling */
.source-link {
    margin-top: 2rem !important;
    padding: 1rem;
    background: #f8f9fa;
    border-left: 4px solid #d73502;
    border-radius: 0 4px 4px 0;
    font-size: 0.95rem;
    color: #666;
}

.source-link a {
    text-decoration: none;
    font-weight: 500;
}

.source-link a:hover {
    text-decoration: underline;
}

/* Artikel-footer */
article footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #f1f3f4;
}

/* Post-kategorier och post-etiketter sektion */

.post-categories,
.post-tags {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
}

.post-categories h2 {
    margin: 0 0 1rem 0;
    color: #2c3e50;
    font-size: 1.2rem;
    border-bottom: 2px solid #d73502;
    padding-bottom: 0.5rem;
    text-align: left;
}

.post-tags h2 {
    margin: 0 0 1rem 0;
    color: #2c3e50;
    font-size: 1.2rem;
    border-bottom: 2px solid #5aae61;
    padding-bottom: 0.5rem;
    text-align: left;
}

.post-categories ul,
.post-tags ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.post-categories li {
    background: #f8f9fa;
    border-radius: 20px;
    padding: 0.5rem 1rem;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
}

.post-tags li {
    background: #fff;
    border-radius: 20px;
    padding: 0.5rem 1rem;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
}

.post-categories li:hover {
    background: #d73502;
    border-color: #d73502;
}

.post-tags li:hover {
    background: #5aae61;
    border-color: #5aae61;
}

.post-categories a,
.post-tags a {
    color: #495057;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

footer > .post-tags > ul > li > a:before {
  content:"#";
}

.post-categories li:hover a,
.post-tags li:hover a {
    color: white;
}

/* Post-meta (datum och författare) */
.post-meta {
    margin: 1.5rem 0 0 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #6c757d;
    text-align: left;
}

.post-meta time {
    font-weight: 500;
    color: #495057;
}

.post-meta a {
    text-decoration: none;
    font-weight: 500;
}

.post-meta a:hover {
    text-decoration: underline;
}



/* Responsiv design */
@media (max-width: 768px) {
    article header h2 {
        font-size: 1.6rem;
        margin: 1.5rem 0 1rem 0;
    }
    
    .post-content {
        font-size: 1rem;
        margin: 1.5rem 0;
    }
    
    .post-thumbnail {
        margin: 1.5rem 0;
    }
    
    .post-thumbnail img {
        border-radius: 0;
        width: 100%;
    }
    
    .post-categories ul {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .post-categories li {
        text-align: left;
        width: max-content;
    }
}

