/* Post Block Styles - Glass Effect (iPhone Style) */
.posts-block-wrapper {
    margin: 0 auto;
    position: relative;
}

/* Main Title with glass effect */
.posts-main-title h2 {
    text-align: center;
    margin-bottom: 60px;
    font-size: 2.8rem;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 700;
    position: relative;
    padding-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    display: none; /* Hidden by default, can be enabled if needed */
}

/* Blog Categories Filter */
.blog-categories-filter {
    margin-bottom: 40px;
    text-align: center;
}

.filter-title {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.2rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.categories-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.category-filter-item {
    display: inline-block;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 25px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.category-filter-item:hover,
.category-filter-item.active {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 1);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

/* Grid Layout - Dynamic Columns */
.posts-grid {
    display: grid;
    gap: 30px;
    position: relative;
    z-index: 1;
}

/* Column Classes */
.grid-columns-1 {display:grid; grid-template-columns: 1fr; gap: 35px;}
.grid-columns-2 {display:grid; grid-template-columns: repeat(2, 1fr); gap: 35px; }
.grid-columns-3 {display:grid; grid-template-columns: repeat(3, 1fr); gap: 35px; }
.grid-columns-4 { display:grid; grid-template-columns: repeat(4, 1fr); gap: 35px;}

/* Post Item Styles - GLASS EFFECT (ΑΡΧΙΚΟ DESIGN) */
.post-item {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 2px solid rgb(255 255 255 / 28%);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: block;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    height: 100%;
    position: relative;
    z-index: 1;
}

/* Hover effect - enhanced glass */
/*.post-item:hover {
    transform: translateY(-10px) scale(1.02);
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.25),
        inset 0 2px 0 rgba(255, 255, 255, 0.3),
        0 0 20px rgba(255, 255, 255, 0.1);
}*/

/* Hover glow effect */
.post-item:hover::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, 
        rgba(255, 255, 255, 0.1), 
        rgba(255, 255, 255, 0.05), 
        rgba(255, 255, 255, 0.1)
    );
    border-radius: 22px;
    z-index: -2;
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 0.8;
    }
}

/* Post Thumbnail with glass overlay */
.post-thumbnail {
    height: 220px;
    overflow: hidden;
    position: relative;
    border-radius: 20px 20px 0 0;
    margin: -1px -1px 0 -1px;
}

/* Image inside glass card */
.post-thumbnail-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: brightness(0.9) contrast(1.1);
}

/* Image overlay for glass effect */
.post-thumbnail::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.1) 0%,
        rgba(255, 255, 255, 0.05) 50%,
        transparent 100%
    );
    pointer-events: none;
}

.post-item:hover .post-thumbnail-img {
    transform: scale(1.08);
}

/* Placeholder for missing images */
.no-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(102, 126, 234, 0.6) 0%, 
        rgba(118, 75, 162, 0.6) 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    backdrop-filter: blur(5px);
}

.no-image-placeholder::before {
    content: '📷';
    font-size: 2.5rem;
    opacity: 0.8;
}

/* Post Content - glass style text */
.post-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    height: calc(100% - 220px);
    position: relative;
    z-index: 2;
}

/* Category - glass style */
.post-category {
    display: inline-block;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 15px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 6px 15px;
    border-radius: 20px;
    border: 2px solid rgb(255 255 255 / 28%);
    align-self: flex-start;
    text-decoration: none;
    transition: all 0.3s ease;
}

.post-category:hover {
    background: rgba(255, 255, 255, 0.25);
    color: rgba(255, 255, 255, 1);
}

/* Title - white text with subtle shadow */
.post-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.4;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    /* Limit to 3 lines */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 60px;
}

.post-title a {
    text-decoration: none;
    color: inherit;
}

/* Excerpt - light text */
.post-excerpt {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    font-size: 0.95rem;
    margin-bottom: 20px;
    flex-grow: 1;
    /* Limit to 3 lines */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Meta - glass style bottom bar */
.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    margin-top: auto;
}

/* Hide meta in grid layout */
.posts-grid .post-meta {
    display: none;
}

