/* =========================================================================
   Aurio Ghost Theme - Main Stylesheet
   ========================================================================= */

/* Reset & Base Styles
   ========================================================================= */

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

html {
    font-size: 16px;
    line-height: 1.6;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: #333;
    background-color: #f8f9fa;
}

a {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #004080;
}

img {
    max-width: 100%;
    height: auto;
}

/* Header
   ========================================================================= */

.site-header {
    background-color: #fff;
    border-bottom: 1px solid #e1e8ed;
    padding: 0.5rem 0;
    margin-bottom: 1rem;
}

.site-header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex: 1;
    justify-content: flex-end;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.site-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
}

.site-logo:hover {
    color: #0066cc;
}

.site-logo img {
    height: 40px;
    width: auto;
}

.site-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #555;
}

.site-nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.site-nav a {
    color: #555;
    font-weight: 500;
}

/* Search Box
   ========================================================================= */

.search-box {
    position: relative;
    max-width: 300px;
}

.search-input {
    width: 100%;
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    border: 1px solid #e1e8ed;
    border-radius: 4px;
    font-size: 0.9375rem;
    transition: border-color 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: #0066cc;
}

.search-clear {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #888;
    cursor: pointer;
    padding: 0;
    width: 1.5rem;
    height: 1.5rem;
    line-height: 1;
    transition: color 0.2s ease;
}

.search-clear:hover {
    color: #333;
}

.search-active .post-card {
    transition: opacity 0.2s ease;
}

.post-card.search-hidden {
    display: none;
}

/* Archive Dropdown
   ========================================================================= */

.archive-dropdown-container {
    position: relative;
}

.archive-dropdown {
    padding: 0.5rem 0.75rem;
    border: 1px solid #e1e8ed;
    border-radius: 4px;
    font-size: 0.9375rem;
    color: #333;
    background-color: #fff;
    cursor: pointer;
    transition: border-color 0.2s ease;
    min-width: 150px;
}

.archive-dropdown:hover {
    border-color: #0066cc;
}

.archive-dropdown:focus {
    outline: none;
    border-color: #0066cc;
}

/* Main Layout
   ========================================================================= */

.site-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
    margin-bottom: 4rem;
}

.site-content {
    min-width: 0;
}

/* Post Feed (Home Page)
   ========================================================================= */

.page-header {
    margin-bottom: 3rem;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #1a1a1a;
}

.page-image {
    margin: 2rem 0;
    border-radius: 8px;
    overflow: hidden;
}

.page-description {
    font-size: 1.125rem;
    color: #666;
}

.post-feed {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.post-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.post-card-image-link {
    display: block;
    overflow: hidden;
}

.post-card-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card:hover .post-card-image {
    transform: scale(1.05);
}

.post-card-content {
    padding: 1.5rem;
}

.post-card-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.post-card-title a {
    color: #1a1a1a;
}

.post-card-excerpt {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.post-card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: #888;
}

.post-card-tag {
    color: #0066cc;
    font-weight: 500;
}

/* Full Post
   ========================================================================= */

.post-full {
    background: #fff;
    border-radius: 8px;
    padding: 3rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.post-full-header {
    margin-bottom: 2rem;
}

.post-full-tags {
    margin-bottom: 1rem;
}

.post-full-tags a {
    color: #0066cc;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.post-full-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #1a1a1a;
}

.post-full-custom-excerpt {
    font-size: 1.25rem;
    color: #666;
    margin-bottom: 1rem;
}

.post-full-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.9375rem;
    color: #888;
}

.post-full-image {
    margin: 2rem 0;
    border-radius: 8px;
    overflow: hidden;
}

.post-full-content {
    font-size: 1.125rem;
    line-height: 1.7;
    color: #333;
}

.post-full-content h1,
.post-full-content h2,
.post-full-content h3,
.post-full-content h4,
.post-full-content h5,
.post-full-content h6 {
    margin: 2rem 0 1rem;
    font-weight: 600;
    color: #1a1a1a;
}

.post-full-content p {
    margin-bottom: 1.5rem;
}

.post-full-content ul,
.post-full-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.post-full-content li {
    margin-bottom: 0.5rem;
}

.post-full-content blockquote {
    margin: 2rem 0;
    padding-left: 1.5rem;
    border-left: 4px solid #0066cc;
    font-style: italic;
    color: #666;
}

.post-full-content pre {
    background: #f5f5f5;
    border-radius: 4px;
    padding: 1rem;
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

.post-full-content code {
    background: #f5f5f5;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
}

/* Koenig Editor - Wide Images */
.kg-width-wide {
    position: relative;
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    max-width: 1400px;
    transform: translateX(calc(50vw - 50%));
}

/* Koenig Editor - Full Width Images */
.kg-width-full {
    position: relative;
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.post-full-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e1e8ed;
}

.post-full-footer-tags {
    font-size: 0.9375rem;
}

.post-full-footer-tags span {
    color: #888;
    margin-right: 0.5rem;
}

.post-full-footer-tags a {
    margin-right: 0.75rem;
}

/* Page
   ========================================================================= */

.page {
    background: #fff;
    border-radius: 8px;
    padding: 3rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.page-content {
    font-size: 1.125rem;
    line-height: 1.7;
    color: #333;
}

/* Sidebar
   ========================================================================= */

.sidebar {
    position: sticky;
    top: 2rem;
    height: fit-content;
}

.sidebar-section {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.sidebar-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1a1a1a;
}

.sidebar-description {
    font-size: 0.9375rem;
    color: #666;
    line-height: 1.6;
}

/* Archive Data */

#archive-data {
    display: none;
}

/* Social Links */

.social-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.social-links a {
    color: #0066cc;
    font-size: 0.9375rem;
}

/* Footer
   ========================================================================= */

.site-footer {
    background-color: #fff;
    border-top: 1px solid #e1e8ed;
    padding: 2rem 0;
    margin-top: 4rem;
}

.site-footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: #666;
}

/* Pagination
   ========================================================================= */

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.pagination a,
.pagination .page-number {
    padding: 0.5rem 1rem;
    background: #fff;
    border-radius: 4px;
    color: #333;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.pagination a:hover {
    background: #0066cc;
    color: #fff;
}

.pagination .page-number {
    color: #fff;
    background: #0066cc;
}

/* Responsive Design
   ========================================================================= */

@media (max-width: 900px) {
    .site-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .sidebar {
        position: static;
    }
    
    .site-header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .header-right {
        width: 100%;
        flex-direction: column;
        gap: 1rem;
    }
    
    .search-box {
        max-width: 100%;
        width: 100%;
    }
    
    .post-full,
    .page {
        padding: 2rem;
    }
}

@media (max-width: 600px) {
    .site-wrapper {
        padding: 0 1rem;
    }
    
    .site-header-content {
        padding: 0 1rem;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .post-full-title {
        font-size: 2rem;
    }
    
    .post-full,
    .page {
        padding: 1.5rem;
    }
    
    .site-footer-content {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}
