/**
 * Single Post/Page Styles
 */

/* ==========================================================================
   Breadcrumbs
   ========================================================================== */

.breadcrumbs {
    padding: 1.5rem 0;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 2rem;
}

.breadcrumbs ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
}

.breadcrumbs ol li {
    display: inline-flex;
    align-items: center;
    font-size: 0.875rem;
    color: #666;
}

.breadcrumbs ol li::before {
    display: none; /* Ukryj automatyczną numerację */
}

.breadcrumbs ol li:not(:last-child)::after {
    content: "/";
    margin-left: 0.5rem;
    color: #666;
}

.breadcrumbs ol li a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumbs ol li a:hover {
    color: var(--color-primary, #8bc34a);
}

.breadcrumbs ol li:last-child span {
    color: #333;
    font-weight: 500;
}

/* ==========================================================================
   Single Post Layout
   ========================================================================== */

.single-post {
    background: #fff;
}

.single-post .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    padding: 2rem 0 4rem;
}

.content-wrapper.has-sidebar {
    grid-template-columns: 1fr 320px;
}

.primary-content {
    min-width: 0; /* Prevent grid blowout */
}

/* Single post without sidebar - center and limit width for readability */
.single-post .primary-content {
    max-width: 900px;
    margin: 0 auto;
}

/* ==========================================================================
   Page Header (Archives, Search)
   ========================================================================== */

.page-header {
    padding: 2rem 0;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e9ecef;
}

.page-header .page-title {
    font-size: 2.5rem;
    line-height: 1.2;
    margin: 0 0 1rem;
    color: #2c3e50;
}

.page-header .page-description,
.page-header .archive-description {
    font-size: 1.125rem;
    line-height: 1.7;
    color: #666;
    margin: 0;
}

.page-header .page-title span {
    color: var(--color-primary, #8bc34a);
}

/* ==========================================================================
   Posts Grid (Archive, Blog)
   ========================================================================== */

.posts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.posts-grid.sidebar {
    grid-template-columns: 1fr;
}

.posts-grid .post-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.posts-grid .post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.posts-grid .post-card .post-thumbnail {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    overflow: hidden;
    margin-bottom: 0;
}

.posts-grid .post-card .post-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.posts-grid .post-card:hover .post-thumbnail img {
    transform: scale(1.05);
}

.posts-grid .post-card .post-content {
    padding: 1.5rem;
}

.posts-grid .post-card .post-title {
    font-size: 1.5rem;
    margin: 0 0 1rem;
}

.posts-grid .post-card .post-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.posts-grid .post-card .post-title a:hover {
    color: var(--color-primary, #8bc34a);
}

.posts-grid .post-card .read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-primary, #8bc34a);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9375rem;
    margin-top: 1rem;
    transition: gap 0.3s ease;
}

.posts-grid .post-card .read-more:hover {
    gap: 0.75rem;
}

.posts-grid .post-card .read-more svg {
    width: 16px;
    height: 16px;
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 3rem;
    padding: 2rem 0;
}

.pagination ul.page-numbers {
    display: flex;
    gap: 0.25rem;
    align-items: center;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
}

.pagination .page-numbers li {
    list-style: none;
    margin: 0;
    padding: 0;
}

.pagination .nav-links {
    display: flex;
    gap: 0.25rem;
    align-items: center;
    flex-wrap: wrap;
}

.pagination .page-numbers,
.pagination a.page-numbers,
.pagination span.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    background: transparent;
    color: #555;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
}

.pagination .page-numbers svg {
    width: 16px;
    height: 16px;
    vertical-align: middle;
}

.pagination .page-numbers:hover,
.pagination a.page-numbers:hover {
    background: #f0f0f0;
    color: #333;
}

