/*
Theme Name: Koranen & Sunnah
Theme URI: https://example.com/
Author: Bilal
Description: Rent, professionellt tema inspirerat av islam.se
Version: 1.0
Text Domain: koranen-sunnah
*/

:root {
    --color-primary: #4A3A28;
    --color-primary-dark: #3a2d1f;
    --color-accent: #d4b88a;
    --color-bg: #ffffff;
    --color-text: #222222;
    --color-muted: #777777;
    --color-footer-bg: #2b2118;
    --font-heading: "Playfair Display", "Times New Roman", serif;
    --font-body: "Open Sans", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.7;
    font-size: 16px;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--color-primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    margin-top: 0;
    color: var(--color-primary);
}

/* Layout */

.site-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-main {
    flex: 1;
}

/* Container */

.container {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--color-primary);
    color: #ffffff;
}

.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.site-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    margin: 0;
    color: #ffffff;
}

.site-description {
    margin: 0;
    font-size: 0.8rem;
    color: #e0e0e0;
}

/* Navigation */

.main-navigation {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1rem;
}

.main-navigation a {
    color: #ffffff;
    font-size: 0.95rem;
    padding: 0.4rem 0.2rem;
    position: relative;
}

.main-navigation li {
    position: relative;
}

/* Dropdown */

.main-navigation ul ul {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--color-primary-dark);
    padding: 0.5rem 0;
    min-width: 180px;
    display: none;
    flex-direction: column;
}

.main-navigation ul li:hover > ul {
    display: flex;
}

.main-navigation ul ul li {
    width: 100%;
}

.main-navigation ul ul a {
    padding: 0.4rem 0.8rem;
}

/* Search icon */

.header-search {
    margin-left: 1rem;
    cursor: pointer;
    color: #ffffff;
    font-size: 1.1rem;
}

/* Mobile nav */

.menu-toggle {
    display: none;
    background: none;
    border: 1px solid #ffffff;
    color: #ffffff;
    padding: 0.3rem 0.6rem;
    border-radius: 3px;
    font-size: 0.9rem;
}

/* Hero section */

.hero {
    position: relative;
    color: #ffffff;
    background-color: #222;
    min-height: 320px;
    display: flex;
    align-items: center;
}

.hero-background {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
}

.hero-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.45);
}

.hero-inner {
    position: relative;
    z-index: 1;
    padding: 3rem 0;
}

.hero-content {
    max-width: 600px;
}

.hero-title {
    font-size: 2.4rem;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.hero-excerpt {
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
    color: #f5f5f5;
}

.btn-primary {
    display: inline-block;
    background-color: var(--color-accent);
    color: #2b2118;
    padding: 0.7rem 1.4rem;
    border-radius: 3px;
    font-weight: 600;
    font-size: 0.95rem;
}

.btn-primary:hover {
    filter: brightness(0.95);
    text-decoration: none;
}

/* Content + sidebar layout */

.content-area {
    padding: 2.5rem 0;
}

.content-grid {
    display: grid;
    grid-template-columns: 70% 30%;
    gap: 2rem;
}

/* Sidebar */

.sidebar {
    font-size: 0.95rem;
}

.widget {
    margin-bottom: 2rem;
}

.widget-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
    border-bottom: 2px solid var(--color-accent);
    display: inline-block;
    padding-bottom: 0.2rem;
}

.widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.widget ul li {
    margin-bottom: 0.4rem;
}

/* Article cards grid */

.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}

.post-card {
    background-color: #ffffff;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 0 0 rgba(0,0,0,0);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    box-shadow: 0 8px 18px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.post-card-thumb img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.post-card-body {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-card-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-accent);
    margin-bottom: 0.4rem;
}

.post-card-title {
    font-size: 1.05rem;
    margin-bottom: 0.4rem;
}

.post-card-excerpt {
    font-size: 0.9rem;
    color: var(--color-muted);
    margin-bottom: 0.8rem;
    flex: 1;
}

.post-card-meta {
    font-size: 0.8rem;
    color: var(--color-muted);
}

/* Single / page */

.entry-header {
    margin-bottom: 1.5rem;
}

.entry-meta {
    font-size: 0.85rem;
    color: var(--color-muted);
    margin-bottom: 1rem;
}

.entry-content {
    font-size: 1rem;
}

.entry-content p {
    margin-bottom: 1rem;
}

/* Footer */

.site-footer {
    background-color: var(--color-footer-bg);
    color: #f0f0f0;
    margin-top: 3rem;
}

.footer-widgets {
    padding: 2.5rem 0 1.5rem;
}

.footer-widgets-inner {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2rem;
    font-size: 0.95rem;
}

.site-footer a {
    color: #f0f0f0;
}

.site-footer a:hover {
    text-decoration: underline;
}

.footer-bottom {
    border-top: 1px solid #3b3026;
    padding: 0.8rem 0;
    font-size: 0.8rem;
    text-align: center;
    color: #c0c0c0;
}

/* Forms */

input[type="search"],
input[type="text"],
input[type="email"],
textarea {
    width: 100%;
    padding: 0.5rem 0.6rem;
    border-radius: 3px;
    border: 1px solid #ccc;
    font-family: var(--font-body);
    font-size: 0.95rem;
}

button,
input[type="submit"] {
    font-family: var(--font-body);
    cursor: pointer;
}

/* Responsivitet */

@media (max-width: 992px) {
    .posts-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer-widgets-inner {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .content-grid {
        grid-template-columns: 100%;
    }
}

@media (max-width: 768px) {
    .site-header-inner {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .main-navigation {
        display: none;
        width: 100%;
        flex-direction: column;
        margin-top: 0.5rem;
    }

    .main-navigation ul {
        flex-direction: column;
        gap: 0;
    }

    .main-navigation ul ul {
        position: static;
        background-color: var(--color-primary-dark);
        padding-left: 1rem;
    }

    .menu-toggle {
        display: inline-block;
        margin-left: auto;
    }

    .main-navigation.toggled {
        display: flex;
    }

    .posts-grid {
        grid-template-columns: 1fr;
    }

    .footer-widgets-inner {
        grid-template-columns: 1fr;
    }
}
