/* Steve Tilford Theme - Based on stevetilford.com */

/* ========================================
   CSS RESET & BASE
   ======================================== */

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    line-height: 1.6;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    padding: 0;
    font-family: "Open Sans", Helvetica, Arial, sans-serif;
    font-size: 1rem;
    color: #444;
    background-color: #e6e6e6;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */

h1, h2, h3, h4, h5, h6 {
    margin: 0 0 0.75em;
    font-weight: 600;
    line-height: 1.3;
    color: #000;
}

h1 { font-size: 2.625rem; } /* 42px */
h2 { font-size: 2.25rem; }  /* 36px */
h3 { font-size: 1.5rem; }   /* 24px */
h4 { font-size: 1.25rem; }  /* 20px */
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

p {
    margin: 0 0 1.5em;
}

a {
    color: #21759b;
    text-decoration: none;
}

a:hover {
    color: #0693e3;
    text-decoration: underline;
}

/* ========================================
   LAYOUT
   ======================================== */

.site-wrapper {
    max-width: 1040px;
    margin: 0 auto;
    background-color: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.site-content {
    display: flex;
    flex-wrap: wrap;
    padding: 30px 40px;
}

.main-content {
    flex: 1 1 65%;
    min-width: 0;
    padding-right: 40px;
}

.sidebar {
    flex: 0 0 200px;
    width: 200px;
}

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

.site-header {
    background-color: #fff;
}

.site-banner {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}

/* ========================================
   NAVIGATION
   ======================================== */

.nav-menu {
    background-color: #fff;
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    margin-top: 10px;
}

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

.nav-menu li {
    margin: 0;
}

.nav-menu a {
    display: block;
    padding: 12px 20px;
    color: #444;
    font-size: 0.875rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-menu a:hover {
    color: #0693e3;
    text-decoration: none;
}

.nav-menu .current_page_item a {
    color: #0693e3;
}

/* ========================================
   SPONSOR BAR
   ======================================== */

.sponsor-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 15px 40px;
    background-color: #f9f9f9;
    border-bottom: 1px solid #e6e6e6;
}

.sponsor-bar img {
    max-height: 40px;
    width: auto;
}

/* ========================================
   POSTS & ARTICLES
   ======================================== */

.post {
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid #e6e6e6;
}

.post:last-child {
    border-bottom: none;
}

.post-header {
    margin-bottom: 20px;
}

.post-title {
    margin: 0 0 10px;
    font-size: 1.75rem;
}

.post-title a {
    color: #000;
}

.post-title a:hover {
    color: #0693e3;
}

.post-meta {
    font-size: 0.8125rem;
    color: #9f9f9f;
}

.post-meta a {
    color: #9f9f9f;
}

.post-meta a:hover {
    color: #0693e3;
}

.post-meta span {
    margin-right: 15px;
}

.post-content {
    line-height: 1.8;
}

.post-content img {
    max-width: 100%;
    height: auto;
    margin: 1em 0;
}

.post-content blockquote {
    margin: 1.5em 0;
    padding: 15px 20px;
    border-left: 4px solid #0693e3;
    background-color: #f9f9f9;
    font-style: italic;
}

.post-content pre,
.post-content code {
    background-color: #f4f4f4;
    font-family: "Consolas", "Monaco", monospace;
    font-size: 0.875rem;
}

.post-content pre {
    padding: 15px;
    overflow-x: auto;
}

.post-content code {
    padding: 2px 6px;
}

.post-footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e6e6e6;
    font-size: 0.8125rem;
    color: #9f9f9f;
}

/* Categories & Tags */
.post-categories,
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
}

.post-categories a,
.post-tags a {
    display: inline-block;
    padding: 3px 10px;
    background-color: #e6e6e6;
    border-radius: 3px;
    font-size: 0.75rem;
    color: #444;
}

.post-categories a:hover,
.post-tags a:hover {
    background-color: #0693e3;
    color: #fff;
    text-decoration: none;
}

/* ========================================
   SIDEBAR
   ======================================== */

.widget {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #ddd;
}

.widget:last-child {
    border-bottom: none;
}

.widget-title {
    margin: 0 0 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #000;
}

.widget ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.widget li {
    margin-bottom: 8px;
    font-size: 0.85rem;
}

.widget li:last-child {
    margin-bottom: 0;
}

.widget a {
    color: #444;
}

.widget a:hover {
    color: #0693e3;
}

/* Search Widget */
.search-form {
    display: flex;
}

.search-field {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #e6e6e6;
    border-right: none;
    font-size: 0.875rem;
}

.search-field:focus {
    outline: none;
    border-color: #0693e3;
}

.search-submit {
    padding: 10px 15px;
    background-color: #21759b;
    border: none;
    color: #fff;
    font-size: 0.875rem;
    cursor: pointer;
}

.search-submit:hover {
    background-color: #0693e3;
}

/* Archives Dropdown */
.widget select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e6e6e6;
    font-size: 0.875rem;
    background-color: #fff;
}

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

.site-footer {
    padding: 30px 40px;
    background-color: #000;
    color: #9f9f9f;
    font-size: 0.8125rem;
    text-align: center;
}