.pagination .page-numbers.current,
.pagination span.current {
    background: var(--color-primary, #8bc34a);
    color: #fff;
    font-weight: 600;
}

.pagination .page-numbers.current:hover,
.pagination span.current:hover {
    background: var(--color-primary, #8bc34a);
    color: #fff;
}

.pagination .page-numbers.dots,
.pagination span.dots {
    background: transparent;
    pointer-events: none;
    color: #666;
}

.pagination .page-numbers.prev,
.pagination .page-numbers.next,
.pagination a.prev,
.pagination a.next {
    font-weight: 600;
    color: #333;
}

.pagination .page-numbers.prev:hover,
.pagination .page-numbers.next:hover,
.pagination a.prev:hover,
.pagination a.next:hover {
    background: #e8e8e8;
}

/* ==========================================================================
   Post Article (Single)
   ========================================================================== */

.post-card {
    background: #fff;
}

.post-card .post-thumbnail {
    margin-bottom: 2rem;
    border-radius: 8px;
    overflow: hidden;
}

.post-card .post-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

.post-card .post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: #666;
}

.post-card .post-meta a {
    color: var(--color-primary, #8bc34a);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.post-card .post-meta a:hover {
    opacity: 0.8;
}

.post-card .post-meta .separator {
    color: #ddd;
}

.post-card .post-header {
    margin-bottom: 2rem;
}

.post-card .post-title {
    font-size: 2.5rem;
    line-height: 1.2;
    margin: 0 0 1rem;
    color: #2c3e50;
}

.post-card .post-excerpt,
.post-card .post-content {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: #444;
}

/* Content styling */
.post-card .post-excerpt p,
.post-card .post-content p {
    margin-bottom: 1.5rem;
}

.post-card .post-excerpt h2,
.post-card .post-content h2 {
    font-size: 1.875rem;
    margin: 2.5rem 0 1.25rem;
    color: #2c3e50;
    font-weight: 600;
}

.post-card .post-excerpt h3,
.post-card .post-content h3 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
    color: #34495e;
    font-weight: 600;
}

.post-card .post-excerpt h4,
.post-card .post-content h4 {
    font-size: 1.25rem;
    margin: 1.5rem 0 0.75rem;
    color: #34495e;
}

.post-card .post-excerpt ul,
.post-card .post-excerpt ol,
.post-card .post-content ul,
.post-card .post-content ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.post-card .post-excerpt ul li,
.post-card .post-excerpt ol li,
.post-card .post-content ul li,
.post-card .post-content ol li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

.post-card .post-excerpt ul {
    list-style-type: disc;
}

.post-card .post-excerpt ol {
    list-style-type: decimal;
}

.post-card .post-excerpt blockquote,
.post-card .post-content blockquote {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #f8f9fa;
    border-left: 4px solid var(--color-primary, #8bc34a);
    font-style: italic;
    color: #555;
}

.post-card .post-excerpt a,
.post-card .post-content a {
    color: var(--color-primary, #8bc34a);
    text-decoration: underline;
    transition: opacity 0.3s ease;
}

.post-card .post-excerpt a:hover,
.post-card .post-content a:hover {
    opacity: 0.8;
}

.post-card .post-excerpt img,
.post-card .post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.post-card .post-excerpt .wp-caption,
.post-card .post-content .wp-caption {
    max-width: 100%;
}

.post-card .post-excerpt .wp-caption-text,
.post-card .post-content .wp-caption-text {
    font-size: 0.875rem;
    color: #777;
    font-style: italic;
    margin-top: 0.5rem;
}

/* Post Footer */
.post-card .post-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e9ecef;
}

.post-card .post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.post-card .post-tags a {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    background: #f8f9fa;
    color: #666;
    font-size: 0.875rem;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.post-card .post-tags a:hover {
    background: var(--color-primary, #8bc34a);
    color: #fff;
}

.post-card .post-author-meta {
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
    color: #666;
}

.post-card .post-author-meta a {
    color: var(--color-primary, #8bc34a);
    text-decoration: none;
}

.post-card .post-author-meta a:hover {
    text-decoration: underline;
}

/* Social Share */
.social-share {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.social-share-label {
    font-weight: 600;
    color: #666;
    font-size: 0.9375rem;
}

.social-share-buttons {
    display: flex;
    gap: 0.5rem;
}

.social-share-buttons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #f8f9fa;
    color: #666;
    border-radius: 50%;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-share-buttons a:hover {
    background: var(--color-primary, #8bc34a);
    color: #fff;
    transform: translateY(-2px);
}

.social-share-buttons svg {
    width: 18px;
    height: 18px;
}

/* ==========================================================================
   Post Navigation
   ========================================================================== */

.post-navigation {
    margin-top: 3rem;
    padding: 2rem 0;
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
}

.post-navigation .nav-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.post-navigation .nav-previous,
.post-navigation .nav-next {
    display: flex;
    flex-direction: column;
}

.post-navigation .nav-next {
    text-align: right;
}

.post-navigation .nav-label {
    font-size: 0.875rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.post-navigation a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.post-navigation a:hover {
    color: var(--color-primary, #8bc34a);
}

/* ==========================================================================
   Sidebar
   ========================================================================== */

.widget-area {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
}

.widget-area .widget {
    margin-bottom: 2.5rem;
}

.widget-area .widget:last-child {
    margin-bottom: 0;
}

.widget-area .widget-title {
    font-size: 1.25rem;
    margin: 0 0 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--color-primary, #8bc34a);
    color: #2c3e50;
}

/* Widget Lists */
.widget-area ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget-area ul li {
    padding: 0.75rem 0;
    border-bottom: 1px solid #e9ecef;
}

.widget-area ul li:last-child {
    border-bottom: none;
}

.widget-area ul li a {
    color: #555;
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
}

.widget-area ul li a:hover {
    color: var(--color-primary, #8bc34a);
}

.widget-area ul li .post-date {
    font-size: 0.8125rem;
    color: #666;
    display: block;
    margin-top: 0.25rem;
}

/* Recent Posts Widget */
.widget_recent_entries ul li {
    padding-left: 0;
}

/* Categories Widget */
.widget_categories select,
.widget_archive select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    font-size: 0.9375rem;
}

/* Tag Cloud */
.tagcloud,
.widget_tag_cloud .tagcloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tagcloud a,
.widget_tag_cloud .tagcloud a {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    background: #fff;
    color: #666;
    font-size: 0.875rem !important;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.tagcloud a:hover,
.widget_tag_cloud .tagcloud a:hover {
    background: var(--color-primary, #8bc34a);
    color: #fff;
    border-color: var(--color-primary, #8bc34a);
}

/* Search Widget */
.widget_search .search-form {
    position: relative;
}

.widget_search .search-field {
    width: 100%;
    padding: 0.75rem 3rem 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9375rem;
}

.widget_search .search-submit {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    padding: 0 1rem;
    background: var(--color-primary, #8bc34a);
    color: #fff;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: background 0.3s ease;
}

.widget_search .search-submit:hover {
    background: #7ab32d;
}

/* Calendar Widget */
.widget_calendar table {
    width: 100%;
    border-collapse: collapse;
}

.widget_calendar th,
.widget_calendar td {
    text-align: center;
    padding: 0.5rem;
}

.widget_calendar thead {
    background: var(--color-primary, #8bc34a);
    color: #fff;
}

.widget_calendar tbody td {
    border: 1px solid #e9ecef;
}

.widget_calendar tbody td a {
    display: block;
    font-weight: 600;
}

/* ==========================================================================
   Comments Section
   ========================================================================== */

.comments-area {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 2px solid #e9ecef;
}

.comments-title {
    font-size: 1.75rem;
    margin-bottom: 2rem;
    color: #2c3e50;
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 3rem;
}

.comment {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.comment-body {
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: 1.5rem;
}

.comment-author .avatar {
    border-radius: 50%;
    border: 2px solid #ddd;
}

.comment-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.9375rem;
}

.comment-author .fn {
    font-weight: 600;
    color: #2c3e50;
    font-style: normal;
}

.comment-metadata a {
    color: #666;
    text-decoration: none;
    font-size: 0.875rem;
}

.comment-metadata a:hover {
    color: var(--color-primary, #8bc34a);
}

.comment-content {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.reply {
    margin-top: 1rem;
}

.comment-reply-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--color-primary, #8bc34a);
    color: #fff;
    font-size: 0.875rem;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.3s ease;
}

.comment-reply-link:hover {
    background: #7ab32d;
}

/* Nested comments */
.children {
    list-style: none;
    margin-left: 3rem;
    padding-left: 0;
}

/* Comment Form */
.comment-respond {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
}

.comment-reply-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.comment-form p {
    margin-bottom: 1rem;
}

.comment-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #555;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form input[type="url"]:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--color-primary, #8bc34a);
}

.comment-form textarea {
    min-height: 150px;
    resize: vertical;
}

.comment-form .form-submit {
    margin: 0;
}

.comment-form .submit {
    padding: 0.75rem 2rem;
    background: var(--color-primary, #8bc34a);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.comment-form .submit:hover {
    background: #7ab32d;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1024px) {
    .content-wrapper.has-sidebar {
        grid-template-columns: 1fr 280px;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .content-wrapper.has-sidebar {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .post-card .post-title {
        font-size: 2rem;
    }
    
    .post-navigation .nav-links {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .post-navigation .nav-next {
        text-align: left;
    }
    
    .widget-area {
        padding: 1.5rem;
    }
    
    .children {
        margin-left: 1rem;
    }
    
    .comment-body {
        grid-template-columns: 50px 1fr;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .breadcrumbs {
        padding: 1rem 0;
    }
    
    .breadcrumbs ol li {
        font-size: 0.8125rem;
    }
    
    .post-card .post-title {
        font-size: 1.75rem;
    }
    
    .post-card .post-excerpt,
    .post-card .post-content {
        font-size: 1rem;
    }
    
    .social-share {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}
