/* Últimos Posts - CSS Simples */

.ultimos-posts-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Padrão: 4 colunas */
    gap: 20px;
    margin: 20px 0;
}

.post-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.post-item:hover {
    transform: translateY(-5px);
}

.post-image {
    position: relative;
    overflow: hidden;
}

.post-image img {
    width: 100%;
    height: 200px; 
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-item:hover .post-image img {
    transform: scale(1.1);
}

.post-content {
    padding: 15px;
}

.post-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    line-height: 1.4;
}

.post-title a {
    text-decoration: none;
}

.post-excerpt {
    font-size: 14px;
    line-height: 1.5;
    margin: 10px 0;
}

.post-date {
    font-size: 14px;
    margin-top: 10px;
}

/* Layout Overlay */
.post-item.layout-overlay {
    position: relative;
    overflow: hidden;
    min-height: 300px;
}

.post-link-overlay {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease;
}

.post-link-overlay:hover {
    transform: translateY(-2px);
}

.post-image-overlay {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 300px;
}

.post-image-overlay img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    transition: transform 0.3s ease;
}

.post-link-overlay:hover .post-image-overlay img {
    transform: scale(1.05);
}

.post-content-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.7) 30%, rgba(0, 0, 0, 0.3) 60%, transparent 100%);
    color: white;
    padding: 30px 20px 20px;
    z-index: 2;
}

.post-content-overlay .post-title {
    color: white;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.9), 1px 1px 4px rgba(0, 0, 0, 0.8);
}

.post-content-overlay .post-excerpt {
    color: rgba(255, 255, 255, 0.9);
    margin: 10px 0;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.9), 1px 1px 3px rgba(0, 0, 0, 0.8);
}

.post-content-overlay .post-date {
    color: rgba(255, 255, 255, 0.8);
    margin-top: 10px;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.9), 1px 1px 2px rgba(0, 0, 0, 0.8);
}

/* Layout Rounded - Imagem com cantos arredondados */
.post-item.layout-rounded {
    background: transparent !important;
    border-radius: 0 !important;
    overflow: visible !important;
    box-shadow: none !important;
    transition: none !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
}

.post-item.layout-rounded:hover {
    transform: none !important;
    box-shadow: none !important;
}

.post-rounded-wrapper {
    display: flex;
    flex-direction: column;
    height: auto;
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

.post-rounded-image {
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    margin-bottom: 0;
}

.post-rounded-image img {
    width: 100% !important;
    object-fit: cover !important;
    transition: transform 0.3s ease !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
}

.post-item.layout-rounded:hover .post-rounded-image img {
    transform: scale(1.05);
}

.post-rounded-content {
    padding: 20px 0;
    flex-grow: 0;
    display: flex;
    flex-direction: column;
}

.post-rounded-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 12px 0;
    color: #1a1a1a;
}

.post-rounded-title a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

.post-rounded-title a:hover {
    color: #007cba;
}

.post-rounded-excerpt {
    font-size: 15px;
    line-height: 1.6;
    color: #555;
    margin-bottom: 16px;
    flex-grow: 1;
}

.post-rounded-tags {
    margin-bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.post-tag {
    display: inline-block;
    padding: 4px 8px;
    background: #f0f8ff;
    color: #007cba;
    font-size: 12px;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.post-tag:hover {
    background: #007cba;
    color: white;
}

.post-rounded-date {
    font-size: 14px;
    color: #666;
    margin-top: auto;
    font-weight: 500;
}

/* Responsividade */
@media (max-width: 1023px) {
    .ultimos-posts-container {
        grid-template-columns: repeat(2, 1fr); /* Padrão tablet: 2 colunas */
        gap: 15px;
    }
}

@media (max-width: 767px) {
    .ultimos-posts-container:not(.ultimos-posts-slider) {
        grid-template-columns: repeat(1, 1fr); /* Padrão mobile: 1 coluna */
        gap: 15px;
    }
    
    /* Layout Rounded - Mobile */
    .post-item.layout-rounded .post-rounded-image img {
        /* Altura será controlada pelo CSS dinâmico */
    }
    
    .post-item.layout-rounded .post-rounded-content {
        padding: 16px 0;
    }
    
    .post-item.layout-rounded .post-rounded-title {
        font-size: 18px;
    }
    
    .post-item.layout-rounded .post-rounded-excerpt {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    /* Slider Mobile */
    .ultimos-posts-slider {
        display: block !important;
        position: relative;
        overflow: hidden;
        width: 100%;
    }
    
    .ultimos-posts-slider .post-item {
        display: none;
        margin: 0;
        width: 100%;
    }
    
    .ultimos-posts-slider .post-item:first-child {
        display: block;
    }
    
    /* Dots de navegação */
    .slider-dots {
        text-align: center;
        margin-top: 15px;
    }
    
    .slider-dot {
        display: inline-block;
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background: #ccc;
        margin: 0 5px;
        cursor: pointer;
        transition: background 0.3s ease;
    }
    
    .slider-dot.active {
        background: #007cba;
    }
}
@media (min-width: 481px) {
    .ultimos-posts-slider .post-item {
        position: static !important;
        opacity: 1 !important;
        z-index: auto !important;
        display: block !important;
    }
} 