/* Root Variables */
:root {
    --primary-bg: #E9EDC8;
    --primary-text: #333d29;
    --secondary-text: #333d29;
    --link-color: #686b5a;
    --shadow-color: rgba(0, 0, 0, 0.15);
}

/* Font Faces */
@font-face {
    font-family: 'Artifika';
    src: url('/fonts/Artifika-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Artifika';
    src: url('/fonts/Taviraj-ExtraBold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
}

/* Base Elements Styles */
html {
    background-color: var(--primary-bg);
}

body {
    font-family: 'Artifika', sans-serif;
    color: var(--secondary-text);
    min-height: 100vh;
    margin: 0 auto;
    line-height: 1.6;
}

.post a, a:visited {
    color: var(--link-color);
    text-decoration: none;
    text-decoration-color: #868873;
    position: relative;
    transition: color 0.3s ease;
}

.post a:hover, a:focus {
    color: var(--primary-text);
    background-color: #EDEEE1;
    transition: color 0.3s ease, background-color 0.3s ease;
}

.card a, a:visited {
    color: var(--link-color);
    text-decoration: none;
    text-decoration-color: #868873;
    position: relative;
    transition: color 0.3s ease, background-color 0.3s ease;
}

details {
    padding: 0.5rem 0;
}

ul {
    padding: 0;
}

img {
    max-width: 100%;
}

figure {
    display: flex;
    justify-content: center;
    align-items: center;
}

figcaption {
    text-align: center;
    font-size: 0.9rem;
}

/* Navigation Styles */
nav ul {
    display: flex;
    margin: 0.5rem 0;
    padding: 0;
    color: red;
}

nav ul li {
    display: inline;
    list-style: none;
    margin: 0.5rem;
    color: red;
}

nav a {
    color: #686b5a;
    text-decoration: underline;
    position: relative;
    transition: color 0.3s ease;
}

nav a:hover, a:focus {
    color: #000;
    transition: color 0.3s ease;
}

/* Header Styles */
header {
    display: flex;
    justify-content: space-between;
    padding: 10px 20px;
}

header .logo img {
    height: 50px;
}

/* Hero Section Styles */
.hero {
    background-size: cover;
    min-height: 30vw;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    border-radius: 10px;
}

.hero div {
    padding: 0 1rem;
}

.hero h1, .hero p, .hero .subtitle {
    margin: 0;
}

/* Search Styles */

.hero .search form {
    padding: 2rem;
}

.form-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 5px;
}

.form-inline input[type="text"] {
    flex-grow: 1;
    padding: 8px 12px;
    border: 1px solid var(--primary-bg); 
    border-radius: 4px;
    outline: none;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.form-inline input[type="text"]:focus {
    border-color: var(--shadow-color);
}

.form-inline button {
    min-height: 34px;
    padding: 8px 16px;
    background-color: var(--link-color);
    color: var(--primary-bg);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.form-inline button:hover {
    background-color: var(--link-color);
}

ul.search-results {
    list-style-type: none;
}

ul.search-results li {
    padding: 0.5rem 1rem;
}

ul.search-results li a {
    font-weight: bold;
}

/* Blog Cards Styles */
.blog-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 3rem;
    padding: 20px;
}

.card {
    background-color: #fffcf2;
    border-radius: 10px;
    box-shadow: 0 16px 48px var(--shadow-color);
}

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
}

.card .text {
    padding: 0 1rem;
}

.card .text .small {
    font-size: 0.9rem;
}

.card a {
    color: var(--primary-text);
}

.card h2 {
    margin-bottom: -1rem;
}

/* Post Styles */
.post {
    background-color: #fffcf2;
    border-radius: 10px;
    box-shadow: 0 16px 48px var(--shadow-color);
}

.post ul {
    padding-left: 2rem;
}

.post img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 10px;
}

.aff {
    max-width: 80%;
    font-size: 0.8rem;
    font-style: italic;
    text-align: center;
    margin: 0 auto;
    padding-top: 4rem;
}

/* Footer Styles */
footer {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: var(--primary-text);
    font-size: 0.8rem;
}

footer div {
    min-width: 5rem;
}

.social-media a, footer .social-media a svg {
    color: var(--link-color);
    fill: currentColor;
}

.social-media a img {
    height: 20px;
}

.logo {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo p {
    margin: 5px 0 0;
    font-size: 0.8rem;
}

/* Pagination Styles */
.pagination {
    min-width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    margin: 1rem;
}

.pagination .pages {
    a {
        padding: 0 1rem;
    }
}

/* Markdown Styles */
.post h1 {
    margin-bottom: -1rem;
}
.post h2 {
    margin-bottom: -1rem;
}

/* Responsive Styles */
@media (max-width: 600px) {
    footer {
        flex-direction: column;
        text-align: center;
    }

    .blog-cards {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 641px) {
    .hero {
        min-height: 300px;
    }

    .hero h1 {
        font-size: 3rem;
    }

    main {
        max-width: 800px;
        margin: 3rem auto;
    }

    .post {
        padding: 0 5rem; padding-top: 2rem; padding-bottom: 2rem;
    }

    nav ul {
        padding: 0 !important;
    }

    nav ul li {
        margin-left: 1rem;
    }
}

/* Base style for code blocks */
pre {
    font-family: 'Fira Code', 'Consolas', 'Monaco', monospace;
    border-radius: 8px;
    overflow-x: auto;
}

pre {
    padding: 1em;
    line-height: 1.4;
    margin-bottom: 20px;
}

code {
    padding: 0.2em 0.4em;
}

pre {
    transition: all 0.3s ease-in-out;
}

.banner {
  text-align: center;
  font-size: 1.5rem;
}

.banner h1 {
    margin: 0px;
}
