/* Johnnie From The Blog - Main Stylesheet */

/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background: #e8e8e8 url('images/bg-texture.png') repeat;
    background-color: #e2e2e2;
}
a { color: #4AA4D8; text-decoration: none; }
a:hover { color: #2365a7; text-decoration: underline; }
img { max-width: 100%; height: auto; }
p { margin-bottom: 1em; }
h1, h2, h3, h4, h5, h6 { margin-bottom: 0.5em; line-height: 1.3; color: #222; }

/* === LAYOUT === */
#wrapper { min-height: 100vh; }
.container { max-width: 900px; margin: 0 auto; padding: 0 20px; }

/* === HEADER === */
#header {
    background: #fff;
    padding: 10px 0;
    border-bottom: 3px solid #d0d0d0;
    box-shadow: 0 2px 5px rgba(0,0,0,.15);
}
#logo img { max-width: 960px; width: 100%; height: auto; display: block; }
#logo a { display: block; }

/* === NAV BAR === */
#nav-bar {
    background: linear-gradient(to bottom, #f8f8f8 0%, #ddd 100%);
    border-bottom: 1px solid #bbb;
    border-top: 1px solid #e8e8e8;
}
#nav-bar nav ul { list-style: none; display: flex; flex-wrap: wrap; padding: 0; margin: 0; }
#nav-bar nav ul li { border-right: 1px solid #fff; border-left: 1px solid #bbb; }
#nav-bar nav ul li a {
    display: block;
    padding: 8px 16px;
    color: #111;
    font-size: 13px;
    font-style: italic;
    text-shadow: 0 1px 0 #fff;
    transition: background 0.1s;
}
#nav-bar nav ul li a:hover {
    background: rgba(0,0,0,.1);
    text-decoration: none;
    color: #000;
}

/* === MAIN CONTENT AREA === */
#main { padding: 20px 20px; }
#content {
    background: #fff;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0,0,0,.1);
    padding: 0;
    min-height: 400px;
}

/* === ARTICLE === */
.entry {
    padding: 25px 30px;
    border-bottom: 1px solid #eee;
}
.entry:last-child { border-bottom: none; }
.entry-header {
    background: rgba(255,255,255,.6);
    border-left: 4px solid #4AA4D8;
    padding: 10px 15px;
    margin-bottom: 20px;
    border-radius: 0 3px 3px 0;
    box-shadow: 0 1px 2px rgba(0,0,0,.08);
}
.entry-header .entry-title {
    font-size: 1.6em;
    margin: 0 0 5px;
    color: #000;
}
.entry-header .entry-title a { color: #000; }
.entry-header .entry-title a:hover { color: #4AA4D8; text-decoration: none; }
.entry-meta {
    font-size: 12px;
    color: #888;
    font-style: italic;
}
.entry-meta a { color: #888; }
.entry-content {
    font-size: 14px;
    line-height: 1.7;
    color: #333;
}
.entry-content img {
    margin: 5px;
    border: 3px solid #ddd;
    max-width: 100%;
    height: auto;
}
.entry-content img.alignleft  { float: left;  margin-right: 15px; margin-bottom: 10px; }
.entry-content img.alignright { float: right; margin-left: 15px;  margin-bottom: 10px; }
.entry-content img.aligncenter { display: block; margin: 10px auto; }
.entry-content a { color: #4AA4D8; }
.entry-content a:hover { color: #2365a7; }
.entry-content h1, .entry-content h2, .entry-content h3 { margin: 1em 0 .5em; }
.entry-content ul, .entry-content ol { padding-left: 1.5em; margin-bottom: 1em; }
.clearfix::after { content: ""; display: table; clear: both; }

/* Gallery note */
.gallery-note { font-style: italic; color: #888; background: #f9f9f9; padding: 8px 12px; border-left: 3px solid #ddd; }

/* === INDEX PAGE === */
.index-header {
    background: linear-gradient(to bottom, #f8f8f8, #eee);
    padding: 20px 30px;
    border-bottom: 1px solid #ddd;
}
.index-header h1 { font-size: 1.5em; color: #333; margin: 0; }
.index-header p { color: #777; font-size: 13px; font-style: italic; }

.article-list { list-style: none; padding: 0; }
.article-list li {
    display: flex;
    align-items: baseline;
    gap: 15px;
    padding: 12px 30px;
    border-bottom: 1px solid #f0f0f0;
    transition: background .1s;
}
.article-list li:hover { background: #f9f9f9; }
.article-list li:last-child { border-bottom: none; }
.article-date {
    font-size: 11px;
    color: #999;
    font-style: italic;
    white-space: nowrap;
    min-width: 90px;
}
.article-link {
    font-size: 15px;
    color: #333;
    font-weight: bold;
}
.article-link:hover { color: #4AA4D8; text-decoration: none; }

/* Group headers for year */
.year-group {
    padding: 8px 30px;
    background: linear-gradient(to bottom, #f0f0f0, #e8e8e8);
    border-bottom: 1px solid #d8d8d8;
    border-top: 1px solid #e8e8e8;
    font-size: 12px;
    font-weight: bold;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Back-to-index link */
.back-link {
    display: inline-block;
    margin: 20px 30px;
    font-size: 13px;
    color: #888;
}
.back-link:hover { color: #4AA4D8; }

/* === FOOTER === */
#footer {
    background: linear-gradient(to bottom, #3a3a3a, #222);
    color: #aaa;
    padding: 20px 0;
    margin-top: 30px;
    font-size: 12px;
    text-align: center;
}
#footer a { color: #4AA4D8; }
#footer a:hover { color: #fff; }
#footer p { margin: 4px 0; }

/* === TEMPLATE BANNER === */
.template-notice {
    background: #fffbea;
    border: 2px dashed #f0c030;
    padding: 20px;
    margin: 20px;
    border-radius: 5px;
    font-size: 14px;
    color: #666;
}
.template-notice h2 { color: #cc9900; margin-bottom: 10px; }
.template-notice code { background: #f0f0f0; padding: 2px 5px; border-radius: 3px; }

/* === RESPONSIVE === */
@media (max-width: 640px) {
    .container { padding: 0 10px; }
    .entry { padding: 15px; }
    .entry-header { padding: 8px 12px; }
    .entry-header .entry-title { font-size: 1.3em; }
    .article-list li { flex-direction: column; gap: 2px; padding: 10px 15px; }
    .article-date { min-width: auto; }
    .index-header { padding: 15px; }
    .back-link { margin: 15px; }
    .year-group { padding: 8px 15px; }
}
