/*
Theme Name: Struct
Theme URI: 
Author: Rikard
Author URI: 
Description: Ett minimalistiskt och stilrent WordPress-tema med fokus på läsbarhet och enkel struktur.
Version: 1.0.0
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: struct
*/

/* ==========================================================================
   RESET & GRUNDLÄGGANDE
   ========================================================================== */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    background: #fff;
    color: #000;
    line-height: 1.5;
    padding: 40px 20px;
}

main {
    max-width: 900px;
    margin: 0 auto;
}

/* ==========================================================================
   HEADER
   ========================================================================== */

header {
    margin-bottom: 60px;
}

header h1 {
    font-size: 3em;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.1;
}

header h1 a {
    color: #000;
    text-decoration: none;
    border-bottom: none;
}

header h1 a:hover {
    background: #ff0066;
    color: white;
}

header p {
    font-size: 1.1em;
    color: #666;
    margin-bottom: 20px;
}

/* ==========================================================================
   SÖKFORMULÄR
   ========================================================================== */

header form {
    margin-top: 20px;
}

header fieldset {
    border: none;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

header input[type="search"] {
    padding: 10px 15px;
    font-size: 1em;
    border: 2px solid #000;
    background: #fff;
    min-width: 250px;
}

header input[type="search"]:focus {
    outline: none;
    border-color: #ff0066;
}

header button[type="submit"] {
    padding: 10px 20px;
    font-size: 1em;
    background: #000;
    color: #fff;
    border: 2px solid #000;
    cursor: pointer;
    font-weight: 600;
}

header button[type="submit"]:hover {
    background: #ff0066;
    border-color: #ff0066;
}

/* ==========================================================================
   TYPOGRAFI
   ========================================================================== */

h1 {
    font-size: 3em;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.1;
}

h2 {
    font-size: 1.8em;
    font-weight: 700;
    margin-top: 50px;
    margin-bottom: 20px;
}

h3 {
    font-size: 1.3em;
    font-weight: 600;
    margin-top: 30px;
    margin-bottom: 15px;
}

p {
    margin-bottom: 20px;
    font-size: 1.1em;
}

.intro {
    font-size: 1.3em;
    line-height: 1.6;
    margin-bottom: 40px;
    max-width: 700px;
}

/* ==========================================================================
   SEKTIONER & LISTOR
   ========================================================================== */

section {
    margin-bottom: 50px;
}

ul {
    margin-left: 20px;
    margin-bottom: 20px;
}

li {
    margin-bottom: 12px;
    font-size: 1.1em;
}

/* Inläggslista utan punkter */
main > section > ul {
    list-style: none;
    margin-left: 0;
}

main > section > ul > li {
    padding: 30px 0;
    border-bottom: 1px solid #eee;
}

main > section > ul > li:first-child {
    padding-top: 0;
}

/* ==========================================================================
   ARTIKLAR
   ========================================================================== */

article header h3 {
    margin-top: 0;
    margin-bottom: 10px;
}

article header h3 a {
    color: #000;
    text-decoration: none;
    border-bottom: none;
}

article header h3 a:hover {
    color: #ff0066;
}

article header p {
    font-size: 0.95em;
    color: #666;
    margin-bottom: 15px;
}

article header p a {
    color: #666;
    border-bottom-color: #ccc;
}

article header p a:hover {
    background: #ff0066;
    color: white;
    border-bottom-color: #ff0066;
}

/* Enskilt inlägg */
article > header h2 {
    margin-top: 0;
}

.post-content,
.page-content {
    margin: 30px 0;
}

.post-content p,
.page-content p {
    margin-bottom: 20px;
}

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

/* Featured image */
.post-thumbnail,
.page-thumbnail {
    margin: 30px 0;
}

.post-thumbnail img,
.page-thumbnail img {
    max-width: 100%;
    height: auto;
}

/* Post meta */
.post-meta {
    font-size: 0.95em;
    color: #666;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* Kategorier och taggar */
.post-categories,
.post-tags {
    margin: 20px 0;
}

.post-categories h2,
.post-tags h2 {
    font-size: 1em;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 10px;
}

.post-categories ul,
.post-tags ul {
    list-style: none;
    margin-left: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.post-categories li,
.post-tags li {
    margin-bottom: 0;
}

.post-categories a,
.post-tags a {
    display: inline-block;
    padding: 5px 12px;
    background: #f5f5f5;
    color: #000;
    font-size: 0.9em;
    border-bottom: none;
}

.post-categories a:hover,
.post-tags a:hover {
    background: #ff0066;
    color: white;
}

/* ==========================================================================
   NAVIGATION - MENY
   ========================================================================== */

.main-navigation {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #000;
}

.nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.nav-menu li {
    margin-bottom: 0;
}

.nav-menu a {
    color: #000;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    padding-bottom: 2px;
    font-weight: 500;
}

.nav-menu a:hover,
.nav-menu .current-menu-item a {
    border-bottom-color: #ff0066;
}

/* Hamburger-knapp (dold på desktop) */
.hamburger-menu {
    display: none;
    background: none;
    border: 2px solid #000;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
}

.hamburger-menu:hover {
    background: #000;
    color: #fff;
}

/* ==========================================================================
   PAGINATION
   ========================================================================== */

nav[aria-label="Inlägg-navigation"] ul {
    list-style: none;
    margin: 40px 0 0 0;
    padding: 0;
    display: flex;
    justify-content: space-between;
}

nav[aria-label="Inlägg-navigation"] li {
    margin-bottom: 0;
}

nav[aria-label="Inlägg-navigation"] a {
    color: #000;
    font-weight: 600;
}

/* Sidnavigation inom inlägg */
.page-links {
    margin: 30px 0;
    padding: 20px 0;
    border-top: 1px solid #eee;
}

/* ==========================================================================
   SPECIALKLASSER
   ========================================================================== */

.highlight {
    background: #ff0066;
    color: white;
    padding: 2px 6px;
    font-weight: 600;
}

.info-block {
    background: #f5f5f5;
    padding: 30px;
    margin: 30px 0;
}

.info-block p:last-child {
    margin-bottom: 0;
}

.cta {
    margin-top: 60px;
    padding: 40px 0;
    border-top: 2px solid #000;
}

.cta p {
    font-size: 1.2em;
    font-weight: 600;
}

/* ==========================================================================
   LÄNKAR
   ========================================================================== */

a {
    color: #ff0066;
    text-decoration: none;
    border-bottom: 2px solid #ff0066;
}

a:hover {
    background: #ff0066;
    color: white;
}

/* ==========================================================================
   KOD
   ========================================================================== */

code {
    background: #f5f5f5;
    padding: 2px 6px;
    font-family: 'SF Mono', Monaco, Consolas, monospace;
    font-size: 0.95em;
}

a code {
    background: transparent;
}

pre {
    background: #f5f5f5;
    padding: 20px;
    overflow-x: auto;
    margin-bottom: 20px;
}

pre code {
    padding: 0;
    background: transparent;
}

/* ==========================================================================
   SIDOPANEL
   ========================================================================== */

aside {
    max-width: 900px;
    margin: 60px auto 0;
    padding-top: 40px;
    border-top: 2px solid #000;
}

aside .widget {
    margin-bottom: 40px;
}

aside .widget-title {
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 15px;
}

aside ul {
    list-style: none;
    margin-left: 0;
}

aside li {
    margin-bottom: 8px;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

body > footer {
    max-width: 900px;
    margin: 60px auto 0;
    padding: 40px 0;
    border-top: 2px solid #000;
    font-size: 0.95em;
    color: #666;
}

/* ==========================================================================
   TILLGÄNGLIGHET
   ========================================================================== */

.skip {
    position: absolute;
    top: -40px;
    left: 0;
    background: #ff0066;
    color: white;
    padding: 10px 20px;
    z-index: 1000;
    border-bottom: none;
}

.skip:focus {
    top: 0;
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ==========================================================================
   RESPONSIV DESIGN
   ========================================================================== */

@media (max-width: 768px) {
    body {
        padding: 20px 15px;
    }
    
    h1,
    header h1 {
        font-size: 2em;
    }
    
    h2 {
        font-size: 1.5em;
    }
    
    .intro {
        font-size: 1.1em;
    }
    
    header input[type="search"] {
        min-width: 100%;
    }
    
    /* Mobil meny */
    .hamburger-menu {
        display: block;
        margin-bottom: 15px;
    }
    
    .nav-menu {
        display: none;
        flex-direction: column;
        gap: 10px;
        padding-top: 15px;
    }
    
    .main-navigation.active .nav-menu {
        display: flex;
    }
    
    .hamburger-menu.active {
        background: #000;
        color: #fff;
    }
}

/* ==========================================================================
   WORDPRESS SPECIFIKT
   ========================================================================== */

/* Bildklasser */
.alignleft {
    float: left;
    margin: 0 20px 20px 0;
}

.alignright {
    float: right;
    margin: 0 0 20px 20px;
}

.aligncenter {
    display: block;
    margin: 20px auto;
}

.wp-caption {
    max-width: 100%;
    margin-bottom: 20px;
}

.wp-caption-text {
    font-size: 0.9em;
    color: #666;
    padding: 10px 0;
}

/* Galleri */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.gallery-item {
    margin: 0;
}

.gallery-item img {
    width: 100%;
    height: auto;
}

/* Block editor */
.wp-block-image {
    margin-bottom: 20px;
}

.wp-block-quote {
    border-left: 4px solid #ff0066;
    padding-left: 20px;
    margin: 30px 0;
    font-style: italic;
}

.wp-block-quote cite {
    font-style: normal;
    font-size: 0.9em;
    color: #666;
}