.post-date {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.read-more {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    text-decoration: none;
}

.post-item:hover .read-more {
    color: rgba(255, 255, 255, 1);
}

.post-item:hover .read-more::after {
    transform: translateX(5px);
}

/* No Posts Message */
.no-posts {
    text-align: center;
    grid-column: 1 / -1;
    padding: 40px;
    color: rgba(255, 255, 255, 0.8);
    font-style: italic;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Slider Styles with glass effect */
.posts-slider {
    position: relative;
    padding: 0 20px;
}

.posts-slider .post-item {
    margin: 0 15px;
    height: auto;
}

/* Higher quality images for slider with glass */
.posts-slider .post-thumbnail {
    height: 250px;
}

.posts-slider .post-content {
    height: calc(100% - 250px);
}

/* Owl Carousel Navigation - glass style */
.posts-slider .owl-nav {
    display: block;
}

.posts-slider .owl-nav button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 20px;
    z-index: 10;
    opacity: 0.7;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.posts-slider .owl-nav button:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    opacity: 1;
    border: 1px solid rgba(255, 255, 255, 0.4);
    transform: translateY(-50%) scale(1.1);
}

.posts-slider .owl-nav .owl-prev {
    left: -60px;
}

.posts-slider .owl-nav .owl-next {
    right: -60px;
}

/* Dots - glass style */
.posts-slider .owl-dots {
    text-align: center;
    margin-top: 40px;
}

.posts-slider .owl-dots .owl-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    margin: 0 8px;
    transition: all 0.3s ease;
}

.posts-slider .owl-dots .owl-dot.active,
.posts-slider .owl-dots .owl-dot:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Pagination Styles */
.posts-pagination {
    margin-top: 50px;
    text-align: center;
}

.posts-pagination .page-numbers {
    display: inline-flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 8px;
}

.posts-pagination .page-numbers li {
    display: inline-block;
}

.posts-pagination .page-numbers a,
.posts-pagination .page-numbers span {
    display: inline-block;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 45px;
    text-align: center;
}

.posts-pagination .page-numbers a:hover,
.posts-pagination .page-numbers .current {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 1);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.posts-pagination .page-numbers .dots {
    background: transparent;
    border: none;
}

/* Responsive */
@media (max-width: 1200px) {
    .grid-columns-4 { grid-template-columns: repeat(3, 1fr); }
    
    .grid-columns-1,
    .grid-columns-2,
    .grid-columns-3,
    .grid-columns-4 { gap: 20px;}
    .post-content {padding: 15px;}
    
    .posts-slider .owl-nav button {
        display: none;
    }
    
    .posts-slider {
        padding: 0;
    }
}

@media (max-width: 992px) {
    .grid-columns-3,
    .grid-columns-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    
    .posts-main-title h2 {
        font-size: 2rem;
        margin-bottom: 40px;
        letter-spacing: 2px;
    }
    
    .posts-grid {
        gap: 25px;
    }
    
    .grid-columns-2,
    .grid-columns-3,
    .grid-columns-4 { 
        grid-template-columns: 1fr; 
    }
    
    .post-title {
        font-size: 1.2rem;
        min-height: auto;
        -webkit-line-clamp: 2;
    }
    
    .post-excerpt {
        -webkit-line-clamp: 2;
    }
    
    /* Adjust glass effect for mobile */
    .post-item {
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
    }
    
    .post-thumbnail {
        height: 200px;
    }
    
    .post-content {
        height: calc(100% - 200px);
        padding: 20px;
    }
    
    .posts-slider .post-thumbnail {
        height: 220px;
    }
    
    .posts-slider .post-content {
        height: calc(100% - 220px);
    }
    
    .categories-list {
        gap: 8px;
    }
    
    .category-filter-item {
        padding: 6px 15px;
        font-size: 0.85rem;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .post-item {
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .post-item:hover {
        border: 1px solid rgba(255, 255, 255, 0.15);
    }
}

/* Safari specific fixes for backdrop-filter */
@supports (-webkit-backdrop-filter: none) or (backdrop-filter: none) {
    .post-item {
        -webkit-backdrop-filter: blur(20px);
        backdrop-filter: blur(20px);
    }
    
    .post-item:hover {
        -webkit-backdrop-filter: blur(25px);
        backdrop-filter: blur(25px);
    }
}

/* Fallback for browsers without backdrop-filter support */
@supports not ((-webkit-backdrop-filter: none) or (backdrop-filter: none)) {
    .post-item {
        background: rgba(255, 255, 255, 0.25);
    }
    
    .post-item:hover {
        background: rgba(255, 255, 255, 0.35);
    }
}