﻿.grid {
    padding: 10px 10px;
    border-radius: 5px 5px;
    margin-bottom: 20px;
    margin: 0 auto;
    font-family: 'Raleway', 'PT Sans';
}

    .grid:after {
        content: '';
        display: block;
        clear: both;
    }

.grid-item {
    float: left;
    background: #c2c2c2;
    border-color: hsla(0, 0%, 0%, 0.5);
    border-radius: 10px;
    margin-bottom: 20px
}

.grid:after {
    content: '';
    display: block;
    clear: both;
}

.grid-item .article-desc {
    border-radius: 0 0 5px 5px;
    color: #dbdbdb;
    line-height: 15px;
    padding: 15px 15px;
    min-height: 30px;
    font-size: 1rem;
    line-height: 1.5;
    padding-left: 10px;
    background-color: #2f2f2f
}

.grid-item .article-title {
    top: 0px;
    color: white;
    text-align: center;
    font-size: 1.3rem;
    font-weight: bold;
    line-height: 1.2;
    width: 100%;
    font-family: 'PT Sans';
    letter-spacing: 1px;
    display:block;
    padding-bottom:10px
}

.grid-item .article-stat {
    padding: 5px 5px;
    font-size: .8rem;
}

    .grid-item .article-stat .comments {
        padding-left: 5px;
        color: #005eaf
    }

.grid-item img {
    display: block;
    max-width: 100%;
    width: 100%;
    padding: 10px;
    border-radius: 20px 20px 20px 20px;
}

.grid-item .image {
    position: relative
}

.article-img, .readmore {
    cursor: pointer
}

.article-actions {
    height: 30px
}

.readmore {
    float: right;
    text-align: right;
    font-size: 1.1rem;
    font-weight: bold;
    background-color: #fb8989;
    margin-top: 5px;
    border-radius: 4px 4px;
    padding: 5px 5px;
    color: white !important
}

    .readmore:hover {
        text-decoration: underline;
        background-color: darkred
    }

.grid-item {
    width: 200px;
}

@media (max-width: 768px) {
    .grid-item {
        width: 300px;
    }
}

@media (min-width: 768px) {
    .grid-item {
        width: 250px;
    }
}

@media (min-width: 1024px) {
    .grid-item {
        width: 250px;
    }
}

@media (min-width: 1400px) {
    .grid-item {
        width: 300px;
    }
}

@media (min-width: 1700px) {
    .grid-item {
        width: 300px;
    }
}

.posts-info {
    margin-top: 30px;
    font-family: 'Raleway', 'PT Sans';
}

#loading-indicator {
    color: #2f2f2f;
    font-size: 16px;
    font-weight: bold;
    padding: 20px;
    text-align: center;
}

#loading-indicator span {
    display: inline-block;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

#total-posts-count {
    color: #fb8989;
    font-size: 20px;
}

/* Advertisement block styling */
.grid-item-ad .ad-placeholder {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.grid-item-ad .ad-placeholder::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(255, 255, 255, 0.05) 10px,
        rgba(255, 255, 255, 0.05) 20px
    );
    animation: shimmer 20s linear infinite;
}

@keyframes shimmer {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(50%, 50%);
    }
}

.grid-item-ad .ad-content {
    position: relative;
    z-index: 1;
    color: white;
    padding: 20px;
}

.grid-item-ad .ad-content h3 {
    font-size: 28px;
    margin: 0 0 10px 0;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.grid-item-ad .ad-content p {
    font-size: 16px;
    margin: 10px 0;
    opacity: 0.95;
}

.grid-item-ad .ad-contact {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    margin-top: 10px;
    backdrop-filter: blur(10px);
}

.grid-item-ad .article-desc {
    background: #f8f9fa;
    border-top: 3px solid #667eea;
}

.grid-item-ad .article-title {
    color: #667eea;
    font-weight: bold;
    font-size: 20px;
}

.grid-item-ad:hover .ad-placeholder {
    transform: scale(1.02);
    transition: transform 0.3s ease;
}
