/**
 * Okruh Posts Layout Styles
 *
 * Štýly pre zobrazenie príspevkov okruhov
 * CSS premenná --okruh-color sa nastavuje cez shortcode
 */

/* Header */
.srz-okruh-posts-header {
    text-align: center;
    margin-bottom: 30px;
}

.srz-okruh-posts-title {
    margin: 0 0 10px;
    font-size: 32px;
    font-weight: 700;
    color: var(--okruh-color, #FF9800);
}

.srz-okruh-posts-subtitle {
    margin: 0;
    font-size: 16px;
    color: #666;
}

/* Layout */
.srz-okruh-posts-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 40px;
    margin-top: 30px;
}

@media (max-width: 1024px) {
    .srz-okruh-posts-layout {
        grid-template-columns: 1fr;
    }
}

/* Posts List */
.srz-okruh-posts-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Post Item */
.srz-okruh-post-item {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 24px;
    padding: 24px;
    margin-bottom: 20px;
    background: #fff;
    border: 2px solid var(--okruh-color, #FF9800);
    border-radius: 12px;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.srz-okruh-post-item:hover {
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.2);
    transform: translateY(-2px);
}

.srz-okruh-post-item:last-child {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .srz-okruh-post-item {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* Thumbnail */
.srz-okruh-post-thumbnail {
    flex-shrink: 0;
}

.srz-okruh-post-thumbnail a {
    display: block;
    border-radius: 8px;
    overflow: hidden;
}

.srz-okruh-post-image {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.srz-okruh-post-thumbnail a:hover .srz-okruh-post-image {
    transform: scale(1.05);
}

.srz-okruh-post-no-image {
    display: block;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
}

.srz-okruh-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, #f5f9f8 0%, #e8f2ef 100%);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.srz-okruh-placeholder-logo {
    max-width: 120px;
    max-height: 80px;
    width: auto;
    height: auto;
    opacity: 0.5;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.srz-okruh-post-no-image:hover .srz-okruh-placeholder {
    background: linear-gradient(135deg, #e8f2ef 0%, #d8ebe5 100%);
}

.srz-okruh-post-no-image:hover .srz-okruh-placeholder-logo {
    opacity: 0.7;
    transform: scale(1.05);
}

/* Content */
.srz-okruh-post-content {
    display: flex;
    flex-direction: column;
}

.srz-okruh-post-title {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
}

.srz-okruh-post-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.2s ease;
}

.srz-okruh-post-title a:hover {
    color: var(--okruh-color, #FF9800);
}

/* Meta */
.srz-okruh-post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 12px;
    font-size: 13px;
    color: #888;
}

.srz-okruh-post-meta .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    margin-right: 4px;
    vertical-align: middle;
}

.srz-okruh-post-categories a {
    color: #666;
    text-decoration: none;
}

.srz-okruh-post-categories a:hover {
    color: var(--okruh-color, #FF9800);
}

/* Excerpt */
.srz-okruh-post-excerpt {
    margin-bottom: 12px;
    font-size: 14px;
    line-height: 1.6;
    color: #555;
}

/* Read More */
.srz-okruh-post-readmore {
    display: inline-block;
    font-size: 14px;
    font-weight: 500;
    color: var(--okruh-color, #FF9800);
    text-decoration: none;
    transition: color 0.2s ease, filter 0.2s ease;
}

.srz-okruh-post-readmore:hover {
    filter: brightness(0.85);
}

/* Pagination */
.srz-okruh-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e0e0e0;
}

.srz-okruh-pagination a,
.srz-okruh-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    font-size: 14px;
    color: #333;
    text-decoration: none;
    background: #f5f5f5;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.srz-okruh-pagination a:hover {
    background: var(--okruh-color, #FF9800);
    color: #fff;
}

.srz-okruh-pagination .current {
    background: var(--okruh-color, #FF9800);
    color: #fff;
}

/* No Posts */
.srz-okruh-no-posts {
    padding: 60px 20px;
    text-align: center;
    background: #f9f9f9;
    border-radius: 8px;
}

.srz-okruh-no-posts p {
    margin: 0;
    font-size: 16px;
    color: #666;
}

/* Sidebar */
.srz-okruh-posts-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

@media (max-width: 1024px) {
    .srz-okruh-posts-sidebar {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

/* Sidebar Widget */
.srz-okruh-sidebar-widget {
    padding: 24px;
    background: #f9f9f9;
    border-radius: 8px;
}

.srz-okruh-sidebar-widget h4 {
    margin: 0 0 16px;
    padding-bottom: 12px;
    font-size: 16px;
    font-weight: 600;
    color: var(--okruh-color, #FF9800);
    border-bottom: 2px solid var(--okruh-color, #FF9800);
}

/* Subcategories */
.srz-okruh-subcategories {
    margin: 0;
    padding: 0;
    list-style: none;
}

.srz-okruh-subcategories li {
    margin-bottom: 8px;
}

.srz-okruh-subcategories li:last-child {
    margin-bottom: 0;
}

.srz-okruh-subcategories a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    font-size: 14px;
    color: #333;
    text-decoration: none;
    background: #fff;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.srz-okruh-subcategories a:hover {
    background: var(--okruh-color, #FF9800);
    color: #fff;
}

.srz-okruh-subcategories .count {
    font-size: 12px;
    color: #888;
}

.srz-okruh-subcategories a:hover .count {
    color: rgba(255, 255, 255, 0.8);
}

/* Active subcategory */
.srz-okruh-subcategories li.active a {
    background: var(--okruh-color, #FF9800);
    color: #fff;
    font-weight: 600;
}

.srz-okruh-subcategories li.active .count {
    color: rgba(255, 255, 255, 0.8);
}

/* Recent Posts */
.srz-okruh-recent-posts {
    margin: 0;
    padding: 0;
    list-style: none;
}

.srz-okruh-recent-posts li {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #e8e8e8;
}

.srz-okruh-recent-posts li:first-child {
    padding-top: 0;
}

.srz-okruh-recent-posts li:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.srz-recent-thumb {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
}

.srz-recent-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.srz-recent-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.srz-recent-info a {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 13px;
    font-weight: 500;
    color: #333;
    text-decoration: none;
    line-height: 1.4;
}

.srz-recent-info a:hover {
    color: var(--okruh-color, #FF9800);
}

.srz-recent-date {
    margin-top: 4px;
    font-size: 12px;
    color: #888;
}