.site-footer a {
    color: #fff;
}

.site-footer a:hover {
    color: #0693e3;
}

.footer-links {
    margin-bottom: 15px;
}

.footer-links a {
    margin: 0 10px;
}

/* ========================================
   BUTTONS
   ======================================== */

.button,
.wp-block-button__link {
    display: inline-block;
    padding: 12px 24px;
    background-color: #32373c;
    border: none;
    border-radius: 9999px;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s;
}

.button:hover,
.wp-block-button__link:hover {
    background-color: #0693e3;
    color: #fff;
    text-decoration: none;
}

/* ========================================
   POST COMMENTS
   ======================================== */

.post-comments {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #ddd;
}

.comments-heading {
    margin-bottom: 20px;
    font-size: 1.25rem;
}

.post-comments h3 {
    margin: 0 0 4px;
    font-size: 0.85rem;
    color: #21759b;
}

.post-comments p {
    font-size: 0.85rem;
}

.post-comments h3 a {
    color: #21759b;
}

.post-comments em {
    font-size: 0.8rem;
    color: #888;
}

.post-comments hr {
    margin: 20px 0;
    border: none;
    border-top: 1px solid #e6e6e6;
}

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

.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
    margin: 40px 0;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 8px 14px;
    background-color: #e6e6e6;
    color: #444;
    font-size: 0.875rem;
}

.pagination a:hover {
    background-color: #0693e3;
    color: #fff;
    text-decoration: none;
}

.pagination .current {
    background-color: #21759b;
    color: #fff;
}

/* ========================================
   IMAGE GALLERY
   ======================================== */

.gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 1.5em 0;
}

.gallery-item {
    overflow: hidden;
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.2s;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Gallery table (markdown-converted) */
.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
}

.post-content table img {
    max-width: 100%;
    margin: 0;
}

/* ========================================
   COMMENTS
   ======================================== */

.comments-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e6e6e6;
}

.comments-title {
    margin-bottom: 30px;
}

.comment {
    margin-bottom: 25px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 4px;
}

.comment-meta {
    margin-bottom: 10px;
    font-size: 0.8125rem;
    color: #9f9f9f;
}

.comment-author {
    font-weight: 700;
    color: #000;
}

.comment-content {
    line-height: 1.7;
}

/* ========================================
   ARCHIVE & INDEX PAGES
   ======================================== */

.archive-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e6e6e6;
}

.archive-title {
    margin: 0;
}

.archive-description {
    margin-top: 10px;
    color: #9f9f9f;
}

.post-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.post-list li {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e6e6e6;
}

.post-list .post-date {
    display: inline-block;
    min-width: 100px;
    color: #9f9f9f;
    font-size: 0.875rem;
}

.post-list .comment-count {
    color: #9f9f9f;
    font-size: 0.85em;
}

/* ========================================
   IMAGE GALLERY
   ======================================== */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 30px;
}

.gallery-item {
    margin: 0;
    overflow: hidden;
    border-radius: 4px;
    background: #f5f5f5;
}

.gallery-item a img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    background: #f5f5f5;
    transition: transform 0.2s ease;
}

.gallery-item a:hover img {
    transform: scale(1.05);
}

.gallery-item figcaption {
    padding: 6px 8px;
    font-size: 0.75rem;
    line-height: 1.4;
}

.gallery-item figcaption a {
    color: #21759b;
    text-decoration: none;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gallery-item figcaption a:hover {
    color: #0693e3;
    text-decoration: underline;
}

.gallery-date {
    color: #9f9f9f;
    font-size: 0.7rem;
}

.gallery-page h2 {
    margin-top: 30px;
    border-bottom: 1px solid #e6e6e6;
    padding-bottom: 6px;
}

@media (max-width: 600px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   UTILITIES
   ======================================== */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.has-text-align-center { text-align: center; }

.has-background {
    padding: 20px;
}

.has-vivid-cyan-blue-color { color: #0693e3; }
.has-vivid-purple-color { color: #9b51e0; }
.has-white-color { color: #fff; }
.has-black-color { color: #000; }

.has-vivid-cyan-blue-background-color { background-color: #0693e3; }
.has-vivid-purple-background-color { background-color: #9b51e0; }
.has-white-background-color { background-color: #fff; }
.has-black-background-color { background-color: #000; }

.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;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 900px) {
    .site-content {
        padding: 20px;
    }

    .main-content {
        flex: 1 1 100%;
        padding-right: 0;
        margin-bottom: 40px;
    }

    .sidebar {
        flex: 1 1 100%;
        width: 100%;
    }
}

@media (max-width: 600px) {
    html {
        font-size: 14px;
    }

    .site-header,
    .site-content,
    .site-footer {
        padding: 15px;
    }

    .nav-menu ul {
        flex-direction: column;
    }

    .nav-menu a {
        padding: 10px 15px;
    }

    .gallery {
        grid-template-columns: repeat(2, 1fr);
    }

    .sponsor-bar {
        gap: 10px;
        padding: 10px 15px;
    }

    .sponsor-bar img {
        max-height: 30px;
    }
}
